mirror of https://github.com/fluffle/goirc
Ensure the time field is populated on the pseudo line events, such as connecting and disconnecting.
This commit is contained in:
parent
28d81b1146
commit
706c90baa3
|
@ -246,7 +246,7 @@ func (conn *Conn) Connect() error {
|
||||||
}
|
}
|
||||||
conn.connected = true
|
conn.connected = true
|
||||||
conn.postConnect(true)
|
conn.postConnect(true)
|
||||||
conn.dispatch(&Line{Cmd: REGISTER})
|
conn.dispatch(&Line{Cmd: REGISTER, Time: time.Now()})
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -400,7 +400,7 @@ func (conn *Conn) shutdown() {
|
||||||
conn.wg.Wait()
|
conn.wg.Wait()
|
||||||
// reinit datastructures ready for next connection
|
// reinit datastructures ready for next connection
|
||||||
conn.initialise()
|
conn.initialise()
|
||||||
conn.dispatch(&Line{Cmd: DISCONNECTED})
|
conn.dispatch(&Line{Cmd: DISCONNECTED, Time: time.Now()})
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dumps a load of information about the current state of the connection to a
|
// Dumps a load of information about the current state of the connection to a
|
||||||
|
|
Loading…
Reference in New Issue