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

Made nickserv less async (fixes #95, part of #144). #172

Merged
merged 1 commit into from
Nov 19, 2017

Conversation

brhoades
Copy link
Collaborator

@brhoades brhoades commented Nov 18, 2017

Nickserv was previously async enough to identify after all channels were joined. I've now configured the module to retry joining channels if Nickserv sends us a notice with specific text (you are now identified). This isn't quite the workaround described in #95, but it works!

Also added logging in a few spots and removed tabs.

edit: cc #144

bot.getConfig('nickserv.json', function(err, conf) {
console.log(err);
if(err) return;
module.exports.init = (b) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still needs to be a function, otherwise this.log won't work.

The bot calls init via something quite close to moduleInit.apply(moduleBot, moduleBot)

Here's the difference I'm meaning: https://runkit.com/euank/5a10b6c0bb407900127d67bd

"password" : "dicks"
"nickserv": "nickserv",
"password" : "dicks",
"successtext": "you are now identified for "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps this should be a regexp? still a string in the config, but always passed to new RegExp and used with .test

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@brhoades brhoades force-pushed the nickserv-less-async branch from 12677f8 to a95bfda Compare November 18, 2017 22:50
Changed arrow func to function for logging.

Now using regex for nickserv success message tests.
@brhoades brhoades force-pushed the nickserv-less-async branch from a95bfda to 4bf3418 Compare November 18, 2017 22:59
Copy link
Member

@euank euank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM other than the commit message not following the usual module/nickerv: style prefix

Copy link
Member

@LinuxMercedes LinuxMercedes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@LinuxMercedes LinuxMercedes merged commit 5a84066 into wobscale:master Nov 19, 2017
@brhoades brhoades deleted the nickserv-less-async branch November 19, 2017 02:03
gmackie pushed a commit to gmackie/EuIrcBot that referenced this pull request Dec 16, 2017
…ale#172)

Changed arrow func to function for logging.

Now using regex for nickserv success message tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants