Bug #1449
Aliases using $1:hostname not working properly
Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
General / Unspecified
Target version:
Start date:
01/03/2018
Due date:
% Done:
0%
Estimated time:
Version:
0.12.4
OS:
Linux
Description
I've mapped the alias /kb to do "/mode $channel b $1:hostname; /kick $1 $2..". when the user is using ipv4 address, the ban works well. but when the user is using ipv6 address/cloaked host, the ban is set like 2001:2002:2003!*@*
History
#1 Updated by genius3000 almost 7 years ago
I believe this is just a syntax error in your alias:
b $1:hostnamewould become
b my.host.com (or 127.0.12.34, etc)which as a ban mask would (at first) be seen as just the nick -> my.host.com!*@*
I imagine the server is smart enough to realize the '.' makes it a host and therefore ends up correct -> *!*@my.host.com
The ':' in an IPv6 must not be triggering the same logic and is read as a nick. You'll want to change your ban mask to be explicit about the format:
*!*@$1:hostnameand just to be safe I would add a '+' in front of the 'b', making the final alias:
/mode $channel +b *!*@$1:hostname; /kick $1 $2.."
That's how I have my 'kb' alias and it works fine with an IPv6 host.
#2 Updated by Exterminador almost 7 years ago
Problem is solved with your tip, genius3000. Can someone close the bug report?
Thanks.
#3 Updated by genius3000 almost 7 years ago
- Status changed from New to Resolved
Resolved as a non-bug.