Changeset 162 in code
- Timestamp:
- Mar 26, 2020, 9:33:44 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/downstream.go
r160 r162 1032 1032 Params: params, 1033 1033 }) 1034 if ch.creationTime != "" { 1035 dc.SendMessage(&irc.Message{ 1036 Prefix: dc.srv.prefix(), 1037 Command: rpl_creationtime, 1038 Params: []string{dc.nick, name, ch.creationTime}, 1039 }) 1040 } 1034 1041 } 1035 1042 case "TOPIC": -
trunk/irc.go
r155 r162 12 12 rpl_localusers = "265" 13 13 rpl_globalusers = "266" 14 rpl_creationtime = "329" 14 15 rpl_topicwhotime = "333" 15 16 err_invalidcapcmd = "410" -
trunk/upstream.go
r161 r162 17 17 18 18 type upstreamChannel struct { 19 Name string 20 conn *upstreamConn 21 Topic string 22 TopicWho string 23 TopicTime time.Time 24 Status channelStatus 25 modes channelModes 26 Members map[string]*membership 27 complete bool 19 Name string 20 conn *upstreamConn 21 Topic string 22 TopicWho string 23 TopicTime time.Time 24 Status channelStatus 25 modes channelModes 26 creationTime string 27 Members map[string]*membership 28 complete bool 28 29 } 29 30 … … 764 765 }) 765 766 } 767 case rpl_creationtime: 768 var channel, creationTime string 769 if err := parseMessageParams(msg, nil, &channel, &creationTime); err != nil { 770 return err 771 } 772 773 ch, err := uc.getChannel(channel) 774 if err != nil { 775 return err 776 } 777 778 firstCreationTime := ch.creationTime == "" 779 ch.creationTime = creationTime 780 if firstCreationTime { 781 uc.forEachDownstream(func(dc *downstreamConn) { 782 dc.SendMessage(&irc.Message{ 783 Prefix: dc.srv.prefix(), 784 Command: rpl_creationtime, 785 Params: []string{dc.nick, channel, creationTime}, 786 }) 787 }) 788 } 766 789 case rpl_topicwhotime: 767 790 var name, who, timeStr string
Note:
See TracChangeset
for help on using the changeset viewer.