Skip to content

Commit

Permalink
Merge branch 'development' into MUSHclient
Browse files Browse the repository at this point in the history
  • Loading branch information
fiendish committed Apr 6, 2018
2 parents b32df03 + f1bde59 commit 6a37129
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 7 deletions.
3 changes: 3 additions & 0 deletions MUSHclient/AardwolfPackageChanges.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Aardwolf Client Package Major Changes List

r1985 snapshot
- bug fix: Fix compact mode detection in the chat echo plugin. Did the config gmcp values change or did I just forget to do this right the first time?

r1984 snapshot
- bug fix: Remove some old broken theme files accidentally distributed during early theme development.

Expand Down
35 changes: 28 additions & 7 deletions MUSHclient/worlds/plugins/aard_chat_echo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,22 @@ USAGE:
</send>
</trigger>

<trigger
enabled="y"
match="^Compact mode (removed|set)\."
regexp="y"
sequence="100"
send_to="14"
>
<send>
if "%1" == "set" then
compact_mode = "YES"
else
compact_mode = "NO"
end
</send>
</trigger>

</triggers>

<aliases>
Expand All @@ -144,6 +160,10 @@ USAGE:
require "pairsbykeys"
require "gmcphelper"
local init_nonchannel_keys = {"info", "raidinfo", "claninfo", "clan_donations", "global_quest", "warfare", "remort_auction"}
local init_nonchannel_pairs = {["warfare"]="WARFARE:", ["info"]="INFO:", ["raidinfo"]="RAIDINFO:", ["claninfo"]="CLANINFO:", ["global_quest"]="Global Quest:", ["remort_auction"]="Remort Auction:", ["clan_donations"]="Clan Donations"}
local init_channel_keys = {"answer","auction","barter","cant","chant","claninfo","clantalk","commune","curse","dtell","ftalk","gametalk","gclan","gossip","grapevine","gratz","gtell","helper","immtalk","inform","lasertag","ltalk","mafiainfo","market","mchat","mobsay","music","newbie","pchat","pokerinfo","ptell","question","racetalk","rauction","restores","rp","say","snewbie","spouse","tech","telepathy","tell","tiertalk","trivia","wangrp","wardrums","yell"}
-- functions for handling Aardwolf color codes
dofile(GetPluginInfo(GetPluginID(), 20) .. "aardwolf_colors.lua")
Expand All @@ -169,7 +189,7 @@ function enable_hiding(true_false, enabler_id)
addDefaultNonChannels()
else
never_hide = true
for i,v in ipairs(GetTriggerList()) do
for i,v in ipairs(init_nonchannel_keys) do
EnableTrigger(v, false)
end
end
Expand All @@ -178,9 +198,6 @@ end
enable_hiding(false, GetPluginID())
local init_nonchannel_keys = {"info", "raidinfo", "claninfo", "clan_donations", "global_quest", "warfare", "remort_auction"}
local init_nonchannel_pairs = {["warfare"]="WARFARE:", ["info"]="INFO:", ["raidinfo"]="RAIDINFO:", ["claninfo"]="CLANINFO:", ["global_quest"]="Global Quest:", ["remort_auction"]="Remort Auction:", ["clan_donations"]="Clan Donations"}
local init_channel_keys = {"answer","auction","barter","cant","chant","claninfo","clantalk","commune","curse","dtell","ftalk","gametalk","gclan","gossip","grapevine","gratz","gtell","helper","immtalk","inform","lasertag","ltalk","mafiainfo","market","mobsay","music","newbie","pchat","pokerinfo","ptell","question","racetalk","rauction","restores","rp","say","snewbie","spouse","tech","telepathy","tell","tiertalk","trivia","wangrp","wardrums","yell"}
channels_table = {}
nonchannels_table = {}
loadstring(GetVariable("channels_table") or "")()
Expand Down Expand Up @@ -217,7 +234,7 @@ addDefaultChannels()
function echo_msg(msg)
Simulate(ColoursToANSI(msg).."\r\n")
if compact_mode ~= "ON" then
if compact_mode ~= "YES" then
Simulate("\r\n")
end
EnableTriggerGroup("end_gag", true) -- gags trailing blank line
Expand Down Expand Up @@ -271,6 +288,10 @@ function OnPluginBroadcast (msg, id, name, text)
end
end
elseif (text == "char.status") then
if not done_init then
done_init = true
Send_GMCP_Packet("config compact")
end
if gmcp("char.status.state") ~= "5" then -- show messages that were buffered while in note mode
if #msg_buffer > 0 then
Note("Replaying all channel messages received while in note writing mode...")
Expand Down Expand Up @@ -309,7 +330,7 @@ function chat_echo (toggle)
channels_table[k]["echo"] = true
end
ColourNote ("yellow", "", "All chats are now", "lime", "", " shown ", "yellow", "", "in the main window.")
ColourNote ("yellow", "", "Note: This does not affect \"other\" (non-channel) messages, which must be toggled manually.")
ColourNote ("yellow", "", "Note: This does not affect \"other\" (non-channel) messages, which must be toggled separately.")
Note("")
elseif toggle == "off" then
if never_hide then
Expand All @@ -319,7 +340,7 @@ function chat_echo (toggle)
channels_table[k]["echo"] = nil
end
ColourNote ("yellow", "", "All chats are now", "red", "", " hidden ", "yellow", "", "in the main window.")
ColourNote ("yellow", "", "Note: This does not affect \"other\" (non-channel) messages, which must be toggled manually.")
ColourNote ("yellow", "", "Note: This does not affect \"other\" (non-channel) messages, which must be toggled separately.")
Note("")
elseif toggle == "channels" then
local tbl = {}
Expand Down

0 comments on commit 6a37129

Please sign in to comment.