Merge pull request #1 from jesopo/master

Ask for alias of first server in start.py
This commit is contained in:
Dan 2018-09-23 17:49:06 +01:00 committed by GitHub
commit f58347e6f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,6 +45,7 @@ if len(servers):
else: else:
try: try:
if bool_input("no servers found, add one?"): if bool_input("no servers found, add one?"):
alias = input("alias: ")
hostname = input("hostname: ") hostname = input("hostname: ")
port = int(input("port: ")) port = int(input("port: "))
tls = bool_input("tls?") tls = bool_input("tls?")
@ -53,7 +54,7 @@ else:
nickname = input("nickname: ") nickname = input("nickname: ")
username = input("username: ") username = input("username: ")
realname = input("realname: ") realname = input("realname: ")
database.servers.add(hostname, port, password, ipv4, database.servers.add(alias, hostname, port, password, ipv4,
tls, nickname, username, realname) tls, nickname, username, realname)
except KeyboardInterrupt: except KeyboardInterrupt:
print() print()