This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

noreg script

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
a
aNormaLu
Voice
Posts: 7
Joined: Sun Dec 30, 2007 10:53 am
Location: timisoara
Contact:

noreg script

Post by aNormaLu »

hello, i've got a noreg script made by arcade (helped by lsn) but doesn't work !delnoreg...

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."}}}
and in core, a:parser i change:

Code: Select all

} elseif {![string equal $comm join] && ![string equal $comm stats]} {
with:

Code: Select all

} elseif {![string equal $comm join] && ![string equal $comm stats] && ![string equal $comm delnoreg]} {
....now, !noreg #chan <time> <reason> works , but !delnoreg NOT

Code: Select all

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
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Did the original script work before you screwed with it?
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
a
aNormaLu
Voice
Posts: 7
Joined: Sun Dec 30, 2007 10:53 am
Location: timisoara
Contact:

Post by aNormaLu »

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
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

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
a
aNormaLu
Voice
Posts: 7
Joined: Sun Dec 30, 2007 10:53 am
Location: timisoara
Contact:

Post by aNormaLu »

ohh.... well, lsn says to change that.... :)

anyway..... I changed again in

Code: Select all

} elseif {![string equal $comm join] && ![string equal $comm stats]} {
and....is the same :( ..still doesn't work !delnoreg ....
CreaTeD To Be DifferenT
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

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
a
aNormaLu
Voice
Posts: 7
Joined: Sun Dec 30, 2007 10:53 am
Location: timisoara
Contact:

Post by aNormaLu »

i did....but arcade is retired i think...

could you just...help me please.. ?:-s
CreaTeD To Be DifferenT
a
arcADE
Voice
Posts: 7
Joined: Sat Feb 04, 2006 3:50 pm
Location: /dev/zero
Contact:

Post by arcADE »

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
a
aNormaLu
Voice
Posts: 7
Joined: Sun Dec 30, 2007 10:53 am
Location: timisoara
Contact:

Post by aNormaLu »

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
a
arcADE
Voice
Posts: 7
Joined: Sat Feb 04, 2006 3:50 pm
Location: /dev/zero
Contact:

Post by arcADE »

yeah I didn't read the botlending forum for some time :P and it automaticaly got marked as read :P
keep IT reaL
a
aNormaLu
Voice
Posts: 7
Joined: Sun Dec 30, 2007 10:53 am
Location: timisoara
Contact:

Post by aNormaLu »

well...i think arcade doesn't have time for TCL ... :)

Alchera ..or someone , please help me :)
CreaTeD To Be DifferenT
a
arcADE
Voice
Posts: 7
Joined: Sat Feb 04, 2006 3:50 pm
Location: /dev/zero
Contact:

Post by arcADE »

fix for your problem:

in a&a_01_a_core.tcl replace:

Code: Select all

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: Select all

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
a
aNormaLu
Voice
Posts: 7
Joined: Sun Dec 30, 2007 10:53 am
Location: timisoara
Contact:

Post by aNormaLu »

oh, sry guys, i found my problem...the script is ok, the problem was from another tcl :|

anyway, tnx ;)
CreaTeD To Be DifferenT
Post Reply