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 #include "tools.h"
00027 #include "channel.h"
00028 #include "client.h"
00029 #include "common.h"
00030 #include "hash.h"
00031 #include "irc_string.h"
00032 #include "ircd.h"
00033 #include "list.h"
00034 #include "numeric.h"
00035 #include "s_serv.h"
00036 #include "s_user.h"
00037 #include "send.h"
00038 #include "msg.h"
00039 #include "handlers.h"
00040 #include "parse.h"
00041 #include "modules.h"
00042 #include "s_conf.h"
00043
00044
00045 static void ms_nburst(struct Client*, struct Client*, int, char**);
00046
00047 struct Message nburst_msgtab = {
00048 "NBURST", 0, 0, 1, 0, MFLG_SLOW | MFLG_UNREG, 0L,
00049 {m_unregistered, m_ignore, ms_nburst, m_ignore, m_ignore, m_ignore}
00050 };
00051 #ifndef STATIC_MODULES
00052
00053 void
00054 _modinit(void)
00055 {
00056 mod_add_cmd(&nburst_msgtab);
00057 }
00058
00059 void
00060 _moddeinit(void)
00061 {
00062 mod_del_cmd(&nburst_msgtab);
00063 }
00064
00065 const char *_version = "$Revision: 33 $";
00066 #endif
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079 static void
00080 ms_nburst(struct Client *client_p, struct Client *source_p,
00081 int parc, char *parv[])
00082 {
00083 char *nick;
00084 char *nick_new = NULL;
00085 char *nick_old = NULL;
00086 struct Client *target_p;
00087 char status;
00088
00089 if (parc < 2 || *parv[1] == '\0')
00090 return;
00091
00092 nick = parv[1];
00093
00094 if (parc > 2)
00095 nick_new = parv[2];
00096
00097 if (parc > 3)
00098 nick_old = parv[3];
00099
00100 if (!ServerInfo.hub && IsCapable(client_p, CAP_LL))
00101 return;
00102 #ifdef DEBUGLL
00103 sendto_realops_flags(UMODE_ALL, L_ALL, "NBURST called by %s for %s %s %s",
00104 client_p->name,
00105 nick,
00106 nick_new ? nick_new : "",
00107 nick_old ? nick_old : "" );
00108 #endif
00109
00110 status = 'N';
00111 if ((target_p = find_client(nick)) != NULL)
00112 {
00113
00114 status = 'Y';
00115 client_burst_if_needed(client_p, target_p);
00116 }
00117
00118
00119 if (parc > 2)
00120 sendto_one(client_p, ":%s LLNICK %c %s %s", me.name, status, nick_new,
00121 (nick_old ? nick_old : ""));
00122 }