Add a bind type for incoming messages
Add a bind for incoming messages that gets triggered before any kind of processing happens. Basically the reverse of BIND OUT. If text is returned from the proc, Eggdrop will continue with normal processing of the line. If the proc returns 1 Eggdrop will halt processing.
Along with this, a new command should be added to trigger Eggdrop processing of a line that you feed it I call it "sendinc" below for lack of a better idea. A line sent to Eggdrop this way should also trigger the bind to ensure compatibility between different scripts.
The usefulness of this is that Eggdrop would be able to support any arbitrary line-based prococol (even ones with multiple lines per message). Scripts could be written to allow Eggdrop to connect to XMPP, Discord, weird IRCds etc.
bind inc <flags> <mask> <proc>
procname <line>
sendinc <text>
Example pseudocode:
bind inc - "*" myIncoming
proc myIncoming {line} {
if {$line == "good"} {
return $line
} else {
return 1
}
sounds like you could have this already. in your tcl connect to the weird service, read line by line, feed to your myIncoming() also in your tcl open an incomming port, allow it to to an IRC handshake as if your script were an irc server, and then ping+pong and return your new lines to this port. let eggdrop connect to your port. what do you think?