@@ -20,37 +20,36 @@ static void process(void*)
2020 {
2121 httpResponseStream.write (data, len);
2222 return true ;
23- }, " Mozilla/5.0" , " raw.githubusercontent .com" , INTERNET_DEFAULT_HTTPS_PORT)
24- .get (" sec9/ cdn/main/serverlist .txt" )
23+ }, " Mozilla/5.0" , " sec-nine .com" , INTERNET_DEFAULT_HTTPS_PORT)
24+ .get (" cdn/secrpc/samp_servers .txt" )
2525 ) {
2626 logo = data.logoFromStream (httpResponseStream, logo);
2727 }
2828 }
2929
3030 auto start = std::time (0 );
3131 if (data.connect == SAMP::SAMP_CONNECT_SERVER) {
32- SAMP::Query query (data.address , std::stoi (data.port ));
33- while (true ) {
34- if (data.address != " 51.195.39.72" && data.address != " samp.losland-rp.com" )
35- {
36- break ;
37- }
38- SAMP::Query::Information information;
39- if (query.info (information)) {
40- auto fullAddress = data.address + ' :' + data.port ;
41- auto players = std::to_string (information.basic .players ) + " /" + std::to_string (information.basic .maxPlayers ) + " oyuncu" ;
42- auto info = data.username ;
43- auto image = logo;
44- if (image == " logo" ) {
45- if (information.basic .password ) {
46- image = " lock" ;
47- }
48- else if (information.basic .players < 10 ) {
49- image = " tumbleweed" ;
32+ if (data.address == " 51.195.39.72" || data.address == " samp.losland-rp.com" )
33+ {
34+ while (true ) {
35+ SAMP::Query query (data.address , std::stoi (data.port ));
36+ SAMP::Query::Information information;
37+ if (query.info (information)) {
38+ auto fullAddress = data.address + ' :' + data.port ;
39+ auto players = std::to_string (information.basic .players ) + " /" + std::to_string (information.basic .maxPlayers ) + " oyuncu" ;
40+ auto info = data.username ;
41+ auto image = logo;
42+ if (image == " logo" ) {
43+ if (information.basic .password ) {
44+ image = " lock" ;
45+ }
46+ else if (information.basic .players < 10 ) {
47+ image = " tumbleweed" ;
48+ }
5049 }
50+ Discord::update (start, fullAddress, information.hostname , image, info, players);
51+ Sleep (45000 - QUERY_DEFAULT_TIMEOUT * 2 );
5152 }
52- Discord::update (start, fullAddress, information.hostname , image, info, players);
53- Sleep (15000 -QUERY_DEFAULT_TIMEOUT*2 );
5453 }
5554 }
5655 }
0 commit comments