From c286ac8a4bb751306ca8a4b787ed038a480c279c Mon Sep 17 00:00:00 2001
From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com>
Date: Wed, 4 May 2022 22:42:04 +0000
Subject: [PATCH] Removed unused secondary auth files.
---
.../data/xml/SecondaryAuthData.java | 140 --------
.../dist/game/config/SecondaryAuth.xml | 338 ------------------
.../dist/game/data/xsd/SecondaryAuth.xsd | 20 --
.../data/xml/SecondaryAuthData.java | 140 --------
4 files changed, 638 deletions(-)
delete mode 100644 L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/data/xml/SecondaryAuthData.java
delete mode 100644 L2J_Mobius_CT_2.4_Epilogue/dist/game/config/SecondaryAuth.xml
delete mode 100644 L2J_Mobius_CT_2.4_Epilogue/dist/game/data/xsd/SecondaryAuth.xsd
delete mode 100644 L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/data/xml/SecondaryAuthData.java
diff --git a/L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/data/xml/SecondaryAuthData.java b/L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/data/xml/SecondaryAuthData.java
deleted file mode 100644
index e6c3763b89..0000000000
--- a/L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/data/xml/SecondaryAuthData.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.l2jmobius.gameserver.data.xml;
-
-import java.io.File;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.logging.Level;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-import org.l2jmobius.commons.util.IXmlReader;
-
-/**
- * Secondary Auth data.
- * @author NosBit
- */
-public class SecondaryAuthData implements IXmlReader
-{
- private final Set _forbiddenPasswords = new HashSet<>();
- private boolean _enabled = false;
- private int _maxAttempts = 5;
- private int _banTime = 480;
- private String _recoveryLink = "";
-
- protected SecondaryAuthData()
- {
- load();
- }
-
- @Override
- public synchronized void load()
- {
- _forbiddenPasswords.clear();
- parseFile(new File("config/SecondaryAuth.xml"));
- LOGGER.info(getClass().getSimpleName() + ": Loaded " + _forbiddenPasswords.size() + " forbidden passwords.");
- }
-
- @Override
- public void parseDocument(Document doc, File f)
- {
- try
- {
- for (Node node = doc.getFirstChild(); node != null; node = node.getNextSibling())
- {
- if ("list".equalsIgnoreCase(node.getNodeName()))
- {
- for (Node list_node = node.getFirstChild(); list_node != null; list_node = list_node.getNextSibling())
- {
- if ("enabled".equalsIgnoreCase(list_node.getNodeName()))
- {
- _enabled = Boolean.parseBoolean(list_node.getTextContent());
- }
- else if ("maxAttempts".equalsIgnoreCase(list_node.getNodeName()))
- {
- _maxAttempts = Integer.parseInt(list_node.getTextContent());
- }
- else if ("banTime".equalsIgnoreCase(list_node.getNodeName()))
- {
- _banTime = Integer.parseInt(list_node.getTextContent());
- }
- else if ("recoveryLink".equalsIgnoreCase(list_node.getNodeName()))
- {
- _recoveryLink = list_node.getTextContent();
- }
- else if ("forbiddenPasswords".equalsIgnoreCase(list_node.getNodeName()))
- {
- for (Node forbiddenPasswords_node = list_node.getFirstChild(); forbiddenPasswords_node != null; forbiddenPasswords_node = forbiddenPasswords_node.getNextSibling())
- {
- if ("password".equalsIgnoreCase(forbiddenPasswords_node.getNodeName()))
- {
- _forbiddenPasswords.add(forbiddenPasswords_node.getTextContent());
- }
- }
- }
- }
- }
- }
- }
- catch (Exception e)
- {
- LOGGER.log(Level.WARNING, "Failed to load secondary auth data from xml.", e);
- }
- }
-
- public boolean isEnabled()
- {
- return _enabled;
- }
-
- public int getMaxAttempts()
- {
- return _maxAttempts;
- }
-
- public int getBanTime()
- {
- return _banTime;
- }
-
- public String getRecoveryLink()
- {
- return _recoveryLink;
- }
-
- public Set getForbiddenPasswords()
- {
- return _forbiddenPasswords;
- }
-
- public boolean isForbiddenPassword(String password)
- {
- return _forbiddenPasswords.contains(password);
- }
-
- public static SecondaryAuthData getInstance()
- {
- return SingletonHolder.INSTANCE;
- }
-
- private static class SingletonHolder
- {
- protected static final SecondaryAuthData INSTANCE = new SecondaryAuthData();
- }
-}
diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/game/config/SecondaryAuth.xml b/L2J_Mobius_CT_2.4_Epilogue/dist/game/config/SecondaryAuth.xml
deleted file mode 100644
index a8a103493a..0000000000
--- a/L2J_Mobius_CT_2.4_Epilogue/dist/game/config/SecondaryAuth.xml
+++ /dev/null
@@ -1,338 +0,0 @@
-
-
- false
- 5
- 480
- http://www.google.com
-
-
- 000000
- 111111
- 222222
- 333333
- 444444
- 555555
- 666666
- 777777
- 888888
- 999999
- 123456
- 234567
- 345678
- 456789
- 567890
- 012345
- 098765
- 987654
- 876543
- 765432
- 543210
- 010101
- 020202
- 030303
- 040404
- 050505
- 060606
- 070707
- 080808
- 090909
- 121212
- 131313
- 141414
- 151515
- 161616
- 171717
- 181818
- 191919
- 101010
- 212121
- 232323
- 242424
- 252525
- 262626
- 272727
- 282828
- 292929
- 202020
- 313131
- 323232
- 343434
- 353535
- 363636
- 373737
- 383838
- 393939
- 303030
- 404040
- 414141
- 424242
- 434343
- 454545
- 464646
- 474747
- 484848
- 494949
- 505050
- 515151
- 525252
- 535353
- 545454
- 565656
- 575757
- 585858
- 595959
- 606060
- 616161
- 626262
- 636363
- 646464
- 656565
- 676767
- 686868
- 696969
- 707070
- 717171
- 727272
- 737373
- 747474
- 757575
- 767676
- 787878
- 797979
- 808080
- 818181
- 828282
- 838383
- 848484
- 858585
- 868686
- 878787
- 898989
- 909090
- 919191
- 929292
- 939393
- 949494
- 959595
- 969696
- 979797
- 989898
- 0000000
- 1111111
- 2222222
- 3333333
- 4444444
- 5555555
- 6666666
- 7777777
- 8888888
- 9999999
- 0123456
- 1234567
- 2345678
- 3456789
- 4567890
- 0987654
- 9876543
- 8765432
- 7654321
- 6543210
- 0101010
- 0202020
- 0303030
- 0404040
- 0505050
- 0606060
- 0707070
- 0808080
- 0909090
- 1212121
- 1313131
- 1414141
- 1515151
- 1616161
- 1717171
- 1818181
- 1919191
- 1010101
- 2020202
- 2121212
- 2323232
- 2424242
- 2525252
- 2626262
- 2727272
- 2828282
- 2929292
- 3030303
- 3131313
- 3232323
- 3434343
- 3535353
- 3636363
- 3737373
- 3838383
- 3939393
- 4040404
- 4141414
- 4242424
- 4343434
- 4545454
- 4646464
- 4747474
- 4848484
- 4949494
- 5050505
- 5151515
- 5252525
- 5353535
- 5454545
- 5656565
- 5757575
- 5858585
- 5959595
- 6060606
- 6161616
- 6262626
- 6363636
- 6464646
- 6565656
- 6767676
- 6868686
- 6969696
- 7070707
- 7171717
- 7272727
- 7373737
- 7474747
- 7575757
- 7676767
- 7878787
- 7979797
- 8080808
- 8181818
- 8282828
- 8383838
- 8484848
- 8585858
- 8686868
- 8787878
- 8989898
- 9090909
- 9191919
- 9292929
- 9393939
- 9494949
- 9595959
- 9696969
- 9797979
- 9898989
- 00000000
- 11111111
- 22222222
- 33333333
- 44444444
- 55555555
- 66666666
- 77777777
- 88888888
- 99999999
- 12345678
- 23456789
- 34567890
- 01234567
- 98765432
- 87654321
- 76543210
- 01010101
- 02020202
- 03030303
- 04040404
- 05050505
- 06060606
- 07070707
- 08080808
- 09090909
- 10101010
- 12121212
- 13131313
- 14141414
- 15151515
- 16161616
- 17171717
- 18181818
- 19191919
- 20202020
- 21212121
- 23232323
- 24242424
- 25252525
- 26262626
- 27272727
- 28282828
- 29292929
- 30303030
- 31313131
- 32323232
- 34343434
- 35353535
- 36363636
- 37373737
- 38383838
- 39393939
- 40404040
- 41414141
- 42424242
- 43434343
- 45454545
- 46464646
- 47474747
- 48484848
- 49494949
- 50505050
- 51515151
- 52525252
- 53535353
- 54545454
- 56565656
- 57575757
- 58585858
- 59595959
- 60606060
- 61616161
- 62626262
- 63636363
- 64646464
- 65656565
- 67676767
- 68686868
- 69696969
- 70707070
- 71717171
- 72727272
- 73737373
- 74747474
- 75757575
- 76767676
- 78787878
- 79797979
- 80808080
- 81818181
- 82828282
- 83838383
- 84848484
- 85858585
- 86868686
- 87878787
- 89898989
- 90909090
- 91919191
- 92929292
- 93939393
- 94949494
- 95959595
- 96969696
- 97979797
- 98989898
-
-
\ No newline at end of file
diff --git a/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/xsd/SecondaryAuth.xsd b/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/xsd/SecondaryAuth.xsd
deleted file mode 100644
index 205c8749db..0000000000
--- a/L2J_Mobius_CT_2.4_Epilogue/dist/game/data/xsd/SecondaryAuth.xsd
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/data/xml/SecondaryAuthData.java b/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/data/xml/SecondaryAuthData.java
deleted file mode 100644
index e6c3763b89..0000000000
--- a/L2J_Mobius_CT_2.4_Epilogue/java/org/l2jmobius/gameserver/data/xml/SecondaryAuthData.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * This file is part of the L2J Mobius project.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-package org.l2jmobius.gameserver.data.xml;
-
-import java.io.File;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.logging.Level;
-
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-import org.l2jmobius.commons.util.IXmlReader;
-
-/**
- * Secondary Auth data.
- * @author NosBit
- */
-public class SecondaryAuthData implements IXmlReader
-{
- private final Set _forbiddenPasswords = new HashSet<>();
- private boolean _enabled = false;
- private int _maxAttempts = 5;
- private int _banTime = 480;
- private String _recoveryLink = "";
-
- protected SecondaryAuthData()
- {
- load();
- }
-
- @Override
- public synchronized void load()
- {
- _forbiddenPasswords.clear();
- parseFile(new File("config/SecondaryAuth.xml"));
- LOGGER.info(getClass().getSimpleName() + ": Loaded " + _forbiddenPasswords.size() + " forbidden passwords.");
- }
-
- @Override
- public void parseDocument(Document doc, File f)
- {
- try
- {
- for (Node node = doc.getFirstChild(); node != null; node = node.getNextSibling())
- {
- if ("list".equalsIgnoreCase(node.getNodeName()))
- {
- for (Node list_node = node.getFirstChild(); list_node != null; list_node = list_node.getNextSibling())
- {
- if ("enabled".equalsIgnoreCase(list_node.getNodeName()))
- {
- _enabled = Boolean.parseBoolean(list_node.getTextContent());
- }
- else if ("maxAttempts".equalsIgnoreCase(list_node.getNodeName()))
- {
- _maxAttempts = Integer.parseInt(list_node.getTextContent());
- }
- else if ("banTime".equalsIgnoreCase(list_node.getNodeName()))
- {
- _banTime = Integer.parseInt(list_node.getTextContent());
- }
- else if ("recoveryLink".equalsIgnoreCase(list_node.getNodeName()))
- {
- _recoveryLink = list_node.getTextContent();
- }
- else if ("forbiddenPasswords".equalsIgnoreCase(list_node.getNodeName()))
- {
- for (Node forbiddenPasswords_node = list_node.getFirstChild(); forbiddenPasswords_node != null; forbiddenPasswords_node = forbiddenPasswords_node.getNextSibling())
- {
- if ("password".equalsIgnoreCase(forbiddenPasswords_node.getNodeName()))
- {
- _forbiddenPasswords.add(forbiddenPasswords_node.getTextContent());
- }
- }
- }
- }
- }
- }
- }
- catch (Exception e)
- {
- LOGGER.log(Level.WARNING, "Failed to load secondary auth data from xml.", e);
- }
- }
-
- public boolean isEnabled()
- {
- return _enabled;
- }
-
- public int getMaxAttempts()
- {
- return _maxAttempts;
- }
-
- public int getBanTime()
- {
- return _banTime;
- }
-
- public String getRecoveryLink()
- {
- return _recoveryLink;
- }
-
- public Set getForbiddenPasswords()
- {
- return _forbiddenPasswords;
- }
-
- public boolean isForbiddenPassword(String password)
- {
- return _forbiddenPasswords.contains(password);
- }
-
- public static SecondaryAuthData getInstance()
- {
- return SingletonHolder.INSTANCE;
- }
-
- private static class SingletonHolder
- {
- protected static final SecondaryAuthData INSTANCE = new SecondaryAuthData();
- }
-}