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.

Help with arrays

Old posts that have not been replied to for several years.
Locked
D
DragonFlu

Post by DragonFlu »

heres the deal, I have an eggy setup for spam detection, It does a list on the channels, and puts it in a variable...

my question is this, I want it to be able to remove the channel out of the variable, or ARRAY if easier, once its joined it, and keep doing so till the list is empty then ill have it restart, I assume an array would be best to do this, but I must be stupid cause I cant figure the array things out, anyone that can help me, I would appreciate it.
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

you don't need to use arrays to do this, you just need to use a list (which is really a single dimentional sequentially indexed array). go look up the tcl verbs of lappend, lindex and lreplace (the latter being the one to delete items from the list, by replacing its entry with nothing).
M
MarlbMan
Voice
Posts: 20
Joined: Tue Apr 15, 2003 9:20 pm

Post by MarlbMan »

I am looking for a script to do something similar. I would like it to get a /list and join channels either at random, or attempt to join each channel in a cycle as you said, to detect spam, then post an alert in an oper channel. If wouldn't mind parting with what you have, it'd be appreciated. unless there's already something out there I havent found yet.
Locked