From f8254d68b51b4dec7d180ca5935d8c04cdd92a66 Mon Sep 17 00:00:00 2001 From: w00t Date: Wed, 24 Dec 2008 00:45:02 +0000 Subject: 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 --- src/modules/m_operprefix.cpp | 15 +++++++++++++-- 1 file 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); -- cgit v1.2.3