mirror of
https://github.com/iio612/DEFENDER.git
synced 2026-02-13 11:14:23 +00:00
Fix get_datetime call and update some docstring.
This commit is contained in:
@@ -217,7 +217,7 @@ class Defender:
|
||||
|
||||
if response is not None:
|
||||
q_insert = "INSERT INTO def_trusted (datetime, user, host, vhost) VALUES (?, ?, ?, ?)"
|
||||
mes_donnees = {'datetime': self.Base.get_datetime(), 'user': nickname, 'host': '*', 'vhost': '*'}
|
||||
mes_donnees = {'datetime': self.Loader.Utils.get_datetime(), 'user': nickname, 'host': '*', 'vhost': '*'}
|
||||
exec_query = self.Base.db_execute_query(q_insert, mes_donnees)
|
||||
pass
|
||||
|
||||
|
||||
@@ -383,14 +383,11 @@ def action_apply_reputation_santions(uplink: 'Defender') -> None:
|
||||
color_red = gconfig.COLORS.red
|
||||
nogc = gconfig.COLORS.nogc
|
||||
salon_jail = gconfig.SALON_JAIL
|
||||
|
||||
if reputation_flag == 0:
|
||||
return None
|
||||
elif reputation_timer == 0:
|
||||
return None
|
||||
|
||||
uid_to_clean = []
|
||||
|
||||
if reputation_flag == 0 or reputation_timer == 0:
|
||||
return None
|
||||
|
||||
for user in irc.Reputation.UID_REPUTATION_DB:
|
||||
if not user.isWebirc: # Si il ne vient pas de WebIRC
|
||||
if irc.User.get_user_uptime_in_minutes(user.uid) >= reputation_timer and int(user.score_connexion) <= int(reputation_seuil):
|
||||
|
||||
Reference in New Issue
Block a user