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

Use glob matching for activity_hide_targets #437

Merged
merged 2 commits into from Mar 21, 2016

Conversation

Projects
None yet
3 participants
@vague666
Member

vague666 commented Mar 11, 2016

No description provided.

char **tmp;
int index;
g_return_val_if_fail(array != NULL, 0);

This comment has been minimized.

@LemonBoy

LemonBoy Mar 12, 2016

Member

Hrm, to be honest it might be better to return -1 instead of 0 to follow the return index ofitem' in array' or -1 if not found principle.
(This also applies to strarray_find)

@LemonBoy

This comment has been minimized.

Member

LemonBoy commented Mar 12, 2016

This deserves a mention in the docs.

Use glob matching for activity_hide_targets
spaces vs tabs!

strarray_find* needs to return -1 if no index found
@LemonBoy

This comment has been minimized.

Member

LemonBoy commented Mar 17, 2016

From RFC 2812

Channels names are strings (beginning with a '&', '#', '+' or '!'
   character) of length up to fifty (50) characters.  Apart from the
   requirement that the first character is either '&', '#', '+' or '!',
   the only restriction on a channel name is that it SHALL NOT contain
   any spaces (' '), a control G (^G or ASCII 7), a comma (',').  Space
   is used as parameter separator and command is used as a list item
   separator by the protocol).  A colon (':') can also be used as a
   delimiter for the channel mask.  Channel names are case insensitive.

and Glib's documentation

Note that in contrast to glob(), the '/' character can be matched by the wildcards, there are no '[...]' character ranges and '*' and '?' can not be escaped to include them literally in a pattern. 

With the attached patch you have no way to reference a channel containing a * or a ?.

@LemonBoy LemonBoy added needs changes and removed auto-merge labels Mar 17, 2016

@ailin-nemui

This comment has been minimized.

Contributor

ailin-nemui commented Mar 17, 2016

it may have unfortunate consequences if you want to ignore activity in the channel #*

@vague666

This comment has been minimized.

Member

vague666 commented Mar 17, 2016

Ah, thanks, yes, we don't want that, maybe we can just skip the matching if
ignore targets is a * or tag/*

/Jari
On Mar 17, 2016 10:04 PM, "ailin-nemui" notifications@github.com wrote:

it may have unfortunate consequences if you want to ignore activity in the
channel #*


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#437 (comment)

@ailin-nemui

This comment has been minimized.

Contributor

ailin-nemui commented Mar 20, 2016

I think this is fine now, @LemonBoy ?

ailin-nemui added a commit that referenced this pull request Mar 21, 2016

Merge pull request #437 from vague666/glob_matching
Use glob matching for activity_hide_targets

@ailin-nemui ailin-nemui merged commit f765864 into irssi:master Mar 21, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment