[project @ 2005-07-04 01:48:38 by unknown_lamer]
[clinton/bobotpp.git] / source / Commands.C
index f222380..fb181e9 100644 (file)
@@ -588,6 +588,16 @@ Commands::NextServer(Bot *bot)
 
   if (!bot->canChangeServer())
     return CanNotChangeServer;
+
+#ifdef USESCRIPTS
+  // Run hooks/disconnect
+  bot->botInterp->RunHooks 
+    (Hook::DISCONNECT, 
+     bot->serverConnection->server->getHostName (),
+     scm_list_n 
+     (Utils::str2scm  (bot->serverConnection->server->getHostName ()),
+      SCM_BOOL_T));
+#endif
   
   QUEUE->sendQuit("Changing server");
   bot->nextServer();