Turns out .txt files are sendt as part of the header...
I edited the code above, so go ahead and give it a try.
Code: Select all
# limit, in seconds
set maxtime 300
if {[expr [unixtime]-$pretime]>=$maxtime} {
# it's too old, send warning
} {
# normal pretime msg
}
Code: Select all
bind dcc n operme operme
proc operme {h i a} {
if ![llength $a] {
putidx $i "Usage: .operme <pass>"
return
}
set p [lindex [split $a] 0]
putserv "oper $::$botnick $p"
putidx $i "Done."
}
Code: Select all
bind bot b keyword proc:name
proc proc:name {frombot cmd arg} {
#...
}
Code: Select all
while {![eof $news]} {
set line [gets $news]
if {![string match ####* $line]} {
if {$tellwho} {
putserv "PRIVMSG $nick :$line"
} else {
putserv "NOTICE $nick :$line"
}
}
}
Code: Select all
if ![string match ####* $line] {
# parse it
}
Code: Select all
set fruitname "oranges"
bind pub -|- !fruit pub:fruit
proc pub:fruit {n u h c a} {
global fruitname
putserv "PRIVMSG $c :Today's fruit is $fruitname!"
}