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":
// IsOp checks if the given client is Op
func (s *Server) IsOp(client *Client) bool {
+ fingerprint := client.Fingerprint()
+ if fingerprint == "" {
+ return false
+ }
_, r := s.admins[client.Fingerprint()]
return r
}