Skip to content

Commit

Permalink
Switch argument order to be consistent with other libs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Westerlund committed Jan 19, 2013
1 parent f15f753 commit 6144015
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ function handleJoinReply(callback, msg) {
if (error) {
status |= STATUS.ERROR | STATUS.REMOVE;
error = new Error(error);
callback(this, error);
callback(error, this);
}
return status;
}
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/irc.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ describe("irc", function() {
const c1 = irc.channel("#fwdfrom");
const c2 = irc.channel("#fwdto");
const bot = this;
this.join(c1, function(ch, err) {
this.join(c1, function(err, ch) {
err.should.be.an.instanceof(Error);
err.message.should.equal("Forwarding to another channel");
ch.name.should.equal(c2.name);
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/objects.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ describe("objects", function() {
ers.forEach(function(e) {
const chan = irc.channel(f("#failjoin%s", e));
chan.client = bot;
chan.join(function(chn, err) {
chan.join(function(err, chn) {
chn.should.be.an.instanceof(irc.Channel);
err.should.be.an.instanceof(Error);
err.message.should.equal(f("Cannot join channel (%s)", e));
Expand Down

0 comments on commit 6144015

Please sign in to comment.