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.

Drone join.

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Try it.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

is it just me or are really Sir_Fz's scripts becoming to look like awyeah's? ;)

those multiline if's are hard to read, and prone to errors
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
h
helpme
Voice
Posts: 17
Joined: Sun May 08, 2005 11:07 am

Post by helpme »

Dont know if it work, dont see a w32 troyan, so is this right or not??

Code: Select all

###################################################################
#                                                                 #
# Coded by: Opposing (Fz@nexushells.net) - #nexushells @ DALnet   #
# Version: 1.0                                                    #
##                                                                #
# Description: Bankicks nicks who are suspicious of being         #
#              infected with w32.aplore@mm Trojan/Virus/Worm.     #
#              Translated from the Oz mirc addon.                 #
#                                                                 #
# Report bugs/suggestions to Fz at nexushells.net                 #
###################################################################
#
##############################
# Configurations start here: #
# __________________________ #

## Set the channels you want this script to work on.
## example: set aplore(chans) "#chan1 #chan2" (in lowercase)
set aplore(chans) [channels]

## Set the kick message.
set aplore(kmsg) "w32.aplore@mm Trojan/Virus/Worm Infected."

## Set, in minutes, ban time for this offence.
set aplore(btime) "30"

# Configurations end here. #
############################
#
######################################################################
# Code starts here, please do not edit anything unless you know TCL: #
# __________________________________________________________________ #

bind join - * aplore:kick

proc aplore:kick {nick uhost hand chan} {
 global aplore
 set aplorenick 0
 if {([string is alpha $nick]) || ([string match *\[-^`_\]* $nick]) || ([lsearch -exact $aplore(chans) [string tolower $chan]] == -1)} { return 0 }
 scan $uhost %\[^@\]@%s ident host
 if {([string match -nocase "*[set sident [string trimleft $ident ~]]*" $nick]) && ([string is alpha [string range $nick 0 3]]) && ([string is integer [string range $nick end-1 end]]) && ([string is integer [string index $sident end]]) && ([string index $ident 0] == "~")} {
  putquick "KICK $chan $nick :$aplore(kmsg)"
  putquick "MODE $chan +b *!*@$host"
  putlog "\002$nick\002!\002$ident\002 is infected with w32.aplore@mm."
 }
}

putlog "w32.aplore@mm bankick v1.0 by Opposing Loaded..."
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

demond wrote:is it just me or are really Sir_Fz's scripts becoming to look like awyeah's? ;)

those multiline if's are hard to read, and prone to errors
I didn't want to stack everything into 1 if, and there are no erros and please make it easier if you care (I don't) :P
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

helpme wrote:Dont know if it work, dont see a w32 troyan, so is this right or not??
Wait patiently until an "infected" client enters a channel.

Code: Select all

Baller14!~baller14 is infected with w32.aplore@mm.
-->	Baller14 (~Baller14@66.195.171.35) has joined #eggdrops
*	  Alchera sets ban on *!*@66.195.171.35
<--	Alchera has kicked Baller14 from #eggdrops (w32.aplore@mm Trojan/Virus/Worm Infected.)
I run the script in XChat and the above is what you are expecting from your bot.

If the script does not work simply '.set errorInfo' in the command console and post results in this forum. :)

Btw demond, 'ifs' or no, Sir_Fz's script works as expected. :)
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

I have no doubt it works

my point was that we should cultivate good programming (in our case, that translates to scripting) practices; and having multiline if's with nested condition levels is hardly good practice
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Never suggested otherwise. LOL

Now demond, take up Sir_Fz's "challenge"? :wink:
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

that if can be substituted with a single regexp, bet let leave this to the avid readers ;)
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

demond, I don't see how it could be replaced with just 1 regexp, so my request is to do it (I couldn't) :D
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

This is my short version:

Code: Select all

###################################################################
#                                                                 #
# Coded by: Opposing (Fz@nexushells.net) - #nexushells @ DALnet   #
# Version: 2.0                                                    #
##                                                                #
# Description: Bankicks nicks who are suspicious of being         #
#              infected with w32.aplore@mm Trojan/Virus/Worm.     #
#              Translated from the Oz mirc addon.                 #
#                                                                 #
# Report bugs/suggestions to Fz at nexushells.net                 #
###################################################################
#
##############################
# Configurations start here: #
# __________________________ #

## Set the channels you want this script to work on.
## example: set aplore(chans) "#chan1 #chan2" (in lowercase)
set aplore(chans) [channels]

## Set the kick message.
set aplore(kmsg) "w32.aplore@mm Trojan/Virus/Worm Infected."

## Set, in minutes, ban time for this offence.
set aplore(btime) "30"

# Configurations end here. #
############################
#
######################################################################
# Code starts here, please do not edit anything unless you know TCL: #
# __________________________________________________________________ #

bind join - * aplore:kick

proc aplore:kick {nick uhost hand chan} {
 global aplore
 if {[string is alpha $nick] || [string match {*[-^`_]*} $nick] || [lsearch -exact $aplore(chans) [string tolower $chan]] == -1} { return 0 }
 scan $uhost %\[^@\]@%s ident host
 if {[string match -nocase "*[string trimleft $ident ~]*" $nick] && [regexp {^[A-z]{3,}[0-9]{2}$} $nick] && [regexp {^~[A-z]{3,}[0-9]$} $ident]} {
  putquick "KICK $chan $nick :$aplore(kmsg)"
  putquick "MODE $chan +b *!*@$host"
  putlog "\002$nick\002!\002$ident\002 is infected with w32.aplore@mm."
 }
}

putlog "w32.aplore@mm bankick v2.0 by Opposing Loaded..."
h
helpme
Voice
Posts: 17
Joined: Sun May 08, 2005 11:07 am

Post by helpme »

so is this script auto active on all channels?? "set aplore(chans) [channels]"
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

helpme wrote:so is this script auto active on all channels?? "set aplore(chans) [channels]"
If you ask this again, I'll forbid you from using this script! :twisted: yes, I told you so didn't I? and if it's not kicking that's because as Alchera said, no infected user joined yet.
Post Reply