diff --git a/src/IRCServer.py b/src/IRCServer.py index 217dfe4c..e67cf913 100644 --- a/src/IRCServer.py +++ b/src/IRCServer.py @@ -10,7 +10,7 @@ class Server(IRCObject.Object): bot: "IRCBot.Bot", events: EventManager.EventHook, id: int, - alias: typing.Optional[str], + alias: str, connection_params: utils.irc.IRCConnectionParameters): self.bot = bot self.events = events @@ -67,11 +67,7 @@ class Server(IRCObject.Object): def __repr__(self) -> str: return "IRCServer.Server(%s)" % self.__str__() def __str__(self) -> str: - if self.alias: - return self.alias - return "%s:%s%s" % (self.connection_params.hostname, - "+" if self.connection_params.tls else "", - self.connection_params.port) + return self.alias def fileno(self) -> int: return self.socket.fileno() diff --git a/src/utils/irc/__init__.py b/src/utils/irc/__init__.py index d2897deb..3e285995 100644 --- a/src/utils/irc/__init__.py +++ b/src/utils/irc/__init__.py @@ -225,7 +225,7 @@ def parse_format(s: str) -> str: OPT_STR = typing.Optional[str] class IRCConnectionParameters(object): - def __init__(self, id: int, alias: OPT_STR, hostname: str, port: int, + def __init__(self, id: int, alias: str, hostname: str, port: int, password: OPT_STR, tls: bool, ipv4: bool, bindhost: OPT_STR, nickname: str, username: OPT_STR, realname: OPT_STR, args: typing.Dict[str, str]={}):