aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorWolfgang Müller2021-04-29 22:27:39 +0200
committerWolfgang Müller2021-04-29 22:29:45 +0200
commitefde2954efd636a617702ee1aefb8b1247c9cc5b (patch)
treec257fc5bc82742147d6d5fe20d841b832ae22272
parent497afce509ec2e1d53dbdea32481c7fc77ddc658 (diff)
downloadquarg-efde2954efd636a617702ee1aefb8b1247c9cc5b.tar.gz
Rename 'prefix' to 'umode'
Whilst still not perfect, 'umode' signals more closely what this option does. We do not plan to add matching on channel modes, so -m should be fine here. The original name for this option came from the column in the backlog table, 'senderprefixes'.
-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 a78b117..847c243 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 prefix(pref):
- return Backlog.senderprefixes.contains(pref)
+def umode(mode):
+ return Backlog.senderprefixes.contains(mode)
def buftype(btype):
return Buffer.buffertype == btype.value
diff --git a/quarg/main.py b/quarg/main.py
index 35518a4..c9a3557 100644
--- a/quarg/main.py
+++ b/quarg/main.py
@@ -25,7 +25,7 @@ cli.add_argument('-N', action='append', dest='network', help='match messages sen
cli.add_argument('-u', action='append', dest='user', help='match messages sent to this quassel user')
cli.add_argument('-t', action=actions.ParseMessageType, dest='msgtype', help='match messages of this message type')
cli.add_argument('-f', action=actions.ParseMessageFlag, dest='msgflag', help='match messages with this flag')
-cli.add_argument('-p', action='append', dest='prefix', help='match nicks with this prefix')
+cli.add_argument('-m', action='append', dest='umode', help='match messages sent by users with this mode')
cli.add_argument('--after', action=actions.ParseDate, metavar='DATE', help='match messages sent after this date')
cli.add_argument('--before', action=actions.ParseDate, metavar='DATE', help='match messages sent before this date')
cli.add_argument('--around', action=actions.ParseAround, metavar='DATE', help='match messages sent within 12 hours of this date')
@@ -67,7 +67,7 @@ def collect_predicates(args):
'msgflag': filters.msgflag,
'msgtype': filters.msgtype,
'buftype': filters.buftype,
- 'prefix': filters.prefix,
+ 'umode': filters.umode,
'joined': filters.joined,
}