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

User MODE changes are not being received in +MODE/-MODE handlers #374

Closed
Darkhogg opened this issue May 26, 2015 · 5 comments
Closed

User MODE changes are not being received in +MODE/-MODE handlers #374

Darkhogg opened this issue May 26, 2015 · 5 comments

Comments

@Darkhogg
Copy link

In the current state of the library, user modes are not received by any event handlers (other than raw, of course).

My bot reacts to some user mode changes (especially +r), and treating them as regular MODE commands would be nice.

It seems that this line is preventing it, I'm not sure if on purpose.

@ghost ghost mentioned this issue Sep 4, 2015
@ghost
Copy link

ghost commented Sep 12, 2015

Ya, mode needs to be cleaned up a bit to remove duplicate lines and redundant parsing, I'm not sure what 'prefixForMode' is for, any idea?

@ghost
Copy link

ghost commented Sep 12, 2015

After a looking the line you referred its in anticipation of when the bot first joins the channel and gets a message (i.e. MODE: nodebot sets mode: +iwRTxv)

The line: if (!channel) break; looks like it should be if (!channel) return; because its breaking out of the entire for loop instead of allowing the next iteration(s).

@Darkhogg
Copy link
Author

@jnull An if (!channel) return would prevent the entire function from continuing. That break actually only affects the internal case.

@ghost
Copy link

ghost commented Sep 12, 2015

@Darkhogg, you're right i mixed up my break and my return, i just realized this is probably working because i only set one listener mode and not the other -mode when i was testing last night, so i thought i was running into a problem, which was just phantom. i think modes are working fine then.

@jirwin
Copy link
Collaborator

jirwin commented Jan 29, 2016

Can you please try and see if the new events added in #351 solve this for you? Closing this for now as I believe it will.

@jirwin jirwin closed this as completed Jan 29, 2016
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

No branches or pull requests

2 participants