+ if(!stricmplen(from, "*status", 7) || !stricmplen(from, "-sBNC", 5)) {
+ #ifdef HAVE_THREADS
+ unsigned int tid = (unsigned int) pthread_self_tid();
+ while(!clientsocket_parseorder_top(tid)) {
+ usleep(1000); //1ms
+ }
+ #endif
+ if(!match("Disconnected from IRC.*", argv[1])) {
+ //ZNC DISCONNECT
+ bot_disconnect(client);
+ return 1;
+ }
+ if(!match("* disconnected from the server.", argv[1])) {
+ //sBNC DISCONNECT
+ bot_disconnect(client);
+ return 1;
+ }
+ }