summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2019-09-16 19:18:02 +0100
committerLuke Bratch <luke@bratch.co.uk>2019-09-16 19:18:02 +0100
commita37c6010340f3bc755fcd7c54da13daea7645e42 (patch)
tree1220b2b958af005390f82219c8d44e29ec9cfd62
parentcbaaaf96ed8217933429e1e7bec93db35040ae99 (diff)
Correctly log and NOTICE new connections' remote IP addresses.
-rw-r--r--TODO4
-rw-r--r--blabouncer.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/TODO b/TODO
index b0eedee..b15bc9b 100644
--- a/TODO
+++ b/TODO
@@ -1 +1,5 @@
All the TODOs sprinkled throughout the code!
+
+User/channel mode logging.
+
+Make all log filenames lowercase since IRC nick and channel names are case insensitive.
diff --git a/blabouncer.c b/blabouncer.c
index a84266c..8648a49 100644
--- a/blabouncer.c
+++ b/blabouncer.c
@@ -797,11 +797,11 @@ void dochat(int *serversockfd, int *clientsockfd, struct settings *settings) {
// TODO - Handle the "find a free element" loop not finding a free element
debugprint(DEBUG_FULL, "bouncer-client: new connection from %s on socket %d\n",
- clients[arrindex(clients, i)].remoteip, newfd);
+ clients[arrindex(clients, newfd)].remoteip, newfd);
// Alert other clients about the new connection
char alertmsg[MAXDATASIZE];
if (!snprintf(alertmsg, MAXDATASIZE, "NOTICE %s :blabouncer: new client connected from %s.", ircdstate.ircnick,
- clients[arrindex(clients, i)].remoteip)) {
+ clients[arrindex(clients, newfd)].remoteip)) {
fprintf(stderr, "Error while preparing new client connection NOTICE!\n");
debugprint(DEBUG_CRIT, "Error while preparing new client connection NOTICE!\n");
alertmsg[0] = '\0';