added get_server to Database.py, for some future use. dunno.

This commit is contained in:
jesopo 2016-04-29 12:43:22 +01:00
parent 863bebb14e
commit 5a27823244
No known key found for this signature in database
GPG key ID: 0BBDEB2AEFCFFCB3

View file

@ -180,3 +180,8 @@ class Database(object):
self.cursor().execute("""SELECT server_id, hostname, port, password, self.cursor().execute("""SELECT server_id, hostname, port, password,
ipv4, tls, nickname, username, realname FROM servers""") ipv4, tls, nickname, username, realname FROM servers""")
return self.cursor().fetchall() return self.cursor().fetchall()
def get_server(self, id):
self.cursor().execute("""SELECT server_id, hostname, port, password,
ipv4, tls, nickname, username, realname FROM servers WHERE
server_id=?""", [id])
return self.cursors.fetchall()