heya, hope you don't mind one more question...
how can i make it ignore its own url?
something like
*szabadka.org*
thanks in advance
Code: Select all
proc isdupe {url} {
if {![catch {open $catch:path r} rf]} {
set r 0
while {![eof $rf]} {
if {[string match -nocase *${url}* [gets $rf]]} {
set r 1
break
}
}
close $rf } }
Code: Select all
proc catch_url_pubm {nick host hand chan arg} {
if {[regexp -nocase {(http://[^\s]+)} $arg -> url]} {
if {[isdupe $url]} {return}
Code: Select all
[18:14:41] [(Angela]: [18:12] Tcl error [catch_url_pubm]: expected boolean value but got ""
[18:14:44] [(Angela]: Currently: expected boolean value but got ""
[18:14:44] [(Angela]: Currently: while executing
[18:14:44] [(Angela]: Currently: "if {[isdupe $url]} {return}"
[18:14:44] [(Angela]: Currently: (procedure "catch_url_pubm" line 3)
Code: Select all
proc isdupe {url} {
set r 0
if {![catch {open "scripts/urllogger.txt" r} rf]} {
while {![eof $rf]} {
if {[string match -nocase *${url}* [gets $rf]]} {
set r 1
break
}
}
close $rf
}
return $r
}
Code: Select all
proc isdupe {url} {
set r 0
if {![catch {open "/home/zerodtk/public_html/log/index.php" r} rf]} {
while {![eof $rf]} {
if {[string match -nocase *szabadka* [gets $rf]]} {
set r 1
break
}
}
close $rf
}
return $r
}
Code: Select all
proc isdupe {url} {
set r 0
if {![catch {open "scripts/ignored.txt" r} rf]} {
while {![eof $rf]} {
if {[string match -nocase *${url}* [gets $rf]]} {
set r 1
break
}
}
close $rf
}
return $r
}