@@ 470,13 470,25 @@ func (is *IRCSide) handleEvent(c *girc.Client, e girc.Event) {
return
}
+ content := e.Last()
+
+ if ctcp := girc.DecodeCTCP(&e); ctcp != nil {
+ if ctcp.Reply {
+ return
+ }
+
+ if ctcp.Command == girc.CTCP_ACTION {
+ content = fmt.Sprintf("_%s_", ctcp.Text)
+ }
+ }
+
is.Lock()
defer is.Unlock()
// this is too many but w/e
permittedMentionIDs := make([]string, 10)[:0]
- msg := is.highlightsRegex.ReplaceAllStringFunc(e.Last(),
+ msg := is.highlightsRegex.ReplaceAllStringFunc(content,
func(match string) string {
id, found := is.nickMap[match]
if !found {