|
...
|
...
|
@@ -7,10 +7,12 @@ import com.crossoverjie.cim.client.service.RouteRequest; |
|
|
|
import com.crossoverjie.cim.client.util.SpringBeanFactory;
|
|
|
|
import com.crossoverjie.cim.client.vo.req.GroupReqVO;
|
|
|
|
import com.crossoverjie.cim.client.vo.req.P2PReqVO;
|
|
|
|
import com.crossoverjie.cim.common.enums.SystemCommandEnumType;
|
|
|
|
import com.crossoverjie.cim.common.util.StringUtil;
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Scanner;
|
|
|
|
|
|
|
|
/**
|
|
...
|
...
|
@@ -49,6 +51,12 @@ public class Scan implements Runnable { |
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
//系统内置命令
|
|
|
|
if (msg.startsWith(":")){
|
|
|
|
innerCommand(msg);
|
|
|
|
continue ;
|
|
|
|
}
|
|
|
|
|
|
|
|
//单聊
|
|
|
|
totalMsg = msg.split("><");
|
|
|
|
if (totalMsg.length > 1) {
|
|
...
|
...
|
@@ -64,6 +72,28 @@ public class Scan implements Runnable { |
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 处理内置函数
|
|
|
|
*/
|
|
|
|
private void innerCommand(String msg) {
|
|
|
|
Map<String, String> allStatusCode = SystemCommandEnumType.getAllStatusCode();
|
|
|
|
|
|
|
|
if (SystemCommandEnumType.QUIT.getCommandType().equals(msg)){
|
|
|
|
LOGGER.info("系统关闭中。。。。");
|
|
|
|
System.exit(0);
|
|
|
|
}else {
|
|
|
|
LOGGER.warn("====================================");
|
|
|
|
for (Map.Entry<String, String> stringStringEntry : allStatusCode.entrySet()) {
|
|
|
|
String key = stringStringEntry.getKey();
|
|
|
|
String value = stringStringEntry.getValue();
|
|
|
|
LOGGER.warn(key + "----->" + value);
|
|
|
|
}
|
|
|
|
LOGGER.warn("====================================");
|
|
|
|
}
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
private void p2pChat(String[] totalMsg) {
|
|
|
|
P2PReqVO p2PReqVO = new P2PReqVO();
|
|
|
|
p2PReqVO.setUserId(configuration.getUserId());
|
...
|
...
|
|