mIRC Home    About    Download    Register    News    Help

Print Thread
#35629 11/07/03 05:27 AM
Joined: Jul 2003
Posts: 3
K
Self-satisified door
OP Offline
Self-satisified door
K
Joined: Jul 2003
Posts: 3
hello,
I don't know if any of you have noticed but recently on undernet, we have seen some pornbots spamming the users of multiple channels, by doing the following thing:
1. entering the channel with a not so random nickname
2. getting a list of users
3. messaging random people of that list with nasty things
4. leaving the channel, and going on to the next one on the list.

What i would like to achieve is to write a script that will store the nicknames and hosts of the so called pornbots in a text file and check ONJOIN if the nick or ipmask (*!*@full.hostna.me) corresponds to anything in those two lists. if so, simple temporary ban (30 to 60s) + kick.

please use this thread to help me out.

thanks

#35630 11/07/03 06:04 AM
Joined: Jul 2003
Posts: 3
K
Self-satisified door
OP Offline
Self-satisified door
K
Joined: Jul 2003
Posts: 3
here's what I started with, but was unsuccessfull to get it to work:

on 1:JOIN:#:{ if ($nick == Olodda || Aloecien || Brausien || Eowardoss) {
kick $chan $nick Go sit in a corner.
}}

#35631 11/07/03 06:25 AM
Joined: Mar 2003
Posts: 54
J
Babel fish
Offline
Babel fish
J
Joined: Mar 2003
Posts: 54
You'd be best off using a user list here. You can add a user's host or nick to a user list with /guser or /auser, respectively.

You can then check if the user is matched with a specific named user level in an event by specifying the named level in the event, such as:
Code:
on @spammers:join:#:{
ban # $nick 2
kick # $nick Spam bot
}


By typing /help user list, you can learn a bit more about them. I'd recommend using /guser (and mask level 2), as the nicks are probably randomly generated.

#35632 11/07/03 06:28 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
kodezone, to trouble shoot this for u so u have an idea...

your if is wrong because u can't say "is the nick a or b or c or d" you must use "is the nick a or is the nick b or is the nick c ..."

i.e
if ($nick == name1 || name2 || name3)
should be
if ($nick == name1) || ($nick == name2) || ($nick == name3)
alternativly u can use
if ($istok(name1.name2.name3, $nick, 46))

just so u understand where it went wrong. laugh


-KingTomato
#35633 11/07/03 10:15 AM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
on *:SIGNAL:spam:{
auser spam $3
mode $1 +b $3
kick $1 $2 spam
}
on *:JOIN:#:{
.set %nick $nick
.set %gate $address($nick,1)
if ($level($address($nick,1)) == spam) {
/signal spam $chan $nick $address($nick,1)
}
}
alias banscan {
var %i 1
while (%i <= $nick($chan,0)) {
if ($level($address($nick($chan,%i),1)) == spam) {
/signal spam $chan $nick($chan,%i) $address($nick($chan,%i),1)
}
inc %i
}
}
alias spam {
if ($2- == $null) {
/signal spam $chan %nick %gate
}
else {
var %i 1
while (%i <= $nick($chan,0)) {
if ($2 iswm $nick($chan,%i)) {
/signal spam $chan $nick($chan,%i) $address($nick($chan,%i),1)
}
inc %i
}
}
}
on *:TEXT:*:?:{
if ($1- == pussy) || ($1- == cock) || ($1- == webcam) || ($1- == panties) || ($1- == sex) {
/signal spam $active $nick $address($nick,1)
}
}

heres a few tools i made grin
/banscan checks if anyone managed to get in who should be on your list,/spam will banlist the last person who joined,/spam le* will banlist a nickname starting with le,/spam *le will banlist a nickname ending with le.


new username: tidy_trax
#35634 11/07/03 01:12 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
on *:TEXT:*:?:{
if (*pussy* iswm $1-) || (*cock* iswm $1-) || (*webcam* iswm $1-) || (*panties* iswm $1-) || (*sex* iswm $1-) {
/signal spam $active $nick $address($nick,1)
}
}

on *:SIGNAL:spam:{
auser spam $3
mode $1 +b $3
kick $1 $2 spam
}
on *:JOIN:#:{
.set %nick $nick
.set %gate $address($nick,1)
if ($level($address($nick,1)) == spam) {
/signal spam $chan $nick $address($nick,1)
}
}
alias banscan {
var %i 1
while (%i <= $nick($chan,0)) {
if ($level($address($nick($chan,%i),1)) == spam) {
/signal spam $chan $nick($chan,%i) $address($nick($chan,%i),1)
}
inc %i
}
}
alias spam {
if ($2- == $null) {
/signal spam $chan %nick %gate
}
else {
var %i 1
while (%i <= $nick($chan,0)) {
if ($2 iswm $nick($chan,%i)) {
/signal spam $chan $nick($chan,%i) $address($nick($chan,%i),1)
}
inc %i
}
}
}

sorry the other 1 was broken use this smile (maximum edit time has expired)


new username: tidy_trax
#35635 12/07/03 01:32 AM
Joined: Jul 2003
Posts: 3
K
Self-satisified door
OP Offline
Self-satisified door
K
Joined: Jul 2003
Posts: 3
where could I find examples of writting a script that reads/write to a text file ?

thanks for your feedback!

#35636 12/07/03 01:33 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
/help /write is a good place to start

Syntax:
/write <filename> <text to go in filename>

If you wanted to log a channel, you could do

on 1:TEXT:*:#: {
/write mylog.log $timestamp $nick $+ : $1-
}

Easy >:D


-KingTomato

Link Copied to Clipboard