From ff13d00eb50a228e05c4c37b0757082ca8bc9e4a Mon Sep 17 00:00:00 2001 From: Adam- Date: Sat, 16 Jan 2010 06:57:14 +0000 Subject: Removed c_userlist and u_chanlist, replaced with std::list git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2764 5417fbe8-f217-4b02-8779-1006273d7864 --- src/core/os_chankill.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/core/os_chankill.c') diff --git a/src/core/os_chankill.c b/src/core/os_chankill.c index ee3038a07..bdb3ecc69 100644 --- a/src/core/os_chankill.c +++ b/src/core/os_chankill.c @@ -28,7 +28,6 @@ class CommandOSChanKill : public Command char reason[BUFSIZE]; time_t expires; char mask[USERMAX + HOSTMAX + 2]; - struct c_userlist *cu, *cunext; unsigned last_param = 1; Channel *c; @@ -70,15 +69,17 @@ class CommandOSChanKill : public Command if ((c = findchan(channel))) { - for (cu = c->users; cu; cu = cunext) + for (CUserList::iterator it = c->users.begin(); it != c->users.end();) { - cunext = cu->next; - if (is_oper(cu->user)) + UserContainer *uc = *it++; + + if (is_oper(uc->user)) continue; + strlcpy(mask, "*@", sizeof(mask)); /* Use *@" for the akill's, */ - strlcat(mask, cu->user->host, sizeof(mask)); + strlcat(mask, uc->user->host, sizeof(mask)); add_akill(NULL, mask, Config.s_OperServ, expires, realreason.c_str()); - check_akill(cu->user->nick.c_str(), cu->user->GetIdent().c_str(), cu->user->host, NULL, NULL); + check_akill(uc->user->nick.c_str(), uc->user->GetIdent().c_str(), uc->user->host, NULL, NULL); } if (Config.WallOSAkill) ircdproto->SendGlobops(findbot(Config.s_OperServ), "%s used CHANKILL on %s (%s)", u->nick.c_str(), channel, realreason.c_str()); -- cgit