commit c20d63911675e13035ce07285f3cda9fb55f2fe3
Author: rrigby <ryan.rigby@griffithuni.edu.au>
Date: Wed Nov 08 09:36:20 2017 +0000
diff --git a/bridge/steam/steam.go b/bridge/steam/steam.go
index 60b2f1b..7eaef46 100644
--- a/bridge/steam/steam.go
+++ b/bridge/steam/steam.go
@@ -1058 +10513 @@ 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)
- // for some reason we have to remove 0x18000000000000
- channel := int64(e.ChatRoomId) - 0x18000000000000
+ var channel int64
+ 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)}
b.Remote <- msg
case *steam.PersonaStateEvent: