summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-12 16:22:35 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-12 16:22:35 +0000
commite6fa614ad27cd68aa61605ca0884eee9c44384eb (patch)
tree359a35a935733f3cd3e9dffaadd7ce8f0054a8f8 /src/mode.cpp
parentcf83d918227fd56a4cdb3d7392ba2b35aefd444d (diff)
We've had an IS_OPER macro for a long time. About time we started using it, maybe? :p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6990 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index b98316597..2c817e685 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -252,11 +252,11 @@ void ModeParser::DisplayCurrentModes(userrec *user, userrec* targetuser, chanrec
return;
}
- if ((targetuser == user) || (*user->oper))
+ if ((targetuser == user) || (IS_OPER(user)))
{
/* Display user's current mode string */
user->WriteServ("221 %s :+%s",targetuser->nick,targetuser->FormatModes());
- if (*targetuser->oper)
+ if (IS_OPER(targetuser))
user->WriteServ("008 %s +%s :Server notice mask", targetuser->nick, targetuser->FormatNoticeMasks());
return;
}
@@ -532,7 +532,7 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool
/* It's an oper only mode, check if theyre an oper. If they arent,
* eat any parameter that came with the mode, and continue to next
*/
- if ((IS_LOCAL(user)) && (modehandlers[handler_id]->NeedsOper()) && (!*user->oper))
+ if ((IS_LOCAL(user)) && (modehandlers[handler_id]->NeedsOper()) && (!IS_OPER(user)))
{
user->WriteServ("481 %s :Permission Denied - Only IRC operators may %sset %s mode %c", user->nick,
adding ? "" : "un", type == MODETYPE_CHANNEL ? "channel" : "user",