From aa24708699117a4d82059818c1482c5a8b4aaa78 Mon Sep 17 00:00:00 2001 From: Alex Stewart Date: Sun, 21 Apr 2019 01:37:44 -0700 Subject: [PATCH] =Updated ForbiddenWord Changed output to ForbiddenWord --- .gitignore | 3 ++- plugins/forbiddenword.lua | 6 +++--- src/core/lua/Plugin.java | 1 - 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index a79a764..eff1f86 100644 --- a/.gitignore +++ b/.gitignore @@ -64,4 +64,5 @@ rp\.txt Rp\.txt rP\.txt -.log \ No newline at end of file +.log +*.log diff --git a/plugins/forbiddenword.lua b/plugins/forbiddenword.lua index ebdbb46..c6dd63c 100644 --- a/plugins/forbiddenword.lua +++ b/plugins/forbiddenword.lua @@ -1,14 +1,14 @@ local time = os.time(); -function plugin(message) - if(string.match(message, "purple"))then +function plugin(message, user) + if(string.match(string.lower(message), "purple"))then local timedif = os.time() - time; time = os.time(); days = (timedif / (60*60*24)); hours = ((timedif / (60*60)) % 24); mins = ((timedif / (60)) % 60); secs = timedif % 60; - return round(days) .. " " .. round(hours) .. " " .. round(mins) .. " " .. round(secs); + return "*GASP!!!* \n" .. user.name .. " said **THE** word! It's been " .. round(days) .. " days, " .. round(hours) .. " hours, " .. round(mins) .. " minutes, and " .. round(secs) .. " seconds since the last time!"; end return nil; diff --git a/src/core/lua/Plugin.java b/src/core/lua/Plugin.java index c9f3808..24add7a 100644 --- a/src/core/lua/Plugin.java +++ b/src/core/lua/Plugin.java @@ -8,7 +8,6 @@ import java.util.stream.Stream; import org.luaj.vm2.Globals; import org.luaj.vm2.LuaValue; -import org.luaj.vm2.lib.jse.CoerceJavaToLua; import org.luaj.vm2.lib.jse.JsePlatform; // To promote flexibility, plugins are lua file with predefined callbacks.