mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
Solved! RPL_USERHOST must use trailing
This commit is contained in:
parent
2ff48a7088
commit
a623d8ef1e
@ -543,6 +543,7 @@ var (
|
|||||||
"NOTICE": true,
|
"NOTICE": true,
|
||||||
|
|
||||||
RPL_WHOISCHANNELS: true,
|
RPL_WHOISCHANNELS: true,
|
||||||
|
RPL_USERHOST: true,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1861,9 +1861,9 @@ func userhostHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool
|
|||||||
}
|
}
|
||||||
|
|
||||||
if target.flags[Away] {
|
if target.flags[Away] {
|
||||||
client.Send(nil, client.server.name, RPL_USERHOST, client.nick, fmt.Sprintf("%s =- %s @ %s", target.nick, target.username, target.hostname))
|
client.Send(nil, client.server.name, RPL_USERHOST, client.nick, fmt.Sprintf("%s=-%s@%s", target.nick, target.username, target.hostname))
|
||||||
} else {
|
} else {
|
||||||
client.Send(nil, client.server.name, RPL_USERHOST, client.nick, fmt.Sprintf("%s =+ %s @ %s", target.nick, target.username, target.hostname))
|
client.Send(nil, client.server.name, RPL_USERHOST, client.nick, fmt.Sprintf("%s=+%s@%s", target.nick, target.username, target.hostname))
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
17
irc/util.go
17
irc/util.go
@ -3,11 +3,6 @@
|
|||||||
|
|
||||||
package irc
|
package irc
|
||||||
|
|
||||||
import (
|
|
||||||
"strings"
|
|
||||||
"unicode"
|
|
||||||
)
|
|
||||||
|
|
||||||
// argsToStrings takes the arguments and splits them into a series of strings,
|
// argsToStrings takes the arguments and splits them into a series of strings,
|
||||||
// each argument separated by delim and each string bounded by maxLength.
|
// each argument separated by delim and each string bounded by maxLength.
|
||||||
func argsToStrings(maxLength int, arguments []string, delim string) []string {
|
func argsToStrings(maxLength int, arguments []string, delim string) []string {
|
||||||
@ -38,15 +33,3 @@ func argsToStrings(maxLength int, arguments []string, delim string) []string {
|
|||||||
|
|
||||||
return messages
|
return messages
|
||||||
}
|
}
|
||||||
|
|
||||||
// stripSpaces removes all whitespaces inside a string
|
|
||||||
func stripSpaces(str string) string {
|
|
||||||
return strings.Map(func(r rune) rune {
|
|
||||||
if unicode.IsSpace(r) {
|
|
||||||
// if the character is a space, drop it
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
// else keep it in the string
|
|
||||||
return r
|
|
||||||
}, str)
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user