hi,
is it possible to allow nick which could connect on server at spamfilter or using modules?
i think only added nick could connect on server
for ex: 1)administrator
2)Testnick-01,02,03,04,05,etc..
the other nick will be killed
thx
MODERATOR: Please stop bumping your post. Apparently nobody has or is willing to give an answer, so be it...
Allow Nicks
What you'll have to do is "exceptions" by regex.
Since there's no "allow nick" config block (there's except tkl { type qline; }; but that's based on user@host rather than the desired nick), spamfilter doesn't (yet) have an "except" action or anything like that, and the regex parser itself doesn't have exceptions, what you'll have to do is use a very ugly looking workaround.
Some examples of just how ugly this will look:
As you can see - it's not an easy thing to do. You would be much better off just using a limited allow block (either password or limit what ips/hostnames can connect - or both!) and/or ban user.
edit: whoops, forgot \ needs to be doubled in .conf stuff :P
Since there's no "allow nick" config block (there's except tkl { type qline; }; but that's based on user@host rather than the desired nick), spamfilter doesn't (yet) have an "except" action or anything like that, and the regex parser itself doesn't have exceptions, what you'll have to do is use a very ugly looking workaround.
Some examples of just how ugly this will look:
Code: Select all
// For a single nick (Admin):
spamfilter {
regex "^([^A]|A[^d]|Ad[^m]|Adm[^i]|Admi[^n]|Admin.+)!";
target { user; };
action kline;
reason "Restricted server - go away";
ban-time 24h; // Not permanent in case you typo or something.
};
// For two nicks (Admin or TestNick## - as you described):
spamfilter {
regex "^([^AT])|A[^d]|Ad[^m]|Adm[^i]|Admi[^n]|Admin.+|T[^e]|Te[^s]|Tes[^t]|Test[^N]|TestN[^i]|TestNi[^c]|TestNic[^k]|TestNick\\D|TestNick\\d\\D|TestNick\\d\\d.+)!";
target { user; };
action kline;
reason "Restricted server - go away";
ban-time 24h; // See above.
};
edit: whoops, forgot \ needs to be doubled in .conf stuff :P