diff --git a/service.go b/service.go index c2969c6..a39b276 100644 --- a/service.go +++ b/service.go @@ -1432,7 +1432,7 @@ func handleServiceChannelDelete(ctx *serviceContext, params []string) error { return fmt.Errorf("failed to delete channel: %v", err) } - if uc := network.conn; uc != nil { + if uc := network.conn; uc != nil && uc.channels.Has(name) { uc.SendMessage(ctx, &irc.Message{ Command: "PART", Params: []string{name},