summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/lrstanley/girc/builtin.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/lrstanley/girc/builtin.go')
-rw-r--r--vendor/github.com/lrstanley/girc/builtin.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/vendor/github.com/lrstanley/girc/builtin.go b/vendor/github.com/lrstanley/girc/builtin.go
index 7f285fda..778a5c68 100644
--- a/vendor/github.com/lrstanley/girc/builtin.go
+++ b/vendor/github.com/lrstanley/girc/builtin.go
@@ -93,7 +93,11 @@ func handleConnect(c *Client, e Event) {
}
time.Sleep(2 * time.Second)
- c.RunHandlers(&Event{Command: CONNECTED, Params: []string{c.Server()}})
+
+ c.mu.RLock()
+ server := c.server()
+ c.mu.RUnlock()
+ c.RunHandlers(&Event{Command: CONNECTED, Params: []string{server}})
}
// nickCollisionHandler helps prevent the client from having conflicting