You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
1.8 KiB
89 lines
1.8 KiB
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!DOCTYPE muclient>
|
|
<!-- Saved on Tuesday, October 05, 2021, 10:42 AM -->
|
|
<!-- MuClient version 5.07-pre -->
|
|
|
|
<!-- Plugin "RnameWithGMCP" generated by Plugin Wizard -->
|
|
|
|
<muclient>
|
|
<plugin
|
|
name="RnameWithGMCP"
|
|
author="Crowley"
|
|
id="8a7ff1c8cf6e889324b26e7e"
|
|
language="Lua"
|
|
purpose="Displays GMCP room ID"
|
|
save_state="y"
|
|
date_written="2021-10-05 10:41:05"
|
|
requires="4.80"
|
|
version="1.0"
|
|
>
|
|
|
|
</plugin>
|
|
|
|
<triggers>
|
|
<trigger
|
|
enabled="y"
|
|
keep_evaluating="y"
|
|
match="{rname}*"
|
|
omit_from_output="y"
|
|
send_to="14"
|
|
sequence="100"
|
|
>
|
|
<send>TSRtable = TriggerStyleRuns</send>
|
|
</trigger>
|
|
</triggers>
|
|
|
|
<aliases>
|
|
<alias
|
|
enabled="y"
|
|
keep_evaluating="y"
|
|
match="roomids"
|
|
send_to="12"
|
|
sequence="100"
|
|
>
|
|
<send>idEnabled = not idEnabled
|
|
SetVariable("idEnabled", tostring(idEnabled))
|
|
ColourNote("white", "blue", "Room IDs are now " .. (tostring(idEnabled) == "true" and "enabled" or "disabled") .. "!")</send>
|
|
</alias>
|
|
</aliases>
|
|
|
|
<!-- Script -->
|
|
|
|
|
|
<script>
|
|
<![CDATA[
|
|
require "gmcphelper"
|
|
|
|
idEnabled = GetVariable("idEnabled") or "true"
|
|
|
|
TSRtable = {}
|
|
|
|
function OnPluginBroadcast(msg, id, name, text)
|
|
if (id == "3e7dedbe37e44942dd46d264") then
|
|
if (text == "room.info") then
|
|
for i,v in pairs(TSRtable) do
|
|
if v.text ~= "{rname}" then
|
|
ColourTell (RGBColourToName (v.textcolour),
|
|
RGBColourToName (v.backcolour),
|
|
v.text)
|
|
break;
|
|
end
|
|
end
|
|
if tostring(idEnabled) == "true" then
|
|
ColourTell("black", "black", " ")
|
|
Hyperlink ("mapper goto " .. gmcp("room.info.num"),
|
|
"(" .. gmcp("room.info.num") .. ")",
|
|
"",
|
|
"white", "black", 0)
|
|
end
|
|
Note("")
|
|
end
|
|
end
|
|
end
|
|
]]>
|
|
</script>
|
|
|
|
|
|
</muclient>
|
|
|