25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-10-11 15:08:56 +02:00
xmpp.chapril.org-ejabberd/src/mod_echo.erl
Alexey Shchepin 5645292526 *** empty log message ***
SVN Revision: 40
2003-01-15 19:54:44 +00:00

36 lines
748 B
Erlang

%%%----------------------------------------------------------------------
%%% File : mod_echo.erl
%%% Author : Alexey Shchepin <alexey@sevcom.net>
%%% Purpose :
%%% Created : 15 Jan 2003 by Alexey Shchepin <alexey@sevcom.net>
%%% Id : $Id$
%%%----------------------------------------------------------------------
-module(mod_echo).
-author('alexey@sevcom.net').
-vsn('$Revision$ ').
-export([start/0, init/0]).
-include("ejabberd.hrl").
-include("namespaces.hrl").
start() ->
spawn(?MODULE, init, []).
init() ->
ejabberd_router:register_local_route("echo." ++ ?MYNAME),
loop().
loop() ->
receive
{route, From, To, Packet} ->
ejabberd_router:route(To, From, Packet),
loop();
_ ->
loop()
end.