auto-detect new users and my own user (libera RPL_WELCOME fuckup workaround)
This commit is contained in:
parent
a5df60e839
commit
898d4a8d85
@ -255,6 +255,12 @@ class Client:
|
||||
for func in self.__function_register[ServerMessage.RAW]:
|
||||
func(msg_from, msg_type, msg_to, message)
|
||||
|
||||
if "!" in msg_from and msg_from not in self.__userlist:
|
||||
self.__userlist[msg_from] = User(msg_from)
|
||||
if self.__userlist[msg_from].nickname == self.__userlist[self.__my_user].nickname:
|
||||
del self.__userlist[self.__my_user]
|
||||
self.__my_user = msg_from
|
||||
|
||||
if msg_type in self.__function_register:
|
||||
for func in self.__function_register[msg_type]:
|
||||
func(msg_from, msg_to, message)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user