add Rename()
This commit is contained in:
parent
7bb906a835
commit
d2d5348958
1 changed files with 10 additions and 0 deletions
|
@ -821,6 +821,16 @@ public class CollabVMClient {
|
|||
this.commands.Add(cmd, callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Change client username
|
||||
/// </summary>
|
||||
/// <param name="newname">New username. Null for the server to assign a guest name</param>
|
||||
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("(?<=\")[^\"]*(?=\")|[^\" ]+");
|
||||
|
|
Loading…
Reference in a new issue