public Execute ( string command, string arguments, ChatExchangeDotNet.User user, ChatExchangeDotNet.Room room, ChatExchangeDotNet.Client client ) : void | ||
command | string | |
arguments | string | |
user | ChatExchangeDotNet.User | |
room | ChatExchangeDotNet.Room | |
client | ChatExchangeDotNet.Client | |
return | void |
public void Execute(string command, string arguments, User user, Room room, Client client)
{
if (!AdaPermissions.IsAuthorized(permissionLevel, user))
{
var messageBuilder = new MessageBuilder();
messageBuilder.AppendPing(user);
messageBuilder.AppendText("You are not authorised to make this command.");
room.PostMessage(messageBuilder);
}
else
{
Action(command, arguments, user, room, client);
}
}