diff --git a/server.go b/server.go index b10b1ad..a4aafa4 100644 --- a/server.go +++ b/server.go @@ -397,7 +397,7 @@ func handleCmdPrivmsg(sv *Server, msg *irc.Message) { sv.sendReply(clid, ERR_CANNOTSENDTOCHAN, chid, "Cannot send to channel") return } - if _, exists := sv.chUsers[clid]; !exists { + if _, exists := sv.chUsers[chid][clid]; !exists { sv.sendReply(clid, ERR_CANNOTSENDTOCHAN, chid, "Cannot send to channel") return }