{
nextServer();
- while (!stop) {
- waitForInput(); // This is the main event loop
- dccConnections->checkStale ();
- if (!serverConnection->queue->flush())
- nextServer();
- }
+ while (!stop)
+ {
+ waitForInput(); // This is the main event loop
+ dccConnections->checkStale ();
+
+ if (!serverConnection->queue->flush())
+ {
+ // Disconnected
+#ifdef USESCRIPTS
+ // Run hooks/disconnected
+ this->botInterp->RunHooks
+ (Hook::DISCONNECT,
+ serverConnection->server->getHostName (),
+ scm_list_n
+ (Utils::str2scm (serverConnection->server->getHostName ())));
+#endif
+ nextServer();
+ }
+ }
}
void