From f1dfe2c58c202356a5da5d19254d552d20e5e5f7 Mon Sep 17 00:00:00 2001 From: JustinAJ Date: Sun, 17 May 2015 05:44:38 -0400 Subject: [PATCH] Added safety check to "addmod" IRC command --- RenX.ModSystem/RenX_ModSystem.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/RenX.ModSystem/RenX_ModSystem.cpp b/RenX.ModSystem/RenX_ModSystem.cpp index b94145f..794f3ee 100644 --- a/RenX.ModSystem/RenX_ModSystem.cpp +++ b/RenX.ModSystem/RenX_ModSystem.cpp @@ -669,6 +669,8 @@ void AddIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &chan source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Player not found.")); else if (player->isBot) source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: A bot can not be a moderator.")); + else if (player->uuid.isEmpty()) + source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Player has no UUID.")); else { pluginInstance.resetAccess(player); @@ -846,7 +848,7 @@ void ModListIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString & group = n->data; msg = group->prefix; msg += group->name; - msg.aformat(" (Access: %d): ", group->access); + msg.aformat(IRCNORMAL " (Access: %d): ", group->access); msgBaseSize = msg.size(); i = pluginInstance.modsFile.getSections(); while (i != 0)