Added timestamp to TIRCEvent
This commit is contained in:
parent
31dd66acbf
commit
b5965d05a2
1 changed files with 5 additions and 3 deletions
|
|
@ -98,6 +98,7 @@ type
|
|||
params*: seq[string] ## Parameters of the IRC message
|
||||
origin*: string ## The channel/user that this msg originated from
|
||||
raw*: string ## Raw IRC message
|
||||
timestamp*: TTime ## UNIX epoch time the message was received
|
||||
|
||||
proc send*(irc: PIRC, message: string, sendImmediately = false) =
|
||||
## Sends ``message`` as a raw command. It adds ``\c\L`` for you.
|
||||
|
|
@ -163,6 +164,7 @@ proc parseMessage(msg: string): TIRCEvent =
|
|||
result.typ = EvMsg
|
||||
result.cmd = MUnknown
|
||||
result.raw = msg
|
||||
result.timestamp = times.getTime()
|
||||
var i = 0
|
||||
# Process the prefix
|
||||
if msg[i] == ':':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue