Add setNickname docs

This commit is contained in:
abalabahaha
2016-04-30 11:58:12 -07:00
parent 249b6f919a
commit e48f2ffae3
4 changed files with 28 additions and 0 deletions

View File

@@ -755,6 +755,11 @@ var Client = (function (_EventEmitter) {
Client.prototype.setNickname = function setNickname(server, nick, user) {
var callback = arguments.length <= 3 || arguments[3] === undefined ? function () /*err, {}*/{} : arguments[3];
if (typeof user === "function") {
// user is the callback
callback = user;
user = null;
}
if (!user) {
user = this.user;
}