mirror of
https://github.com/anope/anope.git
synced 2026-06-30 21:46:39 +02:00
The rest of the earlier command changes
This commit is contained in:
+9
-9
@@ -29,9 +29,9 @@ enum CommandReturn
|
||||
};
|
||||
|
||||
extern CoreExport Command *FindCommand(BotInfo *bi, const Anope::string &cmd);
|
||||
extern CoreExport void mod_help_cmd(BotInfo *bi, User *u, const Anope::string &cmd);
|
||||
extern CoreExport void mod_run_cmd(BotInfo *bi, User *u, const Anope::string &message, bool fantasy);
|
||||
extern CoreExport void mod_run_cmd(BotInfo *bi, User *u, Command *c, const Anope::string &command, const Anope::string &message, bool fantasy);
|
||||
extern CoreExport void mod_help_cmd(BotInfo *bi, User *u, ChannelInfo *ci, const Anope::string &cmd);
|
||||
extern CoreExport void mod_run_cmd(BotInfo *bi, User *u, const Anope::string &message, ChannelInfo *ci);
|
||||
extern CoreExport void mod_run_cmd(BotInfo *bi, User *u, Command *c, const Anope::string &command, const Anope::string &message, ChannelInfo *ci);
|
||||
|
||||
enum CommandFlag
|
||||
{
|
||||
@@ -101,22 +101,22 @@ class CoreExport Command : public Flags<CommandFlag>
|
||||
virtual CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) = 0;
|
||||
|
||||
/** Called when HELP is requsted for the client this command is on.
|
||||
* @param u The user requesting help
|
||||
* @param source The source
|
||||
*/
|
||||
virtual void OnServHelp(User *u);
|
||||
virtual void OnServHelp(CommandSource &source);
|
||||
|
||||
/** 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
|
||||
* @param source The source
|
||||
* @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 Anope::string &subcommand);
|
||||
virtual bool OnHelp(CommandSource &source, const Anope::string &subcommand);
|
||||
|
||||
/** Requested when the user provides bad syntax to this command (not enough params, etc).
|
||||
* @param u The user executing the command.
|
||||
* @param source The source
|
||||
* @param subcommand The subcommand the user tried to use
|
||||
*/
|
||||
virtual void OnSyntaxError(User *u, const Anope::string &subcommand);
|
||||
virtual void OnSyntaxError(CommandSource &source, const Anope::string &subcommand);
|
||||
|
||||
/** Set which command permission (e.g. chanserv/forbid) is required for this command.
|
||||
* @param reststr The permission required to successfully execute this command
|
||||
|
||||
+3
-3
@@ -146,7 +146,7 @@ E const Anope::string GetString(NickCore *nc, LanguageString string);
|
||||
E const Anope::string GetString(User *u, LanguageString string);
|
||||
E const Anope::string GetString(const char *domain, Anope::string language, const Anope::string &string);
|
||||
E const char *const language_strings[LANG_STRING_COUNT];
|
||||
E void SyntaxError(BotInfo *bi, User *u, const Anope::string &command, LanguageString message);
|
||||
E void SyntaxError(CommandSource &source, const Anope::string &command, LanguageString message);
|
||||
|
||||
/*** logger.cpp ***/
|
||||
E void InitLogChannels(ServerConfig *);
|
||||
@@ -189,10 +189,10 @@ class CoreExport UplinkSocket : public ConnectionSocket
|
||||
/**** memoserv.c ****/
|
||||
|
||||
E void ms_init();
|
||||
E void rsend_notify(User *u, Memo *m, const Anope::string &chan);
|
||||
E void rsend_notify(CommandSource &source, Memo *m, const Anope::string &chan);
|
||||
E void check_memos(User *u);
|
||||
E MemoInfo *getmemoinfo(const Anope::string &name, bool &ischan, bool &isforbid);
|
||||
E void memo_send(User *u, const Anope::string &name, const Anope::string &text, int z);
|
||||
E void memo_send(CommandSource &source, const Anope::string &name, const Anope::string &text, int z);
|
||||
|
||||
/**** messages.c ****/
|
||||
|
||||
|
||||
+6
-8
@@ -284,11 +284,10 @@ class CoreExport Module : public Extensible
|
||||
Version GetVersion() const;
|
||||
|
||||
/** Send a message to a user in their language, if a translation is available
|
||||
* @param from Client to send the message from
|
||||
* @param to User to send the message to
|
||||
* @param source The source of the message
|
||||
* @param fmt The message
|
||||
*/
|
||||
void SendMessage(BotInfo *from, User *to, const char *fmt, ...);
|
||||
void SendMessage(CommandSource &source, const char *fmt, ...);
|
||||
|
||||
/**
|
||||
* Add a module provided command to the given service.
|
||||
@@ -365,19 +364,18 @@ class CoreExport Module : public Extensible
|
||||
* @param bi The bot the command is being run from
|
||||
* @param command The command
|
||||
* @param message The parameters used for the command
|
||||
* @param fantasy true if this is a fantasy command
|
||||
* @param ci If a tanasy command, the channel the comman was used on
|
||||
* @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it
|
||||
*/
|
||||
virtual EventReturn OnPreCommandRun(User *u, BotInfo *bi, Anope::string &command, Anope::string &message, bool fantasy) { return EVENT_CONTINUE; }
|
||||
virtual EventReturn OnPreCommandRun(User *u, BotInfo *bi, Anope::string &command, Anope::string &message, ChannelInfo *ci) { return EVENT_CONTINUE; }
|
||||
|
||||
/** Called before a command is due to be executed.
|
||||
* @param u The user executing the command
|
||||
* @param service The service the command is associated with
|
||||
* @param source The source of the command
|
||||
* @param command The command the user is executing
|
||||
* @param params The parameters the user is sending
|
||||
* @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it
|
||||
*/
|
||||
virtual EventReturn OnPreCommand(User *u, BotInfo *service, const Anope::string &command, const std::vector<Anope::string> ¶ms) { return EVENT_CONTINUE; }
|
||||
virtual EventReturn OnPreCommand(CommandSource &source, Command *command, const std::vector<Anope::string> ¶ms) { return EVENT_CONTINUE; }
|
||||
|
||||
/** Called after a command has been executed.
|
||||
* @param source The source of the command
|
||||
|
||||
@@ -57,20 +57,20 @@ class CommandBSAct : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(BotServ, u, "ACT", BOT_ACT_SYNTAX);
|
||||
SyntaxError(source, "ACT", BOT_ACT_SYNTAX);
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(BotServ, BOT_HELP_ACT);
|
||||
source.Reply(BOT_HELP_ACT);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(BotServ, BOT_HELP_CMD_ACT);
|
||||
source.Reply(BOT_HELP_CMD_ACT);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -62,24 +62,24 @@ class CommandBSAssign : public Command
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "for " << bi->nick;
|
||||
|
||||
bi->Assign(u, ci);
|
||||
u->SendMessage(BotServ, BOT_ASSIGN_ASSIGNED, bi->nick.c_str(), ci->name.c_str());
|
||||
source.Reply(BOT_ASSIGN_ASSIGNED, bi->nick.c_str(), ci->name.c_str());
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(BotServ, BOT_HELP_ASSIGN);
|
||||
source.Reply(BOT_HELP_ASSIGN);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(BotServ, u, "ASSIGN", BOT_ASSIGN_SYNTAX);
|
||||
SyntaxError(source, "ASSIGN", BOT_ASSIGN_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(BotServ, BOT_HELP_CMD_ASSIGN);
|
||||
source.Reply(BOT_HELP_CMD_ASSIGN);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -236,7 +236,7 @@ class CommandBSBadwords : public Command
|
||||
|
||||
if (!need_args && word.empty())
|
||||
{
|
||||
this->OnSyntaxError(u, cmd);
|
||||
this->OnSyntaxError(source, cmd);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
@@ -261,25 +261,25 @@ class CommandBSBadwords : public Command
|
||||
else if (cmd.equals_ci("CLEAR"))
|
||||
return this->DoClear(source);
|
||||
else
|
||||
this->OnSyntaxError(u, "");
|
||||
this->OnSyntaxError(source, "");
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(BotServ, BOT_HELP_BADWORDS);
|
||||
source.Reply(BOT_HELP_BADWORDS);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(BotServ, u, "BADWORDS", BOT_BADWORDS_SYNTAX);
|
||||
SyntaxError(source, "BADWORDS", BOT_BADWORDS_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(BotServ, BOT_HELP_CMD_BADWORDS);
|
||||
source.Reply(BOT_HELP_CMD_BADWORDS);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+12
-12
@@ -119,7 +119,7 @@ class CommandBSBot : public Command
|
||||
|
||||
if (oldnick.empty() || nick.empty())
|
||||
{
|
||||
this->OnSyntaxError(source.u, "CHANGE");
|
||||
this->OnSyntaxError(source, "CHANGE");
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ class CommandBSBot : public Command
|
||||
|
||||
if (nick.empty())
|
||||
{
|
||||
this->OnSyntaxError(source.u, "DEL");
|
||||
this->OnSyntaxError(source, "DEL");
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
@@ -332,7 +332,7 @@ class CommandBSBot : public Command
|
||||
|
||||
if (params.size() < 5)
|
||||
{
|
||||
this->OnSyntaxError(u, "ADD");
|
||||
this->OnSyntaxError(source, "ADD");
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
@@ -355,7 +355,7 @@ class CommandBSBot : public Command
|
||||
|
||||
if (params.size() < 3)
|
||||
{
|
||||
this->OnSyntaxError(u, "CHANGE");
|
||||
this->OnSyntaxError(source, "CHANGE");
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
@@ -372,32 +372,32 @@ class CommandBSBot : public Command
|
||||
|
||||
if (params.size() < 1)
|
||||
{
|
||||
this->OnSyntaxError(u, "DEL");
|
||||
this->OnSyntaxError(source, "DEL");
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
return this->DoDel(source, params);
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(u, "");
|
||||
this->OnSyntaxError(source, "");
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(BotServ, BOT_SERVADMIN_HELP_BOT);
|
||||
source.Reply(BOT_SERVADMIN_HELP_BOT);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(BotServ, u, "BOT", BOT_BOT_SYNTAX);
|
||||
SyntaxError(source, "BOT", BOT_BOT_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(BotServ, BOT_HELP_CMD_BOT);
|
||||
source.Reply(BOT_HELP_CMD_BOT);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -68,15 +68,15 @@ class CommandBSBotList : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(BotServ, BOT_HELP_BOTLIST);
|
||||
source.Reply(BOT_HELP_BOTLIST);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(BotServ, BOT_HELP_CMD_BOTLIST);
|
||||
source.Reply(BOT_HELP_CMD_BOTLIST);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -24,19 +24,19 @@ class CommandBSHelp : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
mod_help_cmd(findbot(Config->s_BotServ), u, params[0]);
|
||||
mod_help_cmd(BotServ, source.u, NULL, params[0]);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
// Abuse syntax error to display general list help.
|
||||
u->SendMessage(BotServ, BOT_HELP);
|
||||
User *u = source.u;
|
||||
source.Reply(BOT_HELP);
|
||||
for (CommandMap::const_iterator it = BotServ->Commands.begin(), it_end = BotServ->Commands.end(); it != it_end; ++it)
|
||||
if (!Config->HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
|
||||
it->second->OnServHelp(u);
|
||||
u->SendMessage(BotServ, BOT_HELP_FOOTER, Config->BSMinUsers);
|
||||
it->second->OnServHelp(source);
|
||||
source.Reply(BOT_HELP_FOOTER, Config->BSMinUsers);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -208,20 +208,20 @@ class CommandBSInfo : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(BotServ, BOT_HELP_INFO);
|
||||
source.Reply(BOT_HELP_INFO);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(BotServ, u, "INFO", BOT_INFO_SYNTAX);
|
||||
SyntaxError(source, "INFO", BOT_INFO_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(BotServ, BOT_HELP_CMD_INFO);
|
||||
source.Reply(BOT_HELP_CMD_INFO);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+17
-17
@@ -34,9 +34,9 @@ class CommandBSKick : public Command
|
||||
if (readonly)
|
||||
source.Reply(BOT_KICK_DISABLED);
|
||||
else if (chan.empty() || option.empty() || value.empty())
|
||||
SyntaxError(BotServ, u, "KICK", BOT_KICK_SYNTAX);
|
||||
SyntaxError(source, "KICK", BOT_KICK_SYNTAX);
|
||||
else if (!value.equals_ci("ON") && !value.equals_ci("OFF"))
|
||||
SyntaxError(BotServ, u, "KICK", BOT_KICK_SYNTAX);
|
||||
SyntaxError(source, "KICK", BOT_KICK_SYNTAX);
|
||||
else if (!check_access(u, ci, CA_SET) && !u->Account()->HasPriv("botserv/administration"))
|
||||
source.Reply(ACCESS_DENIED);
|
||||
else if (!ci->bi)
|
||||
@@ -371,42 +371,42 @@ class CommandBSKick : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
if (subcommand.empty())
|
||||
u->SendMessage(BotServ, BOT_HELP_KICK);
|
||||
source.Reply(BOT_HELP_KICK);
|
||||
else if (subcommand.equals_ci("BADWORDS"))
|
||||
u->SendMessage(BotServ, BOT_HELP_KICK_BADWORDS);
|
||||
source.Reply(BOT_HELP_KICK_BADWORDS);
|
||||
else if (subcommand.equals_ci("BOLDS"))
|
||||
u->SendMessage(BotServ, BOT_HELP_KICK_BOLDS);
|
||||
source.Reply(BOT_HELP_KICK_BOLDS);
|
||||
else if (subcommand.equals_ci("CAPS"))
|
||||
u->SendMessage(BotServ, BOT_HELP_KICK_CAPS);
|
||||
source.Reply(BOT_HELP_KICK_CAPS);
|
||||
else if (subcommand.equals_ci("COLORS"))
|
||||
u->SendMessage(BotServ, BOT_HELP_KICK_COLORS);
|
||||
source.Reply(BOT_HELP_KICK_COLORS);
|
||||
else if (subcommand.equals_ci("FLOOD"))
|
||||
u->SendMessage(BotServ, BOT_HELP_KICK_FLOOD);
|
||||
source.Reply(BOT_HELP_KICK_FLOOD);
|
||||
else if (subcommand.equals_ci("REPEAT"))
|
||||
u->SendMessage(BotServ, BOT_HELP_KICK_REPEAT);
|
||||
source.Reply(BOT_HELP_KICK_REPEAT);
|
||||
else if (subcommand.equals_ci("REVERSES"))
|
||||
u->SendMessage(BotServ, BOT_HELP_KICK_REVERSES);
|
||||
source.Reply(BOT_HELP_KICK_REVERSES);
|
||||
else if (subcommand.equals_ci("UNDERLINES"))
|
||||
u->SendMessage(BotServ, BOT_HELP_KICK_UNDERLINES);
|
||||
source.Reply(BOT_HELP_KICK_UNDERLINES);
|
||||
else if (subcommand.equals_ci("ITALICS"))
|
||||
u->SendMessage(BotServ, BOT_HELP_KICK_ITALICS);
|
||||
source.Reply(BOT_HELP_KICK_ITALICS);
|
||||
else
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(BotServ, u, "KICK", BOT_KICK_SYNTAX);
|
||||
SyntaxError(source, "KICK", BOT_KICK_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(BotServ, BOT_HELP_CMD_KICK);
|
||||
source.Reply(BOT_HELP_CMD_KICK);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ class CommandBSSay : public Command
|
||||
|
||||
if (text[0] == '\001')
|
||||
{
|
||||
this->OnSyntaxError(u, "");
|
||||
this->OnSyntaxError(source, "");
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
@@ -60,20 +60,20 @@ class CommandBSSay : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(BotServ, BOT_HELP_SAY);
|
||||
source.Reply(BOT_HELP_SAY);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(BotServ, u, "SAY", BOT_SAY_SYNTAX);
|
||||
SyntaxError(source, "SAY", BOT_SAY_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(BotServ, BOT_HELP_CMD_SAY);
|
||||
source.Reply(BOT_HELP_CMD_SAY);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+24
-23
@@ -53,7 +53,7 @@ class CommandBSSet : public Command
|
||||
source.Reply(BOT_SET_PRIVATE_OFF, bi->nick.c_str());
|
||||
}
|
||||
else
|
||||
SyntaxError(BotServ, u, "SET PRIVATE", BOT_SET_PRIVATE_SYNTAX);
|
||||
SyntaxError(source, "SET PRIVATE", BOT_SET_PRIVATE_SYNTAX);
|
||||
return MOD_CONT;
|
||||
}
|
||||
else if (!(ci = cs_findchan(chan)))
|
||||
@@ -78,7 +78,7 @@ class CommandBSSet : public Command
|
||||
source.Reply(BOT_SET_DONTKICKOPS_OFF, ci->name.c_str());
|
||||
}
|
||||
else
|
||||
SyntaxError(BotServ, u, "SET DONTKICKOPS", BOT_SET_DONTKICKOPS_SYNTAX);
|
||||
SyntaxError(source, "SET DONTKICKOPS", BOT_SET_DONTKICKOPS_SYNTAX);
|
||||
}
|
||||
else if (option.equals_ci("DONTKICKVOICES"))
|
||||
{
|
||||
@@ -93,7 +93,7 @@ class CommandBSSet : public Command
|
||||
source.Reply(BOT_SET_DONTKICKVOICES_OFF, ci->name.c_str());
|
||||
}
|
||||
else
|
||||
SyntaxError(BotServ, u, "SET DONTKICKVOICES", BOT_SET_DONTKICKVOICES_SYNTAX);
|
||||
SyntaxError(source, "SET DONTKICKVOICES", BOT_SET_DONTKICKVOICES_SYNTAX);
|
||||
}
|
||||
else if (option.equals_ci("FANTASY"))
|
||||
{
|
||||
@@ -108,7 +108,7 @@ class CommandBSSet : public Command
|
||||
source.Reply(BOT_SET_FANTASY_OFF, ci->name.c_str());
|
||||
}
|
||||
else
|
||||
SyntaxError(BotServ, u, "SET FANTASY", BOT_SET_FANTASY_SYNTAX);
|
||||
SyntaxError(source, "SET FANTASY", BOT_SET_FANTASY_SYNTAX);
|
||||
}
|
||||
else if (option.equals_ci("GREET"))
|
||||
{
|
||||
@@ -123,7 +123,7 @@ class CommandBSSet : public Command
|
||||
source.Reply(BOT_SET_GREET_OFF, ci->name.c_str());
|
||||
}
|
||||
else
|
||||
SyntaxError(BotServ, u, "SET GREET", BOT_SET_GREET_SYNTAX);
|
||||
SyntaxError(source, "SET GREET", BOT_SET_GREET_SYNTAX);
|
||||
}
|
||||
else if (u->Account()->HasCommand("botserv/set/nobot") && option.equals_ci("NOBOT"))
|
||||
{
|
||||
@@ -140,7 +140,7 @@ class CommandBSSet : public Command
|
||||
source.Reply(BOT_SET_NOBOT_OFF, ci->name.c_str());
|
||||
}
|
||||
else
|
||||
SyntaxError(BotServ, u, "SET NOBOT", BOT_SET_NOBOT_SYNTAX);
|
||||
SyntaxError(source, "SET NOBOT", BOT_SET_NOBOT_SYNTAX);
|
||||
}
|
||||
else if (option.equals_ci("SYMBIOSIS"))
|
||||
{
|
||||
@@ -155,7 +155,7 @@ class CommandBSSet : public Command
|
||||
source.Reply(BOT_SET_SYMBIOSIS_OFF, ci->name.c_str());
|
||||
}
|
||||
else
|
||||
SyntaxError(BotServ, u, "SET SYMBIOSIS", BOT_SET_SYMBIOSIS_SYNTAX);
|
||||
SyntaxError(source, "SET SYMBIOSIS", BOT_SET_SYMBIOSIS_SYNTAX);
|
||||
}
|
||||
else if (option.equals_ci("MSG"))
|
||||
{
|
||||
@@ -188,7 +188,7 @@ class CommandBSSet : public Command
|
||||
source.Reply(BOT_SET_MSG_NOTICEOPS, ci->name.c_str());
|
||||
}
|
||||
else
|
||||
SyntaxError(BotServ, u, "SET MSG", BOT_SET_MSG_SYNTAX);
|
||||
SyntaxError(source, "SET MSG", BOT_SET_MSG_SYNTAX);
|
||||
}
|
||||
else
|
||||
source.Reply(BOT_SET_UNKNOWN, option.c_str());
|
||||
@@ -197,44 +197,45 @@ class CommandBSSet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
if (subcommand.empty())
|
||||
{
|
||||
u->SendMessage(BotServ, BOT_HELP_SET);
|
||||
source.Reply(BOT_HELP_SET);
|
||||
User *u = source.u;
|
||||
if (u->Account() && u->Account()->IsServicesOper())
|
||||
u->SendMessage(BotServ, BOT_SERVADMIN_HELP_SET);
|
||||
source.Reply(BOT_SERVADMIN_HELP_SET);
|
||||
}
|
||||
else if (subcommand.equals_ci("DONTKICKOPS"))
|
||||
u->SendMessage(BotServ, BOT_HELP_SET_DONTKICKOPS);
|
||||
source.Reply(BOT_HELP_SET_DONTKICKOPS);
|
||||
else if (subcommand.equals_ci("DONTKICKVOICES"))
|
||||
u->SendMessage(BotServ, BOT_HELP_SET_DONTKICKVOICES);
|
||||
source.Reply(BOT_HELP_SET_DONTKICKVOICES);
|
||||
else if (subcommand.equals_ci("FANTASY"))
|
||||
u->SendMessage(BotServ, BOT_HELP_SET_FANTASY);
|
||||
source.Reply(BOT_HELP_SET_FANTASY);
|
||||
else if (subcommand.equals_ci("GREET"))
|
||||
u->SendMessage(BotServ, BOT_HELP_SET_GREET);
|
||||
source.Reply(BOT_HELP_SET_GREET);
|
||||
else if (subcommand.equals_ci("SYMBIOSIS"))
|
||||
u->SendMessage(BotServ, BOT_HELP_SET_SYMBIOSIS, Config->s_ChanServ.c_str());
|
||||
source.Reply(BOT_HELP_SET_SYMBIOSIS, Config->s_ChanServ.c_str());
|
||||
else if (subcommand.equals_ci("NOBOT"))
|
||||
u->SendMessage(BotServ, BOT_SERVADMIN_HELP_SET_NOBOT);
|
||||
source.Reply(BOT_SERVADMIN_HELP_SET_NOBOT);
|
||||
else if (subcommand.equals_ci("PRIVATE"))
|
||||
u->SendMessage(BotServ, BOT_SERVADMIN_HELP_SET_PRIVATE);
|
||||
source.Reply(BOT_SERVADMIN_HELP_SET_PRIVATE);
|
||||
else if (subcommand.equals_ci("MSG"))
|
||||
u->SendMessage(BotServ, BOT_HELP_SET_MSG);
|
||||
source.Reply(BOT_HELP_SET_MSG);
|
||||
else
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(BotServ, u, "SET", BOT_SET_SYNTAX);
|
||||
SyntaxError(source, "SET", BOT_SET_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(BotServ, BOT_HELP_CMD_SET);
|
||||
source.Reply(BOT_HELP_CMD_SET);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -46,20 +46,20 @@ class CommandBSUnassign : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(BotServ, BOT_HELP_UNASSIGN);
|
||||
source.Reply(BOT_HELP_UNASSIGN);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(BotServ, u, "UNASSIGN", BOT_UNASSIGN_SYNTAX);
|
||||
SyntaxError(source, "UNASSIGN", BOT_UNASSIGN_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(BotServ, BOT_HELP_CMD_UNASSIGN);
|
||||
source.Reply(BOT_HELP_CMD_UNASSIGN);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+21
-21
@@ -237,7 +237,7 @@ class CommandCSAccess : public Command
|
||||
FOREACH_MOD(I_OnAccessAdd, OnAccessAdd(ci, u, nc, level));
|
||||
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "ADD " << na->nick << " (group: " << nc->display << ") (level: " << level << ") as level " << ulev;
|
||||
u->SendMessage(ChanServ, CHAN_ACCESS_ADDED, nc->display.c_str(), ci->name.c_str(), level);
|
||||
source.Reply(CHAN_ACCESS_ADDED, nc->display.c_str(), ci->name.c_str(), level);
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
@@ -436,7 +436,7 @@ class CommandCSAccess : public Command
|
||||
* If DEL, we require a nick and no level.
|
||||
* Else (ADD), we require a level (which implies a nick). */
|
||||
if (is_list || is_clear ? 0 : (cmd.equals_ci("DEL") ? (nick.empty() || !s.empty()) : s.empty()))
|
||||
this->OnSyntaxError(u, cmd);
|
||||
this->OnSyntaxError(source, cmd);
|
||||
else if (!has_access)
|
||||
source.Reply(ACCESS_DENIED);
|
||||
/* We still allow LIST and CLEAR in xOP mode, but not others */
|
||||
@@ -460,21 +460,21 @@ class CommandCSAccess : public Command
|
||||
else if (cmd.equals_ci("CLEAR"))
|
||||
this->DoClear(source);
|
||||
else
|
||||
this->OnSyntaxError(u, "");
|
||||
this->OnSyntaxError(source, "");
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_ACCESS);
|
||||
u->SendMessage(ChanServ, CHAN_HELP_ACCESS_LEVELS);
|
||||
source.Reply(CHAN_HELP_ACCESS);
|
||||
source.Reply(CHAN_HELP_ACCESS_LEVELS);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "ACCESS", CHAN_ACCESS_SYNTAX);
|
||||
SyntaxError(source, "ACCESS", CHAN_ACCESS_SYNTAX);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -500,7 +500,7 @@ class CommandCSLevels : public Command
|
||||
}
|
||||
|
||||
if (!error.empty())
|
||||
this->OnSyntaxError(u, "SET");
|
||||
this->OnSyntaxError(source, "SET");
|
||||
else if (level <= ACCESS_INVALID || level > ACCESS_FOUNDER)
|
||||
source.Reply(CHAN_LEVELS_RANGE, ACCESS_INVALID + 1, ACCESS_FOUNDER - 1);
|
||||
else
|
||||
@@ -602,7 +602,7 @@ class CommandCSLevels : public Command
|
||||
bool override = !check_access(u, ci, CA_FOUNDER);
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "RESET";
|
||||
|
||||
u->SendMessage(ChanServ, CHAN_LEVELS_RESET, ci->name.c_str());
|
||||
source.Reply(CHAN_LEVELS_RESET, ci->name.c_str());
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
@@ -624,7 +624,7 @@ class CommandCSLevels : public Command
|
||||
* one; else, we want none.
|
||||
*/
|
||||
if (cmd.equals_ci("SET") ? s.empty() : (cmd.substr(0, 3).equals_ci("DIS") ? (what.empty() || !s.empty()) : !what.empty()))
|
||||
this->OnSyntaxError(u, cmd);
|
||||
this->OnSyntaxError(source, cmd);
|
||||
else if (ci->HasFlag(CI_XOP))
|
||||
source.Reply(CHAN_LEVELS_XOP);
|
||||
else if (!check_access(u, ci, CA_FOUNDER) && !u->Account()->HasPriv("chanserv/access/modify"))
|
||||
@@ -638,17 +638,17 @@ class CommandCSLevels : public Command
|
||||
else if (cmd.equals_ci("RESET"))
|
||||
this->DoReset(source);
|
||||
else
|
||||
this->OnSyntaxError(u, "");
|
||||
this->OnSyntaxError(source, "");
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
if (subcommand.equals_ci("DESC"))
|
||||
{
|
||||
int i;
|
||||
u->SendMessage(ChanServ, CHAN_HELP_LEVELS_DESC);
|
||||
source.Reply(CHAN_HELP_LEVELS_DESC);
|
||||
if (!levelinfo_maxwidth)
|
||||
for (i = 0; levelinfo[i].what >= 0; ++i)
|
||||
{
|
||||
@@ -657,22 +657,22 @@ class CommandCSLevels : public Command
|
||||
levelinfo_maxwidth = len;
|
||||
}
|
||||
for (i = 0; levelinfo[i].what >= 0; ++i)
|
||||
u->SendMessage(ChanServ, CHAN_HELP_LEVELS_DESC_FORMAT, levelinfo_maxwidth, levelinfo[i].name.c_str(), GetString(u, levelinfo[i].desc).c_str());
|
||||
source.Reply(CHAN_HELP_LEVELS_DESC_FORMAT, levelinfo_maxwidth, levelinfo[i].name.c_str(), GetString(source.u, levelinfo[i].desc).c_str());
|
||||
}
|
||||
else
|
||||
u->SendMessage(ChanServ, CHAN_HELP_LEVELS);
|
||||
source.Reply(CHAN_HELP_LEVELS);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "LEVELS", CHAN_LEVELS_SYNTAX);
|
||||
SyntaxError(source, "LEVELS", CHAN_LEVELS_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_ACCESS);
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_LEVELS);
|
||||
source.Reply(CHAN_HELP_CMD_ACCESS);
|
||||
source.Reply(CHAN_HELP_CMD_LEVELS);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+10
-10
@@ -450,7 +450,7 @@ class CommandCSAKick : public Command
|
||||
bool override = !check_access(u, ci, CA_AKICK);
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "ENFORCE, affects " << count << " users";
|
||||
|
||||
u->SendMessage(ChanServ, CHAN_AKICK_ENFORCE_DONE, ci->name.c_str(), count);
|
||||
source.Reply(CHAN_AKICK_ENFORCE_DONE, ci->name.c_str(), count);
|
||||
}
|
||||
|
||||
void DoClear(CommandSource &source)
|
||||
@@ -461,7 +461,7 @@ class CommandCSAKick : public Command
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "CLEAR";
|
||||
|
||||
ci->ClearAkick();
|
||||
u->SendMessage(ChanServ, CHAN_AKICK_CLEAR, ci->name.c_str());
|
||||
source.Reply(CHAN_AKICK_CLEAR, ci->name.c_str());
|
||||
}
|
||||
|
||||
public:
|
||||
@@ -479,7 +479,7 @@ class CommandCSAKick : public Command
|
||||
ChannelInfo *ci = source.ci;
|
||||
|
||||
if (mask.empty() && (cmd.equals_ci("ADD") || cmd.equals_ci("DEL")))
|
||||
this->OnSyntaxError(u, cmd);
|
||||
this->OnSyntaxError(source, cmd);
|
||||
else if (!check_access(u, ci, CA_AKICK) && !u->Account()->HasPriv("chanserv/access/modify"))
|
||||
source.Reply(ACCESS_DENIED);
|
||||
else if (!cmd.equals_ci("LIST") && !cmd.equals_ci("VIEW") && !cmd.equals_ci("ENFORCE") && readonly)
|
||||
@@ -497,25 +497,25 @@ class CommandCSAKick : public Command
|
||||
else if (cmd.equals_ci("CLEAR"))
|
||||
this->DoClear(source);
|
||||
else
|
||||
this->OnSyntaxError(u, "");
|
||||
this->OnSyntaxError(source, "");
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_AKICK);
|
||||
source.Reply(CHAN_HELP_AKICK);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "AKICK", CHAN_AKICK_SYNTAX);
|
||||
SyntaxError(source, "AKICK", CHAN_AKICK_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_AKICK);
|
||||
source.Reply(CHAN_HELP_CMD_AKICK);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -72,20 +72,20 @@ class CommandCSBan : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_BAN);
|
||||
source.Reply(CHAN_HELP_BAN);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "BAN", CHAN_BAN_SYNTAX);
|
||||
SyntaxError(source, "BAN", CHAN_BAN_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_BAN);
|
||||
source.Reply(CHAN_HELP_CMD_BAN);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -44,25 +44,25 @@ class CommandCSClearUsers : public Command
|
||||
c->Kick(NULL, uc->user, "%s", buf.c_str());
|
||||
}
|
||||
|
||||
u->SendMessage(ChanServ, CHAN_CLEARED_USERS, chan.c_str());
|
||||
source.Reply(CHAN_CLEARED_USERS, chan.c_str());
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CLEARUSERS);
|
||||
source.Reply(CHAN_HELP_CLEARUSERS);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "CLEAR", CHAN_CLEARUSERS_SYNTAX);
|
||||
SyntaxError(source, "CLEAR", CHAN_CLEARUSERS_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_CLEARUSERS);
|
||||
source.Reply(CHAN_HELP_CMD_CLEARUSERS);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
this->OnSyntaxError(u, "");
|
||||
this->OnSyntaxError(source, "");
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
@@ -149,20 +149,20 @@ public:
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CLONE);
|
||||
source.Reply(CHAN_HELP_CLONE);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "CLONE", CHAN_CLONE_SYNTAX);
|
||||
SyntaxError(source, "CLONE", CHAN_CLONE_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_CLONE);
|
||||
source.Reply(CHAN_HELP_CMD_CLONE);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -71,31 +71,32 @@ class CommandCSDrop : public Command
|
||||
|
||||
delete ci;
|
||||
|
||||
u->SendMessage(ChanServ, CHAN_DROPPED, chan.c_str());
|
||||
source.Reply(CHAN_DROPPED, chan.c_str());
|
||||
|
||||
FOREACH_MOD(I_OnChanDrop, OnChanDrop(chan));
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
User *u = source.u;
|
||||
if (u->Account() && u->Account()->IsServicesOper())
|
||||
u->SendMessage(ChanServ, CHAN_SERVADMIN_HELP_DROP);
|
||||
source.Reply(CHAN_SERVADMIN_HELP_DROP);
|
||||
else
|
||||
u->SendMessage(ChanServ, CHAN_HELP_DROP);
|
||||
source.Reply(CHAN_HELP_DROP);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "DROP", CHAN_DROP_SYNTAX);
|
||||
SyntaxError(source, "DROP", CHAN_DROP_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_DROP);
|
||||
source.Reply(CHAN_HELP_CMD_DROP);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ class CommandCSForbid : public Command
|
||||
|
||||
if (Config->ForceForbidReason && reason.empty())
|
||||
{
|
||||
SyntaxError(ChanServ, u, "FORBID", CHAN_FORBID_SYNTAX_REASON);
|
||||
SyntaxError(source, "FORBID", CHAN_FORBID_SYNTAX_REASON);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
@@ -88,27 +88,27 @@ class CommandCSForbid : public Command
|
||||
ircdproto->SendGlobops(ChanServ, "\2%s\2 used FORBID on channel \2%s\2", u->nick.c_str(), ci->name.c_str());
|
||||
Log(LOG_ADMIN, u, this, ci) << (!ci->forbidreason.empty() ? ci->forbidreason : "No reason");
|
||||
|
||||
u->SendMessage(ChanServ, CHAN_FORBID_SUCCEEDED, chan.c_str());
|
||||
source.Reply(CHAN_FORBID_SUCCEEDED, chan.c_str());
|
||||
|
||||
FOREACH_MOD(I_OnChanForbidden, OnChanForbidden(ci));
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_SERVADMIN_HELP_FORBID);
|
||||
source.Reply(CHAN_SERVADMIN_HELP_FORBID);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "FORBID", CHAN_FORBID_SYNTAX);
|
||||
SyntaxError(source, "FORBID", CHAN_FORBID_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_FORBID);
|
||||
source.Reply(CHAN_HELP_CMD_FORBID);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -43,24 +43,24 @@ class CommandCSGetKey : public Command
|
||||
bool override = !check_access(u, ci, CA_GETKEY);
|
||||
Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci);
|
||||
|
||||
u->SendMessage(ChanServ, CHAN_GETKEY_KEY, chan.c_str(), key.c_str());
|
||||
source.Reply(CHAN_GETKEY_KEY, chan.c_str(), key.c_str());
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_GETKEY);
|
||||
source.Reply(CHAN_HELP_GETKEY);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "GETKEY", CHAN_GETKEY_SYNTAX);
|
||||
SyntaxError(source, "GETKEY", CHAN_GETKEY_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_GETKEY);
|
||||
source.Reply(CHAN_HELP_CMD_GETKEY);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -24,21 +24,22 @@ class CommandCSHelp : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
mod_help_cmd(ChanServ, source.u, params[0]);
|
||||
mod_help_cmd(ChanServ, source.u, NULL, params[0]);
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP);
|
||||
User *u = source.u;
|
||||
source.Reply(CHAN_HELP);
|
||||
for (CommandMap::const_iterator it = ChanServ->Commands.begin(); it != ChanServ->Commands.end(); ++it)
|
||||
if (!Config->HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
|
||||
it->second->OnServHelp(u);
|
||||
it->second->OnServHelp(source);
|
||||
if (Config->CSExpire >= 86400)
|
||||
u->SendMessage(ChanServ, CHAN_HELP_EXPIRES, Config->CSExpire / 86400);
|
||||
source.Reply(CHAN_HELP_EXPIRES, Config->CSExpire / 86400);
|
||||
if (u->Account() && u->Account()->IsServicesOper())
|
||||
u->SendMessage(ChanServ, CHAN_SERVADMIN_HELP);
|
||||
source.Reply(CHAN_SERVADMIN_HELP);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+11
-11
@@ -58,15 +58,15 @@ class CommandCSInfo : public Command
|
||||
if (has_auspex || check_access(u, ci, CA_INFO))
|
||||
show_all = true;
|
||||
|
||||
u->SendMessage(ChanServ, CHAN_INFO_HEADER, chan.c_str());
|
||||
u->SendMessage(ChanServ, CHAN_INFO_NO_FOUNDER, ci->founder->display.c_str());
|
||||
source.Reply(CHAN_INFO_HEADER, chan.c_str());
|
||||
source.Reply(CHAN_INFO_NO_FOUNDER, ci->founder->display.c_str());
|
||||
|
||||
if (show_all && ci->successor)
|
||||
source.Reply(CHAN_INFO_NO_SUCCESSOR, ci->successor->display.c_str());
|
||||
|
||||
u->SendMessage(ChanServ, CHAN_INFO_DESCRIPTION, ci->desc.c_str());
|
||||
u->SendMessage(ChanServ, CHAN_INFO_TIME_REGGED, do_strftime(ci->time_registered).c_str());
|
||||
u->SendMessage(ChanServ, CHAN_INFO_LAST_USED, do_strftime(ci->last_used).c_str());
|
||||
source.Reply(CHAN_INFO_DESCRIPTION, ci->desc.c_str());
|
||||
source.Reply(CHAN_INFO_TIME_REGGED, do_strftime(ci->time_registered).c_str());
|
||||
source.Reply(CHAN_INFO_LAST_USED, do_strftime(ci->last_used).c_str());
|
||||
|
||||
ModeLock *secret = ci->GetMLock(CMODE_SECRET);
|
||||
if (!ci->last_topic.empty() && (show_all || ((!secret || secret->set == false) && (!ci->c || !ci->c->HasMode(CMODE_SECRET)))))
|
||||
@@ -113,21 +113,21 @@ class CommandCSInfo : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_INFO);
|
||||
source.Reply(CHAN_HELP_INFO);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "INFO", CHAN_INFO_SYNTAX);
|
||||
SyntaxError(source, "INFO", CHAN_INFO_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_INFO);
|
||||
source.Reply(CHAN_HELP_CMD_INFO);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -68,20 +68,20 @@ class CommandCSInvite : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_INVITE);
|
||||
source.Reply(CHAN_HELP_INVITE);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "INVITE", CHAN_INVITE_SYNTAX);
|
||||
SyntaxError(source, "INVITE", CHAN_INVITE_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_INVITE);
|
||||
source.Reply(CHAN_HELP_CMD_INVITE);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -58,20 +58,20 @@ class CommandCSKick : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_KICK);
|
||||
source.Reply(CHAN_HELP_KICK);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "KICK", CHAN_KICK_SYNTAX);
|
||||
SyntaxError(source, "KICK", CHAN_KICK_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_KICK);
|
||||
source.Reply(CHAN_HELP_CMD_KICK);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
|
||||
Anope::string spattern = "#" + pattern;
|
||||
|
||||
u->SendMessage(ChanServ, NICK_LIST_HEADER, pattern.c_str());
|
||||
source.Reply(NICK_LIST_HEADER, pattern.c_str());
|
||||
|
||||
for (registered_channel_map::const_iterator it = RegisteredChannelList.begin(), it_end = RegisteredChannelList.end(); it != it_end; ++it)
|
||||
{
|
||||
@@ -127,24 +127,24 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
u->SendMessage(ChanServ, CHAN_LIST_END, nchans > Config->CSListMax ? Config->CSListMax : nchans, nchans);
|
||||
source.Reply(CHAN_LIST_END, nchans > Config->CSListMax ? Config->CSListMax : nchans, nchans);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_LIST);
|
||||
source.Reply(CHAN_HELP_LIST);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "LIST", NICK_LIST_SYNTAX);
|
||||
SyntaxError(source, "LIST", NICK_LIST_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_LIST);
|
||||
source.Reply(CHAN_HELP_CMD_LIST);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ class CommandCSMode : public Command
|
||||
}
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(u, subcommand);
|
||||
this->OnSyntaxError(source, subcommand);
|
||||
}
|
||||
|
||||
void DoSet(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
@@ -273,25 +273,25 @@ class CommandCSMode : public Command
|
||||
else if (subcommand.equals_ci("SET"))
|
||||
this->DoSet(source, params);
|
||||
else
|
||||
this->OnSyntaxError(u, "");
|
||||
this->OnSyntaxError(source, "");
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_MODE);
|
||||
source.Reply(CHAN_HELP_MODE);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "MODE", CHAN_MODE_SYNTAX);
|
||||
SyntaxError(source, "MODE", CHAN_MODE_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_MODE);
|
||||
source.Reply(CHAN_HELP_CMD_MODE);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+79
-88
@@ -14,7 +14,7 @@
|
||||
#include "module.h"
|
||||
|
||||
/** do_util: not a command, but does the job of others
|
||||
* @param u The user doing the command
|
||||
* @param source The source of the command
|
||||
* @param com The command calling this function
|
||||
* @param cm A channel mode class
|
||||
* @param chan The channel its being set on
|
||||
@@ -25,8 +25,9 @@
|
||||
* @param name The name, eg "OP" or "HALFOP"
|
||||
* @param notice Flag required on a channel to send a notice
|
||||
*/
|
||||
static CommandReturn do_util(User *u, Command *com, ChannelMode *cm, const Anope::string &chan, const Anope::string &nick, bool set, int level, int levelself, const Anope::string &name, ChannelInfoFlag notice)
|
||||
static CommandReturn do_util(CommandSource &source, Command *com, ChannelMode *cm, const Anope::string &chan, const Anope::string &nick, bool set, int level, int levelself, const Anope::string &name, ChannelInfoFlag notice)
|
||||
{
|
||||
User *u = source.u;
|
||||
Channel *c = findchan(chan);
|
||||
ChannelInfo *ci = c ? c->ci : NULL;
|
||||
User *u2;
|
||||
@@ -35,17 +36,17 @@ static CommandReturn do_util(User *u, Command *com, ChannelMode *cm, const Anope
|
||||
bool is_same = u->nick.equals_ci(realnick);
|
||||
|
||||
if (!c)
|
||||
u->SendMessage(ChanServ, CHAN_X_NOT_IN_USE, chan.c_str());
|
||||
source.Reply(CHAN_X_NOT_IN_USE, chan.c_str());
|
||||
else if (is_same ? !(u2 = u) : !(u2 = finduser(realnick)))
|
||||
u->SendMessage(ChanServ, NICK_X_NOT_IN_USE, realnick.c_str());
|
||||
source.Reply(NICK_X_NOT_IN_USE, realnick.c_str());
|
||||
else if (is_same ? !check_access(u, ci, levelself) : !check_access(u, ci, level))
|
||||
u->SendMessage(ChanServ, ACCESS_DENIED);
|
||||
source.Reply(ACCESS_DENIED);
|
||||
else if (!set && !is_same && (ci->HasFlag(CI_PEACE)) && (get_access(u2, ci) >= get_access(u, ci)))
|
||||
u->SendMessage(ChanServ, ACCESS_DENIED);
|
||||
source.Reply(ACCESS_DENIED);
|
||||
else if (!set && u2->IsProtected() && !is_same)
|
||||
u->SendMessage(ChanServ, ACCESS_DENIED);
|
||||
source.Reply(ACCESS_DENIED);
|
||||
else if (!c->FindUser(u2))
|
||||
u->SendMessage(ChanServ, NICK_X_NOT_ON_CHAN, u2->nick.c_str(), c->name.c_str());
|
||||
source.Reply(NICK_X_NOT_ON_CHAN, u2->nick.c_str(), c->name.c_str());
|
||||
else
|
||||
{
|
||||
if (set)
|
||||
@@ -70,26 +71,25 @@ class CommandCSOp : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
ChannelMode *cm = ModeManager::FindChannelModeByName(CMODE_OP);
|
||||
|
||||
return do_util(u, this, cm, params[0], params.size() > 1 ? params[1] : "", true, CA_OPDEOP, CA_OPDEOPME, "OP", CI_OPNOTICE);
|
||||
return do_util(source, this, cm, params[0], params.size() > 1 ? params[1] : "", true, CA_OPDEOP, CA_OPDEOPME, "OP", CI_OPNOTICE);
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_OP);
|
||||
source.Reply(CHAN_HELP_OP);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "OP", CHAN_OP_SYNTAX);
|
||||
SyntaxError(source, "OP", CHAN_OP_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_OP);
|
||||
source.Reply(CHAN_HELP_CMD_OP);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -102,26 +102,25 @@ class CommandCSDeOp : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
ChannelMode *cm = ModeManager::FindChannelModeByName(CMODE_OP);
|
||||
|
||||
return do_util(u, this, cm, params[0], params.size() > 1 ? params[1] : "", false, CA_OPDEOP, CA_OPDEOPME, "DEOP", CI_OPNOTICE);
|
||||
return do_util(source, this, cm, params[0], params.size() > 1 ? params[1] : "", false, CA_OPDEOP, CA_OPDEOPME, "DEOP", CI_OPNOTICE);
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_DEOP);
|
||||
source.Reply(CHAN_HELP_DEOP);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "DEOP", CHAN_DEOP_SYNTAX);
|
||||
SyntaxError(source, "DEOP", CHAN_DEOP_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_DEOP);
|
||||
source.Reply(CHAN_HELP_CMD_DEOP);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -134,26 +133,25 @@ class CommandCSVoice : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
ChannelMode *cm = ModeManager::FindChannelModeByName(CMODE_VOICE);
|
||||
|
||||
return do_util(u, this, cm, params[0], params.size() > 1 ? params[1] : "", true, CA_VOICE, CA_VOICEME, "VOICE", CI_BEGIN);
|
||||
return do_util(source, this, cm, params[0], params.size() > 1 ? params[1] : "", true, CA_VOICE, CA_VOICEME, "VOICE", CI_BEGIN);
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_VOICE);
|
||||
source.Reply(CHAN_HELP_VOICE);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "VOICE", CHAN_VOICE_SYNTAX);
|
||||
SyntaxError(source, "VOICE", CHAN_VOICE_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_VOICE);
|
||||
source.Reply(CHAN_HELP_CMD_VOICE);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -166,26 +164,25 @@ class CommandCSDeVoice : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
ChannelMode *cm = ModeManager::FindChannelModeByName(CMODE_VOICE);
|
||||
|
||||
return do_util(u, this, cm, params[0], params.size() > 1 ? params[1] : "", false, CA_VOICE, CA_VOICEME, "DEVOICE", CI_BEGIN);
|
||||
return do_util(source, this, cm, params[0], params.size() > 1 ? params[1] : "", false, CA_VOICE, CA_VOICEME, "DEVOICE", CI_BEGIN);
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_DEVOICE);
|
||||
source.Reply(CHAN_HELP_DEVOICE);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "DEVOICE", CHAN_DEVOICE_SYNTAX);
|
||||
SyntaxError(source, "DEVOICE", CHAN_DEVOICE_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_DEVOICE);
|
||||
source.Reply(CHAN_HELP_CMD_DEVOICE);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -198,29 +195,28 @@ class CommandCSHalfOp : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
ChannelMode *cm = ModeManager::FindChannelModeByName(CMODE_HALFOP);
|
||||
|
||||
if (!cm)
|
||||
return MOD_CONT;
|
||||
|
||||
return do_util(u, this, cm, params[0], params.size() > 1 ? params[1] : "", true, CA_HALFOP, CA_HALFOPME, "HALFOP", CI_BEGIN);
|
||||
return do_util(source, this, cm, params[0], params.size() > 1 ? params[1] : "", true, CA_HALFOP, CA_HALFOPME, "HALFOP", CI_BEGIN);
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_HALFOP);
|
||||
source.Reply(CHAN_HELP_HALFOP);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "HALFOP", CHAN_HALFOP_SYNTAX);
|
||||
SyntaxError(source, "HALFOP", CHAN_HALFOP_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_HALFOP);
|
||||
source.Reply(CHAN_HELP_CMD_HALFOP);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -233,29 +229,28 @@ class CommandCSDeHalfOp : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
ChannelMode *cm = ModeManager::FindChannelModeByName(CMODE_HALFOP);
|
||||
|
||||
if (!cm)
|
||||
return MOD_CONT;
|
||||
|
||||
return do_util(u, this, cm, params[0], params.size() > 1 ? params[1] : "", false, CA_HALFOP, CA_HALFOPME, "DEHALFOP", CI_BEGIN);
|
||||
return do_util(source, this, cm, params[0], params.size() > 1 ? params[1] : "", false, CA_HALFOP, CA_HALFOPME, "DEHALFOP", CI_BEGIN);
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_DEHALFOP);
|
||||
source.Reply(CHAN_HELP_DEHALFOP);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "DEHALFOP", CHAN_DEHALFOP_SYNTAX);
|
||||
SyntaxError(source, "DEHALFOP", CHAN_DEHALFOP_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_DEHALFOP);
|
||||
source.Reply(CHAN_HELP_CMD_DEHALFOP);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -268,29 +263,28 @@ class CommandCSProtect : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
ChannelMode *cm = ModeManager::FindChannelModeByName(CMODE_PROTECT);
|
||||
|
||||
if (!cm)
|
||||
return MOD_CONT;
|
||||
|
||||
return do_util(u, this, cm, params[0], params.size() > 1 ? params[1] : "", true, CA_PROTECT, CA_PROTECTME, "PROTECT", CI_BEGIN);
|
||||
return do_util(source, this, cm, params[0], params.size() > 1 ? params[1] : "", true, CA_PROTECT, CA_PROTECTME, "PROTECT", CI_BEGIN);
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_PROTECT);
|
||||
source.Reply(CHAN_HELP_PROTECT);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "PROTECT", CHAN_PROTECT_SYNTAX);
|
||||
SyntaxError(source, "PROTECT", CHAN_PROTECT_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_PROTECT);
|
||||
source.Reply(CHAN_HELP_CMD_PROTECT);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -303,29 +297,28 @@ class CommandCSDeProtect : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
ChannelMode *cm = ModeManager::FindChannelModeByName(CMODE_PROTECT);
|
||||
|
||||
if (!cm)
|
||||
return MOD_CONT;
|
||||
|
||||
return do_util(u, this, cm, params[0], params.size() > 1 ? params[1] : "", false, CA_PROTECT, CA_PROTECTME, "DEPROTECT", CI_BEGIN);
|
||||
return do_util(source, this, cm, params[0], params.size() > 1 ? params[1] : "", false, CA_PROTECT, CA_PROTECTME, "DEPROTECT", CI_BEGIN);
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_DEPROTECT);
|
||||
source.Reply(CHAN_HELP_DEPROTECT);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "DEPROTECT", CHAN_DEPROTECT_SYNTAX);
|
||||
SyntaxError(source, "DEPROTECT", CHAN_DEPROTECT_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_DEPROTECT);
|
||||
source.Reply(CHAN_HELP_CMD_DEPROTECT);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -338,29 +331,28 @@ class CommandCSOwner : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
ChannelMode *cm = ModeManager::FindChannelModeByName(CMODE_OWNER);
|
||||
|
||||
if (!cm)
|
||||
return MOD_CONT;
|
||||
|
||||
return do_util(u, this, cm, params[0], params.size() > 1 ? params[1] : "", true, CA_OWNER, CA_OWNERME, "OWNER", CI_BEGIN);
|
||||
return do_util(source, this, cm, params[0], params.size() > 1 ? params[1] : "", true, CA_OWNER, CA_OWNERME, "OWNER", CI_BEGIN);
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_OWNER);
|
||||
source.Reply(CHAN_HELP_OWNER);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "OWNER", CHAN_OWNER_SYNTAX);
|
||||
SyntaxError(source, "OWNER", CHAN_OWNER_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_OWNER);
|
||||
source.Reply(CHAN_HELP_CMD_OWNER);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -373,29 +365,28 @@ class CommandCSDeOwner : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
ChannelMode *cm = ModeManager::FindChannelModeByName(CMODE_OWNER);
|
||||
|
||||
if (!cm)
|
||||
return MOD_CONT;
|
||||
|
||||
return do_util(u, this, cm, params[0], params.size() > 1 ? params[1] : "", false, CA_OWNER, CA_OWNERME, "DEOWNER", CI_BEGIN);
|
||||
return do_util(source, this, cm, params[0], params.size() > 1 ? params[1] : "", false, CA_OWNER, CA_OWNERME, "DEOWNER", CI_BEGIN);
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_DEOWNER);
|
||||
source.Reply(CHAN_HELP_DEOWNER);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "DEOWNER", CHAN_DEOWNER_SYNTAX);
|
||||
SyntaxError(source, "DEOWNER", CHAN_DEOWNER_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_DEOWNER);
|
||||
source.Reply(CHAN_HELP_CMD_DEOWNER);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -96,15 +96,15 @@ class CommandCSRegister : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_REGISTER, Config->s_ChanServ.c_str());
|
||||
source.Reply(CHAN_HELP_REGISTER, Config->s_ChanServ.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "REGISTER", CHAN_REGISTER_SYNTAX);
|
||||
SyntaxError(source, "REGISTER", CHAN_REGISTER_SYNTAX);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -65,14 +65,14 @@ class CommandCSSASet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
if (subcommand.empty())
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SASET_HEAD);
|
||||
source.Reply(CHAN_HELP_SASET_HEAD);
|
||||
for (subcommand_map::iterator it = this->subcommands.begin(), it_end = this->subcommands.end(); it != it_end; ++it)
|
||||
it->second->OnServHelp(u);
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SASET_TAIL);
|
||||
it->second->OnServHelp(source);
|
||||
source.Reply(CHAN_HELP_SASET_TAIL);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -80,20 +80,20 @@ class CommandCSSASet : public Command
|
||||
Command *c = this->FindCommand(subcommand);
|
||||
|
||||
if (c)
|
||||
return c->OnHelp(u, subcommand);
|
||||
return c->OnHelp(source, subcommand);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SASET", CHAN_SASET_SYNTAX);
|
||||
SyntaxError(source, "SASET", CHAN_SASET_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_SASET);
|
||||
source.Reply(CHAN_HELP_CMD_SASET);
|
||||
}
|
||||
|
||||
bool AddSubcommand(Command *c)
|
||||
|
||||
@@ -22,7 +22,6 @@ class CommandCSSASetNoexpire : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
ChannelInfo *ci = source.ci;
|
||||
if (!ci)
|
||||
throw CoreException("NULL ci in CommandCSSASetNoexpire");
|
||||
@@ -38,25 +37,25 @@ class CommandCSSASetNoexpire : public Command
|
||||
source.Reply(CHAN_SET_NOEXPIRE_OFF, ci->name.c_str());
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(u, "NOEXPIRE");
|
||||
this->OnSyntaxError(source, "NOEXPIRE");
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_SERVADMIN_HELP_SET_NOEXPIRE);
|
||||
source.Reply(CHAN_SERVADMIN_HELP_SET_NOEXPIRE);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SET NOEXPIRE", CHAN_SET_NOEXPIRE_SYNTAX);
|
||||
SyntaxError(source, "SET NOEXPIRE", CHAN_SET_NOEXPIRE_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_SET_NOEXPIRE);
|
||||
source.Reply(CHAN_HELP_CMD_SET_NOEXPIRE);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -69,14 +69,14 @@ class CommandCSSet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
if (subcommand.empty())
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_HEAD);
|
||||
source.Reply(CHAN_HELP_SET_HEAD);
|
||||
for (subcommand_map::iterator it = this->subcommands.begin(), it_end = this->subcommands.end(); it != it_end; ++it)
|
||||
it->second->OnServHelp(u);
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_TAIL);
|
||||
it->second->OnServHelp(source);
|
||||
source.Reply(CHAN_HELP_SET_TAIL);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -84,20 +84,20 @@ class CommandCSSet : public Command
|
||||
Command *c = this->FindCommand(subcommand);
|
||||
|
||||
if (c)
|
||||
return c->OnHelp(u, subcommand);
|
||||
return c->OnHelp(source, subcommand);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SET", CHAN_SET_SYNTAX);
|
||||
SyntaxError(source, "SET", CHAN_SET_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_SET);
|
||||
source.Reply(CHAN_HELP_CMD_SET);
|
||||
}
|
||||
|
||||
bool AddSubcommand(Command *c)
|
||||
|
||||
@@ -41,21 +41,21 @@ class CommandCSSetBanType : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_BANTYPE, "SET");
|
||||
source.Reply(CHAN_HELP_SET_BANTYPE, "SET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
// XXX
|
||||
SyntaxError(ChanServ, u, "SET", CHAN_SET_SYNTAX);
|
||||
SyntaxError(source, "SET", CHAN_SET_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_SET_BANTYPE);
|
||||
source.Reply(CHAN_HELP_CMD_SET_BANTYPE);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -66,16 +66,16 @@ class CommandCSSASetBanType : public CommandCSSetBanType
|
||||
{
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_BANTYPE, "SASET");
|
||||
source.Reply(CHAN_HELP_SET_BANTYPE, "SASET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
// XXX
|
||||
SyntaxError(ChanServ, u, "SASET", CHAN_SASET_SYNTAX);
|
||||
SyntaxError(source, "SASET", CHAN_SASET_SYNTAX);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -22,33 +22,32 @@ class CommandCSSetDescription : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
ChannelInfo *ci = source.ci;
|
||||
if (!ci)
|
||||
throw CoreException("NULL ci in CommandCSSetDescription");
|
||||
|
||||
ci->desc = params[1];
|
||||
|
||||
u->SendMessage(ChanServ, CHAN_DESC_CHANGED, ci->name.c_str(), ci->desc.c_str());
|
||||
source.Reply(CHAN_DESC_CHANGED, ci->name.c_str(), ci->desc.c_str());
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_DESC, "SET");
|
||||
source.Reply(CHAN_HELP_SET_DESC, "SET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
// XXX
|
||||
SyntaxError(ChanServ, u, "SET", CHAN_SET_SYNTAX);
|
||||
SyntaxError(source, "SET", CHAN_SET_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_SET_DESC);
|
||||
source.Reply(CHAN_HELP_CMD_SET_DESC);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -59,16 +58,16 @@ class CommandCSSASetDescription : public CommandCSSetDescription
|
||||
{
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_DESC, "SASET");
|
||||
source.Reply(CHAN_HELP_SET_DESC, "SASET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
// XXX
|
||||
SyntaxError(ChanServ, u, "SASET", CHAN_SASET_SYNTAX);
|
||||
SyntaxError(source, "SASET", CHAN_SASET_SYNTAX);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -64,26 +64,26 @@ class CommandCSSetFounder : public Command
|
||||
ci->founder = nc;
|
||||
++nc->channelcount;
|
||||
|
||||
u->SendMessage(ChanServ, CHAN_FOUNDER_CHANGED, ci->name.c_str(), na->nick.c_str());
|
||||
source.Reply(CHAN_FOUNDER_CHANGED, ci->name.c_str(), na->nick.c_str());
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_FOUNDER, "SET");
|
||||
source.Reply(CHAN_HELP_SET_FOUNDER, "SET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
// XXX
|
||||
SyntaxError(ChanServ, u, "SET", CHAN_SET_SYNTAX);
|
||||
SyntaxError(source, "SET", CHAN_SET_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_SET_FOUNDER);
|
||||
source.Reply(CHAN_HELP_CMD_SET_FOUNDER);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -94,16 +94,16 @@ class CommandCSSASetFounder : public CommandCSSetFounder
|
||||
{
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_FOUNDER, "SASET");
|
||||
source.Reply(CHAN_HELP_SET_FOUNDER, "SASET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
// XXX
|
||||
SyntaxError(ChanServ, u, "SASET", CHAN_SASET_SYNTAX);
|
||||
SyntaxError(source, "SASET", CHAN_SASET_SYNTAX);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ class CommandCSSetKeepTopic : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
ChannelInfo *ci = source.ci;
|
||||
if (!ci)
|
||||
throw CoreException("NULL ci in CommandCSSetKeepTopic");
|
||||
@@ -38,25 +37,25 @@ class CommandCSSetKeepTopic : public Command
|
||||
source.Reply(CHAN_SET_KEEPTOPIC_OFF, ci->name.c_str());
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(u, "KEEPTOPIC");
|
||||
this->OnSyntaxError(source, "KEEPTOPIC");
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_KEEPTOPIC, "SET");
|
||||
source.Reply(CHAN_HELP_SET_KEEPTOPIC, "SET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SET KEEPTOPIC", CHAN_SET_KEEPTOPIC_SYNTAX);
|
||||
SyntaxError(source, "SET KEEPTOPIC", CHAN_SET_KEEPTOPIC_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_SET_KEEPTOPIC);
|
||||
source.Reply(CHAN_HELP_CMD_SET_KEEPTOPIC);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -67,15 +66,15 @@ class CommandCSSASetKeepTopic : public CommandCSSetKeepTopic
|
||||
{
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_KEEPTOPIC, "SASET");
|
||||
source.Reply(CHAN_HELP_SET_KEEPTOPIC, "SASET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SET KEEPTOPIC", CHAN_SASET_KEEPTOPIC_SYNTAX);
|
||||
SyntaxError(source, "SET KEEPTOPIC", CHAN_SASET_KEEPTOPIC_SYNTAX);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ class CommandCSSetOpNotice : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
ChannelInfo *ci = source.ci;
|
||||
if (!ci)
|
||||
throw CoreException("NULL ci in CommandCSSetOpNotice");
|
||||
@@ -38,25 +37,25 @@ class CommandCSSetOpNotice : public Command
|
||||
source.Reply(CHAN_SET_OPNOTICE_OFF, ci->name.c_str());
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(u, "OPNOTICE");
|
||||
this->OnSyntaxError(source, "OPNOTICE");
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_OPNOTICE, "SET");
|
||||
source.Reply(CHAN_HELP_SET_OPNOTICE, "SET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SET OPNOTICE", CHAN_SET_OPNOTICE_SYNTAX);
|
||||
SyntaxError(source, "SET OPNOTICE", CHAN_SET_OPNOTICE_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_SET_OPNOTICE);
|
||||
source.Reply(CHAN_HELP_CMD_SET_OPNOTICE);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -67,15 +66,15 @@ class CommandCSSASetOpNotice : public CommandCSSetOpNotice
|
||||
{
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_OPNOTICE, "SASET");
|
||||
source.Reply(CHAN_HELP_SET_OPNOTICE, "SASET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SET OPNOTICE", CHAN_SASET_OPNOTICE_SYNTAX);
|
||||
SyntaxError(source, "SET OPNOTICE", CHAN_SASET_OPNOTICE_SYNTAX);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ class CommandCSSetPeace : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
ChannelInfo *ci = source.ci;
|
||||
if (!ci)
|
||||
throw CoreException("NULL ci in CommandCSSetPeace");
|
||||
@@ -38,25 +37,25 @@ class CommandCSSetPeace : public Command
|
||||
source.Reply(CHAN_SET_PEACE_OFF, ci->name.c_str());
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(u, "PEACE");
|
||||
this->OnSyntaxError(source, "PEACE");
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_PEACE, "SET");
|
||||
source.Reply(CHAN_HELP_SET_PEACE, "SET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SET PEACE", CHAN_SET_PEACE_SYNTAX);
|
||||
SyntaxError(source, "SET PEACE", CHAN_SET_PEACE_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_SET_PEACE, "SET");
|
||||
source.Reply(CHAN_HELP_CMD_SET_PEACE, "SET");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -67,15 +66,15 @@ class CommandCSSASetPeace : public CommandCSSetPeace
|
||||
{
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_PEACE, "SASET");
|
||||
source.Reply(CHAN_HELP_SET_PEACE, "SASET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SASET PEACE", CHAN_SASET_PEACE_SYNTAX);
|
||||
SyntaxError(source, "SASET PEACE", CHAN_SASET_PEACE_SYNTAX);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ class CommandCSSetPersist : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
ChannelInfo *ci = source.ci;
|
||||
if (!ci)
|
||||
throw CoreException("NULL ci in CommandCSSetPersist");
|
||||
@@ -96,25 +95,25 @@ class CommandCSSetPersist : public Command
|
||||
source.Reply(CHAN_SET_PERSIST_OFF, ci->name.c_str());
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(u, "PERSIST");
|
||||
this->OnSyntaxError(source, "PERSIST");
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_PERSIST, "SET");
|
||||
source.Reply(CHAN_HELP_SET_PERSIST, "SET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SET PERSIST", CHAN_SET_PERSIST_SYNTAX);
|
||||
SyntaxError(source, "SET PERSIST", CHAN_SET_PERSIST_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_SET_PERSIST);
|
||||
source.Reply(CHAN_HELP_CMD_SET_PERSIST);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -125,15 +124,15 @@ class CommandCSSASetPersist : public CommandCSSetPersist
|
||||
{
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_PERSIST, "SASET");
|
||||
source.Reply(CHAN_HELP_SET_PERSIST, "SASET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SASET PERSIST", CHAN_SASET_PERSIST_SYNTAX);
|
||||
SyntaxError(source, "SASET PERSIST", CHAN_SASET_PERSIST_SYNTAX);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ class CommandCSSetPrivate : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
ChannelInfo *ci = source.ci;
|
||||
if (!ci)
|
||||
throw CoreException("NULL ci in CommandCSSetPrivate");
|
||||
@@ -38,25 +37,25 @@ class CommandCSSetPrivate : public Command
|
||||
source.Reply(CHAN_SET_PRIVATE_OFF, ci->name.c_str());
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(u, "PRIVATE");
|
||||
this->OnSyntaxError(source, "PRIVATE");
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_PRIVATE, "SASET");
|
||||
source.Reply(CHAN_HELP_SET_PRIVATE, "SASET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SET PRIVATE", CHAN_SET_PRIVATE_SYNTAX);
|
||||
SyntaxError(source, "SET PRIVATE", CHAN_SET_PRIVATE_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_SET_PRIVATE);
|
||||
source.Reply(CHAN_HELP_CMD_SET_PRIVATE);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -67,15 +66,15 @@ class CommandCSSASetPrivate : public CommandCSSetPrivate
|
||||
{
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_PRIVATE, "SASET");
|
||||
source.Reply(CHAN_HELP_SET_PRIVATE, "SASET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SASET PRIVATE", CHAN_SASET_PRIVATE_SYNTAX);
|
||||
SyntaxError(source, "SASET PRIVATE", CHAN_SASET_PRIVATE_SYNTAX);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ class CommandCSSetRestricted : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
ChannelInfo *ci = source.ci;
|
||||
if (!ci)
|
||||
throw CoreException("NULL ci in CommandCSSetRestricted");
|
||||
@@ -41,25 +40,25 @@ class CommandCSSetRestricted : public Command
|
||||
source.Reply(CHAN_SET_RESTRICTED_OFF, ci->name.c_str());
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(u, "RESTRICTED");
|
||||
this->OnSyntaxError(source, "RESTRICTED");
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_RESTRICTED, "SET");
|
||||
source.Reply(CHAN_HELP_SET_RESTRICTED, "SET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SET RESTRICTED", CHAN_SET_RESTRICTED_SYNTAX);
|
||||
SyntaxError(source, "SET RESTRICTED", CHAN_SET_RESTRICTED_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_SET_RESTRICTED);
|
||||
source.Reply(CHAN_HELP_CMD_SET_RESTRICTED);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -70,15 +69,15 @@ class CommandCSSASetRestricted : public CommandCSSetRestricted
|
||||
{
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_RESTRICTED, "SASET");
|
||||
source.Reply(CHAN_HELP_SET_RESTRICTED, "SASET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SASET RESTRICTED", CHAN_SASET_RESTRICTED_SYNTAX);
|
||||
SyntaxError(source, "SASET RESTRICTED", CHAN_SASET_RESTRICTED_SYNTAX);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ class CommandCSSetSecure : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
ChannelInfo *ci = source.ci;
|
||||
if (!ci)
|
||||
throw CoreException("NULL ci in CommandCSSetSecure");
|
||||
@@ -38,25 +37,25 @@ class CommandCSSetSecure : public Command
|
||||
source.Reply(CHAN_SET_SECURE_OFF, ci->name.c_str());
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(u, "SECURE");
|
||||
this->OnSyntaxError(source, "SECURE");
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_SECURE, "SET", Config->s_NickServ.c_str());
|
||||
source.Reply(CHAN_HELP_SET_SECURE, "SET", Config->s_NickServ.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SET SECURE", CHAN_SET_SECURE_SYNTAX);
|
||||
SyntaxError(source, "SET SECURE", CHAN_SET_SECURE_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_SET_SECURE);
|
||||
source.Reply(CHAN_HELP_CMD_SET_SECURE);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -67,15 +66,15 @@ class CommandCSSASetSecure : public CommandCSSetSecure
|
||||
{
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_SECURE, "SASET", Config->s_NickServ.c_str());
|
||||
source.Reply(CHAN_HELP_SET_SECURE, "SASET", Config->s_NickServ.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SASET SECURE", CHAN_SASET_SECURE_SYNTAX);
|
||||
SyntaxError(source, "SASET SECURE", CHAN_SASET_SECURE_SYNTAX);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -44,25 +44,25 @@ class CommandCSSetSecureFounder : public Command
|
||||
source.Reply(CHAN_SET_SECUREFOUNDER_OFF, ci->name.c_str());
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(u, "SECUREFOUNDER");
|
||||
this->OnSyntaxError(source, "SECUREFOUNDER");
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_SECUREFOUNDER, "SET");
|
||||
source.Reply(CHAN_HELP_SET_SECUREFOUNDER, "SET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SET SECUREFOUNDER", CHAN_SET_SECUREFOUNDER_SYNTAX);
|
||||
SyntaxError(source, "SET SECUREFOUNDER", CHAN_SET_SECUREFOUNDER_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_SET_SECUREFOUNDER);
|
||||
source.Reply(CHAN_HELP_CMD_SET_SECUREFOUNDER);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -73,15 +73,15 @@ class CommandCSSASetSecureFounder : public CommandCSSetSecureFounder
|
||||
{
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_SECUREFOUNDER, "SASET");
|
||||
source.Reply(CHAN_HELP_SET_SECUREFOUNDER, "SASET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SASET SECUREFOUNDER", CHAN_SASET_SECUREFOUNDER_SYNTAX);
|
||||
SyntaxError(source, "SASET SECUREFOUNDER", CHAN_SASET_SECUREFOUNDER_SYNTAX);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ class CommandCSSetSecureOps : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
ChannelInfo *ci = source.ci;
|
||||
if (!ci)
|
||||
throw CoreException("NULL ci in CommandCSSetSecureIos");
|
||||
@@ -38,25 +37,25 @@ class CommandCSSetSecureOps : public Command
|
||||
source.Reply(CHAN_SET_SECUREOPS_OFF, ci->name.c_str());
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(u, "SECUREOPS");
|
||||
this->OnSyntaxError(source, "SECUREOPS");
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_SECUREOPS, "SET");
|
||||
source.Reply(CHAN_HELP_SET_SECUREOPS, "SET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SET SECUREOPS", CHAN_SET_SECUREOPS_SYNTAX);
|
||||
SyntaxError(source, "SET SECUREOPS", CHAN_SET_SECUREOPS_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_SET_SECUREOPS);
|
||||
source.Reply(CHAN_HELP_CMD_SET_SECUREOPS);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -67,15 +66,15 @@ class CommandCSSASetSecureOps : public CommandCSSetSecureOps
|
||||
{
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_SECUREOPS, "SASET");
|
||||
source.Reply(CHAN_HELP_SET_SECUREOPS, "SASET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SASET SECUREOPS", CHAN_SASET_SECUREOPS_SYNTAX);
|
||||
SyntaxError(source, "SASET SECUREOPS", CHAN_SASET_SECUREOPS_SYNTAX);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ class CommandCSSetSignKick : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
ChannelInfo *ci = source.ci;
|
||||
if (!ci)
|
||||
throw CoreException("NULL ci in CommandCSSetSignKick");
|
||||
@@ -46,25 +45,25 @@ class CommandCSSetSignKick : public Command
|
||||
source.Reply(CHAN_SET_SIGNKICK_OFF, ci->name.c_str());
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(u, "SIGNKICK");
|
||||
this->OnSyntaxError(source, "SIGNKICK");
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_SIGNKICK, "SET");
|
||||
source.Reply(CHAN_HELP_SET_SIGNKICK, "SET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SET SIGNKICK", CHAN_SET_SIGNKICK_SYNTAX);
|
||||
SyntaxError(source, "SET SIGNKICK", CHAN_SET_SIGNKICK_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_SET_SIGNKICK);
|
||||
source.Reply(CHAN_HELP_CMD_SET_SIGNKICK);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -75,15 +74,15 @@ class CommandCSSASetSignKick : public CommandCSSetSignKick
|
||||
{
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_SIGNKICK, "SASET");
|
||||
source.Reply(CHAN_HELP_SET_SIGNKICK, "SASET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SASET SIGNKICK", CHAN_SASET_SIGNKICK_SYNTAX);
|
||||
SyntaxError(source, "SASET SIGNKICK", CHAN_SASET_SIGNKICK_SYNTAX);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -71,21 +71,21 @@ class CommandCSSetSuccessor : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_SUCCESSOR, "SET");
|
||||
source.Reply(CHAN_HELP_SET_SUCCESSOR, "SET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
// XXX
|
||||
SyntaxError(ChanServ, u, "SET", CHAN_SET_SYNTAX);
|
||||
SyntaxError(source, "SET", CHAN_SET_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_SET_SUCCESSOR);
|
||||
source.Reply(CHAN_HELP_CMD_SET_SUCCESSOR);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -96,16 +96,16 @@ class CommandCSSASetSuccessor : public CommandCSSetSuccessor
|
||||
{
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_SUCCESSOR, "SASET");
|
||||
source.Reply(CHAN_HELP_SET_SUCCESSOR, "SASET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
// XXX
|
||||
SyntaxError(ChanServ, u, "SASET", CHAN_SASET_SYNTAX);
|
||||
SyntaxError(source, "SASET", CHAN_SASET_SYNTAX);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ class CommandCSSetTopicLock : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
ChannelInfo *ci = source.ci;
|
||||
if (!ci)
|
||||
throw CoreException("NULL ci in CommandCSSetTopicLock");
|
||||
@@ -38,25 +37,25 @@ class CommandCSSetTopicLock : public Command
|
||||
source.Reply(CHAN_SET_TOPICLOCK_OFF, ci->name.c_str());
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(u, "TOPICLOCK");
|
||||
this->OnSyntaxError(source, "TOPICLOCK");
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_TOPICLOCK, "SET");
|
||||
source.Reply(CHAN_HELP_SET_TOPICLOCK, "SET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SET", CHAN_SET_TOPICLOCK_SYNTAX);;
|
||||
SyntaxError(source, "SET", CHAN_SET_TOPICLOCK_SYNTAX);;
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_SET_TOPICLOCK);
|
||||
source.Reply(CHAN_HELP_CMD_SET_TOPICLOCK);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -67,15 +66,15 @@ class CommandCSSASetTopicLock : public CommandCSSetTopicLock
|
||||
{
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_TOPICLOCK, "SASET");
|
||||
source.Reply(CHAN_HELP_SET_TOPICLOCK, "SASET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SASET", CHAN_SASET_TOPICLOCK_SYNTAX);
|
||||
SyntaxError(source, "SASET", CHAN_SASET_TOPICLOCK_SYNTAX);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+11
-11
@@ -77,25 +77,25 @@ class CommandCSSetXOP : public Command
|
||||
source.Reply(CHAN_SET_XOP_OFF, ci->name.c_str());
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(u, "XOP");
|
||||
this->OnSyntaxError(source, "XOP");
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_XOP, "SET");
|
||||
source.Reply(CHAN_HELP_SET_XOP, "SET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SET XOP", CHAN_SET_XOP_SYNTAX);
|
||||
SyntaxError(source, "SET XOP", CHAN_SET_XOP_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_SET_XOP);
|
||||
source.Reply(CHAN_HELP_CMD_SET_XOP);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -106,15 +106,15 @@ class CommandCSSASetXOP : public CommandCSSetXOP
|
||||
{
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SET_XOP, "SASET");
|
||||
source.Reply(CHAN_HELP_SET_XOP, "SASET");
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SASET XOP", CHAN_SASET_XOP_SYNTAX);
|
||||
SyntaxError(source, "SASET XOP", CHAN_SASET_XOP_SYNTAX);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ class CommandCSStatus : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
ChannelInfo *ci = source.ci;
|
||||
const Anope::string &nick = params[1];
|
||||
|
||||
@@ -34,20 +33,20 @@ class CommandCSStatus : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_SERVADMIN_HELP_STATUS);
|
||||
source.Reply(CHAN_SERVADMIN_HELP_STATUS);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "STATUS", CHAN_STATUS_SYNTAX);
|
||||
SyntaxError(source, "STATUS", CHAN_STATUS_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_STATUS);
|
||||
source.Reply(CHAN_HELP_CMD_STATUS);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+15
-15
@@ -31,7 +31,7 @@ class CommandCSSuspend : public Command
|
||||
/* Assumes that permission checking has already been done. */
|
||||
if (Config->ForceForbidReason && reason.empty())
|
||||
{
|
||||
this->OnSyntaxError(u, "");
|
||||
this->OnSyntaxError(source, "");
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
@@ -67,27 +67,27 @@ class CommandCSSuspend : public Command
|
||||
ircdproto->SendGlobops(ChanServ, "\2%s\2 used SUSPEND on channel \2%s\2", u->nick.c_str(), ci->name.c_str());
|
||||
|
||||
Log(LOG_ADMIN, u, this, ci) << (!reason.empty() ? reason : "No reason");
|
||||
u->SendMessage(ChanServ, CHAN_SUSPEND_SUCCEEDED, ci->name.c_str());
|
||||
source.Reply(CHAN_SUSPEND_SUCCEEDED, ci->name.c_str());
|
||||
|
||||
FOREACH_MOD(I_OnChanSuspend, OnChanSuspend(ci));
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_SERVADMIN_HELP_SUSPEND);
|
||||
source.Reply(CHAN_SERVADMIN_HELP_SUSPEND);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SUSPEND", Config->ForceForbidReason ? CHAN_SUSPEND_SYNTAX_REASON : CHAN_SUSPEND_SYNTAX);
|
||||
SyntaxError(source, "SUSPEND", Config->ForceForbidReason ? CHAN_SUSPEND_SYNTAX_REASON : CHAN_SUSPEND_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_SUSPEND);
|
||||
source.Reply(CHAN_HELP_CMD_SUSPEND);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -123,27 +123,27 @@ class CommandCSUnSuspend : public Command
|
||||
if (Config->WallForbid)
|
||||
ircdproto->SendGlobops(ChanServ, "\2%s\2 used UNSUSPEND on channel \2%s\2", u->nick.c_str(), ci->name.c_str());
|
||||
|
||||
u->SendMessage(ChanServ, CHAN_UNSUSPEND_SUCCEEDED, ci->name.c_str());
|
||||
source.Reply(CHAN_UNSUSPEND_SUCCEEDED, ci->name.c_str());
|
||||
|
||||
FOREACH_MOD(I_OnChanUnsuspend, OnChanUnsuspend(ci));
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_SERVADMIN_HELP_UNSUSPEND);
|
||||
source.Reply(CHAN_SERVADMIN_HELP_UNSUSPEND);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "UNSUSPEND", CHAN_UNSUSPEND_SYNTAX);
|
||||
SyntaxError(source, "UNSUSPEND", CHAN_UNSUSPEND_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_UNSUSPEND);
|
||||
source.Reply(CHAN_HELP_CMD_UNSUSPEND);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -46,20 +46,20 @@ class CommandCSTopic : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_TOPIC);
|
||||
source.Reply(CHAN_HELP_TOPIC);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "TOPIC", CHAN_TOPIC_SYNTAX);
|
||||
SyntaxError(source, "TOPIC", CHAN_TOPIC_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_TOPIC);
|
||||
source.Reply(CHAN_HELP_CMD_TOPIC);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -57,20 +57,20 @@ class CommandCSUnban : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_UNBAN);
|
||||
source.Reply(CHAN_HELP_UNBAN);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "UNBAN", CHAN_UNBAN_SYNTAX);
|
||||
SyntaxError(source, "UNBAN", CHAN_UNBAN_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_UNBAN);
|
||||
source.Reply(CHAN_HELP_CMD_UNBAN);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+37
-38
@@ -206,7 +206,7 @@ class XOPBase : public Command
|
||||
|
||||
if (nick.empty())
|
||||
{
|
||||
this->OnSyntaxError(u, "ADD");
|
||||
this->OnSyntaxError(source, "ADD");
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
@@ -293,7 +293,7 @@ class XOPBase : public Command
|
||||
|
||||
if (nick.empty())
|
||||
{
|
||||
this->OnSyntaxError(u, "DEL");
|
||||
this->OnSyntaxError(source, "DEL");
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
@@ -462,14 +462,13 @@ class XOPBase : public Command
|
||||
|
||||
FOREACH_MOD(I_OnAccessClear, OnAccessClear(ci, u));
|
||||
|
||||
u->SendMessage(ChanServ, messages[XOP_CLEAR], ci->name.c_str());
|
||||
source.Reply(messages[XOP_CLEAR], ci->name.c_str());
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
protected:
|
||||
CommandReturn DoXop(CommandSource &source, const std::vector<Anope::string> ¶ms, int level, LanguageString *messages)
|
||||
{
|
||||
User *u = source.u;
|
||||
ChannelInfo *ci = source.ci;
|
||||
|
||||
const Anope::string &cmd = params[1];
|
||||
@@ -485,7 +484,7 @@ class XOPBase : public Command
|
||||
else if (cmd.equals_ci("CLEAR"))
|
||||
return this->DoClear(source, level, messages);
|
||||
else
|
||||
this->OnSyntaxError(u, "");
|
||||
this->OnSyntaxError(source, "");
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
@@ -500,11 +499,11 @@ class XOPBase : public Command
|
||||
|
||||
virtual CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) = 0;
|
||||
|
||||
virtual bool OnHelp(User *u, const Anope::string &subcommand) = 0;
|
||||
virtual bool OnHelp(CommandSource &source, const Anope::string &subcommand) = 0;
|
||||
|
||||
virtual void OnSyntaxError(User *u, const Anope::string &subcommand) = 0;
|
||||
virtual void OnSyntaxError(CommandSource &source, const Anope::string &subcommand) = 0;
|
||||
|
||||
virtual void OnServHelp(User *u) = 0;
|
||||
virtual void OnServHelp(CommandSource &source) = 0;
|
||||
};
|
||||
|
||||
class CommandCSQOP : public XOPBase
|
||||
@@ -519,20 +518,20 @@ class CommandCSQOP : public XOPBase
|
||||
return this->DoXop(source, params, ACCESS_QOP, xop_msgs[XOP_QOP]);
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_QOP);
|
||||
source.Reply(CHAN_HELP_QOP);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "QOP", CHAN_QOP_SYNTAX);
|
||||
SyntaxError(source, "QOP", CHAN_QOP_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_QOP);
|
||||
source.Reply(CHAN_HELP_CMD_QOP);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -548,20 +547,20 @@ class CommandCSAOP : public XOPBase
|
||||
return this->DoXop(source, params, ACCESS_AOP, xop_msgs[XOP_AOP]);
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_AOP);
|
||||
source.Reply(CHAN_HELP_AOP);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "AOP", CHAN_AOP_SYNTAX);
|
||||
SyntaxError(source, "AOP", CHAN_AOP_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_AOP);
|
||||
source.Reply(CHAN_HELP_CMD_AOP);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -577,20 +576,20 @@ class CommandCSHOP : public XOPBase
|
||||
return this->DoXop(source, params, ACCESS_HOP, xop_msgs[XOP_HOP]);
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_HOP);
|
||||
source.Reply(CHAN_HELP_HOP);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "HOP", CHAN_HOP_SYNTAX);
|
||||
SyntaxError(source, "HOP", CHAN_HOP_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_HOP);
|
||||
source.Reply(CHAN_HELP_CMD_HOP);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -606,20 +605,20 @@ class CommandCSSOP : public XOPBase
|
||||
return this->DoXop(source, params, ACCESS_SOP, xop_msgs[XOP_SOP]);
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_SOP);
|
||||
source.Reply(CHAN_HELP_SOP);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "SOP", CHAN_SOP_SYNTAX);
|
||||
SyntaxError(source, "SOP", CHAN_SOP_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_SOP);
|
||||
source.Reply(CHAN_HELP_CMD_SOP);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -635,20 +634,20 @@ class CommandCSVOP : public XOPBase
|
||||
return this->DoXop(source, params, ACCESS_VOP, xop_msgs[XOP_VOP]);
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_VOP);
|
||||
source.Reply(CHAN_HELP_VOP);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(ChanServ, u, "VOP", CHAN_VOP_SYNTAX);
|
||||
SyntaxError(source, "VOP", CHAN_VOP_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(ChanServ, CHAN_HELP_CMD_VOP);
|
||||
source.Reply(CHAN_HELP_CMD_VOP);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -43,20 +43,20 @@ class CommandHSDel : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(HostServ, HOST_HELP_DEL);
|
||||
source.Reply(HOST_HELP_DEL);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(HostServ, u, "DEL", HOST_DEL_SYNTAX);
|
||||
SyntaxError(source, "DEL", HOST_DEL_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(HostServ, HOST_HELP_CMD_DEL);
|
||||
source.Reply(HOST_HELP_CMD_DEL);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -48,20 +48,20 @@ class CommandHSDelAll : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(HostServ, HOST_HELP_DELALL);
|
||||
source.Reply(HOST_HELP_DELALL);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(HostServ, u, "DELALL", HOST_DELALL_SYNTAX);
|
||||
SyntaxError(source, "DELALL", HOST_DELALL_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(HostServ, HOST_HELP_CMD_DELALL);
|
||||
source.Reply(HOST_HELP_CMD_DELALL);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -38,15 +38,15 @@ class CommandHSGroup : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(HostServ, HOST_HELP_GROUP);
|
||||
source.Reply(HOST_HELP_GROUP);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(HostServ, HOST_HELP_CMD_GROUP);
|
||||
source.Reply(HOST_HELP_CMD_GROUP);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -23,16 +23,17 @@ class CommandHSHelp : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
mod_help_cmd(HostServ, source.u, params[0]);
|
||||
mod_help_cmd(HostServ, source.u, NULL, params[0]);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(HostServ, OPER_HELP, Config->s_HostServ.c_str());
|
||||
User *u = source.u;
|
||||
source.Reply(OPER_HELP, Config->s_HostServ.c_str());
|
||||
for (CommandMap::const_iterator it = HostServ->Commands.begin(), it_end = HostServ->Commands.end(); it != it_end; ++it)
|
||||
if (!Config->HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
|
||||
it->second->OnServHelp(u);
|
||||
it->second->OnServHelp(source);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -97,15 +97,15 @@ class CommandHSList : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(HostServ, HOST_HELP_LIST);
|
||||
source.Reply(HOST_HELP_LIST);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(HostServ, HOST_HELP_CMD_LIST);
|
||||
source.Reply(HOST_HELP_CMD_LIST);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -37,15 +37,15 @@ class CommandHSOff : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(HostServ, HOST_HELP_OFF);
|
||||
source.Reply(HOST_HELP_OFF);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(HostServ, HOST_HELP_CMD_OFF);
|
||||
source.Reply(HOST_HELP_CMD_OFF);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -47,15 +47,15 @@ class CommandHSOn : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(HostServ, HOST_HELP_ON);
|
||||
source.Reply(HOST_HELP_ON);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(HostServ, HOST_HELP_CMD_ON);
|
||||
source.Reply(HOST_HELP_CMD_ON);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -94,20 +94,20 @@ class CommandHSSet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(HostServ, HOST_HELP_SET);
|
||||
source.Reply(HOST_HELP_SET);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(HostServ, u, "SET", HOST_SET_SYNTAX);
|
||||
SyntaxError(source, "SET", HOST_SET_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(HostServ, HOST_HELP_CMD_SET);
|
||||
source.Reply(HOST_HELP_CMD_SET);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -100,20 +100,20 @@ class CommandHSSetAll : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(HostServ, HOST_HELP_SETALL);
|
||||
source.Reply(HOST_HELP_SETALL);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(HostServ, u, "SETALL", HOST_SETALL_SYNTAX);
|
||||
SyntaxError(source, "SETALL", HOST_SETALL_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(HostServ, HOST_HELP_CMD_SETALL);
|
||||
source.Reply(HOST_HELP_CMD_SETALL);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -54,20 +54,20 @@ class CommandMSCancel : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(MemoServ, MEMO_HELP_CANCEL);
|
||||
source.Reply(MEMO_HELP_CANCEL);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(MemoServ, u, "CANCEL", MEMO_CANCEL_SYNTAX);
|
||||
SyntaxError(source, "CANCEL", MEMO_CANCEL_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(MemoServ, MEMO_HELP_CMD_CANCEL);
|
||||
source.Reply(MEMO_HELP_CMD_CANCEL);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -66,20 +66,20 @@ class CommandMSCheck : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(MemoServ, MEMO_HELP_CHECK);
|
||||
source.Reply(MEMO_HELP_CHECK);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(MemoServ, u, "CHECK", MEMO_CHECK_SYNTAX);
|
||||
SyntaxError(source, "CHECK", MEMO_CHECK_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(MemoServ, MEMO_HELP_CMD_CHECK);
|
||||
source.Reply(MEMO_HELP_CMD_CHECK);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ class CommandMSDel : public Command
|
||||
else
|
||||
mi = &u->Account()->memos;
|
||||
if (numstr.empty() || (!isdigit(numstr[0]) && !numstr.equals_ci("ALL") && !numstr.equals_ci("LAST")))
|
||||
this->OnSyntaxError(u, numstr);
|
||||
this->OnSyntaxError(source, numstr);
|
||||
else if (mi->memos.empty())
|
||||
{
|
||||
if (!chan.empty())
|
||||
@@ -122,20 +122,20 @@ class CommandMSDel : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(MemoServ, MEMO_HELP_DEL);
|
||||
source.Reply(MEMO_HELP_DEL);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(MemoServ, u, "DEL", MEMO_DEL_SYNTAX);
|
||||
SyntaxError(source, "DEL", MEMO_DEL_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(MemoServ, MEMO_HELP_CMD_DEL);
|
||||
source.Reply(MEMO_HELP_CMD_DEL);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -23,17 +23,18 @@ class CommandMSHelp : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
mod_help_cmd(MemoServ, source.u, params[0]);
|
||||
mod_help_cmd(MemoServ, source.u, NULL, params[0]);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(MemoServ, MEMO_HELP_HEADER);
|
||||
User *u = source.u;
|
||||
source.Reply(MEMO_HELP_HEADER);
|
||||
for (CommandMap::const_iterator it = MemoServ->Commands.begin(), it_end = MemoServ->Commands.end(); it != it_end; ++it)
|
||||
if (!Config->HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
|
||||
it->second->OnServHelp(u);
|
||||
u->SendMessage(MemoServ, MEMO_HELP_FOOTER, Config->s_ChanServ.c_str());
|
||||
it->second->OnServHelp(source);
|
||||
source.Reply(MEMO_HELP_FOOTER, Config->s_ChanServ.c_str());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -80,25 +80,25 @@ class CommandMSIgnore : public Command
|
||||
}
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(u, "");
|
||||
this->OnSyntaxError(source, "");
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(MemoServ, MEMO_HELP_IGNORE);
|
||||
source.Reply(MEMO_HELP_IGNORE);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(MemoServ, u, "IGNORE", MEMO_IGNORE_SYNTAX);
|
||||
SyntaxError(source, "IGNORE", MEMO_IGNORE_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(MemoServ, MEMO_HELP_CMD_IGNORE);
|
||||
source.Reply(MEMO_HELP_CMD_IGNORE);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -186,19 +186,20 @@ class CommandMSInfo : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
User *u = source.u;
|
||||
if (u->Account() && u->Account()->IsServicesOper())
|
||||
u->SendMessage(MemoServ, MEMO_SERVADMIN_HELP_INFO);
|
||||
source.Reply(MEMO_SERVADMIN_HELP_INFO);
|
||||
else
|
||||
u->SendMessage(MemoServ, MEMO_HELP_INFO);
|
||||
source.Reply(MEMO_HELP_INFO);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(MemoServ, MEMO_HELP_CMD_INFO);
|
||||
source.Reply(MEMO_HELP_CMD_INFO);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ class CommandMSList : public Command
|
||||
else
|
||||
mi = &u->Account()->memos;
|
||||
if (!param.empty() && !isdigit(param[0]) && !param.equals_ci("NEW"))
|
||||
this->OnSyntaxError(u, param);
|
||||
this->OnSyntaxError(source, param);
|
||||
else if (!mi->memos.size())
|
||||
{
|
||||
if (!chan.empty())
|
||||
@@ -142,20 +142,20 @@ class CommandMSList : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(MemoServ, MEMO_HELP_LIST);
|
||||
source.Reply(MEMO_HELP_LIST);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(MemoServ, u, "LIST", MEMO_LIST_SYNTAX);
|
||||
SyntaxError(source, "LIST", MEMO_LIST_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServCommand(User *u)
|
||||
void OnServCommand(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(MemoServ, MEMO_HELP_CMD_LIST);
|
||||
source.Reply(MEMO_HELP_CMD_LIST);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+11
-12
@@ -32,18 +32,17 @@ class MemoListCallback : public NumberList
|
||||
|
||||
static void DoRead(CommandSource &source, MemoInfo *mi, ChannelInfo *ci, unsigned index)
|
||||
{
|
||||
User *u = source.u;
|
||||
Memo *m = mi->memos[index];
|
||||
if (ci)
|
||||
u->SendMessage(MemoServ, MEMO_CHAN_HEADER, index + 1, m->sender.c_str(), do_strftime(m->time).c_str(), Config->s_MemoServ.c_str(), ci->name.c_str(), index + 1);
|
||||
source.Reply(MEMO_CHAN_HEADER, index + 1, m->sender.c_str(), do_strftime(m->time).c_str(), Config->s_MemoServ.c_str(), ci->name.c_str(), index + 1);
|
||||
else
|
||||
u->SendMessage(MemoServ, MEMO_HEADER, index + 1, m->sender.c_str(), do_strftime(m->time).c_str(), Config->s_MemoServ.c_str(), index + 1);
|
||||
u->SendMessage(MemoServ, MEMO_TEXT, m->text.c_str());
|
||||
source.Reply(MEMO_HEADER, index + 1, m->sender.c_str(), do_strftime(m->time).c_str(), Config->s_MemoServ.c_str(), index + 1);
|
||||
source.Reply(MEMO_TEXT, m->text.c_str());
|
||||
m->UnsetFlag(MF_UNREAD);
|
||||
|
||||
/* Check if a receipt notification was requested */
|
||||
if (m->HasFlag(MF_RECEIPT))
|
||||
rsend_notify(u, m, ci ? ci->name : "");
|
||||
rsend_notify(source, m, ci ? ci->name : "");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -84,7 +83,7 @@ class CommandMSRead : public Command
|
||||
mi = &u->Account()->memos;
|
||||
num = !numstr.empty() && numstr.is_number_only() ? convertTo<int>(numstr) : -1;
|
||||
if (numstr.empty() || (!numstr.equals_ci("LAST") && !numstr.equals_ci("NEW") && num <= 0))
|
||||
this->OnSyntaxError(u, numstr);
|
||||
this->OnSyntaxError(source, numstr);
|
||||
else if (mi->memos.empty())
|
||||
{
|
||||
if (!chan.empty())
|
||||
@@ -126,20 +125,20 @@ class CommandMSRead : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(MemoServ, MEMO_HELP_READ);
|
||||
source.Reply(MEMO_HELP_READ);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(MemoServ, u, "READ", MEMO_READ_SYNTAX);
|
||||
SyntaxError(source, "READ", MEMO_READ_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(MemoServ, MEMO_HELP_CMD_READ);
|
||||
source.Reply(MEMO_HELP_CMD_READ);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -39,13 +39,13 @@ class CommandMSRSend : public Command
|
||||
{
|
||||
/* Services opers and above can use rsend */
|
||||
if (u->Account()->IsServicesOper())
|
||||
memo_send(u, nick, text, 3);
|
||||
memo_send(source, nick, text, 3);
|
||||
else
|
||||
source.Reply(ACCESS_DENIED);
|
||||
}
|
||||
else if (Config->MSMemoReceipt == 2)
|
||||
/* Everybody can use rsend */
|
||||
memo_send(u, nick, text, 3);
|
||||
memo_send(source, nick, text, 3);
|
||||
else
|
||||
{
|
||||
/* rsend has been disabled */
|
||||
@@ -56,20 +56,20 @@ class CommandMSRSend : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(MemoServ, MEMO_HELP_RSEND);
|
||||
source.Reply(MEMO_HELP_RSEND);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(MemoServ, u, "RSEND", MEMO_RSEND_SYNTAX);
|
||||
SyntaxError(source, "RSEND", MEMO_RSEND_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(MemoServ, MEMO_HELP_CMD_RSEND);
|
||||
source.Reply(MEMO_HELP_CMD_RSEND);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -22,27 +22,26 @@ class CommandMSSend : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
const Anope::string &nick = params[0];
|
||||
const Anope::string &text = params[1];
|
||||
memo_send(u, nick, text, 0);
|
||||
memo_send(source, nick, text, 0);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(MemoServ, MEMO_HELP_SEND);
|
||||
source.Reply(MEMO_HELP_SEND);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(MemoServ, u, "SEND", MEMO_SEND_SYNTAX);
|
||||
SyntaxError(source, "SEND", MEMO_SEND_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(MemoServ, MEMO_HELP_CMD_SEND);
|
||||
source.Reply(MEMO_HELP_CMD_SEND);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -38,27 +38,27 @@ class CommandMSSendAll : public Command
|
||||
NickCore *nc = it->second;
|
||||
|
||||
if ((na && na->nc == nc) || !nc->display.equals_ci(u->nick))
|
||||
memo_send(u, nc->display, text, 1);
|
||||
memo_send(source, nc->display, text, 1);
|
||||
}
|
||||
|
||||
u->SendMessage(MemoServ, MEMO_MASS_SENT);
|
||||
source.Reply(MEMO_MASS_SENT);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(MemoServ, MEMO_HELP_SENDALL);
|
||||
source.Reply(MEMO_HELP_SENDALL);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(MemoServ, u, "SENDALL", MEMO_SENDALL_SYNTAX);
|
||||
SyntaxError(source, "SENDALL", MEMO_SENDALL_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(MemoServ, MEMO_HELP_CMD_SENDALL);
|
||||
source.Reply(MEMO_HELP_CMD_SENDALL);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+14
-13
@@ -62,7 +62,7 @@ class CommandMSSet : public Command
|
||||
source.Reply(MEMO_SET_NOTIFY_OFF, Config->s_MemoServ.c_str());
|
||||
}
|
||||
else
|
||||
SyntaxError(MemoServ, u, "SET NOTIFY", MEMO_SET_NOTIFY_SYNTAX);
|
||||
SyntaxError(source, "SET NOTIFY", MEMO_SET_NOTIFY_SYNTAX);
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
@@ -116,12 +116,12 @@ class CommandMSSet : public Command
|
||||
}
|
||||
else if (p1.empty())
|
||||
{
|
||||
SyntaxError(MemoServ, u, "SET LIMIT", MEMO_SET_LIMIT_SERVADMIN_SYNTAX);
|
||||
SyntaxError(source, "SET LIMIT", MEMO_SET_LIMIT_SERVADMIN_SYNTAX);
|
||||
return MOD_CONT;
|
||||
}
|
||||
if ((!isdigit(p1[0]) && !p1.equals_ci("NONE")) || (!p2.empty() && !p2.equals_ci("HARD")))
|
||||
{
|
||||
SyntaxError(MemoServ, u, "SET LIMIT", MEMO_SET_LIMIT_SERVADMIN_SYNTAX);
|
||||
SyntaxError(source, "SET LIMIT", MEMO_SET_LIMIT_SERVADMIN_SYNTAX);
|
||||
return MOD_CONT;
|
||||
}
|
||||
if (!chan.empty())
|
||||
@@ -151,7 +151,7 @@ class CommandMSSet : public Command
|
||||
{
|
||||
if (p1.empty() || !p2.empty() || !isdigit(p1[0]))
|
||||
{
|
||||
SyntaxError(MemoServ, u, "SET LIMIT", MEMO_SET_LIMIT_SYNTAX);
|
||||
SyntaxError(source, "SET LIMIT", MEMO_SET_LIMIT_SYNTAX);
|
||||
return MOD_CONT;
|
||||
}
|
||||
if (!chan.empty() && ci->HasFlag(CI_MEMO_HARDMAX))
|
||||
@@ -231,18 +231,19 @@ class CommandMSSet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
if (subcommand.empty())
|
||||
u->SendMessage(MemoServ, MEMO_HELP_SET);
|
||||
source.Reply(MEMO_HELP_SET);
|
||||
else if (subcommand.equals_ci("NOTIFY"))
|
||||
u->SendMessage(MemoServ, MEMO_HELP_SET_NOTIFY);
|
||||
source.Reply(MEMO_HELP_SET_NOTIFY);
|
||||
else if (subcommand.equals_ci("LIMIT"))
|
||||
{
|
||||
User *u = source.u;
|
||||
if (u->Account() && u->Account()->IsServicesOper())
|
||||
u->SendMessage(MemoServ, MEMO_SERVADMIN_HELP_SET_LIMIT, Config->MSMaxMemos);
|
||||
source.Reply(MEMO_SERVADMIN_HELP_SET_LIMIT, Config->MSMaxMemos);
|
||||
else
|
||||
u->SendMessage(MemoServ, MEMO_HELP_SET_LIMIT, Config->MSMaxMemos);
|
||||
source.Reply(MEMO_HELP_SET_LIMIT, Config->MSMaxMemos);
|
||||
}
|
||||
else
|
||||
return false;
|
||||
@@ -250,14 +251,14 @@ class CommandMSSet : public Command
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(MemoServ, u, "SET", NICK_SET_SYNTAX);
|
||||
SyntaxError(source, "SET", NICK_SET_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(MemoServ, MEMO_HELP_CMD_SET);
|
||||
source.Reply(MEMO_HELP_CMD_SET);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -36,26 +36,26 @@ class CommandMSStaff : public Command
|
||||
NickCore *nc = it->second;
|
||||
|
||||
if (nc->IsServicesOper())
|
||||
memo_send(u, nc->display, text, 0);
|
||||
memo_send(source, nc->display, text, 0);
|
||||
}
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(MemoServ, MEMO_HELP_STAFF);
|
||||
source.Reply(MEMO_HELP_STAFF);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(MemoServ, u, "STAFF", MEMO_STAFF_SYNTAX);
|
||||
SyntaxError(source, "STAFF", MEMO_STAFF_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(MemoServ, MEMO_HELP_CMD_STAFF);
|
||||
source.Reply(MEMO_HELP_CMD_STAFF);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ class CommandNSAccess : public Command
|
||||
|
||||
if (mask.empty())
|
||||
{
|
||||
this->OnSyntaxError(u, "ADD");
|
||||
this->OnSyntaxError(source, "ADD");
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ class CommandNSAccess : public Command
|
||||
|
||||
if (mask.empty())
|
||||
{
|
||||
this->OnSyntaxError(u, "DEL");
|
||||
this->OnSyntaxError(source, "DEL");
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
@@ -146,25 +146,25 @@ class CommandNSAccess : public Command
|
||||
else if (cmd.equals_ci("LIST"))
|
||||
return this->DoList(source, u->Account(), mask);
|
||||
else
|
||||
this->OnSyntaxError(u, "");
|
||||
this->OnSyntaxError(source, "");
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_ACCESS);
|
||||
source.Reply(NICK_HELP_ACCESS);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(NickServ, u, "ACCESS", NICK_ACCESS_SYNTAX);
|
||||
SyntaxError(source, "ACCESS", NICK_ACCESS_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_ACCESS);
|
||||
source.Reply(NICK_HELP_CMD_ACCESS);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -119,19 +119,20 @@ class CommandNSAList : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
User *u = source.u;
|
||||
if (u->Account() && u->Account()->IsServicesOper())
|
||||
u->SendMessage(NickServ, NICK_SERVADMIN_HELP_ALIST);
|
||||
source.Reply(NICK_SERVADMIN_HELP_ALIST);
|
||||
else
|
||||
u->SendMessage(NickServ, NICK_HELP_ALIST);
|
||||
source.Reply(NICK_HELP_ALIST);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_ALIST);
|
||||
source.Reply(NICK_HELP_CMD_ALIST);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -114,19 +114,20 @@ class CommandNSDrop : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
User *u = source.u;
|
||||
if (u->Account() && u->Account()->HasPriv("nickserv/drop"))
|
||||
u->SendMessage(NickServ, NICK_SERVADMIN_HELP_DROP);
|
||||
source.Reply(NICK_SERVADMIN_HELP_DROP);
|
||||
else
|
||||
u->SendMessage(NickServ, NICK_HELP_DROP);
|
||||
source.Reply(NICK_HELP_DROP);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_DROP);
|
||||
source.Reply(NICK_HELP_CMD_DROP);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ class CommandNSForbid : public Command
|
||||
/* Assumes that permission checking has already been done. */
|
||||
if (Config->ForceForbidReason && reason.empty())
|
||||
{
|
||||
this->OnSyntaxError(u, "");
|
||||
this->OnSyntaxError(source, "");
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
@@ -77,27 +77,27 @@ class CommandNSForbid : public Command
|
||||
ircdproto->SendGlobops(NickServ, "\2%s\2 used FORBID on \2%s\2", u->nick.c_str(), nick.c_str());
|
||||
|
||||
Log(LOG_ADMIN, u, this) << "to forbid nick " << nick;
|
||||
u->SendMessage(NickServ, NICK_FORBID_SUCCEEDED, nick.c_str());
|
||||
source.Reply(NICK_FORBID_SUCCEEDED, nick.c_str());
|
||||
|
||||
FOREACH_MOD(I_OnNickForbidden, OnNickForbidden(na));
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_SERVADMIN_HELP_FORBID);
|
||||
source.Reply(NICK_SERVADMIN_HELP_FORBID);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(NickServ, u, "FORBID", Config->ForceForbidReason ? NICK_FORBID_SYNTAX_REASON : NICK_FORBID_SYNTAX);
|
||||
SyntaxError(source, "FORBID", Config->ForceForbidReason ? NICK_FORBID_SYNTAX_REASON : NICK_FORBID_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_FORBID);
|
||||
source.Reply(NICK_HELP_CMD_FORBID);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -52,20 +52,20 @@ class CommandNSGetEMail : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_SERVADMIN_HELP_GETEMAIL);
|
||||
source.Reply(NICK_SERVADMIN_HELP_GETEMAIL);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(NickServ, u, "GETMAIL", NICK_GETEMAIL_SYNTAX);
|
||||
SyntaxError(source, "GETMAIL", NICK_GETEMAIL_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_GETEMAIL);
|
||||
source.Reply(NICK_HELP_CMD_GETEMAIL);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -59,20 +59,20 @@ class CommandNSGetPass : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_SERVADMIN_HELP_GETPASS);
|
||||
source.Reply(NICK_SERVADMIN_HELP_GETPASS);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(NickServ, u, "GETPASS", NICK_GETPASS_SYNTAX);
|
||||
SyntaxError(source, "GETPASS", NICK_GETPASS_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_GETPASS);
|
||||
source.Reply(NICK_HELP_CMD_GETPASS);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -67,20 +67,20 @@ class CommandNSGhost : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_GHOST);
|
||||
source.Reply(NICK_HELP_GHOST);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(NickServ, u, "GHOST", NICK_GHOST_SYNTAX);
|
||||
SyntaxError(source, "GHOST", NICK_GHOST_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_GHOST);
|
||||
source.Reply(NICK_HELP_CMD_GHOST);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+16
-15
@@ -131,20 +131,20 @@ class CommandNSGroup : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_GROUP);
|
||||
source.Reply(NICK_HELP_GROUP);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(NickServ, u, "GROUP", NICK_GROUP_SYNTAX);
|
||||
SyntaxError(source, "GROUP", NICK_GROUP_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_GROUP);
|
||||
source.Reply(NICK_HELP_CMD_GROUP);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -199,15 +199,15 @@ class CommandNSUngroup : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_UNGROUP);
|
||||
source.Reply(NICK_HELP_UNGROUP);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_UNGROUP);
|
||||
source.Reply(NICK_HELP_CMD_UNGROUP);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -243,19 +243,20 @@ class CommandNSGList : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
User *u = source.u;
|
||||
if (u->Account() && u->Account()->IsServicesOper())
|
||||
u->SendMessage(NickServ, NICK_SERVADMIN_HELP_GLIST);
|
||||
source.Reply(NICK_SERVADMIN_HELP_GLIST);
|
||||
else
|
||||
u->SendMessage(NickServ, NICK_HELP_GLIST);
|
||||
source.Reply(NICK_HELP_GLIST);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_GLIST);
|
||||
source.Reply(NICK_HELP_CMD_GLIST);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -23,21 +23,22 @@ class CommandNSHelp : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
mod_help_cmd(NickServ, source.u, params[0]);
|
||||
mod_help_cmd(NickServ, source.u, NULL, params[0]);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP);
|
||||
User *u = source.u;
|
||||
source.Reply(NICK_HELP);
|
||||
for (CommandMap::const_iterator it = NickServ->Commands.begin(), it_end = NickServ->Commands.end(); it != it_end; ++it)
|
||||
if (!Config->HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission)))
|
||||
it->second->OnServHelp(u);
|
||||
it->second->OnServHelp(source);
|
||||
if (u->Account() && u->Account()->IsServicesOper())
|
||||
u->SendMessage(NickServ, NICK_SERVADMIN_HELP);
|
||||
source.Reply(NICK_SERVADMIN_HELP);
|
||||
if (Config->NSExpire >= 86400)
|
||||
u->SendMessage(NickServ, NICK_HELP_EXPIRES, Config->NSExpire / 86400);
|
||||
u->SendMessage(NickServ, NICK_HELP_FOOTER);
|
||||
source.Reply(NICK_HELP_EXPIRES, Config->NSExpire / 86400);
|
||||
source.Reply(NICK_HELP_FOOTER);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -98,20 +98,20 @@ class CommandNSIdentify : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_IDENTIFY);
|
||||
source.Reply(NICK_HELP_IDENTIFY);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(NickServ, u, "IDENTIFY", NICK_IDENTIFY_SYNTAX);
|
||||
SyntaxError(source, "IDENTIFY", NICK_IDENTIFY_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_IDENTIFY);
|
||||
source.Reply(NICK_HELP_CMD_IDENTIFY);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -146,21 +146,21 @@ class CommandNSInfo : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_INFO);
|
||||
source.Reply(NICK_HELP_INFO);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(NickServ, u, "INFO", NICK_INFO_SYNTAX);
|
||||
SyntaxError(source, "INFO", NICK_INFO_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_INFO);
|
||||
source.Reply(NICK_HELP_CMD_INFO);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+12
-10
@@ -105,7 +105,7 @@ class CommandNSList : public Command
|
||||
|
||||
mync = u->Account();
|
||||
|
||||
u->SendMessage(NickServ, NICK_LIST_HEADER, pattern.c_str());
|
||||
source.Reply(NICK_LIST_HEADER, pattern.c_str());
|
||||
if (!unconfirmed)
|
||||
{
|
||||
for (nickalias_map::const_iterator it = NickAliasList.begin(), it_end = NickAliasList.end(); it != it_end; ++it)
|
||||
@@ -167,31 +167,33 @@ class CommandNSList : public Command
|
||||
}
|
||||
}
|
||||
}
|
||||
u->SendMessage(NickServ, NICK_LIST_RESULTS, nnicks > Config->NSListMax ? Config->NSListMax : nnicks, nnicks);
|
||||
source.Reply(NICK_LIST_RESULTS, nnicks > Config->NSListMax ? Config->NSListMax : nnicks, nnicks);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
User *u = source.u;
|
||||
if (u->Account() && u->Account()->IsServicesOper())
|
||||
u->SendMessage(NickServ, NICK_SERVADMIN_HELP_LIST);
|
||||
source.Reply(NICK_SERVADMIN_HELP_LIST);
|
||||
else
|
||||
u->SendMessage(NickServ, NICK_HELP_LIST);
|
||||
source.Reply(NICK_HELP_LIST);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
User *u = source.u;
|
||||
if (u->Account()->IsServicesOper())
|
||||
SyntaxError(NickServ, u, "LIST", NICK_LIST_SERVADMIN_SYNTAX);
|
||||
SyntaxError(source, "LIST", NICK_LIST_SERVADMIN_SYNTAX);
|
||||
else
|
||||
SyntaxError(NickServ, u, "LIST", NICK_LIST_SYNTAX);
|
||||
SyntaxError(source, "LIST", NICK_LIST_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_LIST);
|
||||
source.Reply(NICK_HELP_CMD_LIST);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ class CommandNSLogout : public Command
|
||||
|
||||
User *u2;
|
||||
if (!u->Account()->IsServicesOper() && !nick.empty())
|
||||
this->OnSyntaxError(u, "");
|
||||
this->OnSyntaxError(source, "");
|
||||
else if (!(u2 = (!nick.empty() ? finduser(nick) : u)))
|
||||
source.Reply(NICK_X_NOT_IN_USE, nick.c_str());
|
||||
else if (!nick.empty() && u2->Account() && !u2->Account()->IsServicesOper())
|
||||
@@ -60,24 +60,25 @@ class CommandNSLogout : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
User *u = source.u;
|
||||
if (u->Account() && u->Account()->IsServicesOper())
|
||||
u->SendMessage(NickServ, NICK_SERVADMIN_HELP_LOGOUT);
|
||||
source.Reply(NICK_SERVADMIN_HELP_LOGOUT);
|
||||
else
|
||||
u->SendMessage(NickServ, NICK_HELP_LOGOUT);
|
||||
source.Reply(NICK_HELP_LOGOUT);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(NickServ, u, "LOGOUT", NICK_LOGOUT_SYNTAX);
|
||||
SyntaxError(source, "LOGOUT", NICK_LOGOUT_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_LOGOUT);
|
||||
source.Reply(NICK_HELP_CMD_LOGOUT);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -83,24 +83,24 @@ class CommandNSRecover : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
/* Convert Config->NSReleaseTimeout seconds to string format */
|
||||
Anope::string relstr = duration(u->Account(), Config->NSReleaseTimeout);
|
||||
Anope::string relstr = duration(source.u->Account(), Config->NSReleaseTimeout);
|
||||
|
||||
u->SendMessage(NickServ, NICK_HELP_RECOVER, relstr.c_str());
|
||||
source.Reply(NICK_HELP_RECOVER, relstr.c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(NickServ, u, "RECOVER", NICK_RECOVER_SYNTAX);
|
||||
SyntaxError(source, "RECOVER", NICK_RECOVER_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_RECOVER);
|
||||
source.Reply(NICK_HELP_CMD_RECOVER);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ class CommandNSConfirm : public Command
|
||||
{
|
||||
if (passcode.empty())
|
||||
{
|
||||
this->OnSyntaxError(u, "");
|
||||
this->OnSyntaxError(source, "");
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
@@ -142,22 +142,23 @@ class CommandNSConfirm : public Command
|
||||
return this->DoConfirm(source, params);
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CONFIRM);
|
||||
User *u = source.u;
|
||||
source.Reply(NICK_HELP_CONFIRM);
|
||||
if (u->Account() && u->Account()->HasPriv("nickserv/confirm"))
|
||||
u->SendMessage(NickServ, NICK_HELP_CONFIRM_OPER);
|
||||
source.Reply(NICK_HELP_CONFIRM_OPER);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_CONFIRM_INVALID);
|
||||
source.Reply(NICK_CONFIRM_INVALID);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_CONFIRM);
|
||||
source.Reply(NICK_HELP_CMD_CONFIRM);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -237,7 +238,7 @@ class CommandNSRegister : public CommandNSConfirm
|
||||
}
|
||||
|
||||
if (Config->NSForceEmail && email.empty())
|
||||
this->OnSyntaxError(u, "");
|
||||
this->OnSyntaxError(source, "");
|
||||
else if (Anope::CurTime < u->lastnickreg + Config->NSRegDelay)
|
||||
source.Reply(NICK_REG_PLEASE_WAIT, (u->lastnickreg + Config->NSRegDelay) - Anope::CurTime);
|
||||
else if ((na = findnick(u->nick)))
|
||||
@@ -293,23 +294,23 @@ class CommandNSRegister : public CommandNSConfirm
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_REGISTER);
|
||||
source.Reply(NICK_HELP_REGISTER);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
if (Config->NSForceEmail)
|
||||
SyntaxError(NickServ, u, "REGISTER", NICK_REGISTER_SYNTAX_EMAIL);
|
||||
SyntaxError(source, "REGISTER", NICK_REGISTER_SYNTAX_EMAIL);
|
||||
else
|
||||
SyntaxError(NickServ, u, "REGISTER", NICK_REGISTER_SYNTAX);
|
||||
SyntaxError(source, "REGISTER", NICK_REGISTER_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_REGISTER);
|
||||
source.Reply(NICK_HELP_CMD_REGISTER);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -350,15 +351,15 @@ class CommandNSResend : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_RESEND);
|
||||
source.Reply(NICK_HELP_RESEND);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_RESEND);
|
||||
source.Reply(NICK_HELP_CMD_RESEND);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -68,24 +68,25 @@ class CommandNSRelease : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
/* Convert Config->NSReleaseTimeout seconds to string format */
|
||||
User *u = source.u;
|
||||
Anope::string relstr = duration(u->Account(), Config->NSReleaseTimeout);
|
||||
|
||||
u->SendMessage(NickServ, NICK_HELP_RELEASE, relstr.c_str());
|
||||
source.Reply(NICK_HELP_RELEASE, relstr.c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(NickServ, u, "RELEASE", NICK_RELEASE_SYNTAX);
|
||||
SyntaxError(source, "RELEASE", NICK_RELEASE_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_RELEASE);
|
||||
source.Reply(NICK_HELP_CMD_RELEASE);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -46,20 +46,20 @@ class CommandNSResetPass : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_RESETPASS);
|
||||
source.Reply(NICK_HELP_RESETPASS);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(NickServ, u, "RESETPASS", NICK_RESETPASS_SYNTAX);
|
||||
SyntaxError(source, "RESETPASS", NICK_RESETPASS_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_RESETPASS);
|
||||
source.Reply(NICK_HELP_CMD_RESETPASS);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -81,11 +81,13 @@ class NSResetPass : public Module
|
||||
ModuleManager::Attach(I_OnPreCommand, this);
|
||||
}
|
||||
|
||||
EventReturn OnPreCommand(User *u, BotInfo *service, const Anope::string &command, const std::vector<Anope::string> ¶ms)
|
||||
EventReturn OnPreCommand(CommandSource &source, Command *command, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
if (service == NickServ && command.equals_ci("CONFIRM") && !params.empty())
|
||||
User *u = source.u;
|
||||
BotInfo *service = source.owner;
|
||||
if (service == NickServ && command->name.equals_ci("CONFIRM") && !params.empty())
|
||||
{
|
||||
NickAlias *na = findnick(u->nick);
|
||||
NickAlias *na = findnick(source.u->nick);
|
||||
|
||||
time_t t;
|
||||
Anope::string c;
|
||||
@@ -95,7 +97,7 @@ class NSResetPass : public Module
|
||||
{
|
||||
na->nc->Shrink("ns_resetpass_code");
|
||||
na->nc->Shrink("ns_resetpass_time");
|
||||
u->SendMessage(service, NICK_CONFIRM_EXPIRED);
|
||||
source.Reply(NICK_CONFIRM_EXPIRED);
|
||||
return EVENT_STOP;
|
||||
}
|
||||
|
||||
@@ -115,7 +117,7 @@ class NSResetPass : public Module
|
||||
FOREACH_MOD(I_OnNickIdentify, OnNickIdentify(u));
|
||||
|
||||
Log(LOG_COMMAND, u, &commandnsresetpass) << "confirmed RESETPASS to forcefully identify to " << na->nick;
|
||||
u->SendMessage(service, NICK_CONFIRM_SUCCESS, Config->s_NickServ.c_str());
|
||||
source.Reply(NICK_CONFIRM_SUCCESS, Config->s_NickServ.c_str());
|
||||
|
||||
if (ircd->vhost)
|
||||
do_on_id(u);
|
||||
@@ -126,7 +128,7 @@ class NSResetPass : public Module
|
||||
else
|
||||
{
|
||||
Log(LOG_COMMAND, u, &commandnsresetpass) << "invalid confirm passcode for " << na->nick;
|
||||
u->SendMessage(service, NICK_CONFIRM_INVALID);
|
||||
source.Reply(NICK_CONFIRM_INVALID);
|
||||
bad_password(u);
|
||||
}
|
||||
|
||||
|
||||
+22
-23
@@ -70,14 +70,14 @@ class CommandNSSASet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
if (subcommand.empty())
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_SASET_HEAD);
|
||||
source.Reply(NICK_HELP_SASET_HEAD);
|
||||
for (subcommand_map::iterator it = this->subcommands.begin(), it_end = this->subcommands.end(); it != it_end; ++it)
|
||||
it->second->OnServHelp(u);
|
||||
u->SendMessage(NickServ, NICK_HELP_SASET_TAIL);
|
||||
it->second->OnServHelp(source);
|
||||
source.Reply(NICK_HELP_SASET_TAIL);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -85,20 +85,20 @@ class CommandNSSASet : public Command
|
||||
Command *c = this->FindCommand(subcommand);
|
||||
|
||||
if (c)
|
||||
return c->OnHelp(u, subcommand);
|
||||
return c->OnHelp(source, subcommand);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(NickServ, u, "SASET", NICK_SASET_SYNTAX);
|
||||
SyntaxError(source, "SASET", NICK_SASET_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_SASET);
|
||||
source.Reply(NICK_HELP_CMD_SASET);
|
||||
}
|
||||
|
||||
bool AddSubcommand(Command *c)
|
||||
@@ -131,7 +131,6 @@ class CommandNSSASetDisplay : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
NickAlias *setter_na = findnick(params[0]);
|
||||
if (!setter_na)
|
||||
throw CoreException("NULL na in CommandNSSASetDisplay");
|
||||
@@ -145,25 +144,25 @@ class CommandNSSASetDisplay : public Command
|
||||
}
|
||||
|
||||
change_core_display(nc, params[1]);
|
||||
u->SendMessage(NickServ, NICK_SET_DISPLAY_CHANGED, nc->display.c_str());
|
||||
source.Reply(NICK_SET_DISPLAY_CHANGED, nc->display.c_str());
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_SASET_DISPLAY);
|
||||
source.Reply(NICK_HELP_SASET_DISPLAY);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
// XXX
|
||||
SyntaxError(NickServ, u, "SASET", NICK_SASET_SYNTAX);
|
||||
SyntaxError(source, "SASET", NICK_SASET_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_SASET_DISPLAY);
|
||||
source.Reply(NICK_HELP_CMD_SASET_DISPLAY);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -219,20 +218,20 @@ class CommandNSSASetPassword : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_SASET_PASSWORD);
|
||||
source.Reply(NICK_HELP_SASET_PASSWORD);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(NickServ, u, "SASET", NICK_SASET_SYNTAX);
|
||||
SyntaxError(source, "SASET", NICK_SASET_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_SASET_PASSWORD);
|
||||
source.Reply(NICK_HELP_CMD_SASET_PASSWORD);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ class CommandNSSASetNoexpire : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
NickAlias *na = findnick(params[0]);
|
||||
if (!na)
|
||||
throw CoreException("NULL na in CommandNSSASsetNoexpire");
|
||||
@@ -40,25 +39,25 @@ class CommandNSSASetNoexpire : public Command
|
||||
source.Reply(NICK_SASET_NOEXPIRE_OFF, na->nick.c_str());
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(u, "NOEXPIRE");
|
||||
this->OnSyntaxError(source, "NOEXPIRE");
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_SASET_NOEXPIRE);
|
||||
source.Reply(NICK_HELP_SASET_NOEXPIRE);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(NickServ, u, "SASET NOEXPIRE", NICK_SASET_NOEXPIRE_SYNTAX);
|
||||
SyntaxError(source, "SASET NOEXPIRE", NICK_SASET_NOEXPIRE_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_SASET_NOEXPIRE);
|
||||
source.Reply(NICK_HELP_CMD_SASET_NOEXPIRE);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -53,20 +53,20 @@ class CommandNSSendPass : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_SENDPASS);
|
||||
source.Reply(NICK_HELP_SENDPASS);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(NickServ, u, "SENDPASS", NICK_SENDPASS_SYNTAX);
|
||||
SyntaxError(source, "SENDPASS", NICK_SENDPASS_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_SENDPASS);
|
||||
source.Reply(NICK_HELP_CMD_SENDPASS);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+22
-22
@@ -64,14 +64,14 @@ class CommandNSSet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &subcommand)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
if (subcommand.empty())
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_SET_HEAD);
|
||||
source.Reply(NICK_HELP_SET_HEAD);
|
||||
for (subcommand_map::iterator it = this->subcommands.begin(), it_end = this->subcommands.end(); it != it_end; ++it)
|
||||
it->second->OnServHelp(u);
|
||||
u->SendMessage(NickServ, NICK_HELP_SET_TAIL);
|
||||
it->second->OnServHelp(source);
|
||||
source.Reply(NICK_HELP_SET_TAIL);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -79,20 +79,20 @@ class CommandNSSet : public Command
|
||||
Command *c = this->FindCommand(subcommand);
|
||||
|
||||
if (c)
|
||||
return c->OnHelp(u, subcommand);
|
||||
return c->OnHelp(source, subcommand);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &subcommand)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &subcommand)
|
||||
{
|
||||
SyntaxError(NickServ, u, "SET", NICK_SET_SYNTAX);
|
||||
SyntaxError(source, "SET", NICK_SET_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_SET);
|
||||
source.Reply(NICK_HELP_CMD_SET);
|
||||
}
|
||||
|
||||
bool AddSubcommand(Command *c)
|
||||
@@ -135,25 +135,25 @@ class CommandNSSetDisplay : public Command
|
||||
}
|
||||
|
||||
change_core_display(u->Account(), params[1]);
|
||||
u->SendMessage(NickServ, NICK_SET_DISPLAY_CHANGED, u->Account()->display.c_str());
|
||||
source.Reply(NICK_SET_DISPLAY_CHANGED, u->Account()->display.c_str());
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_SET_DISPLAY);
|
||||
source.Reply(NICK_HELP_SET_DISPLAY);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
// XXX
|
||||
SyntaxError(NickServ, u, "SET", NICK_SET_SYNTAX);
|
||||
SyntaxError(source, "SET", NICK_SET_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_SET_DISPLAY);
|
||||
source.Reply(NICK_HELP_CMD_SET_DISPLAY);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -198,21 +198,21 @@ class CommandNSSetPassword : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_SET_PASSWORD);
|
||||
source.Reply(NICK_HELP_SET_PASSWORD);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
// XXX
|
||||
SyntaxError(NickServ, u, "SET", NICK_SET_SYNTAX);
|
||||
SyntaxError(source, "SET", NICK_SET_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_SET_PASSWORD);
|
||||
source.Reply(NICK_HELP_CMD_SET_PASSWORD);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ class CommandNSSetAutoOp : public Command
|
||||
|
||||
CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
User *u = source.u;
|
||||
NickAlias *na = findnick(params[0]);
|
||||
if (!na)
|
||||
throw CoreException("NULL na in CommandNSSetAutoOp");
|
||||
@@ -41,25 +40,25 @@ class CommandNSSetAutoOp : public Command
|
||||
source.Reply(NICK_SASET_AUTOOP_OFF, nc->display.c_str());
|
||||
}
|
||||
else
|
||||
this->OnSyntaxError(u, "AUTOOP");
|
||||
this->OnSyntaxError(source, "AUTOOP");
|
||||
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_SET_AUTOOP);
|
||||
source.Reply(NICK_HELP_SET_AUTOOP);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(NickServ, u, "SET AUTOOP", NICK_SET_AUTOOP_SYNTAX);
|
||||
SyntaxError(source, "SET AUTOOP", NICK_SET_AUTOOP_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_SET_AUTOOP);
|
||||
source.Reply(NICK_HELP_CMD_SET_AUTOOP);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -70,20 +69,20 @@ class CommandNSSASetAutoOp : public CommandNSSetAutoOp
|
||||
{
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_SASET_AUTOOP);
|
||||
source.Reply(NICK_HELP_SASET_AUTOOP);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnSyntaxError(User *u, const Anope::string &)
|
||||
void OnSyntaxError(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
SyntaxError(NickServ, u, "SET AUTOOP", NICK_SASET_AUTOOP_SYNTAX);
|
||||
SyntaxError(source, "SET AUTOOP", NICK_SASET_AUTOOP_SYNTAX);
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_SASET_AUTOOP);
|
||||
source.Reply(NICK_HELP_CMD_SASET_AUTOOP);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -60,15 +60,15 @@ class CommandNSSetEmail : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_SET_EMAIL);
|
||||
source.Reply(NICK_HELP_SET_EMAIL);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_SET_EMAIL);
|
||||
source.Reply(NICK_HELP_CMD_SET_EMAIL);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -79,15 +79,15 @@ class CommandNSSASetEmail : public CommandNSSetEmail
|
||||
{
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_SASET_EMAIL);
|
||||
source.Reply(NICK_HELP_SASET_EMAIL);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_SASET_EMAIL);
|
||||
source.Reply(NICK_HELP_CMD_SASET_EMAIL);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -43,15 +43,15 @@ class CommandNSSetGreet : public Command
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_SET_GREET);
|
||||
source.Reply(NICK_HELP_SET_GREET);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_SET_GREET);
|
||||
source.Reply(NICK_HELP_CMD_SET_GREET);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -62,15 +62,15 @@ class CommandNSSASetGreet : public CommandNSSetGreet
|
||||
{
|
||||
}
|
||||
|
||||
bool OnHelp(User *u, const Anope::string &)
|
||||
bool OnHelp(CommandSource &source, const Anope::string &)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_SASET_GREET);
|
||||
source.Reply(NICK_HELP_SASET_GREET);
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnServHelp(User *u)
|
||||
void OnServHelp(CommandSource &source)
|
||||
{
|
||||
u->SendMessage(NickServ, NICK_HELP_CMD_SASET_GREET);
|
||||
source.Reply(NICK_HELP_CMD_SASET_GREET);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user