forked from External/mage
Changes to logging an chat session handling.
This commit is contained in:
parent
fc382740ce
commit
020daf94f5
12 changed files with 72 additions and 33 deletions
|
|
@ -55,8 +55,8 @@ public class ChatManager {
|
|||
|
||||
private final ConcurrentHashMap<UUID, ChatSession> chatSessions = new ConcurrentHashMap<>();
|
||||
|
||||
public UUID createChatSession() {
|
||||
ChatSession chatSession = new ChatSession();
|
||||
public UUID createChatSession(String info) {
|
||||
ChatSession chatSession = new ChatSession(info);
|
||||
chatSessions.put(chatSession.getChatId(), chatSession);
|
||||
return chatSession.getChatId();
|
||||
}
|
||||
|
|
@ -120,8 +120,8 @@ public class ChatManager {
|
|||
chatSessions.get(chatId).broadcastInfoToUser(user,message);
|
||||
return true;
|
||||
}
|
||||
if (command.startsWith("\\W ") || command.startsWith("\\WHISPER ")) {
|
||||
String rest = message.substring(command.startsWith("\\W ") ? 3 : 9);
|
||||
if (command.startsWith("\\W ") || command.startsWith("\\WHISPER ") || command.startsWith("/W ") || command.startsWith("/WHISPER ")) {
|
||||
String rest = message.substring(command.startsWith("\\W ") || command.startsWith("/W ")? 3 : 9);
|
||||
int first = rest.indexOf(" ");
|
||||
if (first > 1) {
|
||||
String userToName = rest.substring(0,first);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue