QUIT messages were not recorded.

They have empty "Params" field in irc message.
configurable-file-paths
Robert Gerus 2015-12-08 20:57:11 +01:00
parent 655418c6ac
commit fa0723391d
1 changed files with 6 additions and 2 deletions

View File

@ -28,13 +28,17 @@ type seenRecord struct {
}
func seenrecord(output func(irc.Message), msg irc.Message) {
var target string
if msg.Params == nil {
return
target = ""
} else {
target = msg.Params[0]
}
v := seenRecord{
Network: msg.Context["Network"],
Target: msg.Params[0],
Target: target,
Action: msg.Command,
Time: time.Now(),
Text: msg.Trailing,