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