Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -63,3 +63,5 @@ RP\.txt
|
||||
rp\.txt
|
||||
Rp\.txt
|
||||
rP\.txt
|
||||
|
||||
.log
|
||||
@@ -226,8 +226,3 @@
|
||||
[Log] [Core] Command registered under key blur
|
||||
[Log] [Core] Command registered under key eightball
|
||||
[Log] [Core] Command registered under key 8ball
|
||||
[Log] [Plugin] Created new PluginLoader lua environment
|
||||
[Log] [Database] CreateGeyKey: key-392895005024452620
|
||||
[Log] [Database] CreateGeyKey: key-392895005024452620147407528874082304
|
||||
[Log] [Database] CreateSetKey: Key-392895005024452620 value-!
|
||||
[Log] [Database] CreateSetKey: Key-392895005024452620147407528874082304 value-273,4
|
||||
|
||||
@@ -39,3 +39,4 @@ guildroleremove=1
|
||||
guildroleadd=1
|
||||
guildroleallowed=1
|
||||
fetch=1
|
||||
guildrolenotallowed=1
|
||||
|
||||
@@ -12,6 +12,7 @@ blur=
|
||||
choose=
|
||||
poll=
|
||||
rpstart=
|
||||
guildrolenotallowed=
|
||||
bet=
|
||||
perish, thenperish=
|
||||
teey=
|
||||
|
||||
+7
-2
@@ -1,6 +1,11 @@
|
||||
[CommandPollManage]
|
||||
PollManageInfo='start' will start a new poll with the query of the line you put after, 'choice' will add a choice to the poll, 'stop' will end the poll
|
||||
|
||||
[CommandGuildRoleNotAllowed]
|
||||
GuildRoleNotAllowedFailure=
|
||||
GuildRoleNotAllowedSuccess=
|
||||
GuildRoleNotAllowedInfo=
|
||||
|
||||
[CommandBeansShow]
|
||||
BeansShowDisplay=You have %s beans!
|
||||
BeansShowInfo=Displays how many beans you have
|
||||
@@ -33,8 +38,8 @@ GuildRoleAddInfo=Add a role to yourself!
|
||||
|
||||
[CommandRole]
|
||||
RoleInfo=Will show the current role you have, Admins can change others roles with input of 'role x @y' with x being blacklist, general, mod, or admin. Blacklist will not allow the user to interact with kitty anymore, general mod and admin will give the user access to those commands.
|
||||
RoleStandardResponse=Your role is
|
||||
RoleError=You aren't allowed to do that! You must have the KittyRole '%' or higher!
|
||||
RoleStandardResponse=Your role is %s
|
||||
RoleError=You aren't allowed to do that! You must have the KittyRole '%s' or higher!
|
||||
RoleChanged=Changed %s to role `%s`!
|
||||
RoleNeededRole=Please enter `general`, `mod`, or `admin`!
|
||||
|
||||
|
||||
@@ -2,10 +2,18 @@ local time = os.time();
|
||||
|
||||
function plugin(message)
|
||||
if(string.match(message, "purple"))then
|
||||
local response = os.time() - time;
|
||||
local timedif = os.time() - time;
|
||||
time = os.time();
|
||||
return response;
|
||||
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);
|
||||
end
|
||||
|
||||
return nil;
|
||||
end
|
||||
|
||||
function round(num)
|
||||
return math.floor(num + 0.5)
|
||||
end
|
||||
@@ -0,0 +1,39 @@
|
||||
package commands;
|
||||
|
||||
import core.Command;
|
||||
import core.LocStrings;
|
||||
import dataStructures.KittyChannel;
|
||||
import dataStructures.KittyGuild;
|
||||
import dataStructures.KittyRating;
|
||||
import dataStructures.KittyRole;
|
||||
import dataStructures.KittyUser;
|
||||
import dataStructures.Response;
|
||||
import dataStructures.UserInput;
|
||||
|
||||
public class CommandGuildRoleNotAllowed extends Command
|
||||
{
|
||||
public CommandGuildRoleNotAllowed(KittyRole level, KittyRating rating) { super(level, rating); }
|
||||
|
||||
@Override
|
||||
public String HelpText() { return LocStrings.Stub("GuildRoleNotAllowedInfo"); }
|
||||
|
||||
@Override
|
||||
public void OnRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input, Response res)
|
||||
{
|
||||
String [] roles = input.args.split(",");
|
||||
String role;
|
||||
for(int i = 0; i < roles.length; i++)
|
||||
{
|
||||
role = roles[i].trim();
|
||||
if(guild.allowedRole.contains(role))
|
||||
{
|
||||
guild.allowedRole.remove(role);
|
||||
res.Call(LocStrings.Stub("GuildRoleNotAllowedSuccess"));
|
||||
}
|
||||
else
|
||||
{
|
||||
res.Call(String.format(LocStrings.Stub("GuildRoleNotAllowedFailure"), role));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -342,6 +342,7 @@ public class ObjectBuilderFactory
|
||||
manager.Register(LocCommands.Stub("rating"), new CommandRating(KittyRole.Admin, KittyRating.Safe));
|
||||
manager.Register(LocCommands.Stub("indicator"), new CommandChangeIndicator(KittyRole.Admin, KittyRating.Safe));
|
||||
manager.Register(LocCommands.Stub("guildroleallowed"), new CommandGuildRoleAllowed(KittyRole.Admin, KittyRating.Safe));
|
||||
manager.Register(LocCommands.Stub("guildrolenotallowed"), new CommandGuildRoleNotAllowed(KittyRole.Admin, KittyRating.Safe));
|
||||
|
||||
manager.Register(LocCommands.Stub("poll"), new CommandPollManage(KittyRole.Mod, KittyRating.Safe));
|
||||
manager.Register(LocCommands.Stub("givebeans"), new CommandGiveBeans(KittyRole.Mod, KittyRating.Safe));
|
||||
|
||||
@@ -39,8 +39,6 @@ public class Plugin
|
||||
|
||||
globals.load(contents).call();
|
||||
func_plugin = globals.get("plugin");
|
||||
|
||||
String output = null;
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
|
||||
@@ -3,6 +3,9 @@ package utils;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
public class GlobalLog
|
||||
{
|
||||
@@ -14,7 +17,9 @@ public class GlobalLog
|
||||
|
||||
public static void initialize() throws FileNotFoundException, UnsupportedEncodingException
|
||||
{
|
||||
outputLog = new PrintWriter("OutputLog.txt", "UTF-8");
|
||||
DateFormat dF = new SimpleDateFormat("yyyy_MM_dd_HH-mm");
|
||||
Date today = new Date();
|
||||
outputLog = new PrintWriter((dF.format(today) + ".log"), "UTF-8");
|
||||
}
|
||||
|
||||
private static void Write(String status, LogFilter filter, String body)
|
||||
|
||||
Reference in New Issue
Block a user