int main (unsigned int argc, char **argv) { char **null_argv = (char **) NULL; char *mess; extern int ch_set; ch_set = TRUE; print_parse_errors = FALSE; quipu_syntaxes(); #ifdef USE_PP pp_quipu_init (argv[0]); #endif want_oc_hierarchy(); namestr[0] = '\0'; passwd[0] = '\0'; toplevel = XtInitialize("X-Directory", "Pod", NULL, 0, &argc, argv); dsap_init((int *) NULL, &null_argv); #ifdef USE_PP pp_quipu_run (); #endif read_args(&argc, &argv); user_tailor(); read_bind_args(&argc, &argv); CreateWidgets(); message((Widget) NULL, "Connecting to Directory. Please Wait..."); if ((mess = cnnct_bind()) != NULLCP) { kill_message(); displayStartupError(mess); XtMainLoop(); } set_attribute_syntax (str2syntax("photo"), (IFP)pe_cpy, NULLIFP, NULLIFP, podphoto, (IFP)pe_cpy, quipu_pe_cmp, pe_free, NULLCP, NULLIFP, TRUE ); kill_message(); PodLoop(); return 0; }
void reap_messages(void) { message_t *message = first_message, *next; while(message) { client_t *client = first_client; while(client) { if(message == client->message || message == client->last_message) return; client = client->next; } next = message->next; kill_message(message); message = next; } }
/* * This parses NOTICEs that are sent from that wacky ircd we are connected * to, and 'to' is guaranteed not to be a channel. */ static void parse_local_server_notice (const char *from, const char *to, const char *line) { int lastlog_level; const char * f; f = from; if (!f || !*f) if (!(f = get_server_itsname(from_server))) f = get_server_name(from_server); /* OPERator Notices */ if (!strncmp(line, "*** Notice -- ", 13)) { if (!strncmp(line + 14, "Received KILL message for ", 26)) if (kill_message(f, line + 40)) return; message_from(to, LOG_OPNOTE); lastlog_level = set_lastlog_msg_level(LOG_OPNOTE); if (!do_hook(OPER_NOTICE_LIST, "%s %s", f, line + 14)) return; } /* NOTEs */ else if (!strncmp(line, "Note", 4)) { char *note_from = NULL; char *point = NULL; if (strlen(line) > 10) { /* Skip the "Note From" part */ note_from = LOCAL_COPY(line + 10); if ((point = strchr(note_from, '!'))) { *point++ = 0; FromUserHost = line; if ((point = strchr(FromUserHost, ' '))) { *point++ = 0; parse_note(note_from, point); } FromUserHost = empty_string; } } return; } lastlog_level = set_lastlog_msg_level(LOG_SNOTE); message_from(to, LOG_SNOTE); /* Check to see if the notice already has its own header... */ if (do_hook(GENERAL_NOTICE_LIST, "%s %s %s", f, to, line)) { if (*line == '*' || *line == '#') { if (do_hook(SERVER_NOTICE_LIST, "%s %s", f, line)) put_it("%s", line); } else if (do_hook(SERVER_NOTICE_LIST, "%s *** %s", f, line)) say("%s", line); } if (lastlog_level) message_from(NULL, lastlog_level); }