Code: Select all
set cmd "!netstat"
bind pub -|- $cmd log:pub
proc htmltotext {text} {
regsub -all -- {<br>} $text "\n" text
regsub -all -- {</b>|</font>} $text { } text
regsub -all -- {<[^>]*>} $text {} text
regsub -all -- { |[<*>]} $text { } text
return $text
}
proc log:pub {nick handle host chan text } {
set foo [open "/www/message.txt" "r"]
foreach line [split [read $foo] \n] {
if {($line == "") || ($line == "\n") || ($line == "\r")} { continue }
putserv "PRIVMSG $nick :[htmltotext \002$line\002]"
}
close $foo
}
bind time - "*6 % % % %" displayecho
proc displayecho {min hour day month year} {
set foo [open "/www/message.txt" "r"]
foreach line [split [read $foo] \n] {
if {($line == "") || ($line == "\n") || ($line == "\r")} { continue }
putserv "PRIVMSG #isg :[htmltotext \002$line\002]"
}
close $foo
}
Code: Select all
Iplanet BL, MT 2382446.^M
It's NetCool son, NetCool. It ain't that hard.^M
Baltimore edge 4 will be rebooted sometime within the next hour (4-5pm).^M
^M
^M
^M
^M
^M
^M
^M
^M
^M
^M
^M
^M
^M
^M
^M
^M
^M
^M
^M
^M
~