Browse Source

* Port [3000] to 1.2.11
* Hub nicks no longer show on leaf bots for partyline chat.


svn: 3002

Bryan Drewery 20 years ago
parent
commit
d0c2de9f49
2 changed files with 10 additions and 6 deletions
  1. 1 0
      doc/UPDATES
  2. 9 6
      src/botcmd.c

+ 1 - 0
doc/UPDATES

@@ -24,6 +24,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * cmd_bans/exempts/invites [global] now displays a list of bans for ALL channels. (fixes #276)
 * Fix a segfault with ctcp-cloak. (fairly random) (fixes #285)
 * Fixed cmd_botset not making a bot grab a different capitalization of a nick. (fixes #283)
+* Hub nicks no longer show on leaf bots for partyline chat.
 
 1.2.10 - http://tracker.shatow.net/milestone/1.2.10
 * Removed old references to '+/-manop' and '+/-nomop' for chaninfo in help file.

+ 9 - 6
src/botcmd.c

@@ -62,7 +62,15 @@ static void bot_chan2(int idx, char *msg)
   }
   p = strchr(from, '@');
   if (p) {
-    simple_snprintf(TBUF, sizeof(TBUF), "<%s> %s", from, msg);
+    if (!conf.bot->hub) { /* Need to strip out the hub nick */
+      char *q = NULL, newfrom[HANDLEN + 9 + 1]; /* HANDLEN@[botnet] */
+   
+      strlcpy(newfrom, from, sizeof(newfrom));
+      q = strchr(newfrom, '@');
+      *q = 0;
+      simple_snprintf(TBUF, sizeof(TBUF), "<%s@[botnet]> %s", newfrom, msg);
+    } else
+      simple_snprintf(TBUF, sizeof(TBUF), "<%s> %s", from, msg);
     *p = 0;
     if (!partyidle(p + 1, from)) {
       *p = '@';
@@ -83,11 +91,6 @@ static void bot_chan2(int idx, char *msg)
     /* Send to new version bots */
     if (i >= 0)
       botnet_send_chan(idx, from, NULL, chan, msg);
-/*    if (strchr(from, '@') != NULL)
-      check_bind_chat(from, chan, msg);
-    else
-      check_bind_bcst(from, chan, msg);
-*/
   }
 }