diff options
author | Wim <wim@42.be> | 2017-09-20 22:47:26 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2017-09-20 22:47:26 +0200 |
commit | b49fb2b69cf71f2b6eee2232e9f67e5b227f38ec (patch) | |
tree | 5dba7f8da41b1c6c1e4026b9335e220b19dd2231 /bridge/irc | |
parent | 4bda29cb3896ac65c3aafa784c8faac73c3c111b (diff) | |
download | matterbridge-msglm-b49fb2b69cf71f2b6eee2232e9f67e5b227f38ec.tar.gz matterbridge-msglm-b49fb2b69cf71f2b6eee2232e9f67e5b227f38ec.tar.bz2 matterbridge-msglm-b49fb2b69cf71f2b6eee2232e9f67e5b227f38ec.zip |
Add support for Quakenet auth (irc). Closes #263
Diffstat (limited to 'bridge/irc')
-rw-r--r-- | bridge/irc/irc.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go index 1e0101fa..3276eab5 100644 --- a/bridge/irc/irc.go +++ b/bridge/irc/irc.go @@ -88,6 +88,7 @@ func (b *Birc) Connect() error { i.Password = b.Config.Password } i.AddCallback(ircm.RPL_WELCOME, b.handleNewConnection) + i.AddCallback(ircm.RPL_ENDOFMOTD, b.handleOtherAuth) err := i.Connect(b.Config.Server) if err != nil { return err @@ -257,6 +258,13 @@ func (b *Birc) handleOther(event *irc.Event) { flog.Debugf("%#v", event.Raw) } +func (b *Birc) handleOtherAuth(event *irc.Event) { + if strings.EqualFold(b.Config.NickServNick, "Q@CServe.quakenet.org") { + flog.Debugf("Authenticating %s against %s", b.Config.NickServUsername, b.Config.NickServNick) + b.i.Privmsg(b.Config.NickServNick, "AUTH "+b.Config.NickServUsername+" "+b.Config.NickServPassword) + } +} + func (b *Birc) handlePrivMsg(event *irc.Event) { b.Nick = b.i.GetNick() // freenode doesn't send 001 as first reply |