common: Add '$i:identd', '*' for empty, tooltips
authorShane Synan <digitalcircuit36939@gmail.com>
Wed, 30 May 2018 00:27:37 +0000 (19:27 -0500)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 6 Jun 2018 18:08:26 +0000 (20:08 +0200)
commit71f48abcf1e4f9f852a2087bb30a2f187172c910
tree7a2c8144d160c5f7cc3fdb065652ca8a86cdc679
parent60364a507b6408a21c749b00a71ea3f63f118db0
common: Add '$i:identd', '*' for empty, tooltips

Add "$i:identd" paramater variable to aliases, representing the ident
if verified, or "*" if unknown or unverified (prefixed with '~').

This allows for a general banning rule to target all idents for a
nickname that doesn't provide verified idents (e.g. general clients),
while limiting bans to specific idents for a nickname that provides a
verified ident (e.g. shared bouncer/core).

For example...
/mode channel +b *!$1:identd:$1:hostname

...would target "*!*@bad.example.com" for someone connecting without
an identd server, and "*!userid@shared.example.com" for someone
connecting with an identd server.

For all nickname-based parameters, substitute in "*" when empty
instead of leaving it blank.  This means using the variables for
nicknames that haven't been WHO'd will still provide results.

This may be dangerous if using the above example /ban alias on a
nickname that doesn't have hostname information available, e.g. if
you joined a channel after they did.

Update alias tooltips with 'identd', and totally revamp them using
the table layout for better readability and (hopefully?) easier
translation.

Update the comments in AliasManager, too, so it's a bit more
readable.

Thanks Exterminador for the suggestion/reporting, and @justJanne for
further clarifications!
src/common/aliasmanager.cpp
src/qtui/settingspages/aliasesmodel.cpp