AdminBBSManager.java 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * This program is free software: you can redistribute it and/or modify it under
  3. * the terms of the GNU General Public License as published by the Free Software
  4. * Foundation, either version 3 of the License, or (at your option) any later
  5. * version.
  6. *
  7. * This program is distributed in the hope that it will be useful, but WITHOUT
  8. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  9. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  10. * details.
  11. *
  12. * You should have received a copy of the GNU General Public License along with
  13. * this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. package net.sf.l2j.gameserver.communitybbs.Manager;
  16. import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  17. import net.sf.l2j.gameserver.network.serverpackets.ShowBoard;
  18. public class AdminBBSManager extends BaseBBSManager
  19. {
  20. private static AdminBBSManager _instance = null;
  21. /**
  22. * @return
  23. */
  24. public static AdminBBSManager getInstance()
  25. {
  26. if (_instance == null)
  27. {
  28. _instance = new AdminBBSManager();
  29. }
  30. return _instance;
  31. }
  32. /**
  33. *
  34. * @see net.sf.l2j.gameserver.communitybbs.Manager.BaseBBSManager#parsecmd(java.lang.String, net.sf.l2j.gameserver.model.actor.instance.L2PcInstance)
  35. */
  36. @Override
  37. public void parsecmd(String command, L2PcInstance activeChar)
  38. {
  39. if (!activeChar.isGM())
  40. {
  41. return;
  42. }
  43. if (command.startsWith("admin_bbs"))
  44. {
  45. separateAndSend("<html><body><br><br><center>This Page is only an exemple :)<br><br>command=" + command + "</center></body></html>", activeChar);
  46. }
  47. else
  48. {
  49. ShowBoard sb = new ShowBoard("<html><body><br><br><center>the command: " + command + " is not implemented yet</center><br><br></body></html>", "101");
  50. activeChar.sendPacket(sb);
  51. activeChar.sendPacket(new ShowBoard(null, "102"));
  52. activeChar.sendPacket(new ShowBoard(null, "103"));
  53. }
  54. }
  55. /**
  56. *
  57. * @see net.sf.l2j.gameserver.communitybbs.Manager.BaseBBSManager#parsewrite(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, net.sf.l2j.gameserver.model.actor.instance.L2PcInstance)
  58. */
  59. @Override
  60. public void parsewrite(String ar1, String ar2, String ar3, String ar4, String ar5, L2PcInstance activeChar)
  61. {
  62. if (!activeChar.isGM())
  63. {
  64. return;
  65. }
  66. }
  67. }