egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Blacklist script by Sir_fz
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
asdd1
Voice


Joined: 05 Jul 2008
Posts: 23

PostPosted: Wed Jul 09, 2008 7:23 am    Post subject: Blacklist script by Sir_fz Reply with quote

[code]<&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
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Wed Jul 09, 2008 10:16 am    Post subject: Re: Blacklist script by Sir_fz Reply with quote

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:
!addbl n1nj4!*@* haha
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed Jul 09, 2008 2:06 pm    Post subject: Reply with quote

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
Quote:
!addbl n1nj4!*@* haha

the bot bans n1nj4's *!*@host instead of the blacklisted banmask.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
loulou7593
Voice


Joined: 08 Apr 2008
Posts: 12

PostPosted: Thu Jun 03, 2010 6:31 pm    Post subject: Reply with quote

I seek a means while only write

!addbl john


and that blacklist when without being obliged to write

!addbl john*!*@*


cordialement
Back to top
View user's profile Send private message Send e-mail
AzOt
Voice


Joined: 26 Oct 2010
Posts: 8

PostPosted: Mon Nov 29, 2010 8:04 am    Post subject: Reply with quote

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 Sad 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

Quote:

putquick "MODE $chan -o +b $nick [set abandoned [blbtype $nick! $ $ UHOST Blackler (BTYPE)]]"


by

Quote:

putquick "MODE $chan -o +b $nick $blnick"


Cordially

ps: Sorry for my English
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Mon Nov 29, 2010 3:44 pm    Post subject: Reply with quote

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:
if {$blackl(bansame)} {
 putquick "MODE $chan -o+b $nick $ban"

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

and replace
Code:
if {$blackl(bansame)} {
 pushmode $chan -o $nick
 pushmode $chan +b $ban

with
Code:
if {$blackl(bansame)} {
 set ban [string map {\\\\ \\ \\\[ \[ \\\] \]} $ban]
 pushmode $chan -o $nick
 pushmode $chan +b $ban

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
AzOt
Voice


Joined: 26 Oct 2010
Posts: 8

PostPosted: Mon Nov 29, 2010 4:02 pm    Post subject: Reply with quote

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


ps: sorry for my English
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Tue Nov 30, 2010 8:52 pm    Post subject: Reply with quote

Did you .rehash after applying the changes?
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
AzOt
Voice


Joined: 26 Oct 2010
Posts: 8

PostPosted: Wed Dec 01, 2010 3:07 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Fri Dec 03, 2010 5:49 pm    Post subject: Reply with quote

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.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
AzOt
Voice


Joined: 26 Oct 2010
Posts: 8

PostPosted: Sat Dec 04, 2010 9:14 am    Post subject: Reply with quote

Sir_Fz thank you I'll test it and I'll keep you posted if beug Smile
Back to top
View user's profile Send private message
SinSoLe
Voice


Joined: 25 Jun 2011
Posts: 3

PostPosted: Sat Jun 25, 2011 2:03 pm    Post subject: Reply with quote

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:
<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.
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Fri Jul 01, 2011 10:01 am    Post subject: Reply with quote

Hello SinSole, please try this quick solution:

Add this bind
Code:
bind nick - * bl:ban

and replace
Code:
proc bl:ban {nick uhost hand chan} {

with
Code:
proc bl:ban {nick uhost hand chan {nn ""}} {

and inside the proc (the second line) add:
Code:
if {$nn != ""} {
 set nick $nn
}

This should trigger it on nick changes.

Edit: $nn instead of nn
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts


Last edited by Sir_Fz on Sat Jul 02, 2011 2:35 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
SinSoLe
Voice


Joined: 25 Jun 2011
Posts: 3

PostPosted: Fri Jul 01, 2011 10:40 am    Post subject: Reply with quote

Hello Sir_Fz, thanks for your reply.

I did the changes that you posted here, but I get this on partyline:

Quote:
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:
if {nn != ""} {
 set nick $nn
}
with
Code:
if {$nn != ""} { set nick $nn }


Thanks for your help, it's a perfect script Smile
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Jul 02, 2011 2:37 am    Post subject: Reply with quote

Yep, glad you figured it out Smile and glad you like the script.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber