summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-09-25 00:45:12 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-09-25 00:45:12 +0000
commit44898de87edde278d586494d20ba29ce0763fb32 (patch)
treea476aa67885b8abb19bab46d6bf46cf1feb70b46
parentfd5f65b6f5c1848c7922c3820a90f6020abbabb1 (diff)
Fix for bug #415, affects only trunk (wish i'd known this before i started!)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8079 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--include/modules.h3
-rw-r--r--src/modules.cpp2
-rw-r--r--src/modules/m_deaf.cpp9
-rw-r--r--src/modules/m_silence_ext.cpp2
-rw-r--r--src/modules/m_spanningtree/utils.cpp2
5 files changed, 12 insertions, 6 deletions
diff --git a/include/modules.h b/include/modules.h
index a36b6f0b3..c7c61c221 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -678,8 +678,9 @@ class CoreExport Module : public Extensible
* @param sender The original sender of the PRIVMSG or NOTICE
* @param status The status char to be used for the channel list
* @param exempt_list The exempt list to be populated
+ * @param text The original message text causing the exempt list to be built
*/
- virtual void OnBuildExemptList(MessageType message_type, chanrec* chan, userrec* sender, char status, CUList &exempt_list);
+ virtual void OnBuildExemptList(MessageType message_type, chanrec* chan, userrec* sender, char status, CUList &exempt_list, const std::string &text);
/** Called before any nickchange, local or remote. This can be used to implement Q-lines etc.
* Please note that although you can see remote nickchanges through this function, you should
diff --git a/src/modules.cpp b/src/modules.cpp
index 1bfe37608..3bd4886a4 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -191,7 +191,7 @@ void Module::OnSetAway(userrec* user) { }
void Module::OnCancelAway(userrec* user) { }
int Module::OnUserList(userrec* user, chanrec* Ptr, CUList* &userlist) { return 0; }
int Module::OnWhoisLine(userrec* user, userrec* dest, int &numeric, std::string &text) { return 0; }
-void Module::OnBuildExemptList(MessageType message_type, chanrec* chan, userrec* sender, char status, CUList &exempt_list) { }
+void Module::OnBuildExemptList(MessageType message_type, chanrec* chan, userrec* sender, char status, CUList &exempt_list, const std::string &text) { }
void Module::OnGarbageCollect() { }
void Module::OnBufferFlushed(userrec* user) { }
diff --git a/src/modules/m_deaf.cpp b/src/modules/m_deaf.cpp
index b5328f785..1689f843c 100644
--- a/src/modules/m_deaf.cpp
+++ b/src/modules/m_deaf.cpp
@@ -68,7 +68,7 @@ class ModuleDeaf : public Module
void Implements(char* List)
{
- List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = List[I_OnRehash] = 1;
+ List[I_OnUserPreMessage] = List[I_OnUserPreNotice] = List[I_OnRehash] = List[I_OnBuildExemptList] = 1;
}
virtual void OnRehash(userrec* user, const std::string&)
@@ -104,7 +104,12 @@ class ModuleDeaf : public Module
return 0;
}
- virtual void BuildDeafList(MessageType message_type, chanrec* chan, userrec* sender, char status, std::string &text, CUList &exempt_list)
+ virtual void OnBuildExemptList(MessageType message_type, chanrec* chan, userrec* sender, char status, CUList &exempt_list, const std::string &text)
+ {
+ BuildDeafList(message_type, chan, sender, status, text, exempt_list);
+ }
+
+ virtual void BuildDeafList(MessageType message_type, chanrec* chan, userrec* sender, char status, const std::string &text, CUList &exempt_list)
{
CUList *ulist;
bool is_a_uline;
diff --git a/src/modules/m_silence_ext.cpp b/src/modules/m_silence_ext.cpp
index 3c1dcec27..71f37ccb1 100644
--- a/src/modules/m_silence_ext.cpp
+++ b/src/modules/m_silence_ext.cpp
@@ -274,7 +274,7 @@ class ModuleSilence : public Module
output = output + " ESILENCE SILENCE=" + ConvToStr(maxsilence);
}
- virtual void OnBuildExemptList(MessageType message_type, chanrec* chan, userrec* sender, char status, CUList &exempt_list)
+ virtual void OnBuildExemptList(MessageType message_type, chanrec* chan, userrec* sender, char status, CUList &exempt_list, const std::string &text)
{
int public_silence = (message_type == MSG_PRIVMSG ? SILENCE_CHANNEL : SILENCE_CNOTICE);
CUList *ulist;
diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp
index 0bf8dd994..6385b7a12 100644
--- a/src/modules/m_spanningtree/utils.cpp
+++ b/src/modules/m_spanningtree/utils.cpp
@@ -303,7 +303,7 @@ bool SpanningTreeUtilities::DoOneToAllButSenderRaw(const std::string &data, cons
{
CUList elist;
TreeServerList list;
- FOREACH_MOD(I_OnBuildExemptList, OnBuildExemptList((command == "PRIVMSG" ? MSG_PRIVMSG : MSG_NOTICE), c, u, pfx, elist));
+ FOREACH_MOD(I_OnBuildExemptList, OnBuildExemptList((command == "PRIVMSG" ? MSG_PRIVMSG : MSG_NOTICE), c, u, pfx, elist, params[1]));
GetListOfServersForChannel(c,list,pfx,elist);
for (TreeServerList::iterator i = list.begin(); i != list.end(); i++)