nandub / hubot-irc

IRC adapter for Hubot
MIT License
299 stars 128 forks source link

emit a leavemessage on kick event #134

Closed skibz closed 9 years ago

skibz commented 10 years ago

a 'part' or 'quit' event is not emitted when a user is kicked, so i just replicated the logic from similar listeners.

without this, my irc bot isn't able to purge users that are no longer present from its memory. when i say 'memory', i don't mean robot.brain but rather the data-structure my bot creates, itself.

i'm not sure if i've gone about this the right way. also, i'm not even sure if this is entirely necessary. perhaps it's already possible to catch a 'kick' event. if it is, please accept my apologies. :P

parkr commented 9 years ago

This functionality should be refactored to avoid repeating yourself.

skibz commented 9 years ago

@parkr do you consider this a suitable refactoring? i couldn't think of any other way to go about it...

skibz commented 9 years ago

i'm just going to close this and maintain the change in my own fork. :+1: