Make /whois ignore any trailing spaces/text

This commit is contained in:
Ken Piper 2014-12-15 20:31:13 -05:00
parent 64e0dbc5c4
commit 1afe84925d

View File

@ -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()), "")