diff options
Diffstat (limited to '')
-rw-r--r-- | src/mod_irc_connection.erl | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/src/mod_irc_connection.erl b/src/mod_irc_connection.erl index cc21b0f1..5c8597f2 100644 --- a/src/mod_irc_connection.erl +++ b/src/mod_irc_connection.erl @@ -306,7 +306,7 @@ handle_info({route_chan, Channel, Resource, of <<"">> -> ejabberd_router:route( - jlib:make_jid( + jid:make( iolist_to_binary([Channel, <<"%">>, StateData#state.server]), @@ -430,7 +430,7 @@ handle_info({route_chan, Channel, Resource, #xmlel{name = <<"iq">>} = El}, StateName, StateData) -> From = StateData#state.user, - To = jlib:make_jid(iolist_to_binary([Channel, <<"%">>, + To = jid:make(iolist_to_binary([Channel, <<"%">>, StateData#state.server]), StateData#state.host, StateData#state.nick), _ = case jlib:iq_query_info(El) of @@ -716,7 +716,7 @@ terminate(_Reason, _StateName, FullStateData) -> send_stanza(Chan, StateData, Stanza) -> ejabberd_router:route( - jlib:make_jid( + jid:make( iolist_to_binary([Chan, <<"%">>, StateData#state.server]), @@ -770,9 +770,9 @@ bounce_messages(Reason) -> <<"error">> -> ok; _ -> Err = jlib:make_error_reply(El, <<"502">>, Reason), - From = jlib:string_to_jid(xml:get_attr_s(<<"from">>, + From = jid:from_string(xml:get_attr_s(<<"from">>, Attrs)), - To = jlib:string_to_jid(xml:get_attr_s(<<"to">>, + To = jid:from_string(xml:get_attr_s(<<"to">>, Attrs)), ejabberd_router:route(To, From, Err) end, @@ -830,7 +830,7 @@ process_channel_list_user(StateData, Chan, User) -> {U2, <<"admin">>, <<"moderator">>}; _ -> {User1, <<"member">>, <<"participant">>} end, - ejabberd_router:route(jlib:make_jid(iolist_to_binary([Chan, + ejabberd_router:route(jid:make(iolist_to_binary([Chan, <<"%">>, StateData#state.server]), StateData#state.host, User2), @@ -860,7 +860,7 @@ process_channel_topic(StateData, Chan, String) -> Msg = ejabberd_regexp:replace(String, <<".*332[^:]*:">>, <<"">>), Msg1 = filter_message(Msg), - ejabberd_router:route(jlib:make_jid(iolist_to_binary([Chan, + ejabberd_router:route(jid:make(iolist_to_binary([Chan, <<"%">>, StateData#state.server]), StateData#state.host, <<"">>), @@ -889,7 +889,7 @@ process_channel_topic_who(StateData, Chan, String) -> _ -> String end, Msg2 = filter_message(Msg1), - ejabberd_router:route(jlib:make_jid(iolist_to_binary([Chan, + ejabberd_router:route(jid:make(iolist_to_binary([Chan, <<"%">>, StateData#state.server]), StateData#state.host, <<"">>), @@ -921,7 +921,7 @@ process_nick_in_use(StateData, String) -> % Shouldn't happen with a well behaved server StateData; Chan -> - ejabberd_router:route(jlib:make_jid(iolist_to_binary([Chan, + ejabberd_router:route(jid:make(iolist_to_binary([Chan, <<"%">>, StateData#state.server]), StateData#state.host, @@ -938,7 +938,7 @@ process_num_error(StateData, String) -> <<"continue">>), lists:foreach(fun (Chan) -> ejabberd_router:route( - jlib:make_jid( + jid:make( iolist_to_binary( [Chan, <<"%">>, @@ -956,7 +956,7 @@ process_num_error(StateData, String) -> StateData. process_endofwhois(StateData, _String, Nick) -> - ejabberd_router:route(jlib:make_jid(iolist_to_binary([Nick, + ejabberd_router:route(jid:make(iolist_to_binary([Nick, <<"!">>, StateData#state.server]), StateData#state.host, <<"">>), @@ -973,7 +973,7 @@ process_whois311(StateData, String, Nick, Ident, Irchost) -> Fullname = ejabberd_regexp:replace(String, <<".*311[^:]*:">>, <<"">>), - ejabberd_router:route(jlib:make_jid(iolist_to_binary([Nick, + ejabberd_router:route(jid:make(iolist_to_binary([Nick, <<"!">>, StateData#state.server]), StateData#state.host, <<"">>), @@ -997,7 +997,7 @@ process_whois311(StateData, String, Nick, Ident, process_whois312(StateData, String, Nick, Ircserver) -> Ircserverdesc = ejabberd_regexp:replace(String, <<".*312[^:]*:">>, <<"">>), - ejabberd_router:route(jlib:make_jid(iolist_to_binary([Nick, + ejabberd_router:route(jid:make(iolist_to_binary([Nick, <<"!">>, StateData#state.server]), StateData#state.host, <<"">>), @@ -1019,7 +1019,7 @@ process_whois312(StateData, String, Nick, Ircserver) -> process_whois319(StateData, String, Nick) -> Chanlist = ejabberd_regexp:replace(String, <<".*319[^:]*:">>, <<"">>), - ejabberd_router:route(jlib:make_jid(iolist_to_binary( + ejabberd_router:route(jid:make(iolist_to_binary( [Nick, <<"!">>, StateData#state.server]), @@ -1047,7 +1047,7 @@ process_chanprivmsg(StateData, Chan, From, String) -> _ -> Msg end, Msg2 = filter_message(Msg1), - ejabberd_router:route(jlib:make_jid(iolist_to_binary( + ejabberd_router:route(jid:make(iolist_to_binary( [Chan, <<"%">>, StateData#state.server]), @@ -1069,7 +1069,7 @@ process_channotice(StateData, Chan, From, String) -> _ -> <<"/me NOTICE: ", Msg/binary>> end, Msg2 = filter_message(Msg1), - ejabberd_router:route(jlib:make_jid(iolist_to_binary( + ejabberd_router:route(jid:make(iolist_to_binary( [Chan, <<"%">>, StateData#state.server]), @@ -1091,7 +1091,7 @@ process_privmsg(StateData, _Nick, From, String) -> _ -> Msg end, Msg2 = filter_message(Msg1), - ejabberd_router:route(jlib:make_jid(iolist_to_binary( + ejabberd_router:route(jid:make(iolist_to_binary( [FromUser, <<"!">>, StateData#state.server]), @@ -1113,7 +1113,7 @@ process_notice(StateData, _Nick, From, String) -> _ -> <<"/me NOTICE: ", Msg/binary>> end, Msg2 = filter_message(Msg1), - ejabberd_router:route(jlib:make_jid(iolist_to_binary( + ejabberd_router:route(jid:make(iolist_to_binary( [FromUser, <<"!">>, StateData#state.server]), @@ -1141,14 +1141,14 @@ process_userinfo(StateData, _Nick, From) -> send_text(StateData, io_lib:format("NOTICE ~s :\001USERINFO xmpp:~s\001\r\n", [FromUser, - jlib:jid_to_string(StateData#state.user)])). + jid:to_string(StateData#state.user)])). process_topic(StateData, Chan, From, String) -> [FromUser | _] = str:tokens(From, <<"!">>), Msg = ejabberd_regexp:replace(String, <<".*TOPIC[^:]*:">>, <<"">>), Msg1 = filter_message(Msg), - ejabberd_router:route(jlib:make_jid(iolist_to_binary( + ejabberd_router:route(jid:make(iolist_to_binary( [Chan, <<"%">>, StateData#state.server]), @@ -1170,7 +1170,7 @@ process_part(StateData, Chan, From, String) -> Msg = ejabberd_regexp:replace(String, <<".*PART[^:]*:">>, <<"">>), Msg1 = filter_message(Msg), - ejabberd_router:route(jlib:make_jid(iolist_to_binary( + ejabberd_router:route(jid:make(iolist_to_binary( [Chan, <<"%">>, StateData#state.server]), @@ -1212,7 +1212,7 @@ process_quit(StateData, From, String) -> dict:map(fun (Chan, Ps) -> case (?SETS):is_member(FromUser, Ps) of true -> - ejabberd_router:route(jlib:make_jid(iolist_to_binary( + ejabberd_router:route(jid:make(iolist_to_binary( [Chan, <<"%">>, StateData#state.server]), @@ -1261,7 +1261,7 @@ process_quit(StateData, From, String) -> process_join(StateData, Channel, From, _String) -> [FromUser | FromIdent] = str:tokens(From, <<"!">>), [Chan | _] = binary:split(Channel, <<":#">>), - ejabberd_router:route(jlib:make_jid(iolist_to_binary( + ejabberd_router:route(jid:make(iolist_to_binary( [Chan, <<"%">>, StateData#state.server]), @@ -1294,7 +1294,7 @@ process_join(StateData, Channel, From, _String) -> process_mode_o(StateData, Chan, _From, Nick, Affiliation, Role) -> - ejabberd_router:route(jlib:make_jid(iolist_to_binary( + ejabberd_router:route(jid:make(iolist_to_binary( [Chan, <<"%">>, StateData#state.server]), @@ -1318,7 +1318,7 @@ process_kick(StateData, Chan, From, Nick, String) -> Msg = lists:last(str:tokens(String, <<":">>)), Msg2 = <<Nick/binary, " kicked by ", From/binary, " (", (filter_message(Msg))/binary, ")">>, - ejabberd_router:route(jlib:make_jid(iolist_to_binary( + ejabberd_router:route(jid:make(iolist_to_binary( [Chan, <<"%">>, StateData#state.server]), @@ -1329,7 +1329,7 @@ process_kick(StateData, Chan, From, Nick, String) -> children = [#xmlel{name = <<"body">>, attrs = [], children = [{xmlcdata, Msg2}]}]}), - ejabberd_router:route(jlib:make_jid(iolist_to_binary( + ejabberd_router:route(jid:make(iolist_to_binary( [Chan, <<"%">>, StateData#state.server]), @@ -1361,7 +1361,7 @@ process_nick(StateData, From, NewNick) -> NewChans = dict:map(fun (Chan, Ps) -> case (?SETS):is_member(FromUser, Ps) of true -> - ejabberd_router:route(jlib:make_jid( + ejabberd_router:route(jid:make( iolist_to_binary( [Chan, <<"%">>, @@ -1408,7 +1408,7 @@ process_nick(StateData, From, NewNick) -> children = []}]}]}), - ejabberd_router:route(jlib:make_jid( + ejabberd_router:route(jid:make( iolist_to_binary( [Chan, <<"%">>, @@ -1456,7 +1456,7 @@ process_nick(StateData, From, NewNick) -> process_error(StateData, String) -> lists:foreach(fun (Chan) -> - ejabberd_router:route(jlib:make_jid( + ejabberd_router:route(jid:make( iolist_to_binary( [Chan, <<"%">>, |