summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-11-29 11:59:55 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-11-29 11:59:55 +0000
commit35ac0e70f91f17f6d150fa99819f4bc88071d9c6 (patch)
treef5744a4f6267b07e4beeee54aacb27442c805735 /src/modules
parent6cbbd3911dbe9d3edf876695b0d080d24f7854a1 (diff)
Added support for NOTICE
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2006 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_spanningtree.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index ca16014c7..cd35e824d 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -1225,6 +1225,33 @@ class ModuleSpanningTree : public Module
return 0;
}
+ virtual void OnUserNotice(userrec* user, void* dest, int target_type, std::string text)
+ {
+ if (target_type == TYPE_USER)
+ {
+ userrec* d = (userrec*)dest;
+ if ((std::string(d->server) != Srv->GetServerName()) && (std::string(user->server) == Srv->GetServerName()))
+ {
+ std::deque<std::string> params;
+ params.clear();
+ params.push_back(d->nick);
+ params.push_back(":"+text);
+ DoOneToOne(user->nick,"NOTICE",params,d->server);
+ }
+ }
+ else
+ {
+ if (std::string(user->server) == Srv->GetServerName())
+ {
+ chanrec *c = (chanrec*)dest;
+ std::deque<std::string> params;
+ params.push_back(c->name);
+ params.push_back(":"+text);
+ DoOneToMany(user->nick,"NOTICE",params);
+ }
+ }
+ }
+
virtual void OnUserMessage(userrec* user, void* dest, int target_type, std::string text)
{
if (target_type == TYPE_USER)