How to do it?

Talk about pretty much anything here, but DO NOT USE FOR SUPPORT.

Moderator: Supporters

Locked
k4be
UnrealIRCd coder
Posts: 49
Joined: Sun Jan 09, 2005 12:19 pm
Location: Poland

How to do it?

Post by k4be »

I want to ban (akill, gline etc.) ~*@* excepting *@*.pl but this exception may not affect other z: or g:lines. Using Unreal and Anope. How to do it?
Stealth
Head of Support
Posts: 2086
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Post by Stealth »

Add ban user and except ban blocks to your unrealircd.conf

ban user { mask ~*@*; reason "Whatever"; }
except ban { mask ~*@*.pl }

IIRC those should work properly... If not, you should be able to replace the ~* with "unknown" such as "unknown@*" and "unknown@*.pl"
k4be
UnrealIRCd coder
Posts: 49
Joined: Sun Jan 09, 2005 12:19 pm
Location: Poland

Post by k4be »

but... if i /gline for example user@*.adsl.tpnet.pl, will this except override this /gline?
tdw
Posts: 105
Joined: Sat Aug 06, 2005 12:40 pm

Post by tdw »

yep.
Jobe
Official supporter
Posts: 1180
Joined: Wed May 03, 2006 7:09 pm
Location: United Kingdom

Post by Jobe »

Use an allow block to only allow users with a .pl tld to connect then use the ban user line Stealth suggested with no other allow blocks or others changed to a similar hostname mask. For example:

Code: Select all

allow {
	ip             NOBODY;
	hostname       *@*.pl;
	class           clients;
	maxperip 5;
};
ban user { mask ~*@*; reason "Whatever"; } ;
Somebody correct me with the ip value if its wrong please.
Stealth
Head of Support
Posts: 2086
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Post by Stealth »

tdw wrote:yep.
No

Except ban blocks are only for what is set in the conf and K:Lines. except tkl blocks are for everything else.
Stealth
Head of Support
Posts: 2086
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Post by Stealth »

Jobe1986 wrote:Use an allow block to only allow users with a .pl tld to connect then use the ban user line Stealth suggested with no other allow blocks or others changed to a similar hostname mask. For example:

Code: Select all

allow {
	ip             NOBODY;
	hostname       *@*.pl;
	class           clients;
	maxperip 5;
};
ban user { mask ~*@*; reason "Whatever"; } ;
Somebody correct me with the ip value if its wrong please.
Allow blocks will not override any kind of ban
Jobe
Official supporter
Posts: 1180
Joined: Wed May 03, 2006 7:09 pm
Location: United Kingdom

Post by Jobe »

If you re-read the first post he/she wants to disallow all connections from users with no ident response. This means the ban line givern only bans users with no ident response regardless of whether they have a .pl extention but still allows users with a .pl extention and ident response.

You can use the except ban provided by Stealth below as well.
k4be
UnrealIRCd coder
Posts: 49
Joined: Sun Jan 09, 2005 12:19 pm
Location: Poland

Post by k4be »

Jobe1986 wrote:If you re-read the first post he/she wants to disallow all connections from users with no ident response. This means the ban line givern only bans users with no ident response regardless of whether they have a .pl extention but still allows users with a .pl extention and ident response.
I want to ban connections with no ident response from any address, but if the user has .pl tld, it should allow him even without an ident.
I will try solution in the first reply.
Jobe
Official supporter
Posts: 1180
Joined: Wed May 03, 2006 7:09 pm
Location: United Kingdom

Post by Jobe »

The first sollution suggested by STealth should work for what you need. And after thinking about it i realized i mis-interpreted what you wanted so i would like to appolagize for any confusion i may have caused.
Locked