First off, how do I execute a linux command (date -u) and store it inside a variable that I can later call in the middle of a block of text for a response? Say I wanted to call the variable gmtTime, and I want the block of text to be "The current time is $gmtTime (GMT)"
The second one appears to have a bracket out of place, but I can't for the life of me figure out where. Each time I remove a closing bracket (or brace, whatever you want to call them) it throws up a new error. Here is the relavent proc from the script:
Code: Select all
proc pub:nerf { nick uhost handle channel testes } {
set who [lindex [split $testes] 0]
global xmsg
set excuse [lindex $xmsg [rand [llength $xmsg]]]
if {[strlwr $message_chan]==[strlwr $chan]}{
if {$who == ""} {
putserv "NOTICE $nick :Usage: !nerf <nick>"
return 1
}
putserv "PRIVMSG $channel :\001ACTION [subst $excuse]\001"
}
}
putlog "NERF! Loaded"