X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmode.cpp;h=a7effa642d2fef7ff97a43b51bdccdc7e40b381f;hb=b844d1cbbe79585facc69b9247baa8427cff0b62;hp=5e9dc1233bd78455c24ebb64724aba3bfa701efb;hpb=d769fef63f2f9ccd929aa51fda3c3da7ec389181;p=user%2Fhenk%2Fcode%2Finspircd.git 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)