summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorGravatar brain2006-07-25 10:30:46 +0000
committerGravatar brain2006-07-25 10:30:46 +0000
commit3f3c60a3df68260bd82efa2fc00a1fbd6bb7d54e (patch)
treed8ca47978d07ba35926c5c8a80ac2a1af1a09292 /src/modules
parentFix NOTICE $* to go between servers (diff)
Allow PRIVMSG and NOTICE targets of $<servermask> to the module events (this wasnt trivial and is almost a damn feature)
git-svn-id: http://svn.inspircd.org/repository/branches/1_0_stable@4538 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_spanningtree.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index b37d8f450..e1c752627 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -3467,7 +3467,7 @@ class ModuleSpanningTree : public Module
DoOneToOne(user->nick,"NOTICE",params,d->server);
}
}
- else
+ else if (target_type == TYPE_CHANNEL)
{
if (user->fd > -1)
{
@@ -3486,6 +3486,14 @@ class ModuleSpanningTree : public Module
}
}
}
+ else if (target_type == TYPE_SERVER)
+ {
+ char* target = (char*)dest;
+ std::deque<std::string> par;
+ par.push_back(target);
+ par.push_back(":"+text);
+ DoOneToMany(user->nick,"NOTICE",par);
+ }
}
virtual void OnUserMessage(userrec* user, void* dest, int target_type, const std::string &text, char status)
@@ -3504,7 +3512,7 @@ class ModuleSpanningTree : public Module
DoOneToOne(user->nick,"PRIVMSG",params,d->server);
}
}
- else
+ else if (target_type == TYPE_CHANNEL)
{
if (user->fd > -1)
{
@@ -3523,6 +3531,14 @@ class ModuleSpanningTree : public Module
}
}
}
+ else if (target_type == TYPE_SERVER)
+ {
+ char* target = (char*)dest;
+ std::deque<std::string> par;
+ par.push_back(target);
+ par.push_back(":"+text);
+ DoOneToMany(user->nick,"PRIVMSG",par);
+ }
}
virtual void OnBackgroundTimer(time_t curtime)