3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-25 05:19:25 +01:00
CS PURGE should send a snomask
This commit is contained in:
Shivaram Lingamneni 2021-11-29 02:17:04 -05:00
parent c51569420a
commit ee720f60e2

View File

@ -681,6 +681,7 @@ func csPurgeAddHandler(service *ircService, client *Client, params []string, ope
} }
} }
service.Notice(rb, fmt.Sprintf(client.t("Successfully purged channel %s from the server"), chname)) service.Notice(rb, fmt.Sprintf(client.t("Successfully purged channel %s from the server"), chname))
client.server.snomasks.Send(sno.LocalChannels, fmt.Sprintf("Operator %s purged channel %s [reason: %s]", operName, chname, reason))
case errInvalidChannelName: case errInvalidChannelName:
service.Notice(rb, fmt.Sprintf(client.t("Can't purge invalid channel %s"), chname)) service.Notice(rb, fmt.Sprintf(client.t("Can't purge invalid channel %s"), chname))
default: default:
@ -698,6 +699,7 @@ func csPurgeDelHandler(service *ircService, client *Client, params []string, ope
switch client.server.channels.Unpurge(chname) { switch client.server.channels.Unpurge(chname) {
case nil: case nil:
service.Notice(rb, fmt.Sprintf(client.t("Successfully unpurged channel %s from the server"), chname)) service.Notice(rb, fmt.Sprintf(client.t("Successfully unpurged channel %s from the server"), chname))
client.server.snomasks.Send(sno.LocalChannels, fmt.Sprintf("Operator %s removed purge of channel %s", operName, chname))
case errNoSuchChannel: case errNoSuchChannel:
service.Notice(rb, fmt.Sprintf(client.t("Channel %s wasn't previously purged from the server"), chname)) service.Notice(rb, fmt.Sprintf(client.t("Channel %s wasn't previously purged from the server"), chname))
default: default: