Bladeren bron

关闭昵称重复检查

王刚 3 jaren geleden
bovenliggende
commit
172a165611
2 gewijzigde bestanden met toevoegingen van 34 en 9 verwijderingen
  1. 5 4
      Gameserver/Amfphp/process/UserProc.php
  2. 29 5
      Gameserver/Amfphp/test.php

+ 5 - 4
Gameserver/Amfphp/process/UserProc.php

@@ -387,16 +387,16 @@ class UserProc {
             );
             return Resp::ok($ret);
         } else {                                                                # 2.如果玩家已存在,则处理普通登录流程
-            if($game->store->storage ==null){
+            if ($game->store->storage == null) {
                 $key = 1;
                 $key2 = 2;
-               
+
                 $game->store->storage = ObjectInit();
                 $game->store->storage->$key = new Ins_storage();
                 $game->store->storage->$key2 = new Ins_storage();
             }
-            
-            
+
+
             req()->game = $game;                                                # 给Req挂载玩家数据
             UserProc::checkContidays();                                         # 连续登录,状态检查
             PayProc::m_refreshChargeOrders();                                   # 刷新订单, 多平台版本
@@ -436,6 +436,7 @@ class UserProc {
      * @return boolean
      */
     static function checkRoleNameNotExist($roleName) {
+        return false;
         static $sqlFormat = "SELECT count(*) as rows FROM `tab_rolename` WHERE roleName='%s';";
         $sql = sprintf($sqlFormat, $roleName);
         $n = daoInst()->query($sql)->fetch();

+ 29 - 5
Gameserver/Amfphp/test.php

@@ -14,10 +14,34 @@ echoLine("tsDay:" . totalDays());
 //set_time_limit(15);                                                           # 设置执行超时时间
 //
 
-$arr = [1 => "山楂", 5 => "芍药", 3 => "陈皮", 7 => "鸡内金"];
 
-uksort($arr, function ($a, $b) {
-    return intval($a) - intval($b);
-});
 
-var_dump($arr);
+$url = 'https://fancyssl.hboeck.de/';
+
+$protocols = [
+    'TLS1.0' => ['protocol' => CURL_SSLVERSION_TLSv1_0, 'sec' => false],
+    'TLS1.1' => ['protocol' => CURL_SSLVERSION_TLSv1_1, 'sec' => false],
+    'TLS1.2' => ['protocol' => CURL_SSLVERSION_TLSv1_2, 'sec' => true],
+    'TLS1.3' => ['protocol' => CURL_SSLVERSION_TLSv1_3, 'sec' => true],
+];
+
+foreach ($protocols as $name => $value) {
+    $ch = curl_init();
+    curl_setopt($ch, CURLOPT_URL, $url);
+    curl_setopt($ch, CURLOPT_SSLVERSION, $value['protocol']);
+    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+    $response = curl_exec($ch) !== false;
+
+    if ($value['sec'] && !$response) {
+        echo "Secure $name not supported =( \n";
+    } elseif ($value['sec'] && $response) {
+        echo "Ok! Secure $name supported \n";
+    } elseif (!$value['sec'] && $response) {
+        echo "OK! Insecure $name supported =( \n";
+    } elseif (!$value['sec'] && !$response) {
+        echo "Insecure $name not supported\n";
+    }
+}
+
+
+