Spamfilters on Hosts?

These are old archives. They are kept for historic purposes only.
Post Reply
Ropechoborra
Posts: 4
Joined: Sat Aug 04, 2007 4:07 pm

Spamfilters on Hosts?

Post by Ropechoborra »

Hi, i have a channel on my server with VhostServ in order to assign vhosts to any user. So the user needs to enter the channel, type " !vhost my.vhost "
and then !hs on

But the problem now is that i want to block those vhosts that could be administrative ones. Example:

Administrator.MyServer.Com
NetAdmin.Staff.com
IRCOP.ServicesAdmin
(an so on...)

I tryed with a spamfilter like this:

/spamfilter add cpnNPtq block 1h INVALID_VHOST !vhost *admin*

But the word 'admin' must be at the first part of the second line =/.

[12:38] <RopeTest> !vhost admin
#vhost Message blocked: INVALID VHOST

[12:41] <RopeTest> !vhost admin.rope
#vhost Message blocked: INVALID VHOST

[12:42] <RopeTest> !vhost rope.admin
[12:42] <VhostServ> RopeTest, please register your nick first.
(here the spamfilter doesnt match) And i want it to also match this.

I also tryed with

/spamfilter add u block 1h INVALID_VHOST/NICK/IDENT *admin*

But it doesn't block the vhosts with admin

How can i do ?

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

Post by Jobe »

try using .* instead of * because regular expressions are NOT the same as wild char matching. Also have a read of the apendixes of the UnrealIRCd documentation on regular expressons to help.

The reason your spamfilter doesnt match is because * means that the character immediatly before it can repeat 0 or MORE times.

So in other words try the following as your spamfilter command:

/spamfilter add c block 1h INVALID_VHOST !vhost .*admin.*
Stealth
Head of Support
Posts: 2086
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Post by Stealth »

Just put it as admin... since you're only wanting to match one thing in a users nick host or ident, you don't need any wildcards.

/spamfilter add u block 1h INVALID_VHOST/NICK/IDENT admin

but instead of using spamfilter to block it, why not just change the bot to block it?
Ropechoborra
Posts: 4
Joined: Sat Aug 04, 2007 4:07 pm

Post by Ropechoborra »

Thank you! :) It worked!

I'll read those mans you sayid.
Post Reply