summaryrefslogtreecommitdiff
path: root/src/irc/proxy/listen.c
diff options
context:
space:
mode:
authorHans Nielsen <hans@stackallocated.com>2014-06-24 23:01:06 -0700
committerHans Nielsen <hans@stackallocated.com>2015-02-24 19:52:17 -0800
commitd27c54486f3e5656445b43affd37f17d1338a6ce (patch)
treee21012e73a0bedd800f34227503e2e11360fcb73 /src/irc/proxy/listen.c
parent1f87dd361eabf3b161014d8466aaaa466a76300f (diff)
downloadirssi-d27c54486f3e5656445b43affd37f17d1338a6ce.zip
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.
Diffstat (limited to 'src/irc/proxy/listen.c')
-rw-r--r--src/irc/proxy/listen.c7
1 files 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)