Skip to content

Commit

Permalink
Merge pull request #53 from adator85/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
adator85 authored Oct 1, 2024
2 parents 80b329d + 12c7e5e commit c404cc3
Show file tree
Hide file tree
Showing 6 changed files with 203 additions and 202 deletions.
15 changes: 12 additions & 3 deletions core/irc.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,14 +821,21 @@ def cmd(self, data: list[str]) -> None:
self.Base.logs.info(f"# CHANNEL : {self.Config.SERVICE_CHANLOG} ")
self.Base.logs.info(f"# VERSION : {version} ")
self.Base.logs.info(f"################################################")

if self.Base.check_for_new_version(False):
self.send2socket(f":{self.Config.SERVICE_NICKNAME} PRIVMSG {self.Config.SERVICE_CHANLOG} : New Version available {version}")

# Initialisation terminé aprés le premier PING
self.sendPrivMsg(msg=f'[{self.Config.COLORS.green}INFORMATION{self.Config.COLORS.nogc}] >> Defender is ready', channel=self.Config.SERVICE_CHANLOG)
self.INIT = 0

# Send EOF to other modules
for classe_name, classe_object in self.loaded_classes.items():
classe_object.cmd(original_response)

# Stop here When EOS
return None

case _:
pass

Expand Down Expand Up @@ -1003,7 +1010,8 @@ def cmd(self, data: list[str]) -> None:
arg.remove(f':{self.Config.SERVICE_PREFIX}')
if not arg[0].lower() in self.commands:
self.Base.logs.debug(f"This command {arg[0]} is not available")
return False
self.sendNotice(f"This command [{self.Config.COLORS.bold}{arg[0]}{self.Config.COLORS.bold}] is not available", user_trigger)
return None

cmd_to_send = convert_to_string.replace(':','')
self.Base.log_cmd(user_trigger, cmd_to_send)
Expand Down Expand Up @@ -1348,8 +1356,9 @@ def _hcmds(self, user: str, channel: Union[str, None], cmd: list, fullcmd: list
batch_commands = ' | '.join(groupe)
self.send2socket(f':{dnickname} NOTICE {fromuser} : {batch_commands}')

self.send2socket(f':{dnickname} NOTICE {fromuser} : ')

count_level_definition += 1
self.send2socket(f':{dnickname} NOTICE {fromuser} : ')

self.send2socket(f':{dnickname} NOTICE {fromuser} : ***************** FIN DES COMMANDES *****************')

Expand Down
3 changes: 3 additions & 0 deletions mods/mod_clone.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def __init_module(self) -> None:

self.Base.db_query_channel(action='add', module_name=self.module_name, channel_name=self.Config.CLONE_CHANNEL)
self.Irc.send2socket(f":{self.Config.SERVICE_NICKNAME} JOIN {self.Config.CLONE_CHANNEL}")
self.Irc.send2socket(f":{self.Config.SERVICE_NICKNAME} SAMODE {self.Config.CLONE_CHANNEL} +o {self.Config.SERVICE_NICKNAME}")
self.Irc.send2socket(f":{self.Config.SERVICE_NICKNAME} MODE {self.Config.CLONE_CHANNEL} +nts")
self.Irc.send2socket(f":{self.Config.SERVICE_NICKNAME} MODE {self.Config.CLONE_CHANNEL} +k {self.Config.CLONE_CHANNEL_PASSWORD}")

Expand Down Expand Up @@ -126,6 +127,8 @@ def unload(self) -> None:
self.Irc.send2socket(f':{self.Config.SERVICE_NICKNAME} PRIVMSG {clone} :KILL')

self.Base.db_query_channel(action='del', module_name=self.module_name, channel_name=self.Config.CLONE_CHANNEL)
self.Irc.send2socket(f":{self.Config.SERVICE_NICKNAME} MODE {self.Config.CLONE_CHANNEL} -nts")
self.Irc.send2socket(f":{self.Config.SERVICE_NICKNAME} MODE {self.Config.CLONE_CHANNEL} -k {self.Config.CLONE_CHANNEL_PASSWORD}")
self.Irc.send2socket(f":{self.Config.SERVICE_NICKNAME} PART {self.Config.CLONE_CHANNEL}")
return None

Expand Down
Loading

0 comments on commit c404cc3

Please sign in to comment.