From b16e3f6d0b2b6202c3d9cdb5a05f440b10c3277f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Wed, 11 Jul 2007 08:37:30 +0000 Subject: * src/mod_echo.erl: mod_echo does not reply to other components. This is to make sure that a component will not discover its own capabilities (EJAB-281). * src/ejabberd.cfg: disable mod_echo in the example config file. mod_echo is mainly a development/test module. SVN Revision: 810 --- src/mod_echo.erl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mod_echo.erl b/src/mod_echo.erl index c2b466ee5..5d7474ac7 100644 --- a/src/mod_echo.erl +++ b/src/mod_echo.erl @@ -100,7 +100,11 @@ handle_cast(_Msg, State) -> %% Description: Handling all non call/cast messages %%-------------------------------------------------------------------- handle_info({route, From, To, Packet}, State) -> - ejabberd_router:route(To, From, Packet), + Packet2 = case From#jid.user of + "" -> jlib:make_error_reply(Packet, ?ERR_BAD_REQUEST); + _ -> Packet + end, + ejabberd_router:route(To, From, Packet2), {noreply, State}; handle_info(_Info, State) -> {noreply, State}. -- cgit v1.2.3