From 40a340e94fe0000fd03e5fcb72635672b26527ca Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 29 Oct 2019 18:00:38 +0000 Subject: utils.cli shouldn't know about Database --- src/utils/cli.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/utils') diff --git a/src/utils/cli.py b/src/utils/cli.py index 1a8e81e8..2c2b3e3b 100644 --- a/src/utils/cli.py +++ b/src/utils/cli.py @@ -1,10 +1,10 @@ -from src import Database +from . import irc def bool_input(s: str): result = input("%s (Y/n): " % s) return not result or result[0].lower() in ["", "y"] -def add_server(database: "Database.Database"): +def add_server(): alias = input("alias: ") hostname = input("hostname: ") port = int(input("port: ")) @@ -15,5 +15,5 @@ def add_server(database: "Database.Database"): realname = input("realname: ") bindhost = input("bindhost?: ") - server_id = database.servers.add(alias, hostname, port, password, tls, + return irc.IRCConnectionParameters(-1, alias, hostname, port, password, tls, bindhost, nickname, username, realname) -- cgit v1.3.1-10-gc9f91