minor adjustments for multiple connections

This commit is contained in:
Keno Schwalb
2014-11-03 15:21:48 +00:00
parent 9c4d007b9f
commit 4e1ebe0162
2 changed files with 20 additions and 19 deletions

View File

@@ -23,6 +23,7 @@ type Connection struct {
Timeout time.Duration
PingFreq time.Duration
KeepAlive time.Duration
Server string
socket net.Conn
pwrite chan string
@@ -32,7 +33,6 @@ type Connection struct {
nickcurrent string //The nickname we currently have.
user string
registered bool
server string
events map[string]map[string]func(*Event)
lastMessage time.Time
@@ -45,13 +45,14 @@ type Connection struct {
// A struct to represent an event.
type Event struct {
Code string
Raw string
Nick string //<nick>
Host string //<nick>!<usr>@<host>
Source string //<host>
User string //<usr>
Arguments []string
Code string
Raw string
Nick string //<nick>
Host string //<nick>!<usr>@<host>
Source string //<host>
User string //<usr>
Arguments []string
Connection *Connection
}
// Retrieve the last message from Event arguments.