-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new function: - Daemon thread. No longer worry about server crashes caused by strange bugs - Online user list query - Channel list query (show whether it is a public channel) - Active logout - Actively exit the channel - Start the logo repair: - Fixed the abnormal exit of the channel maintenance thread that may be triggered when users log out after joining a channel optimization: - Cancel POST URL parameters, all POST method parameters are obtained from the request body now - The request to send information to the channel no longer needs a ticket - Several performance optimizations
- Loading branch information
1 parent
f1d1e24
commit 3cfc30c
Showing
16 changed files
with
417 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 0 additions & 34 deletions
34
src/main/java/cn/CSUOSA/ChattingRoomServer/Channel/ChannelChecker.java
This file was deleted.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
src/main/java/cn/CSUOSA/ChattingRoomServer/Channel/ChannelCleaner.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package cn.CSUOSA.ChattingRoomServer.Channel; | ||
|
||
import cn.CSUOSA.ChattingRoomServer.Main; | ||
import cn.CSUOSA.ChattingRoomServer.OverWriteMethod.Out; | ||
import cn.CSUOSA.ChattingRoomServer.User.UserInfo; | ||
|
||
public class ChannelCleaner implements Runnable | ||
{ | ||
@Override | ||
public void run() | ||
{ | ||
if (!Main.ChannelList.isEmpty()) | ||
{ | ||
Main.ChannelList.forEach((chaName, chaInfo) -> { | ||
for (UserInfo nowMember : chaInfo.getMembers()) | ||
if (!Main.UserList.containsKey(nowMember.getNick())) | ||
{ | ||
Out.Info("User [" + nowMember.getNick() + "] left channel [" + chaName + "]"); | ||
chaInfo.removeMember(nowMember); | ||
if (chaInfo.getMembers().isEmpty()) | ||
break; | ||
} | ||
if (chaInfo.getMembers().isEmpty() && chaInfo.getAutoClose()) | ||
{ | ||
Main.ChannelList.remove(chaName); | ||
Out.Info("Channel [" + chaName + "] Closed"); | ||
} | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/main/java/cn/CSUOSA/ChattingRoomServer/ConsoleController/CommandCompleter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package cn.CSUOSA.ChattingRoomServer.ConsoleController; | ||
|
||
import org.jline.reader.Candidate; | ||
import org.jline.reader.Completer; | ||
import org.jline.reader.LineReader; | ||
import org.jline.reader.ParsedLine; | ||
|
||
import java.util.List; | ||
|
||
public class CommandCompleter implements Completer | ||
{ | ||
|
||
@Override | ||
public void complete(LineReader lineReader, ParsedLine parsedLine, List<Candidate> list) | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.