From: brain Date: Mon, 23 Jan 2006 19:20:45 +0000 (+0000) Subject: Patched to allow FTOPIC from users (so that chanserv can update the settime and the... X-Git-Tag: v2.0.23~9213 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=7549a4d047a4d24ee4d30ac1d25115afe5a7e111;p=user%2Fhenk%2Fcode%2Finspircd.git 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 --- 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; }