Index: utils.py =================================================================== --- utils.py (revision 117) +++ utils.py (working copy) @@ -137,6 +137,8 @@ return Memo def strToBool(string): + if string=="0":return 0 + else: return 1 if string=="0":return False return True @@ -145,4 +147,4 @@ del node.uri del node.defaultUri for el in node.elements(): - delUri(el) \ No newline at end of file + delUri(el) Index: main.py =================================================================== --- main.py (revision 117) +++ main.py (working copy) @@ -8,11 +8,13 @@ # License: GPL-v3 # +import sys +sys.path.append('/local/python/lib/python2.5/site-packages') + import j2j from twisted.words.protocols.jabber import component from twisted.internet import reactor import getopt -import sys from config import Config @@ -81,4 +83,4 @@ reactor.run() if __name__ == "__main__": - main() \ No newline at end of file + main() Index: database.py =================================================================== --- database.py (revision 117) +++ database.py (working copy) @@ -12,6 +12,10 @@ elif self.config.DB_TYPE == "postgres": exec 'import pgdb' self.db=pgdb.connect(host=self.config.DB_HOST,user=self.config.DB_USER,password=self.config.DB_PASS,database=self.config.DB_NAME) + elif self.config.DB_TYPE == "sqlite3": + import sqlite3 + self.db=sqlite3.connect(self.config.DB_PATH) + else: self.db = None self.dbCursor=self.db.cursor() @@ -63,4 +67,4 @@ data=self.fetchone("SELECT replytext,lightnotify,autoreplybutforward,onlyroster,autoreplyenabled from "+self.dbTablePrefix+"users_options WHERE id="+str(uid)) if data[0]==None: data[0]='' - return data \ No newline at end of file + return data Index: config.py =================================================================== --- config.py (revision 117) +++ config.py (working copy) @@ -17,6 +17,7 @@ self.PASSWORD=unicode(config.get("component","Password"),"utf-8") self.DB_HOST=unicode(config.get("database","Host"),"utf-8") + self.DB_PATH=unicode(config.get("database","Path"),"utf-8") if self.DB_HOST=="": self.DB_HOST=None self.DB_TYPE=unicode(config.get("database","Type"),"utf-8") @@ -34,4 +35,4 @@ self.DEBUG_CLXMLACL=config.get("debug","clients_jids_to_log") admins=unicode(config.get("admins","List"),"utf-8") - self.ADMINS=admins.split(",") \ No newline at end of file + self.ADMINS=admins.split(",")