Fix start.py not giving the right arguments to database.servers.add

This commit is contained in:
jesopo 2018-10-03 16:00:25 +01:00
parent 27c191a668
commit 0a5aef09b4
2 changed files with 5 additions and 4 deletions

View file

@ -12,9 +12,9 @@ class Servers(Table):
self.database.execute( self.database.execute(
"""INSERT INTO servers (alias, hostname, port, password, ipv4, """INSERT INTO servers (alias, hostname, port, password, ipv4,
tls, bindhost, nickname, username, realname) VALUES ( tls, bindhost, nickname, username, realname) VALUES (
?, ?, ?, ?, ?, ?, ?, ?, ?)""", ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)""",
[hostname, port, password, ipv4, tls, bindhost, nickname, username, [alias, hostname, port, password, ipv4, tls, bindhost, nickname,
realname]) username, realname])
def get_all(self): def get_all(self):
return self.database.execute_fetchall( return self.database.execute_fetchall(
"SELECT server_id, alias FROM servers") "SELECT server_id, alias FROM servers")

View file

@ -75,8 +75,9 @@ else:
nickname = input("nickname: ") nickname = input("nickname: ")
username = input("username: ") username = input("username: ")
realname = input("realname: ") realname = input("realname: ")
bindhost = input("bindhost?: ")
bot.database.servers.add(alias, hostname, port, password, ipv4, bot.database.servers.add(alias, hostname, port, password, ipv4,
tls, nickname, username, realname) tls, bindhost, nickname, username, realname)
except KeyboardInterrupt: except KeyboardInterrupt:
print() print()
pass pass