diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2022-05-01 10:28:41 +0200 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2022-05-01 10:28:41 +0200 |
commit | fabb8e2400e22a638c105c0a9cd99919f2fc7dee (patch) | |
tree | aaacd907773c8ca6afe6b6c5240ff7c9e4ca8648 /chat.go | |
parent | c71129fdf4827d1757ce6d3d2be7c89e22987560 (diff) |
Make chat command handlers run concurrently
They can't hang the packet handler anymore and the user is warned if commands take a lot of time to run
Diffstat (limited to 'chat.go')
-rw-r--r-- | chat.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -9,6 +9,10 @@ import ( "github.com/anon55555/mt" ) +// ChatCmdTimeout is the time needed until a user is warned +// about a chat command that's taking long to execute. +var ChatCmdTimeout = 10 * time.Second + // SendChatMsg sends a chat message to the ClientConn. func (cc *ClientConn) SendChatMsg(msg ...string) { cc.SendCmd(&mt.ToCltChatMsg{ |