Skip to content

Commit

Permalink
added command /help
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Homann committed Nov 13, 2009
1 parent 20b78d8 commit 59afc33
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions server.js
Expand Up @@ -322,6 +322,14 @@ var commands = {
var text = (nicks.length > 0) ? (nicks.join(", ") + " are here with you.") :
"You are all alone. Try /channels to find channels with someone to talk to.";
session.sendSystemMessage(text);
},
"help": function(session) {
var cmdNames = [];
for (cmd in commands) {
if (!commands.hasOwnProperty(cmd)) continue;
cmdNames.push("/"+cmd);
}
session.sendSystemMessage("Available commands: " + cmdNames.join(", "));
}
};

Expand Down

0 comments on commit 59afc33

Please sign in to comment.