1
0
Fork 0
forked from External/ergo

add auto-away

This commit is contained in:
Shivaram Lingamneni 2020-05-19 14:12:20 -04:00
parent b94e7ea985
commit a0f4e90b7e
10 changed files with 97 additions and 26 deletions

View file

@ -316,6 +316,11 @@ func awayHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Resp
rb.Add(nil, server.name, RPL_UNAWAY, client.nick, client.t("You are no longer marked as being away"))
}
dispatchAwayNotify(client, isAway, awayMessage)
return false
}
func dispatchAwayNotify(client *Client, isAway bool, awayMessage string) {
// dispatch away-notify
details := client.Details()
for session := range client.Friends(caps.AwayNotify) {
@ -325,8 +330,6 @@ func awayHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Resp
session.sendFromClientInternal(false, time.Time{}, "", details.nickMask, details.account, nil, "AWAY")
}
}
return false
}
// BATCH {+,-}reference-tag type [params...]