mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-14 16:17:17 +03:00
Make /whois ignore any trailing spaces/text
This commit is contained in:
parent
64e0dbc5c4
commit
1afe84925d
@ -255,7 +255,7 @@ func (c *Client) handleShell(channel ssh.Channel) {
|
||||
c.SysMsg("Missing $NAME from: /nick $NAME")
|
||||
}
|
||||
case "/whois":
|
||||
if len(parts) == 2 {
|
||||
if len(parts) >= 2 {
|
||||
client := c.Server.Who(parts[1])
|
||||
if client != nil {
|
||||
version := reStripText.ReplaceAllString(string(client.Conn.ClientVersion()), "")
|
||||
|
Loading…
x
Reference in New Issue
Block a user