mirror of
https://github.com/google/alertmanager-irc-relay.git
synced 2025-01-06 02:02:51 +01:00
Use safe host / channel default
Use nonexistent irc server and empty channel list as default config options to avoid unwanted surprises when testing the bot. Addresses https://github.com/google/alertmanager-irc-relay/issues/5 Signed-off-by: Luca Bigliardi <shammash@google.com>
This commit is contained in:
parent
c122337b53
commit
96acecb3a5
@ -52,11 +52,11 @@ func LoadConfig(configFile string) (*Config, error) {
|
||||
IRCNick: "alertmanager-irc-relay",
|
||||
IRCNickPass: "",
|
||||
IRCRealName: "Alertmanager IRC Relay",
|
||||
IRCHost: "irc.freenode.net",
|
||||
IRCHost: "example.com",
|
||||
IRCPort: 7000,
|
||||
IRCUseSSL: true,
|
||||
IRCVerifySSL: true,
|
||||
IRCChannels: []IRCChannel{IRCChannel{Name: "#airtest"}},
|
||||
IRCChannels: []IRCChannel{},
|
||||
MsgOnce: false,
|
||||
UsePrivmsg: false,
|
||||
}
|
||||
|
2
irc.go
2
irc.go
@ -215,7 +215,7 @@ func (notifier *IRCNotifier) Run() {
|
||||
keepGoing := true
|
||||
for keepGoing {
|
||||
if !notifier.Client.Connected() {
|
||||
log.Printf("Connecting to IRC")
|
||||
log.Printf("Connecting to IRC %s", notifier.Client.Config().Server)
|
||||
notifier.BackoffCounter.Delay()
|
||||
if err := notifier.Client.Connect(); err != nil {
|
||||
log.Printf("Could not connect to IRC: %s", err)
|
||||
|
Loading…
Reference in New Issue
Block a user