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.

Blacklist script by Sir_fz

Support & discussion of released scripts, and announcements of new releases.
a
asdd1
Voice
Posts: 23
Joined: Sat Jul 05, 2008 6:33 am

Blacklist script by Sir_fz

Post by asdd1 »

Code: Select all

<&dd> !addbl n1nj4 aha
-bot- SYNTAX: !addbl <nick>!<user>@<host> [reason] [bantime]


How to make, if i'm set only nick, no <user>@<host>, script will ban host, example:
<user> !addbl n1nj4 haha
* bot sets mode: +b *!*@1.1.1.1
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Re: Blacklist script by Sir_fz

Post by DragnLord »

asdd1 wrote:<&dd> !addbl n1nj4 aha
-bot- SYNTAX: !addbl <nick>!<user>@<host> [reason] [bantime]


How to make, if i'm set only nick, no <user>@<host>, script will ban host, example:
<user> !addbl n1nj4 haha
* bot sets mode: +b *!*@1.1.1.1
That is probably because it is best to ban people by their host, as it prevents simply changing nick to gain reentry.
You could try following the instructions and use the following:

Code: Select all

!addbl n1nj4!*@* haha
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

The script only adds hostmasks into the black list, that's why you can't specify just the nickname. However, if blackl(bansame) is set to 0 then you can choose which ban-type you want the script to ban by changing the blackl(btype) setting. For example if blackl(btype) is set to 2 (*!*@host) then if you type
!addbl n1nj4!*@* haha
the bot bans n1nj4's *!*@host instead of the blacklisted banmask.
l
loulou7593
Voice
Posts: 12
Joined: Tue Apr 08, 2008 12:52 pm

Post by loulou7593 »

I seek a means while only write

!addbl john


and that blacklist when without being obliged to write

!addbl john*!*@*


cordialement
A
AzOt
Voice
Posts: 8
Joined: Tue Oct 26, 2010 1:45 pm

Post by AzOt »

hello,

I raise the topic because I encounter a problem with the nickname with special character. When I type !addbl [OrS ]*!*@* it adds the nick \[OrS \]*!*@* and thus the nickname join the show what it does not ban, but just kick and ban the bot poses Like this \[OrS \]*!*@* and hence the nick back each time :( can someone help me please?
kickban on the blacklist and I vhost kickban what the user is in the record. txt so for that I replace
putquick "MODE $chan -o +b $nick [set abandoned [blbtype $nick! $ $ UHOST Blackler (BTYPE)]]"
by
putquick "MODE $chan -o +b $nick $blnick"
Cordially

ps: Sorry for my English
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Good thing you reported this AzOt, this is apparently a bug that needs to be fixed. A quick fix would be to apply the following changes:

Replace

Code: Select all

if {$blackl(bansame)} {
 putquick "MODE $chan -o+b $nick $ban"
with

Code: Select all

if {$blackl(bansame)} {
 set ban [string map {\\\\ \\ \\\[ \[ \\\] \]} $ban]
 putquick "MODE $chan -o+b $nick $ban"
and replace

Code: Select all

if {$blackl(bansame)} {
 pushmode $chan -o $nick
 pushmode $chan +b $ban
with

Code: Select all

if {$blackl(bansame)} {
 set ban [string map {\\\\ \\ \\\[ \[ \\\] \]} $ban]
 pushmode $chan -o $nick
 pushmode $chan +b $ban
A
AzOt
Voice
Posts: 8
Joined: Tue Oct 26, 2010 1:45 pm

Post by AzOt »

Sir_Fz thank you for responding. I make the changes as indicated but the bot does no further action :(


ps: sorry for my English
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Did you .rehash after applying the changes?
A
AzOt
Voice
Posts: 8
Joined: Tue Oct 26, 2010 1:45 pm

Post by AzOt »

well yes I do .rehash and itself .restart. and I forget to mention that come a time when adding a user such as [reagetton]*!*@* kickban it all: x
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

I just tested it and it's working fine. Please try the updated version from http://www.4shared.com/file/8ERNn9Ym/blacklist14.html and give me feedback.
A
AzOt
Voice
Posts: 8
Joined: Tue Oct 26, 2010 1:45 pm

Post by AzOt »

Sir_Fz thank you I'll test it and I'll keep you posted if beug :)
S
SinSoLe
Voice
Posts: 3
Joined: Sat Jun 25, 2011 1:36 pm

Post by SinSoLe »

Hello

I'm using this script for a while, and I think that is great. But I would add a feature:

If I add an entry like nick2!*@* and an user changes his nick to nick2, the bot doesn't nothing. It would be great if script binds nick change events to check if is in blacklist.

For example:

Code: Select all

<SinSoLe> .addbl nick2!*@*

Guest0001 (ident@host.com) joined #channel
Guest0001 is now known as nick2

Eggdrop sets mode +b *!*@host.com
nick2 was kicked from #channel by Eggdrop
I tried to do myself adding "bind nick - * bl:cop", but I don't know how to do.
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Hello SinSole, please try this quick solution:

Add this bind

Code: Select all

bind nick - * bl:ban
and replace

Code: Select all

proc bl:ban {nick uhost hand chan} {
with

Code: Select all

proc bl:ban {nick uhost hand chan {nn ""}} {
and inside the proc (the second line) add:

Code: Select all

if {$nn != ""} {
 set nick $nn
}
This should trigger it on nick changes.

Edit: $nn instead of nn
Last edited by Sir_Fz on Sat Jul 02, 2011 2:35 am, edited 1 time in total.
S
SinSoLe
Voice
Posts: 3
Joined: Sat Jun 25, 2011 1:36 pm

Post by SinSoLe »

Hello Sir_Fz, thanks for your reply.

I did the changes that you posted here, but I get this on partyline:
16:19:50 <Eggdrop> 01-07 16:19.34> Tcl error [bl:ban]: syntax error in expression "nn != """: variable references require preceding $
16:19:55 <Eggdrop> 01-07 16:19.40> Tcl error [bl:ban]: syntax error in expression "nn != """: variable references require preceding $
16:19:56 <Eggdrop> 01-07 16:19.41> Tcl error [bl:ban]: syntax error in expression "nn != """: variable references require preceding $
16:20:00 <Eggdrop> 01-07 16:19.44> Tcl error [bl:ban]: syntax error in expression "nn != """: variable references require preceding $
EDIT: Seems that works changing this

Code: Select all

if {nn != ""} {
 set nick $nn
}
with

Code: Select all

if {$nn != ""} { set nick $nn }
Thanks for your help, it's a perfect script :)
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Yep, glad you figured it out :) and glad you like the script.
Post Reply