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.

echoX Remover v1.32.b by awyeah

Support & discussion of released scripts, and announcements of new releases.
Post Reply
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

echoX Remover v1.32.b by awyeah

Post by awyeah »

I have test released a script which removes "the famous" echox inviter from channels. This script is currently being tested, so far so it works great as for now.

I haven't gotten time to add any features into it yet.
This script will work on all channels the bot is on. It will WHO every user on join and check the who reply to match with certain criterias to be detected as an echox inviter. This script will kick and ban any echox inviters which join any channel the bot is opped on.
Give it a go! If you feel there are alot of echox inviters on your channel.

Here's an example:
* jorrie (~dickinson@203.106.196.249) has joined #awyeah
* Eric32_kl (~eric36_kl@110.249.95.219.klj01-home.tm.net.my) has left #awyeah
* adapter sets mode: +b *!*@203.106.196.249
* jorrie was kicked by adapter ( echoX Inviter Kick - You are no doubt smart in spamming and adversiting echoX Inviter, but we are more smarter. Copyright © 2007 awyeah Inc. All rights reserved.)

*** After kicking and banning the user if you check the following..

on /whois:
jorrie No such nick/channel
jorrie End of /WHOIS list.

on /whowas:
jorrie was ~dickinson@203.106.196.249 * Francesc Kassower
jorrie using redemption.ix.us.dal.net Fri Aug 10 08:47:27 2007
End of WHOWAS
Download this script from the link below:
echoX Remover v1.32.b
Last edited by awyeah on Tue Aug 21, 2007 9:52 pm, edited 6 times in total.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

You're applying [split] on a list again.

Code: Select all

set idlist [split [lrange [split $idfile "\n"] 1 end-1]]
idfile is already a list in your script so this should be enough:

Code: Select all

set idlist [lrange $idfile 1 end-1]
although I don't know why you're doing this (not considering the first and last elements). Same with fnfile (it's also already a list).
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Sir_Fz wrote:You're applying [split] on a list again.

Code: Select all

set idlist [split [lrange [split $idfile "\n"] 1 end-1]]
idfile is already a list in your script so this should be enough:

Code: Select all

set idlist [lrange $idfile 1 end-1]
although I don't know why you're doing this (not considering the first and last elements). Same with fnfile (it's also already a list).
Yeah my bad shouldn't apply split again on a list, it won't affect anything however, but it would be redundant, as I said its still a testrelease.

The reason for using lrange with index 1 to end-1 is because:

Code: Select all

<adapter> [02:36] tcl: evaluate (.tcl): split $idfile "\n"
<adapter> Tcl: {} adams allen allison alvarez anderson andrews armstrong arnold avila bailey baker barnes bennett bishop boyd bradley brooks brown bryan burke burton butler campbell carlson carr carter chase chen christensen clark collins comer cook cooper cox crawford cunningham davis day dean dickinson edwards elliott ellis evans fischer fisher fong ford freeman frost garcia gardner gomes gomez gonzales graham green griffin hall hamilton hansen hanson harris harrison hartman harvey hayes henderson henry
<adapter> Tcl: hernandez hill holmes howard hughes hunt jackson jensen johnson jones keller kelley kennedy king lane long lopez marsh martinez mathews matthews mcdonald miller mitchell moore morgan morris nelson newton obrien oconnor olsen palmer parker patterson peck perkins perry peterson phillips powell price randolph reed rice richardson rivera rivers roberts robinson rodrigues rodriguez rogers romero ruis sanders santos shaw short silva simpson smith snyder spafford spencer springer stafford stewart
<adapter> Tcl: stone sullivan taylor thompson turner walker wallace walton ward warner watson weber wells white williams wong wood woods wright young {}
The first and last elements are empty (null), as the same for all lists. Hence to remove those I use:

Code: Select all

set idlist [lrange [split $idfile "\n"] 1 end-1]
*** Edited, fixed and uploaded script
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Actually, wether idfile is a list or not is abit undefined. It does have a list-like structure, yet is handcrafted, so splitting on newlines really is'nt such a bad idea. Since you'll only use it as a list within the script, it might be a good idea to "mark" it as list as you define it, either using split or list, rather than doing conversions with split further on.

As for empty items in the beginning and end, try defining the string such as this:

Code: Select all

set idfile {adams
allen
...
wright
young}
Or possibly

Code: Select all

set idfile [split {adams
allen
...
wright
young} "\n"]
If you'd like to use list instead, try this:

Code: Select all

set idfile [list adams \
allen \
...
wright \
young]
Could be achieved in a few other ways aswell.
NML_375
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Thanks for the detailed info. I already knew most of it. If I use:

Code: Select all

set idfile {adams
allen
...
wright
young}
That would solve the problem and I wouldn't need to use lrange.

The long databases were copied exactly the same from the echoX inviter script (mIRC script). I used them as they were in the mIRC script (copied from a text file); each element in a separate line.

Consider this I didn't use the nicks database, (only user ident and realname databases) because it was a 82kb text file and that IMHO would eat alot of memory for processing and slow the bot down especially.

Well I think I will add the split when I declare the list, rather than incorporating it into the procedure.

*** Script fixed and uploaded
Last edited by awyeah on Mon Aug 13, 2007 9:58 pm, edited 2 times in total.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

There's no difference between

Code: Select all

set list {
element1
elmenet2
}
and

Code: Select all

set list {element1
element2}
as far as I know. It is a list and IMO there's no need for [split] at all.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

@Sir_Fz: It is something inbetween string and list. It has a structure similar to list, but if you're not careful when adding entries, you'll end up breaking the list-structure. Hence it's not quite a list (yes, in this case, as of now, list commands will work on it, despite it not being a list). Using list or split as illustrated above will make sure it's a proper list, regardless of any special characters within any list-items.

There is a fundamental difference between the two examples you listed, one has a leading and trailing newline, the other does not. This will generate quite different result when converting the string into a list, by splittin on newlines, as the first case will appear to have an empty entry at the beginning and the end.
NML_375
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

nml375 wrote:There is a fundamental difference between the two examples you listed, one has a leading and trailing newline, the other does not. This will generate quite different result when converting the string into a list, by splittin on newlines, as the first case will appear to have an empty entry at the beginning and the end.
Yep, thats why I had used lrange as in my first case for the first list-like expression you posted. However, yeilding an empty first and last element in the list wouldn't really make the script buggy since matching with a user ident (which cannot be null) or even a realname (which cannot be null), but it was just for the purpose of clarity I added it, when I tested it.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

echoX Remover v1.32.b has been updated with the following:
(*) Added additional regexp checks for the realname database
(*) Added user configurable script options
(*) Added timer to who channel users
Please download the latest revised version from the link in the first post of this thread.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

but we are more smarter
It's bugging me. :D
but we are smarter
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Alchera wrote:
but we are more smarter
It's bugging me. :D
but we are smarter
Haha, ok edited. :P

Note: You can change the script's default kick message to whatever you like; that wouldn't interest me a bit.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
A
Aut0Cr0ss
Voice
Posts: 19
Joined: Fri Jun 15, 2007 9:01 pm

Post by Aut0Cr0ss »

i got that error in DCC.
Tcl error [echox:who:chan]: missing close-bracket
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Aut0Cr0ss wrote:i got that error in DCC.
Tcl error [echox:who:chan]: missing close-bracket
Missed a square bracket in one of the checking conditions for the echox:who:chan procedure.

*** Error fixed and script uploaded

You can download the script again from the same link! and thanks for reporting the error.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Tested the script for various echox matching criterias. Found out that all those regexp checks were just basically redundant and slowed the script more.
- Removed all additional regexp checks.
- Shortened code for faster processing.
*** Script updated and uploaded
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Post Reply