switch (args[0].ToLower()) // arg[0] = command itself
{
and
Code:
default:
return false;
Example Code's:
Quote:
:roomid //shows the ID of the room you are in
Code:
case "roomid": //Disconnects target user
sendData("BK" + "Roomid: " + _roomID);
break;
:dcuser //disconnects the target user
Code:
case "dcuser": //Disconnects target user
{
if (rankManager.containsRight(_Rank, "fuse_moderator_access", userID) == false)
return false;
else
{
virtualUser Target = userManager.getUser(args[1]);
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
sendData("BK" + Target + " disconnected.");
Target.sendData("BK" + "A member of staff disconnected you.");
Target.Disconnect(1000);
}
}
break;
}