소스 검색

* Fix '+user user' with no hostmask adding the hostmask '*!*@' to the user.

Bryan Drewery 16 년 전
부모
커밋
1f7e41fb47
2개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 0
      doc/UPDATES
  2. 2 2
      src/cmds.c

+ 1 - 0
doc/UPDATES

@@ -73,6 +73,7 @@
   * Bot now attempts to join a channel immediately on invite.
   * Fix bot not setting 'chanmode' channel modes when getting opped.
   * Fix bot forgetting server uptime on restart
+  * Fix '+user user' with no hostmask adding the hostmask '*!*@' to the user.
 * Misc changes
   * Cleanup DCC/Telnet listening so bot only listens on IPV6 if it was specifically given an IPV6 IP.
   * CTCP bot CHAT will no longer work if the bot does not have an IPV4 IP set.

+ 2 - 2
src/cmds.c

@@ -3415,7 +3415,7 @@ static void cmd_pls_user(int idx, char *par)
 
     char ahost[UHOSTLEN] = "", *phost = NULL;
 
-    if (!strchr(host, '!')) {
+    if (host[0] && !strchr(host, '!')) {
       if (!strchr(host, '@')) {
         simple_snprintf(ahost, sizeof(ahost), "*!*@%s", host);
       } else
@@ -3430,7 +3430,7 @@ static void cmd_pls_user(int idx, char *par)
     u2 = get_user_by_handle(userlist, handle);
     simple_snprintf(tmp, sizeof(tmp), "%li %s", (long)now, dcc[idx].nick);
     set_user(&USERENTRY_ADDED, u2, tmp);
-    dprintf(idx, "Added %s (%s) with no flags.\n", handle, phost);
+    dprintf(idx, "Added %s (%s) with no flags.\n", handle, phost[0] ? phost : "no host");
     while (par[0]) {
       phost = 0;
       ahost[0] = 0;