diff --git a/modules/m_admin.c b/modules/m_admin.c index 955ea42f..009f4af5 100644 --- a/modules/m_admin.c +++ b/modules/m_admin.c @@ -42,8 +42,6 @@ static void mr_admin(struct MsgBuf *, struct Client *, struct Client *, int, con static void ms_admin(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static void do_admin(struct Client *source_p); -static void admin_spy(struct Client *); - struct Message admin_msgtab = { "ADMIN", 0, 0, 0, 0, {{mr_admin, 0}, {m_admin, 0}, {ms_admin, 0}, mg_ignore, mg_ignore, {ms_admin, 0}} @@ -134,9 +132,6 @@ ms_admin(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source static void do_admin(struct Client *source_p) { - if(IsPerson(source_p)) - admin_spy(source_p); - sendto_one_numeric(source_p, RPL_ADMINME, form_str(RPL_ADMINME), me.name); if(AdminInfo.name != NULL) sendto_one_numeric(source_p, RPL_ADMINLOC1, form_str(RPL_ADMINLOC1), AdminInfo.name); @@ -145,20 +140,3 @@ do_admin(struct Client *source_p) if(AdminInfo.email != NULL) sendto_one_numeric(source_p, RPL_ADMINEMAIL, form_str(RPL_ADMINEMAIL), AdminInfo.email); } - -/* admin_spy() - * - * input - pointer to client - * output - none - * side effects - event doing_admin is called - */ -static void -admin_spy(struct Client *source_p) -{ - hook_data hd; - - hd.client = source_p; - hd.arg1 = hd.arg2 = NULL; - - call_hook(doing_admin_hook, &hd); -} diff --git a/modules/m_info.c b/modules/m_info.c index c2096c4e..155ee6fe 100644 --- a/modules/m_info.c +++ b/modules/m_info.c @@ -45,7 +45,6 @@ static const char info_desc[] = static void send_conf_options(struct Client *source_p); static void send_birthdate_online_time(struct Client *source_p); static void send_info_text(struct Client *source_p); -static void info_spy(struct Client *); static void m_info(struct MsgBuf *, struct Client *, struct Client *, int, const char **); static void mo_info(struct MsgBuf *, struct Client *, struct Client *, int, const char **); @@ -704,8 +703,6 @@ m_info(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p if(hunt_server(client_p, source_p, ":%s INFO :%s", 1, parc, parv) != HUNTED_ISME) return; - info_spy(source_p); - send_info_text(source_p); send_birthdate_online_time(source_p); @@ -721,7 +718,6 @@ mo_info(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_ { if(hunt_server(client_p, source_p, ":%s INFO :%s", 1, parc, parv) == HUNTED_ISME) { - info_spy(source_p); send_info_text(source_p); if(IsOperGeneral(source_p)) @@ -900,20 +896,3 @@ send_conf_options(struct Client *source_p) sendto_one_numeric(source_p, RPL_INFO, form_str(RPL_INFO), ""); } - -/* info_spy() - * - * input - pointer to client - * output - none - * side effects - hook doing_info is called - */ -static void -info_spy(struct Client *source_p) -{ - hook_data hd; - - hd.client = source_p; - hd.arg1 = hd.arg2 = NULL; - - call_hook(doing_info_hook, &hd); -} diff --git a/modules/m_motd.c b/modules/m_motd.c index f71ea801..f1b6d2c5 100644 --- a/modules/m_motd.c +++ b/modules/m_motd.c @@ -56,8 +56,6 @@ mapi_hlist_av1 motd_hlist[] = { DECLARE_MODULE_AV2(motd, NULL, NULL, motd_clist, motd_hlist, NULL, NULL, NULL, motd_desc); -static void motd_spy(struct Client *); - /* ** m_motd ** parv[1] = servername @@ -83,7 +81,6 @@ m_motd(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p if(hunt_server(client_p, source_p, ":%s MOTD :%s", 1, parc, parv) != HUNTED_ISME) return; - motd_spy(source_p); send_user_motd(source_p); } @@ -97,23 +94,5 @@ mo_motd(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_ if(hunt_server(client_p, source_p, ":%s MOTD :%s", 1, parc, parv) != HUNTED_ISME) return; - motd_spy(source_p); send_user_motd(source_p); } - -/* motd_spy() - * - * input - pointer to client - * output - none - * side effects - hook doing_motd is called - */ -static void -motd_spy(struct Client *source_p) -{ - hook_data data; - - data.client = source_p; - data.arg1 = data.arg2 = NULL; - - call_hook(doing_motd_hook, &data); -} diff --git a/modules/m_stats.c b/modules/m_stats.c index f95510e0..b889c437 100644 --- a/modules/m_stats.c +++ b/modules/m_stats.c @@ -79,9 +79,6 @@ static void stats_l_list(struct Client *s, const char *, bool, bool, rb_dlink_li static void stats_l_client(struct Client *source_p, struct Client *target_p, char statchar); -static int stats_spy(struct Client *, char, const char *); -static void stats_p_spy(struct Client *); - typedef void (*handler_t)(struct Client *source_p); typedef void (*handler_parv_t)(struct Client *source_p, int parc, const char *parv[]); @@ -206,7 +203,6 @@ m_stats(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_ static time_t last_used = 0; struct stats_cmd *cmd; unsigned char statchar; - int did_stats = 0; statchar = parv[1][0]; @@ -229,14 +225,6 @@ m_stats(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_ if(hunt_server(client_p, source_p, ":%s STATS %s :%s", 2, parc, parv) != HUNTED_ISME) return; - if(tolower(statchar) != 'l') - /* FIXME */ - did_stats = stats_spy(source_p, statchar, NULL); - - /* if did_stats is true, a module grabbed this STATS request */ - if(did_stats) - goto stats_out; - /* Look up */ cmd = &stats_cmd_table[statchar]; if(cmd->handler != NULL) @@ -272,7 +260,7 @@ m_stats(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_ } stats_out: - /* Send the end of stats notice, and the stats_spy */ + /* Send the end of stats notice */ sendto_one_numeric(source_p, RPL_ENDOFSTATS, form_str(RPL_ENDOFSTATS), statchar); } @@ -817,8 +805,6 @@ stats_operedup (struct Client *source_p) sendto_one_numeric(source_p, RPL_STATSDEBUG, "p :%u staff members", count); - - stats_p_spy (source_p); } static void @@ -1515,7 +1501,6 @@ stats_ltrace(struct Client *source_p, int parc, const char *parv[]) } else if (target_p != NULL) { - stats_spy(source_p, statchar, target_p->name); stats_l_client(source_p, target_p, statchar); } else @@ -1534,8 +1519,6 @@ stats_ltrace(struct Client *source_p, int parc, const char *parv[]) doall = true; } - stats_spy(source_p, statchar, name); - if (ConfigFileEntry.stats_l_oper_only != STATS_L_OPER_ONLY_NO && !IsOperGeneral(source_p)) { if (doall && MyClient(source_p)) @@ -1659,44 +1642,3 @@ stats_comm(struct Client *source_p) { rb_dump_fd(rb_dump_fd_callback, source_p); } - -/* - * stats_spy - * - * inputs - pointer to client doing the /stats - * - char letter they are doing /stats on - * output - none - * side effects - - * This little helper function reports to opers if configured. - */ -static int -stats_spy(struct Client *source_p, char statchar, const char *name) -{ - hook_data_int data; - - data.client = source_p; - data.arg1 = name; - data.arg2 = (int) statchar; - data.result = 0; - - call_hook(doing_stats_hook, &data); - - return data.result; -} - -/* stats_p_spy() - * - * input - pointer to client doing stats - * ouput - - * side effects - call hook doing_stats_p - */ -static void -stats_p_spy (struct Client *source_p) -{ - hook_data data; - - data.client = source_p; - data.arg1 = data.arg2 = NULL; - - call_hook(doing_stats_p_hook, &data); -} diff --git a/modules/m_trace.c b/modules/m_trace.c index ae9a0057..cd09be3e 100644 --- a/modules/m_trace.c +++ b/modules/m_trace.c @@ -44,8 +44,6 @@ static const char trace_desc[] = static void m_trace(struct MsgBuf *, struct Client *, struct Client *, int, const char **); -static void trace_spy(struct Client *, struct Client *); - struct Message trace_msgtab = { "TRACE", 0, 0, 0, 0, {mg_unreg, {m_trace, 0}, {m_trace, 0}, mg_ignore, mg_ignore, {m_trace, 0}} @@ -179,15 +177,11 @@ m_trace(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_ tname = target_p->name; } - trace_spy(source_p, target_p); - sendto_one_numeric(source_p, RPL_ENDOFTRACE, form_str(RPL_ENDOFTRACE), tname); return; } - trace_spy(source_p, NULL); - /* give non-opers a limited trace output of themselves (if local), * opers and servers (if no shide) --fl */ @@ -430,20 +424,3 @@ report_this_status(struct Client *source_p, struct Client *target_p) return (cnt); } - -/* trace_spy() - * - * input - pointer to client - * output - none - * side effects - hook event doing_trace is called - */ -static void -trace_spy(struct Client *source_p, struct Client *target_p) -{ - hook_data_client hdata; - - hdata.client = source_p; - hdata.target = target_p; - - call_hook(doing_trace_hook, &hdata); -}