RE: [NeoStats-Devel] Core CTCP event handling

"M" <[email protected]> Mon, 5 Sep 2005 23:14:28 +0100
Newsgroups gmane.comp.neostats.devel
Message-ID <[email protected]>
Justin Hammond wrote:
> Onto the next "challenge" then, how will we support other 
> clients sending the CTCP request and process the replies to 
> all "interested" modules?

I have extended the event system to support a broadcast CTCP event in
addition to the standard CTCP event. The standard events will thus work as
designed and as all other client to client PRIVMSG/NOTICE processing in that
only the appropriate module will receive the event. If a module wishes to
spy on CTCP events for other processes it hooks the broadcast version. 

For the sending of the request, we need to establish a "master" bot who is
responsible for sending the request. Currently, this is the root NeoStats
bot and in a default installation where no alternative master is desirable,
this can remain the case. This would suggest the need for a module to
override the master status for issuing of version requests. To this end, a
new bot flag has been added (BOT_FLAG_CTCPVERSIONMASTER). If specified in a
botinfo structure, this bot will be used by the core as the source of ctcp
version requests during client connects.

Current commits represent a proof of concept. I will post later about the
options available to polish the process and the issues that still remain.

Mark.