diff --git a/assets/config.csv b/assets/config.csv index 7007008..bdc348e 100644 --- a/assets/config.csv +++ b/assets/config.csv @@ -191,6 +191,7 @@ "Localized Strings","MusicInfo","" "Localized Strings","MusicVolChanged","Volume set to %s!" "Localized Strings","MusicVolCurrent","Volume is at %s!" +"Localized Strings","MusicVolOOB","" "Localized Strings","PerishInfo","Adds a red, 'a n g e r y' overlay to your icon or the icon of a friend you mentioned" "Localized Strings","PingInfo","Will respond with Pong!" "Localized Strings","PingResponse","Pong!" diff --git a/src/commands/general/CommandE6.java b/src/commands/general/CommandE6.java index cf31858..cfd5551 100644 --- a/src/commands/general/CommandE6.java +++ b/src/commands/general/CommandE6.java @@ -24,13 +24,8 @@ public class CommandE6 extends Command @Override public void onRun(KittyGuild guild, KittyChannel channel, KittyUser user, UserInput input, Response res) { - if(guild.contentRating == KittyRating.Filtered || !guild.channels.get(Long.getLong(channel.uniqueID)).mature) + if(guild.contentRating == KittyRating.Filtered) { - if(!guild.channels.get(Long.getLong(channel.uniqueID)).mature) - { - res.send("This channel is SFW only! Have some (probably) wholesome content ^^~"); - } - image = searcher.getE6(input.args + " rating:safe"); try { @@ -43,7 +38,7 @@ public class CommandE6 extends Command } try { - if(response.authorText == null) + if(response.bodyImageURL == null) { Exception e = new Exception(); throw e; diff --git a/src/network/NetworkE6.java b/src/network/NetworkE6.java index da8ebfa..1c65259 100644 --- a/src/network/NetworkE6.java +++ b/src/network/NetworkE6.java @@ -77,15 +77,20 @@ public class NetworkE6 } else { + for(int i = 0; i < imageObj.length; ++i) { + String [] TagsList = imageObj[i].tags.split(" "); blacklisted = false; for(int j = 0; j < blacklist.length; j++) { - if(imageObj[i].tags.contains(blacklist[j])) + for(int k = 0; k < TagsList.length; k ++) { - System.out.println("BLACKLISTED " + blacklist[j]); - blacklisted = true; + if(TagsList[k].equals(blacklist[j])) + { + System.out.println("BLACKLISTED " + blacklist[j]); + blacklisted = true; + } } } diff --git a/src/network/NetworkSauceNAO.java b/src/network/NetworkSauceNAO.java index 11504cc..38e6408 100644 --- a/src/network/NetworkSauceNAO.java +++ b/src/network/NetworkSauceNAO.java @@ -10,7 +10,7 @@ import utils.HTTPUtils; public class NetworkSauceNAO { private static final Gson jsonParser_ = new Gson(); - private static final String API_ROOT = "https://saucenao.com/search.php?db=999&output_type=2&numres=10&api_key=" + Ref.SauceNAOKey +"&url="; + private static final String API_ROOT = "https://saucenao.com/search.php?dbmask=268435456&output_type=2&numres=10&api_key=" + Ref.SauceNAOKey +"&url="; NetworkE6 e6Sauce = new NetworkE6(); private class SauceNAOResponseObject { @@ -40,6 +40,7 @@ public class NetworkSauceNAO if(sauceUrl.startsWith("https://e621.net/post/show/")) { System.out.println("id:" + sauceUrl.substring(26)); + System.out.println("HERE"); return e6Sauce.getE6("id:" + sauceUrl.substring(27)).toString(); } return sauce.results.get(0).data.ext_urls[0];