updating namings convension to stay coherent

This commit is contained in:
adator
2025-08-09 12:17:45 +02:00
parent 5629dcfde6
commit 1686c4a0b5
11 changed files with 113 additions and 132 deletions

View File

@@ -269,15 +269,15 @@ class Clone():
if not senderObj is None:
senderMsg = ' '.join(cmd[4:])
getClone = self.Clone.get_Clone(cmd[3])
clone_obj = self.Clone.get_clone(cmd[3])
if getClone is None:
if clone_obj is None:
return None
if getClone.uid != self.Config.SERVICE_ID:
if clone_obj.uid != self.Config.SERVICE_ID:
final_message = f"{senderObj.nickname}!{senderObj.username}@{senderObj.hostname} > {senderMsg.lstrip(':')}"
self.Protocol.send_priv_msg(
nick_from=getClone.uid,
nick_from=clone_obj.uid,
msg=final_message,
channel=self.Config.CLONE_CHANNEL
)
@@ -337,9 +337,9 @@ class Clone():
self.Base.create_thread(func=self.thread_kill_clones, func_args=(fromuser, ))
else:
cloneObj = self.Clone.get_Clone(clone_name)
if not cloneObj is None:
self.Protocol.send_quit(cloneObj.uid, 'Goood bye', print_log=False)
clone_obj = self.Clone.get_clone(clone_name)
if not clone_obj is None:
self.Protocol.send_quit(clone_obj.uid, 'Goood bye', print_log=False)
except Exception as err:
self.Logs.error(f'{err}')

View File

@@ -22,7 +22,7 @@ class ModConfModel(MainModel):
autolimit_interval: int = 3
@dataclass
class FloodUser:
class FloodUser(MainModel):
uid: str = None
nbr_msg: int = 0
first_msg_time: int = 0

View File

@@ -1,3 +1,4 @@
from calendar import c
import socket
import psutil
import requests
@@ -264,7 +265,7 @@ def action_on_flood(uplink: 'Defender', srvmsg: list[str]):
channel = srvmsg[3]
User = irc.User.get_User(user_trigger)
if User is None or not irc.Channel.Is_Channel(channelToCheck=channel):
if User is None or not irc.Channel.Is_Channel(channel_to_check=channel):
return
flood_time = confmodel.flood_time