usercommand support

This commit is contained in:
mappu 2016-10-08 15:19:53 +13:00
parent 44e7c0fbcf
commit 45e0cb4424

View File

@ -118,7 +118,13 @@ func (this *App) HubWorker(Nick, Pass string, so socketio.Socket, done chan stru
case libnmdc.EVENT_HUBNAME_CHANGED: case libnmdc.EVENT_HUBNAME_CHANGED:
so.Emit("hubname", hev.Nick) 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: default:
if this.cfg.App.Debug { if this.cfg.App.Debug {