42wim / matterircd

Connect to your mattermost or slack using your IRC-client of choice.
MIT License
294 stars 60 forks source link

Fix crash on topic change due to invalid user's nickname #289

Closed guilhermepiccoli closed 4 years ago

guilhermepiccoli commented 4 years ago

After running the code with commit 50e16b8624 (that introduced the ability of using nicks), I've noticed in rare occasions we could face a crash on topic/system_header change due to invalid nickname. I believe this is related to other users clearing their nicks after the start of matterircd.

The way I've fixed that was to add some additional checks to system_header change event, and then was able to run several weeks without crashes (although the checks were triggered sometimes, preventing the NIL crash). Notice the Warn was never reached though, but I kept that for safety!

Fixes: 50e16b8624 ["Add option to use Nickname instead of Username (#273)"] Signed-off-by: Guilherme G. Piccoli gpiccoli@canonical.com

42wim commented 4 years ago

👍

guilhermepiccoli commented 4 years ago

Awesome, thanks for merging!