diff --git a/state/tracker.go b/state/tracker.go index 686fedc..209c7cf 100644 --- a/state/tracker.go +++ b/state/tracker.go @@ -266,7 +266,10 @@ func (st *stateTracker) ChannelModes(c, modes string, args ...string) *Channel { } // Returns the Nick the state tracker thinks is Me. +// NOTE: Nick() requires the mutex to be held. func (st *stateTracker) Me() *Nick { + st.mu.Lock() + defer st.mu.Unlock() return st.me.Nick() }