Skip to content
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

Merged
merged 2 commits into from
Oct 17, 2016
Merged

Conversation

xPaw
Copy link
Member

@xPaw xPaw commented Oct 8, 2016

Fixes #676 and #223.

Also adds support for passing in multiple nicks into /op (and other short commands). Adds a /hop and /dehop aliases.

@xPaw xPaw added the Type: Feature Tickets that describe a desired feature or PRs that add them to the project. label Oct 8, 2016
@xPaw xPaw added this to the 2.1.0 milestone Oct 8, 2016

return true;
network.irc.raw.apply(network.irc, args);
Copy link
Member Author

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);
Copy link
Member Author

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.

@xPaw xPaw force-pushed the xpaw/fix-mode-command branch from 93be5ed to 108c2a7 Compare October 15, 2016 11:17
@xPaw xPaw force-pushed the xpaw/fix-mode-command branch from 108c2a7 to 93053d4 Compare October 15, 2016 11:23
@astorije astorije modified the milestones: 2.2.0, 2.1.0 Oct 15, 2016
nick: "xPaw",
irc: {
raw: function() {
testableNetwork.lastCommand = Array.prototype.join.call(arguments, " ");
Copy link
Member

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");
});
Copy link
Member

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!!

@astorije astorije merged commit 04f2370 into master Oct 17, 2016
@astorije astorije deleted the xpaw/fix-mode-command branch October 17, 2016 19:30
matburnham pushed a commit to matburnham/lounge that referenced this pull request Sep 6, 2017
Fix /mode command to correctly assume target
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Type: Feature Tickets that describe a desired feature or PRs that add them to the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants