summaryrefslogtreecommitdiff
path: root/src/modules/m_operlevels.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-12 20:34:10 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-12 20:34:10 +0000
commit7380557b160e6600f5a444d81a237008cc7fbea5 (patch)
tree4b04a7270386222b21da5f6b118ddb9453bd13f7 /src/modules/m_operlevels.cpp
parentaa806be18537b714c54176f0725e1f40e4669f0c (diff)
Small thing, but check for IS_OPER(source) too, just in case someone crazy writes a module that lets users kill people. I'm not sure what would happen here otherwise.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6994 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_operlevels.cpp')
-rw-r--r--src/modules/m_operlevels.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/m_operlevels.cpp b/src/modules/m_operlevels.cpp
index f8fdb89d6..1291b28de 100644
--- a/src/modules/m_operlevels.cpp
+++ b/src/modules/m_operlevels.cpp
@@ -64,8 +64,9 @@ class ModuleOperLevels : public Module
virtual int OnKill(userrec* source, userrec* dest, const std::string &reason)
{
long dest_level = 0,source_level = 0;
+
// oper killing an oper?
- if (*dest->oper)
+ if (IS_OPER(dest) && IS_OPER(source))
{
for (int j =0; j < conf->Enumerate("type"); j++)
{