diff options
| author | Horus3 | 2015-03-30 18:23:32 +0200 |
|---|---|---|
| committer | Horus3 | 2015-03-30 18:23:32 +0200 |
| commit | 9a2e1da54913155a6164f9668c46d73e14dd35a8 (patch) | |
| tree | 6530d3f6042e4314dc124299e6ea23ed1d697709 | |
| parent | eddbcc31a45f5da8b9a67793dc43bb537e484d6a (diff) | |
| download | web2irc-9a2e1da54913155a6164f9668c46d73e14dd35a8.tar.gz | |
Prevent parting from main channel.
| -rw-r--r-- | handler.go | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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) |
