diff --git a/plugins/ChannelDB.py b/plugins/ChannelDB.py
index 2df34f75e..83b594983 100644
--- a/plugins/ChannelDB.py
+++ b/plugins/ChannelDB.py
@@ -47,8 +47,6 @@ import getopt
import string
from itertools import imap, ifilter
-import sqlite
-
import conf
import utils
import ircdb
@@ -59,6 +57,13 @@ import ircutils
import callbacks
import configurable
+try:
+ import sqlite
+except ImportError:
+ raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
+ 'plugin. Download it at '
+
+
smileys = (':)', ';)', ':]', ':-)', ':-D', ':D', ':P', ':p', '(=', '=)')
frowns = (':|', ':-/', ':-\\', ':\\', ':/', ':(', ':-(', ':\'(')
diff --git a/plugins/Dunno.py b/plugins/Dunno.py
index 35d76edf5..02543b396 100644
--- a/plugins/Dunno.py
+++ b/plugins/Dunno.py
@@ -33,19 +33,24 @@
Add the module docstring here. This will be used by the setup.py script.
"""
-import os
-import conf
-import time
-import ircdb
-import sqlite
__revision__ = "$Id$"
-import plugins
+import os
+import time
+import conf
import utils
+import ircdb
+import plugins
import privmsgs
import callbacks
+try:
+ import sqlite
+except ImportError:
+ raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
+ 'plugin. Download it at '
+
dbfilename = os.path.join(conf.dataDir, 'Dunno.db')
def configure(onStart, afterConnect, advanced):
diff --git a/plugins/Factoids.py b/plugins/Factoids.py
index 369816f3c..35362bb7a 100644
--- a/plugins/Factoids.py
+++ b/plugins/Factoids.py
@@ -44,8 +44,6 @@ import string
import os.path
from itertools import imap
-import sqlite
-
import conf
import utils
import ircdb
@@ -53,6 +51,12 @@ import ircutils
import privmsgs
import callbacks
+try:
+ import sqlite
+except ImportError:
+ raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
+ 'plugin. Download it at '
+
class Factoids(plugins.ChannelDBHandler, callbacks.Privmsg):
def __init__(self):
plugins.ChannelDBHandler.__init__(self)
diff --git a/plugins/FunDB.py b/plugins/FunDB.py
index 9df028c3a..b72d0874c 100755
--- a/plugins/FunDB.py
+++ b/plugins/FunDB.py
@@ -45,8 +45,6 @@ import string
import os.path
from itertools import imap
-import sqlite
-
import conf
import ircdb
import utils
@@ -57,6 +55,12 @@ import privmsgs
import callbacks
import configurable
+try:
+ import sqlite
+except ImportError:
+ raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
+ 'plugin. Download it at '
+
tableCreateStatements = {
'larts': ("""CREATE TABLE larts (
id INTEGER PRIMARY KEY,
diff --git a/plugins/Infobot.py b/plugins/Infobot.py
index 3b47b39ef..854e07537 100755
--- a/plugins/Infobot.py
+++ b/plugins/Infobot.py
@@ -40,12 +40,16 @@ import plugins
import re
import os.path
-import sqlite
-
import conf
import ircmsgs
import callbacks
+try:
+ import sqlite
+except ImportError:
+ raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
+ 'plugin. Download it at '
+
dbfilename = os.path.join(conf.dataDir, 'Infobot.db')
def configure(onStart, afterConnect, advanced):
diff --git a/plugins/Karma.py b/plugins/Karma.py
index 29cba5419..76e3090a5 100644
--- a/plugins/Karma.py
+++ b/plugins/Karma.py
@@ -39,15 +39,17 @@ import os
import sets
from itertools import imap
-import sqlite
-
import utils
-
import plugins
import privmsgs
import callbacks
import configurable
+try:
+ import sqlite
+except ImportError:
+ raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
+ 'plugin. Download it at '
def configure(onStart, afterConnect, advanced):
# This will be called by setup.py to configure this module. onStart and
diff --git a/plugins/Lookup.py b/plugins/Lookup.py
index 62054df7e..f0dc687b1 100644
--- a/plugins/Lookup.py
+++ b/plugins/Lookup.py
@@ -43,13 +43,17 @@ import sys
import sets
import types
-import sqlite
-
import conf
import utils
import privmsgs
import callbacks
+try:
+ import sqlite
+except ImportError:
+ raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
+ 'plugin. Download it at '
+
def configure(onStart, afterConnect, advanced):
# This will be called by setup.py to configure this module. onStart and
# afterConnect are both lists. Append to onStart the commands you would
diff --git a/plugins/Markov.py b/plugins/Markov.py
index 71e8fc977..ebb9c6d1d 100644
--- a/plugins/Markov.py
+++ b/plugins/Markov.py
@@ -42,13 +42,16 @@ import plugins
import os.path
-import sqlite
-
import ircmsgs
import ircutils
import privmsgs
import callbacks
+try:
+ import sqlite
+except ImportError:
+ raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
+ 'plugin. Download it at '
def configure(onStart, afterConnect, advanced):
# This will be called by setup.py to configure this module. onStart and
diff --git a/plugins/MoobotFactoids.py b/plugins/MoobotFactoids.py
index be578d7ba..043730467 100644
--- a/plugins/MoobotFactoids.py
+++ b/plugins/MoobotFactoids.py
@@ -46,7 +46,6 @@ import time
import shlex
import string
import random
-import sqlite
from itertools import imap
from cStringIO import StringIO
@@ -60,6 +59,12 @@ import callbacks
import Owner
+try:
+ import sqlite
+except ImportError:
+ raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
+ 'plugin. Download it at '
+
dbfilename = os.path.join(conf.dataDir, 'MoobotFactoids')
def configure(onStart, afterConnect, advanced):
diff --git a/plugins/News.py b/plugins/News.py
index c2a9ec3f8..a91600c25 100644
--- a/plugins/News.py
+++ b/plugins/News.py
@@ -41,14 +41,18 @@ import plugins
import os
import time
-import sqlite
-
import conf
import ircdb
import utils
import privmsgs
import callbacks
+try:
+ import sqlite
+except ImportError:
+ raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
+ 'plugin. Download it at '
+
def configure(onStart, afterConnect, advanced):
# This will be called by setup.py to configure this module. onStart and
# afterConnect are both lists. Append to onStart the commands you would
diff --git a/plugins/Note.py b/plugins/Note.py
index ef2c612d7..bd0854325 100644
--- a/plugins/Note.py
+++ b/plugins/Note.py
@@ -42,8 +42,6 @@ import time
import os.path
from itertools import imap
-import sqlite
-
import conf
import utils
import ircdb
@@ -53,6 +51,12 @@ import privmsgs
import ircutils
import callbacks
+try:
+ import sqlite
+except ImportError:
+ raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
+ 'plugin. Download it at '
+
dbfilename = os.path.join(conf.dataDir, 'Notes.db')
class NoteDb(plugins.DBHandler):
diff --git a/plugins/Poll.py b/plugins/Poll.py
index c37895ec8..24252a997 100644
--- a/plugins/Poll.py
+++ b/plugins/Poll.py
@@ -41,8 +41,6 @@ import plugins
import os
import time
-import sqlite
-
import conf
import utils
import ircdb
@@ -50,6 +48,11 @@ import ircutils
import privmsgs
import callbacks
+try:
+ import sqlite
+except ImportError:
+ raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
+ 'plugin. Download it at '
def configure(onStart, afterConnect, advanced):
# This will be called by setup.py to configure this module. onStart and
diff --git a/plugins/QuoteGrabs.py b/plugins/QuoteGrabs.py
index f3239a70b..0c2225de9 100644
--- a/plugins/QuoteGrabs.py
+++ b/plugins/QuoteGrabs.py
@@ -45,8 +45,6 @@ import os
import time
import random
-import sqlite
-
import conf
import utils
import ircmsgs
@@ -56,6 +54,11 @@ import privmsgs
import callbacks
import configurable
+try:
+ import sqlite
+except ImportError:
+ raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
+ 'plugin. Download it at '
def configure(onStart, afterConnect, advanced):
# This will be called by setup.py to configure this module. onStart and
diff --git a/plugins/Quotes.py b/plugins/Quotes.py
index da21e113b..330b6ec4b 100644
--- a/plugins/Quotes.py
+++ b/plugins/Quotes.py
@@ -42,14 +42,18 @@ import time
import getopt
import os.path
-import sqlite
-
import conf
import utils
import ircdb
import privmsgs
import callbacks
+try:
+ import sqlite
+except ImportError:
+ raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
+ 'plugin. Download it at '
+
class Quotes(plugins.ChannelDBHandler, callbacks.Privmsg):
def __init__(self):
plugins.ChannelDBHandler.__init__(self)
diff --git a/plugins/Todo.py b/plugins/Todo.py
index eaffd4a0f..c11035f50 100644
--- a/plugins/Todo.py
+++ b/plugins/Todo.py
@@ -44,14 +44,18 @@ import getopt
import string
import os.path
-import sqlite
-
import conf
import ircdb
import utils
import privmsgs
import callbacks
+try:
+ import sqlite
+except ImportError:
+ raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
+ 'plugin. Download it at '
+
dbfilename = os.path.join(conf.dataDir, 'Todo.db')
def configure(onStart, afterConnect, advanced):
diff --git a/plugins/URL.py b/plugins/URL.py
index eee91c69c..7693eec88 100644
--- a/plugins/URL.py
+++ b/plugins/URL.py
@@ -46,8 +46,6 @@ import getopt
import urllib2
import urlparse
-import sqlite
-
import conf
import utils
import ircmsgs
@@ -56,6 +54,12 @@ import privmsgs
import callbacks
import configurable
+try:
+ import sqlite
+except ImportError:
+ raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
+ 'plugin. Download it at '
+
def configure(onStart, afterConnect, advanced):
# This will be called by setup.py to configure this module. onStart and
# afterConnect are both lists. Append to onStart the commands you would