Merge pull request #85 from adator85/v6.2.0

Fix removing a user when he leave a channel
This commit is contained in:
adator
2025-08-21 01:39:11 +02:00
committed by GitHub
4 changed files with 5 additions and 10 deletions

View File

@@ -508,12 +508,11 @@ class Base:
"""Methode qui supprime les timers qui ont finis leurs job """Methode qui supprime les timers qui ont finis leurs job
""" """
try: try:
for timer in self.running_timers: for timer in self.running_timers:
if not timer.is_alive(): if not timer.is_alive():
timer.cancel() timer.cancel()
self.running_timers.remove(timer) self.running_timers.remove(timer)
self.logs.info(f"-- Timer {str(timer)} removed") self.logs.debug(f"-- Timer {str(timer)} removed")
else: else:
self.logs.debug(f"--* Timer {str(timer)} Still running ...") self.logs.debug(f"--* Timer {str(timer)} Still running ...")

View File

@@ -95,8 +95,7 @@ class Channel:
""" """
try: try:
result = False result = False
chan_obj = self.get_channel(channel_name)
chan_obj = self.get_channel(channel_name.lower())
if chan_obj is None: if chan_obj is None:
return result return result

View File

@@ -726,13 +726,10 @@ class Unrealircd6:
serverMsg (list[str]): Original server message serverMsg (list[str]): Original server message
""" """
try: try:
# ['@unrealircd.org/geoip=FR;unrealircd.org/userhost=50d6492c@80.214.73.44;unrealircd.org/userip=50d6492c@80.214.73.44;msgid=YSIPB9q4PcRu0EVfC9ci7y-/mZT0+Gj5FLiDSZshH5NCw;time=2024-08-15T15:35:53.772Z', # ['@unrealircd.org', ':001EPFBRD', 'PART', '#welcome', ':WEB', 'IRC', 'Paris']
# ':001EPFBRD', 'PART', '#welcome', ':WEB', 'IRC', 'Paris']
uid = str(serverMsg[1]).lstrip(':') uid = str(serverMsg[1]).lstrip(':')
channel = str(serverMsg[3]).lower() channel = str(serverMsg[3]).lower()
self.__Irc.Channel.delete_user_from_channel(channel, uid) self.__Irc.Channel.delete_user_from_channel(channel, uid)
return None return None
except IndexError as ie: except IndexError as ie:

View File

@@ -897,7 +897,7 @@ class Irc:
self.Protocol.on_squit(serverMsg=original_response) self.Protocol.on_squit(serverMsg=original_response)
case 'PART': case 'PART':
self.Protocol.on_part(serverMsg=parsed_protocol) self.Protocol.on_part(serverMsg=original_response)
case 'VERSION': case 'VERSION':
self.Protocol.on_version_msg(serverMsg=original_response) self.Protocol.on_version_msg(serverMsg=original_response)