我也遇到了這個問題,我是替換了原有的檢測使saac可以通用
首先,打開\saac\include\version.h,找到#define _VIP,將其註釋掉
//#define _VIP //會員版本認證
然後,打開\saac\main.c,找到gmsv gs[MAXCONNECTION];,將其後跟著的#ifdef _VIP、#ifndef _VIP、#ifdef _VIP全註釋掉,然後加上正常檢測代碼(就是只檢測兩個.cf文件裏面服務器密碼是否相同)
Step1.使用 /* */ 註釋多行代碼(或者你也可以將其整個刪掉)
複製內容到剪貼板
代碼:
gmsv gs[MAXCONNECTION];
/*#ifdef _VIP
int login_game_server( int ti , char *svname , char *svpas , int checkvip,
char *result , int resultlen ,
char *retdata , int retdatalen )
#else
int login_game_server( int ti , char *svname , char *svpas ,
char *result , int resultlen ,
char *retdata , int retdatalen )
#endif
{
#ifndef _VIP
char buff[50];
sprintf(buff,"longzoro-%s-%d",svpass,123);
if( strcmp( svpas , buff ) == 0 ){
#else
if( strcmp( svpas , svpass ) == 0 ){
#endif
log( "服務器密碼正確 %s\n" , svname );
} else {
log( "服務器密碼錯誤 %s\n" , svname );
snprintf( result , resultlen , "失敗" );
snprintf( retdata , retdatalen , "密碼錯誤" );
return 0;
}
#ifdef _VIP
if(checkvip==0 || checkvip!=6302 * 2)
{
snprintf( result , resultlen , "failed" );
snprintf( retdata , retdatalen , "duplicate login" );
return 0;
}
#endif
{
int i;
for(i=0;i<MAXCONNECTION;i++){
if( gs[i].use &&
strcmp( gs[i].name , svname ) == 0 ){
snprintf( result, resultlen, "failed" );
snprintf( retdata , retdatalen, "duplicate login" );
return 0;
}
}
}
snprintf( gs[ti].name , sizeof(gs[ti].name), "%s" , svname );
gs[ti].fd = ti;
snprintf( result , resultlen ,SUCCESSFUL );
snprintf( retdata , retdatalen , "Nothing special" );
DeleteMemLockServer(svname); // Arminius 7.31 unlock server
return 0;
}*/
Step2.在gmsv gs[MAXCONNECTION];后加上正常檢測代碼,顯示如下(注意直接換行后粘貼到gmsv gs[MAXCONNECTION];那行下面就行)
複製內容到剪貼板
代碼:
int login_game_server( int ti , char *svname , char *svpas ,
char *result , int resultlen ,
char *retdata , int retdatalen )
{
if( strcmp( svpas , svpass ) == 0 ){
log( "服务器密码正确 %s\n" , svname );
} else {
log( "服务器密码错误 %s\n" , svname );
snprintf( result , resultlen , FAILED );
snprintf( retdata , retdatalen , "bad passwd" );
return 0;
}
{
int i;
for(i=0;i<MAXCONNECTION;i++){
if( gs[i].use &&
strcmp( gs[i].name , svname ) == 0 ){
snprintf( result, resultlen, FAILED );
snprintf( retdata , retdatalen, "duplicate login" );
return 0;
}
}
}
snprintf( gs[ti].name , sizeof(gs[ti].name), "%s" , svname );
gs[ti].fd = ti;
snprintf( result , resultlen ,SUCCESSFUL );
snprintf( retdata , retdatalen , "Nothing special" );
DeleteMemLockServer(svname); // Arminius 7.31 unlock server
return 0;
}
[
本帖最後由 wty4321 於 2013-5-7 10:27 編輯 ]