diff --git a/CollabVMSharp/CollabVMClient.cs b/CollabVMSharp/CollabVMClient.cs
index 965081b..2e9f84e 100644
--- a/CollabVMSharp/CollabVMClient.cs
+++ b/CollabVMSharp/CollabVMClient.cs
@@ -821,6 +821,16 @@ public class CollabVMClient {
this.commands.Add(cmd, callback);
}
+ ///
+ /// Change client username
+ ///
+ /// New username. Null for the server to assign a guest name
+ public void Rename(string? newname = null)
+ {
+ if (newname == null) SendMsg(Guacutils.Encode("rename"));
+ else SendMsg(Guacutils.Encode("rename", newname));
+ }
+
private void ProcessCommand(string username, string cmd) {
// I stole this from stackoverflow
var re = new Regex("(?<=\")[^\"]*(?=\")|[^\" ]+");