int denora_event_chghost(char *source, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(source, ac, av); } change_user_host(av[0], av[1]); return MOD_CONT; }
int denora_event_swhois(char *source, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(source, ac, av); } do_swhois(av[0], av[1]); return MOD_CONT; }
int denora_event_setname(char *source, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(source, ac, av); } change_user_realname(av[0], av[1]); return MOD_CONT; }
/* ABAAA L #ircops */ int denora_event_part(char *source, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(source, ac, av); } do_part(source, ac, av); return MOD_CONT; }
int denora_event_spamburst(char *source, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(source, ac, av); } return MOD_CONT; }
/* * SVINFO * parv[0] = sender prefix * parv[1] = TS_CURRENT for the server * parv[2] = TS_MIN for the server * parv[3] = server is standalone or connected to non-TS only * parv[4] = server's idea of UTC time */ int denora_event_svinfo(char *source, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(source, ac, av); } /* currently not used but removes the message : unknown message from server */ return MOD_CONT; }
int denora_event_motd(char *source, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(source, ac, av); } m_motd(source); return MOD_CONT; }
/* Event: PROTOCTL */ int denora_event_capab(char *source, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(source, ac, av); } capab_parse(ac, av); return MOD_CONT; }
int denora_event_away(char *source, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(source, ac, av); } m_away(source, (ac ? av[0] : NULL)); return MOD_CONT; }
int denora_event_eob(char *source, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(source, ac, av); } update_sync_state(source, SYNC_COMPLETE); return MOD_CONT; }
int denora_event_pong(char *source, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(source, ac, av); } server_store_pong(source, time(NULL)); return MOD_CONT; }
int denora_event_unxline(char *source, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(source, ac, av); } sql_do_unxline(av[1]); return MOD_CONT; }
int denora_event_unkline(char *source, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(source, ac, av); } sql_do_server_bans_remove(NULL, av[1], av[2]); return MOD_CONT; }
/* <source> JU <targetservermask> [!]<+/-><jupedservername> <duration> <timestamp> :<reason> * AVAAC JU * +something.fake 5 1214347612 :Some fake jupe */ int denora_event_jupe(char *source, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(source, ac, av); } p10_gline((char *) "J", source, ac, av); return MOD_CONT; }
int denora_event_akill(char *source, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(source, ac, av); } sql_do_server_bans_add(NULL, av[1], av[0], av[3], av[4], av[2], av[5]); return MOD_CONT; }
/* AB RI AN ABAAB 1166048441 214764 :<No client start time> */ int denora_event_rping(char *source, int ac, char **av) { if (denora->protocoldebug) protocol_debug(source, ac, av); send_cmd(av[0], "RO %s %s %s %s :%s", ServerName, av[1], av[2], av[3], av[4]); return MOD_CONT; }
int denora_event_svsnick(char *source, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(source, ac, av); } do_nick(av[0], av[1], NULL, NULL, NULL, NULL, time(NULL), 0, NULL, NULL, NULL, 0, NULL, NULL); return MOD_CONT; }
int denora_event_push(char *source, int ac, char **av) { /* Thanks to w00t from the inspircd team for helping me to write this function * debug: Received: :rock.musichat.net PUSH TestBOT ::rock.musichat.net 242 TestBOT :Server up 1 days, 07:47:54 */ Server *s; char *num; char buf[NET_BUFSIZE]; if (denora->protocoldebug) { protocol_debug(source, ac, av); } num = myStrGetToken(av[1], ' ', 1); av[1] = myStrGetTokenRemainder(av[1], ' ', 3); if (!num || !av[1]) { alog(LOG_ERROR, "ERROR: Something wicked while handling the PUSH message (truncated message)"); return MOD_CONT; } if (!strcmp(num, "375")) { rdb_query(QUERY_LOW, "UPDATE %s SET motd=\'\' WHERE server=\'%s\'", ServerTable, source); } else if (!strcmp(num, "372")) { s = server_find(source); if (!s) { return MOD_CONT; } av[1]++; if (ac >= 2) { if (s->motd) { ircsnprintf(buf, NET_BUFSIZE - 1, "%s\n\r%s", s->motd, av[1]); free(s->motd); s->motd = sstrdup(buf); } else { s->motd = sstrdup(av[1]); } } } else if (!strcmp(num, "376")) { s = server_find(source); if (!s) { return MOD_CONT; } sql_motd_store(s); } else if (!strcmp(num, "242")) { av[1]++; sql_do_uptime(source, av[1]); } else if (!strcmp(num, "248")) { av[2] = myStrGetTokenRemainder(av[1], ' ', 1); av[1] = myStrGetToken(av[1], ' ', 1); /* possible memleak at this location */ sql_uline(av[2]); } return MOD_CONT; }
int denora_event_version(char *source, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(source, ac, av); } av[0] = strtok(av[0], " "); sql_do_server_version(source, ac, av); return MOD_CONT; }
int denora_event_clearmode(char *source, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(source, ac, av); } chan_clearmodes(source, ac, av); return MOD_CONT; }
static int do_htmlexport(User * u, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(NULL, ac, av); } do_html(); notice_lang(s_StatServ, u, STATS_HTML_EXPORTED); return MOD_CONT; }
int denora_event_join(char *source, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(source, ac, av); } if (ac != 2) return MOD_CONT; do_join(source, ac, av); return MOD_CONT; }
/* :source SQUIT dest :reason */ int denora_event_squit(char *source, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(source, ac, av); } if (ac < 1) return MOD_CONT; do_squit(av[0]); return MOD_CONT; }
int denora_event_privmsg(char *source, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(source, ac, av); } if (ac != 2) return MOD_CONT; m_privmsg(source, av[0], av[1]); return MOD_CONT; }
int denora_event_error(char *source, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(source, ac, av); } if (av[0]) { alog(LOG_ERROR, "ERROR: %s", av[0]); } return MOD_CONT; }
int denora_event_whois(char *source, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(source, ac, av); } if (source && ac >= 1) { m_whois(source, av[0]); } return MOD_CONT; }
int denora_event_ping(char *source, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(source, ac, av); } if (ac < 1) return MOD_CONT; neoircd_cmd_pong(ac > 1 ? av[1] : ServerName, av[0]); return MOD_CONT; }
/** * Process numeric 375 messages * * @param source is the server that sent the message * @param ac is the array count * @param av is the array * * @return return is always MOD_CONT * */ int denora_event_375(char *source, int ac, char **av) { SET_SEGV_LOCATION(); if (denora->protocoldebug) { protocol_debug(source, ac, av); } rdb_query(QUERY_LOW, "UPDATE %s SET motd=\'\' WHERE server=\'%s\'", ServerTable, source); return MOD_CONT; }
int denora_event_join(char *source, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(source, ac, av); } do_sjoin(source, ac > 1 ? 2 : ac, av); return MOD_CONT; }
/* AB G !1098031985.558075 services.nomadirc.net 1098031985.558075 */ int denora_event_ping(char *source, int ac, char **av) { if (denora->protocoldebug) { protocol_debug(source, ac, av); } if (ac < 1) return MOD_CONT; nefarious_cmd_pong(p10id, av[0]); return MOD_CONT; }