mirror of
https://github.com/iio612/DEFENDER.git
synced 2026-02-13 11:14:23 +00:00
New features on branch v6.2.5:
- New capability in base.py to patch the database
- Some minor updates on installation.py.
- Translation feature:
- New library requirement (pyyaml)
- New translation systeme implemented.
- New class translation.py added.
- Module folder updated by adding new folder language.
- Core module updated as well with new language folder.
This commit is contained in:
4
mods/clone/language/es/clone-es_1.yaml
Normal file
4
mods/clone/language/es/clone-es_1.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
traduction:
|
||||
# Message help
|
||||
- orig: "Hi my name is clone-es"
|
||||
trad: "Hola mi name is clone-es"
|
||||
6
mods/clone/language/fr/clone-fr_1.yaml
Normal file
6
mods/clone/language/fr/clone-fr_1.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
traduction:
|
||||
# Message help
|
||||
- orig: "You are now logged in"
|
||||
trad: "Vous étes désomais identifier"
|
||||
- orig: "NSUser ==> nsuid: %s | cuid: %s | Account: %s | Nickname: %s | email: %s"
|
||||
trad: "NSUser ==> nsuid: %s | cuid: %s | Compte: %s | Pseudo: %s | email: %s"
|
||||
0
mods/clone/language/fr/clone-fr_2.yaml
Normal file
0
mods/clone/language/fr/clone-fr_2.yaml
Normal file
@@ -131,6 +131,8 @@ class Clone:
|
||||
self.Protocol.send2socket(f":{self.Config.SERVICE_NICKNAME} MODE {self.Config.CLONE_CHANNEL} -k {self.Config.CLONE_CHANNEL_PASSWORD}")
|
||||
self.Protocol.send_part_chan(self.Config.SERVICE_NICKNAME, self.Config.CLONE_CHANNEL)
|
||||
|
||||
self.Irc.Commands.drop_command_by_module(self.module_name)
|
||||
|
||||
return None
|
||||
|
||||
def cmd(self, data:list) -> None:
|
||||
|
||||
@@ -172,7 +172,7 @@ class Command:
|
||||
self.Base.db_update_core_config(self.module_name, self.ModConfig, param_key, param_value)
|
||||
|
||||
def unload(self) -> None:
|
||||
|
||||
self.Irc.Commands.drop_command_by_module(self.module_name)
|
||||
return None
|
||||
|
||||
def cmd(self, data: list[str]) -> None:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import traceback
|
||||
from typing import TYPE_CHECKING
|
||||
import mods.defender.schemas as schemas
|
||||
import mods.defender.utils as utils
|
||||
import mods.defender.threads as thds
|
||||
from typing import TYPE_CHECKING
|
||||
from core.utils import tr
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from core.irc import Irc
|
||||
@@ -202,6 +202,8 @@ class Defender:
|
||||
self.reputationTimer_isRunning:bool = False
|
||||
self.autolimit_isRunning: bool = False
|
||||
|
||||
self.Irc.Commands.drop_command_by_module(self.module_name)
|
||||
|
||||
return None
|
||||
|
||||
def insert_db_trusted(self, uid: str, nickname:str) -> None:
|
||||
@@ -320,8 +322,7 @@ class Defender:
|
||||
except IndexError as ie:
|
||||
self.Logs.error(f"{ie} / {cmd} / length {str(len(cmd))}")
|
||||
except Exception as err:
|
||||
self.Logs.error(f"General Error: {err}")
|
||||
traceback.print_exc()
|
||||
self.Logs.error(f"General Error: {err}", exc_info=True)
|
||||
|
||||
def hcmds(self, user:str, channel: any, cmd: list, fullcmd: list = []) -> None:
|
||||
|
||||
|
||||
@@ -220,6 +220,7 @@ class Jsonrpc():
|
||||
)
|
||||
self.Base.create_thread(func=self.Threads.thread_unsubscribe, func_args=(self, ), run_once=True)
|
||||
self.update_configuration('jsonrpc', 0)
|
||||
self.Irc.Commands.drop_command_by_module(self.module_name)
|
||||
self.Logs.debug(f"Unloading {self.module_name}")
|
||||
return None
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ class Test():
|
||||
self.Base.db_update_core_config(self.module_name, self.ModConfig, param_key, param_value)
|
||||
|
||||
def unload(self) -> None:
|
||||
|
||||
self.Irc.Commands.drop_command_by_module(self.module_name)
|
||||
return None
|
||||
|
||||
def cmd(self, data:list) -> None:
|
||||
|
||||
@@ -126,6 +126,8 @@ class Votekick:
|
||||
self.VoteKickManager.VOTE_CHANNEL_DB = []
|
||||
self.Logs.debug(f'Delete memory DB VOTE_CHANNEL_DB: {self.VoteKickManager.VOTE_CHANNEL_DB}')
|
||||
|
||||
self.Irc.Commands.drop_command_by_module(self.module_name)
|
||||
|
||||
return None
|
||||
except UnboundLocalError as ne:
|
||||
self.Logs.error(f'{ne}')
|
||||
|
||||
Reference in New Issue
Block a user