AdminBBSManager.java 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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.Config;
  17. import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
  18. import net.sf.l2j.gameserver.serverpackets.ShowBoard;
  19. public class AdminBBSManager extends BaseBBSManager
  20. {
  21. private static AdminBBSManager _instance = null;
  22. /**
  23. * @return
  24. */
  25. public static AdminBBSManager getInstance()
  26. {
  27. if(_instance == null)
  28. {
  29. _instance = new AdminBBSManager();
  30. }
  31. return _instance;
  32. }
  33. /* (non-Javadoc)
  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.getAccessLevel() < Config.GM_ACCESSLEVEL)
  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. * @param activeChar
  57. * @param file
  58. */
  59. /* (non-Javadoc)
  60. * @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)
  61. */
  62. @Override
  63. public void parsewrite(String ar1, String ar2, String ar3, String ar4, String ar5, L2PcInstance activeChar)
  64. {
  65. if(activeChar.getAccessLevel() < Config.GM_ACCESSLEVEL)
  66. {
  67. return;
  68. }
  69. }
  70. }