Small tidy up in Server.handleEvent()
This commit is contained in:
parent
0426b39846
commit
df9ece79e3
10
server.go
10
server.go
@ -323,12 +323,14 @@ func (s *Server) handleEvent(e Event) {
|
||||
|
||||
reason := strings.Join(args[1:], " ")
|
||||
|
||||
if client, exists := s.clientMap[strings.ToLower(nick)]; exists {
|
||||
client, exists := s.clientMap[strings.ToLower(nick)]
|
||||
if !exists {
|
||||
e.client.reply(errNoSuchNick, nick)
|
||||
return
|
||||
}
|
||||
|
||||
client.reply(rplKill, e.client.nick, reason)
|
||||
client.disconnect()
|
||||
} else {
|
||||
e.client.reply(errNoSuchNick, nick)
|
||||
}
|
||||
|
||||
case command == "KICK":
|
||||
if e.client.registered == false {
|
||||
|
Loading…
Reference in New Issue
Block a user