mirror of
https://github.com/iio612/DEFENDER.git
synced 2026-02-13 11:14:23 +00:00
V5.2.7
This commit is contained in:
@@ -144,6 +144,10 @@ class Connection:
|
||||
self.Base.logs.error(f"OSError __connect_to_irc: {oe} - {data}")
|
||||
self.signal = False
|
||||
|
||||
self.IrcSocket.shutdown(socket.SHUT_WR)
|
||||
self.IrcSocket.shutdown(socket.SHUT_RD)
|
||||
self.Base.logs.info(f"<<{self.currentCloneObject.nickname}>> Clone Disconnected ...")
|
||||
|
||||
except AssertionError as ae:
|
||||
self.Base.logs.error(f'Assertion error : {ae}')
|
||||
except ValueError as ve:
|
||||
@@ -154,11 +158,6 @@ class Connection:
|
||||
self.Base.logs.critical(f"{atte}")
|
||||
except Exception as e:
|
||||
self.Base.logs.error(f"Exception: {e}")
|
||||
finally:
|
||||
self.IrcSocket.shutdown(socket.SHUT_WR)
|
||||
self.IrcSocket.shutdown(socket.SHUT_RD)
|
||||
self.Base.logs.info(f"<<{self.currentCloneObject.nickname}>> Clone Disconnected ...")
|
||||
# self.IrcSocket.close()
|
||||
|
||||
def parser(self, cmd:list[bytes]):
|
||||
try:
|
||||
@@ -177,6 +176,7 @@ class Connection:
|
||||
error_value = str(response[1]).replace(':','')
|
||||
if error_value == 'Closing':
|
||||
self.Base.logs.info(f"<<{self.currentCloneObject.nickname}>> {response} ...")
|
||||
self.currentCloneObject.connected = False
|
||||
# self.signal = False
|
||||
|
||||
match response[1]:
|
||||
|
||||
@@ -1017,7 +1017,7 @@ class Irc:
|
||||
current_command = cmd[0]
|
||||
uid_to_deauth = self.User.get_uid(fromuser)
|
||||
self.delete_db_admin(uid_to_deauth)
|
||||
self.send2socket(f":{dnickname} PRIVMSG {dchanlog} :[ {self.Config.CONFIG_COLOR['rouge']}{current_command}{self.Config.CONFIG_COLOR['noire']} ] - {self.User.get_nickname(fromuser)} est désormais déconnecter de {dnickname}")
|
||||
self.send2socket(f":{dnickname} PRIVMSG {dchanlog} :[ {self.Config.CONFIG_COLOR['rouge']}{str(current_command).upper()} ]{self.Config.CONFIG_COLOR['noire']} - {self.User.get_nickname(fromuser)} est désormais déconnecter de {dnickname}")
|
||||
|
||||
case 'auth':
|
||||
# ['auth', 'adator', 'password']
|
||||
@@ -1039,10 +1039,10 @@ class Irc:
|
||||
if not user_from_db is None:
|
||||
uid_user = self.User.get_uid(user_to_log)
|
||||
self.insert_db_admin(uid_user, user_from_db[1])
|
||||
self.send2socket(f":{dnickname} PRIVMSG {dchanlog} :[ {self.Config.CONFIG_COLOR['verte']}{current_command}{self.Config.CONFIG_COLOR['noire']} ] - {self.User.get_nickname(fromuser)} est désormais connecté a {dnickname}")
|
||||
self.send2socket(f":{dnickname} PRIVMSG {dchanlog} :[ {self.Config.CONFIG_COLOR['verte']}{str(current_command).upper()} ]{self.Config.CONFIG_COLOR['noire']} - {self.User.get_nickname(fromuser)} est désormais connecté a {dnickname}")
|
||||
self.send2socket(f":{self.Config.SERVICE_NICKNAME} NOTICE {fromuser} :Connexion a {dnickname} réussie!")
|
||||
else:
|
||||
self.send2socket(f":{dnickname} PRIVMSG {dchanlog} :[ {self.Config.CONFIG_COLOR['rouge']}{current_command}{self.Config.CONFIG_COLOR['noire']} ] - {self.User.get_nickname(fromuser)} a tapé un mauvais mot de pass")
|
||||
self.send2socket(f":{dnickname} PRIVMSG {dchanlog} :[ {self.Config.CONFIG_COLOR['rouge']}{str(current_command).upper()} ]{self.Config.CONFIG_COLOR['noire']} - {self.User.get_nickname(fromuser)} a tapé un mauvais mot de pass")
|
||||
self.send2socket(f":{self.Config.SERVICE_NICKNAME} NOTICE {fromuser} :Mot de passe incorrecte")
|
||||
|
||||
else:
|
||||
|
||||
@@ -151,14 +151,14 @@ class Config:
|
||||
configuration:dict[str, Union[str, int, list, dict]] = json.load(configuration_data)
|
||||
|
||||
config_dict = {"CONFIG_COLOR" : {
|
||||
"blanche": "\\u0003\\u0030",
|
||||
"noire": "\\u0003\\u0031",
|
||||
"bleue": "\\u0003\\u0020",
|
||||
"verte": "\\u0003\\u0033",
|
||||
"rouge": "\\u0003\\u0034",
|
||||
"jaune": "\\u0003\\u0036",
|
||||
"gras": "\\u0002",
|
||||
"nogc": "\\u0002\\u0003"
|
||||
"blanche": "\x0300",
|
||||
"noire": "\x0301",
|
||||
"bleue": "\x0302",
|
||||
"verte": "\x0303",
|
||||
"rouge": "\x0304",
|
||||
"jaune": "\x0306",
|
||||
"gras": "\x02",
|
||||
"nogc": "\x02\x03"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user