diff options
Diffstat (limited to 'src/plugins/relay/irc/relay-irc.c')
-rw-r--r-- | src/plugins/relay/irc/relay-irc.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/plugins/relay/irc/relay-irc.c b/src/plugins/relay/irc/relay-irc.c index fea36430c..81f493c78 100644 --- a/src/plugins/relay/irc/relay-irc.c +++ b/src/plugins/relay/irc/relay-irc.c @@ -1430,6 +1430,7 @@ relay_irc_recv (struct t_relay_client *client, const char *data) weechat_hook_signal_send ("relay_client_auth_ok", WEECHAT_HOOK_SIGNAL_POINTER, client); + relay_client_set_status (client, RELAY_STATUS_CONNECTED); } free (password); } @@ -1904,6 +1905,18 @@ relay_irc_alloc_with_infolist (struct t_relay_client *client, } /* + * Returns the client initial status: it can be "waiting_auth" or "connected", + * depending if a password is expected or not. + */ + +enum t_relay_status +relay_irc_get_initial_status (struct t_relay_client *client) +{ + return (RELAY_IRC_DATA(client, password_ok)) ? + RELAY_STATUS_CONNECTED : RELAY_STATUS_WAITING_AUTH; +} + +/* * Frees relay data specific to IRC protocol. */ |