diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2022-05-14 18:51:16 +0200 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2022-05-14 18:51:23 +0200 |
commit | 1da36d94a00cbf7959d76797dc2c8356c36f9053 (patch) | |
tree | ae6f255e4eb77dd023d8ac724010bed2b3d6d39f /chat.go | |
parent | 0e92b7ba4495b6a4e41ab3faf8052ef03888a6c7 (diff) | |
parent | df47c77c9ec0d3a35aa49ba5db74fc7a149996d4 (diff) |
Merge branch 'plugin_chat' of github.com:ev2-1/mt-multiserver-proxy into ev2-1-plugin_chat
Diffstat (limited to 'chat.go')
-rw-r--r-- | chat.go | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -13,6 +13,19 @@ import ( // about a chat command that's taking long to execute. var ChatCmdTimeout = 10 * time.Second +// DoChatMsg does a chat message +func (cc *ClientConn) DoChatMsg(msg string) { + cmd := &mt.ToSrvChatMsg{Msg: msg} + + str, fwd := onChatMsg(cc, cmd) + if len(str) != 0 { + cc.SendChatMsg(str) + } + if fwd { + cc.server().SendCmd(cmd) + } +} + // SendChatMsg sends a chat message to the ClientConn. func (cc *ClientConn) SendChatMsg(msg ...string) { cc.SendCmd(&mt.ToCltChatMsg{ |