Skip to content

Skip sending falsy command preludes #260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 3, 2017

Conversation

Throne3d
Copy link
Collaborator

@Throne3d Throne3d commented Jul 1, 2017

Fixes #239 by allowing falsy command preludes to override default, and then manually skipping them in the sendToIrc and sendToDiscord methods.

(The old || method for defaulting meant falsy preludes were overridden. It functions properly with just that area fixed, but the other modifications are to prevent sending empty messages, which causes discord.js to complain and is probably a bad idea to accidentally do anyway.)

This seems possibly abusable by users to hide who's sending commands from the IRC users' perspective, but it'd have to be done intentionally by the person running the bot, so I think it's acceptable.

Fixes reactiflux#239 by allowing falsy command preludes to override default, and
then manually skipping them in the sendToIrc and sendToDiscord methods.
@Throne3d Throne3d self-assigned this Jul 1, 2017
@coveralls
Copy link

coveralls commented Jul 1, 2017

Coverage Status

Coverage increased (+0.02%) to 98.507% when pulling 1aff7a9 on Throne3d:fix/239-skip-falsy-cmdprelude into 47a5a6c on reactiflux:master.

@ekmartin ekmartin merged commit 85a55e6 into reactiflux:master Jul 3, 2017
@ekmartin
Copy link
Member

ekmartin commented Jul 3, 2017

👍

@Throne3d Throne3d deleted the fix/239-skip-falsy-cmdprelude branch July 3, 2017 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Commands to IRC from Discord without announcement
3 participants