Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove channel from state when kicked

If kicked out of a channel remove it from the internal state so that the bot
will not try to join it again on reconnect.
  • Loading branch information...
commit bbfe3b520a373baabd56501a42690a324cb6d8be 1 parent d8533ff
@gdamjan authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  src/channels_plugin.erl
View
3  src/channels_plugin.erl
@@ -25,6 +25,9 @@ handle_event(Msg, Channels) ->
{in, _Ref, [_Server, _, <<"PART">>, Channel]} ->
%% keep track of channels
{ok, sets:del_element(Channel, Channels)};
+ {in, _Ref, [_Server, _, <<"KICK">>, Channel|_]} ->
+ %% keep track of channels
+ {ok, sets:del_element(Channel, Channels)};
_ ->
{ok, Channels}
end.
Please sign in to comment.
Something went wrong with that request. Please try again.