diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2016-08-09 10:56:32 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2016-08-09 10:56:32 +0300 |
commit | 522a186a3822a3fdb04a423b2238aab2fcfb4b1c (patch) | |
tree | 09f280636bb14db2c5132c567b335529d758d0a0 /src/mod_irc_connection.erl | |
parent | Change code to reflect recent changes in fxml_gen (diff) |
Improve some type specs
Diffstat (limited to 'src/mod_irc_connection.erl')
-rw-r--r-- | src/mod_irc_connection.erl | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/mod_irc_connection.erl b/src/mod_irc_connection.erl index 694accf4..c9b460ad 100644 --- a/src/mod_irc_connection.erl +++ b/src/mod_irc_connection.erl @@ -584,12 +584,12 @@ handle_info({ircstring, <<$:, String/binary>>}, [From, <<"MODE">>, <<$#, Chan/binary>>, <<"+o">>, Nick | _] -> process_mode_o(StateData, Chan, From, Nick, - <<"admin">>, <<"moderator">>), + admin, moderator), StateData; [From, <<"MODE">>, <<$#, Chan/binary>>, <<"-o">>, Nick | _] -> process_mode_o(StateData, Chan, From, Nick, - <<"member">>, <<"participant">>), + member, participant), StateData; [From, <<"KICK">>, <<$#, Chan/binary>>, Nick | _] -> process_kick(StateData, Chan, From, Nick, String), @@ -756,16 +756,16 @@ process_channel_list_user(StateData, Chan, User) -> end, {User2, Affiliation, Role} = case User1 of <<$@, U2/binary>> -> - {U2, <<"admin">>, <<"moderator">>}; + {U2, admin, moderator}; <<$+, U2/binary>> -> - {U2, <<"member">>, <<"participant">>}; + {U2, member, participant}; <<$%, U2/binary>> -> - {U2, <<"admin">>, <<"moderator">>}; + {U2, admin, moderator}; <<$&, U2/binary>> -> - {U2, <<"admin">>, <<"moderator">>}; + {U2, admin, moderator}; <<$~, U2/binary>> -> - {U2, <<"admin">>, <<"moderator">>}; - _ -> {User1, <<"member">>, <<"participant">>} + {U2, admin, moderator}; + _ -> {User1, member, participant} end, ejabberd_router:route( jid:make(iolist_to_binary([Chan, <<"%">>, StateData#state.server]), @@ -1157,8 +1157,6 @@ remove_element(E, Set) -> iq_admin(StateData, Channel, From, To, #iq{type = Type, sub_els = [SubEl]} = IQ) -> try process_iq_admin(StateData, Channel, Type, SubEl) of - ignore -> - ignore; {result, Result} -> ejabberd_router:route(To, From, xmpp:make_iq_result(IQ, Result)); {error, Error} -> |