Bug 305166 - Alternative set of arguments to /ban and similar commands to specify target
Summary: Alternative set of arguments to /ban and similar commands to specify target
Status: CONFIRMED
Alias: None
Product: konversation
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konversation Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-14 21:15 UTC by Christian (Fuchs)
Modified: 2013-04-15 02:39 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian (Fuchs) 2012-08-14 21:15:13 UTC
For quiets and bans it would be very handy to have short options for nick, ident, host  (and maybe others like account if the network supports it) which are combinable. 

e.g.  /ban -ih testuser    would set a ban matching the current ident _and_ host of testuser,  /quiet -nh testuser would set a quiet matching the current nick and host.  The missing parts would be filled up with wildcards (*).  A usability problem I see is that /ban testuser would do a *!*@* then, which is silly. So either 1) it has to be inverted, e.g. use wildcards for the given options or  2) use a separate command for it  (imo not good) or 3) treat the default with no options at all different (not really consistent) 

The current implemetnation with [-host|-domain| -userhost|-userdomain] is not that flexible plus the host/domain thing works a bit strange with cloaks from what I got. So having a possiblity to just specific parts of the  nick!ident@host  and combine them would, if I don't miss anything, offer all the flexibility advanced users (operators) need.  

Reproducible: Always

Steps to Reproduce:
1. Need to set a specific ban / quiet in a quick way

Actual Results:  
Find no possibility to do so

Expected Results:  
Have a flexible way to ban / quiet users, without having to specify the mask manually (which is time consuming) or via copy & paste (which can be hard in an active channel)
Comment 1 Eike Hein 2012-08-15 08:53:14 UTC
How about instead of breaking the current command and inventing a Konversation-specific syntax one must remember we add a new --expand argument to /ban that then understands e.g. "testuser!@" and "testuser!*@". All missing parts get replaced with the actual data (if deduceable) while provided parts are taken as-is (so wildcards work because they're just a string that is copied verbatim like any other).

And if you want to default to --expand behavior, you can make /ban a command alias to /ban --expand.
Comment 2 Christian (Fuchs) 2012-08-15 09:21:32 UTC
Hi Eike, 

unfortunately that won't cover my main usecase, which is efficiency. When I see a problematic user I want to quiet / ban, then I know what is the most efficient way to do so  (e.g. if it is a cloaked account, I probably do a host ban. If it is a shared host, I probably go with an ident+host combination to not affect third parties). 

So actually I would like to provide something that is fast to type, nick works best since that is tab-completable. And along with this I'd like to specify on which of the 3 possibilities (nick, ident, host. If domain makes sense in some networks, maybe that as well. But I never found a usecase for that). 

So I have no problem with a "longer" option that I can alias to, but I'd still like to have a short and efficient way to say on which parts I'd like the ban to match and to be efficient in setting the ban/quiet, that is why specifying the nick only is what I propose.  Typing parts like the ident or host manually ends up with the situation explained above: either you have to do (slow) manual typing, or copy&paste which might not work very well in stressful situations. 

From a usabilty point of view I do understand and agree that the existing behaviour should not be changed. This is why I would be happy with an option or a different command that I can just alias to. 

In fact if I can create short aliases for the most used combinations (e.g. ident and host, only host) that would be great as well, but keeping the options short would help wrt efficiency. If they have to be as long as the current ones (which work, but are not "complete", as not all combinations that make sense are possible): I just alias it. 

Thanks for considering it :) 

Kind regards

Fuchs
Comment 3 Eike Hein 2012-08-15 09:25:18 UTC
I don't think you understood my counter-proposal, actually. It's not any more to type than your variant, and in fact the idea was to _increase_ efficiency by making the _hostmask pattern itself_ the command's syntax instead of having to remember Konversation-specific argument syntax. After all, you say yourself that you are starting with a mental picture of the hostmask you want to end up with.

Your proposal is to type:

/ban -ih testuser

Mine is to type:

/ban testuser!@

That's assuming the command alias. The nick is tab-completable, and the rest is less keystrokes than your variant.
Comment 4 Christian (Fuchs) 2012-08-15 10:20:57 UTC
(In reply to comment #3)
> I don't think you understood my counter-proposal, actually. 

Possible, that is why I recommended to discuss this on IRC. 

> It's not any
> more to type than your variant, and in fact the idea was to _increase_
> efficiency by making the _hostmask pattern itself_ the command's syntax
> instead of having to remember Konversation-specific argument syntax. After
> all, you say yourself that you are starting with a mental picture of the
> hostmask you want to end up with.
> 
> Your proposal is to type:
> 
> /ban -ih testuser
> 
> Mine is to type:
> 
> /ban testuser!@
> 
> That's assuming the command alias. The nick is tab-completable, and the rest
> is less keystrokes than your variant.

Yes, for the exact case of -ih. If you want a different combination you don't have to type the nick but rather the host or ident, which are both not tab-completable and, especially in case of the host, can be rather long. 

My proposal to pass the nick regardless of what pattern you want to set the ban / quiet to was due to the fact that the nick is tab-completable. Konversation can get the needed mask and/or ident with that information, since the nick is unique.