Skip to content
Permalink
Browse files

fix commands regex

  • Loading branch information...
devnewton committed Jan 14, 2018
1 parent f812fab commit 10323a46406b3600b24cdba7b72cfc7fa9b319c7
Showing with 2 additions and 2 deletions.
  1. +2 −2 js/taab.js
@@ -72,7 +72,7 @@ document.addEventListener('DOMContentLoaded', function () {
return this.handleCommandNick() || this.handleCommandJoin();
},
handleCommandNick: function () {
var result = /\/nick (.*)/.exec(this.message);
var result = /^\/nick (.*)/.exec(this.message);
if (result && result.length === 2) {
localStorage.login = result[1];
return true;
@@ -81,7 +81,7 @@ document.addEventListener('DOMContentLoaded', function () {
}
},
handleCommandJoin: function () {
var result = /\/join ?#?(\w+)?/.exec(this.message);
var result = /^\/join ?#?(\w+)?/.exec(this.message);
if (result && result.length === 2) {
this.posts = [];
this.room = result[1] || '';

0 comments on commit 10323a4

Please sign in to comment.
You can’t perform that action at this time.