summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2018-08-14 00:17:03 +0100
committerPeter Powell <petpow@saberuk.com>2018-08-14 00:18:13 +0100
commit10b17a0e9f948b1dd4f69c9af1f55f712664d155 (patch)
treedac8e9e5f2ec9440f44d4f96b50dd41931e65bf1
parent23e29119f82a373e641b6bf9479c39149e36b1dd (diff)
Remove the OnInfo event.
This is not used by anything and On{Post,Pre}Command hooks can be used if people really want to add stuff to INFO.
-rw-r--r--include/modules.h14
-rw-r--r--src/coremods/core_info/cmd_info.cpp2
-rw-r--r--src/modules.cpp1
3 files changed, 2 insertions, 15 deletions
diff --git a/include/modules.h b/include/modules.h
index ba84c4ccc..4120f2cc9 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -212,7 +212,7 @@ enum Priority { PRIORITY_FIRST, PRIORITY_LAST, PRIORITY_BEFORE, PRIORITY_AFTER }
enum Implementation
{
I_OnUserConnect, I_OnUserQuit, I_OnUserDisconnect, I_OnUserJoin, I_OnUserPart,
- I_OnSendSnotice, I_OnUserPreJoin, I_OnUserPreKick, I_OnUserKick, I_OnOper, I_OnInfo,
+ I_OnSendSnotice, I_OnUserPreJoin, I_OnUserPreKick, I_OnUserKick, I_OnOper,
I_OnUserPreInvite, I_OnUserInvite, I_OnUserPreMessage, I_OnUserPreNick,
I_OnUserPostMessage, I_OnUserMessageBlocked, I_OnMode,
I_OnDecodeMetaData, I_OnAcceptConnection, I_OnUserInit,
@@ -457,18 +457,6 @@ class CoreExport Module : public classbase, public usecountbase
*/
virtual void OnPostDeoper(User* user);
- /** Called whenever a user types /INFO.
- * The User will contain the information of the user who typed the command. Modules may use this
- * method to output their own credits in /INFO (which is the ircd's version of an about box).
- * It is purposefully not possible to modify any info that has already been output, or halt the list.
- * You must write a 371 numeric to the user, containing your info in the following format:
- *
- * &lt;nick&gt; :information here
- *
- * @param user The user issuing /INFO
- */
- virtual void OnInfo(User* user);
-
/** Called whenever a user is about to invite another user into a channel, before any processing is done.
* Returning 1 from this function stops the process immediately, causing no
* output to be sent to the user by the core. If you do this you must produce your own numerics,
diff --git a/src/coremods/core_info/cmd_info.cpp b/src/coremods/core_info/cmd_info.cpp
index 89e92e5a8..54aa7e16e 100644
--- a/src/coremods/core_info/cmd_info.cpp
+++ b/src/coremods/core_info/cmd_info.cpp
@@ -85,7 +85,7 @@ CmdResult CommandInfo::Handle(User* user, const Params& parameters)
int i=0;
while (lines[i])
user->WriteRemoteNumeric(RPL_INFO, lines[i++]);
- FOREACH_MOD(OnInfo, (user));
+
user->WriteRemoteNumeric(RPL_ENDOFINFO, "End of /INFO list");
return CMD_SUCCESS;
}
diff --git a/src/modules.cpp b/src/modules.cpp
index 7912fb569..866138728 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -83,7 +83,6 @@ void Module::OnMode(User*, User*, Channel*, const Modes::ChangeList&, ModeParse
void Module::OnOper(User*, const std::string&) { DetachEvent(I_OnOper); }
void Module::OnPostOper(User*, const std::string&, const std::string &) { DetachEvent(I_OnPostOper); }
void Module::OnPostDeoper(User*) { DetachEvent(I_OnPostDeoper); }
-void Module::OnInfo(User*) { DetachEvent(I_OnInfo); }
ModResult Module::OnUserPreInvite(User*, User*, Channel*, time_t) { DetachEvent(I_OnUserPreInvite); return MOD_RES_PASSTHRU; }
ModResult Module::OnUserPreMessage(User*, const MessageTarget&, MessageDetails&) { DetachEvent(I_OnUserPreMessage); return MOD_RES_PASSTHRU; }
ModResult Module::OnUserPreNick(LocalUser*, const std::string&) { DetachEvent(I_OnUserPreNick); return MOD_RES_PASSTHRU; }