dgw / sopel-BombBot

Customized version of a custom version of a bomb module for Sopel
2 stars 1 forks source link

More intelligent kick privilege detection #34

Open dgw opened 7 years ago

dgw commented 7 years ago

Detecting whether the bot can kick or not by checking its channel access level is "good enough", but it doesn't cover all cases. Some networks have systems in place for granting access to KICK without granting access (e.g. Rizon's FLAGS access system). It would be great if the module could detect this, rather than simply refusing to kick if it doesn't have channel operator status.

As discussed in dgw/sopel-duel#44 there is an IRC numeric reply (482 ERR_CHANOPRIVSNEEDED) that could be caught to help with this detection, but implementing a trial-and-error system in which the bot tries to kick, and then falls back to not kicking if it's not allowed to, might be hard within the Sopel framework.