From 3497bfc39f218ffa0e31c3c3286748d9869351c6 Mon Sep 17 00:00:00 2001 From: Mattias Erming Date: Thu, 15 May 2014 23:58:50 +0200 Subject: [PATCH] Added some command aliases --- README.md | 4 ++-- client/js/chat.js | 2 ++ lib/server.js | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9a3fcec2..73f949c8 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Run your IRC client on a server and access it from the web browser. This gives y These are the commands currently implemented: - [ ] /ame - [ ] /amsg -- [ ] /close +- [x] /close - [x] /connect - [x] /deop - [x] /devoice @@ -25,7 +25,7 @@ These are the commands currently implemented: - [ ] /partall - [x] /query - [x] /quit -- [ ] /raw +- [x] /raw - [x] /say - [x] /send - [x] /server diff --git a/client/js/chat.js b/client/js/chat.js index 518b4b51..ff02bc4b 100644 --- a/client/js/chat.js +++ b/client/js/chat.js @@ -3,6 +3,7 @@ $(function() { var sidebar = $("#sidebar"); var commands = [ + "/close", "/connect", "/deop", "/devoice", @@ -18,6 +19,7 @@ $(function() { "/part", "/query", "/quit", + "/raw", "/say", "/send", "/server", diff --git a/lib/server.js b/lib/server.js index 74500bf6..9e763c60 100644 --- a/lib/server.js +++ b/lib/server.js @@ -200,6 +200,7 @@ function input(data) { } break; + case "close": case "leave": case "part": var id = chan.id; @@ -275,7 +276,8 @@ function input(data) { } break; - // Send raw commands. + // Send raw IRC messages. + case "raw": case "send": if (client) { client.write(args.slice(1).join(" "));