Skip to content

Commit

Permalink
Show help message for /join
Browse files Browse the repository at this point in the history
  • Loading branch information
Zarel committed Aug 6, 2016
1 parent 05c89b5 commit f14b6c0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js/client-chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@
parseCommand: function (text) {
var cmd = '';
var target = '';
var noSpace = false;
if (text.substr(0, 2) !== '//' && text.substr(0, 1) === '/') {
var spaceIndex = text.indexOf(' ');
if (spaceIndex > 0) {
Expand All @@ -349,6 +350,7 @@
} else {
cmd = text.substr(1);
target = '';
noSpace = true;
}
}

Expand Down Expand Up @@ -825,6 +827,7 @@

case 'joim':
case 'join':
if (noSpace) return this.parseCommand('/help join');
var room = toRoomid(target);
if (app.rooms[target]) {
app.focusRoom(target);
Expand Down

0 comments on commit f14b6c0

Please sign in to comment.