Closed kyrylo closed 12 years ago
Thanks. I had to cherry-pick (instead of merge) your fix though because bug fixes like that have to be applied against the maint branch, which doesn't contain any of the new stuff that gets added to master. The new commit is 889e811.
I stumbled upon the situation, when I want to
react_on
NOTICE event. I wrote some code for a plugin and it turned out, that the method, which "reacts on" the event was executing twice:So, for every new NOTICE Cinch creates two
:notice
events to be called by handlers.The first addition is here: https://github.com/cinchrb/cinch/blob/b73c62cbd3a54ef83121691e57368ba10da2cdf8/lib/cinch/irc.rb#L248 And the second is here: https://github.com/cinchrb/cinch/blob/b73c62cbd3a54ef83121691e57368ba10da2cdf8/lib/cinch/irc.rb#L263
So, whenever it parses such a string as this…:
…it molds the following
event
Array:For example, for PRIVMSG it would look like this, which is OK:
In this pull request I tried to eliminate this duplication of "notices". Hard to say, whether I fucked up something or not, but at least you are aware of the bug now :)