summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index 5e9dc1233..a7effa642 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -282,6 +282,7 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool
if ((targetchannel) && (pcnt == 2))
{
const char* mode = parameters[1];
+ int nonlistmodes_found = 0;
mask = MASK_CHANNEL;
@@ -313,9 +314,15 @@ void ModeParser::Process(const char** parameters, int pcnt, userrec *user, bool
if (display)
mh->DisplayList(user, targetchannel);
}
+ else
+ nonlistmodes_found++;
mode++;
}
+
+ /* We didnt have any modes that were non-list, we can return here */
+ if (!nonlistmodes_found)
+ return;
}
if (pcnt == 1)