+ if (*mode == '+')
+ {
+ mode++;
+ continue;
+ }
+
+ ModeHandler *mh = this->FindMode(*mode, MODETYPE_CHANNEL);
+ bool display = true;
+
+ if ((mh) && (mh->IsListMode()))
+ {
+ /** See below for a description of what craq this is :D
+ */
+ unsigned char handler_id = (*mode - 65) | mask;
+
+ for(ModeWatchIter watchers = modewatchers[handler_id].begin(); watchers != modewatchers[handler_id].end(); watchers++)
+ {
+ std::string dummyparam;
+
+ if (!((*watchers)->BeforeMode(user, NULL, targetchannel, dummyparam, true, MODETYPE_CHANNEL)))
+ display = false;
+ }
+
+ if (display)
+ mh->DisplayList(user, targetchannel);
+ }
+ else
+ nonlistmodes_found++;
+
+ mode++;