summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-03-22 11:45:57 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-03-22 11:45:57 +0000
commit9ee525bec55521e9d911df40c2d8ca8b0212ee22 (patch)
tree38aa3a31ea0fed7db88d920bd3ab5c55fb276f81 /include
parentbec3231f00ba89deeb2c6d05022ed3071843e915 (diff)
Add WriteNumeric() to User and OnNumeric module event. Note that modules do not change the numeric text on the fly, as this involves needless allocations for numerics that arent being changed, so instead they block the original numeric and send out their own when needed.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9174 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/modules.h4
-rw-r--r--include/users.h4
2 files changed, 7 insertions, 1 deletions
diff --git a/include/modules.h b/include/modules.h
index af36b7023..693fd41fb 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -401,7 +401,7 @@ enum Implementation
I_OnRawSocketAccept, I_OnRawSocketClose, I_OnRawSocketWrite, I_OnRawSocketRead, I_OnChangeLocalUserGECOS, I_OnUserRegister,
I_OnChannelPreDelete, I_OnChannelDelete, I_OnPostOper, I_OnSyncOtherMetaData, I_OnSetAway, I_OnCancelAway, I_OnUserList,
I_OnPostCommand, I_OnPostJoin, I_OnWhoisLine, I_OnBuildExemptList, I_OnRawSocketConnect, I_OnGarbageCollect, I_OnBufferFlushed,
- I_OnText, I_OnReadConfig, I_OnDownloadFile, I_OnPassCompare, I_OnRunTestSuite, I_OnNamesListItem,
+ I_OnText, I_OnReadConfig, I_OnDownloadFile, I_OnPassCompare, I_OnRunTestSuite, I_OnNamesListItem, I_OnNumeric,
I_END
};
@@ -1363,6 +1363,8 @@ class CoreExport Module : public Extensible
* module, then this will cause the nickname not to be displayed at all.
*/
virtual void OnNamesListItem(User* issuer, User* user, Channel* channel, std::string &prefixes, std::string &nick);
+
+ virtual int OnNumeric(User* user, unsigned int numeric, const std::string &text);
};
diff --git a/include/users.h b/include/users.h
index a63dd7cc6..d1f61932e 100644
--- a/include/users.h
+++ b/include/users.h
@@ -923,6 +923,10 @@ class CoreExport User : public connection
*/
void WriteServ(const char* text, ...);
+ void WriteNumeric(unsigned int numeric, const char* text, ...);
+
+ void WriteNumeric(unsigned int numeric, const std::string &text);
+
/** Write text to this user, appending CR/LF and prepending :nick!user@host of the user provided in the first parameter.
* @param user The user to prepend the :nick!user@host of
* @param text A std::string to send to the user