void load_scripts(void) { extern char *new_script; static int done = 0; #if !defined(WINNT) && !defined(__EMX__) char buffer[BIG_BUFFER_SIZE+1]; int old_display = window_display; #endif if (!done++) { never_connected = 0; #if !defined(WINNT) && !defined(__EMX__) window_display = 0; sprintf(buffer, "%s/bxglobal", SCRIPT_PATH); loading_global = 1; load("LOAD", buffer, empty_string, NULL); loading_global = 0; window_display = old_display; #endif if (!quick_startup) { loading_savefile++; reload_save(NULL, NULL, empty_string, NULL); loading_savefile--; /* read the newscript/.bitchxrc/.ircrc file */ if (new_script && !access(new_script, R_OK)) load("LOAD", new_script, empty_string, NULL); else if (!access(bircrc_file, R_OK)) load("LOAD", bircrc_file, empty_string, NULL); else if (!access(ircrc_file, R_OK)) load("LOAD", ircrc_file, empty_string, NULL); } } if (get_server_away(from_server)) set_server_away(from_server, get_server_away(from_server), 1); }
/* * got_initial_version_28: this is called when ircii gets the serial * number 004 reply. We do this becuase the 004 numeric gives us the * server name and version in an easy to use fashion, and doesnt * rely on the syntax or construction of the 002 numeric. * * Hacked as neccesary by jfn, May 1995 */ void got_initial_version_28 (const char *server, const char *version, const char *umodes) { /* Worthless 004 reply. Hope for the best! */ if (!server || !version || !umodes) { set_server_version(from_server, Server2_8); set_server_version_string(from_server, "<none provided>"); set_server_itsname(from_server, get_server_name(from_server)); } else { if (!strncmp(version, "2.8", 3)) { if (strstr(version, "mu") || strstr(version, "me")) set_server_version(from_server, Server_u2_8); else set_server_version(from_server, Server2_8); } else if (!strncmp(version, "2.9", 3)) set_server_version(from_server, Server2_9); else if (!strncmp(version, "2.10", 4)) set_server_version(from_server, Server2_10); else if (!strncmp(version, "u2.9", 4)) set_server_version(from_server, Server_u2_9); else if (!strncmp(version, "u2.10", 4)) set_server_version(from_server, Server_u2_10); else if (!strncmp(version, "u3.0", 4)) set_server_version(from_server, Server_u3_0); else set_server_version(from_server, Server2_8); set_server_version_string(from_server, version); set_server_itsname(from_server, server); set_possible_umodes(from_server, umodes); } reconnect_all_channels(); server_did_rejoin_channels(from_server); message_from(NULL, LOG_CRAP); reinstate_user_modes(); if (never_connected) { never_connected = 0; permit_status_update(1); if (!ircrc_loaded) load_ircrc(); if (default_channel) { e_channel("JOIN", default_channel, empty_string); new_free(&default_channel); } } else if (get_server_away(from_server)) set_server_away(from_server, get_server_away(from_server)); update_all_status(); do_hook(CONNECT_LIST, "%s %d %s", get_server_name(from_server), get_server_port(from_server), get_server_itsname(from_server)); window_check_channels(); }