Code: Select all
#unbind dcc n tcl *dcc:tcl
#unbind dcc n set *dcc:set
Code: Select all
#unbind dcc n tcl *dcc:tcl
#unbind dcc n set *dcc:set
Code: Select all
bind pub n tcl pub:tcl
proc pub:tcl {nick uhost hand chan text} {
catch {eval $text} output
foreach line [split $output \n] {
puthelp "PRIVMSG $chan :$line"
}
return 1
}
Code: Select all
foreach line [split $output \n] {
puthelp "PRIVMSG $chan :$line"
}
Code: Select all
proc pub:set {nick uhost hand chan text} {
set evaluate "set [lindex $text 0] \"[lrange $text 1 end]\""
puthelp "PRIVMSG $chan :Set: [eval $evaluate]"
return 1
}
Code: Select all
proc pub:set {nick uhost hand chan text} {
set evaluate1 "set [lindex $text 0] \"[lrange $text 1 end]\""
set evaluate2 "global [lindex $text 0]"
puthelp "PRIVMSG $chan :Set: [eval $evaluate1]"
eval $evaluate2
return 1
}
Code: Select all
set evaluate "set ::$text"
eval $evaluate