From 45e0cb4424d5879f8162185ff39c8edcf0243f6a Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 8 Oct 2016 15:19:53 +1300 Subject: [PATCH] usercommand support --- main.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index cb27d67..7019186 100644 --- a/main.go +++ b/main.go @@ -118,7 +118,13 @@ func (this *App) HubWorker(Nick, Pass string, so socketio.Socket, done chan stru case libnmdc.EVENT_HUBNAME_CHANGED: so.Emit("hubname", hev.Nick) - // FIXME no usercommand support in golang libnmdc?? + case libnmdc.EVENT_USERCOMMAND: + so.Emit("usercommand", map[string]interface{}{ + "type": hev.UserCommand.Type, + "context": hev.UserCommand.Context, + "title": hev.UserCommand.Message, + "raw": hev.UserCommand.Command, + }) default: if this.cfg.App.Debug {