aboutsummaryrefslogtreecommitdiff
path: root/chat.go
diff options
context:
space:
mode:
Diffstat (limited to 'chat.go')
-rw-r--r--chat.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/chat.go b/chat.go
index 5cae3db..e355b2a 100644
--- a/chat.go
+++ b/chat.go
@@ -16,6 +16,10 @@ func (cc *ClientConn) SendChatMsg(msg ...string) {
})
}
+func Colorize(text, color string) string {
+ return string(0x1b) + "(c@" + color + ")" + text + string(0x1b) + "(c@#FFF)"
+}
+
func onChatMsg(cc *ClientConn, cmd *mt.ToSrvChatMsg) (string, bool) {
initChatCmds()