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

Ignore rewrite #28

Open
jorgenschaefer opened this issue Oct 20, 2012 · 1 comment
Open

Ignore rewrite #28

jorgenschaefer opened this issue Oct 20, 2012 · 1 comment
Assignees
Milestone

Comments

@jorgenschaefer
Copy link
Collaborator

Circe has two types or levels of ignore, namely IGNORE and FOOL. It would be good if this could be unified, and maybe made more powerful at the same time.

But how?

Irssi's ignore feature is quite comprehensive. From http://blog.jorgenschaefer.de/2012/10/assessing-threat-of-cyber-terrorism.html

10.1 Manual ignoring

    Irssi's ignoring options should be enough for everyone :)

    /IGNORE [-regexp | -word] [-pattern <pattern>] [-replies] [-except]
            [-channels <channel>] <mask> <levels> <^levels>

        -regexp: <pattern> is a regular expression
        -word: <pattern> must match to full words
        -pattern: <pattern> must match to the message's text
        -replies: Ignore replies to nick in channels. For example
                  "/IGNORE -replies *!*@*.fi PUBLIC" ignores everyone
              from Finland, but also anyone sending message
              "tofinnishnick: blahblah".
        -except: *DON'T* ignore
        -channels: Ignore only in channels
        <mask>: Either a nick mask or list of channels
        <levels>: List of levels to ignore
        <^levels>: List of levels to NOT ignore
                   (/ignore -except nick notices = /ignore nick ^notices)

    /UNIGNORE <ref#> | <mask>

    /IGNORE without any arguments displays list of ignores.

    The best match always wins, so you can have:

        /IGNORE * CTCPS
        /IGNORE -except *!*@host.org CTCPS

10.2 Automatic ignoring

    Irssi can automatically set ignores for people who flood you.
    Currently you can autoignore MSGS, NOTICES, CTCPS and PUBLIC.
    Actions are placed to either MSGS or PUBLIC. See section 3.3 for
    definition of the flood.

    /SET autoignore_time <seconds> specifies how long to ignore the
    user.

    /SET autoignore_levels <levels> specifies what levels to ignore
    automatically, default is to ignore only CTCPS.

@ghost ghost assigned jorgenschaefer Oct 20, 2012
@jorgenschaefer
Copy link
Collaborator Author

The initial steps for this are implemented, the whole thing is mostly unified now.

The last bit from my private notes for when I get around to this:

IGNORE [args] <match> [command]
 Ignore when <match> matches the nick!user@host of a message,
 and [command] matches the command (default: all)

 Args:
 -except
  => Add this pattern to the list of stuff NOT to ignore

 -text <regex>
  => ARGS* must match this

 -noreplies
  => Do not match messages whose target matches the pattern

 -channels <a,b,c>, -channel
  => Applies in these channels (if this is given, this pattern will
     not apply to query buffers unless -queries is given, too; by
     default, it applies to both queries and channels)

 -queries, -query
  => Only in query buffers (if this is given, this pattern will not
     apply to channels unless -channels is given, too; by default, it
     applies to both

 -time <secs>
  => Discard after this amount of seconds


message-option-spec-include, message-option-spec-exclude
- First check exclude. If any match, do nothing
- Then check include. If any match, use the spec.

- [nickuserhost-regexp-or-nil
   command-regexp-or-nil
   text-regexp-or-nil
   replies-p
   channel-regexp-list
   queries-p
   invalid-after
   options]

=> Probably rather a list of plists with (:foo bar :baz qux)?
=> "Best match wins"? What's the "best match"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant