From efde2954efd636a617702ee1aefb8b1247c9cc5b Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Thu, 29 Apr 2021 22:27:39 +0200 Subject: 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'. --- quarg/database/filters.py | 4 ++-- quarg/main.py | 4 ++-- 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, } -- cgit v1.2.3-2-gb3c3