aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorWolfgang Müller2021-05-04 18:42:32 +0200
committerWolfgang Müller2021-05-04 18:49:34 +0200
commit4cc2af4b8b81b8fb403a85b0e85bf585a4523b36 (patch)
treea2e9b1aae5f555d2101fb92983a62afc6c8b7375
parenta7a90bded8023df34e1f63311cb786072a9a2037 (diff)
downloadquarg-4cc2af4b8b81b8fb403a85b0e85bf585a4523b36.tar.gz
Revert "Rename 'prefix' to 'umode'"
This reverts commit efde2954efd636a617702ee1aefb8b1247c9cc5b. After some more consideration, we feel that referring to modes here is misleading and confusing. Compromise by keeping the -m flag, but changing the variable name back to 'prefix' and making clear in the help message that quarg will match against the "channel membership prefix", a term that is used in the Modern IRC Client Protocol specification [1] [1] https://modern.ircdocs.horse/#channel-membership-prefixes
Diffstat (limited to '')
-rw-r--r--quarg/database/filters.py4
-rw-r--r--quarg/main.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/quarg/database/filters.py b/quarg/database/filters.py
index 847c243..a78b117 100644
--- a/quarg/database/filters.py
+++ b/quarg/database/filters.py
@@ -13,8 +13,8 @@ def buffer(name):
def nick(nickname):
return or_(Sender.sender.like(nickname + "!%"), Sender.sender == nickname)
-def umode(mode):
- return Backlog.senderprefixes.contains(mode)
+def prefix(pref):
+ return Backlog.senderprefixes.contains(pref)
def buftype(btype):
return Buffer.buffertype == btype.value
diff --git a/quarg/main.py b/quarg/main.py
index f21327d..29138e3 100644
--- a/quarg/main.py
+++ b/quarg/main.py
@@ -24,7 +24,7 @@ matchers = cli.add_argument_group('matching message context')
matchers.add_argument('-b', action='append', dest='buffer', help='match this buffer')
matchers.add_argument('-B', action=actions.ParseBufferType, dest='buftype', help='match buffers of this type')
matchers.add_argument('-n', action='append', dest='nick', help='match this nickname')
-matchers.add_argument('-m', action='append', dest='umode', help='match nicknames with this mode')
+matchers.add_argument('-m', action='append', dest='prefix', help='match nicknames with this channel membership prefix')
matchers.add_argument('-N', action='append', dest='network', help='match this network')
matchers.add_argument('-Q', action='append', dest='user', help='match this quassel user')
matchers.add_argument('-t', action=actions.ParseMessageType, dest='msgtype', help='match this message type')
@@ -71,7 +71,7 @@ def collect_predicates(args):
'msgflag': filters.msgflag,
'msgtype': filters.msgtype,
'buftype': filters.buftype,
- 'umode': filters.umode,
+ 'prefix': filters.prefix,
'joined': filters.joined,
}