"matching \037pattern\037. ");
send_reply(sptr, RPL_LISTUSAGE, "Note: Patterns may contain * and ?. "
"You may only give one pattern match constraint.");
- if (IsAnOper(sptr))
+ if (IsAnOper(sptr)) {
send_reply(sptr, RPL_LISTUSAGE,
" \002S\002 ; Show secret channels.");
+ send_reply(sptr, RPL_LISTUSAGE,
+ " \002M\002 ; Show channel modes.");
+ }
send_reply(sptr, RPL_LISTUSAGE,
"Example: LIST <3,>1,C<10,T>0,#a* ; 2 users, younger than 10 "
"min., topic set., starts with #a");
return show_usage(sptr);
break;
+ case 'M':
+ case 'm':
+ if (!IsAnOper(sptr) || !HasPriv(sptr, PRIV_LIST_CHAN))
+ return show_usage(sptr);
+
+ args->flags |= LISTARG_SHOWMODES;
+ param++;
+
+ if (*param != ',' && *param != ' ' && *param != '\0') /* check syntax */
+ return show_usage(sptr);
+ break;
+
default:
/* It might be a wildcard... */
if (strchr(param, '*') ||