diff --git a/bridge/soulseek/handlers.go b/bridge/soulseek/handlers.go index 0b86cb3c..292c66dc 100644 --- a/bridge/soulseek/handlers.go +++ b/bridge/soulseek/handlers.go @@ -42,6 +42,11 @@ func (b *Bsoulseek) handleChatMessage(msg sayChatroomMessageReceive) { Channel: msg.Room, Username: msg.Username, } + if strings.HasPrefix(msg.Message, "/me ") { + // user action + bridgeMessage.Text = msg.Message[4:] + bridgeMessage.Event = config.EventUserAction + } b.local <- bridgeMessage } diff --git a/bridge/soulseek/soulseek.go b/bridge/soulseek/soulseek.go index bf891203..f7e12d5c 100644 --- a/bridge/soulseek/soulseek.go +++ b/bridge/soulseek/soulseek.go @@ -211,7 +211,11 @@ func (b *Bsoulseek) Send(msg config.Message) (string, error) { if msg.Event != "" && msg.Event != config.EventUserAction && msg.Event != config.EventJoinLeave { return "", nil } - b.messagesToSend <- makeSayChatroomMessage(msg.Channel, msg.Username+msg.Text) + text := msg.Username+msg.Text + if msg.Event == config.EventUserAction { + text = msg.Username + "/me " + msg.Text + } + b.messagesToSend <- makeSayChatroomMessage(msg.Channel, text) return "", nil }