mirror of
https://github.com/anope/anope.git
synced 2026-06-28 04:16:37 +02:00
Made Command::Execute's params const
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2644 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
+1
-1
@@ -249,7 +249,7 @@ class CoreExport Command : public Flags<CommandFlag>
|
||||
/** Execute this command.
|
||||
* @param u The user executing the command.
|
||||
*/
|
||||
virtual CommandReturn Execute(User *u, std::vector<ci::string> &);
|
||||
virtual CommandReturn Execute(User *u, const std::vector<ci::string> &);
|
||||
|
||||
/** Requested when the user is requesting help on this command. Help on this command should be sent to the user.
|
||||
* @param u The user requesting help
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ Command::~Command()
|
||||
}
|
||||
}
|
||||
|
||||
CommandReturn Command::Execute(User *u, std::vector<ci::string> &) { return MOD_CONT; }
|
||||
CommandReturn Command::Execute(User *u, const std::vector<ci::string> &) { return MOD_CONT; }
|
||||
|
||||
bool Command::OnHelp(User *u, const ci::string &subcommand) { return false; }
|
||||
|
||||
|
||||
+6
-5
@@ -22,9 +22,10 @@ class CommandBSAct : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ChannelInfo *ci = cs_findchan(params[0].c_str());
|
||||
ci::string message = params[1];
|
||||
|
||||
if (!check_access(u, ci, CA_SAY))
|
||||
{
|
||||
@@ -45,13 +46,13 @@ class CommandBSAct : public Command
|
||||
}
|
||||
|
||||
size_t i = 0;
|
||||
while ((i = params[1].find_first_of("\001"), i) && i != std::string::npos)
|
||||
params[1].erase(i, 1);
|
||||
while ((i = message.find_first_of("\001"), i) && i != std::string::npos)
|
||||
message.erase(i, 1);
|
||||
|
||||
ircdproto->SendAction(ci->bi, ci->name, "%s", params[1].c_str());
|
||||
ircdproto->SendAction(ci->bi, ci->name, "%s", message.c_str());
|
||||
ci->bi->lastmsg = time(NULL);
|
||||
if (LogBot && LogChannel && LogChan && !debug && findchan(LogChannel))
|
||||
ircdproto->SendPrivmsg(ci->bi, LogChannel, "ACT %s %s %s", u->nick, ci->name, params[1].c_str());
|
||||
ircdproto->SendPrivmsg(ci->bi, LogChannel, "ACT %s %s %s", u->nick, ci->name, message.c_str());
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ class CommandBSAssign : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *chan = params[0].c_str();
|
||||
const char *nick = params[1].c_str();
|
||||
|
||||
@@ -234,7 +234,7 @@ class CommandBSBadwords : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *chan = params[0].c_str();
|
||||
ci::string cmd = params[1];
|
||||
|
||||
+8
-7
@@ -18,7 +18,7 @@
|
||||
class CommandBSBot : public Command
|
||||
{
|
||||
private:
|
||||
CommandReturn DoAdd(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn DoAdd(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *nick = params[1].c_str();
|
||||
const char *user = params[2].c_str();
|
||||
@@ -117,7 +117,7 @@ class CommandBSBot : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoChange(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn DoChange(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *oldnick = params[1].c_str();
|
||||
const char *nick = params.size() > 2 ? params[2].c_str() : NULL;
|
||||
@@ -297,7 +297,7 @@ class CommandBSBot : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoDel(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn DoDel(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *nick = params[1].c_str();
|
||||
BotInfo *bi;
|
||||
@@ -335,7 +335,7 @@ class CommandBSBot : public Command
|
||||
this->SetFlag(CFLAG_STRIP_CHANNEL);
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ci::string cmd = params[0];
|
||||
|
||||
@@ -360,11 +360,12 @@ class CommandBSBot : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
std::vector<ci::string> tempparams = params;
|
||||
// ADD takes less params than CHANGE, so we need to take 6 if given and append it with a space to 5.
|
||||
if (params.size() >= 6)
|
||||
params[4] = params[4] + " " + params[5];
|
||||
if (tempparams.size() >= 6)
|
||||
tempparams[4] = tempparams[4] + " " + tempparams[5];
|
||||
|
||||
return this->DoAdd(u, params);
|
||||
return this->DoAdd(u, tempparams);
|
||||
}
|
||||
else if (cmd == "CHANGE")
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ class CommandBSBotList : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
int i, count = 0;
|
||||
BotInfo *bi;
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ class CommandBSHelp : public Command
|
||||
this->SetFlag(CFLAG_STRIP_CHANNEL);
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
mod_help_cmd(s_BotServ, u, BOTSERV, params[0].c_str());
|
||||
return MOD_CONT;
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ class CommandBSInfo : public Command
|
||||
this->SetFlag(CFLAG_STRIP_CHANNEL);
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
BotInfo *bi;
|
||||
ChannelInfo *ci;
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ class CommandBSKick : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *chan = params[0].c_str();
|
||||
ci::string option = params[1];
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ class CommandBSSay : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ChannelInfo *ci;
|
||||
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ class CommandBSSet : public Command
|
||||
this->SetFlag(CFLAG_STRIP_CHANNEL);
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *chan = params[0].c_str();
|
||||
ci::string option = params[1];
|
||||
|
||||
@@ -22,7 +22,7 @@ class CommandBSUnassign : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *chan = params[0].c_str();
|
||||
ChannelInfo *ci = cs_findchan(chan);
|
||||
|
||||
@@ -133,7 +133,7 @@ class CommandCSAccess : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *chan = params[0].c_str();
|
||||
ci::string cmd = params[1];
|
||||
@@ -429,7 +429,7 @@ class CommandCSLevels : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *chan = params[0].c_str();
|
||||
ci::string cmd = params[1];
|
||||
|
||||
+9
-9
@@ -139,7 +139,7 @@ int get_access_nc(NickCore *nc, ChannelInfo *ci)
|
||||
|
||||
class CommandCSAKick : public Command
|
||||
{
|
||||
void DoAdd(User *u, ChannelInfo *ci, std::vector<ci::string> ¶ms)
|
||||
void DoAdd(User *u, ChannelInfo *ci, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ci::string mask = params[2];
|
||||
ci::string reason = params.size() > 3 ? params[3] : "";
|
||||
@@ -263,7 +263,7 @@ class CommandCSAKick : public Command
|
||||
this->DoEnforce(u, ci, params);
|
||||
}
|
||||
|
||||
void DoStick(User *u, ChannelInfo *ci, std::vector<ci::string> ¶ms)
|
||||
void DoStick(User *u, ChannelInfo *ci, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
NickAlias *na;
|
||||
NickCore *nc;
|
||||
@@ -303,7 +303,7 @@ class CommandCSAKick : public Command
|
||||
stick_mask(ci, akick);
|
||||
}
|
||||
|
||||
void DoUnStick(User *u, ChannelInfo *ci, std::vector<ci::string> ¶ms)
|
||||
void DoUnStick(User *u, ChannelInfo *ci, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
NickAlias *na;
|
||||
NickCore *nc;
|
||||
@@ -340,7 +340,7 @@ class CommandCSAKick : public Command
|
||||
notice_lang(s_ChanServ, u, CHAN_AKICK_UNSTUCK, akick->mask.c_str(), ci->name);
|
||||
}
|
||||
|
||||
void DoDel(User *u, ChannelInfo *ci, std::vector<ci::string> ¶ms)
|
||||
void DoDel(User *u, ChannelInfo *ci, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ci::string mask = params[2];
|
||||
AutoKick *akick;
|
||||
@@ -400,7 +400,7 @@ class CommandCSAKick : public Command
|
||||
}
|
||||
}
|
||||
|
||||
void DoList(User *u, ChannelInfo *ci, std::vector<ci::string> ¶ms)
|
||||
void DoList(User *u, ChannelInfo *ci, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
int sent_header = 0;
|
||||
ci::string mask = params.size() > 2 ? params[2] : "";
|
||||
@@ -439,7 +439,7 @@ class CommandCSAKick : public Command
|
||||
|
||||
}
|
||||
|
||||
void DoView(User *u, ChannelInfo *ci, std::vector<ci::string> ¶ms)
|
||||
void DoView(User *u, ChannelInfo *ci, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
int sent_header = 0;
|
||||
ci::string mask = params.size() > 2 ? params[2] : "";
|
||||
@@ -477,7 +477,7 @@ class CommandCSAKick : public Command
|
||||
|
||||
}
|
||||
|
||||
void DoEnforce(User *u, ChannelInfo *ci, std::vector<ci::string> ¶ms)
|
||||
void DoEnforce(User *u, ChannelInfo *ci, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
Channel *c = ci->c;
|
||||
c_userlist *cu, *unext;
|
||||
@@ -514,7 +514,7 @@ class CommandCSAKick : public Command
|
||||
notice_lang(s_ChanServ, u, CHAN_AKICK_ENFORCE_DONE, ci->name, count);
|
||||
}
|
||||
|
||||
void DoClear(User *u, ChannelInfo *ci, std::vector<ci::string> ¶ms)
|
||||
void DoClear(User *u, ChannelInfo *ci, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ci->ClearAkick();
|
||||
notice_lang(s_ChanServ, u, CHAN_AKICK_CLEAR, ci->name);
|
||||
@@ -525,7 +525,7 @@ class CommandCSAKick : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ci::string chan = params[0];
|
||||
ci::string cmd = params[1];
|
||||
|
||||
+2
-3
@@ -22,7 +22,7 @@ class CommandCSBan : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *chan = params[0].c_str();
|
||||
const char *target = params[1].c_str();
|
||||
@@ -30,7 +30,6 @@ class CommandCSBan : public Command
|
||||
|
||||
if (params.size() > 2)
|
||||
{
|
||||
params[2].resize(200);
|
||||
reason = params[2].c_str();
|
||||
}
|
||||
|
||||
@@ -120,7 +119,7 @@ class CommandCSUnban : public Command
|
||||
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *chan = params[0].c_str();
|
||||
Channel *c;
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ class CommandCSClear : public Command
|
||||
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *chan = params[0].c_str();
|
||||
ci::string what = params[1];
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ class CommandCSDrop : public Command
|
||||
this->SetFlag(CFLAG_ALLOW_SUSPENDED);
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *chan = params[0].c_str();
|
||||
ChannelInfo *ci;
|
||||
|
||||
@@ -23,7 +23,7 @@ class CommandCSForbid : public Command
|
||||
this->SetFlag(CFLAG_ALLOW_UNREGISTEREDCHANNEL);
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ChannelInfo *ci;
|
||||
const char *chan = params[0].c_str();
|
||||
|
||||
@@ -22,7 +22,7 @@ class CommandCSGetKey : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *chan = params[0].c_str();
|
||||
ChannelInfo *ci;
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ class CommandCSHelp : public Command
|
||||
this->SetFlag(CFLAG_STRIP_CHANNEL);
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ci::string cmd = params[0];
|
||||
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ class CommandCSInfo : public Command
|
||||
this->SetFlag(CFLAG_ALLOW_FORBIDDEN);
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *chan = params[0].c_str();
|
||||
ci::string param = params.size() > 1 ? params[1] : "";
|
||||
|
||||
@@ -22,7 +22,7 @@ class CommandCSInvite : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *chan = params[0].c_str();
|
||||
Channel *c;
|
||||
|
||||
+1
-2
@@ -22,7 +22,7 @@ class CommandCSKick : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *chan = params[0].c_str();
|
||||
const char *target = params[1].c_str();
|
||||
@@ -30,7 +30,6 @@ class CommandCSKick : public Command
|
||||
|
||||
if (params.size() > 2)
|
||||
{
|
||||
params[2].resize(200);
|
||||
reason = params[2].c_str();
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ public:
|
||||
this->SetFlag(CFLAG_STRIP_CHANNEL);
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *pattern = params[0].c_str();
|
||||
int spattern_size;
|
||||
|
||||
+10
-10
@@ -82,7 +82,7 @@ class CommandCSOp : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ChannelMode *cm = ModeManager::FindChannelModeByName(CMODE_OP);
|
||||
|
||||
@@ -109,7 +109,7 @@ class CommandCSDeOp : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ChannelMode *cm = ModeManager::FindChannelModeByName(CMODE_OP);
|
||||
|
||||
@@ -136,7 +136,7 @@ class CommandCSVoice : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ChannelMode *cm = ModeManager::FindChannelModeByName(CMODE_VOICE);
|
||||
|
||||
@@ -163,7 +163,7 @@ class CommandCSDeVoice : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ChannelMode *cm = ModeManager::FindChannelModeByName(CMODE_VOICE);
|
||||
|
||||
@@ -190,7 +190,7 @@ class CommandCSHalfOp : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ChannelMode *cm = ModeManager::FindChannelModeByName(CMODE_HALFOP);
|
||||
|
||||
@@ -222,7 +222,7 @@ class CommandCSDeHalfOp : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ChannelMode *cm = ModeManager::FindChannelModeByName(CMODE_HALFOP);
|
||||
|
||||
@@ -255,7 +255,7 @@ class CommandCSProtect : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ChannelMode *cm = ModeManager::FindChannelModeByName(CMODE_PROTECT);
|
||||
|
||||
@@ -286,7 +286,7 @@ class CommandCSDeProtect : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ChannelMode *cm = ModeManager::FindChannelModeByName(CMODE_PROTECT);
|
||||
|
||||
@@ -317,7 +317,7 @@ class CommandCSOwner : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ChannelMode *cm = ModeManager::FindChannelModeByName(CMODE_OWNER);
|
||||
|
||||
@@ -348,7 +348,7 @@ class CommandCSDeOwner : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ChannelMode *cm = ModeManager::FindChannelModeByName(CMODE_OWNER);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class CommandCSRegister : public Command
|
||||
this->SetFlag(CFLAG_ALLOW_UNREGISTEREDCHANNEL);
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *chan = params[0].c_str();
|
||||
const char *desc = params[1].c_str();
|
||||
|
||||
+1
-1
@@ -654,7 +654,7 @@ class CommandCSSet : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *chan = params[0].c_str();
|
||||
ci::string cmd = params[1];
|
||||
|
||||
@@ -22,7 +22,7 @@ class CommandCSStatus : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ChannelInfo *ci;
|
||||
User *u2;
|
||||
|
||||
@@ -22,7 +22,7 @@ class CommandCSSuspend : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *chan = params[0].c_str();
|
||||
const char *reason = params.size() > 1 ? params[1].c_str() : NULL;
|
||||
@@ -116,7 +116,7 @@ class CommandCSUnSuspend : public Command
|
||||
this->SetFlag(CFLAG_ALLOW_SUSPENDED);
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *chan = params[0].c_str();
|
||||
ChannelInfo *ci = cs_findchan(chan);
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ class CommandCSTopic : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *chan = params[0].c_str();
|
||||
const char *topic = params.size() > 1 ? params[1].c_str() : NULL;
|
||||
|
||||
+11
-11
@@ -118,7 +118,7 @@ int xop_msgs[XOP_TYPES][XOP_MESSAGES] = {
|
||||
class XOPBase : public Command
|
||||
{
|
||||
private:
|
||||
CommandReturn DoAdd(User *u, std::vector<ci::string> ¶ms, ChannelInfo *ci, int level, int *messages)
|
||||
CommandReturn DoAdd(User *u, const std::vector<ci::string> ¶ms, ChannelInfo *ci, int level, int *messages)
|
||||
{
|
||||
const char *nick = params.size() > 2 ? params[2].c_str() : NULL;
|
||||
ChanAccess *access;
|
||||
@@ -205,7 +205,7 @@ class XOPBase : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoDel(User *u, std::vector<ci::string> ¶ms, ChannelInfo *ci, int level, int *messages)
|
||||
CommandReturn DoDel(User *u, const std::vector<ci::string> ¶ms, ChannelInfo *ci, int level, int *messages)
|
||||
{
|
||||
const char *nick = params.size() > 2 ? params[2].c_str() : NULL;
|
||||
ChanAccess *access;
|
||||
@@ -304,7 +304,7 @@ class XOPBase : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoList(User *u, std::vector<ci::string> ¶ms, ChannelInfo *ci, int level, int *messages)
|
||||
CommandReturn DoList(User *u, const std::vector<ci::string> ¶ms, ChannelInfo *ci, int level, int *messages)
|
||||
{
|
||||
int sent_header = 0;
|
||||
const char *nick = params.size() > 2 ? params[2].c_str() : NULL;
|
||||
@@ -339,7 +339,7 @@ class XOPBase : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoClear(User *u, std::vector<ci::string> ¶ms, ChannelInfo *ci, int level, int *messages)
|
||||
CommandReturn DoClear(User *u, const std::vector<ci::string> ¶ms, ChannelInfo *ci, int level, int *messages)
|
||||
{
|
||||
if (readonly)
|
||||
{
|
||||
@@ -373,7 +373,7 @@ class XOPBase : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
protected:
|
||||
CommandReturn DoXop(User *u, std::vector<ci::string> ¶ms, int level, int *messages)
|
||||
CommandReturn DoXop(User *u, const std::vector<ci::string> ¶ms, int level, int *messages)
|
||||
{
|
||||
const char *chan = params[0].c_str();
|
||||
ci::string cmd = params[1];
|
||||
@@ -403,7 +403,7 @@ class XOPBase : public Command
|
||||
{
|
||||
}
|
||||
|
||||
virtual CommandReturn Execute(User *u, std::vector<ci::string> ¶ms) = 0;
|
||||
virtual CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms) = 0;
|
||||
|
||||
virtual bool OnHelp(User *u, const ci::string &subcommand) = 0;
|
||||
|
||||
@@ -417,7 +417,7 @@ class CommandCSQOP : public XOPBase
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
return this->DoXop(u, params, ACCESS_QOP, xop_msgs[XOP_QOP]);
|
||||
}
|
||||
@@ -441,7 +441,7 @@ class CommandCSAOP : public XOPBase
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
return this->DoXop(u, params, ACCESS_AOP, xop_msgs[XOP_AOP]);
|
||||
}
|
||||
@@ -465,7 +465,7 @@ class CommandCSHOP : public XOPBase
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
return this->DoXop(u, params, ACCESS_HOP, xop_msgs[XOP_HOP]);
|
||||
}
|
||||
@@ -489,7 +489,7 @@ class CommandCSSOP : public XOPBase
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
return this->DoXop(u, params, ACCESS_SOP, xop_msgs[XOP_SOP]);
|
||||
}
|
||||
@@ -513,7 +513,7 @@ class CommandCSVOP : public XOPBase
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
return this->DoXop(u, params, ACCESS_VOP, xop_msgs[XOP_VOP]);
|
||||
}
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ class CommandHSDel : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
NickAlias *na;
|
||||
const char *nick = params[0].c_str();
|
||||
|
||||
@@ -22,7 +22,7 @@ class CommandHSDelAll : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
int i;
|
||||
const char *nick = params[0].c_str();
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ class CommandHSGroup : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
HostCore *tmp;
|
||||
char *vHost = NULL;
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ class CommandHSHelp : public Command
|
||||
this->SetFlag(CFLAG_ALLOW_UNREGISTERED);
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
mod_help_cmd(s_HostServ, u, HOSTSERV, params[0].c_str());
|
||||
return MOD_CONT;
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ class CommandHSList : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *key = params.size() ? params[0].c_str() : NULL;
|
||||
struct tm *tm;
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ class CommandHSOff : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
char *vhost;
|
||||
char *vident = NULL;
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ class CommandHSOn : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
char *vHost;
|
||||
char *vIdent = NULL;
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ class CommandHSSet : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *nick = params[0].c_str();
|
||||
const char *rawhostmask = params[1].c_str();
|
||||
|
||||
@@ -24,7 +24,7 @@ class CommandHSSetAll : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *nick = params[0].c_str();
|
||||
const char *rawhostmask = params[1].c_str();
|
||||
|
||||
@@ -24,7 +24,7 @@ class CommandMSCancel : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
int ischan;
|
||||
int isforbid;
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ class CommandMSCheck : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
NickAlias *na = NULL;
|
||||
MemoInfo *mi = NULL;
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ class CommandMSDel : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
MemoInfo *mi;
|
||||
ChannelInfo *ci;
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ class CommandMSHelp : public Command
|
||||
this->SetFlag(CFLAG_ALLOW_UNREGISTERED);
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
mod_help_cmd(s_MemoServ, u, MEMOSERV, params[0].c_str());
|
||||
return MOD_CONT;
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ class CommandMSInfo : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
MemoInfo *mi;
|
||||
NickAlias *na = NULL;
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ class CommandMSList : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ci::string param = params.size() ? params[0] : "", chan;
|
||||
ChannelInfo *ci;
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ class CommandMSRead : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
MemoInfo *mi;
|
||||
ChannelInfo *ci;
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ class CommandMSRSend : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *nick = params[0].c_str();
|
||||
const char *text = params[1].c_str();
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ class CommandMSSend : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *nick = params[0].c_str();
|
||||
const char *text = params[1].c_str();
|
||||
|
||||
@@ -22,7 +22,7 @@ class CommandMSSendAll : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
int i, z = 1;
|
||||
NickCore *nc;
|
||||
|
||||
+3
-3
@@ -18,7 +18,7 @@
|
||||
class CommandMSSet : public Command
|
||||
{
|
||||
private:
|
||||
CommandReturn DoNotify(User *u, std::vector<ci::string> ¶ms, MemoInfo *mi)
|
||||
CommandReturn DoNotify(User *u, const std::vector<ci::string> ¶ms, MemoInfo *mi)
|
||||
{
|
||||
ci::string param = params[1];
|
||||
|
||||
@@ -67,7 +67,7 @@ class CommandMSSet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoLimit(User *u, std::vector<ci::string> ¶ms, MemoInfo *mi)
|
||||
CommandReturn DoLimit(User *u, const std::vector<ci::string> ¶ms, MemoInfo *mi)
|
||||
{
|
||||
ci::string p1 = params[1];
|
||||
ci::string p2 = params.size() > 2 ? params[2] : "";
|
||||
@@ -207,7 +207,7 @@ class CommandMSSet : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ci::string cmd = params[0];
|
||||
MemoInfo *mi = &u->nc->memos;
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ class CommandMSStaff : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
NickCore *nc;
|
||||
int i, z = 0;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
class CommandNSAccess : public Command
|
||||
{
|
||||
private:
|
||||
CommandReturn DoServAdminList(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoServAdminList(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
const char *mask = params.size() > 2 ? params[2].c_str() : NULL;
|
||||
unsigned i;
|
||||
@@ -127,7 +127,7 @@ class CommandNSAccess : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ci::string cmd = params[0];
|
||||
const char *mask = params.size() > 1 ? params[1].c_str() : NULL;
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ class CommandNSAList : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
/*
|
||||
* List the channels that the given nickname has access on
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ class CommandNSDrop : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *nick = params.size() ? params[0].c_str() : NULL;
|
||||
NickAlias *na;
|
||||
|
||||
@@ -22,7 +22,7 @@ class CommandNSForbid : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
NickAlias *na;
|
||||
const char *nick = params[0].c_str();
|
||||
|
||||
@@ -27,7 +27,7 @@ class CommandNSGetEMail : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ci::string email = params[0];
|
||||
int i, j = 0;
|
||||
|
||||
@@ -22,7 +22,7 @@ class CommandNSGetPass : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *nick = params[0].c_str();
|
||||
char tmp_pass[PASSMAX];
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ class CommandNSGhost : public Command
|
||||
this->SetFlag(CFLAG_ALLOW_UNREGISTERED);
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *nick = params[0].c_str();
|
||||
const char *pass = params.size() > 1 ? params[1].c_str() : NULL;
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ class CommandNSGroup : public Command
|
||||
this->SetFlag(CFLAG_ALLOW_UNREGISTERED);
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
NickAlias *na, *target;
|
||||
const char *nick = params[0].c_str();
|
||||
@@ -156,7 +156,7 @@ class CommandNSGList : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *nick = params.size() ? params[0].c_str() : NULL;
|
||||
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ class CommandNSHelp : public Command
|
||||
this->SetFlag(CFLAG_ALLOW_UNREGISTERED);
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ci::string cmd = params[0];
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ class CommandNSIdentify : public Command
|
||||
this->SetFlag(CFLAG_ALLOW_UNREGISTERED);
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *pass = params[0].c_str();
|
||||
NickAlias *na;
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ class CommandNSInfo : public Command
|
||||
this->SetFlag(CFLAG_ALLOW_UNREGISTERED);
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
/* Show hidden info to nick owners and sadmins when the "ALL" parameter is
|
||||
* supplied. If a nick is online, the "Last seen address" changes to "Is
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ class CommandNSList : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
/* SADMINS can search for nicks based on their NS_FORBIDDEN and NS_NO_EXPIRE
|
||||
* status. The keywords FORBIDDEN and NOEXPIRE represent these two states
|
||||
|
||||
@@ -25,7 +25,7 @@ class CommandNSLogout : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *nick = params.size() ? params[0].c_str() : NULL;
|
||||
ci::string param = params.size() > 1 ? params[1] : "";
|
||||
|
||||
@@ -23,7 +23,7 @@ class CommandNSRecover : public Command
|
||||
this->SetFlag(CFLAG_ALLOW_UNREGISTERED);
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *nick = params[0].c_str();
|
||||
const char *pass = params.size() > 1 ? params[1].c_str() : NULL;
|
||||
|
||||
@@ -94,7 +94,7 @@ class CommandNSConfirm : public Command
|
||||
|
||||
}
|
||||
|
||||
CommandReturn DoConfirm(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn DoConfirm(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
NickRequest *nr = NULL;
|
||||
const char *passcode = params.size() ? params[0].c_str() : NULL;
|
||||
@@ -149,7 +149,7 @@ class CommandNSConfirm : public Command
|
||||
this->SetFlag(CFLAG_ALLOW_UNREGISTERED);
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
return this->DoConfirm(u, params);
|
||||
}
|
||||
@@ -171,7 +171,7 @@ class CommandNSRegister : public CommandNSConfirm
|
||||
this->SetFlag(CFLAG_ALLOW_UNREGISTERED);
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
NickRequest *nr = NULL, *anr = NULL;
|
||||
NickAlias *na;
|
||||
@@ -321,7 +321,7 @@ class CommandNSResend : public Command
|
||||
this->SetFlag(CFLAG_ALLOW_UNREGISTERED);
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
NickRequest *nr = NULL;
|
||||
if (NSEmailReg)
|
||||
|
||||
@@ -23,7 +23,7 @@ class CommandNSRelease : public Command
|
||||
this->SetFlag(CFLAG_ALLOW_UNREGISTERED);
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *nick = params[0].c_str();
|
||||
const char *pass = params.size() > 1 ? params[1].c_str() : NULL;
|
||||
|
||||
+15
-17
@@ -18,7 +18,7 @@
|
||||
class CommandNSSASet : public Command
|
||||
{
|
||||
private:
|
||||
CommandReturn DoSetDisplay(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoSetDisplay(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
ci::string param = params.size() > 2 ? params[2] : "";
|
||||
int i;
|
||||
@@ -52,7 +52,7 @@ private:
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetPassword(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoSetPassword(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
ci::string param = params.size() > 2 ? params[2] : "";
|
||||
|
||||
@@ -83,12 +83,10 @@ private:
|
||||
|
||||
if (enc_encrypt(param.c_str(), len, nc->pass, PASSMAX - 1) < 0)
|
||||
{
|
||||
params[2].clear();
|
||||
alog("%s: Failed to encrypt password for %s (set)", s_NickServ, nc->display);
|
||||
notice_lang(s_NickServ, u, NICK_SASET_PASSWORD_FAILED, nc->display);
|
||||
return MOD_CONT;
|
||||
}
|
||||
params[2].clear();
|
||||
|
||||
if (enc_decrypt(nc->pass, tmp_pass, PASSMAX - 1) == 1)
|
||||
notice_lang(s_NickServ, u, NICK_SASET_PASSWORD_CHANGED_TO, nc->display, tmp_pass);
|
||||
@@ -101,7 +99,7 @@ private:
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetUrl(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoSetUrl(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
const char *param = params.size() > 2 ? params[2].c_str() : NULL;
|
||||
|
||||
@@ -121,7 +119,7 @@ private:
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetEmail(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoSetEmail(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
const char *param = params.size() > 2 ? params[2].c_str() : NULL;
|
||||
|
||||
@@ -159,7 +157,7 @@ private:
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetICQ(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoSetICQ(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
const char *param = params.size() > 2 ? params[2].c_str() : NULL;
|
||||
|
||||
@@ -182,7 +180,7 @@ private:
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetGreet(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoSetGreet(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
const char *param = params.size() > 2 ? params[2].c_str() : NULL;
|
||||
|
||||
@@ -207,7 +205,7 @@ private:
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetKill(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoSetKill(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
ci::string param = params.size() > 2 ? params[2] : "";
|
||||
|
||||
@@ -255,7 +253,7 @@ private:
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetSecure(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoSetSecure(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
ci::string param = params.size() > 2 ? params[2] : "";
|
||||
|
||||
@@ -280,7 +278,7 @@ private:
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetPrivate(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoSetPrivate(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
ci::string param = params.size() > 2 ? params[2] : "";
|
||||
|
||||
@@ -305,7 +303,7 @@ private:
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetMsg(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoSetMsg(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
ci::string param = params.size() > 2 ? params[2] : "";
|
||||
|
||||
@@ -336,7 +334,7 @@ private:
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetHide(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoSetHide(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
ci::string param = params.size() > 2 ? params[2] : "";
|
||||
|
||||
@@ -397,7 +395,7 @@ private:
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetNoExpire(User *u, std::vector<ci::string> ¶ms, NickAlias *na)
|
||||
CommandReturn DoSetNoExpire(User *u, const std::vector<ci::string> ¶ms, NickAlias *na)
|
||||
{
|
||||
ci::string param = params.size() > 2 ? params[2] : "";
|
||||
|
||||
@@ -422,7 +420,7 @@ private:
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetAutoOP(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoSetAutoOP(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
ci::string param = params.size() > 2 ? params[2] : "";
|
||||
|
||||
@@ -448,7 +446,7 @@ private:
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetLanguage(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoSetLanguage(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
const char *param = params.size() > 2 ? params[2].c_str() : NULL;
|
||||
|
||||
@@ -481,7 +479,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *nick = params[0].c_str();
|
||||
ci::string cmd = params[1];
|
||||
|
||||
@@ -22,7 +22,7 @@ class CommandNSSendPass : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *nick = params[0].c_str();
|
||||
NickAlias *na;
|
||||
|
||||
+14
-16
@@ -18,7 +18,7 @@
|
||||
class CommandNSSet : public Command
|
||||
{
|
||||
private:
|
||||
CommandReturn DoSetDisplay(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoSetDisplay(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
ci::string param = params.size() > 1 ? params[1] : "";
|
||||
|
||||
@@ -53,7 +53,7 @@ class CommandNSSet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetPassword(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoSetPassword(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
ci::string param = params.size() > 1 ? params[1] : "";
|
||||
|
||||
@@ -79,12 +79,10 @@ class CommandNSSet : public Command
|
||||
|
||||
if (enc_encrypt(param.c_str(), len, nc->pass, PASSMAX - 1) < 0)
|
||||
{
|
||||
params[1].clear();
|
||||
alog("%s: Failed to encrypt password for %s (set)", s_NickServ, nc->display);
|
||||
notice_lang(s_NickServ, u, NICK_SET_PASSWORD_FAILED);
|
||||
return MOD_CONT;
|
||||
}
|
||||
params[1].clear();
|
||||
|
||||
if (enc_decrypt(nc->pass, tmp_pass, PASSMAX - 1) == 1)
|
||||
notice_lang(s_NickServ, u, NICK_SET_PASSWORD_CHANGED_TO, tmp_pass);
|
||||
@@ -96,7 +94,7 @@ class CommandNSSet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetLanguage(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoSetLanguage(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
const char *param = params.size() > 1 ? params[1].c_str() : NULL;
|
||||
|
||||
@@ -124,7 +122,7 @@ class CommandNSSet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetUrl(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoSetUrl(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
const char *param = params.size() > 1 ? params[1].c_str() : NULL;
|
||||
|
||||
@@ -144,7 +142,7 @@ class CommandNSSet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetEmail(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoSetEmail(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
const char *param = params.size() > 1 ? params[1].c_str() : NULL;
|
||||
|
||||
@@ -177,7 +175,7 @@ class CommandNSSet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetICQ(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoSetICQ(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
const char *param = params.size() > 1 ? params[1].c_str() : NULL;
|
||||
|
||||
@@ -200,7 +198,7 @@ class CommandNSSet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetGreet(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoSetGreet(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
const char *param = params.size() > 1 ? params[1].c_str() : NULL;
|
||||
|
||||
@@ -225,7 +223,7 @@ class CommandNSSet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetKill(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoSetKill(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
ci::string param = params.size() > 1 ? params[1] : "";
|
||||
|
||||
@@ -273,7 +271,7 @@ class CommandNSSet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetSecure(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoSetSecure(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
ci::string param = params.size() > 1 ? params[1] : "";
|
||||
|
||||
@@ -298,7 +296,7 @@ class CommandNSSet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetPrivate(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoSetPrivate(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
ci::string param = params.size() > 1 ? params[1] : "";
|
||||
|
||||
@@ -323,7 +321,7 @@ class CommandNSSet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetMsg(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoSetMsg(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
ci::string param = params.size() > 1 ? params[1] : "";
|
||||
|
||||
@@ -354,7 +352,7 @@ class CommandNSSet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetHide(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoSetHide(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
ci::string param = params.size() > 1 ? params[1] : "";
|
||||
|
||||
@@ -415,7 +413,7 @@ class CommandNSSet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetAutoOP(User *u, std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
CommandReturn DoSetAutoOP(User *u, const std::vector<ci::string> ¶ms, NickCore *nc)
|
||||
{
|
||||
ci::string param = params.size() > 1 ? params[1] : "";
|
||||
|
||||
@@ -450,7 +448,7 @@ class CommandNSSet : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ci::string cmd = params[0];
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class CommandNSStatus : public Command
|
||||
this->SetFlag(CFLAG_ALLOW_UNREGISTERED);
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
User *u2;
|
||||
NickAlias *na = NULL;
|
||||
|
||||
@@ -22,7 +22,7 @@ class CommandNSSuspend : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
NickAlias *na, *na2;
|
||||
User *u2;
|
||||
@@ -113,7 +113,7 @@ class CommandNSUnSuspend : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
NickAlias *na;
|
||||
const char *nick = params[0].c_str();
|
||||
|
||||
@@ -22,7 +22,7 @@ class CommandNSUpdate : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
NickAlias *na = findnick(u->nick);
|
||||
|
||||
|
||||
+5
-5
@@ -23,7 +23,7 @@ int akill_list(int number, Akill *ak, User *u, int *sent_header);
|
||||
class CommandOSAKill : public Command
|
||||
{
|
||||
private:
|
||||
CommandReturn DoAdd(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn DoAdd(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
int deleted = 0;
|
||||
unsigned last_param = 2;
|
||||
@@ -141,7 +141,7 @@ class CommandOSAKill : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoDel(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn DoDel(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *mask;
|
||||
int res = 0;
|
||||
@@ -192,7 +192,7 @@ class CommandOSAKill : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoList(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn DoList(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *mask;
|
||||
int res, sent_header = 0;
|
||||
@@ -237,7 +237,7 @@ class CommandOSAKill : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoView(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn DoView(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *mask;
|
||||
int res, sent_header = 0;
|
||||
@@ -290,7 +290,7 @@ class CommandOSAKill : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ci::string cmd = params[0];
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ class CommandOSChanKill : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *expiry, *channel;
|
||||
char reason[BUFSIZE], realreason[BUFSIZE];
|
||||
|
||||
@@ -22,7 +22,7 @@ class CommandOSChanList : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *pattern = params.size() > 0 ? params[0].c_str() : NULL;
|
||||
ci::string opt = params.size() > 1 ? params[1] : "";
|
||||
|
||||
@@ -22,7 +22,7 @@ class CommandOSClearModes : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *argv[2];
|
||||
const char *chan = params[0].c_str();
|
||||
|
||||
@@ -62,7 +62,7 @@ class CommandOSDEFCON : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *lvl = params[0].c_str();
|
||||
int newLevel = 0;
|
||||
|
||||
@@ -22,7 +22,7 @@ class CommandOSGlobal : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *msg = params[0].c_str();
|
||||
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ class CommandOSHelp : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
mod_help_cmd(s_OperServ, u, OPERSERV, params[0].c_str());
|
||||
return MOD_CONT;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
class CommandOSIgnore : public Command
|
||||
{
|
||||
private:
|
||||
CommandReturn DoAdd(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn DoAdd(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *time = params.size() > 1 ? params[1].c_str() : NULL;
|
||||
const char *nick = params.size() > 2 ? params[2].c_str() : NULL;
|
||||
@@ -70,7 +70,7 @@ class CommandOSIgnore : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoDel(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn DoDel(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *nick = params.size() > 1 ? params[1].c_str() : NULL;
|
||||
if (!nick)
|
||||
@@ -100,7 +100,7 @@ class CommandOSIgnore : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ci::string cmd = params[0];
|
||||
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ class CommandOSJupe : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *jserver = params[0].c_str();
|
||||
const char *reason = params.size() > 1 ? params[1].c_str() : NULL;
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ class CommandOSKick : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *argv[3];
|
||||
const char *chan = params[0].c_str(), *nick = params[1].c_str(), *s = params[2].c_str();
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ class CommandOSMode : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
int ac;
|
||||
const char **av;
|
||||
|
||||
@@ -24,7 +24,7 @@ class CommandOSModInfo : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *file = params[0].c_str();
|
||||
struct tm tm;
|
||||
|
||||
@@ -22,7 +22,7 @@ class CommandOSModList : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
int idx;
|
||||
int count = 0;
|
||||
|
||||
@@ -22,7 +22,7 @@ class CommandOSModLoad : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *name = params[0].c_str();
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ class CommandOSModUnLoad : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *name = params[0].c_str();
|
||||
int status;
|
||||
|
||||
+7
-7
@@ -299,7 +299,7 @@ class NewsBase : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoAdd(User *u, std::vector<ci::string> ¶ms, NewsType type, int *msgs)
|
||||
CommandReturn DoAdd(User *u, const std::vector<ci::string> ¶ms, NewsType type, int *msgs)
|
||||
{
|
||||
const char *text = params.size() > 1 ? params[1].c_str() : NULL;
|
||||
int n;
|
||||
@@ -323,7 +323,7 @@ class NewsBase : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoDel(User *u, std::vector<ci::string> ¶ms, NewsType type, int *msgs)
|
||||
CommandReturn DoDel(User *u, const std::vector<ci::string> ¶ms, NewsType type, int *msgs)
|
||||
{
|
||||
const char *text = params.size() > 1 ? params[1].c_str() : NULL;
|
||||
unsigned num;
|
||||
@@ -364,7 +364,7 @@ class NewsBase : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoNews(User *u, std::vector<ci::string> ¶ms, NewsType type)
|
||||
CommandReturn DoNews(User *u, const std::vector<ci::string> ¶ms, NewsType type)
|
||||
{
|
||||
ci::string cmd = params[0];
|
||||
const char *type_name;
|
||||
@@ -397,7 +397,7 @@ class NewsBase : public Command
|
||||
{
|
||||
}
|
||||
|
||||
virtual CommandReturn Execute(User *u, std::vector<ci::string> ¶ms) = 0;
|
||||
virtual CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms) = 0;
|
||||
|
||||
virtual bool OnHelp(User *u, const ci::string &subcommand) = 0;
|
||||
|
||||
@@ -411,7 +411,7 @@ class CommandOSLogonNews : public NewsBase
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
return this->DoNews(u, params, NEWS_LOGON);
|
||||
}
|
||||
@@ -435,7 +435,7 @@ class CommandOSOperNews : public NewsBase
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
return this->DoNews(u, params, NEWS_OPER);
|
||||
}
|
||||
@@ -459,7 +459,7 @@ class CommandOSRandomNews : public NewsBase
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
return this->DoNews(u, params, NEWS_RANDOM);
|
||||
}
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ class CommandOSNOOP : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ci::string cmd = params[0];
|
||||
const char *server = params[1].c_str();
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ class CommandOSOLine : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *nick = params[0].c_str();
|
||||
const char *flag = params[1].c_str();
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ class CommandOSQuit : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
|
||||
quitmsg = new char[28 + strlen(u->nick)];
|
||||
|
||||
@@ -22,7 +22,7 @@ class CommandOSReload : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
if (!read_config(1))
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ class CommandOSRestart : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
quitmsg = new char[31 + strlen(u->nick)];
|
||||
if (!quitmsg)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
class CommandOSSession : public Command
|
||||
{
|
||||
private:
|
||||
CommandReturn DoList(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn DoList(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
Session *session;
|
||||
int mincount, i;
|
||||
@@ -43,7 +43,7 @@ class CommandOSSession : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoView(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn DoView(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *param = params[1].c_str();
|
||||
Session *session = findsession(param);
|
||||
@@ -62,7 +62,7 @@ class CommandOSSession : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ci::string cmd = params[0];
|
||||
|
||||
@@ -181,7 +181,7 @@ static int exception_view_callback(User *u, int num, va_list args)
|
||||
class CommandOSException : public Command
|
||||
{
|
||||
private:
|
||||
CommandReturn DoAdd(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn DoAdd(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *mask, *expiry, *limitstr;
|
||||
char reason[BUFSIZE];
|
||||
@@ -255,7 +255,7 @@ class CommandOSException : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoDel(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn DoDel(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *mask = params.size() > 1 ? params[1].c_str() : NULL;
|
||||
int i;
|
||||
@@ -314,7 +314,7 @@ class CommandOSException : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoMove(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn DoMove(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
Exception *exception;
|
||||
const char *n1str = params.size() > 1 ? params[1].c_str() : NULL; /* From position */
|
||||
@@ -365,7 +365,7 @@ class CommandOSException : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoList(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn DoList(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
int sent_header = 0, i;
|
||||
expire_exceptions();
|
||||
@@ -387,7 +387,7 @@ class CommandOSException : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoView(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn DoView(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
int sent_header = 0, i;
|
||||
expire_exceptions();
|
||||
@@ -413,7 +413,7 @@ class CommandOSException : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ci::string cmd = params[0];
|
||||
|
||||
|
||||
+7
-7
@@ -36,7 +36,7 @@ class CommandOSSet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetIgnore(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn DoSetIgnore(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ci::string setting = params.size() > 1 ? params[1] : "";
|
||||
|
||||
@@ -62,7 +62,7 @@ class CommandOSSet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetReadOnly(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn DoSetReadOnly(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ci::string setting = params.size() > 1 ? params[1] : "";
|
||||
|
||||
@@ -92,7 +92,7 @@ class CommandOSSet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetLogChan(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn DoSetLogChan(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ci::string setting = params.size() > 1 ? params[1] : "";
|
||||
Channel *c;
|
||||
@@ -134,7 +134,7 @@ class CommandOSSet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetSuperAdmin(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn DoSetSuperAdmin(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ci::string setting = params.size() > 1 ? params[1] : "";
|
||||
|
||||
@@ -171,7 +171,7 @@ class CommandOSSet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetDebug(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn DoSetDebug(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ci::string setting = params.size() > 1 ? params[1] : "";
|
||||
|
||||
@@ -205,7 +205,7 @@ class CommandOSSet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn DoSetNoExpire(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn DoSetNoExpire(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ci::string setting = params.size() > 1 ? params[1] : "";
|
||||
|
||||
@@ -237,7 +237,7 @@ class CommandOSSet : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ci::string option = params[0];
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ int sgline_list(int number, SXLine *sx, User *u, int *sent_header);
|
||||
class CommandOSSGLine : public Command
|
||||
{
|
||||
private:
|
||||
CommandReturn OnAdd(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn OnAdd(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
int deleted = 0;
|
||||
unsigned last_param = 2;
|
||||
@@ -142,7 +142,7 @@ class CommandOSSGLine : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn OnDel(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn OnDel(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *mask;
|
||||
int res = 0;
|
||||
@@ -192,7 +192,7 @@ class CommandOSSGLine : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn OnList(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn OnList(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *mask;
|
||||
int res, sent_header = 0;
|
||||
@@ -234,7 +234,7 @@ class CommandOSSGLine : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
CommandReturn OnView(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn OnView(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
const char *mask;
|
||||
int res, sent_header = 0;
|
||||
@@ -287,7 +287,7 @@ class CommandOSSGLine : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
ci::string cmd = params[0];
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ class CommandOSShutdown : public Command
|
||||
{
|
||||
}
|
||||
|
||||
CommandReturn Execute(User *u, std::vector<ci::string> ¶ms)
|
||||
CommandReturn Execute(User *u, const std::vector<ci::string> ¶ms)
|
||||
{
|
||||
|
||||
quitmsg = new char[32 + strlen(u->nick)];
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user