diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-14 05:04:45 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-14 05:04:45 +0000 |
commit | 6c52aebb50e013483d079f0ef75a01dffd866141 (patch) | |
tree | 53e994a4cc096e6fa3151d1b882bd3a753fcd540 /src/modules | |
parent | 957b298e48f06e801da8c260147c771515858cbe (diff) |
Switch the order of arguments in the +X mode, thanks aquanight for the suggestion
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12456 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_exemptchanops.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/modules/m_exemptchanops.cpp b/src/modules/m_exemptchanops.cpp index df5ec4bf3..a5c79169b 100644 --- a/src/modules/m_exemptchanops.cpp +++ b/src/modules/m_exemptchanops.cpp @@ -25,6 +25,7 @@ class ExemptChanOps : public ListModeBase bool ValidateParam(User* user, Channel* chan, std::string &word) { + // TODO actually make sure there's a prop for this if ((word.length() > 35) || (word.empty())) { user->WriteNumeric(955, "%s %s %s :word is too %s for exemptchanops list",user->nick.c_str(), chan->name.c_str(), word.c_str(), (word.empty() ? "short" : "long")); @@ -65,7 +66,6 @@ class ModuleExemptChanOps : public Module void init() { ServerInstance->Modules->AddService(ec); - ec.DoImplements(this); Implementation eventlist[] = { I_OnChannelDelete, I_OnChannelRestrictionApply, I_OnRehash, I_OnSyncChannel }; ServerInstance->Modules->Attach(eventlist, this, 4); @@ -83,11 +83,6 @@ class ModuleExemptChanOps : public Module ec.DoRehash(); } - void OnCleanup(int target_type, void* item) - { - ec.DoCleanup(target_type, item); - } - void OnSyncChannel(Channel* chan, Module* proto, void* opaque) { ec.DoSyncChannel(chan, proto, opaque); @@ -105,8 +100,8 @@ class ModuleExemptChanOps : public Module std::string::size_type pos = current.find(':'); if (pos == std::string::npos) continue; - if (current.substr(pos+1) == restriction) - minmode = current[0]; + if (current.substr(0,pos) == restriction) + minmode = current[pos+1]; } modelist* list = ec.extItem.get(chan); @@ -114,11 +109,11 @@ class ModuleExemptChanOps : public Module { for (modelist::iterator i = list->begin(); i != list->end(); ++i) { - std::string::size_type pos = i->mask.find(':'); + std::string::size_type pos = (**i).mask.find(':'); if (pos == std::string::npos) continue; - if (i->mask.substr(pos+1) == restriction) - minmode = i->mask[0]; + if ((**i).mask.substr(0,pos) == restriction) + minmode = (**i).mask[pos+1]; } } |