Good morning. I want to add kick command in my insim but I have a little problem. The command is: !kick username reason.The command work but don't write the reason in chat.
Any help please?
Input: !kick ab12 is AFK for long time
Any help please?
if (MSO.UserType == UserType.MSO_PREFIX) {
var Conn = Connections[GetConnIdx(MSO.UCID)];
string Text = MSO.Msg.Substring(MSO.TextStart, (MSO.Msg.Length - MSO.TextStart));
string[] command = Text.Split(' ');
command[0] = command[0].ToLower();
switch(command[0]) {
case "!kick":
{
string Username = Text.Remove(0, command[0].Length + command[1].Length + 2);
insim.Send("^1----------Kick----------");
insim.Send(Conn.Playername + " ^8(" + command[0] + ") ^1was kicked!");
insim.Send("^1Reason: " + command[1]);
insim.Send("^1------------------------");
}
break; }}
Input: !kick ab12 is AFK for long time
Output: ----------Kick----------
Ali (ab12) was kicked!
Reason: is
------------------------