From e9fd59dc454fb2b023daa17e82b2126d6e181f0a Mon Sep 17 00:00:00 2001 From: James Vega Date: Fri, 21 Oct 2005 14:51:23 +0000 Subject: [PATCH] plugins/URL: Make URL.last case-insensitive. --- plugins/URL/plugin.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/URL/plugin.py b/plugins/URL/plugin.py index b59dccd17..926cdde92 100644 --- a/plugins/URL/plugin.py +++ b/plugins/URL/plugin.py @@ -105,6 +105,7 @@ class URL(callbacks.Plugin): f = None nolimit = False for (option, arg) in optlist: + arg = arg.lower() if option == 'nolimit': nolimit = True elif option == 'from': @@ -112,16 +113,16 @@ class URL(callbacks.Plugin): return ircutils.strEqual(record.by, arg) elif option == 'with': def f(record, arg=arg): - return arg in record.url + return arg in record.url.lower() elif option == 'without': def f(record, arg=arg): - return arg not in record.url + return arg not in record.url.lower() elif option == 'proto': def f(record, arg=arg): - return record.url.startswith(arg) + return record.url.lower().startswith(arg) elif option == 'near': def f(record, arg=arg): - return arg in record.near + return arg in record.near.lower() if f is not None: predicates.append(f) def predicate(record):