Committer  : entrope
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Commit time: 2005-08-19 11:47:02 UTC

Modified files:
     ChangeLog ircd/m_kill.c ircd/parse.c

Log message:

Substitute HIS_SERVERNAME in KILLs; fix SF bug #1263777.

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.675 ircu2.10/ChangeLog:1.676
--- ircu2.10/ChangeLog:1.675    Tue Aug 16 19:35:36 2005
+++ ircu2.10/ChangeLog  Fri Aug 19 04:46:51 2005
@@ -1,3 +1,14 @@
+2005-08-19  Michael Poole <[EMAIL PROTECTED]>
+
+       * ircd/parse.c (tok_tree): Re-add token tree structure.
+       (initmsgtree): Populate it.
+       (parse_server): Prefer it to full message tree.
+
+2005-08-18  Michael Poole <[EMAIL PROTECTED]>
+
+       * ircd/m_kill.c (do_kill): When FEAT_HIS_KILLWHO, change apparent
+       source of KILLs to &his instead of &me.
+
 2005-08-16  Michael Poole <[EMAIL PROTECTED]>
 
        * ircd/channel.c (mode_parse_ban): Avoid overwriting part of
Index: ircu2.10/ircd/m_kill.c
diff -u ircu2.10/ircd/m_kill.c:1.29 ircu2.10/ircd/m_kill.c:1.30
--- ircu2.10/ircd/m_kill.c:1.29 Sun Mar 20 08:06:18 2005
+++ ircu2.10/ircd/m_kill.c      Fri Aug 19 04:46:51 2005
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_kill.c,v 1.29 2005/03/20 16:06:18 entrope Exp $
+ * $Id: m_kill.c,v 1.30 2005/08/19 11:46:51 entrope Exp $
  */
 
 /*
@@ -151,12 +151,12 @@
    * always sees the kill as coming from me.
    */
   if (MyConnect(victim))
-    sendcmdto_one(feature_bool(FEAT_HIS_KILLWHO) ? &me : sptr, CMD_KILL, 
+    sendcmdto_one(feature_bool(FEAT_HIS_KILLWHO) ? &his : sptr, CMD_KILL,
                  victim, "%C :%s %s", victim, feature_bool(FEAT_HIS_KILLWHO)
                  ? feature_str(FEAT_HIS_SERVERNAME) : cli_name(sptr), msg);
   return exit_client_msg(cptr, victim, feature_bool(FEAT_HIS_KILLWHO)
-                        ? &me : sptr, "Killed (%s %s)",
-                        feature_bool(FEAT_HIS_KILLWHO) ? 
+                        ? &his : sptr, "Killed (%s %s)",
+                        feature_bool(FEAT_HIS_KILLWHO) ?
                         feature_str(FEAT_HIS_SERVERNAME) : cli_name(sptr),
                         msg);
 }
Index: ircu2.10/ircd/parse.c
diff -u ircu2.10/ircd/parse.c:1.52 ircu2.10/ircd/parse.c:1.53
--- ircu2.10/ircd/parse.c:1.52  Mon Jul 11 20:10:59 2005
+++ ircu2.10/ircd/parse.c       Fri Aug 19 04:46:52 2005
@@ -19,7 +19,7 @@
  */
 /** @file
  * @brief Parse input from IRC clients and other servers.
- * @version $Id: parse.c,v 1.52 2005/07/12 03:10:59 entrope Exp $
+ * @version $Id: parse.c,v 1.53 2005/08/19 11:46:52 entrope Exp $
  */
 #include "config.h"
 
@@ -102,6 +102,7 @@
 
 /** Root of command lookup trie. */
 static struct MessageTree msg_tree;
+static struct MessageTree tok_tree;
 
 /** Array of all supported commands. */
 struct Message msgtab[] = {
@@ -700,11 +701,12 @@
   int i;
 
   memset(&msg_tree, 0, sizeof(msg_tree));
+  memset(&tok_tree, 0, sizeof(tok_tree));
 
   for (i = 0; msgtab[i].cmd != NULL ; i++)
   {
     add_msg_element(&msg_tree, &msgtab[i], msgtab[i].cmd);
-    add_msg_element(&msg_tree, &msgtab[i], msgtab[i].tok);
+    add_msg_element(&tok_tree, &msgtab[i], msgtab[i].tok);
   }
 }
 
@@ -1134,7 +1136,12 @@
      * And for the record, this trie parser really does not care. - Dianora
      */
 
-    mptr = msg_tree_parse(ch, &msg_tree);
+    mptr = msg_tree_parse(ch, &tok_tree);
+
+    if (mptr == NULL)
+    {
+      mptr = msg_tree_parse(ch, &msg_tree);
+    }
 
     if (mptr == NULL)
     {
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches

Reply via email to