How do I capture the return of a CTCP TIME command. The most informative document I can find on scripting this comes from SUNiNET and gives the format:
putserv "PRIVMSG $chan :\001 TIME $nick"
I see that the command executes, but I want to capture the output for processing. Any suggestions?
Monty_ wrote:How do I capture the return of a CTCP TIME command. The most informative document I can find on scripting this comes from SUNiNET and gives the format:
putserv "PRIVMSG $chan :\001 TIME $nick"
I see that the command executes, but I want to capture the output for processing. Any suggestions?
the CTCP binding...I read about that in the tcl-commands documentation that comes with the eggdrop. Is there a better explanation somewhere? It seems the docs I have are good if you already know what you're doing, but I'm not there yet.
Ok, that's starting to make sense. I'm presuming, if I read tcl-commands corrctly, that dest will contain the bot's nick; keyword I'm unsure of, but I can always display it to verify (probably the word "TIME"?); and args will contain the time and date information from the user.
Thanks, I really appreciate this. Seeing an example clears things up dramatically.
Would it make a difference that I run this bot on a Windows system? I don't have the bot running in a shell on an internet server, just my local PC that's connected to the net.
Would it make a difference that I run this bot on a Windows system? I don't have the bot running in a shell on an internet server, just my local PC that's connected to the net.
Monty
It is unclear what you want to do.
Send out a CTCP to the channel, have users respond to that CTCP and then the bot needs to catch the CTCP resonses?
Or do you want to send a CTCP to the bot and have the bot catch that CTCP?
Use the following piece of code to do the following:
1. Upon a public !time the bot will send a TIME CTCP to itself
2. The bot should reply something to it (not done by the below piece of code)
3. The ctcr binding catches this reply
bind join - * time {nick uhost hand chan} {
putserv "PRIVMSG $nick :\001TIME\001"
putserv "PRIVMSG Monty_ :Sent TIME request to $nick" ;# <- i assume this is what you meant by messaging yourself
}
# rest of code the same ....
Ah, things aren't as clear as I thought. Sorry for the confusion. The idea is to have the bot send a ctcp TIME to a person joining a channel and capture the result for processing. I had coded all the