| View previous topic :: View next topic |
| Author |
Message |
aNormaLu Voice
Joined: 30 Dec 2007 Posts: 7 Location: timisoara
|
Posted: Sun Dec 30, 2007 11:08 am Post subject: noreg script |
|
|
hello, i've got a noreg script made by arcade (helped by lsn) but doesn't work !delnoreg...
| Code: |
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."}}}
|
and in core, a:parser i change:
| Code: |
} elseif {![string equal $comm join] && ![string equal $comm stats]} {
|
with:
| Code: |
} elseif {![string equal $comm join] && ![string equal $comm stats] && ![string equal $comm delnoreg]} {
|
....now, !noreg #chan <time> <reason> works , but !delnoreg NOT
| Code: | | FAILED: you specified an invalid channel (#......), for any help apply on #..... |
this is what the bot says when i type !delnoreg #chan ...
little help here pls... ? _________________ CreaTeD To Be DifferenT |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Sun Dec 30, 2007 6:17 pm Post subject: |
|
|
Did the original script work before you screwed with it? _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
aNormaLu Voice
Joined: 30 Dec 2007 Posts: 7 Location: timisoara
|
Posted: Mon Dec 31, 2007 6:24 am Post subject: |
|
|
| Alchera wrote: | | Did the original script work before you screwed with it? |
this is the original script...but doesn't work and I don't know who to repair it... _________________ CreaTeD To Be DifferenT |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Mon Dec 31, 2007 7:18 pm Post subject: |
|
|
| aNormaLu wrote: | | Alchera wrote: | | Did the original script work before you screwed with it? |
this is the original script...but doesn't work and I don't know who to repair it... |
You stated clearly you changed it:
| aNormaLu wrote: | | and in core, a:parser i change: |
_________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
aNormaLu Voice
Joined: 30 Dec 2007 Posts: 7 Location: timisoara
|
Posted: Tue Jan 01, 2008 10:26 am Post subject: |
|
|
ohh.... well, lsn says to change that....
anyway..... I changed again in
| Code: |
} elseif {![string equal $comm join] && ![string equal $comm stats]} {
|
and....is the same ..still doesn't work !delnoreg .... _________________ CreaTeD To Be DifferenT |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue Jan 01, 2008 7:07 pm Post subject: |
|
|
Have you made any attempt at contacting the author?
If not, do so.  _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
aNormaLu Voice
Joined: 30 Dec 2007 Posts: 7 Location: timisoara
|
Posted: Wed Jan 02, 2008 5:29 am Post subject: |
|
|
i did....but arcade is retired i think...
could you just...help me please.. ?:-s _________________ CreaTeD To Be DifferenT |
|
| Back to top |
|
 |
arcADE Voice
Joined: 04 Feb 2006 Posts: 7 Location: /dev/zero
|
Posted: Mon Jan 07, 2008 2:10 am Post subject: |
|
|
I'll rewrite it these days if I have time. And no, I'm not retired, but I do not have enough free times these days. _________________ keep IT reaL |
|
| Back to top |
|
 |
aNormaLu Voice
Joined: 30 Dec 2007 Posts: 7 Location: timisoara
|
Posted: Mon Jan 07, 2008 10:45 am Post subject: |
|
|
ok arcade, am postat si pe forumu botlending acu cva luni si nu am primit rasp. , de aia am postat aici...ms
Alchera tnx for your help. _________________ CreaTeD To Be DifferenT |
|
| Back to top |
|
 |
arcADE Voice
Joined: 04 Feb 2006 Posts: 7 Location: /dev/zero
|
Posted: Tue Jan 08, 2008 4:46 am Post subject: |
|
|
yeah I didn't read the botlending forum for some time and it automaticaly got marked as read  _________________ keep IT reaL |
|
| Back to top |
|
 |
aNormaLu Voice
Joined: 30 Dec 2007 Posts: 7 Location: timisoara
|
Posted: Mon Jan 21, 2008 12:38 pm Post subject: |
|
|
well...i think arcade doesn't have time for TCL ...
Alchera ..or someone , please help me  _________________ CreaTeD To Be DifferenT |
|
| Back to top |
|
 |
arcADE Voice
Joined: 04 Feb 2006 Posts: 7 Location: /dev/zero
|
Posted: Tue Jan 22, 2008 8:17 am Post subject: |
|
|
fix for your problem:
in a&a_01_a_core.tcl replace:
| Code: |
if {![botonchan $chan] && ![string match {|[suU]} [a:command -level $comm]] && ![regexp -nocase -{^purge|comeback|templeave|xremuser|xban|xkick|stats|chaninfo|chanset|suspend|admins|list)$} $comm]} {
|
with
| Code: |
if {![botonchan $chan] && ![string match {|[suU]} [a:command -level $comm]] && ![regexp -nocase -{^purge|comeback|templeave|xremuser|xban|xkick|stats|chaninfo|chanset|suspend|admins|list|delnoreg)$} $comm]} {
|
this should fix the problem  _________________ keep IT reaL |
|
| Back to top |
|
 |
aNormaLu Voice
Joined: 30 Dec 2007 Posts: 7 Location: timisoara
|
Posted: Tue Jan 22, 2008 1:45 pm Post subject: |
|
|
oh, sry guys, i found my problem...the script is ok, the problem was from another tcl
anyway, tnx  _________________ CreaTeD To Be DifferenT |
|
| Back to top |
|
 |
|