forked from upstream/ProAntiTab
Fix "Remove / Commands" Issue
This commit is contained in:
1 parent
f8e5f19829
commit
b31a23b491
2 files changed
+8
-3
No files matched your search
@@ -171,7 +171,7 @@ public class CommandProcess {
|
||||
|
||||
task = args[0].toLowerCase();
|
||||
sub = args[1];
|
||||
bool = Storage.Blacklist.isListed(sub);
|
||||
bool = Storage.Blacklist.isListed(sub, false, false);
|
||||
switch (task) {
|
||||
case "ls":
|
||||
case "list":
|
||||
@@ -483,7 +483,7 @@ public class CommandProcess {
|
||||
return;
|
||||
}
|
||||
|
||||
bool = group.containsOnServer(extra, sub);
|
||||
bool = group.containsOnServer(extra, sub, false);
|
||||
if (!bool) {
|
||||
group.getOrCreateGroupBlacklist(sub, true);
|
||||
group.add(extra, sub);
|
||||
@@ -502,7 +502,7 @@ public class CommandProcess {
|
||||
return;
|
||||
}
|
||||
|
||||
bool = !group.containsOnServer(extra, sub);
|
||||
bool = !group.containsOnServer(extra, sub, false);
|
||||
if (!bool) {
|
||||
group.getOrCreateGroupBlacklist(sub, true);
|
||||
group.remove(extra, sub);
|
||||
|
||||
@@ -87,6 +87,11 @@ public class Group implements Serializable {
|
||||
return (serverGroupBlacklist != null && serverGroupBlacklist.isListed(command, !Storage.ConfigSections.Settings.TURN_BLACKLIST_TO_WHITELIST.ENABLED));
|
||||
}
|
||||
|
||||
public boolean containsOnServer(String command, String server, boolean convert) {
|
||||
GroupBlacklist serverGroupBlacklist = getOrCreateGroupBlacklist(server);
|
||||
return (serverGroupBlacklist != null && serverGroupBlacklist.isListed(command, !Storage.ConfigSections.Settings.TURN_BLACKLIST_TO_WHITELIST.ENABLED, convert));
|
||||
}
|
||||
|
||||
public GroupBlacklist getOrCreateGroupBlacklist(String server) {
|
||||
return getOrCreateGroupBlacklist(server, false);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user