Changeset 235 in code for trunk


Ignore:
Timestamp:
Apr 6, 2020, 4:49:39 PM (5 years ago)
Author:
contact
Message:

Log TOPIC messages

See [1].

[1]: https://github.com/znc/znc/blob/82c4ad8362c6b2f4406770c54a5e10a40fdba548/modules/log.cpp#L486

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/logger.go

    r234 r235  
    101101                }
    102102                return fmt.Sprintf("*** Quits: %s (%s@%s) (%s)", msg.Prefix.Name, msg.Prefix.User, msg.Prefix.Host, reason)
     103        case "TOPIC":
     104                var topic string
     105                if len(msg.Params) > 1 {
     106                        topic = msg.Params[1]
     107                }
     108                return fmt.Sprintf("*** %s changes topic to '%s'", msg.Prefix.Name, topic)
    103109        case "MODE":
    104110                return fmt.Sprintf("*** %s sets mode: %s", msg.Prefix.Name, strings.Join(msg.Params[1:], " "))
  • trunk/upstream.go

    r231 r235  
    746746                        ch.Topic = ""
    747747                }
     748                uc.appendLog(ch.Name, msg)
    748749                uc.forEachDownstream(func(dc *downstreamConn) {
    749750                        params := []string{dc.marshalChannel(uc, name)}
Note: See TracChangeset for help on using the changeset viewer.