Permalink
Browse files

Fix +bot IPv6 display format

Old message:
.+bot testbot [fd15:4ba5:5a2b:1008:c5c6:bbd0:483e:4492] 4444/5555
Added bot 'testbot' with address [[fd15:4ba5:5a2b:1008:c5c6:bbd0:483e:4492]]:4444/5555 and no hostmask.
New message:
Added bot 'testbot' with address [fd15:4ba5:5a2b:1008:c5c6:bbd0:483e:4492]:4444/5555 and no hostmask.
  • Loading branch information...
vanosg committed Nov 24, 2017
1 parent c169a73 commit 48983f399adc457a7ce32f5b9b95497868f76923
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/cmds.c
View
@@ -904,6 +904,11 @@ static void cmd_pls_bot(struct userrec *u, int idx, char *par)
putlog(LOG_CMDS, "*", "#%s# +bot %s %s%s%s%s%s %s%s", dcc[idx].nick, handle,
addr, port ? " " : "", port ? port : "", relay ? " " : "",
relay ? relay : "", host[0] ? " " : "", host);
/* Trim IPv6 []s out for display purposes */
if (addr[0] == '[') {
addr[strlen(addr)-1] = 0;
memmove(addr, addr + 1, strlen(addr));
}
#ifdef TLS
dprintf(idx, "Added bot '%s' with address [%s]:%s%d/%s%d and %s%s%s.\n",
handle, addr, (bi->ssl & TLS_BOT) ? "+" : "", bi->telnet_port,

0 comments on commit 48983f3

Please sign in to comment.