Implement optional x in y matching for attributes in the monitor system
This commit is contained in:
@@ -20,6 +20,9 @@ class Mon:
|
||||
group2.add_argument("-p", "--append", action="store_true", dest="doAppend", help="Append entries to lists instead of replacing")
|
||||
group2.add_argument("-r", "--remove", action="store_true", dest="doRemove", help="Remove entries in lists instead of replacing")
|
||||
|
||||
self.parser.add_argument("--inside", action="store_true", dest="inside", help="Use x in y logic for matching instead of comparing exact values")
|
||||
self.parser.add_argument("--outside", action="store_false", dest="inside", help="Don't use x in y logic for matching instead of comparing exact values")
|
||||
|
||||
self.parser.add_argument("--type", nargs="*", metavar="type", dest="specType", help="Specify type of spec matching. Available types: join, part, quit, msg, topic, mode, nick, kick, notice, action, who")
|
||||
self.parser.add_argument("--free", nargs="*", metavar="query", dest="free", help="Use freeform matching")
|
||||
self.parser.add_argument("--exact", nargs="*", metavar="query", dest="exact", help="Use exact matching")
|
||||
@@ -218,6 +221,8 @@ class Mon:
|
||||
cast["real"] = []
|
||||
for i in obj.real:
|
||||
cast["real"].append(" ".join(i))
|
||||
if not obj.inside == None:
|
||||
cast["inside"] = obj.inside
|
||||
return cast
|
||||
|
||||
def subtractCast(self, source, patch, info):
|
||||
|
||||
Reference in New Issue
Block a user