summaryrefslogtreecommitdiffstats
path: root/bridge/steam/steam.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-07-03 22:10:26 +0200
committerWim <wim@42.be>2017-07-03 22:10:26 +0200
commitc714501a0e79f96d69f34b5584e3ce0a25efd54b (patch)
tree29c1f452052e20eca10f00651d1eb63c4113a257 /bridge/steam/steam.go
parenta58a3e50000340c75f8c82a0421558cfa901b1e9 (diff)
downloadmatterbridge-msglm-c714501a0e79f96d69f34b5584e3ce0a25efd54b.tar.gz
matterbridge-msglm-c714501a0e79f96d69f34b5584e3ce0a25efd54b.tar.bz2
matterbridge-msglm-c714501a0e79f96d69f34b5584e3ce0a25efd54b.zip
Fix channel id off by 0x18000000000000 (steam)
Diffstat (limited to 'bridge/steam/steam.go')
-rw-r--r--bridge/steam/steam.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/bridge/steam/steam.go b/bridge/steam/steam.go
index 491612d1..5f40972f 100644
--- a/bridge/steam/steam.go
+++ b/bridge/steam/steam.go
@@ -101,7 +101,9 @@ func (b *Bsteam) handleEvents() {
case *steam.ChatMsgEvent:
flog.Debugf("Receiving ChatMsgEvent: %#v", e)
flog.Debugf("Sending message from %s on %s to gateway", b.getNick(e.ChatterId), b.Account)
- msg := config.Message{Username: b.getNick(e.ChatterId), Text: e.Message, Channel: strconv.FormatInt(int64(e.ChatRoomId), 10), Account: b.Account, UserID: strconv.FormatInt(int64(e.ChatterId), 10)}
+ // 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)}
b.Remote <- msg
case *steam.PersonaStateEvent:
flog.Debugf("PersonaStateEvent: %#v\n", e)