mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 20:33:46 +02:00
Throw an error when a chatnet has no available url
If you type /connect <CN> and the chatnet <CN> has no url available let's just throw an error instead of trying to process <CN> as a url.
This commit is contained in:
parent
795b7de808
commit
6745dd6159
6 changed files with 15 additions and 2 deletions
|
|
@ -73,6 +73,13 @@ static SERVER_CONNECT_REC *get_server_connect(const char *data, int *plus_addr,
|
|||
|
||||
conn = server_create_conn(proto != NULL ? proto->id : -1, addr,
|
||||
atoi(portstr), chatnet, password, nick);
|
||||
if (conn == NULL) {
|
||||
signal_emit("error command", 1,
|
||||
GINT_TO_POINTER(CMDERR_NO_SERVER_DEFINED));
|
||||
cmd_params_free(free_arg);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (proto == NULL)
|
||||
proto = chat_protocol_find_id(conn->chat_type);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue