|
From: Mickael R. <mi...@li...> - 2000-11-05 21:17:38
|
>>>>> "Thierry" == Thierry Mallard <th...@ma...> writes:
Thierry> Greetings,
Thierry> I was thinking a little about how to give some life to our bot.
Thierry> My proposal :
Thierry> - add a listener to the bot module, which will receive message
Thierry> for the irc functions (probably the switch function) indicating
Thierry> that there is some data to treat
As I will discuss further, the difficult part is to separate what was not
requested and what is send by the server as a response to a trigger from the
bot...
Thierry> - in the irc:switch function, the Bot, Header, and Data should be
Thierry> passed to that bot function with a message (!)
Thierry> - the bot will then treat as we wish the data. For a start, just
Thierry> dumping it with io:format would be ok
Thierry> - later on, parse the header in order to get what is it about ?
Thierry> as an exercice, we could make a hook for the KICK flag, and
Thierry> make Manderlbot reconnect itself after 2 secondes, and say "Hey!!!"
Thierry> on the channel
Yes !
Let's have fun !
Thierry> Is this ok with you Mickael ?
Yes. Of course that would be nice.
I agree with your point that there is something wrong with the current
architecture, that makes difficult to code synchronous function.
For example, it would be great to call the list function and to have it send
back the pre-parsed result of the call (List of channels, with topic, in an
Erlang form).
So, I think your proposal is a good start to a whole new architecture that
support this kind of message...
Any idea someone ?
The second point is to find what's wrong in the bot message handling that make
him miss ping from the server. The irc module is suppose to auto-answer to
ping but seems to miss some ping messages when there are some traffic on the
channel.
Still lot of work, but still lot of fun !
--
Mickaël
|