Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
215068ee7a
|
@ -29,8 +29,7 @@ public class GmService implements RPCRequestGMIFace.Iface {
|
|||
|
||||
@Override
|
||||
public Result idipGm(String reserved, String cmd) throws InvalidOperException, TException {
|
||||
// System.out.print("gm________________________"+cmd);
|
||||
|
||||
LOGGER.info("gm________________________"+cmd);
|
||||
Result result = new Result();
|
||||
result.setResultCode(-1);
|
||||
String[] arg = cmd.split(" ");
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
package com.ljsd.jieling.kefu;
|
||||
|
||||
import com.ljsd.jieling.db.redis.RedisKey;
|
||||
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||
import com.ljsd.jieling.network.server.ProtocolsManager;
|
||||
|
||||
public class Cmd_addblack extends GmAbstract {
|
||||
|
||||
@Override
|
||||
public boolean exec(String[] args) throws Exception {
|
||||
if (args.length != 1) {
|
||||
return false;
|
||||
}
|
||||
String uid = args[0];
|
||||
RedisUtil.getInstence().putMapEntry(RedisKey.FORBID_LOGIN, "",uid,0);
|
||||
ProtocolsManager.getInstance().minuteCheckForbidUser();
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package com.ljsd.jieling.kefu;
|
||||
|
||||
import com.ljsd.jieling.config.SErrorCodeEerverConfig;
|
||||
import com.ljsd.jieling.config.SGameSetting;
|
||||
import com.ljsd.jieling.dataReport.reportBeans_37.ChatContentType;
|
||||
import com.ljsd.jieling.dataReport.reportBeans_37.Repot37EventUtil;
|
||||
|
@ -9,10 +10,12 @@ import com.ljsd.jieling.globals.BIReason;
|
|||
import com.ljsd.jieling.globals.Global;
|
||||
import com.ljsd.jieling.logic.dao.PlayerManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.mail.MailLogic;
|
||||
import com.ljsd.jieling.logic.player.PlayerLogic;
|
||||
import com.ljsd.jieling.util.EmojiUtil;
|
||||
import com.ljsd.jieling.util.ItemUtil;
|
||||
import com.ljsd.jieling.util.ShieldedWordUtils;
|
||||
import com.ljsd.jieling.util.TimeUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
@ -76,6 +79,16 @@ public class Cmd_changename extends GmRoleAbstract {
|
|||
itemMap.put( Global.CHANGENAME,1);
|
||||
ItemUtil.addItem(user,itemMap,null, BIReason.GM_CHANGENAME);
|
||||
|
||||
//sendmail
|
||||
String title = SErrorCodeEerverConfig.getI18NMessage("change_name_title");
|
||||
String content = SErrorCodeEerverConfig.getI18NMessage("change_name_txt");
|
||||
|
||||
int[][] values=new int[1][2];
|
||||
values[0][0]= Global.CHANGENAME;
|
||||
values[0][1]=1;
|
||||
String mailReward = ItemUtil.getMailReward(values);
|
||||
int nowTime = (int) (TimeUtils.now() / 1000);
|
||||
MailLogic.getInstance().sendMail(user.getId(), title, content, mailReward, nowTime, Global.MAIL_EFFECTIVE_TIME);
|
||||
return true;
|
||||
|
||||
}
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
package com.ljsd.jieling.kefu;
|
||||
|
||||
import com.ljsd.jieling.netty.handler.GameMessageHandler;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import com.ljsd.jieling.network.server.ProtocolsManager;
|
||||
|
||||
public class Cmd_kick extends GmRoleAbstract{
|
||||
public class Cmd_kick extends GmGlobleAbstract {
|
||||
|
||||
@Override
|
||||
public boolean exec(String[] args) throws Exception {
|
||||
ISession session = (ISession) GameMessageHandler.currentSessions.get(getUser().getId());
|
||||
if (null!=session){
|
||||
// kickOldUser(iSession.getUid(), "", 000, "LOSE HEART PACKET!!!!", 0);
|
||||
}
|
||||
|
||||
ProtocolsManager instance = ProtocolsManager.getInstance();
|
||||
instance.kickOldUser(getUser().getId(), "", 000, "LOSE HEART PACKET!!!!", 0);
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
package com.ljsd.jieling.kefu;
|
||||
|
||||
import com.ljsd.jieling.db.redis.RedisKey;
|
||||
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||
import com.ljsd.jieling.network.server.ProtocolsManager;
|
||||
|
||||
public class Cmd_reblack extends GmAbstract {
|
||||
|
||||
@Override
|
||||
public boolean exec(String[] args) throws Exception {
|
||||
if (args.length != 1) {
|
||||
return false;
|
||||
}
|
||||
String uid = args[0];
|
||||
RedisUtil.getInstence().removeMapEntrys(RedisKey.FORBID_LOGIN, "", uid);
|
||||
ProtocolsManager.getInstance().minuteCheckForbidUser();
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -476,6 +476,7 @@ public class ProtocolsManager implements ProtocolsAbstract {
|
|||
RedisUtil redisUtil = RedisUtil.getInstence();
|
||||
String key = RedisKey.getKey(RedisKey.FORBID_LOGIN, "", false);
|
||||
if(!redisUtil.hasKey(key)){
|
||||
forbidLogin.clear();
|
||||
return;
|
||||
}
|
||||
Map<Integer, Integer> forbidMap = redisUtil.getMapValues(RedisKey.FORBID_LOGIN, "", Integer.class, Integer.class);
|
||||
|
|
Loading…
Reference in New Issue