diff options
author | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-05-04 23:28:57 +0000 |
---|---|---|
committer | peavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-05-04 23:28:57 +0000 |
commit | c2d1f2cdafb0a38446844f6bd3d683e8636e37b4 (patch) | |
tree | a9427eff9698f3b4921018de660c70b5ed40bba5 /src/modules/m_cban.cpp | |
parent | 222e912fc3e4a09bba3d9aeef815b6c364c5c71c (diff) |
Convert a whole bunch more
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9620 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_cban.cpp')
-rw-r--r-- | src/modules/m_cban.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp index 10948caf7..94d99c374 100644 --- a/src/modules/m_cban.cpp +++ b/src/modules/m_cban.cpp @@ -88,25 +88,25 @@ class CommandCBan : public Command TRANSLATE4(TR_TEXT,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) { /* syntax: CBAN #channel time :reason goes here */ /* 'time' is a human-readable timestring, like 2d3h2s. */ - if(pcnt == 1) + if (parameters.size() == 1) { - if (ServerInstance->XLines->DelLine(parameters[0], "CBAN", user)) + if (ServerInstance->XLines->DelLine(parameters[0].c_str(), "CBAN", user)) { - ServerInstance->SNO->WriteToSnoMask('x',"%s Removed CBan on %s.",user->nick,parameters[0]); + ServerInstance->SNO->WriteToSnoMask('x',"%s Removed CBan on %s.",user->nick,parameters[0].c_str()); } else { - user->WriteServ("NOTICE %s :*** CBan %s not found in list, try /stats C.",user->nick,parameters[0]); + user->WriteServ("NOTICE %s :*** CBan %s not found in list, try /stats C.",user->nick,parameters[0].c_str()); } return CMD_SUCCESS; } - else if (pcnt >= 2) + else if (parameters.size() >= 2) { // Adding - XXX todo make this respect <insane> tag perhaps.. long duration = ServerInstance->Duration(parameters[1]); @@ -114,7 +114,7 @@ class CommandCBan : public Command try { - r = new CBan(ServerInstance, ServerInstance->Time(), duration, user->nick, parameters[2], parameters[0]); + r = new CBan(ServerInstance, ServerInstance->Time(), duration, user->nick, parameters[2].c_str(), parameters[0].c_str()); } catch (...) { @@ -127,12 +127,12 @@ class CommandCBan : public Command { if (!duration) { - ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent CBan for %s.", user->nick, parameters[0]); + ServerInstance->SNO->WriteToSnoMask('x',"%s added permanent CBan for %s.", user->nick, parameters[0].c_str()); } else { time_t c_requires_crap = duration + ServerInstance->Time(); - ServerInstance->SNO->WriteToSnoMask('x', "%s added timed CBan for %s, expires on %s", user->nick, parameters[0], + ServerInstance->SNO->WriteToSnoMask('x', "%s added timed CBan for %s, expires on %s", user->nick, parameters[0].c_str(), ServerInstance->TimeString(c_requires_crap).c_str()); } @@ -141,7 +141,7 @@ class CommandCBan : public Command else { delete r; - user->WriteServ("NOTICE %s :*** CBan for %s already exists", user->nick, parameters[0]); + user->WriteServ("NOTICE %s :*** CBan for %s already exists", user->nick, parameters[0].c_str()); } } } |