+ - added support for Unreal and Bahamut's NOQUIT
GNU Thales 1.0 (09/05/2004)
- added a workaround for a possible unreal bug.
- using autoconf 2.59 instead of autoconf 2.13.
void do_squit(char *server)
{
server = db_escape(server);
+
+ /* We guess which users are now offline (for NOQUIT support) */
+ db_offlineusers(db_getserver(server));
if (ServerCacheTime)
{
db_query("UPDATE " TBL_SERV
" SET online=\"N\", lastsplit=NOW(),linkedto=NULL WHERE servid=\"%d\"",
db_getserver(server));
db_cleanserver();
+
}
else
{
}
}
}
+
+void db_offlineusers(int servid)
+{
+ MYSQL_RES *resptr2;
+ char **res2;
+
+ /* We select users that went on the splitted server and send them to the appropritate functions */
+ db_query("SELECT nick, nickid FROM " TBL_USER " WHERE servid=\"%d\"", servid);
+ resptr2 = mysql_store_result(myptr);
+ while ((res2 = mysql_fetch_row(resptr2)))
+ {
+ char *nick = db_escape(res2[0]);
+ int nickid = atoi(res2[1]);
+ db_removenick(nick);
+ db_removefromchans(nickid);
+ free(nick);
+ }
+}
void db_close();
void db_cleanserver();
void db_cleanuser();
+void db_offlineusers();
int db_getlusers(int type);
#define LUSERS_USERS 1
#define LUSERS_USERSINV 2
}
#if defined(IRCD_UNREAL)
send_cmd(NULL, "PROTOCTL NICKv2 SJOIN SJOIN2 SJ3");
+ send_cmd(NULL, "CAPAB NOQUIT");
#endif
#if defined(IRCD_HYBRID)
send_cmd(NULL, "PASS %s :TS", RemotePassword);
send_cmd(NULL, "CAPAB :HOPS TBURST");
#elif defined (IRCD_BAHAMUT)
send_cmd(NULL, "PASS %s :TS", RemotePassword);
- send_cmd(NULL, "CAPAB TS3 SSJOIN NICKIP");
+ send_cmd(NULL, "CAPAB TS3 SSJOIN NICKIP NOQUIT");
#elif defined (IRCD_IRCDRU)
send_cmd(NULL, "PASS %s :TS", RemotePassword);
send_cmd(NULL, "CAPAB TS3 SSJOIN 8BNCI NICKIP");