A low resource c++ urban terror bot that keeps track of players on specified servers and applies bans keeping the servers hacker clean :)
FS#100 - Bug in !teams
Attached to Project:
2Steps2Hell's -BanBot-
Opened by Simone (Zamy) - Sunday, 23 October 2011, 20:35 GMT+2
Last edited by Simone (Zamy) - Sunday, 23 October 2011, 23:01 GMT+2
Opened by Simone (Zamy) - Sunday, 23 October 2011, 20:35 GMT+2
Last edited by Simone (Zamy) - Sunday, 23 October 2011, 23:01 GMT+2
|
DetailsSembra ci sia un bug in !teams, ecco la traccia:
[OK] Opened! At: 2212206 At: 2212274 contains: 1089:14Kill: 9 10 28: Infantrie. killed BurningSniper by UT_MOD_SR8 At: 2212306 contains: 1089:15Item: 7 ut_weapon_deagle At: 2212338 contains: 1089:15say: 14 ShiNWoLL: !teams [!] Teams requested by ShiNWoLL, 5C5D284D639F5B41A3166CE2F0FFC3C4 Db::checkAuthGuid Db::execQuery - select level from oplist where guid='5C5D284D639F5B41A3166CE2F0FFC3C4' using database @: /home/zamy/BanBot/databaseCube/ Db::execQuery result code is: 0 sending value: 1 Red found: 7 Blue found: 2 Total: 9 Segmentation fault Evidentemente c'è un errore negli if e/o nei cicli (analyzer.cpp, circa riga 2722). Personalmente non riesco a trovare l'errore, butta un occhio anche te. |
This task depends upon
(gdb) n
2741 std::cout<<"Red found: "<<red<<" Blue found: "<<blue<<" Total: "<<m_dati->currentServer()->size()<<"\n";
(gdb) n
Red found: 2 Blue found: 4 Total: 7
2744 if (red != blue)
(gdb) n
2749 std::string phrase ("^0BanBot: ^2 fixing teams.");
(gdb) n
2751 block->say(phrase);
(gdb) n
2754 if ( red > blue ){
(gdb) n
2766 for( unsigned int i = m_dati->currentServer()->size(); i != 0 && red < blue; --i)
(gdb) n
2767 if ( (*m_dati->currentServer())[i]->team == Server::Player::BLUE ) {
(gdb) n
Program received signal SIGSEGV, Segmentation fault.
0x0000000000416e1c in Analyzer::teams (this=0x7fffffffe380, line=0x7fffffffd900 "3833:29say: 0 yeah: !teams") at src/Analyzer.cpp:2767
2767 if ( (*m_dati->currentServer())[i]->team == Server::Player::BLUE ) {
(gdb) b
Breakpoint 2 at 0x416e1c: file src/Analyzer.cpp, line 2767.
(gdb) bt
#0 0x0000000000416e1c in Analyzer::teams (this=0x7fffffffe380, line=0x7fffffffd900 "3833:29say: 0 yeah: !teams") at src/Analyzer.cpp:2767
#1 0x000000000042be73 in Analyzer::main_loop (this=0x7fffffffe380) at src/Analyzer.cpp:3460
#2 0x0000000000404d00 in main (argc=1, argv=0x7fffffffe518) at src/main.cpp:101
Che cazzo?!?!? (ps crasha solo su questa riga, non sull'equivalente che sposta i rossi sui blu: solo quando spsota i blu sui rossi.