Forums » Bugs
Closed parenthesis in names breaks Auto follow (among others)
Certain players are creating characters with a ) at the end of their name. This causes many plugins to malfunction, and while some of these plugins are third party, at least one of them is now built into the main client, namely auto follow. I understand that using plugins are not recommended so I do understand why this has not been fixed before (after a discussion in game it seems this has been going on for years) but now that it affecting the unmodified client can we now get a fix please?
This is a related Lua error:
/\/ | |\| |) [100.0%] in EC-89 has entered the sector.
vo/if_autoroute.lua:16: invalid pattern capture
stack traceback:
[C]: in function 'match'
vo/if_autoroute.lua:16: in function 'func'
vo/vo_event.lua:28: in function <vo/vo_event.lua:26>
[C]: in function 'xpcall'
vo/vo_event.lua:87: in function '_do_event'
vo/vo_event.lua:108: in function 'ProcessEvent'
vo/vo_chat.lua:229: in function 'ProcessChatEvent'
vo/vo_gameevent.lua:403: in function 'func'
vo/vo_gameevent.lua:2136: in function <vo/vo_gameevent.lua:2128>
[Thu Sep 6 12:06:20 2018] \/\/ | |\| |) jumped to Edras System, Sector I-16
\/\/ | |\| |) has left the sector.
This is especially annoying in VR as I have to press many things before this error will go away and although I can still control I cannot see very much past the error. Any plugin that processes the chat to get a name will break for this, as will some that look up a character ID by name.
Note: The above name was generated by myself to generate the error for the log and is in no way someone that uses this bug (I will delete the name if requested). I ran the above test on a clean install of VO to ensure no other things could generate an error.
This is a related Lua error:
/\/ | |\| |) [100.0%] in EC-89 has entered the sector.
vo/if_autoroute.lua:16: invalid pattern capture
stack traceback:
[C]: in function 'match'
vo/if_autoroute.lua:16: in function 'func'
vo/vo_event.lua:28: in function <vo/vo_event.lua:26>
[C]: in function 'xpcall'
vo/vo_event.lua:87: in function '_do_event'
vo/vo_event.lua:108: in function 'ProcessEvent'
vo/vo_chat.lua:229: in function 'ProcessChatEvent'
vo/vo_gameevent.lua:403: in function 'func'
vo/vo_gameevent.lua:2136: in function <vo/vo_gameevent.lua:2128>
[Thu Sep 6 12:06:20 2018] \/\/ | |\| |) jumped to Edras System, Sector I-16
\/\/ | |\| |) has left the sector.
This is especially annoying in VR as I have to press many things before this error will go away and although I can still control I cannot see very much past the error. Any plugin that processes the chat to get a name will break for this, as will some that look up a character ID by name.
Note: The above name was generated by myself to generate the error for the log and is in no way someone that uses this bug (I will delete the name if requested). I ran the above test on a clean install of VO to ensure no other things could generate an error.
Without knowing specifically what is being matched on, names are sent in a separate index from the actual message, so the error is not coming from trying to get the name from the message.
You are right of course, but my assumption is based on the code from TCS auto follow, which does seem to match the chat string to get the fact that the target has jumped.
function tcs.autonav:OnEvent(event, data)
if (event == "CHAT_MSG_SECTORD_SECTOR") and (tcs.autonav.follow == 1) then
local name = GetTargetInfo()
local msg = data['msg']
if not (name and msg) then return end
local tname = name:match(".* Turret %((.*)%)")
if msg:match(name) or (tname and msg:match(tname)) then
tcs.autonav.system, tcs.autonav.sector = msg:match("jumped to (.*) System, Sector (.*)")
if tcs.autonav.system then
tcs.autonav.system = SystemNames[SystemNames[(tcs.autonav.system:match('(.+) ') or tcs.autonav.system):lower()]]
if tcs.autonav.system then
NavRoute.clear()
NavRoute.add(tcs.autonav.system..' '..tcs.autonav.sector)
if tcs.autonav.verbose then
print (tcs.autonav.bold..'Following: '..name..'. Jump when ready.')
end
end
end
end
end
end
That is from TCS but I assume it uses the same code due to the fact that it has the same error and if I remove all comments and line breaks out of TCS then line numbers match too. If the devs are using an internal call we don't know about to tell when a target has jumped then of course I will be totally wrong. If you know such an event can I have it? I do not mind modifying a plug-in to work around this, TYVM.
===
I did try to play with the TCS autofollow and although I have something that does work, it also does not differentiate between having a player targeted or not, which I guess is where the error comes in and why this bit of code is used. Without the name of the target being checked, the plugin simply follows the last jump message received. This works for me, so will just use this for now,
function tcs.autonav:OnEvent(event, data)
if (event == "CHAT_MSG_SECTORD_SECTOR") and (tcs.autonav.follow == 1) then
local name = GetTargetInfo()
local msg = data['msg']
if not (name and msg) then return end
local tname = name:match(".* Turret %((.*)%)")
if msg:match(name) or (tname and msg:match(tname)) then
tcs.autonav.system, tcs.autonav.sector = msg:match("jumped to (.*) System, Sector (.*)")
if tcs.autonav.system then
tcs.autonav.system = SystemNames[SystemNames[(tcs.autonav.system:match('(.+) ') or tcs.autonav.system):lower()]]
if tcs.autonav.system then
NavRoute.clear()
NavRoute.add(tcs.autonav.system..' '..tcs.autonav.sector)
if tcs.autonav.verbose then
print (tcs.autonav.bold..'Following: '..name..'. Jump when ready.')
end
end
end
end
end
end
That is from TCS but I assume it uses the same code due to the fact that it has the same error and if I remove all comments and line breaks out of TCS then line numbers match too. If the devs are using an internal call we don't know about to tell when a target has jumped then of course I will be totally wrong. If you know such an event can I have it? I do not mind modifying a plug-in to work around this, TYVM.
===
I did try to play with the TCS autofollow and although I have something that does work, it also does not differentiate between having a player targeted or not, which I guess is where the error comes in and why this bit of code is used. Without the name of the target being checked, the plugin simply follows the last jump message received. This works for me, so will just use this for now,
Ah yeah, I think the msg:match(name) should be msg:find(name, 1, true)
Give that a try.
Thanks for the report.
Give that a try.
Thanks for the report.
Uh Ray?
Auto follow is a part of the VO client now if I am not misteaken.....
Auto follow is a part of the VO client now if I am not misteaken.....
He can still use the plugin instead of the built-in version.
Oh hi raybondo and thanks, yes this simple change has seemed to do the trick. I will endeavor to send a cookie for you :)