summaryrefslogtreecommitdiff
path: root/src/modules/m_restrictbanned.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_restrictbanned.cpp')
-rw-r--r--src/modules/m_restrictbanned.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/modules/m_restrictbanned.cpp b/src/modules/m_restrictbanned.cpp
index 51ff39772..c37951eea 100644
--- a/src/modules/m_restrictbanned.cpp
+++ b/src/modules/m_restrictbanned.cpp
@@ -69,15 +69,10 @@ class ModuleRestrictBanned : public Module
return 0;
/* bit of a special case. */
- for (std::vector<ucrec*>::iterator i = user->chans.begin(); i != user->chans.end(); i++)
+ for (UCListIter i = user->chans.begin(); i != user->chans.end(); i++)
{
- if (((ucrec*)(*i))->channel != NULL)
- {
- chanrec *channel = ((ucrec*)(*i))->channel;
-
- if (CheckRestricted(user, channel, "change your nickname") == 1)
- return 1;
- }
+ if (CheckRestricted(user, i->first, "change your nickname") == 1)
+ return 1;
}
return 0;