-
Notifications
You must be signed in to change notification settings - Fork 699
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix /mode command to correctly assume target #679
Conversation
|
||
return true; | ||
network.irc.raw.apply(network.irc, args); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...
spread operator is not supported in node4.
} | ||
|
||
if (args.length === 0 || args[0][0] === "+" || args[0][0] === "-") { | ||
args.unshift(chan.type === Chan.Type.CHANNEL || chan.type === Chan.Type.QUERY ? chan.name : network.nick); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if there's any use of allowing query
targets here.
93be5ed
to
108c2a7
Compare
108c2a7
to
93053d4
Compare
nick: "xPaw", | ||
irc: { | ||
raw: function() { | ||
testableNetwork.lastCommand = Array.prototype.join.call(arguments, " "); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice trick to get the latest command called!
// Multiple arguments are supported, sent as separate commands | ||
ModeCommand.input(testableNetwork, channel, "devoice", ["xPaw", "Max-P"]); | ||
expect(testableNetwork.lastCommand).to.equal("MODE #thelounge -v Max-P"); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather see these broken up in multiple expects (can be grouped in a common describe
), but really no big deal, especially at that point.
Awesome job on adding tests though!!
Fix /mode command to correctly assume target
Fixes #676 and #223.
Also adds support for passing in multiple nicks into
/op
(and other short commands). Adds a/hop
and/dehop
aliases.