Code: Select all
set line "[gets $openf]"
regexp {/(.*)} $line g link
Code: Select all
set x [string length[$text]
if ($x => 3) {
Code: Select all
set datenow [clock format [clock seconds] -format %m][clock format [clock seconds] -format %d][clock format [clock seconds] -format %y]
set file_pre "perfect"
set file_end ".txt"
set file_name $file_pre$datenow$file_end
Code: Select all
proc runcmd { nick handle chan text } {
Code: Select all
bind pub - !cmd runcmd
Code: Select all
bind pubm !cmd - runcmd
proc runcmd { nick uhost handle text dest } {
set blah { /home/usr/prog/prog prog.cfg }
set output [exec $blah]
putserv "PRIVMSG $chan :$output
}
Code: Select all
bind !cmd - runcmd
proc runcmd { nick uhost handle text dest } {
set blah { /home/usr/prog/prog prog.cfg }
set output [exec $blah]
putserv "PRIVMSG $chan :$output
}