aboutsummaryrefslogtreecommitdiffstats
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authorGravatar brain2005-04-04 17:55:48 +0000
committerGravatar brain2005-04-04 17:55:48 +0000
commitb54f879f3539c298646449ede2e8d458fc305605 (patch)
tree69b852c9896b8efb214a2a208efeb825cf56c2c9 /src/inspircd.cpp
parentAdded m_operlevels, prevents opers designated as above other opers from being... (diff)
Added E:Lines, a form of ban exception that can prevent opers, netadmins etc from being glined. Can be added and removed
either in the config or by an oper with the correct permissions to use the /ELINE command git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@975 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp42
1 files changed, 24 insertions, 18 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index d979750b5..2ef0b53bc 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -2243,8 +2243,10 @@ 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* e = matches_exception(ip);
+ if ((r) && (!e))
{
char reason[MAXBUF];
snprintf(reason,MAXBUF,"Z-Lined: %s",r);
@@ -2375,23 +2377,26 @@ void FullConnectUser(userrec* user)
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_silent(user,reason);
- return;
- }
-
- r = matches_kline(user->host);
- if (r)
- {
- char reason[MAXBUF];
- snprintf(reason,MAXBUF,"K-Lined: %s",r);
- kill_link_silent(user,reason);
- return;
- }
+ char* e = matches_exception(match_against);
+ if (!e)
+ {
+ char* r = matches_gline(match_against);
+ if (r)
+ {
+ char reason[MAXBUF];
+ snprintf(reason,MAXBUF,"G-Lined: %s",r);
+ kill_link_silent(user,reason);
+ return;
+ }
+ r = matches_kline(user->host);
+ if (r)
+ {
+ char reason[MAXBUF];
+ snprintf(reason,MAXBUF,"K-Lined: %s",r);
+ kill_link_silent(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);
@@ -2967,6 +2972,7 @@ void SetupCommandTable(void)
createcommand("GLINE",handle_gline,'o',1);
createcommand("ZLINE",handle_zline,'o',1);
createcommand("QLINE",handle_qline,'o',1);
+ createcommand("ELINE",handle_eline,'o',1);
createcommand("SERVER",handle_server,0,0);
}