summaryrefslogtreecommitdiff
path: root/src/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocol')
-rw-r--r--src/protocol/bahamut.c16
-rw-r--r--src/protocol/inspircd11.c16
-rw-r--r--src/protocol/inspircd12.cpp16
-rw-r--r--src/protocol/ratbox.c16
-rw-r--r--src/protocol/unreal32.c16
5 files changed, 45 insertions, 35 deletions
diff --git a/src/protocol/bahamut.c b/src/protocol/bahamut.c
index ac0647d41..e57604b8b 100644
--- a/src/protocol/bahamut.c
+++ b/src/protocol/bahamut.c
@@ -363,13 +363,15 @@ int anope_event_sjoin(const char *source, int ac, const char **av)
c->creation_time = ts;
/* Remove status from all of our users */
- for (struct c_userlist *cu = c->users; cu; cu = cu->next)
+ for (CUserList::iterator it = c->users.begin(); it != c->users.end(); ++it)
{
- c->RemoveMode(NULL, CMODE_OWNER, cu->user->nick);
- c->RemoveMode(NULL, CMODE_PROTECT, cu->user->nick);
- c->RemoveMode(NULL, CMODE_OP, cu->user->nick);
- c->RemoveMode(NULL, CMODE_HALFOP, cu->user->nick);
- c->RemoveMode(NULL, CMODE_VOICE, cu->user->nick);
+ UserContainer *uc = *it;
+
+ c->RemoveMode(NULL, CMODE_OWNER, uc->user->nick);
+ c->RemoveMode(NULL, CMODE_PROTECT, uc->user->nick);
+ c->RemoveMode(NULL, CMODE_OP, uc->user->nick);
+ c->RemoveMode(NULL, CMODE_HALFOP, uc->user->nick);
+ c->RemoveMode(NULL, CMODE_VOICE, uc->user->nick);
}
if (c->ci)
{
@@ -497,7 +499,7 @@ int anope_event_sjoin(const char *source, int ac, const char **av)
c->UnsetFlag(CH_SYNCING);
/* If there are users in the channel they are allowed to be, set topic mlock etc. */
- if (c->usercount)
+ if (!c->users.empty())
c->Sync();
/* If there are no users in the channel, there is a ChanServ timer set to part the service bot
* and destroy the channel soon
diff --git a/src/protocol/inspircd11.c b/src/protocol/inspircd11.c
index 91b400e9b..a4f4fc55d 100644
--- a/src/protocol/inspircd11.c
+++ b/src/protocol/inspircd11.c
@@ -473,13 +473,15 @@ int anope_event_fjoin(const char *source, int ac, const char **av)
c->creation_time = ts;
/* Remove status from all of our users */
- for (struct c_userlist *cu = c->users; cu; cu = cu->next)
+ for (CUserList::iterator it = c->users.begin(); it != c->users.end(); ++it)
{
- c->RemoveMode(NULL, CMODE_OWNER, cu->user->nick);
- c->RemoveMode(NULL, CMODE_PROTECT, cu->user->nick);
- c->RemoveMode(NULL, CMODE_OP, cu->user->nick);
- c->RemoveMode(NULL, CMODE_HALFOP, cu->user->nick);
- c->RemoveMode(NULL, CMODE_VOICE, cu->user->nick);
+ UserContainer *uc = *it;
+
+ c->RemoveMode(NULL, CMODE_OWNER, uc->user->nick);
+ c->RemoveMode(NULL, CMODE_PROTECT, uc->user->nick);
+ c->RemoveMode(NULL, CMODE_OP, uc->user->nick);
+ c->RemoveMode(NULL, CMODE_HALFOP, uc->user->nick);
+ c->RemoveMode(NULL, CMODE_VOICE, uc->user->nick);
}
if (c->ci)
{
@@ -566,7 +568,7 @@ int anope_event_fjoin(const char *source, int ac, const char **av)
c->UnsetFlag(CH_SYNCING);
/* If there are users in the channel they are allowed to be, set topic mlock etc. */
- if (c->usercount)
+ if (!c->users.empty())
c->Sync();
/* If there are no users in the channel, there is a ChanServ timer set to part the service bot
* and destroy the channel soon
diff --git a/src/protocol/inspircd12.cpp b/src/protocol/inspircd12.cpp
index 78d3a88fc..f07d5896e 100644
--- a/src/protocol/inspircd12.cpp
+++ b/src/protocol/inspircd12.cpp
@@ -531,13 +531,15 @@ int anope_event_fjoin(const char *source, int ac, const char **av)
c->creation_time = ts;
/* Remove status from all of our users */
- for (struct c_userlist *cu = c->users; cu; cu = cu->next)
+ for (CUserList::iterator it = c->users.begin(); it != c->users.end(); ++it)
{
- c->RemoveMode(NULL, CMODE_OWNER, cu->user->nick);
- c->RemoveMode(NULL, CMODE_PROTECT, cu->user->nick);
- c->RemoveMode(NULL, CMODE_OP, cu->user->nick);
- c->RemoveMode(NULL, CMODE_HALFOP, cu->user->nick);
- c->RemoveMode(NULL, CMODE_VOICE, cu->user->nick);
+ UserContainer *uc = *it;
+
+ c->RemoveMode(NULL, CMODE_OWNER, uc->user->nick);
+ c->RemoveMode(NULL, CMODE_PROTECT, uc->user->nick);
+ c->RemoveMode(NULL, CMODE_OP, uc->user->nick);
+ c->RemoveMode(NULL, CMODE_HALFOP, uc->user->nick);
+ c->RemoveMode(NULL, CMODE_VOICE, uc->user->nick);
}
if (c->ci)
{
@@ -630,7 +632,7 @@ int anope_event_fjoin(const char *source, int ac, const char **av)
c->UnsetFlag(CH_SYNCING);
/* If there are users in the channel they are allowed to be, set topic mlock etc */
- if (c->usercount)
+ if (!c->users.empty())
c->Sync();
/* If there are no users in the channel, there is a ChanServ timer set to part the service bot
* and destroy the channel soon
diff --git a/src/protocol/ratbox.c b/src/protocol/ratbox.c
index 40ed33634..11141b6a5 100644
--- a/src/protocol/ratbox.c
+++ b/src/protocol/ratbox.c
@@ -358,13 +358,15 @@ int anope_event_sjoin(const char *source, int ac, const char **av)
c->creation_time = ts;
/* Remove status from all of our users */
- for (struct c_userlist *cu = c->users; cu; cu = cu->next)
+ for (CUserList::iterator it = c->users.begin(); it != c->users.end(); ++it)
{
- c->RemoveMode(NULL, CMODE_OWNER, cu->user->nick);
- c->RemoveMode(NULL, CMODE_PROTECT, cu->user->nick);
- c->RemoveMode(NULL, CMODE_OP, cu->user->nick);
- c->RemoveMode(NULL, CMODE_HALFOP, cu->user->nick);
- c->RemoveMode(NULL, CMODE_VOICE, cu->user->nick);
+ UserContainer *uc = *it;
+
+ c->RemoveMode(NULL, CMODE_OWNER, uc->user->nick);
+ c->RemoveMode(NULL, CMODE_PROTECT, uc->user->nick);
+ c->RemoveMode(NULL, CMODE_OP, uc->user->nick);
+ c->RemoveMode(NULL, CMODE_HALFOP, uc->user->nick);
+ c->RemoveMode(NULL, CMODE_VOICE, uc->user->nick);
}
if (c->ci)
{
@@ -457,7 +459,7 @@ int anope_event_sjoin(const char *source, int ac, const char **av)
c->UnsetFlag(CH_SYNCING);
/* If there are users in the channel they are allowed to be, set topic mlock etc. */
- if (c->usercount)
+ if (!c->users.empty())
c->Sync();
/* If there are no users in the channel, there is a ChanServ timer set to part the service bot
* and destroy the channel soon
diff --git a/src/protocol/unreal32.c b/src/protocol/unreal32.c
index 7b924ff52..76411ed51 100644
--- a/src/protocol/unreal32.c
+++ b/src/protocol/unreal32.c
@@ -983,13 +983,15 @@ int anope_event_sjoin(const char *source, int ac, const char **av)
c->creation_time = ts;
/* Remove status from all of our users */
- for (struct c_userlist *cu = c->users; cu; cu = cu->next)
+ for (CUserList::iterator it = c->users.begin(); it != c->users.end(); ++it)
{
- c->RemoveMode(NULL, CMODE_OWNER, cu->user->nick);
- c->RemoveMode(NULL, CMODE_PROTECT, cu->user->nick);
- c->RemoveMode(NULL, CMODE_OP, cu->user->nick);
- c->RemoveMode(NULL, CMODE_HALFOP, cu->user->nick);
- c->RemoveMode(NULL, CMODE_VOICE, cu->user->nick);
+ UserContainer *uc = *it;
+
+ c->RemoveMode(NULL, CMODE_OWNER, uc->user->nick);
+ c->RemoveMode(NULL, CMODE_PROTECT, uc->user->nick);
+ c->RemoveMode(NULL, CMODE_OP, uc->user->nick);
+ c->RemoveMode(NULL, CMODE_HALFOP, uc->user->nick);
+ c->RemoveMode(NULL, CMODE_VOICE, uc->user->nick);
}
if (c->ci)
{
@@ -1111,7 +1113,7 @@ int anope_event_sjoin(const char *source, int ac, const char **av)
c->UnsetFlag(CH_SYNCING);
/* If there are users in the channel they are allowed to be, set topic mlock etc. */
- if (c->usercount)
+ if (!c->users.empty())
c->Sync();
/* If there are no users in the channel, there is a ChanServ timer set to part the service bot
* and destroy the channel soon