From 291837e48906d9157bc2ed820cb435068f713d7c Mon Sep 17 00:00:00 2001 From: JustinAJ Date: Sat, 8 Nov 2014 14:20:05 -0500 Subject: [PATCH] Fixed "There are no configured moderators" message. --- RenX.ModSystem/RenX_ModSystem.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/RenX.ModSystem/RenX_ModSystem.cpp b/RenX.ModSystem/RenX_ModSystem.cpp index 442f597..9cf915f 100644 --- a/RenX.ModSystem/RenX_ModSystem.cpp +++ b/RenX.ModSystem/RenX_ModSystem.cpp @@ -837,6 +837,7 @@ void ModListIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString & size_t i; Jupiter::String msg; size_t msgBaseSize; + bool haveMods = false; for (Jupiter::DLList::Node *n = pluginInstance.groups.getNode(0); n != nullptr; n = n->next) { group = n->data; @@ -858,10 +859,11 @@ void ModListIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString & { msg.truncate(2); source->sendMessage(channel, msg); + haveMods = true; } - else - source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("There are no configured moderators.")); } + if (!haveMods) + source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("There are no configured moderators.")); } const Jupiter::ReadableString &ModListIRCCommand::getHelp(const Jupiter::ReadableString &)