|
@@ -50,51 +50,52 @@ public class CommunityBoard
|
|
|
if (activeChar == null)
|
|
|
return;
|
|
|
|
|
|
- if (Config.COMMUNITY_TYPE.equals("full"))
|
|
|
+ switch (Config.COMMUNITY_TYPE)
|
|
|
{
|
|
|
- if (command.startsWith("_bbsclan"))
|
|
|
- {
|
|
|
- ClanBBSManager.getInstance().parsecmd(command, activeChar);
|
|
|
- }
|
|
|
- else if (command.startsWith("_bbsmemo"))
|
|
|
- {
|
|
|
- TopicBBSManager.getInstance().parsecmd(command, activeChar);
|
|
|
- }
|
|
|
- else if (command.startsWith("_bbstopics"))
|
|
|
- {
|
|
|
- TopicBBSManager.getInstance().parsecmd(command, activeChar);
|
|
|
- }
|
|
|
- else if (command.startsWith("_bbsposts"))
|
|
|
- {
|
|
|
- PostBBSManager.getInstance().parsecmd(command, activeChar);
|
|
|
- }
|
|
|
- else if (command.startsWith("_bbstop"))
|
|
|
- {
|
|
|
- TopBBSManager.getInstance().parsecmd(command, activeChar);
|
|
|
- }
|
|
|
- else if (command.startsWith("_bbshome"))
|
|
|
- {
|
|
|
- TopBBSManager.getInstance().parsecmd(command, activeChar);
|
|
|
- }
|
|
|
- else if (command.startsWith("_bbsloc"))
|
|
|
- {
|
|
|
+ default:
|
|
|
+ case 0: //disabled
|
|
|
+ activeChar.sendPacket(new SystemMessage(SystemMessageId.CB_OFFLINE));
|
|
|
+ break;
|
|
|
+ case 1: // old
|
|
|
RegionBBSManager.getInstance().parsecmd(command, activeChar);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- ShowBoard sb = new ShowBoard("<html><body><br><br><center>the command: " + command + " is not implemented yet</center><br><br></body></html>", "101");
|
|
|
- activeChar.sendPacket(sb);
|
|
|
- activeChar.sendPacket(new ShowBoard(null, "102"));
|
|
|
- activeChar.sendPacket(new ShowBoard(null, "103"));
|
|
|
- }
|
|
|
- }
|
|
|
- else if (Config.COMMUNITY_TYPE.equals("old"))
|
|
|
- {
|
|
|
- RegionBBSManager.getInstance().parsecmd(command, activeChar);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- activeChar.sendPacket(new SystemMessage(SystemMessageId.CB_OFFLINE));
|
|
|
+ break;
|
|
|
+ case 2: // new
|
|
|
+ if (command.startsWith("_bbsclan"))
|
|
|
+ {
|
|
|
+ ClanBBSManager.getInstance().parsecmd(command, activeChar);
|
|
|
+ }
|
|
|
+ else if (command.startsWith("_bbsmemo"))
|
|
|
+ {
|
|
|
+ TopicBBSManager.getInstance().parsecmd(command, activeChar);
|
|
|
+ }
|
|
|
+ else if (command.startsWith("_bbstopics"))
|
|
|
+ {
|
|
|
+ TopicBBSManager.getInstance().parsecmd(command, activeChar);
|
|
|
+ }
|
|
|
+ else if (command.startsWith("_bbsposts"))
|
|
|
+ {
|
|
|
+ PostBBSManager.getInstance().parsecmd(command, activeChar);
|
|
|
+ }
|
|
|
+ else if (command.startsWith("_bbstop"))
|
|
|
+ {
|
|
|
+ TopBBSManager.getInstance().parsecmd(command, activeChar);
|
|
|
+ }
|
|
|
+ else if (command.startsWith("_bbshome"))
|
|
|
+ {
|
|
|
+ TopBBSManager.getInstance().parsecmd(command, activeChar);
|
|
|
+ }
|
|
|
+ else if (command.startsWith("_bbsloc"))
|
|
|
+ {
|
|
|
+ RegionBBSManager.getInstance().parsecmd(command, activeChar);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ShowBoard sb = new ShowBoard("<html><body><br><br><center>the command: " + command + " is not implemented yet</center><br><br></body></html>", "101");
|
|
|
+ activeChar.sendPacket(sb);
|
|
|
+ activeChar.sendPacket(new ShowBoard(null, "102"));
|
|
|
+ activeChar.sendPacket(new ShowBoard(null, "103"));
|
|
|
+ }
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -113,38 +114,39 @@ public class CommunityBoard
|
|
|
if (activeChar == null)
|
|
|
return;
|
|
|
|
|
|
- if (Config.COMMUNITY_TYPE.equals("full"))
|
|
|
+ switch (Config.COMMUNITY_TYPE)
|
|
|
{
|
|
|
- if (url.equals("Topic"))
|
|
|
- {
|
|
|
- TopicBBSManager.getInstance().parsewrite(arg1, arg2, arg3, arg4, arg5, activeChar);
|
|
|
- }
|
|
|
- else if (url.equals("Post"))
|
|
|
- {
|
|
|
- PostBBSManager.getInstance().parsewrite(arg1, arg2, arg3, arg4, arg5, activeChar);
|
|
|
- }
|
|
|
- else if (url.equals("Region"))
|
|
|
- {
|
|
|
+ case 2:
|
|
|
+ if (url.equals("Topic"))
|
|
|
+ {
|
|
|
+ TopicBBSManager.getInstance().parsewrite(arg1, arg2, arg3, arg4, arg5, activeChar);
|
|
|
+ }
|
|
|
+ else if (url.equals("Post"))
|
|
|
+ {
|
|
|
+ PostBBSManager.getInstance().parsewrite(arg1, arg2, arg3, arg4, arg5, activeChar);
|
|
|
+ }
|
|
|
+ else if (url.equals("Region"))
|
|
|
+ {
|
|
|
+ RegionBBSManager.getInstance().parsewrite(arg1, arg2, arg3, arg4, arg5, activeChar);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ShowBoard sb = new ShowBoard("<html><body><br><br><center>the command: " + url + " is not implemented yet</center><br><br></body></html>", "101");
|
|
|
+ activeChar.sendPacket(sb);
|
|
|
+ activeChar.sendPacket(new ShowBoard(null, "102"));
|
|
|
+ activeChar.sendPacket(new ShowBoard(null, "103"));
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
RegionBBSManager.getInstance().parsewrite(arg1, arg2, arg3, arg4, arg5, activeChar);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- ShowBoard sb = new ShowBoard("<html><body><br><br><center>the command: " + url + " is not implemented yet</center><br><br></body></html>", "101");
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ case 0:
|
|
|
+ ShowBoard sb = new ShowBoard("<html><body><br><br><center>The Community board is currently disable</center><br><br></body></html>", "101");
|
|
|
activeChar.sendPacket(sb);
|
|
|
activeChar.sendPacket(new ShowBoard(null, "102"));
|
|
|
activeChar.sendPacket(new ShowBoard(null, "103"));
|
|
|
- }
|
|
|
- }
|
|
|
- else if (Config.COMMUNITY_TYPE.equals("old"))
|
|
|
- {
|
|
|
- RegionBBSManager.getInstance().parsewrite(arg1, arg2, arg3, arg4, arg5, activeChar);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- ShowBoard sb = new ShowBoard("<html><body><br><br><center>The Community board is currently disable</center><br><br></body></html>", "101");
|
|
|
- activeChar.sendPacket(sb);
|
|
|
- activeChar.sendPacket(new ShowBoard(null, "102"));
|
|
|
- activeChar.sendPacket(new ShowBoard(null, "103"));
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
}
|