diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-21 23:46:13 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-21 23:46:13 +0000 |
commit | d8f98565a8617658f610bc94a5d87266930beee4 (patch) | |
tree | 365a153c59bc8b521b094c27f25b484a69e5154b /src/modules/m_opermodes.cpp | |
parent | 984cc96a1f832abf9b5fcfddcd8260c5b12bd2a9 (diff) |
Use ConfigTagList as a faster access method for access to configuration
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11948 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_opermodes.cpp')
-rw-r--r-- | src/modules/m_opermodes.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/modules/m_opermodes.cpp b/src/modules/m_opermodes.cpp index 6b5ca10f9..94a9eefe9 100644 --- a/src/modules/m_opermodes.cpp +++ b/src/modules/m_opermodes.cpp @@ -49,22 +49,10 @@ class ModuleModesOnOper : public Module ApplyModes(user, ThisOpersModes); } - if (!opername.empty()) // if user is local .. + ThisOpersModes = user->oper->getConfig("modes"); + if (!ThisOpersModes.empty()) { - for (int i = 0;; i++) - { - ConfigTag* tag = ServerInstance->Config->ConfValue("oper", i); - if (!tag) - break; - if (tag->getString("name") != opername) - continue; - ThisOpersModes = tag->getString("modes"); - if (!ThisOpersModes.empty()) - { - ApplyModes(user, ThisOpersModes); - } - break; - } + ApplyModes(user, ThisOpersModes); } } |