summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mode.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index 0229eddb1..7a31038a6 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -291,6 +291,8 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool
while (mode && *mode)
{
+ unsigned char mletter = *mode;
+
if (*mode == '+')
{
mode++;
@@ -300,9 +302,9 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool
/* Ensure the user doesnt request the same mode twice,
* so they cant flood themselves off out of idiocy.
*/
- if (!sent[*mode])
+ if (!sent[mletter])
{
- sent[*mode] = true;
+ sent[mletter] = true;
}
else
{
@@ -310,17 +312,17 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool
continue;
}
- if (ServerInstance->Config->HideModeLists[*mode] && (targetchannel->GetStatus(user) < STATUS_HOP))
- {
- user->WriteServ("482 %s %s :Only half-operators and above may view the +%c list",user->nick, targetchannel->name, *mode++);
- continue;
- }
-
ModeHandler *mh = this->FindMode(*mode, MODETYPE_CHANNEL);
bool display = true;
if ((mh) && (mh->IsListMode()))
{
+ if (ServerInstance->Config->HideModeLists[mletter] && (targetchannel->GetStatus(user) < STATUS_HOP))
+ {
+ user->WriteServ("482 %s %s :Only half-operators and above may view the +%c list",user->nick, targetchannel->name, *mode++);
+ continue;
+ }
+
/** See below for a description of what craq this is :D
*/
unsigned char handler_id = (*mode - 65) | mask;