diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-21 23:45:44 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-21 23:45:44 +0000 |
commit | a30abe26fc803900eaf5dc4c08a31aa1d3c9c89f (patch) | |
tree | 7d59c15a9c23401b91e100ebb9e98df2c7179e53 /src/modules/m_operlevels.cpp | |
parent | ff3eef491aa9e107d09d9dd9560ef7715b37b3b3 (diff) |
Change User::oper to an OperInfo reference
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11945 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_operlevels.cpp')
-rw-r--r-- | src/modules/m_operlevels.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/modules/m_operlevels.cpp b/src/modules/m_operlevels.cpp index 7a18991c1..6aaa2f48e 100644 --- a/src/modules/m_operlevels.cpp +++ b/src/modules/m_operlevels.cpp @@ -42,16 +42,8 @@ class ModuleOperLevels : public Module // oper killing an oper? if (IS_OPER(dest) && IS_OPER(source)) { - TagIndex::iterator dest_type = ServerInstance->Config->opertypes.find(dest->oper); - TagIndex::iterator src_type = ServerInstance->Config->opertypes.find(source->oper); - - if (dest_type == ServerInstance->Config->opertypes.end()) - return MOD_RES_PASSTHRU; - if (src_type == ServerInstance->Config->opertypes.end()) - return MOD_RES_PASSTHRU; - - long dest_level = dest_type->second->getInt("level"); - long source_level = src_type->second->getInt("level"); + long dest_level = atol(dest->oper->getConfig("level").c_str()); + long source_level = atol(source->oper->getConfig("level").c_str()); if (dest_level > source_level) { if (IS_LOCAL(source)) ServerInstance->SNO->WriteGlobalSno('a', "Oper %s (level %ld) attempted to /kill a higher oper: %s (level %ld): Reason: %s",source->nick.c_str(),source_level,dest->nick.c_str(),dest_level,reason.c_str()); |