* note: it is guaranteed that parv[0]..parv[parc-1] are all
* non-NULL pointers.
*/
-#if 0
-/*
- * No need to include handlers.h here the signatures must match
- * and we don't need to force a rebuild of all the handlers everytime
- * we add a new one to the list. --Bleep
- */
-#include "handlers.h"
-#endif /* 0 */
+#include "config.h"
+
#include "client.h"
#include "ircd.h"
+#include "ircd_defs.h"
+#include "ircd_policy.h"
#include "ircd_reply.h"
#include "ircd_snprintf.h"
#include "ircd_string.h"
#include "list.h"
#include "match.h"
+#include "msg.h"
#include "numeric.h"
#include "s_user.h"
#include "s_serv.h"
#include <assert.h>
#include <stdio.h>
+#include <string.h>
static void dump_map(struct Client *cptr, struct Client *server, char *mask, int prompt_length)
{
*p = '\0';
if (prompt_length > 60)
- send_reply(cptr, RPL_MAPMORE, prompt, server->name);
+ send_reply(cptr, RPL_MAPMORE, prompt, cli_name(server));
else {
char lag[512];
- if (server->serv->lag>10000)
+ if (cli_serv(server)->lag>10000)
lag[0]=0;
- else if (server->serv->lag<0)
+ else if (cli_serv(server)->lag<0)
strcpy(lag,"(0s)");
else
- sprintf(lag,"(%is)",server->serv->lag);
+ sprintf(lag,"(%is)",cli_serv(server)->lag);
send_reply(cptr, RPL_MAP, prompt, (
(IsBurst(server)) ? "*" : (IsBurstAck(server) ? "!" : "")),
- server->name, lag, (server == &me) ? UserStats.local_clients :
- server->serv->clients);
+ cli_name(server), lag, (server == &me) ? UserStats.local_clients :
+ cli_serv(server)->clients);
}
if (prompt_length > 0)
{
if (prompt_length > 60)
return;
strcpy(p, "|-");
- for (lp = server->serv->down; lp; lp = lp->next)
- if (match(mask, lp->value.cptr->name))
- lp->value.cptr->flags &= ~FLAGS_MAP;
+ for (lp = cli_serv(server)->down; lp; lp = lp->next)
+ if (match(mask, cli_name(lp->value.cptr)))
+ cli_flags(lp->value.cptr) &= ~FLAGS_MAP;
else
{
- lp->value.cptr->flags |= FLAGS_MAP;
+ cli_flags(lp->value.cptr) |= FLAGS_MAP;
cnt++;
}
- for (lp = server->serv->down; lp; lp = lp->next)
+ for (lp = cli_serv(server)->down; lp; lp = lp->next)
{
- if ((lp->value.cptr->flags & FLAGS_MAP) == 0)
+ if ((cli_flags(lp->value.cptr) & FLAGS_MAP) == 0)
continue;
if (--cnt == 0)
*p = '`';
return 0;
}
-
-#if 0
-/*
- * m_map -- by Run
- *
- * parv[0] = sender prefix
- * parv[1] = server mask
- */
-int m_map(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
+#ifdef HEAD_IN_SAND_MAP
+int m_map_redirect(struct Client* cptr, struct Client* sptr, int parc,
+ char* parv[])
{
- if (parc < 2)
- parv[1] = "*";
-
- dump_map(sptr, &me, parv[1], 0);
- sendto_one(sptr, rpl_str(RPL_MAPEND), me.name, parv[0]); /* XXX DEAD */
-
+ sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :%s", sptr,
+ "/MAP has been disabled, from CFV-165. "
+ "Visit " URL_SERVERS);
return 0;
}
-#endif /* 0 */
-
+#endif