Heres something that would work, blue sections you need to do yourself, and maybe even fine tuen the rest, but the idea i think is sound.
;FIRSTBOT CODE
on *:TEXT:!info*:#channel:{
if ((SECONDBOT ison $chan) && (!$istok(waiting active,$chat(SECONDBOT).status,32)))) { close -c SECONDBOT | dcc chat SECONDBOT }
if (([color:blue]NOT ALREADY SENDING INFO[/color]) || ($chat(SECONDBOT).status != active)) {
set %sending.info.toggle 0
Process.a.request.alias $nick $chan $1-
}
else {
inc %sending.info.toggle
if (!$calc(%sending.info.toggle % 2)) {
Process.a.request.alias $nick $chan $1-
}
else {
msg =SECONDBOT PROCESS $nick $chan $1-
}
}
}
;SECONDBOT CODE
on *:CHAT:PROCESS *:{
if (($nick == =FIRSTBOT) && ($2 ison $3)) {
Process.a.request.alias $2 $3 $4-
}
}
;BOTH BOTS HAVE THIS
alias Process.a.request.alias {
var %nick = $1
var %chan = $2
tokenize 32 $3-
[color:blue]Code to process a request, with %nick instead of $nick, and %chan instead of $chan, $1- is text from %nick[/color]
}
* code untested *
Simply the idea is the first bot any time it gets a requests, attempts to dcc connect the second bot if present, this is to establish a continues link between them, that is not dependent on the irc server for speed of message traffic.
Next if it isnt sending a reply already OR the link to bot2 isnt yet made, then it has to process the request (no one else can)
If however the link is made then it increments a counter, and only if that counter is even well it process a request
If it isnt even then it well send a message to bot2 with instructions on channel nick and what they said (thus handing off that request)
The second bot is like a simple servant, it just gets orders from BOT1 and processes the requests it was ordered to do.
Each bot has the same procces the request alias, however becuase bot2 is calling it from a dcc chat with bot1, the $nick and $chan values are not supported, thus why they are passed to it as parameters.