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

Old posts that have not been replied to for several years.
Locked
User avatar
duofruo
Halfop
Posts: 94
Joined: Thu Oct 23, 2003 3:17 pm
Location: Ploiesti@.ro
Contact:

cycle

Post by duofruo »

i wana script that part the channel for n seconds and then join the chan
i have a begining but ... i can found the rest

Code: Select all

bind pub m|m .cycle proc:cycle
proc proc:cycle {nick uhost hand chan text} {
  global cycle
  putserv "PART $chan :cycle chan for [split $text] sec by demand of $nick"
  eval channel set [list $chan] +inactive
}
is there a spleep comand ? i know about timers but it can only execute a command, is there posible to set

Code: Select all

timer [split $text]  "eval channel set [list $chan] -inactive"
or something like this
Embrace The Inevitable
User avatar
duofruo
Halfop
Posts: 94
Joined: Thu Oct 23, 2003 3:17 pm
Location: Ploiesti@.ro
Contact:

Post by duofruo »

silly me, fixed, got a tcl doc

Code: Select all

bind pub m|m .cycle proc:cycle
proc proc:cycle {nick uhost hand chan text} {
  global cycle
  putserv "PART $chan :cycle chan for [split $text] sec by demand of $nick"
  eval channel set [list $chan] +inactive
  utimer [split $text]  "eval channel set [list $chan] -inactive"
}
write ?
Embrace The Inevitable
d
detonated
Voice
Posts: 16
Joined: Sat Mar 13, 2004 3:10 am

Post by detonated »

but the bot cycles the channel twice. that's what happened to my bot. :-?
User avatar
entrapmen
Voice
Posts: 27
Joined: Tue Jul 08, 2003 9:08 am
Location: TR

Post by entrapmen »

maybe u can use this (it has been advised by someone else a few months ago to me)

Code: Select all

set cyclekanal "#zurna"
set zamancycle 15
set timewait 1

bind RAW * 366 cyclestart

proc cyclestart { from key arg } {

global cyclekanal zamancycle
        set chan [lindex [split $arg] 1]
        if { $chan != $cyclekanal } { return 0 }
        timer $zamancycle cycle
}

proc cycle { } {
global scanchan timewait cyclekanal
        channel set $cyclekanal +inactive
        timer $timewait "channel set $cyclekanal -inactive"
}
it works fine on my eggie.
<@ll the world is about smiles and cries>
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

A basic one:

Code: Select all

bind pub m|m .cycle my:cycle 

proc my:cycle {nick uhost hand chan text} { 
  channel set $chan +inactive
  utimer 3 [list channel set $chan -inactive]
}
Once the game is over, the king and the pawn go back in the same box.
d
detonated
Voice
Posts: 16
Joined: Sat Mar 13, 2004 3:10 am

Post by detonated »

what if u want the bot to cycle the channel with a part msg?
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

There was another topic about this part thing.. Do a lil search.. If you use part then +inactive it will part the channel and then come back and part it again cos the first time he is confused.. :) So.. either use a channel msg then make it +inactive or no msg at all :)
Once the game is over, the king and the pawn go back in the same box.
Locked