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
P
Pitchat
Op
Posts: 122
Joined: Tue Feb 18, 2003 11:24 pm
Location: Hebertville Quebec Canada
Contact:

cycle

Post by Pitchat »

hi is it possible to make the eggdrop cycle a channel on demand ?

exemple by a dcc command like .hop and /or a public command !hop or both .

thoses commands should be available only to +o users

i know theres is the +cycle settings but it is not what i`m looking for

thanks
t
tainted
Master
Posts: 239
Joined: Sun May 12, 2002 8:00 pm
Location: chicago
Contact:

Post by tainted »

Code: Select all

bind dcc o hop hop_cycle

proc hop_cycle {h i a} {
putserv "PART $a"
putserv "JOIN $a"
}
That should do it, though it will only cycle that single bot. If you need to cycle the entire net (yuck?) it will require a bit more work.

NOTE: that script is insecure, most likely allowing any +o user to execute any tcl code they choose. I'm far too tired to go any further on it, but that should get you started. :)
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

No, that code is secure, for the following reasons

1: You havn't done any list/string conversion, or command evaluation with timers, exec or eval.

2: It is a DCC command. A user must have allready passed the authentication system, to be able to use it.

It could however, go a slight step further.

1: Use only the PART command. Eggdrop will rejoin itself, when the IRC server confirms the part. Thus the bot only sends two JOINs.

2: Check the incoming argument is a valid channel, before partings, and avoiding errornouse commands to the server.
Locked