summaryrefslogtreecommitdiff
path: root/src/modules.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-09 12:23:04 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-09 12:23:04 +0000
commit98fd8145d87a16a8bca10102f42fe0de954af967 (patch)
treee07aa92eeb6ef0eebaff010173118e1e0c26651f /src/modules.cpp
parent2dfc364baceefedf21a8eae766e615fc8d497d6e (diff)
Fixed to correctly use iterator
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3583 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index f5129c837..9a420a25e 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -740,13 +740,11 @@ bool Server::PseudoToUser(userrec* alive,userrec* zombie,std::string message)
// Fix by brain - cant write the user until their fd table entry is updated
fd_ref_table[zombie->fd] = zombie;
Write(zombie->fd,":%s!%s@%s NICK %s",oldnick.c_str(),oldident.c_str(),oldhost.c_str(),zombie->nick);
- for (unsigned int i = 0; i < zombie->chans.size(); i++)
+ for (std::vector<ucrec*>::const_iterator i = zombie->chans.begin(); i != zombie->chans.end(); i++)
{
- if (zombie->chans[i].channel != NULL)
+ if (((ucrec*)(*i))->channel != NULL)
{
- if (zombie->chans[i].channel->name)
- {
- chanrec* Ptr = zombie->chans[i].channel;
+ chanrec* Ptr = ((ucrec*)(*i))->channel;
WriteFrom(zombie->fd,zombie,"JOIN %s",Ptr->name);
if (Ptr->topicset)
{
@@ -755,8 +753,6 @@ bool Server::PseudoToUser(userrec* alive,userrec* zombie,std::string message)
}
userlist(zombie,Ptr);
WriteServ(zombie->fd,"366 %s %s :End of /NAMES list.", zombie->nick, Ptr->name);
-
- }
}
}
if ((find(local_users.begin(),local_users.end(),zombie) == local_users.end()) && (zombie->fd != FD_MAGIC_NUMBER))