bind pub - !user foo
proc foo {n u h c a} {
set nick [lindex [split $a] 0]
if {$nick!=""} {
set data [::http::geturl http://www.mysite.com/users.php?search=]
foreach line [split [::http::data $data] \n] {
putserv "PRIVMSG $c :$line"
}
::http::cleanup $data
}
}
Wich will then post a link to the users profile page from the site.
But somehow it is not working, am I missing something?
bind pub - !user foo
proc foo {n u h c a} {
if {![llength [set nick [lindex [split $a] 0]]]} return
set token [::http::geturl http://www.mysite.com/users.php?search=$nick]
set data [::http::data $token]
::http::cleanup $data
foreach line [split $data \n] {
putserv "PRIVMSG $c :$line"
}
}
Well, I used that url in a small script for my mIRC bot, wich worked, but this one aint working for my eggdrop and I really would like it to work for my drop, nothing is happening when I type !user starpossen and I tried adding nick to the url, but that didnt help.
Not you, I forgot to add them in the proc I've posted above. Get it again and test it on your bot. Also, change that url to "http://www.mysite.com/users.php?search=$nick" because this way I think it should be.
Once the game is over, the king and the pawn go back in the same box.
bind pub - !user foo
proc foo {n u h c a} {
if {![llength [set nick [lindex [split $a] 0]]]} return
set token [::http::geturl http://www.mysite.com/users.php?search=$nick]
set data [::http::data $token]
::http::cleanup $data
foreach line [split $data \n] {
putserv "PRIVMSG $c :$line"
}
}
Once the game is over, the king and the pawn go back in the same box.
Im very well aware of what forum this is, I just asked a question, and showed the mirc script as an example, and hoping it might shed a light on my idea, but nevermind.
No point posting a mIRC 'script' on a forum exclusively for Tcl. You'd be lucky if anyone could understand it anyway. Learn Tcl and attempt a translation yourself maybe.
Add [SOLVED] to the thread title if your issue has been. Search | FAQ | RTM