1
0
mirror of https://github.com/anope/anope.git synced 2026-07-03 16:33:13 +02:00

Changed subcommand parameter of Command's OnHelp() from std::string to ci::string, allows sub-help (like NS SET PASSWORD) to be called without requiring the subcommand to be sent by the user in all caps.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2391 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
cyberbotx
2009-07-24 01:47:47 +00:00
parent 99fe46de55
commit 443654f15b
112 changed files with 155 additions and 154 deletions
+7 -6
View File
@@ -18,6 +18,7 @@
#include "services.h"
#include <stdio.h>
#include "timers.h"
#include "hashcomp.h"
/* Cross OS compatibility macros */
#ifdef _WIN32
@@ -255,7 +256,7 @@ class CoreExport Command
* @param subcommand The subcommand the user is requesting help on, or an empty string. (e.g. /ns help set foo bar lol gives a subcommand of "FOO BAR LOL")
* @return true if help was provided to the user, false otherwise.
*/
virtual bool OnHelp(User *u, const std::string &subcommand);
virtual bool OnHelp(User *u, const ci::string &subcommand);
/** Requested when the user provides bad syntax to this command (not enough params, etc).
* @param u The user executing the command.
@@ -629,7 +630,7 @@ class CoreExport Module
/** Called before the database expire routines are called
* Note: Code that is in seperate expiry routines should just be done
* when we save the DB, theres no need to have both
* when we save the DB, theres no need to have both
*/
virtual void OnPreDatabaseExpire() MARK_DEPRECATED { }
@@ -726,7 +727,7 @@ class CoreExport Module
* @param chname The channel name
*/
virtual void OnChanDrop(const char *chname) { }
/** Called when a channel is forbidden
* @param ci The channel
*/
@@ -772,7 +773,7 @@ class CoreExport Module
* @param u The user
*/
virtual void OnNickIdentify(User *u) { }
/** Called when a nick logs out
* @param u The nick
*/
@@ -787,7 +788,7 @@ class CoreExport Module
* @param na The nick alias
*/
virtual void OnNickSuspend(NickAlias *na) { }
/** Called when a nick is unsuspneded
* @param na The nick alias
*/
@@ -866,7 +867,7 @@ enum Implementation
I_OnUserKicked, I_OnBotFantasy, I_OnBotNoFantasyAccess, I_OnBotBan,
/* Users */
I_OnUserConnect, I_OnUserNickChange, I_OnUserLogoff, I_OnPreJoinChannel, I_OnJoinChannel,
I_OnUserConnect, I_OnUserNickChange, I_OnUserLogoff, I_OnPreJoinChannel, I_OnJoinChannel,
I_OnPrePartChannel, I_OnPartChannel,
/* OperServ */
+1 -1
View File
@@ -36,7 +36,7 @@ Command::~Command()
CommandReturn Command::Execute(User *u, std::vector<std::string> &) { return MOD_CONT; }
bool Command::OnHelp(User *u, const std::string &subcommand) { return false; }
bool Command::OnHelp(User *u, const ci::string &subcommand) { return false; }
void Command::OnSyntaxError(User *u) { }
+2 -2
View File
@@ -160,7 +160,7 @@ void mod_run_cmd(char *service, User * u, CommandHash * cmdTable[], const char *
}
}
// If the command requires a permission, and they aren't registered or don't have the required perm, DENIED
// If the command requires a permission, and they aren't registered or don't have the required perm, DENIED
if (!c->permission.empty())
{
if (!u->nc->HasPriv(c->permission) && !u->nc->HasCommand(c->permission))
@@ -195,7 +195,7 @@ void mod_help_cmd(char *service, User * u, CommandHash * cmdTable[], const char
Command *c = findCommand(cmdTable, token.c_str());
std::string subcommand = tokens.StreamEnd() ? "" : tokens.GetRemaining();
ci::string subcommand = tokens.StreamEnd() ? "" : tokens.GetRemaining().c_str();
if (!c || !c->OnHelp(u, subcommand))
notice_lang(service, u, NO_HELP_AVAILABLE, cmd);
+2 -2
View File
@@ -50,7 +50,7 @@ class CommandBSAct : public Command
{
params[1].erase(i, 1);
}
ircdproto->SendAction(ci->bi, ci->name, "%s", params[1].c_str());
ci->bi->lastmsg = time(NULL);
if (LogBot && LogChannel && logchan && !debug && findchan(LogChannel))
@@ -63,7 +63,7 @@ class CommandBSAct : public Command
syntax_error(s_BotServ, u, "ACT", BOT_ACT_SYNTAX);
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_BotServ, u, BOT_HELP_ACT);
return true;
+1 -1
View File
@@ -66,7 +66,7 @@ class CommandBSAssign : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_BotServ, u, BOT_HELP_ASSIGN);
return true;
+1 -1
View File
@@ -285,7 +285,7 @@ class CommandBSBadwords : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_BotServ, u, BOT_HELP_BADWORDS);
return true;
+1 -1
View File
@@ -425,7 +425,7 @@ class CommandBSBot : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_lang(s_BotServ, u, BOT_SERVADMIN_HELP_BOT);
return true;
+1 -1
View File
@@ -63,7 +63,7 @@ class CommandBSBotList : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_BotServ, u, BOT_HELP_BOTLIST);
return true;
+1 -1
View File
@@ -236,7 +236,7 @@ class CommandBSInfo : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_BotServ, u, BOT_HELP_INFO);
return true;
+1 -1
View File
@@ -308,7 +308,7 @@ class CommandBSKick : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
if (subcommand.empty())
notice_help(s_BotServ, u, BOT_HELP_KICK);
+1 -1
View File
@@ -63,7 +63,7 @@ class CommandBSSay : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_BotServ, u, BOT_HELP_SAY);
return true;
+1 -1
View File
@@ -145,7 +145,7 @@ class CommandBSSet : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
if (subcommand.empty())
{
+1 -1
View File
@@ -42,7 +42,7 @@ class CommandBSUnassign : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_BotServ, u, BOT_HELP_UNASSIGN);
return true;
+3 -3
View File
@@ -196,7 +196,7 @@ class CommandCSAccess : public Command
ci->AddAccess(nc, level);
FOREACH_MOD(I_OnAccessAdd, OnAccessAdd(ci, u, na->nick, level));
alog("%s: %s!%s@%s (level %d) set access level %d to %s (group %s) on channel %s", s_ChanServ, u->nick, u->GetIdent().c_str(), u->host, ulev, level, na->nick, nc->display, ci->name);
notice_lang(s_ChanServ, u, CHAN_ACCESS_ADDED, nc->display, ci->name, level);
}
@@ -336,7 +336,7 @@ class CommandCSAccess : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_ACCESS);
notice_help(s_ChanServ, u, CHAN_HELP_ACCESS_LEVELS);
@@ -470,7 +470,7 @@ class CommandCSLevels : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_LEVELS);
return true;
+1 -1
View File
@@ -647,7 +647,7 @@ class CommandCSAKick : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_AKICK);
return true;
+2 -2
View File
@@ -100,7 +100,7 @@ class CommandCSBan : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_BAN);
return true;
@@ -147,7 +147,7 @@ class CommandCSUnban : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_UNBAN);
return true;
+1 -1
View File
@@ -326,7 +326,7 @@ class CommandCSClear : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_CLEAR);
return true;
+1 -1
View File
@@ -92,7 +92,7 @@ class CommandCSDrop : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
if (u->nc && u->nc->IsServicesOper())
notice_help(s_ChanServ, u, CHAN_SERVADMIN_HELP_DROP);
+2 -2
View File
@@ -102,13 +102,13 @@ class CommandCSForbid : public Command
alog("%s: %s set FORBID for channel %s", s_ChanServ, u->nick, ci->name);
notice_lang(s_ChanServ, u, CHAN_FORBID_SUCCEEDED, chan);
FOREACH_MOD(I_OnChanForbidden, OnChanForbidden(ci));
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_SERVADMIN_HELP_FORBID);
return true;
+1 -1
View File
@@ -46,7 +46,7 @@ class CommandCSGetKey : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_GETKEY);
return true;
+2 -2
View File
@@ -30,7 +30,7 @@ class CommandCSGetPass : public Command
ChannelInfo *ci;
ci = cs_findchan(chan);
if (!enc_decrypt(ci->founderpass, tmp_pass, PASSMAX - 1))
{
notice_lang(s_ChanServ, u, CHAN_GETPASS_UNAVAILABLE);
@@ -46,7 +46,7 @@ class CommandCSGetPass : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_SERVADMIN_HELP_GETPASS);
return true;
+1 -1
View File
@@ -73,7 +73,7 @@ class CommandCSIdentify : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_IDENTIFY);
return true;
+1 -1
View File
@@ -143,7 +143,7 @@ class CommandCSInfo : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_lang(s_ChanServ, u, CHAN_HELP_INFO);
if (u->nc && u->nc->IsServicesOper())
+1 -1
View File
@@ -52,7 +52,7 @@ class CommandCSInvite : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_INVITE);
return true;
+1 -1
View File
@@ -82,7 +82,7 @@ class CommandCSKick : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_KICK);
return true;
+1 -1
View File
@@ -165,7 +165,7 @@ public:
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_LIST);
return true;
+1 -1
View File
@@ -93,7 +93,7 @@ class CommandCSLogout : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
if (u->nc && u->nc->HasCommand("chanserv/logout"))
notice_help(s_NickServ, u, CHAN_SERVADMIN_HELP_LOGOUT);
+10 -10
View File
@@ -79,7 +79,7 @@ class CommandCSOp : public Command
return do_util(u, &csmodeutils[MUT_OP], (params.size() > 0 ? params[0].c_str() : NULL), (params.size() > 1 ? params[1].c_str() : NULL));
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_OP);
return true;
@@ -105,7 +105,7 @@ class CommandCSDeOp : public Command
return do_util(u, &csmodeutils[MUT_DEOP], (params.size() > 0 ? params[0].c_str() : NULL), (params.size() > 1 ? params[1].c_str() : NULL));
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_DEOP);
return true;
@@ -131,7 +131,7 @@ class CommandCSVoice : public Command
return do_util(u, &csmodeutils[MUT_VOICE], (params.size() > 0 ? params[0].c_str() : NULL), (params.size() > 1 ? params[1].c_str() : NULL));
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_VOICE);
return true;
@@ -157,7 +157,7 @@ class CommandCSDeVoice : public Command
return do_util(u, &csmodeutils[MUT_DEVOICE], (params.size() > 0 ? params[0].c_str() : NULL), (params.size() > 1 ? params[1].c_str() : NULL));
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_DEVOICE);
return true;
@@ -189,7 +189,7 @@ class CommandCSHalfOp : public Command
return do_util(u, &csmodeutils[MUT_HALFOP], (params.size() > 0 ? params[0].c_str() : NULL), (params.size() > 1 ? params[1].c_str() : NULL));
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_HALFOP);
return true;
@@ -220,7 +220,7 @@ class CommandCSDeHalfOp : public Command
return do_util(u, &csmodeutils[MUT_DEHALFOP], (params.size() > 0 ? params[0].c_str() : NULL), (params.size() > 1 ? params[1].c_str() : NULL));
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_DEHALFOP);
return true;
@@ -251,7 +251,7 @@ class CommandCSProtect : public Command
return do_util(u, &csmodeutils[MUT_PROTECT], (params.size() > 0 ? params[0].c_str() : NULL), (params.size() > 1 ? params[1].c_str() : NULL));
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_PROTECT);
return true;
@@ -283,7 +283,7 @@ class CommandCSDeProtect : public Command
return do_util(u, &csmodeutils[MUT_DEPROTECT], (params.size() > 0 ? params[0].c_str() : NULL), (params.size() > 1 ? params[1].c_str() : NULL));
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_DEPROTECT);
return true;
@@ -310,7 +310,7 @@ class CommandCSOwner : public Command
return do_util(u, &csmodeutils[MUT_OWNER], (params.size() > 0 ? params[0].c_str() : NULL), NULL);
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_OWNER);
return true;
@@ -337,7 +337,7 @@ class CommandCSDeOwner : public Command
return do_util(u, &csmodeutils[MUT_DEOWNER], (params.size() > 0 ? params[0].c_str() : NULL), NULL);
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_DEOWNER);
return true;
+2 -2
View File
@@ -121,13 +121,13 @@ class CommandCSRegister : public Command
ircdproto->SendMode(findbot(s_ChanServ), chan, "%s %s", ircd->adminset, u->nick);
if (ircd->owner && ircd->ownerset)
ircdproto->SendMode(findbot(s_ChanServ), chan, "%s %s", ircd->ownerset, u->nick);
FOREACH_MOD(I_OnChanRegistered, OnChanRegistered(ci));
}
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_REGISTER, s_ChanServ);
return true;
+1 -1
View File
@@ -70,7 +70,7 @@ class CommandCSSendPass : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_SENDPASS);
return true;
+1 -1
View File
@@ -660,7 +660,7 @@ class CommandCSSet : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
if (subcommand.empty())
{
+1 -1
View File
@@ -46,7 +46,7 @@ class CommandCSStatus : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_SERVADMIN_HELP_STATUS);
return true;
+2 -2
View File
@@ -96,7 +96,7 @@ class CommandCSSuspend : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_SERVADMIN_HELP_SUSPEND);
return true;
@@ -166,7 +166,7 @@ class CommandCSUnSuspend : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_SERVADMIN_HELP_UNSUSPEND);
return true;
+1 -1
View File
@@ -68,7 +68,7 @@ class CommandCSTopic : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_TOPIC);
return true;
+5 -5
View File
@@ -387,7 +387,7 @@ class XOPBase : public Command
virtual CommandReturn Execute(User *u, std::vector<std::string> &params) = 0;
virtual bool OnHelp(User *u, const std::string &subcommand) = 0;
virtual bool OnHelp(User *u, const ci::string &subcommand) = 0;
virtual void OnSyntaxError(User *u) = 0;
};
@@ -404,7 +404,7 @@ class CommandCSAOP : public XOPBase
return this->DoXop(u, params, ACCESS_AOP, xop_msgs[XOP_AOP]);
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_AOP);
return true;
@@ -428,7 +428,7 @@ class CommandCSHOP : public XOPBase
return this->DoXop(u, params, ACCESS_HOP, xop_msgs[XOP_HOP]);
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_HOP);
return true;
@@ -452,7 +452,7 @@ class CommandCSSOP : public XOPBase
return this->DoXop(u, params, ACCESS_SOP, xop_msgs[XOP_SOP]);
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_SOP);
return true;
@@ -476,7 +476,7 @@ class CommandCSVOP : public XOPBase
return this->DoXop(u, params, ACCESS_VOP, xop_msgs[XOP_VOP]);
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_ChanServ, u, CHAN_HELP_VOP);
return true;
+1 -1
View File
@@ -42,7 +42,7 @@ class CommandHSDel : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_HostServ, u, HOST_HELP_DEL);
return true;
+1 -1
View File
@@ -49,7 +49,7 @@ class CommandHSDelAll : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_HostServ, u, HOST_HELP_DELALL);
return true;
+1 -1
View File
@@ -76,7 +76,7 @@ class CommandHSGroup : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_HostServ, u, HOST_HELP_GROUP);
return true;
+1 -1
View File
@@ -135,7 +135,7 @@ class CommandHSList : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_HostServ, u, HOST_HELP_LIST);
return true;
+1 -1
View File
@@ -46,7 +46,7 @@ class CommandHSOff : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_HostServ, u, HOST_HELP_OFF);
return true;
+1 -1
View File
@@ -60,7 +60,7 @@ class CommandHSOn : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_HostServ, u, HOST_HELP_ON);
return true;
+1 -1
View File
@@ -139,7 +139,7 @@ class CommandHSSet : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_HostServ, u, HOST_HELP_SET);
return true;
+1 -1
View File
@@ -140,7 +140,7 @@ class CommandHSSetAll : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_HostServ, u, HOST_HELP_SETALL);
return true;
+1 -1
View File
@@ -59,7 +59,7 @@ class CommandMSCancel : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_MemoServ, u, MEMO_HELP_CANCEL);
return true;
+1 -1
View File
@@ -76,7 +76,7 @@ class CommandMSCheck : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_MemoServ, u, MEMO_HELP_CHECK);
return true;
+1 -1
View File
@@ -132,7 +132,7 @@ class CommandMSDel : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_MemoServ, u, MEMO_HELP_DEL);
return true;
+2 -2
View File
@@ -66,7 +66,7 @@ class CommandMSInfo : public Command
notice_lang(s_MemoServ, u, ACCESS_DENIED);
return MOD_CONT;
}
else
else
{
mi = &u->nc->memos;
hardmax = u->nc->flags & NI_MEMO_HARDMAX ? 1 : 0;
@@ -190,7 +190,7 @@ class CommandMSInfo : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
if (u->nc && u->nc->IsServicesOper())
notice_help(s_MemoServ, u, MEMO_SERVADMIN_HELP_INFO);
+1 -1
View File
@@ -98,7 +98,7 @@ class CommandMSList : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_MemoServ, u, MEMO_HELP_LIST);
return true;
+1 -1
View File
@@ -105,7 +105,7 @@ class CommandMSRead : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_MemoServ, u, MEMO_HELP_READ);
return true;
+1 -1
View File
@@ -66,7 +66,7 @@ class CommandMSRSend : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_MemoServ, u, MEMO_HELP_RSEND);
return true;
+1 -1
View File
@@ -31,7 +31,7 @@ class CommandMSSend : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_MemoServ, u, MEMO_HELP_SEND);
return true;
+1 -1
View File
@@ -52,7 +52,7 @@ class CommandMSSendAll : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_MemoServ, u, MEMO_HELP_SENDALL);
return true;
+1 -1
View File
@@ -227,7 +227,7 @@ class CommandMSSet : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
if (subcommand.empty())
notice_help(s_MemoServ, u, MEMO_HELP_SET);
+1 -1
View File
@@ -50,7 +50,7 @@ class CommandMSStaff : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_MemoServ, u, MEMO_HELP_STAFF);
return true;
+1 -1
View File
@@ -159,7 +159,7 @@ class CommandNSAccess : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_NickServ, u, NICK_HELP_ACCESS);
return true;
+1 -1
View File
@@ -130,7 +130,7 @@ class CommandNSAList : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
if (u->nc && u->nc->IsServicesOper())
notice_help(s_NickServ, u, NICK_SERVADMIN_HELP_ALIST);
+1 -1
View File
@@ -96,7 +96,7 @@ class CommandNSDrop : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
if (u->nc && u->nc->IsServicesOper())
notice_help(s_NickServ, u, NICK_SERVADMIN_HELP_DROP);
+1 -1
View File
@@ -88,7 +88,7 @@ class CommandNSForbid : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_NickServ, u, NICK_SERVADMIN_HELP_FORBID);
return true;
+1 -1
View File
@@ -56,7 +56,7 @@ class CommandNSGetEMail : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_NickServ, u, NICK_SERVADMIN_HELP_GETEMAIL);
return true;
+1 -1
View File
@@ -60,7 +60,7 @@ class CommandNSGetPass : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_NickServ, u, NICK_SERVADMIN_HELP_GETPASS);
return true;
+1 -1
View File
@@ -74,7 +74,7 @@ class CommandNSGhost : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_NickServ, u, NICK_HELP_GHOST);
return true;
+2 -2
View File
@@ -158,7 +158,7 @@ class CommandNSGroup : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_NickServ, u, NICK_HELP_GROUP);
return true;
@@ -218,7 +218,7 @@ class CommandNSGList : public Command
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
if (u->nc && u->nc->IsServicesOper())
notice_help(s_NickServ, u, NICK_SERVADMIN_HELP_GLIST);
+1 -1
View File
@@ -112,7 +112,7 @@ class CommandNSIdentify : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_NickServ, u, NICK_HELP_IDENTIFY);
return true;
+1 -1
View File
@@ -193,7 +193,7 @@ class CommandNSInfo : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
if (u->nc && u->nc->IsServicesOper())
notice_help(s_NickServ, u, NICK_SERVADMIN_HELP_INFO);
+1 -1
View File
@@ -190,7 +190,7 @@ class CommandNSList : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
if (u->nc && u->nc->IsServicesOper())
notice_help(s_NickServ, u, NICK_SERVADMIN_HELP_LIST);
+1 -1
View File
@@ -93,7 +93,7 @@ class CommandNSLogout : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
if (u->nc && u->nc->IsServicesOper())
notice_help(s_NickServ, u, NICK_SERVADMIN_HELP_LOGOUT);
+1 -1
View File
@@ -86,7 +86,7 @@ class CommandNSRecover : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
char relstr[192];
+3 -3
View File
@@ -183,7 +183,7 @@ class CommandNSConfirm : public Command
return this->DoConfirm(u, params);
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_NickServ, u, NICK_HELP_CONFIRM);
return true;
@@ -331,7 +331,7 @@ class CommandNSRegister : public CommandNSConfirm
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_NickServ, u, NICK_HELP_REGISTER);
return true;
@@ -382,7 +382,7 @@ class CommandNSResend : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_NickServ, u, NICK_HELP_RESEND);
return true;
+1 -1
View File
@@ -68,7 +68,7 @@ class CommandNSRelease : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
char relstr[192];
+1 -1
View File
@@ -531,7 +531,7 @@ public:
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
if (subcommand.empty())
notice_help(s_NickServ, u, NICK_HELP_SASET);
+1 -1
View File
@@ -71,7 +71,7 @@ class CommandNSSendPass : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_NickServ, u, NICK_HELP_SENDPASS);
return true;
+1 -1
View File
@@ -491,7 +491,7 @@ class CommandNSSet : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
if (subcommand.empty())
notice_help(s_NickServ, u, NICK_HELP_SET);
+1 -1
View File
@@ -54,7 +54,7 @@ class CommandNSStatus : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_NickServ, u, NICK_HELP_STATUS);
return true;
+4 -4
View File
@@ -82,7 +82,7 @@ class CommandNSSuspend : public Command
alog("%s: %s set SUSPEND for nick %s", s_NickServ, u->nick, nick);
notice_lang(s_NickServ, u, NICK_SUSPEND_SUCCEEDED, nick);
FOREACH_MOD(I_OnNickSuspended, OnNickSuspend(na))
}
else
@@ -93,7 +93,7 @@ class CommandNSSuspend : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_NickServ, u, NICK_SERVADMIN_HELP_SUSPEND);
return true;
@@ -150,7 +150,7 @@ class CommandNSUnSuspend : public Command
alog("%s: %s set UNSUSPEND for nick %s", s_NickServ, u->nick, nick);
notice_lang(s_NickServ, u, NICK_UNSUSPEND_SUCCEEDED, nick);
FOREACH_MOD(I_OnNickUnsuspended, OnNickUnsuspended(na));
}
else
@@ -161,7 +161,7 @@ class CommandNSUnSuspend : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_NickServ, u, NICK_SERVADMIN_HELP_UNSUSPEND);
return true;
+1 -1
View File
@@ -45,7 +45,7 @@ class CommandNSUpdate : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &)
bool OnHelp(User *u, const ci::string &)
{
notice_help(s_NickServ, u, NICK_HELP_UPDATE);
return true;
+1 -1
View File
@@ -309,7 +309,7 @@ class CommandOSAKill : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_OperServ, u, OPER_HELP_AKILL);
return true;
+1 -1
View File
@@ -88,7 +88,7 @@ class CommandOSChanKill : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_OperServ, u, OPER_HELP_CHANKILL);
return true;
+1 -1
View File
@@ -70,7 +70,7 @@ class CommandOSChanList : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_OperServ, u, OPER_HELP_CHANLIST);
return true;
+1 -1
View File
@@ -231,7 +231,7 @@ class CommandOSClearModes : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_OperServ, u, OPER_HELP_CLEARMODES);
return true;
+1 -1
View File
@@ -76,7 +76,7 @@ class CommandOSDEFCON : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_OperServ, u, OPER_HELP_DEFCON);
return true;
+1 -1
View File
@@ -32,7 +32,7 @@ class CommandOSGlobal : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_OperServ, u, OPER_HELP_GLOBAL, s_GlobalNoticer);
return true;
+1 -1
View File
@@ -118,7 +118,7 @@ class CommandOSIgnore : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_OperServ, u, OPER_HELP_IGNORE);
return true;
+1 -1
View File
@@ -46,7 +46,7 @@ class CommandOSJupe : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_OperServ, u, OPER_HELP_JUPE);
return true;
+1 -1
View File
@@ -51,7 +51,7 @@ class CommandOSKick : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_OperServ, u, OPER_HELP_KICK);
return true;
+1 -1
View File
@@ -47,7 +47,7 @@ class CommandOSMode : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_OperServ, u, OPER_HELP_MODE);
return true;
+1 -1
View File
@@ -53,7 +53,7 @@ class CommandOSModInfo : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_OperServ, u, OPER_HELP_MODINFO);
return true;
+1 -1
View File
@@ -161,7 +161,7 @@ class CommandOSModList : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_OperServ, u, OPER_HELP_MODLIST);
return true;
+1 -1
View File
@@ -42,7 +42,7 @@ class CommandOSModLoad : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_OperServ, u, OPER_HELP_MODLOAD);
return true;
+1 -1
View File
@@ -44,7 +44,7 @@ class CommandOSModUnLoad : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_OperServ, u, OPER_HELP_MODUNLOAD);
return true;
+4 -4
View File
@@ -235,7 +235,7 @@ class NewsBase : public Command
virtual CommandReturn Execute(User *u, std::vector<std::string> &params) = 0;
virtual bool OnHelp(User *u, const std::string &subcommand) = 0;
virtual bool OnHelp(User *u, const ci::string &subcommand) = 0;
virtual void OnSyntaxError(User *u) = 0;
};
@@ -260,7 +260,7 @@ class CommandOSLogonNews : public NewsBase
return this->DoNews(u, params, NEWS_LOGON);
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_OperServ, u, NEWS_HELP_LOGON, this->help_param1);
return true;
@@ -303,7 +303,7 @@ class CommandOSOperNews : public NewsBase
return this->DoNews(u, params, NEWS_OPER);
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_OperServ, u, NEWS_HELP_OPER, this->help_param1);
return true;
@@ -338,7 +338,7 @@ class CommandOSRandomNews : public NewsBase
return this->DoNews(u, params, NEWS_RANDOM);
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_OperServ, u, NEWS_HELP_RANDOM);
return true;
+1 -1
View File
@@ -59,7 +59,7 @@ class CommandOSNOOP : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_OperServ, u, OPER_HELP_NOOP);
return true;
+1 -1
View File
@@ -58,7 +58,7 @@ class CommandOSOLine : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_OperServ, u, OPER_HELP_OLINE);
return true;
+1 -1
View File
@@ -37,7 +37,7 @@ class CommandOSQuit : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
if (!u->nc->HasCommand("operserv/quit"))
return false;
+1 -1
View File
@@ -39,7 +39,7 @@ class CommandOSReload : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_OperServ, u, OPER_HELP_RELOAD);
return true;
+1 -1
View File
@@ -42,7 +42,7 @@ class CommandOSRestart : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_OperServ, u, OPER_HELP_RESTART);
return true;
+2 -2
View File
@@ -81,7 +81,7 @@ class CommandOSSession : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_OperServ, u, OPER_HELP_SESSION);
return true;
@@ -439,7 +439,7 @@ class CommandOSException : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_OperServ, u, OPER_HELP_EXCEPTION);
return true;
+1 -1
View File
@@ -260,7 +260,7 @@ class CommandOSSet : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
if (subcommand.empty())
notice_help(s_OperServ, u, OPER_HELP_SET);
+1 -1
View File
@@ -306,7 +306,7 @@ class CommandOSSGLine : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_OperServ, u, OPER_HELP_SGLINE);
return true;
+1 -1
View File
@@ -38,7 +38,7 @@ class CommandOSShutdown : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
if (!u->nc->HasCommand("operserv/shutdown"))
return false;
+1 -1
View File
@@ -293,7 +293,7 @@ class CommandOSSQLine : public Command
return MOD_CONT;
}
bool OnHelp(User *u, const std::string &subcommand)
bool OnHelp(User *u, const ci::string &subcommand)
{
notice_help(s_OperServ, u, OPER_HELP_SQLINE);
return true;

Some files were not shown because too many files have changed in this diff Show More