mirror of
https://github.com/iio612/DEFENDER.git
synced 2026-02-13 11:14:23 +00:00
Connectecting to inspircd
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user