Add realname support. Guard against race conditions on Disconnect

This commit is contained in:
James Mills
2017-11-09 00:52:12 -08:00
parent ef65ae61a3
commit 656226dc22
2 changed files with 32 additions and 3 deletions

View File

@@ -32,6 +32,9 @@ type Connection struct {
KeepAlive time.Duration
Server string
RealName string // The real name we want to display.
// If zero-value defaults to the user.
socket net.Conn
pwrite chan string
end chan struct{}
@@ -43,8 +46,8 @@ type Connection struct {
events map[string]map[int]func(*Event)
eventsMutex sync.Mutex
QuitMessage string
lastMessage time.Time
QuitMessage string
lastMessage time.Time
lastMessageMutex sync.Mutex
VerboseCallbackHandler bool