cmd cleanup

This commit is contained in:
clienthax 2021-08-21 18:12:42 +01:00
parent cdfa005d35
commit 015c90eb70
2 changed files with 1 additions and 14 deletions

View file

@ -23,19 +23,6 @@ public class CmdCtc {
m.invoke(StoreStream.getUserSettings(), enabled); m.invoke(StoreStream.getUserSettings(), enabled);
} catch (Exception e) { } catch (Exception e) {
System.out.println("Failed to call StoreStream.getUserSettings().setLeakChannels"); System.out.println("Failed to call StoreStream.getUserSettings().setLeakChannels");
System.out.println("Declared");
for (Method m : StoreStream.getUserSettings().getClass().getDeclaredMethods()) {
System.out.println(m.getName()+" "+ m.toString());
}
System.out.println();
System.out.println("Methods");
for (Method m : StoreStream.getUserSettings().getClass().getMethods()) {
System.out.println(m.getName()+" "+ m.toString());
}
e.printStackTrace();
return "Failed to call StoreStream.getUserSettings().setLeakChannels"; return "Failed to call StoreStream.getUserSettings().setLeakChannels";
} }
return "CTC: Successfully set channelleak state."; // TODO use notification return "CTC: Successfully set channelleak state."; // TODO use notification

View file

@ -13,7 +13,7 @@ public class CmdSpoilerImg implements RawMsgHandler {
try { try {
// Added by Supplemental patch // Added by Supplemental patch
//noinspection JavaReflectionMemberAccess //noinspection JavaReflectionMemberAccess
final Method m = StoreStream.getUserSettings().getClass().getDeclaredMethod("setImageSpoiler", Boolean.class); final Method m = StoreStream.getUserSettings().getClass().getDeclaredMethod("setImageSpoiler", boolean.class);
m.invoke(StoreStream.getUserSettings(), true); m.invoke(StoreStream.getUserSettings(), true);
} catch (Exception e) { } catch (Exception e) {
System.out.println("Failed to call StoreStream.getUserSettings().setImageSpoiler(true)"); System.out.println("Failed to call StoreStream.getUserSettings().setImageSpoiler(true)");