if (strlen(parv[5]) != 3 || (parv[5][0] != 'P' && parv[5][0] != 'J'))
return exit_client_msg(cptr, sptr, &me, "Bogus protocol (%s)", parv[5]);
- *parv[5] = 'J';
-
if (*parv[7] == '+') {
for (ch = parv[7] + 1; *ch; ch++)
switch (*ch) {
/* Add a server to the map list. */
static void map_add(struct Client *server)
{
-/* assert(server != 0);
+ struct Map *map = (struct Map *)MyMalloc(sizeof(struct Map));
+
+ assert(IsServer(server));
assert(!IsHub(server));
assert(!IsService(server));
-*/
- struct Map *map = (struct Map *)MyMalloc(sizeof(struct Map));
map->lasttime = TStime();
strcpy(map->name, cli_name(server));
/* Remove a server from the map list */
static void map_remove(struct Map *cptr)
{
- /* assert(cptr != 0);*/
+ assert(cptr != 0);
if(cptr->next)
cptr->next->prev = cptr->prev;
* splits, or we haven't checked in more than a week. */
void map_update(struct Client *cptr)
{
- /* assert(IsServer(cptr)); */
-
struct Map *map = 0;
-
+
+ assert(IsServer(cptr));
+
/* Find the server in the list and update it */
for(map = MapList; map; map = map->next)
{
else
map_update(acptr);
}
- send_reply(cptr, RPL_MAP, "", "|-", map->name, "", map->maxclients);
+ send_reply(cptr, RPL_MAP, smap ? "|" : "`", "-", map->name, "", map->maxclients);
}
}
Count_serverdisconnects(UserStats);
else
Count_remoteserverquits(UserStats);
-#ifdef HEAD_IN_SAND_MAP
- map_update(bcptr);
-#endif
}
else if (IsMe(bcptr))
{
cli_serv(victim)->up, victim, comment);
}
+#ifdef HEAD_IN_SAND_MAP
+ map_update(victim);
+#endif
+
/*
* First generate the needed protocol for the other server links
* except the source: