diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-01-23 19:20:45 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-01-23 19:20:45 +0000 |
commit | 7549a4d047a4d24ee4d30ac1d25115afe5a7e111 (patch) | |
tree | aec9be089956fef105413cfe62692c8af467ae36 /src | |
parent | 4f7fc4860825995e13a5c5ec40183662c254fde0 (diff) |
Patched to allow FTOPIC from users (so that chanserv can update the settime and the topic still come from chanserv)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2868 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 3d10a60be..768657872 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -854,6 +854,7 @@ class TreeSocket : public InspSocket time_t ts = atoi(params[1].c_str()); std::string setby = params[2]; std::string topic = params[3]; + std::string nsource = source; chanrec* c = Srv->FindChannel(channel); if (c) @@ -869,14 +870,27 @@ class TreeSocket : public InspSocket * update the set time and set nick. */ if (oldtopic != topic) - WriteChannelWithServ((char*)source.c_str(), c, "TOPIC %s :%s", c->name, c->topic); + { + userrec* user = Srv->FindNick(source); + if (!user) + { + WriteChannelWithServ((char*)source.c_str(), c, "TOPIC %s :%s", c->name, c->topic); + } + else + { + userrec* user = Srv->FindNick(source); + if (user) + WriteChannel(c, user "TOPIC %s :%s", c->name, c->topic); + nsource = user->server; + } + } } } /* all done, send it on its way */ params[3] = ":" + params[3]; - DoOneToAllButSender(source,"FTOPIC",params,source); + DoOneToAllButSender(source,"FTOPIC",params,nsource); return true; } |