irssi-import / bugs.irssi.org

bugs.irssi.org archive
https://github.com/irssi/irssi/issues
0 stars 0 forks source link

/ignore -network bug #748

Closed irssibot closed 14 years ago

irssibot commented 14 years ago

Irssi is unable to match -network ignores correctly.

### How to reproduce:

/ignore -network freenode foobar ALL 15:31 Ignoring ALL from foobar [-network freenode]

/ignore .... 15:32 13 foobar: ALL -network freenode

/ignore -network freenode foobar -ALL 15:32 -!- Irssi: foobar is not being ignored

### Also wired:

/ignore -network freenode foobar ALL 15:31 Ignoring ALL from foobar [-network freenode]

/ignore -network freenode foobar ALL 15:31 Ignoring ALL from foobar [-network freenode]

/ignore -network freenode foobar ALL 15:31 Ignoring ALL from foobar [-network freenode]

/ignore 15:32 13 foobar: ALL -network freenode 15:32 14 foobar: ALL -network freenode 15:32 15 foobar: ALL -network freenode 15:32 16 foobar: ALL -network freenode 15:32 17 foobar: ALL -network freenode

irssibot commented 14 years ago

Here is a patch fixing this bug. I totally miss the point of calling ignore_find with NULL as servertag-argument. was that a feature?

http://pastebin.com/Dx2gERNY

irssibot commented 14 years ago

Thanks. I have no idea why it was passing NULL there. I haven't tested it yet, but at first sight I suspect (but am not sure) the patch is confusing tag and network name. They are usually the same, but for example if you're connected to the network freenode twice (tags freenode and freenode2), ignores with -network freenode should work on both connections.

irssibot commented 14 years ago

The code assigns the -network argument to the 'servertag'-variable in line 134:

servertag = g_hash_table_lookup(optlist, "network");

The variable is not used until line 157.

irssibot commented 14 years ago

Committed in r5175. Thanks!

irssibot commented 14 years ago