mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
fix #765
CS INFO with no arguments should list your registered channels
This commit is contained in:
parent
1fc513cef0
commit
db41b2bc34
2 changed files with 16 additions and 4 deletions
|
|
@ -817,14 +817,21 @@ func nsInfoHandler(service *ircService, server *Server, client *Client, command
|
|||
for _, nick := range account.AdditionalNicks {
|
||||
service.Notice(rb, fmt.Sprintf(client.t("Additional grouped nick: %s"), nick))
|
||||
}
|
||||
for _, channel := range server.accounts.ChannelsForAccount(accountName) {
|
||||
service.Notice(rb, fmt.Sprintf(client.t("Registered channel: %s"), channel))
|
||||
}
|
||||
listRegisteredChannels(service, accountName, rb)
|
||||
if account.Suspended != nil {
|
||||
service.Notice(rb, suspensionToString(client, *account.Suspended))
|
||||
}
|
||||
}
|
||||
|
||||
func listRegisteredChannels(service *ircService, accountName string, rb *ResponseBuffer) {
|
||||
client := rb.session.client
|
||||
channels := client.server.accounts.ChannelsForAccount(accountName)
|
||||
service.Notice(rb, fmt.Sprintf(client.t("You have %d registered channel(s)."), len(channels)))
|
||||
for _, channel := range rb.session.client.server.accounts.ChannelsForAccount(accountName) {
|
||||
service.Notice(rb, fmt.Sprintf(client.t("Registered channel: %s"), channel))
|
||||
}
|
||||
}
|
||||
|
||||
func nsRegisterHandler(service *ircService, server *Server, client *Client, command string, params []string, rb *ResponseBuffer) {
|
||||
details := client.Details()
|
||||
passphrase := params[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue