Make /whois ignore any trailing spaces/text

This commit is contained in:
Ken Piper committed 2014-12-15 20:31:13 -05:00
1 parent 64e0dbc5c4
commit 1afe84925d
1 file changed
+1 -1
+1 -1
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()), "")