X-Git-Url: https://jfr.im/git/erebus.git/blobdiff_plain/c0eee1b4d5047e32c615f7e02e05e2233a1b92af..fd52fb165f70d0b10f123ac9468fbf66d45f92f8:/erebus.py?ds=sidebyside diff --git a/erebus.py b/erebus.py index c1ac5d0..2783bd5 100644 --- a/erebus.py +++ b/erebus.py @@ -80,6 +80,9 @@ class Erebus(object): row = c.fetchone() + def msg(self, *args, **kwargs): + self.bot.msg(self.name, *args, **kwargs) + def levelof(self, auth): if auth is None: return 0 @@ -130,9 +133,9 @@ class Erebus(object): self.potype = "select" self.fdlist = [] - def newbot(self, nick, user, bind, server, port, realname): + def newbot(self, nick, user, bind, authname, authpass, server, port, realname): if bind is None: bind = '' - obj = bot.Bot(self, nick, user, bind, server, port, realname) + obj = bot.Bot(self, nick, user, bind, authname, authpass, server, port, realname) self.bots[nick.lower()] = obj def newfd(self, obj, fileno): @@ -256,11 +259,11 @@ def setup(): dbsetup() c = main.db.cursor() - if c.execute("SELECT nick, user, bind FROM bots WHERE active = 1"): + if c.execute("SELECT nick, user, bind, authname, authpass FROM bots WHERE active = 1"): rows = c.fetchall() c.close() for row in rows: - main.newbot(row['nick'], row['user'], row['bind'], cfg.host, cfg.port, cfg.realname) + main.newbot(row['nick'], row['user'], row['bind'], row['authname'], row['authpass'], cfg.host, cfg.port, cfg.realname) main.connectall() def loop():