mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
also exempt operators from LIST restrictions
This commit is contained in:
parent
5cdb81e1ea
commit
3626958f1e
@ -1409,7 +1409,7 @@ func languageHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *
|
|||||||
// LIST [<channel>{,<channel>}] [<elistcond>{,<elistcond>}]
|
// LIST [<channel>{,<channel>}] [<elistcond>{,<elistcond>}]
|
||||||
func listHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *ResponseBuffer) bool {
|
func listHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *ResponseBuffer) bool {
|
||||||
config := server.Config()
|
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))
|
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))
|
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"))
|
rb.Add(nil, server.name, RPL_LISTEND, client.Nick(), client.t("End of LIST"))
|
||||||
|
Loading…
Reference in New Issue
Block a user