- /* Not exempt, BOOK EM DANNO! */
- user->WriteNotice("*** You cannot list within the first " + ConvToStr(WaitTime) + " seconds of connecting. Please try again later.");
- /* Some crap clients (read: mIRC, various java chat applets) muck up if they don't
- * receive these numerics whenever they send LIST, so give them an empty LIST to mull over.
- */
- user->WriteNumeric(321, "%s Channel :Users Name",user->nick.c_str());
- user->WriteNumeric(323, "%s :End of channel list.",user->nick.c_str());
+ const AccountExtItem* ext = GetAccountExtItem();
+ if (exemptregistered && ext && ext->get(user))
+ return MOD_RES_PASSTHRU;
+
+ if (showmsg)
+ {
+ user->WriteNotice(InspIRCd::Format("*** You cannot view the channel list right now. Please %stry again in %s.",
+ (exemptregistered ? "login to an account or " : ""),
+ InspIRCd::DurationString(waitallowed - ServerInstance->Time()).c_str()));
+ }
+
+ // The client might be waiting on a response to do something so send them an
+ // empty list response to satisfy that.
+ user->WriteNumeric(RPL_LISTSTART, "Channel", "Users Name");
+ user->WriteNumeric(RPL_LISTEND, "End of channel list.");