Changeset 113 in code


Ignore:
Timestamp:
Mar 17, 2020, 3:15:54 PM (5 years ago)
Author:
contact
Message:

Fix echo PRIVMSG messages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/downstream.go

    r112 r113  
    253253                                        // The message comes from our connection, don't echo it
    254254                                        // back
     255                                        consumer.Consume()
    255256                                        continue
    256257                                }
     
    904905                        })
    905906
     907                        echoMsg := &irc.Message{
     908                                Prefix: &irc.Prefix{
     909                                        Name: uc.nick,
     910                                        User: uc.username,
     911                                },
     912                                Command: "PRIMSG",
     913                                Params:  []string{upstreamName, text},
     914                        }
    906915                        dc.lock.Lock()
    907                         dc.ourMessages[msg] = struct{}{}
     916                        dc.ourMessages[echoMsg] = struct{}{}
    908917                        dc.lock.Unlock()
    909918
    910                         uc.ring.Produce(msg)
     919                        uc.ring.Produce(echoMsg)
    911920                }
    912921        default:
Note: See TracChangeset for help on using the changeset viewer.