diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-04-09 19:12:09 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-04-10 17:28:08 +0200 |
commit | ca0083cba90c8830f5018b73eb715665a8db9dd7 (patch) | |
tree | 20d335e4d7c2f886fbce00d494eead769d22c543 /src/mode.cpp | |
parent | 0f8f3af9accd4b2d2f17cd25dbb898187cc24c98 (diff) |
Replace IS_AWAY() and IS_OPER() macros with User::IsAway() and User::IsOper()
Diffstat (limited to 'src/mode.cpp')
-rw-r--r-- | src/mode.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index 417707ee9..768623bd5 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -215,7 +215,7 @@ void ModeParser::DisplayCurrentModes(User *user, User* targetuser, Channel* targ { /* Display user's current mode string */ user->WriteNumeric(RPL_UMODEIS, "%s :+%s",targetuser->nick.c_str(),targetuser->FormatModes()); - if (IS_OPER(targetuser)) + if ((targetuser->IsOper())) user->WriteNumeric(RPL_SNOMASKIS, "%s +%s :Server notice mask", targetuser->nick.c_str(), targetuser->FormatNoticeMasks()); return; } @@ -296,7 +296,7 @@ ModeAction ModeParser::TryMode(User* user, User* targetuser, Channel* chan, bool return MODEACTION_DENY; } - if (IS_LOCAL(user) && !IS_OPER(user)) + if (IS_LOCAL(user) && !user->IsOper()) { char* disabled = (type == MODETYPE_CHANNEL) ? ServerInstance->Config->DisabledCModes : ServerInstance->Config->DisabledUModes; if (disabled[modechar - 'A']) @@ -310,7 +310,7 @@ ModeAction ModeParser::TryMode(User* user, User* targetuser, Channel* chan, bool if (adding && IS_LOCAL(user) && mh->NeedsOper() && !user->HasModePermission(modechar, type)) { /* It's an oper only mode, and they don't have access to it. */ - if (IS_OPER(user)) + if (user->IsOper()) { user->WriteNumeric(ERR_NOPRIVILEGES, "%s :Permission Denied - Oper type %s does not have access to set %s mode %c", user->nick.c_str(), user->oper->NameStr(), type == MODETYPE_CHANNEL ? "channel" : "user", modechar); |