From 5f6955a43ee286925d9f79affcb2fdd5e9306fe6 Mon Sep 17 00:00:00 2001 From: peavey Date: Mon, 5 May 2008 00:18:01 +0000 Subject: Convert convert convert git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9624 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_jumpserver.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/modules/m_jumpserver.cpp') diff --git a/src/modules/m_jumpserver.cpp b/src/modules/m_jumpserver.cpp index 5593b482a..14448c72e 100644 --- a/src/modules/m_jumpserver.cpp +++ b/src/modules/m_jumpserver.cpp @@ -37,17 +37,17 @@ class CommandJumpserver : public Command redirect_all_immediately = redirect_new_users = false; } - CmdResult Handle (const char* const* parameters, int pcnt, User *user) + CmdResult Handle (const std::vector ¶meters, User *user) { int n_done = 0; - reason = (pcnt < 4) ? "Please use this server/port instead" : parameters[3]; + reason = (parameters.size() < 4) ? "Please use this server/port instead" : parameters[3]; redirect_all_immediately = false; redirect_new_users = true; direction = true; std::string n_done_s; /* No parameters: jumpserver disabled */ - if (!pcnt) + if (!parameters.size()) { if (port) user->WriteServ("NOTICE %s :*** Disabled jumpserver (previously set to '%s:%d')", user->nick, redirect_to.c_str(), port); @@ -62,7 +62,7 @@ class CommandJumpserver : public Command port = 0; redirect_to.clear(); - for (const char* n = parameters[2]; *n; n++) + for (const char* n = parameters[2].c_str(); *n; n++) { switch (*n) { @@ -89,7 +89,7 @@ class CommandJumpserver : public Command User* t = *i; if (!IS_OPER(t)) { - t->WriteNumeric(10, "%s %s %s :Please use this Server/Port instead", user->nick, parameters[0], parameters[1]); + t->WriteNumeric(10, "%s %s %s :Please use this Server/Port instead", user->nick, parameters[0].c_str(), parameters[1].c_str()); ServerInstance->Users->QuitUser(t, reason); n_done++; } @@ -103,10 +103,10 @@ class CommandJumpserver : public Command if (redirect_new_users) { redirect_to = parameters[0]; - port = atoi(parameters[1]); + port = atoi(parameters[1].c_str()); } - user->WriteServ("NOTICE %s :*** Set jumpserver to server '%s' port '%s', flags '+%s%s'%s%s%s: %s", user->nick, parameters[0], parameters[1], + user->WriteServ("NOTICE %s :*** Set jumpserver to server '%s' port '%s', flags '+%s%s'%s%s%s: %s", user->nick, parameters[0].c_str(), parameters[1].c_str(), redirect_all_immediately ? "a" : "", redirect_new_users ? "n" : "", n_done ? " (" : "", -- cgit v1.2.3