Commit cdba10ff authored by Maiyannah Bishop's avatar Maiyannah Bishop

Add basic BASHING AUTOBASHING status display to TUI

Add enable/disable of autobashing via BASHING AUTOBASHING ENABLE|DISABLE
Progress towards #218
parent da12fd67
......@@ -24,7 +24,6 @@ if (params=="") then
-- Garbage collection
params = nil
match = nil
key = nil
return true
end
......@@ -87,6 +86,63 @@ if (match) then
return true
end
-- BASHING AUTOBASHING ENABLE, so we want to enable autobashing
match = rex.match(params, "(?i)bashing (ab|autobashing) enable")
if (match) then
cecho("<CornflowerBlue>Valkryja Multi-MUD System<BlueViolet>: " ..tostring(Config.MUD).. " version<reset>\n")
cecho("--------------------------------------------------------------------------------\n")
Valkryja.AutoBash = true
cecho("<snow>Automatic bashing is now <green>ENABLED!<reset>\n")
cecho("--------------------------------------------------------------------------------\n")
cecho(" <BlueViolet>copyright (c) 2003-2020 Maiyannah Bishop<reset>\n")
-- Garbage collection
match = nil
params = nil
return true
end
-- BASHING AUTOBASHING DISABLE, so we want to disable autobashing
match = rex.match(params, "(?i)bashing (ab|autobashing) disable")
if (match) then
cecho("<CornflowerBlue>Valkryja Multi-MUD System<BlueViolet>: " ..tostring(Config.MUD).. " version<reset>\n")
cecho("--------------------------------------------------------------------------------\n")
Valkryja.AutoBash = false
cecho("<snow>Automatic bashing is now <red>DISABLED!<reset>\n")
cecho("--------------------------------------------------------------------------------\n")
cecho(" <BlueViolet>copyright (c) 2003-2020 Maiyannah Bishop<reset>\n")
-- Garbage collection
match = nil
params = nil
return true
end
-- BASHING AUTOBASHING without setting a specific value, give some help
match = rex.match(params, "(?i)bashing (ab|autobashing)")
if (match) then
cecho("<CornflowerBlue>Valkryja Multi-MUD System<BlueViolet>: " ..tostring(Config.MUD).. " version<reset>\n")
cecho("--------------------------------------------------------------------------------\n")
if (Valkryja.AutoBash==true) then
cecho("<snow>Current autobashing status:<reset> <green>ENABLED<reset>\n\n")
elseif (Valkryja.AutoBash==false) then
cecho("<snow>Current autobashing status:<reset> <red>DISABLED<reset>\n\n")
else
cecho("<snow>Current autobashing status:<reset> <BlueViolet>UNKNOWN<reset>\n\n")
end
cecho("<snow>Usage to enable/disable: <yellow>valkryja bashing autobashing <red>ENABLED or DISABLED<reset>\n")
cecho("--------------------------------------------------------------------------------\n")
cecho(" <BlueViolet>copyright (c) 2003-2020 Maiyannah Bishop<reset>\n")
-- Garbage collection
match = nil
params = nil
return true
end
-- BASHING without setting a specific value, give some help
match = rex.match(params, "(?i)bashing")
if (match) then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment