summaryrefslogtreecommitdiff
path: root/irc/states.go
diff options
context:
space:
mode:
authorHubert Hirtz <hubert@hirtz.pm>2020-10-19 14:19:23 +0200
committerHubert Hirtz <hubert@hirtz.pm>2020-10-19 14:19:23 +0200
commit8fb22a1c588e41ac6b83b403d3eedda5c0f57869 (patch)
treefbc4aee795f37607c4935519ac643a73a733c0b2 /irc/states.go
parentEnsure timestamps from msg.TimeOrNow() are always UTC (diff)
Show topic changes
Closes #34
Diffstat (limited to 'irc/states.go')
-rw-r--r--irc/states.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/irc/states.go b/irc/states.go
index e560bdf..5502dd0 100644
--- a/irc/states.go
+++ b/irc/states.go
@@ -780,6 +780,12 @@ func (s *Session) handle(msg Message) (err error) {
c.TopicWho = msg.Prefix.Copy()
c.TopicTime = msg.TimeOrNow()
s.channels[channelCf] = c
+ s.evts <- TopicChangeEvent{
+ User: msg.Prefix.Copy(),
+ Channel: c.Name,
+ Topic: c.Topic,
+ Time: c.TopicTime,
+ }
}
case "PRIVMSG", "NOTICE":
s.evts <- s.privmsgToEvent(msg)