From 1338089e0ed4d5e2d433201376b0a0d419199725 Mon Sep 17 00:00:00 2001 From: Daniel Oaks Date: Mon, 2 May 2016 01:25:28 +1000 Subject: [PATCH] client: Add connection pass --- client/client.go | 1 + client/handlers.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/client/client.go b/client/client.go index b33b771..1fc74b3 100644 --- a/client/client.go +++ b/client/client.go @@ -39,6 +39,7 @@ type ServerConnection struct { InitialNick string InitialUser string InitialRealName string + ConnectionPass string // options SimplifyEvents bool diff --git a/client/handlers.go b/client/handlers.go index f87cc73..caf8d90 100644 --- a/client/handlers.go +++ b/client/handlers.go @@ -79,6 +79,9 @@ func pingHandler(event string, info eventmgr.InfoMap) { func sendRegistration(sc *ServerConnection) { sc.Nick = sc.InitialNick + if sc.ConnectionPass != "" { + sc.Send(nil, "", "PASS", sc.ConnectionPass) + } sc.Send(nil, "", "NICK", sc.InitialNick) sc.Send(nil, "", "USER", sc.InitialUser, "0", "*", sc.InitialRealName)