From c359ee267050b143ccc9c715ce73a797d52c9f5a Mon Sep 17 00:00:00 2001 From: Qais Patankar Date: Fri, 18 Aug 2017 16:56:08 +0100 Subject: [PATCH] Add WebIRC field --- irc.go | 5 +++++ irc_struct.go | 1 + 2 files changed, 6 insertions(+) diff --git a/irc.go b/irc.go index eb9174d..e430413 100644 --- a/irc.go +++ b/irc.go @@ -426,6 +426,11 @@ func (irc *Connection) Connect(server string) error { go irc.readLoop() go irc.writeLoop() go irc.pingLoop() + + if len(irc.WebIRC) > 0 { + irc.pwrite <- fmt.Sprintf("WEBIRC %s\r\n", irc.WebIRC) + } + if len(irc.Password) > 0 { irc.pwrite <- fmt.Sprintf("PASS %s\r\n", irc.Password) } diff --git a/irc_struct.go b/irc_struct.go index a188d9d..b04a6a8 100644 --- a/irc_struct.go +++ b/irc_struct.go @@ -23,6 +23,7 @@ type Connection struct { SASLLogin string SASLPassword string SASLMech string + WebIRC string TLSConfig *tls.Config Version string Timeout time.Duration