From 9a2e1da54913155a6164f9668c46d73e14dd35a8 Mon Sep 17 00:00:00 2001 From: Horus3 Date: Mon, 30 Mar 2015 18:23:32 +0200 Subject: Prevent parting from main channel. --- handler.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'handler.go') diff --git a/handler.go b/handler.go index 4124b08..052c8ef 100644 --- a/handler.go +++ b/handler.go @@ -35,8 +35,10 @@ func WebhookHandler(w http.ResponseWriter, r *http.Request) { log.Println("Sending private message to " + hook.Join + ": " + hook.Message) con.Privmsg("#"+hook.Join, hook.Message) - log.Println("Leaving #" + hook.Join) - con.Part("#" + hook.Join) + if fjoin := os.Getenv("WEB2IRC_IRC_JOIN"); fjoin != hook.Join { + log.Println("Leaving #" + hook.Join) + con.Part("#" + hook.Join) + } if hook.Target != "" { log.Println("Sending private message to " + hook.Target + ": " + hook.Message) -- cgit v1.2.3