mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-18 17:57:41 +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)
|
||||
}
|
||||
}
|
||||
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":
|
||||
if !c.Server.IsOp(c) {
|
||||
c.SysMsg("You're not an admin.")
|
||||
|
Loading…
x
Reference in New Issue
Block a user