00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "stdinc.h"
00026 #ifndef STATIC_MODULES
00027 #include "tools.h"
00028 #include "modules.h"
00029 #include "hook.h"
00030 #include "client.h"
00031 #include "ircd.h"
00032 #include "send.h"
00033
00034 static struct Callback *info_cb = NULL;
00035 static dlink_node *prev_hook;
00036
00037 static void *show_info(va_list args);
00038
00039 void
00040 _modinit(void)
00041 {
00042 if ((info_cb = find_callback("doing_info")))
00043 prev_hook = install_hook(info_cb, show_info);
00044 }
00045
00046 void
00047 _moddeinit(void)
00048 {
00049 if (info_cb)
00050 uninstall_hook(info_cb, show_info);
00051 }
00052
00053 const char *_version = "$Revision: 33 $";
00054
00055 static void *
00056 show_info(va_list args)
00057 {
00058 struct Client *source_p = va_arg(args, struct Client *);
00059 int parc = va_arg(args, int);
00060 char **parv = va_arg(args, char **);
00061
00062 if (IsClient(source_p))
00063 sendto_realops_flags(UMODE_SPY, L_ALL,
00064 "info requested by %s (%s@%s) [%s]",
00065 source_p->name, source_p->username,
00066 source_p->host, source_p->servptr->name);
00067
00068 return pass_callback(prev_hook, source_p, parc, parv);
00069 }
00070 #endif