|
|
@@ -229,14 +229,10 @@ class Events
|
|
|
//将某个客服踢下线 (只能是管理员连上来的socket才可以操作)
|
|
|
public static function tickkf($client_id, $messag)
|
|
|
{
|
|
|
- if (!self::isAdmin($client_id)) {
|
|
|
- // return false;
|
|
|
- }
|
|
|
+
|
|
|
$kfuid = self::getkfuid($messag['kfuid']);
|
|
|
$kfdatas = json_decode(self::$redis->hget(self::KFINFOKEY, $kfuid), true);
|
|
|
|
|
|
- print_r([$messag,$kfuid,$kfdatas]);
|
|
|
-
|
|
|
if (!$kfdatas) {
|
|
|
return false;
|
|
|
}
|
|
|
@@ -248,8 +244,9 @@ class Events
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- $client_id = $kfdatas['client_id'];
|
|
|
- Gateway::closeClient($client_id);
|
|
|
+ $client_kfid = $kfdatas['client_id'];
|
|
|
+ Gateway::sendToClient($client_kfid, (json_encode(['message_type' => 'reLoginErr', 'msg' => '和户状态改变,本次下线'], 256)));
|
|
|
+ Gateway::closeClient($client_kfid);
|
|
|
return true;
|
|
|
}
|
|
|
|