mirror of
https://github.com/shazow/ssh-chat.git
synced 2026-11-22 03:07:01 +03:00
Added /banned command to list banned fingerprints
This commit is contained in:
1 parent
15ef0a57b2
commit
8a68cc51d9
1 file changed
+10
@@ -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.")
|
||||
|
||||
Reference in new issue
Block a user