Consider: With a standard linewidth of 80 characters and the Plugin "Hyperlink_URL2.xml" enabled. MUSHclient receives:
> think Blah http://testtesttesttesttesttesttesttesttesttesttesttesttesttesttest http://test2test2test2test2test2
MUSHclient notices the single line is too long, makes it 2 lines. You get "Blah http://test" and so on on the first line, and the shorter "http://test2" and so on on the second line. Normal behaviour, and Hyperlink_URL2 doesn't have a problem. However, if the first link itself causes MUSHclient to linewrap/make another line, and if there is another URL on the same wrapped line, such as:
> think Blah blahblah blah blah http://testtesttsttesttesttesttesttesttesttesttesttesttesttesttest blah http://testtesttesttesttest
You get as output:
---Start Output---
Blah blahblah blah blah http://testtesttsttesttesttesttesttesttesttesttesttesttesttesttest
blah Run-time error
Plugin: Hyperlink_URL2 (called from world: A Cleverly Named MUSH)
Function/Sub: OnHyperlink called by trigger
Reason: processing trigger ""
[string "Plugin"]:62: attempt to concatenate field '?' (a nil value)
stack traceback:
[string "Plugin"]:62: in function <[string "Plugin"]:1>
Error context in script:
58 :
59 : for x, y in pairs (newstyle) do -- x is the style number, y is the style-data table.
60 : NoteStyle (y.style)
61 : if y.hypernumber ~= nil then
62*: Hyperlink(hyperlinks[y.hypernumber], y.text, "Go to " .. hyperlinks[y.hypernumber]
63 : , RGBColourToName(y.textcolour), RGBColourToName(y.backcolour), 1)
64 : else
65 : ColourTell (RGBColourToName(y.textcolour), RGBColourToName(y.backcolour), y.text)
66 : end
---End Output---
Or alternately an error box, but that's not so easy to copy-paste. ;) In any event, Hyperlink_URL2 not only ceases to function until you close and re-open that world, but any line that has a URL on it gets replaced with bright red "Trigger function "OnHyperlink" not found or had a previous error."
Suggesting one of:
1.) Change this "replace with bright red error message" behaviour.
2.) Re-load the plugin or scripting engine on error (since sometimes you get this error from the MOTD or other uncontrollable circumstance when you first open a game, but may never encounter the above sort of situation unless you log out and log back in again).
3.) Update Hyperlink_URL2 to not be confused by MUSHclient's line wrapping. (I tried, but couldn't even figure out how to address the issue of "when is a line not a line." Meep.)
> think Blah http://testtesttesttesttesttesttesttesttesttesttesttesttesttesttest http://test2test2test2test2test2
MUSHclient notices the single line is too long, makes it 2 lines. You get "Blah http://test" and so on on the first line, and the shorter "http://test2" and so on on the second line. Normal behaviour, and Hyperlink_URL2 doesn't have a problem. However, if the first link itself causes MUSHclient to linewrap/make another line, and if there is another URL on the same wrapped line, such as:
> think Blah blahblah blah blah http://testtesttsttesttesttesttesttesttesttesttesttesttesttesttest blah http://testtesttesttesttest
You get as output:
---Start Output---
Blah blahblah blah blah http://testtesttsttesttesttesttesttesttesttesttesttesttesttesttest
blah Run-time error
Plugin: Hyperlink_URL2 (called from world: A Cleverly Named MUSH)
Function/Sub: OnHyperlink called by trigger
Reason: processing trigger ""
[string "Plugin"]:62: attempt to concatenate field '?' (a nil value)
stack traceback:
[string "Plugin"]:62: in function <[string "Plugin"]:1>
Error context in script:
58 :
59 : for x, y in pairs (newstyle) do -- x is the style number, y is the style-data table.
60 : NoteStyle (y.style)
61 : if y.hypernumber ~= nil then
62*: Hyperlink(hyperlinks[y.hypernumber], y.text, "Go to " .. hyperlinks[y.hypernumber]
63 : , RGBColourToName(y.textcolour), RGBColourToName(y.backcolour), 1)
64 : else
65 : ColourTell (RGBColourToName(y.textcolour), RGBColourToName(y.backcolour), y.text)
66 : end
---End Output---
Or alternately an error box, but that's not so easy to copy-paste. ;) In any event, Hyperlink_URL2 not only ceases to function until you close and re-open that world, but any line that has a URL on it gets replaced with bright red "Trigger function "OnHyperlink" not found or had a previous error."
Suggesting one of:
1.) Change this "replace with bright red error message" behaviour.
2.) Re-load the plugin or scripting engine on error (since sometimes you get this error from the MOTD or other uncontrollable circumstance when you first open a game, but may never encounter the above sort of situation unless you log out and log back in again).
3.) Update Hyperlink_URL2 to not be confused by MUSHclient's line wrapping. (I tried, but couldn't even figure out how to address the issue of "when is a line not a line." Meep.)