Connectecting to inspircd

This commit is contained in:
adator
2025-09-03 22:01:52 +02:00
parent e79c15188e
commit 6b7fd16a44
13 changed files with 585 additions and 82 deletions

View File

@@ -36,7 +36,7 @@ def tr(message: str, *args) -> str:
is_args_available = True if args else False
g = global_settings
try:
# Access to user object ==> global_instance.get_user_option
# Access to admin object
client_language = g.current_admin.language if g.current_admin else g.global_lang
if count_args != count_placeholder:
@@ -56,7 +56,7 @@ def tr(message: str, *args) -> str:
return message % args if is_args_available else message
except KeyError as ke:
g.global_logger.error(f"Key Error: {ke}")
g.global_logger.error(f"KeyError: {ke}")
return message % args if is_args_available else message
except Exception as err:
@@ -143,6 +143,8 @@ def create_socket(uplink: 'Irc') -> None:
uplink.Logs.critical(f"[OS Error]: {oe}")
if 'connection refused' in str(oe).lower():
sys.exit(oe)
if oe.errno == 10053:
sys.exit(oe)
except AttributeError as ae:
uplink.Logs.critical(f"AttributeError: {ae}")
@@ -241,4 +243,4 @@ def hide_sensitive_data(srvmsg: list[str]) -> list[str]:
return srv_msg
except ValueError:
return srvmsg
return srvmsg