// Source File Name: CommunityBoard.java
package com.l2jfrozen.gameserver.communitybbs;
import com.l2jfrozen.Config;
import com.l2jfrozen.gameserver.communitybbs.Manager.BaseBBSManager;
import com.l2jfrozen.gameserver.communitybbs.Manager.BuffBBSManager;
import com.l2jfrozen.gameserver.communitybbs.Manager.ClanBBSManager;
import com.l2jfrozen.gameserver.communitybbs.Manager.FriendsBBSManager;
import com.l2jfrozen.gameserver.communitybbs.Manager.MailBBSManager;
import com.l2jfrozen.gameserver.communitybbs.Manager.PostBBSManager;
import com.l2jfrozen.gameserver.communitybbs.Manager.RegionBBSManager;
import com.l2jfrozen.gameserver.communitybbs.Manager.RepairBBSManager;
import com.l2jfrozen.gameserver.communitybbs.Manager.TeleBBSManager;
import com.l2jfrozen.gameserver.communitybbs.Manager.TopBBSManager;
import com.l2jfrozen.gameserver.communitybbs.Manager.TopicBBSManager;
import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
import com.l2jfrozen.gameserver.network.L2GameClient;
import com.l2jfrozen.gameserver.network.SystemMessageId;
public class CommunityBoard
{
private static class SingletonHolder
{
protected static final CommunityBoard _instance = new CommunityBoard();
private SingletonHolder()
{
}
}
protected CommunityBoard()
{
}
public static CommunityBoard getInstance()
{
return SingletonHolder._instance;
}
public void handleCommands(L2GameClient client, String command)
{
L2PcInstance activeChar = client.getActiveChar();
if(activeChar == null)
return;
if(!Config.ENABLE_COMMUNITY_BOARD)
{
activeChar.sendPacket(SystemMessageId.CB_OFFLINE);
return;
}
if(command.startsWith("_bbshome"))
TopBBSManager.getInstance().parseCmd(command, activeChar);
else
if(command.startsWith("_bbsloc"))
RegionBBSManager.getInstance().parseCmd(command, activeChar);
else
if(command.startsWith("_bbsclan"))
ClanBBSManager.getInstance().parseCmd(command, activeChar);
else
if(command.startsWith("_bbsmemo"))
TopicBBSManager.getInstance().parseCmd(command, activeChar);
else
if(command.startsWith("_maillist_0_1_0_"))
MailBBSManager.getInstance().parseCmd(command, activeChar);
else
if(command.startsWith("_friend") || command.startsWith("_block"))
FriendsBBSManager.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("_bbstele"))
TeleBBSManager.getInstance().parseCmd(command, activeChar);
else
if(command.startsWith("_bbsbuff"))
BuffBBSManager.getInstance().parseCmd(command, activeChar);
else
if(command.startsWith("_bbsrepair"))
RepairBBSManager.getInstance().parseCmd(command, activeChar);
else
BaseBBSManager.separateAndSend((new StringBuilder()).append("<html><body><br><br><center>The command: ").append(command).append(" isn't implemented.</center></body></html>").toString(), activeChar);
}
public void handleWriteCommands(L2GameClient client, String url, String arg1, String arg2, String arg3, String arg4, String arg5)
{
L2PcInstance activeChar = client.getActiveChar();
if(activeChar == null)
return;
if(!Config.ENABLE_COMMUNITY_BOARD)
{
activeChar.sendPacket(SystemMessageId.CB_OFFLINE);
return;
}
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
if(url.equals("Notice"))
ClanBBSManager.getInstance().parseWrite(arg1, arg2, arg3, arg4, arg5, activeChar);
else
if(url.equals("Mail"))
MailBBSManager.getInstance().parseWrite(arg1, arg2, arg3, arg4, arg5, activeChar);
else
BaseBBSManager.separateAndSend((new StringBuilder()).append("<html><body><br><br><center>The command: ").append(url).append(" isn't implemented.</center></body></html>").toString(), activeChar);
}
}
// Source File Name: CommunityBoard.java
package com.l2jfrozen.gameserver.communitybbs;
// Referenced classes of package com.l2jfrozen.gameserver.communitybbs:
// CommunityBoard
private static class CommunityBoard$SingletonHolder
{
protected static final CommunityBoard _instance = new CommunityBoard();
private CommunityBoard$SingletonHolder()
{
}
}
i have this code for Community Board but i dont know adapted : https://mega.nz/#!QRwzXRYK
Key:
!9ymvkLtzucGflvi3uhD5FxW_SMupwV7UHSjUEDPS14g
Mirror: http://www.megafileupload.com/k5cg/Community_Board_by____________For_Interlude.rar