micky Voice
Joined: 13 Dec 2004 Posts: 11
|
Posted: Sun Jan 23, 2005 8:43 am Post subject: Help.. |
|
|
Someone write this in one script?
| Code: |
proc bf_callback {sock} {
global bfNICK bfCOU
foreach line [split [egghttp:data $sock] \n] {
if {[string match "*<font size=3 class="text3"><b>*" $line] && [string match "*$bfCOU*" $line]} {
regsub -all -- {<[^>]*>} $line "" line
putserv "NOTICE $bfNICK :Boxoffice ($bfCOU) - $line"
}}
unset bfCOU
unset bfNICK
}
proc pub:office {nick uhst hand chan args} {
global bfNICK bfCOU
set cou [lindex $args 0]
if {$cou == ""} {
putserv "NOTICE $nick :Usage: .bf <usa|japan>"
return 0}
set url "http://www.mypage.us/boxoffice/"
set sock [egghttp:geturl $url bf_callback]
set bfNICK "$nick"
set bfCOU "$cou"
}
|
I dont wont use global sets (bf*). thx for help |
|