From b1e5ac516d61b53bd1f03e8d878e96b3984eec8f Mon Sep 17 00:00:00 2001 From: Mattias Erming Date: Wed, 7 May 2014 21:30:14 +0200 Subject: [PATCH] Added /send --- README.md | 1 + client/index.html | 2 +- client/js/chat.js | 1 + lib/server.js | 7 +++++++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a8d8f1e4..c3da226a 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ These are the commands currently implemented: - `/part` - `/query` - `/quit` +- `/send` - `/server` - `/topic` - `/voice` diff --git a/client/index.html b/client/index.html index f80704dd..a99fa966 100644 --- a/client/index.html +++ b/client/index.html @@ -68,7 +68,7 @@ {{partial "users"}} -
+
diff --git a/client/js/chat.js b/client/js/chat.js index 107778ae..6e62d80d 100644 --- a/client/js/chat.js +++ b/client/js/chat.js @@ -18,6 +18,7 @@ $(function() { "/part", "/query", "/quit", + "/send", "/server", "/topic", "/voice", diff --git a/lib/server.js b/lib/server.js index 453a2402..06808141 100644 --- a/lib/server.js +++ b/lib/server.js @@ -268,6 +268,13 @@ function input(data) { client.quit(); } break; + + // Send raw commands. + case "send": + if (client) { + client.write(args.slice(1).join(" ")); + } + break; } }