1
0
mirror of https://github.com/anope/anope.git synced 2026-07-01 16:46:38 +02:00

BUILD : 1.7.6 (506) BUGS : 260 NOTES : Fixed segfaults in the user-list walking with KillonSGline/KillonSQline

git-svn-id: svn://svn.anope.org/anope/trunk@506 31f1291d-b8d6-0310-a050-a5561fc1590b


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@360 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b
2004-12-27 19:29:09 +00:00
parent d0b1978f62
commit 003f690519
3 changed files with 22 additions and 17 deletions
+16 -16
View File
@@ -2521,7 +2521,7 @@ int add_sgline(User * u, char *mask, const char *by, const time_t expires,
int deleted = 0, i;
int x;
SXLine *entry;
User *u2;
User *u2, *next;
char buf[BUFSIZE];
*buf = '\0';
@@ -2600,14 +2600,14 @@ int add_sgline(User * u, char *mask, const char *by, const time_t expires,
anope_cmd_sgline(entry->mask, entry->reason);
if (KillonSGline && !ircd->sglineenforce) {
for (x = 0; x < 1024; x++) {
for (u2 = userlist[x]; u2; u2 = u2->next) {
if (match_wild_nocase(entry->mask, u2->realname)) {
snprintf(buf, BUFSIZE - 1, "G-Lined: %s",
entry->reason);
kill_user(ServerName, u2->nick, buf);
}
u2 = firstuser();
while (u2) {
next = nextuser();
if (match_wild_nocase(entry->mask, u2->realname)) {
snprintf(buf, (BUFSIZE - 1), "G-Lined: %s", entry->reason);
kill_user(ServerName, u2->nick, buf);
}
u2 = next;
}
}
return deleted;
@@ -2988,7 +2988,7 @@ int add_sqline(User * u, char *mask, const char *by, const time_t expires,
{
int deleted = 0, i;
int x;
User *u2;
User *u2, *next;
SXLine *entry;
char buf[BUFSIZE];
*buf = '\0';
@@ -3072,14 +3072,14 @@ int add_sqline(User * u, char *mask, const char *by, const time_t expires,
sqline(entry->mask, entry->reason);
if (KillonSQline) {
for (x = 0; x < 1024; x++) {
for (u2 = userlist[x]; u2; u2 = u2->next) {
if (match_wild_nocase(entry->mask, u2->nick)) {
snprintf(buf, BUFSIZE - 1, "Q-Lined: %s",
entry->reason);
kill_user(ServerName, u2->nick, buf);
}
u2 = firstuser();
while (u2) {
next = nextuser();
if (match_wild_nocase(entry->mask, u2->nick)) {
snprintf(buf, (BUFSIZE - 1), "Q-Lined: %s", entry->reason);
kill_user(ServerName, u2->nick, buf);
}
u2 = next;
}
}