diff options
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 618365c8b..f226f2af5 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -2102,6 +2102,14 @@ void AddClient(int socket, char* host, int port, bool iscached, char* ip) if (clientlist.size() == MAXCLIENTS) kill_link(clientlist[tempnick],"No more connections allowed in this class"); + + char* r = matches_zline(ip); + if (r) + { + char reason[MAXBUF]; + snprintf(reason,MAXBUF,"Z-Lined: %s",r); + kill_link(clientlist[tempnick],reason); + } } @@ -2225,6 +2233,26 @@ void ConnectUser(userrec *user) return; } + char match_against[MAXBUF]; + snprintf(match_against,MAXBUF,"%s@%s",user->ident,user->host); + char* r = matches_gline(match_against); + if (r) + { + char reason[MAXBUF]; + snprintf(reason,MAXBUF,"G-Lined: %s",r); + kill_link(user,reason); + return; + } + + r = matches_kline(user->host); + if (r) + { + char reason[MAXBUF]; + snprintf(reason,MAXBUF,"K-Lined: %s",r); + kill_link(user,reason); + return; + } + WriteServ(user->fd,"NOTICE Auth :Welcome to \002%s\002!",Network); WriteServ(user->fd,"001 %s :Welcome to the %s IRC Network %s!%s@%s",user->nick,Network,user->nick,user->ident,user->host); WriteServ(user->fd,"002 %s :Your host is %s, running version %s",user->nick,ServerName,VERSION); |