2010/1/26 Badlop <span dir="ltr"><<a href="mailto:badlop@gmail.com">badlop@gmail.com</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2010/1/25 Adam Hayward <<a href="mailto:adam@happy.cat">adam@happy.cat</a>>:<br>
<div class="im"></div>
<br>
You can try to:<br>
1. explain what you *really* want to accomplish,<br>
<br></blockquote><div><br></div></div>Hullo,<br><br>supposing I had:<br>š- a chat server called "<a href="http://recipes.com">recipes.com</a>"<br>and <br>š- a chat-bot called "mod_recipes" that provided recipe information on "<a href="http://recipes.recipes.com">recipes.recipes.com</a>"<br>
my aim is to provide said service directly via "<a href="http://recipes.com">recipes.com</a>".š So to get going, I had a look at the function int() in mod_echo.erl* that would provide a basic echo service on "echo.@HOST@" and the crucial part seems to be these two lines:<br>
<pre> MyHost = gen_mod:get_opt_host(Host, Opts, "echo.@HOST@"),<br> ejabberd_router:register_route(MyHost),<br></pre>I kind of hoped that by simply changing MyHost thus:<br><pre> MyHost = gen_mod:get_opt_host(Host, Opts, "@HOST@"),<br>
</pre>i would turn my entire server into an echo service; although this appears to not be the case.š I imagine that I need to issue some kind of command to the router that all incoming messages, iq and presence stanzas should be routed to my module, but for the life of me I can't figure out how. It had occurred to me that I may have to *disable* some other modules before attempting this; or even change the order in which they are loaded somehow.<br>
<br>
If anyone has any knowledge of setting up chat bots in this way, I would be extremely grateful for a pointer; I have a feeling it's only a small point I am missing, but it has got me rather stuck<br><br>Regards,<br><br>
Adam<br><br>* <a href="https://svn.process-one.net/ejabberd/trunk/src/mod_echo.erl">https://svn.process-one.net/ejabberd/trunk/src/mod_echo.erl</a><br>