summaryrefslogtreecommitdiff
path: root/modules/pseudoclients/botserv.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-11-25 20:58:35 -0500
committerAdam <Adam@anope.org>2012-11-25 20:58:35 -0500
commit0110214abc19d0ba895164866d60194feac93900 (patch)
treebea05f28497bcbc07dfc041f7bfb01c8a054be81 /modules/pseudoclients/botserv.cpp
parent54d8695e70cdfe7d8fd5a423537e82f9791ee3f4 (diff)
Fix build the last arg on fantasy commands to chanserv
Diffstat (limited to 'modules/pseudoclients/botserv.cpp')
-rw-r--r--modules/pseudoclients/botserv.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/pseudoclients/botserv.cpp b/modules/pseudoclients/botserv.cpp
index 1cd67c060..addb39e0c 100644
--- a/modules/pseudoclients/botserv.cpp
+++ b/modules/pseudoclients/botserv.cpp
@@ -104,16 +104,16 @@ class BotServCore : public Module
for (unsigned i = 0, j = params.size() - (count - 1); i < j; ++i)
params.erase(params.begin());
+ /* All ChanServ commands take the channel as a first parameter */
+ if (cmd->name.find("chanserv/") == 0 && !cmd->HasFlag(CFLAG_STRIP_CHANNEL))
+ params.insert(params.begin(), c->ci->name);
+
while (cmd->max_params > 0 && params.size() > cmd->max_params)
{
params[cmd->max_params - 1] += " " + params[cmd->max_params];
params.erase(params.begin() + cmd->max_params);
}
- /* All ChanServ commands take the channel as a first parameter */
- if (cmd->name.find("chanserv/") == 0 && !cmd->HasFlag(CFLAG_STRIP_CHANNEL))
- params.insert(params.begin(), c->ci->name);
-
// Command requires registered users only
if (!cmd->HasFlag(CFLAG_ALLOW_UNREGISTERED) && !u->Account())
return;