diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_knock.cpp | 10 | ||||
-rw-r--r-- | src/modules/m_lockserv.cpp | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp index 82b76c02b..6ec05602d 100644 --- a/src/modules/m_knock.cpp +++ b/src/modules/m_knock.cpp @@ -27,14 +27,14 @@ class CommandKnock : public Command TRANSLATE3(TR_TEXT, TR_TEXT, TR_END); } - CmdResult Handle (const char* const* parameters, int pcnt, User *user) + CmdResult Handle (const std::vector<std::string> ¶meters, User *user) { Channel* c = ServerInstance->FindChan(parameters[0]); std::string line; if (!c) { - user->WriteNumeric(401, "%s %s :No such channel",user->nick, parameters[0]); + user->WriteNumeric(401, "%s %s :No such channel",user->nick, parameters[0].c_str()); return CMD_FAILURE; } @@ -56,11 +56,11 @@ class CommandKnock : public Command return CMD_FAILURE; } - for (int i = 1; i < pcnt - 1; i++) + for (int i = 1; i < (int)parameters.size() - 1; i++) { - line = line + std::string(parameters[i]) + " "; + line = line + parameters[i] + " "; } - line = line + std::string(parameters[pcnt-1]); + line = line + parameters[parameters.size()-1]; c->WriteChannelWithServ((char*)ServerInstance->Config->ServerName, "NOTICE %s :User %s is KNOCKing on %s (%s)", c->name, user->nick, c->name, line.c_str()); user->WriteServ("NOTICE %s :KNOCKing on %s",user->nick,c->name); diff --git a/src/modules/m_lockserv.cpp b/src/modules/m_lockserv.cpp index f1d6e764f..872678502 100644 --- a/src/modules/m_lockserv.cpp +++ b/src/modules/m_lockserv.cpp @@ -34,7 +34,7 @@ public: syntax.clear(); } - CmdResult Handle (const char* const* parameters, int pcnt, User *user) + CmdResult Handle (const std::vector<std::string> ¶meters, User *user) { locked = true; user->WriteNumeric(988, "%s %s :Closed for new connections", user->nick, user->server); @@ -57,7 +57,7 @@ public: syntax.clear(); } - CmdResult Handle (const char* const* parameters, int pcnt, User *user) + CmdResult Handle (const std::vector<std::string> ¶meters, User *user) { locked = false; user->WriteNumeric(989, "%s %s :Open for new connections", user->nick, user->server); |