From dba6ae9217e5fd03b5925bf3023188fe23ff29b1 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Mon, 29 Sep 2003 08:49:54 +0000 Subject: [PATCH] Made addlookup ignore comment lines (designated by initial '#'). --- plugins/Lookup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/Lookup.py b/plugins/Lookup.py index c17612643..7d32d60b4 100644 --- a/plugins/Lookup.py +++ b/plugins/Lookup.py @@ -156,6 +156,8 @@ class Lookup(callbacks.Privmsg): cursor.execute("""CREATE TABLE %s (key TEXT, value TEXT)""" % name) sql = """INSERT INTO %s VALUES (%%s, %%s)""" % name for line in fd: + if line.startswith('#'): + continue line = line.rstrip('\r\n') try: (key, value) = line.split(':', 1)