svn: 2161
@@ -146,6 +146,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
* Fixed 'bots' not showing up in help, and a typo in 'botpart'.
* In config/-C, the ip field for bots can now be either ipv4 or ipv6. (ipv6 field still present)
* Clearing chanset var now correctly uses defaults.
+* Fixed cmd_jump/cmd_botjump not parsing 'server:port' correctly.
1.2.2
* Don't sanity check flags for users on DCC CHAT if they are on the bot via .botcmd.
@@ -3894,9 +3894,16 @@ static void cmd_botjump(int idx, char * par) {
static void rcmd_jump(char * frombot, char * fromhand, char * fromidx, char * par) {
if (!conf.bot->hub) {
if (par[0]) {
- char *other = newsplit(&par);
+ char *other = newsplit(&par), *p = NULL;
port_t port = atoi(newsplit(&par));
+ if ((p = strchr(other, ':'))) {
+ *p = 0;
+ p++;
+ if (!port)
+ port = atoi(p);
+ }
+
if (!port)
port = default_port;
strlcpy(newserver, other, 120);
@@ -46,12 +46,19 @@ static void cmd_dump(int idx, char *par)
static void cmd_jump(int idx, char *par)
{
- char *other = NULL;
+ char *other = NULL, *p = NULL;
int port;
other = newsplit(&par);
port = atoi(newsplit(&par));
putlog(LOG_CMDS, "*", "#%s# jump %s %d %s", dcc[idx].nick, other, port, par);