OpenCollarTeam / OpenCollar

Other
123 stars 128 forks source link

Dead code: !pong handler in oc_rlvsys ? Updated #1092

Open NikkiLacrima opened 2 months ago

NikkiLacrima commented 2 months ago

What version of OpenCollar are you using? 8.3

On line 628 of oc_rlvsys:

            } else if (iNum == CMD_RLV_RELAY) {
                if (llGetSubString(sStr,-43,-1)== ","+(string)g_kWearer+",!pong") { //if it is a pong aimed at wearer
                    //Debug("Received pong:"+sStr+" from "+(string)kID);
                    if (kID==g_kSitter) llOwnerSay("@"+"sit:"+(string)g_kSitTarget+"=force");  //if we stored a sitter, sit on it
                    rebakeSourceRestrictions(kID);
                }

This seems to be dead code. The link message CMD_RLV_RELAY is never sent, replaced by CMD_RLV, so this code is never invoked. There is also a !pong handler in oc_relay::Process().

NikkiLacrima commented 1 month ago

... update ... More digging into the handling of reattaching and ping/pong stuff leads to the conclusion that we should move all of this from relay to rlvsys that does already handle list of restrictions from several sources. This can hopefully make the collar relay handle several simultaneous restriction sources. Test implementation is worked on ...