aboutsummaryrefslogtreecommitdiff
path: root/IRCBot.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-09-21 11:34:38 +0100
committerGravatar jesopo2018-09-21 11:34:38 +0100
commit62df014b2923a6534e272a09c51da0aa90756803 (patch)
tree97dcb4a7d050ca8073bd760a5d32ee6eb1500abb /IRCBot.py
parentUpdate a user's ircv3 account if a PRIVMSG has an "account" tag (diff)
Don't pass around full server details more than we have to.
Diffstat (limited to 'IRCBot.py')
-rw-r--r--IRCBot.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/IRCBot.py b/IRCBot.py
index 14a70fcf..536e01ee 100644
--- a/IRCBot.py
+++ b/IRCBot.py
@@ -24,9 +24,11 @@ class Bot(object):
self._events.on("timer.reconnect").hook(self.reconnect)
self._events.on("boot.done").hook(self.setup_timers)
- def add_server(self, id, alias, hostname, port, password, ipv4, tls,
- nickname, username, realname, connect=False):
- new_server = IRCServer.Server(self, self._events, id, alias,
+ def add_server(self, server_id, connect=True):
+ (_, alias, hostname, port, password, ipv4, tls, nickname,
+ username, realname) = self.database.servers.get(server_id)
+
+ new_server = IRCServer.Server(self, self._events, server_id, alias,
hostname, port, password, ipv4, tls, nickname, username,
realname)
if not new_server.get_setting("connect", True):