Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix status command.

  • Loading branch information...
commit 6e62b05668c48cce5ed434fc214c1a7709ea442d 1 parent 0692226
@mythmon mythmon authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 standup-irc.js
View
9 standup-irc.js
@@ -111,12 +111,12 @@ client.on('message', function(user, channel, msg) {
if (cond) {
// msg = "!cmd arg1 arg2 arg3"
var cmd_name = msg.split(' ')[0].slice(1);
- var args = msg.split(' ').slice(1).join(' ');
+ var args = msg.split(' ').slice(1);
var cmd = commands[cmd_name] || commands['default'];
cmd(user, channel, msg, args);
} else {
// If they didn't ask for a specific command, post a status.
- commands.status(user, channel, msg, msg);
+ commands.status(user, channel, msg, [channel, msg]);
}
});
@@ -128,8 +128,9 @@ var commands = {
/* Create a status. */
status: function(user, channel, message, args) {
- if (channel.charAt(0) == '#') {
- channel = channel.slice(1);
+ var project = args[1];
+ if (project.charAt(0) == '#') {
+ project = project.slice(1);
}
var ret = api.status.create(user, channel, args);
ret.on('ok', function(data) {
Please sign in to comment.
Something went wrong with that request. Please try again.