From d445247ebb304b4e55a11000e38a1298be8f1aa8 Mon Sep 17 00:00:00 2001 From: Areia Date: Sat, 6 Mar 2021 22:20:25 -0500 Subject: [PATCH] Add update functionality, update helpfile --- areia_message_gagger.xml | 65 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 2 deletions(-) diff --git a/areia_message_gagger.xml b/areia_message_gagger.xml index d5a99a8..cded49b 100644 --- a/areia_message_gagger.xml +++ b/areia_message_gagger.xml @@ -3,12 +3,12 @@ PLUGIN_VERSION) then + Utility.plugin_message(string.format("Updating @Y%s @wfrom v%s to v%s.", PLUGIN_NAME, PLUGIN_VERSION, raw_version)) + Utility.print(" Please do not touch anything.") + local file = io.open(GetPluginInfo(GetPluginID(), 6), "w") + file:write(page) + file:close() + end + raw_version = nil + if (GetAlphaOption("script_prefix") == "") then + SetAlphaOption("script_prefix", "\\\\\\") + end + Execute(string.format( + "%sDoAfterSpecial(1, \"ReloadPlugin('%s')\", sendto.script)", + GetAlphaOption("script_prefix"), GetPluginID() + )) + Utility.plugin_message("Update completed.") +end + + + -------------------------------------------------- -- Utility -------------------------------------------------- @@ -1794,6 +1846,15 @@ Utility.print("Removes the given group or message. If only a group name is given Utility.print("in that group will be deleted. Note that this cannot be reversed, so be certain") Utility.print("you have the correct group and message names before adding the 'confirm'") Utility.print("argument.") +Utility.print("@Yamg regex [on|off]") +Utility.print("Choose the method in which the plugin will receive and display match strings.") +Utility.print("Default is on, which means you should enter and will see regular expressions.") +Utility.print("That method is more powerful but also more complicated. Turning regex off will") +Utility.print("allow you to enter simple strings for your gag triggers. You may use '*' as a") +Utility.print("wildcard, and '\\*' to match a literal '*' (e.g., '* waves at you.' would gag") +Utility.print("any line where Jo, or Bob, or anyone else waves at you).") +Utility.print("@Yamg update") +Utility.print("Check for and install updates to the plugin.") end