mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-09 23:40:27 +00:00
Add support for bridging to individual steam chats. (steam) (#294)
This commit is contained in:
parent
58392876df
commit
27e94c438d
@ -105,8 +105,13 @@ func (b *Bsteam) handleEvents() {
|
|||||||
case *steam.ChatMsgEvent:
|
case *steam.ChatMsgEvent:
|
||||||
flog.Debugf("Receiving ChatMsgEvent: %#v", e)
|
flog.Debugf("Receiving ChatMsgEvent: %#v", e)
|
||||||
flog.Debugf("Sending message from %s on %s to gateway", b.getNick(e.ChatterId), b.Account)
|
flog.Debugf("Sending message from %s on %s to gateway", b.getNick(e.ChatterId), b.Account)
|
||||||
// for some reason we have to remove 0x18000000000000
|
var channel int64
|
||||||
channel := int64(e.ChatRoomId) - 0x18000000000000
|
if e.ChatRoomId == 0 {
|
||||||
|
channel = int64(e.ChatterId)
|
||||||
|
} else {
|
||||||
|
// for some reason we have to remove 0x18000000000000
|
||||||
|
channel = int64(e.ChatRoomId) - 0x18000000000000
|
||||||
|
}
|
||||||
msg := config.Message{Username: b.getNick(e.ChatterId), Text: e.Message, Channel: strconv.FormatInt(channel, 10), Account: b.Account, UserID: strconv.FormatInt(int64(e.ChatterId), 10)}
|
msg := config.Message{Username: b.getNick(e.ChatterId), Text: e.Message, Channel: strconv.FormatInt(channel, 10), Account: b.Account, UserID: strconv.FormatInt(int64(e.ChatterId), 10)}
|
||||||
b.Remote <- msg
|
b.Remote <- msg
|
||||||
case *steam.PersonaStateEvent:
|
case *steam.PersonaStateEvent:
|
||||||
|
Loading…
Reference in New Issue
Block a user