mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-12 23:27:17 +03:00
Disallow op with no fingerprint.
This commit is contained in:
parent
12be9c1d1f
commit
6f46645540
@ -347,8 +347,12 @@ func (c *Client) handleShell(channel ssh.Channel) {
|
||||
c.SysMsg("No such name: %s", parts[1])
|
||||
} else {
|
||||
fingerprint := client.Fingerprint()
|
||||
client.SysMsg("Made op by %s.", c.ColoredName())
|
||||
c.Server.Op(fingerprint)
|
||||
if fingerprint == "" {
|
||||
c.SysMsg("Cannot op user without fingerprint.")
|
||||
} else {
|
||||
client.SysMsg("Made op by %s.", c.ColoredName())
|
||||
c.Server.Op(fingerprint)
|
||||
}
|
||||
}
|
||||
}
|
||||
case "/kick":
|
||||
|
Loading…
x
Reference in New Issue
Block a user