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.

a CTCP script to find spammers

Old posts that have not been replied to for several years.
Locked
E
Evil-Dragon

Post by Evil-Dragon »

Hi all, i'm currently trying to figure out how port some code that i'm using in mIRC for use on my eggdrop. The code is simple really and works on two parts:

Part one: Sends CTCP FINGER to the nickname if the nick is 6 or 8 characters in length or if it contains the word "*Baby*" "*Lady*" or "*Girl*"

Part two: On the CTCP finger reply, if it contains "*%email*" or "*%iloveuayas*" it would ban the user and kick it out with the message "Auto Banned: Recognised CTCP Finger Reply" or something to that effect

I've tried looking through the TCL-commands reference for help and got a bit stumped, i thought i'd understand it since i understand mIRC Scripting.. but anyway if anyone has any ideas feel free to post a reply. Here is the original mIRC code below:

on *:join:#Mp3z-Techno-Dance:if (($len($nick) == 6) || ($len($nick) == 8) || (Baby isin $nick) || (Girl isin $nick)) { ctcp $nick finger }

on *:ctcpreply:finger*:if ((*%email* iswm $1-) || (*%iloveuayas* iswm $1-)) { /ban -u1800 #Mp3z-Techno-Dance $nick 2 | kick #Mp3z-Techno-Dance $nick Banned: Known Spambot Reply via CTCP Finger. }

Evil-Dragon
aka
Matt
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

bind join - "#Mp3z-Techno-Dance *" send:finger
proc send:finger {n uh hand chan arg} {
set l [string length $n]
if {($l == 6) || ($l == :cool: || ([string match -nocase "*baby*" $n]) || ([string match -nocase "*lady*" $n]) || ([string match -nocase "*girl*"])} {
puthelp "PRIVMSG $n :01FINGER01"
}
}

bind ctcr - FINGER check:finger
proc check:finger {nick uh hand dest key arg} {
if {![isbotnick $dest]} { retrun }
if {([string match -nocase "*%email*" $arg]) || ([string match -nocase "*%iloveuayas*" $arg])} {
putserv "MODE $chan +b [maskhost "${nick}!${uh}"]"
putserv "KICK $chan $nick :Auto Banned: Recognised CTCP FInger Reply"
}
}
E
Evil-Dragon

Post by Evil-Dragon »

I get this on any nickname joining the channel..

TCL error [send:finger]: no value given for parameter "arg" to "send:finger"
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

I sugest an upgrade to your bots then, as this script is designed for 1.6
E
Evil-Dragon

Post by Evil-Dragon »

I'm running eggdrop 1.6.7 with TCL 8.0
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

ppslim, have you been drinking? :razz:

evil-dragon, change
proc send:finger {n uh hand chan arg} {
to
proc send:finger {n uh hand chan} {
E
Evil-Dragon

Post by Evil-Dragon »

Your gonna hate me for saying this, but i got a new error upon removing "arg" from the proc... now I have this and I'm assuming it might be because i'm using TCL 8.0 (but can't be sure)

TCL error [send:finger]: wrong # args: should be "string match pattern string"

Is it the "-nocase" that could be causing this?

Evil-Dragon
aka
Matt
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

try this
bind join - "#Mp3z-Techno-Dance *" send:finger
proc send:finger {n uh hand chan} {
set l [string length $n]
set n1 [string tolower $n]
if {($l == 6) || ($l == 8) || ([string match "*baby*" $n1]) || ([string match "*lady*" $n1]) || ([string match "*girl*" $n1])} {
puthelp "PRIVMSG $n :01FINGER01"
}
}

bind ctcr - FINGER check:finger
proc check:finger {nick uh hand dest key arg} {
if {![isbotnick $dest]} { retrun }
set arg1 [string tolower $arg]
if {([string match "*%email*" $arg1]) || ([string match "*%iloveuayas*" $arg1])} {
putserv "MODE $chan +b [maskhost "${nick}!${uh}"]"
putserv "KICK $chan $nick :Auto Banned: Recognised CTCP Finger Reply"
}
}

<font size=-1>[ This Message was edited by: Petersen on 2001-12-17 19:10 ]</font>
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Petersen, the funny thing is, no I havn't.

I have been dry for 5 weeks (and it's killing me). I have 4 staff parties coming up over the next 2 weeks, so I should return to normal then.
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

heh, staff parties. got one wednesday nite, followed by a meeting 9am thursday morning. fun fun fun :razz:
E
Evil-Dragon

Post by Evil-Dragon »

Working better however this...

TCL error [check:finger]: can't read "chan": no such variable

Sorry guys, thanks for your help it is much appreciated! :smile:

Evil-Dragon
aka
Matt
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Guess I do need some drink.
bind join - "#Mp3z-Techno-Dance *" send:finger
proc send:finger {n uh hand chan} {
set l [string length $n]
set n1 [string tolower $n]
if {($l == 6) || ($l == :cool: || ([string match "*baby*" $n1]) || ([string match "*lady*" $n1]) || ([string match "*girl*" $n1])} {
puthelp "PRIVMSG $n :01FINGER01"
}
}

bind ctcr - FINGER check:finger
proc check:finger {nick uh hand dest key arg} {
if {![isbotnick $dest]} { retrun }
set arg1 [string tolower $arg]
if {([string match "*%email*" $arg1]) || ([string match "*%iloveuayas*" $arg1])} {
foreach chan [channels] {
putserv "MODE $chan +b [maskhost "${nick}!${uh}"]"
putserv "KICK $chan $nick :Auto Banned: Recognised CTCP Finger Reply"
}
}
}
E
Evil-Dragon

Post by Evil-Dragon »

Thanks so much guys, no errors and it's working perfectly, remind me to buy you guys a beer one of the days.. but i shouldn't really with ppslim since he's being a good lad :smile:

Proof of the pudding:
[16:30] <Leamers> [16:31] CTCP reply FINGER: %iloveuayas (n.ayas) Idle 382 seconds from baby^^17^^ (~sakarya@194.54.49.196) to Leamers

[16:30] *** Leamers sets mode: +b *!sakarya@194.54.49.*
[16:30] *** baby^^17^^ was kicked by Leamers (Auto Banned: Recognised CTCP Finger Reply)


<font size=-1>[ This Message was edited by: Evil-Dragon on 2001-12-18 11:41 ]</font>
Locked