As I sated, you can't do this inside sage:whois:main.
Lets look through it step by step.
Code: Select all
bind raw - 313 sege:whois:ircop
bind raw - 301 sege:whois:away
bind raw - 311 sege:whois:realname
putserv "WHOIS $text" -next
puthelp "NOTICE $target :$foo"
return 1
bind raw - 313 sege:whois:ircop
This sets a script that is designed to capture the incoming 313 raw event (IE, ircop status).
bind raw - 301 sege:whois:ircop
Again, sets a cript that will capture part of the whois
bind raw - 311 sege:whois:ircop
And again, another part of the whois.
putserv "WHOIS $text" -next
This inserts the text "WHOIS $text" (with $text being replaced correctly) into the server queue, but places it as the next line to be sent because of the -next.
The text is not sent right away. When Tcl scripts are run, eggdrop is frozen in a point in time, until the script completes. Besides this, eggdrop can't call sege:whois:ircop, or any of the others until it's completed, as it has currecntly passed control to Tcl.
Until eggdrop has gained control again, it won't even process the incoming reply. As stated though, this reply will not be waiting, as it hasn't been requested yet.
THere is a "End of whois" rar that can be used. Setup you script to use this. When it receives it, you can then output the stored information.
You will also have to drop the -next flag for the output for this ifnormation, as there will be no guarentee on the order it is dispalyed.