Skip to content

mod.dronescan: handleNickChange() is unreachable — EVT_CHNICK is handled but never registered #92

Description

@MrIron-no

mod.dronescan has a handler for nick changes that can never run.

dronescan::OnEvent() handles the event (mod.dronescan/dronescan.cc:514):

    case EVT_CHNICK: {

but dronescan::OnAttach() (dronescan.cc:339-344) registers only six events, and that is not one of them:

    MyUplink->RegisterEvent(EVT_BURST_CMPLT, this);
    MyUplink->RegisterEvent(EVT_NETJOIN, this);
    MyUplink->RegisterEvent(EVT_NETBREAK, this);
    MyUplink->RegisterEvent(EVT_NICK, this);
    MyUplink->RegisterEvent(EVT_KILL, this);
    MyUplink->RegisterEvent(EVT_QUIT, this);

Delivery is registration-gated — xServer only notifies clients present in the listener list for that event — so the case is unreachable and handleNickChange() never runs. Nick changes are not tracked, despite the code for it being present.

Either the registration is missing or the handler is dead; from the outside it is not obvious which was intended, so someone who knows the module's history should decide before it is removed or wired up.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions