mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-06-09 11:52:37 +03:00
Merge pull request #69 from Kealper/master
Make /whois ignore any trailing spaces/text.
This commit is contained in:
commit
f46490cefb
@ -255,7 +255,7 @@ func (c *Client) handleShell(channel ssh.Channel) {
|
|||||||
c.SysMsg("Missing $NAME from: /nick $NAME")
|
c.SysMsg("Missing $NAME from: /nick $NAME")
|
||||||
}
|
}
|
||||||
case "/whois":
|
case "/whois":
|
||||||
if len(parts) == 2 {
|
if len(parts) >= 2 {
|
||||||
client := c.Server.Who(parts[1])
|
client := c.Server.Who(parts[1])
|
||||||
if client != nil {
|
if client != nil {
|
||||||
version := reStripText.ReplaceAllString(string(client.Conn.ClientVersion()), "")
|
version := reStripText.ReplaceAllString(string(client.Conn.ClientVersion()), "")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user