Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add command nick

  • Loading branch information...
commit 4aa2b952a9593139740b4aabc8adc753cc04db29 1 parent 1c5cf83
@ry ry authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 client.js
View
9 client.js
@@ -95,8 +95,13 @@ function addMessage (from, text, time, _class) {
scrollDown();
}
-function matchingNicks () {
- return [];
+function matchingNicks (partial) {
+ var re = new RegExp(partial);
+ var matching = [];
+ for (var i = 0; i < nicks.length; i++) {
+ if (re.exec(nicks[i])) matching.push(nicks[i]);
+ }
+ return matching;
}
function clearEntry () {
Please sign in to comment.
Something went wrong with that request. Please try again.