mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 20:33:46 +02:00
fix /server modify port argument order
This commit is contained in:
parent
85a9dc146d
commit
4943cc5e58
2 changed files with 8 additions and 6 deletions
|
|
@ -124,17 +124,17 @@ static void cmd_server_add_modify(const char *data, gboolean add)
|
|||
|
||||
port = old_port = -1;
|
||||
|
||||
if (*portstr != '\0')
|
||||
port = add_port = atoi(portstr);
|
||||
value = g_hash_table_lookup(optlist, "port");
|
||||
if (value != NULL && *value != '\0')
|
||||
port = add_port = atoi(value);
|
||||
else if (g_hash_table_lookup(optlist, "tls") ||
|
||||
g_hash_table_lookup(optlist, "ssl"))
|
||||
add_port = DEFAULT_SERVER_ADD_TLS_PORT;
|
||||
else
|
||||
add_port = DEFAULT_SERVER_ADD_PORT;
|
||||
|
||||
value = g_hash_table_lookup(optlist, "port");
|
||||
if (value != NULL && *value != '\0')
|
||||
old_port = atoi(value);
|
||||
if (*portstr != '\0')
|
||||
old_port = atoi(portstr);
|
||||
|
||||
chatnet = g_hash_table_lookup(optlist, "network");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue