| Message |
This simple plugin detects lines with http://xxx arriving from the MUD, and converts the URL part into a hyperlink you can click on to go to the web site.
It is pretty simple. To do that it has to omit the "real" line from output and dummy up its own line with three parts:
- Before the hyperlink
- The hyperlink
- After the hyperlink
It doesn't know what colour the original line was in, so it just displays it in the default output colour (eg. white on black).
That means that lines with hyperlinks on them may display in the wrong colour. If this annoys you, don't install the plugin. :)
You can copy the plugin from below, or download it from:
http://www.mushclient.com/plugins/Hyperlink_URL.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE muclient>
<!-- Saved on Friday, July 25, 2003, 11:37 AM -->
<!-- MuClient version 3.42 -->
<!-- Plugin "Hyperlink_URL" generated by Plugin Wizard -->
<muclient>
<plugin
name="Hyperlink_URL"
author="Nick Gammon"
id="eb9ea32827509752b18f9d70"
language="VBscript"
purpose="Makes a URL on a line into a hyperlink"
date_written="2003-07-25 11:35:21"
requires="3.41"
version="1.0"
>
<description trim="y">
<![CDATA[
Detects text starting with HTTP:xxx and makes that part into a hyperlink.
Limitations -
1. Only detects one per line
2. The rest of the line will be shown in white on black -
other colours will be discarded.
]]>
</description>
</plugin>
<!-- Get our standard constants -->
<include name="constants.vbs"/>
<!-- Triggers -->
<triggers>
<trigger
enabled="y"
match="(.*)(http\:\/\/(?:[A-Za-z0-9\.\\/\?])+)(.*)"
omit_from_output="y"
regexp="y"
script="OnHyperlink"
sequence="100"
>
</trigger>
</triggers>
<!-- Script -->
<script>
<![CDATA[
sub OnHyperlink (name, line, wildcards)
ColourTell RGBColourToName (NormalColour(8)), _
RGBColourToName (NormalColour(1)), _
wildcards (1)
Hyperlink wildcards (2), wildcards (2), "", "", "", 1
ColourNote RGBColourToName (NormalColour(8)), _
RGBColourToName (NormalColour(1)), _
wildcards (3)
end sub
]]>
</script>
</muclient>
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|