Fixing changed constructor signatures
This commit is contained in:
@@ -89,7 +89,8 @@ public class ServerBuilder {
|
||||
extract(objectMap, CardSets.class)));
|
||||
|
||||
objectMap.put(ChatServer.class, new ChatServer(
|
||||
extract(objectMap, IgnoreDAO.class)));
|
||||
extract(objectMap, IgnoreDAO.class),
|
||||
extract(objectMap, PlayerDAO.class)));
|
||||
|
||||
objectMap.put(LotroServer.class,
|
||||
new LotroServer(
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.gempukku.lotro.chat;
|
||||
import com.gempukku.lotro.AbstractServer;
|
||||
import com.gempukku.lotro.PrivateInformationException;
|
||||
import com.gempukku.lotro.db.IgnoreDAO;
|
||||
import com.gempukku.lotro.db.PlayerDAO;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -10,14 +11,16 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
public class ChatServer extends AbstractServer {
|
||||
private IgnoreDAO ignoreDAO;
|
||||
private PlayerDAO playerDAO;
|
||||
private Map<String, ChatRoomMediator> _chatRooms = new ConcurrentHashMap<String, ChatRoomMediator>();
|
||||
|
||||
public ChatServer(IgnoreDAO ignoreDAO) {
|
||||
public ChatServer(IgnoreDAO ignoreDAO, PlayerDAO playerDAO) {
|
||||
this.ignoreDAO = ignoreDAO;
|
||||
this.playerDAO = playerDAO;
|
||||
}
|
||||
|
||||
public ChatRoomMediator createChatRoom(String name, boolean muteJoinPartMessages, int secondsTimeoutPeriod, boolean allowIncognito, String welcomeMessage) {
|
||||
ChatRoomMediator chatRoom = new ChatRoomMediator(ignoreDAO, name, muteJoinPartMessages, secondsTimeoutPeriod, allowIncognito, welcomeMessage);
|
||||
ChatRoomMediator chatRoom = new ChatRoomMediator(ignoreDAO, playerDAO, name, muteJoinPartMessages, secondsTimeoutPeriod, allowIncognito, welcomeMessage);
|
||||
try {
|
||||
chatRoom.sendMessage("System", "Welcome to room: " + name, true);
|
||||
} catch (PrivateInformationException exp) {
|
||||
@@ -30,7 +33,7 @@ public class ChatServer extends AbstractServer {
|
||||
}
|
||||
|
||||
public ChatRoomMediator createPrivateChatRoom(String name, boolean muteJoinPartMessages, Set<String> allowedUsers, int secondsTimeoutPeriod) {
|
||||
ChatRoomMediator chatRoom = new ChatRoomMediator(ignoreDAO, name, muteJoinPartMessages, secondsTimeoutPeriod, allowedUsers, false);
|
||||
ChatRoomMediator chatRoom = new ChatRoomMediator(ignoreDAO, playerDAO, name, muteJoinPartMessages, secondsTimeoutPeriod, allowedUsers, false);
|
||||
try {
|
||||
chatRoom.sendMessage("System", "Welcome to private room: " + name, true);
|
||||
} catch (PrivateInformationException exp) {
|
||||
|
||||
Reference in New Issue
Block a user