struct BotThinkFunc* botDisconnect(int argc, const char* argv[], struct BotState* state) { qbLog("Disconnecting bot from server..."); qbDisconnect(); qbLog("Disconnected."); RETURN(IDLE,"ok"); }
void KillBot() { if(ConnectThreadID != 0) { Log_NewMessage("Killing Thread... "); TerminateThread(ConnectThread, 0); Log_NewMessage("Done!\r\n"); if(qbIsConnected()) qbDisconnect(); qbShutdown(); qmUnloadMap(); } ConnectThreadID = 0; }