mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-13 07:29:30 +01:00
commit
0aab3b44e9
@ -627,10 +627,14 @@ func (client *Client) LoggedIntoAccount() bool {
|
|||||||
// RplISupport outputs our ISUPPORT lines to the client. This is used on connection and in VERSION responses.
|
// RplISupport outputs our ISUPPORT lines to the client. This is used on connection and in VERSION responses.
|
||||||
func (client *Client) RplISupport(rb *ResponseBuffer) {
|
func (client *Client) RplISupport(rb *ResponseBuffer) {
|
||||||
translatedISupport := client.t("are supported by this server")
|
translatedISupport := client.t("are supported by this server")
|
||||||
for _, tokenline := range client.server.ISupport().CachedReply {
|
nick := client.Nick()
|
||||||
// ugly trickery ahead
|
for _, cachedTokenLine := range client.server.ISupport().CachedReply {
|
||||||
tokenline = append(tokenline, translatedISupport)
|
length := len(cachedTokenLine) + 2
|
||||||
rb.Add(nil, client.server.name, RPL_ISUPPORT, append([]string{client.nick}, tokenline...)...)
|
tokenline := make([]string, length)
|
||||||
|
tokenline[0] = nick
|
||||||
|
copy(tokenline[1:], cachedTokenLine)
|
||||||
|
tokenline[length-1] = translatedISupport
|
||||||
|
rb.Add(nil, client.server.name, RPL_ISUPPORT, tokenline...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user