diff options
author | om <om@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-04-10 20:38:26 +0000 |
---|---|---|
committer | om <om@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-04-10 20:38:26 +0000 |
commit | ecb76110fda5f1b126ae718ae44df2f9312d46c4 (patch) | |
tree | b3215028ba22065efff2ca76d88553d9812e9cce /src | |
parent | e7f08977f2686ceebb7a27ab56dd686a5b976e77 (diff) |
A few more typedefs defined and put into use.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3866 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index 45a12ee7a..dc42ea651 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -131,7 +131,8 @@ void chanrec::AddUser(userrec* user) unsigned long chanrec::DelUser(userrec* user) { - CUList::iterator a = internal_userlist.find(user); + CUListIter a = internal_userlist.find(user); + if (a != internal_userlist.end()) { internal_userlist.erase(a); @@ -139,8 +140,8 @@ unsigned long chanrec::DelUser(userrec* user) DelOppedUser(user); DelHalfoppedUser(user); DelVoicedUser(user); - return internal_userlist.size(); } + return internal_userlist.size(); } @@ -156,7 +157,7 @@ void chanrec::AddOppedUser(userrec* user) void chanrec::DelOppedUser(userrec* user) { - CUList::iterator a = internal_op_userlist.find(user); + CUListIter a = internal_op_userlist.find(user); if (a != internal_op_userlist.end()) { internal_op_userlist.erase(a); @@ -171,11 +172,11 @@ void chanrec::AddHalfoppedUser(userrec* user) void chanrec::DelHalfoppedUser(userrec* user) { - CUList::iterator a = internal_halfop_userlist.find(user); + CUListIter a = internal_halfop_userlist.find(user); + if (a != internal_halfop_userlist.end()) { internal_halfop_userlist.erase(a); - return; } } @@ -186,11 +187,11 @@ void chanrec::AddVoicedUser(userrec* user) void chanrec::DelVoicedUser(userrec* user) { - CUList::iterator a = internal_voice_userlist.find(user); + CUListIter a = internal_voice_userlist.find(user); + if (a != internal_voice_userlist.end()) { internal_voice_userlist.erase(a); - return; } } @@ -370,7 +371,7 @@ chanrec* add_channel(userrec *user, const char* cn, const char* key, bool overri log(DEBUG,"Passed channel checks"); - for (std::vector<ucrec*>::const_iterator index = user->chans.begin(); index != user->chans.end(); index++) + for (UserChanList::const_iterator index = user->chans.begin(); index != user->chans.end(); index++) { if ((*index)->channel == NULL) { @@ -628,7 +629,7 @@ void kick_channel(userrec *src,userrec *user, chanrec *Ptr, char* reason) FOREACH_MOD(I_OnUserKick,OnUserKick(src,user,Ptr,reason)); - for (std::vector<ucrec*>::const_iterator i = user->chans.begin(); i != user->chans.end(); i++) + for (UserChanList::const_iterator i = user->chans.begin(); i != user->chans.end(); i++) { /* zap it from the channel list of the user */ if ((*i)->channel && ((*i)->channel == Ptr)) |