public string Execute(MafiaBotV2.Network.NetUser from, MafiaBotV2.Network.NetObject source, string[] args) { if (game == null) { return "Game does not exist."; } else if (game.Creator != from && !from.IsOpInChannel(game.Channel.Name)) { return "You are not the creator."; } games.Destroy(game); return "Game destroyed."; }
public string Execute(MafiaBotV2.Network.NetUser from, MafiaBotV2.Network.NetObject source, string[] args) { if(args.Length < 1) { return "Syntax: ##opdestroy <name>"; } if(!from.IsOpInChannel(bot.MainChannel)) { return "You must be an op to use this command."; } if(bot.Games.GetGame(args[0]) == null) { return "Game doesn't exist."; } bot.Games.Destroy(args[0]); return "Game destroyed."; }