diff options
| author | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2022-11-19 12:36:57 -0800 |
|---|---|---|
| committer | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2022-11-19 12:36:57 -0800 |
| commit | 2e43fd4e1ec1f5e5920826126fc0f39a10d9282f (patch) | |
| tree | f912f897c500f3aa7fa06c381345e82bbc289047 /hotline/transaction_handlers.go | |
| parent | 745a1a1f23341740e19b02fcaf7c41d9c056aa7e (diff) | |
Improve Gtkhx compatability
Diffstat (limited to 'hotline/transaction_handlers.go')
| -rw-r--r-- | hotline/transaction_handlers.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hotline/transaction_handlers.go b/hotline/transaction_handlers.go index 6816456..7f8cbef 100644 --- a/hotline/transaction_handlers.go +++ b/hotline/transaction_handlers.go @@ -248,8 +248,9 @@ func HandleChatSend(cc *ClientConn, t *Transaction) (res []Transaction, err erro // By holding the option key, Hotline chat allows users to send /me formatted messages like: // *** Halcyon does stuff - // This is indicated by the presence of the optional field fieldChatOptions in the transaction payload - if t.GetField(fieldChatOptions).Data != nil { + // This is indicated by the presence of the optional field fieldChatOptions set to a value of 1. + // Most clients do not send this option for normal chat messages. + if t.GetField(fieldChatOptions).Data != nil && bytes.Equal(t.GetField(fieldChatOptions).Data, []byte{0, 1}) { formattedMsg = fmt.Sprintf("\r*** %s %s", cc.UserName, t.GetField(fieldData).Data) } |