Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed some problems

  • Loading branch information...
commit 6b532c0e3e972d5c3b0a70efd364425a8ac0d1d9 1 parent fc5da26
@sent1nel authored
Showing with 8 additions and 6 deletions.
  1. +8 −6 index.js
View
14 index.js
@@ -115,15 +115,17 @@ zIRCClient.prototype.send_command = function (command, args) {
return false;
}
- var vsprintf = function (string, args, newline) {
- args.forEach(function(arg) {
- string = util.format(string, arg);
- });
+ var vsprintf = function (string, args) {
+ if (Array.isArray(args)) {
+ args.forEach(function(arg) {
+ string = util.format(string, arg);
+ });
+ }
return string;
}
- console.log(vsprintf(command, args));
- this.commands_sent += !stream.write(vsprintf(command, args);
+ util.log(vsprintf(command, args));
+ this.commands_sent += !stream.write(vsprintf(command, args));
return true;
};
Please sign in to comment.
Something went wrong with that request. Please try again.