
I need help with a little script I am trying to write
currently it reads a file (format: index content) and binds foreach index a trigger like !index and now i am trying to bring out the stuff saved in content
like
Me: !test
Bot: content of test
the problem is i don't know how to do that

i can bind it but it wont give me the output
current script
thx 4 your helpbind pub m|m !ctrigs create:triggers
proc create:triggers {nich uhost hand chan arg} {
global eglrn
set chid [open $eglrn(dbfile) r+]
while {![eof $chid]} {
set line [gets $chid]
set first [lindex [split $line] 0]
set second [lrange [split $line] 1 end]
if {$first != ""} {
dccbroadcast "debug: creating trigger for => $first"
bind pub - !$first getInfo:$first
set content($first) $second
proc getInfo:$first {nich uhost hand chan arg} {
puthelp "PRIVMSG $chan : {$line}"
}
dccbroadcast "debug: trigger for => $first ... added"
}
}
close $chid
}