]> jfr.im git - irc/quakenet/newserv.git/commitdiff
Someone figured out how to print the ip, nterfacer now shows bad IP connections.
authorChris Porter <redacted>
Thu, 14 Aug 2008 22:35:33 +0000 (23:35 +0100)
committerChris Porter <redacted>
Thu, 14 Aug 2008 22:35:33 +0000 (23:35 +0100)
nterfacer/nterfacer.c

index 604de3ca7fcc25c1617937c14059bccae98b7573..70e9ed411d8811741a7dbc4efafa2bbd5a3a61c5 100644 (file)
@@ -15,6 +15,8 @@
 #include <netdb.h>
 #include <string.h>
 #include <strings.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
 
 #include "../lib/sstring.h"
 #include "../lib/irc_string.h"
@@ -363,8 +365,7 @@ void nterfacer_accept_event(struct esocket *socket) {
   }
 
   if(!item) {
-    /* Someone needs to figure out how to print the IP :) */
-    nterface_log(nrl, NL_INFO, "Unauthorised connection closed");
+    nterface_log(nrl, NL_INFO, "Unauthorised connection from %s closed", inet_ntoa(sin.sin_addr));
     close(newfd);
     return;
   }