mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-11 11:39:02 -04:00
Incrased speed of apply_lines() (was too slow when banning 100 users)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@735 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
93784202ea
commit
32c49435b2
@ -1,5 +1,5 @@
|
||||
[Editors]
|
||||
Focused=43
|
||||
Focused=46
|
||||
Order=2,4,6,3,7,25,5,24,39,42,43,-1,1,46,0
|
||||
|
||||
[Editor_0]
|
||||
@ -14,8 +14,8 @@ LeftChar=1
|
||||
Open=1
|
||||
Top=0
|
||||
CursorCol=1
|
||||
CursorRow=2159
|
||||
TopLine=2134
|
||||
CursorRow=1
|
||||
TopLine=1
|
||||
LeftChar=1
|
||||
|
||||
[Editor_2]
|
||||
@ -295,9 +295,9 @@ LeftChar=1
|
||||
[Editor_38]
|
||||
Open=1
|
||||
Top=0
|
||||
CursorCol=1
|
||||
CursorRow=1
|
||||
TopLine=1
|
||||
CursorCol=30
|
||||
CursorRow=57
|
||||
TopLine=10
|
||||
LeftChar=1
|
||||
[Editor_39]
|
||||
Open=1
|
||||
@ -329,11 +329,11 @@ TopLine=618
|
||||
LeftChar=1
|
||||
[Editor_43]
|
||||
Open=1
|
||||
Top=1
|
||||
CursorCol=75
|
||||
CursorRow=787
|
||||
TopLine=760
|
||||
LeftChar=39
|
||||
Top=0
|
||||
CursorCol=14
|
||||
CursorRow=1447
|
||||
TopLine=1420
|
||||
LeftChar=1
|
||||
[Editor_44]
|
||||
Open=1
|
||||
Top=0
|
||||
@ -350,8 +350,8 @@ TopLine=77
|
||||
LeftChar=1
|
||||
[Editor_46]
|
||||
Open=1
|
||||
Top=0
|
||||
CursorCol=1
|
||||
CursorRow=605
|
||||
TopLine=563
|
||||
Top=1
|
||||
CursorCol=2
|
||||
CursorRow=591
|
||||
TopLine=548
|
||||
LeftChar=1
|
||||
|
@ -541,6 +541,9 @@ void apply_lines()
|
||||
char reason[MAXBUF];
|
||||
char host[MAXBUF];
|
||||
|
||||
if ((!glines.size()) && (!klines.size()) && (!zlines.size()) && (!qlines.size()))
|
||||
return;
|
||||
|
||||
while (go_again)
|
||||
{
|
||||
go_again = false;
|
||||
@ -549,6 +552,8 @@ void apply_lines()
|
||||
if (!strcasecmp(u->second->server,ServerName))
|
||||
{
|
||||
snprintf(host,MAXBUF,"%s@%s",u->second->ident,u->second->host);
|
||||
if (glines.size())
|
||||
{
|
||||
char* check = matches_gline(host);
|
||||
if (check)
|
||||
{
|
||||
@ -559,13 +564,8 @@ void apply_lines()
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (user_hash::const_iterator u = clientlist.begin(); u != clientlist.end(); u++)
|
||||
if (klines.size())
|
||||
{
|
||||
if (!strcasecmp(u->second->server,ServerName))
|
||||
{
|
||||
snprintf(host,MAXBUF,"%s@%s",u->second->ident,u->second->host);
|
||||
char* check = matches_kline(host);
|
||||
if (check)
|
||||
{
|
||||
@ -576,11 +576,7 @@ void apply_lines()
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (user_hash::const_iterator u = clientlist.begin(); u != clientlist.end(); u++)
|
||||
{
|
||||
if (!strcasecmp(u->second->server,ServerName))
|
||||
if (qlines.size())
|
||||
{
|
||||
char* check = matches_qline(u->second->nick);
|
||||
if (check)
|
||||
@ -593,11 +589,7 @@ void apply_lines()
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (user_hash::const_iterator u = clientlist.begin(); u != clientlist.end(); u++)
|
||||
{
|
||||
if (!strcasecmp(u->second->server,ServerName))
|
||||
if (zlines.size())
|
||||
{
|
||||
char* check = matches_zline(u->second->ip);
|
||||
if (check)
|
||||
@ -610,7 +602,7 @@ void apply_lines()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user