also exempt operators from LIST restrictions

This commit is contained in:
Shivaram Lingamneni 2020-04-27 00:58:48 -04:00
parent 5cdb81e1ea
commit 3626958f1e

@ -1409,7 +1409,7 @@ func languageHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *
// LIST [<channel>{,<channel>}] [<elistcond>{,<elistcond>}]
func listHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *ResponseBuffer) bool {
config := server.Config()
if time.Since(client.ctime) < config.Channels.ListDelay && client.Account() == "" {
if time.Since(client.ctime) < config.Channels.ListDelay && client.Account() == "" && !client.HasMode(modes.Operator) {
remaining := time.Until(client.ctime.Add(config.Channels.ListDelay))
csNotice(rb, fmt.Sprintf(client.t("This server requires that you wait %v after connecting before you can use /LIST. You have %v left."), config.Channels.ListDelay, remaining))
rb.Add(nil, server.name, RPL_LISTEND, client.Nick(), client.t("End of LIST"))