From ec2106579c77a98dfdb209864a1e1b5ae1f07e7f Mon Sep 17 00:00:00 2001 From: w00t Date: Sat, 12 May 2007 20:49:13 +0000 Subject: The commit that should have been r7000: src/modules now uses IS_OPER instead of not so tidy char equivilant git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7001 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_restrictmsg.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/modules/m_restrictmsg.cpp') diff --git a/src/modules/m_restrictmsg.cpp b/src/modules/m_restrictmsg.cpp index 4f611653b..ce62296ac 100644 --- a/src/modules/m_restrictmsg.cpp +++ b/src/modules/m_restrictmsg.cpp @@ -44,18 +44,19 @@ class ModuleRestrictMsg : public Module if ((target_type == TYPE_USER) && (IS_LOCAL(user))) { userrec* u = (userrec*)dest; - if (*u->oper || *user->oper) + + // message allowed if: + // (1) the sender is opered + // (2) the recipient is opered + // anything else, blocked. + if (IS_OPER(u) || IS_OPER(user)) { - // message allowed if: - // (1) the sender is opered - // (2) the recipient is opered - // (3) both are opered - // anything else, blocked. return 0; } user->WriteServ("531 %s %s :You are not permitted to send private messages to this user",user->nick,u->nick); return 1; } + // however, we must allow channel messages... return 0; } -- cgit v1.2.3