Changeset 405 in code for trunk/bridge.go


Ignore:
Timestamp:
Aug 20, 2020, 9:12:54 AM (5 years ago)
Author:
hubert
Message:

Forward RPL_TOPICWHOTIME to downstreams

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bridge.go

    r349 r405  
    22
    33import (
     4        "strconv"
     5        "strings"
     6
    47        "gopkg.in/irc.v3"
    5         "strings"
    68)
    79
     
    1214
    1315        sendTopic(dc, ch)
    14 
    15         // TODO: rpl_topicwhotime
    1616        sendNames(dc, ch)
    1717}
     
    2626                        Params:  []string{dc.nick, downstreamName, ch.Topic},
    2727                })
     28                if ch.TopicWho != nil {
     29                        topicWho := dc.marshalUserPrefix(ch.conn.network, ch.TopicWho)
     30                        topicTime := strconv.FormatInt(ch.TopicTime.Unix(), 10)
     31                        dc.SendMessage(&irc.Message{
     32                                Prefix:  dc.srv.prefix(),
     33                                Command: rpl_topicwhotime,
     34                                Params:  []string{dc.nick, downstreamName, topicWho.String(), topicTime},
     35                        })
     36                }
    2837        } else {
    2938                dc.SendMessage(&irc.Message{
Note: See TracChangeset for help on using the changeset viewer.