mirror of
https://github.com/ergochat/ergo.git
synced 2025-01-03 16:42:38 +01:00
pretty up the notice a bit, and use RplNotice
This commit is contained in:
parent
e1c235a9ea
commit
b4edcea6e3
@ -124,7 +124,7 @@ func RplModeChanges(client *Client, target *Client, changes ModeChanges) string
|
|||||||
}
|
}
|
||||||
|
|
||||||
func RplCurrentMode(client *Client, target *Client) string {
|
func RplCurrentMode(client *Client, target *Client) string {
|
||||||
globalFlags := ""
|
globalFlags := "global:"
|
||||||
for mode, _ := range target.flags {
|
for mode, _ := range target.flags {
|
||||||
globalFlags += mode.String()
|
globalFlags += mode.String()
|
||||||
}
|
}
|
||||||
@ -134,8 +134,8 @@ func RplCurrentMode(client *Client, target *Client) string {
|
|||||||
perChannelFlags += fmt.Sprintf(" %s:%s", channel.name, channel.members[target])
|
perChannelFlags += fmt.Sprintf(" %s:%s", channel.name, channel.members[target])
|
||||||
}
|
}
|
||||||
|
|
||||||
response := fmt.Sprintf("All user modes: %s%s", globalFlags, perChannelFlags)
|
response := NewText(fmt.Sprintf("user %s has %s%s", target.nick, globalFlags, perChannelFlags))
|
||||||
return NewStringReply(client, NOTICE, "%s :%s", target.Nick(), response)
|
return RplNotice(client.server, client, response)
|
||||||
}
|
}
|
||||||
|
|
||||||
func RplChannelMode(client *Client, channel *Channel,
|
func RplChannelMode(client *Client, channel *Channel,
|
||||||
|
Loading…
Reference in New Issue
Block a user