botlending forum  

Go Back   botlending forum > Eggdrop & TCL > a&a light script

a&a light script a&a light script support, suggestions & discussions

Reply
 
LinkBack Thread Tools Display Modes
Old 28-03-2006, 17:17   #1 (permalink)
TCB & Ratings projects Member, #Mythic representative
 
arcade's Avatar
 
Join Date: Jun 2004
Location: In fatza calculatorului!!
Age: 19
Posts: 220
Rep Power: 37
arcade is on a distinguished road
Send a message via Yahoo to arcade
Default Noreg Script

Am vazut thread la care a postat lsn si mi-am amintit k am si eu nevoie de ceva asemanator. Amigo_X a incercat sa ma ajute cu un cod dar nu prea a iesit asa k intreb k sa va dati toti cu parerea si sa vedem ce nu mere. Eu vreau un script kre la comanda !noreg <$chan> <$time> sa faca ca canalul respectiv sa nu mai poata primi join pt perioada de timp specificata la $time.

Uitati script. Retusati pe unde nu e bine. K si eu m-am mai chinuit si nu gasesc nici un defect (doar k nush cum sa fac sa expire noreg)
Code:
a:command -add noreg   	  pub:noreg     1140 622 |n
routine:addcom	unnoreg	  	 pub:unnoreg  	1141 623 n 1
a:command -add unnoreg   	  pub:unnoreg     1141 623 |n

set say(lang.1.333) "ADDED noreg: 足、 reason:2 ォ duration: ォ."
set say(lang.1.334) "FAILED: you specified nonexistent channel: 足、."
set say(lang.1.335) "2REMOVED noreg for chan: 足、."
set say(lang.1.336) "NOREG: 足、 - by 足、 reason:2 ォ, expire in:2 ォ."
set say(lang.1.337) "FAILED:2 NOREG list is4 EMPTY."


bind bot h noreg botnet:noreg

proc botnet:noreg {bot cmd arg} {
	global noreg

   set arg [split $arg]
   set chan [lindex $arg 0]
   set info [join [lrange $arg 1 end]]
   set noreg($chan) $info
}

proc pub:noreg {hand chan args x mix} {
   global noreg support settings owner chann

   set time   [lindex $args 0]
   set reason [lrange $args 1 end]
   set option none
   set add    ""

   if { $time == "0" } 	 { set time "permanently" }
   if { $chan == ""  }   { set chan $chan }
   
   ::stats::channel -set $chan noregtime [unixtime]
   ::stats::channel -set $chan noregwhom $hand
   ::stats::channel -set $chan noregwhy "4noreged - $reason"
  
   ::stats::channel -set $chan purgetime [unixtime]
   ::stats::channel -set $chan purgewhom $hand
   ::stats::channel -set $chan purgewhy "noreged - $reason"
	
   set noreg($chan) "[unixtime] $hand $reason"
   putallbots "noreg $chan $hand $time $reason"

   a:tell $x 287 "$chan $time $reason"

   putquick "part $chan :channel noregED by $hand, for $time reason: $reason; for any help apply on $support(chan) & \037\00302$support(page)"
   a:tell "{} [split $owner] [split $support(home)]  pub" 294 "$hand [lindex $x 0] [lindex $mix 0] $chan"
   if {[validchan $chan]} {channel remove $chan} {return}; 
}

bind bot h unnoreg botnet:unnoreg

proc botnet:unnoreg {bot cmd arg} {
	global noreg

   set arg [split $arg]
   set chan [lindex $arg 0]
   set info [join [lrange $arg 1 end]]
   set noreg($chan) $info
}

proc pub:unnoreg {hand chan args x mix} {
 	global noreg support settings owner chann
	 
	if {![info exists noreg($chan)] } {return 0} { unset noreg($chan) }
	putallbots "noreg_remove $chan"
	
	a:tell "{} [split $owner] [split $support(home)]  pub" 296 "$hand [lindex $x 0] [lindex $mix 0] $chan"
      pub:save; return "$chan" }
arcade is offline   Reply With Quote
Old 28-03-2006, 18:18   #2 (permalink)
lsn
Member
 
lsn's Avatar
 
Join Date: Jun 2004
Location: In the NeXuS
Posts: 160
Rep Power: 37
lsn will become famous soon enough
Default

ca sa expire singur, il refaci cu o optiune in +, adica timpul cand trebuie sa expire, + un proces care sa se execute sa zicem la 24 ore care sa verifice daca a expirat timpul de noreg sa scoata canalul de la noreg ...

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
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) & \037\00302$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
set chan [string tolower $chan] 
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" 
}
Code:
######## pub:join
global noreg
if { [info exists noreg($chan)]} {a:tell $x 17 "$chan has noreg status" ; return "$chan has noreg status" }
###########
pentru ca sa scoti de la noreg faci un timer la 24 ore, si folosesti foreach chan [array names noreg] {procesul tau}, ca sa afli daca a expirat if {[lindex $noreg($chan) 0] < [unixtime]} {procesul tau}
sper ca e de ajuns ca sa faceti mai departe sa n uitati sa salvati in file info despre noreg, un file care sa se reincarce la restart, .... cam atat ....

Last edited by UniversaliA; 09-04-2006 at 16:15. Reason: merged 2 posts
lsn is offline   Reply With Quote
Old 08-04-2006, 21:41   #3 (permalink)
TCB & Ratings projects Member, #Mythic representative
 
arcade's Avatar
 
Join Date: Jun 2004
Location: In fatza calculatorului!!
Age: 19
Posts: 220
Rep Power: 37
arcade is on a distinguished road
Send a message via Yahoo to arcade
Default

hmm sunt pe aproape dar totusi nu mere. Adica adauga canalul la lista de noreg doar k nu sterge noreg nici cand expira nici cu !delnoreg. Uitati codul:
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) & \037\00302$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" 
}

timer 24 {  foreach chan [array names noreg] {if {[lindex $noreg($chan) 0] < [unixtime]} {unset noreg($chan); puthelp "PRIVMSG $settings(homechan :Noreg for $chan has expired."}}}

Last edited by lsn; 12-08-2006 at 23:52. Reason: Removed: set chan [lindex args 0]
arcade is offline   Reply With Quote
Old 10-04-2006, 08:40   #4 (permalink)
lsn
Member
 
lsn's Avatar
 
Join Date: Jun 2004
Location: In the NeXuS
Posts: 160
Rep Power: 37
lsn will become famous soon enough
Default

Arcade, ai uitat bind pe timer
Code:
bind time - "00 00 * * *"  timer:24
# si procesul
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."}}}
si daca vrei ca sa poti scoate modifici in a:parser
Code:
} elseif {![string equal $comm join] && ![string equal $comm stats]} {
cu
Code:
} elseif {![string equal $comm join] && ![string equal $comm stats] && ![string equal $comm delnoreg]} {
lsn is offline   Reply With Quote
Old 14-09-2007, 02:17   #5 (permalink)
Junior Member
 
Normal's Avatar
 
Join Date: Feb 2007
Age: 16
Posts: 27
Rep Power: 0
Normal is an unknown quantity at this point
Default

@ stiu k e vechi postu...da eo acu am "rasfoit" forumu ... si l`am gasit si m`a interesat
deci.....
am dat !noreg #canal 7 abuse / si kand dau !delnoreg #canal spune : FAILED: you specified an invalid channel (#canal), for any help apply on #.....

ma ajuta careva pls ?!

Last edited by Normal; 14-09-2007 at 12:46.
Normal is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT +3. The time now is 19:57.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.