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.

cycle every 1 minute

Old posts that have not been replied to for several years.
Locked
f
forever79
Voice
Posts: 18
Joined: Sat Jun 21, 2003 6:12 pm

cycle every 1 minute

Post by forever79 »

proc partchan1 { } {
putserv "part #ayna"
timer 1 partchan1
}
timer 1 partchan1


i use this command, after 20 minute bot part chan and its not join chan.
Server says I'm not on channel: #ayna

what am i doing ?
i want to
my bot, cycle every 1 minute
F
Fips

Post by Fips »

Read a tcl documentation... "timer" is not what you want to do.
You must use "after 60000 partchan1" instead of "timer 1 partchan1".
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Post by egghead »

Fips wrote:Read a tcl documentation... "timer" is not what you want to do.
You must use "after 60000 partchan1" instead of "timer 1 partchan1".
Fips, have you had a look at docs/tcl-commands.doc?
F
Fips

Post by Fips »

Oh... didn't know that EggDrop overrides commands... :oops:
Well then, I see, if you want to cycle the bot, you must put a JOIN after the PART, I would say...
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Re: cycle every 1 minute

Post by egghead »

forever79 wrote:proc partchan1 { } {
putserv "part #ayna"
timer 1 partchan1
}
timer 1 partchan1


i use this command, after 20 minute bot part chan and its not join chan.
Server says I'm not on channel: #ayna

what am i doing ?
i want to
my bot, cycle every 1 minute
Is the channel already on the bots channel list?

An alternative way is to use a bind time:

Code: Select all

bind time - * partchan

proc partchan { args } { puthelp "PART #channel" }
e
egghead
Master
Posts: 481
Joined: Mon Oct 29, 2001 8:00 pm
Contact:

Post by egghead »

Fips wrote:Oh... didn't know that EggDrop overrides commands... :oops:
Well then, I see, if you want to cycle the bot, you must put a JOIN after the PART, I would say...
Usually eggdrop will automatically rejoin the channel once it notices it has parted the channel.
F
Fips

Re: cycle every 1 minute

Post by Fips »

forever79 wrote:after 20 minute bot part chan and its not join chan.
I don't know what eggdrop really is doing, but i thought maybe it doesn't join after 20 retries... if this is true, JOIN would help.
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

Code: Select all

bind time - * partchan
proc partchan { args } { 
	putserv "PART #channel" 
	utimer 1 [list putserv "JOIN #channel"]
}
this should work
Elen sila lúmenn' omentielvo
f
forever79
Voice
Posts: 18
Joined: Sat Jun 21, 2003 6:12 pm

:(

Post by forever79 »

i try to this code

Code: Select all

bind time - * partchan 

proc partchan { args } { puthelp "PART #channel" } 
and

Code: Select all

bind time - * partchan 
proc partchan { args } { 
   putserv "PART #channel" 
   utimer 1 [list putserv "JOIN #channel"] 
}
[00:15] *** Joins: CirkinBOT (cirkin@212.115.39.E-Kolay-3148)
[00:16] *** Parts: CirkinBOT (cirkin@212.115.39.E-Kolay-3148)
[00:16] *** Joins: CirkinBOT (cirkin@212.115.39.E-Kolay-3148)
[00:17] *** Parts: CirkinBOT (cirkin@212.115.39.E-Kolay-3148)
[00:17] *** Joins: CirkinBOT (cirkin@212.115.39.E-Kolay-3148)
.
.
.
[00:39] *** Parts: CirkinBOT (cirkin@212.115.39.E-Kolay-3148)
[00:39] *** Joins: CirkinBOT (cirkin@212.115.39.E-Kolay-3148)
[00:40] *** Parts: CirkinBOT (cirkin@212.115.39.E-Kolay-3148)
[00:40] *** Joins: CirkinBOT (cirkin@212.115.39.E-Kolay-3148)
[00:41] *** Parts: CirkinBOT (cirkin@212.115.39.E-Kolay-3148)

and its not joined to #chan

i use only this script with mybot
noadverisonme.tcl

Code: Select all

bind msgm - * pv_kick

proc pv_kick {nick uhost hand text} {
global botnick spambantime

##  i think u dont need to change anything below 
##  the bot will kickban if someone private message bot said words with "#" , "join" ,"channel" .etc 
##  if u want change please make sure you cannot put "*words*" . "*" or "?" will make the tcl didn`t work

if {[regexp -nocase "" $text] > 0} { 
  foreach kickchan [channels] {
    if {![isop $nick $kickchan] || ![isvoice $nick $kickchan]} {    
      if {[onchan $nick $kickchan]} {   
         set bmask "*!*[string range $uhost [string first "@" $uhost] end]"
         if {![ischanban $bmask $kickchan] || [botisop $kickchan]} {
               set kickmsg "\00312\002\037Cause\037:\002 Mass-Msg/Invite/Adv/Trojan Send\00312"  
               putquick "KICK $kickchan $nick :$kickmsg"
               newchanban $kickchan $bmask $botnick Mass-Msg $spambantime
             }
       }
    }
}
}
}


putlog "loaded noadvertiseonme.tcl version 1.0 By Silveryo or _andy_"
User avatar
slennox
Owner
Posts: 593
Joined: Sat Sep 22, 2001 8:00 pm
Contact:

Post by slennox »

Eggdrop isn't really good at cycling channels frequently because it requests and processes a lot of info every time it joins, and can get confused if it's too rapid. You might want to try the following which is a bit milder:

Code: Select all

proc partchan1 {} {
  if {[validchan #channel] && [botonchan #channel]} {
    channel set #channel +inactive
    utimer 5 partchan2
  }
}

proc partchan2 {} {
  channel set #channel -inactive
  utimer 55 partchan1
}

if {![string match *partchan1* [utimers]]} {
  timer 55 partchan1
}
Locked