mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-06-16 07:12:08 +03:00
Added /banned command to list banned fingerprints
This commit is contained in:
parent
15ef0a57b2
commit
8a68cc51d9
10
client.go
10
client.go
@ -324,6 +324,16 @@ func (c *Client) handleShell(channel ssh.Channel) {
|
|||||||
c.Server.Broadcast(fmt.Sprintf("* %s was unbanned by %s", fingerprint, c.ColoredName()), nil)
|
c.Server.Broadcast(fmt.Sprintf("* %s was unbanned by %s", fingerprint, c.ColoredName()), nil)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
case "/banned":
|
||||||
|
if !c.Server.IsOp(c) {
|
||||||
|
c.SysMsg("You're not an admin.")
|
||||||
|
} else if len(parts) != 1 {
|
||||||
|
c.SysMsg("Too many arguments for /banned")
|
||||||
|
} else {
|
||||||
|
for fingerprint, _ := range c.Server.bannedPK {
|
||||||
|
c.SysMsg("Banned fingerprint: %s", fingerprint)
|
||||||
|
}
|
||||||
|
}
|
||||||
case "/op":
|
case "/op":
|
||||||
if !c.Server.IsOp(c) {
|
if !c.Server.IsOp(c) {
|
||||||
c.SysMsg("You're not an admin.")
|
c.SysMsg("You're not an admin.")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user