Code: Select all
a:command -add noreg pub:noreg 1140 622 n
a:command -add delnoreg pub:delnoreg 1141 623 n
bind bot B noreg botnet:noreg
proc botnet:noreg {bot cmd arg} {
global noreg
set cmd [lindex [split $arg] 0]
set chan [lindex [split $arg] 1]
set info [join [lrange $arg 2 end]]
switch -exact -- $cmd {
-add {set noreg($chan) $info}
-del {if {[info exists noreg($chan)]} {unset noreg($chan)}}
}
}
proc pub:noreg {hand chan args x mix} {
global noreg settings noregtimeadd
set chan [string tolower $chan]
if {![isdynamic $chan]} { a:tell $x 129 $chan; return "FAILED: static chan ($chan)"}
set time [a:validate -digit [lindex $args 0]]
if {$time} {set reason [lrange $args 1 end]} {set time 30; set reason [lrange $args 0 end]}
set noregtime [expr $time * 86400]
set noregtimeadd [expr $noregtime + [unixtime]]
set noreg($chan) "$noregtimeadd [unixtime] $hand $reason"
putallbots "noreg -add $chan $noregtimeadd [unixtime] $hand $reason"
putquick "part $chan :channel noregED by $hand, for [duration $noregtime] reason: $reason; for any help apply on $settings(suppchan) & $settings(homepage)"
a:announce -home 17 "$hand added to noreg $chan for [duration $noregtime] time."
if {[validchan $chan]} {
::stats::channel -set $chan purgetime [unixtime]
::stats::channel -set $chan purgewhom $hand
::stats::channel -set $chan purgewhy "noreged - $reason"
channel remove $chan
save
}
}
proc pub:delnoreg {hand chan args x mix} {
global noreg
if {![info exists noreg($chan)] } {return 0} { unset noreg($chan) }
putallbots "noreg -del $chan"
a:announce -home 17 "$hand removed from noreg $chan"
save
return "$chan"
}
bind time - "00 00 * * *" timer:24
proc timer:24 {global noreg; foreach chan [array names noreg] {if {[lindex $noreg($chan) 0] < [unixtime]} {unset noreg($chan); puthelp "PRIVMSG $settings(homechan) :Noreg for $chan has expired."}}}
Code: Select all
} elseif {![string equal $comm join] && ![string equal $comm stats]} {
Code: Select all
} elseif {![string equal $comm join] && ![string equal $comm stats] && ![string equal $comm delnoreg]} {
Code: Select all
FAILED: you specified an invalid channel (#......), for any help apply on #.....
little help here pls... ?:(