]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Add <options:announcets> to output the "TS for #chan changed from 1111 to 2222".
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Thu, 5 Oct 2006 08:08:31 +0000 (08:08 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Thu, 5 Oct 2006 08:08:31 +0000 (08:08 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5417 e03df62e-2008-0410-955e-edbf42e46eb7

docs/inspircd.conf.example
src/modules/m_spanningtree.cpp

index a4b2f0f38acab96d579c8bbb0514509ea8e9efef..a3ecbe557fc3690ceb8209b2836afb4778ba8990 100644 (file)
 #                  this can save a lot of resources on very busy irc  #
 #                  servers.                                           #
 #                                                                     #
-#  syntaxhints   - If set to 'yes', 'true' or '1', when a user does    #
+#  syntaxhints   - If set to 'yes', 'true' or '1', when a user does   #
 #                  not give enough parameters for a command, a syntax #
 #                  hint will be given (using the RPL_TEXT numeric)    #
 #                  as well as the standard ERR_NEEDMOREPARAMS.        #
 #                                                                     #
+#  announcets    - If this value is defined to 'yes', 'true' or '1',  #
+#                  then if a channel's timestamp is updated the users #
+#                  on the channel will be informed of the change via  #
+#                  a server notice to the channel with the old and    #
+#                  new TS values in the timestamp. If you think this  #
+#                  is just pointless noise, define the value to 0.    #
+#                                                                     #
 
 <options prefixquit="Quit: "
          loglevel="default"
         nouserdns="no"
         syntaxhints="no"
         cyclehosts="yes"
+        announcets="yes"
          allowhalfop="yes">
 
 
index 53f5d29093684c1f06014d0dc7ecb017eae13e76..4138d382705254de40544eabe843ca7a26e937cd 100644 (file)
@@ -114,6 +114,8 @@ void ReadConfiguration(bool rebind);
 bool FlatLinks;
 /* Hide U-Lined servers in /MAP and /LINKS */
 bool HideULines;
+/* Announce TS changes to channels on merge */
+bool AnnounceTSChange;
 
 std::vector<std::string> ValidIPs;
 
@@ -1606,7 +1608,10 @@ class TreeSocket : public InspSocket
                        if (chan)
                                chan->age = TS;
 
-                       /* XXX: Lower the TS here */
+                       /* Lower the TS here */
+                       if (AnnounceTSChange && chan)
+                               chan->WriteChannelWithServ(Instance->Config->ServerName,
+                               "TS for %s changed from %lu to %lu", chan->name, ourTS, TS);
                        ourTS = TS;
 
                        param_list.push_back(channel);
@@ -3753,6 +3758,7 @@ void ReadConfiguration(bool rebind)
        }
        FlatLinks = Conf->ReadFlag("options","flatlinks",0);
        HideULines = Conf->ReadFlag("options","hideulines",0);
+       AnnounceTSChange = Conf->ReadFlag("options","announcets",0);
        LinkBlocks.clear();
        ValidIPs.clear();
        for (int j =0; j < Conf->Enumerate("link"); j++)