egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AllProtection.tcl (Stable: v4.8 / Beta: v4.9b4)
Goto page Previous  1, 2, 3 ... 88, 89, 90
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Fri Apr 14, 2017 2:34 pm    Post subject: Re: rehash Reply with quote

gembels wrote:
Tested with putdcc $antispam(idx) quit

It didnt change ident, realname and IP, it just change the nickname only.


Can you share your changes so I can understand what you're trying to do?
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
gembels
Voice


Joined: 07 Jul 2012
Posts: 26

PostPosted: Sat Apr 15, 2017 11:58 am    Post subject: Reply with quote

Code:

proc timerehash {} {
  rehash
 }

 set listnamabot [list "sinagabonar" "rukiyati"]
 set listident [list "bonar" "yati"]
 set listrealname [list "android" "andro"]
 set listip [list "64.125.185.73" "64.125.185.104" ]


on antispamcore because I only use IPV4 so I bypass your var from the top.. I changed to old version and I am using timerehash to disconnected them and reconnected with new ip, new nick, new ident and new realname..

Code:

  proc antispamcore {m h args} {
     variable antispam; variable Sec
     if {![info exists antispam(idx)] || ![valididx $antispam(idx)]} {
         if {[info exists antispam(idx)]} {unset antispam(idx)}
         if {[info exists antispam(cnick)]} {unset antispam(cnick)}
         foreach {s p} [split [lindex [lindex $::servers [expr {[incr antispam(next)]%[llength $::servers]}]] 0] :] {break}
         foreach c [channels] {
             if {[vcg $c ap:antispam] && [lindex [split [channel get $c ap:antispam]] 0] == "+"} {
                 #####set_vhosts
                 set ::my-ip $antispam(ip); set ::my-hostname $antispam(host)
                 control [connect $s $p] [namespace current]::antispambot
     putlog "\002AP\002: AntiSpamBot: Connecting to $s:$p..."
     putlog "\002AP\002: AntiSpamBot: IP $antispam(ip)"   
                 break
             }
         }
         return
     }
     set asbc 0
     foreach c [channels] {
         set mins [expr {[scan $m %d]+([scan $h %d]*60)}]
         foreach {off greet cycle idle} [split [channel get $c ap:antispam]] {break}
         if {$off == "+"} {incr asbc}
         if {[onchan $antispam(cnick) $c] && $off != "+"} {
                 putdcc $antispam(idx) "part $c"
                 timerehash
         } elseif {$cycle != 0 && $mins%$cycle == 0 && [onchan $antispam(cnick) $c]} {
             if {![info exists antispam([set e [string tolower $c]:idle])]} {set antispam($e) [unixtime]}
             if {[unixtime]-$antispam($e) < $idle*60 && [botisop $c]} {
                 putlog "\002AP\002: AntiSpamBot: mondar mandir $c..."
         set listnamabot [list "telstrax" "dayplex"]
         set namabot [lindex $listnamabot [rand [llength $listnamabot]]]     
             putdcc $antispam(idx) "join $c"
             putdcc $antispam(idx) "nick $namabot"
             putdcc $antispam(idx) "privmsg $c :[lindex $antispam(r) [rand [llength $antispam(r)]]]"
             after 30000
         putdcc $antispam(idx) "part $c"
         timerehash
                 
             }
         } {if {![onchan $antispam(cnick) $c] && $off == "+"} {putdcc $antispam(idx) "join $c"}}
     }
     if {!$asbc} {
         putdcc $antispam(idx) quit
         putlog "\002AP\002: AntiSpamBot: Disconnected (disabled on all channels)..."
     }
 }


So i am looking for solution to make antispamcore quit without rehash comand..

thanks in advance
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Goto page Previous  1, 2, 3 ... 88, 89, 90
Page 90 of 90

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber