From d27c54486f3e5656445b43affd37f17d1338a6ce Mon Sep 17 00:00:00 2001 From: Hans Nielsen Date: Tue, 24 Jun 2014 23:01:06 -0700 Subject: [PATCH] Change around connection signals in proxy module Change "proxy client connected" to "proxy client connecting" to avoid being confused by clients that have connected but not necessarily authenticated. Emit "proxy client connected" once authenticated, keeping the name for backwards compatibility. --- src/irc/proxy/listen.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/irc/proxy/listen.c b/src/irc/proxy/listen.c index 33392285..8f8ebe99 100644 --- a/src/irc/proxy/listen.c +++ b/src/irc/proxy/listen.c @@ -126,6 +126,9 @@ static void handle_client_connect_cmd(CLIENT_REC *client, /* client didn't send us PASS, kill it */ remove_client(client); } else { + signal_emit("proxy client connected", 1, client); + printtext(NULL, NULL, MSGLEVEL_CLIENTNOTICE, + "Proxy: Client finished connecting from %s", client->host); client->connected = TRUE; proxy_dump_data(client); } @@ -361,9 +364,9 @@ static void sig_listen(LISTEN_REC *listen) proxy_clients = g_slist_prepend(proxy_clients, rec); rec->listen->clients = g_slist_prepend(rec->listen->clients, rec); - signal_emit("proxy client connected", 1, rec); + signal_emit("proxy client connecting", 1, rec); printtext(NULL, NULL, MSGLEVEL_CLIENTNOTICE, - "Proxy: Client connected from %s", rec->host); + "Proxy: Client connecting from %s", rec->host); } static void sig_incoming(IRC_SERVER_REC *server, const char *line)