Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Modify handleNick() to fire a custom event #6

Closed
elazar opened this issue Apr 8, 2015 · 6 comments
Closed

Modify handleNick() to fire a custom event #6

elazar opened this issue Apr 8, 2015 · 6 comments

Comments

@elazar
Copy link
Member

elazar commented Apr 8, 2015

There are instances where it is desirable for other plugins to be aware of when authentication with NickServ is successful, such as joining channels that require user registration. Modify handleNick() to emit a custom event that other plugins can listen for.

PSchwisow pushed a commit to PSchwisow/phergie-irc-plugin-react-nickserv that referenced this issue Apr 9, 2015
elazar added a commit that referenced this issue Apr 10, 2015
#6 handleNick emits 'nickserv.nick' when it receives relevant NICK event.
@Renegade334
Copy link
Contributor

This isn't the right event to listen out for. Instead, the plugin should fire an event when it receives a privmsg or notice with the phrase "identified" (or "now identified"). The bot's nick being changed is more likely to be associated with NickServ implementations that forcibly change a user's nick if they fail to identify to it.

@elazar
Copy link
Member Author

elazar commented Apr 10, 2015

Here's the event as Phergie v2 currently receives it from Freenode:

[2015-04-08/17:06:27]  irc.freenode.net <- NOTICE Phergie :You are now identified for ^BPhergie^B.

@Renegade334 @PSchwisow Is this a change one of you could make against master?

@PSchwisow
Copy link

@elazar Do you want me to remove the other event I added or leave that in place?

@elazar
Copy link
Member Author

elazar commented Apr 13, 2015

@PSchwisow The event is the same, in name at least. The only difference is the circumstances under which it's emitted: rather than in handleNick(), it will be emitted when a PRIVMSG or NOTICE event is received from the NickServ user that contains a configurable phrase with the default being 'now identified'.

PSchwisow pushed a commit to PSchwisow/phergie-irc-plugin-react-nickserv that referenced this issue Apr 13, 2015
…relevant notice. (Removed previous event.)
elazar added a commit that referenced this issue Apr 13, 2015
#6 handleNotice emits 'nickserv.confirmed' when it receives a relevant n...
@elazar
Copy link
Member Author

elazar commented Apr 13, 2015

@PSchwisow Merged.

@Renegade334 Sufficient?

@elazar
Copy link
Member Author

elazar commented May 26, 2015

Merged #11.

@elazar elazar closed this as completed May 26, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants