Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

freenode extbans don't work in /ban #150

Closed
mauke opened this Issue Oct 10, 2014 · 9 comments

Comments

Projects
None yet
6 participants
@mauke
Copy link
Contributor

commented Oct 10, 2014

On freenode you can use ban masks like $a:foo (to ban the account foo) or $r:*bar* (to ban any realnames containing bar). See http://freenode.net/using_the_network.shtml .

irssi doesn't like those: you can't use /ban $a:foo. Instead you have to resort to /mode +b $a:foo. This is because irssi thinks a ban mask without ! in it must be a nick, and as $a:foo isn't a nick in the channel, irssi silently ignores it.

I propose solving this by extending the check for ! to also accept something as-is if it starts with $.

src/irc/core/bans.c, ban_get_masks():
        if (**ban == '$' || strchr(*ban, '!') != NULL) {

@ahf ahf added this to the 0.8.18 milestone Oct 10, 2014

@ahf ahf added the bug label Oct 12, 2014

@incognico

This comment has been minimized.

Copy link
Contributor

commented Jan 19, 2015

Is it a good idea to only allow this behavior when the server announces support for EXTBAN? Maybe even more dynamically by parsing the EXTBAN arguments?

@mauke

This comment has been minimized.

Copy link
Contributor Author

commented Jan 19, 2015

Why bother? Normal nicks can't contain $ and the alternative (i.e. the current behavior) is to silently do nothing, which I think is worse than just setting a ban.

@ahf

This comment has been minimized.

Copy link
Member

commented Jan 23, 2015

@mauke up for making a PR? I can add this fix myself manually since it's so easy, but I really like to keep track on who's contributing to the project. Up for making the PR yourself? :-)

@dequis

This comment has been minimized.

Copy link
Member

commented Jan 23, 2015

@ahf git commit --author="name <email@address>" (i usually have to stalk a bit to get a proper email address, most of the time it's just cloning one of the repos and copying it from git log)

mauke added a commit to mauke/irssi that referenced this issue Feb 8, 2015

@mauke

This comment has been minimized.

Copy link
Contributor Author

commented Feb 8, 2015

I've created a pull request at #218. Does this look right?

ahf added a commit that referenced this issue Feb 16, 2015

Merge pull request #218 from mauke/patch-1
accept freenode extbans in /ban [#150]
@kaniini

This comment has been minimized.

Copy link

commented Feb 16, 2015

An important thing to consider is that Unreal uses ~ for their extban character.

@dequis

This comment has been minimized.

Copy link
Member

commented Feb 16, 2015

Unreal docs: https://www.unrealircd.org/files/docs/unreal32docs.html#feature_bantypes

The most common of those seems to be ~q:*!*@blah.blah.com, which works, just like the ~n and ~j examples because they have !

~c, ~r and ~R will need fixing just like freenode's workaround, I'm afraid.

Do we check for ~ and $ or do we make something more generic?

@kaniini

This comment has been minimized.

Copy link

commented Feb 16, 2015

Unreal also has ~a: which matches against the account name.

@ailin-nemui

This comment has been minimized.

Copy link
Contributor

commented Sep 18, 2015

this PR already was merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.