Code: Select all
bind pub -|- .trigger status
set blub(active) "1"
set blub(mytime) "60"
proc status {nick host hand channel rest} {
global blub
set mytime [lindex $rest 1]
set wazup [lindex $rest 0]
if {[matchattr $hand T|T $chan]} {
switch -- [string tolower $wazup] {
"" { putserv "NOTICE $nick :\002Syntax:\002 .trigger <on/off/time/show> \[time\]" }
"off" { set blub(active) 0 }
"on" { set blub(active) 1 }
"time" { set blub(mytime) $mytime }
"show" { putserv "privmsg $channel :Trigger Infos: (Active: $blub(active)) (Timer: $blub(mytime) min)" }
}
if {$blub(active) == 0} { putserv "privmsg $channel :Trigger if currentlly off"
} else { putserv "privmsg $channel :Trigger is currentlly on" }
if ($mytime == ""} {
putserv "notice $nick :Bitte gib einen Timer an!"
} else { putserv "notice $nick :Timer wurde auf $mytime gesetzt." }
} else { putserv "notice $nick :\002Access denied\002" }
}
whats wrong ? which args are wrong ?wrong # args: should be "proc name args body"
while executing
"proc status {nick host hand channel rest} {
global blub
set mytime [lindex $rest 1]
set wazup [lindex $rest 0]
if {[matchattr $hand T|T $chan]} {
swi..."