]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Patched to allow FTOPIC from users (so that chanserv can update the settime and the...
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 23 Jan 2006 19:20:45 +0000 (19:20 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 23 Jan 2006 19:20:45 +0000 (19:20 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2868 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_spanningtree.cpp

index 3d10a60be450094776526c04ad2de85d1ad84403..768657872577d7ae07fbf41789739ae0763fb29b 100644 (file)
@@ -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];
                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)
 
                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)
                                 * 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];
                        }
                        
                }
                
                /* all done, send it on its way */
                params[3] = ":" + params[3];
-               DoOneToAllButSender(source,"FTOPIC",params,source);
+               DoOneToAllButSender(source,"FTOPIC",params,nsource);
 
                return true;
        }
 
                return true;
        }