summaryrefslogtreecommitdiffstats
path: root/webchat/public/commands.js
diff options
context:
space:
mode:
Diffstat (limited to 'webchat/public/commands.js')
-rw-r--r--webchat/public/commands.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/webchat/public/commands.js b/webchat/public/commands.js
index 5a570556..d4408c4c 100644
--- a/webchat/public/commands.js
+++ b/webchat/public/commands.js
@@ -1,14 +1,15 @@
var commands = {}
-commands.say = function (settings, params) {
+commands.msg = function (settings, params) {
var sendObj = {
- method: 'say',
- params: { msg: params },
- };
+ method: 'msg',
+ params: { msg: params }
+ }
settings.sock.send(JSON.stringify(sendObj))
}
commands.nick = function (settings, params) {
+ settings.nick = params
var sendObj = {
method: 'nick',
params: { nick: params },
@@ -17,7 +18,7 @@ commands.nick = function (settings, params) {
}
commands.badcommand = function (settings, params) {
- console.log("error");
+ console.log("error", params);
chatboxAppend( '<span class="from_system">error</span>', 'command not found' )