summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-12-24 00:45:02 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-12-24 00:45:02 +0000
commitf8254d68b51b4dec7d180ca5935d8c04cdd92a66 (patch)
tree76409acd4b7e20623d5c19568f1388d1824ad95a /src/modules
parent1c07cf9aaaeadffb09c6632b3ff76bb19f5eb6b1 (diff)
Fix for bug #646, reported by whotookspaz (+y not being applied to existing channels on oper). Thanks!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10907 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_operprefix.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/modules/m_operprefix.cpp b/src/modules/m_operprefix.cpp
index a55bcf240..5991536e5 100644
--- a/src/modules/m_operprefix.cpp
+++ b/src/modules/m_operprefix.cpp
@@ -116,8 +116,8 @@ class ModuleOperPrefixMode : public Module
if ((!ServerInstance->Modes->AddMode(opm)))
throw ModuleException("Could not add a new mode!");
- Implementation eventlist[] = { I_OnPostJoin, I_OnCleanup, I_OnUserQuit, I_OnUserKick, I_OnUserPart };
- ServerInstance->Modules->Attach(eventlist, this, 5);
+ Implementation eventlist[] = { I_OnPostJoin, I_OnCleanup, I_OnUserQuit, I_OnUserKick, I_OnUserPart, I_OnOper };
+ ServerInstance->Modules->Attach(eventlist, this, 6);
}
virtual void PushChanMode(Channel* channel, User* user, bool negate = false)
@@ -162,6 +162,17 @@ class ModuleOperPrefixMode : public Module
return 0;
}
+ virtual void OnOper(User *user, const std::string&)
+ {
+ if (user && IS_LOCAL(user) && !user->IsModeSet('H'))
+ {
+ for (UCListIter v = user->chans.begin(); v != user->chans.end(); v++)
+ {
+ PushChanMode(v->first, user);
+ }
+ }
+ }
+
virtual ~ModuleOperPrefixMode()
{
ServerInstance->Modes->DelMode(opm);