Author: Ghostwolf <foxxe@wtfs.net>
authorJoseph Bongaarts <foxxe@wtfs.net>
Mon, 25 Feb 2002 07:27:41 +0000 (07:27 +0000)
committerJoseph Bongaarts <foxxe@wtfs.net>
Mon, 25 Feb 2002 07:27:41 +0000 (07:27 +0000)
Log message:
Make map changes actually compile, and don't use c++ keywords for variable names.
More testing and whatnot tommorow.

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@656 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

include/handlers.h
include/map.h
ircd/Makefile.in
ircd/m_server.c
ircd/map.c

index 9b2f566d5c330b58b77cacb385e8a2c39aee5f54..1058cfb663d9e2c43d36755f81fef085eec8c2ab 100644 (file)
@@ -102,7 +102,6 @@ extern int m_links_redirect(struct Client*, struct Client*, int, char*[]);
 extern int m_list(struct Client*, struct Client*, int, char*[]);
 extern int m_lusers(struct Client*, struct Client*, int, char*[]);
 extern int m_map(struct Client*, struct Client*, int, char*[]);
-extern int m_map_redirect(struct Client*, struct Client*, int, char*[]);
 extern int m_mode(struct Client*, struct Client*, int, char*[]);
 extern int m_motd(struct Client*, struct Client*, int, char*[]);
 extern int m_names(struct Client*, struct Client*, int, char*[]);
@@ -145,6 +144,7 @@ extern int mo_gline(struct Client*, struct Client*, int, char*[]);
 extern int mo_info(struct Client*, struct Client*, int, char*[]);
 extern int mo_jupe(struct Client*, struct Client*, int, char*[]);
 extern int mo_kill(struct Client*, struct Client*, int, char*[]);
+extern int mo_map(struct Client*, struct Client*, int, char*[]);
 extern int mo_notice(struct Client*, struct Client*, int, char*[]);
 extern int mo_oper(struct Client*, struct Client*, int, char*[]);
 extern int mo_opmode(struct Client*, struct Client*, int, char*[]);
index da772ab93b722a9e6ca681c305a5a13d620db89a..08db3e34aa97ff8690550c680df9c809f49e6d94 100644 (file)
@@ -39,7 +39,7 @@ struct Map {
   char name[HOSTLEN+1];
   struct Map *next;
   struct Map *prev;
-}
+};
 
 extern void map_update(struct Client *server);
 extern void map_dump_head_in_sand(struct Client *cptr);
index 482de12e5350ec14f241f37ed0541213f6988818..93c36d7eb484b508bfa85e4a1f4ab6b570a4bbd0 100644 (file)
@@ -170,6 +170,7 @@ IRCD_SRC = \
        m_who.c \
        m_whois.c \
        m_whowas.c \
+       map.c \
        match.c \
        motd.c \
        msgq.c \
index 0ea808cb0a4f499d8ae348256c1747f7ff40fafa..ecee91db2cff207595abf8993b7cc2722b58933b 100644 (file)
@@ -85,6 +85,7 @@
 #include "hash.h"
 #include "ircd.h"
 #include "ircd_log.h"
+#include "ircd_policy.h"
 #include "ircd_features.h"
 #include "ircd_reply.h"
 #include "ircd_string.h"
index 008265edeba00b87d6e716a567f0e3fefd5761ae..975da19c33abb47224f02651301a31bb30c45eee 100644 (file)
@@ -33,6 +33,7 @@
 #include "ircd_reply.h"
 #include "ircd_snprintf.h"
 #include "ircd_string.h"
+#include "hash.h"
 #include "list.h"
 #include "match.h"
 #include "msg.h"
@@ -54,18 +55,18 @@ static struct Map *MapList = 0;
 /* Add a server to the map list. */
 static void map_add(struct Client *server)
 {
-  assert(server != 0);
+/*  assert(server != 0);
   assert(!IsHub(server));
   assert(!IsService(server));
+*/
+  struct Map *map = (struct Map *)MyAlloc(sizeof(struct Map));
 
-  struct Map *new = (struct Map *)MyAlloc(sizeof(struct Map));
+  map->lasttime = TStime();
+  strcpy(map->name, cli_name(server));
+  map->maxclients = cli_serv(server)->clients;
 
-  new->lasttime = TStime();
-  ircd_strcpy(new->name, cli_name(server));
-  new->maxclients = cli_serv(server)->clients;
-
-  new->prev = 0;
-  new->next = MapList;
+  map->prev = 0;
+  map->next = MapList;
 
   if(MapList)
     MapList->prev = new;
@@ -76,7 +77,7 @@ static void map_add(struct Client *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;
@@ -95,12 +96,12 @@ static void map_remove(struct Map *cptr)
  * splits, or we haven't checked in more than a week. */
 void map_update(struct Client *cptr)
 {
-  assert(IsServer(cptr));
+  /*  assert(IsServer(cptr)); */
 
   struct Map *map = 0;
   
   /* Find the server in the list and update it */ 
-  for(map = MapList.list; map; map = map->next)
+  for(map = MapList; map; map = map->next)
   {
     /* Show max clients not current, otherwise a split can be detected. */
     if(!ircd_strcmp(cli_name(cptr), map->name)) 
@@ -128,7 +129,7 @@ void map_update(struct Client *cptr)
     map_add(cli_name(cptr));
 }
 
-void dump_map_head_in_sand(struct Client *cptr)
+void map_dump_head_in_sand(struct Client *cptr)
 {
   struct Map *map = 0;
   struct Map *smap = 0;
@@ -144,7 +145,7 @@ void dump_map_head_in_sand(struct Client *cptr)
     /* Don't show servers we haven't seen in more than a week */
     if(map->lasttime < TStime() - 604800)
     {
-      acptr = find_match_server(map->name);
+      acptr = FindServer(map->name);
       if(!acptr)
       {
        map_remove(map);
@@ -159,7 +160,7 @@ void dump_map_head_in_sand(struct Client *cptr)
 
 #endif /* HEAD_IN_SAND_MAP */ 
   
-(void map_dump(struct Client *cptr, struct Client *server, char *mask, int prompt_length)
+void map_dump(struct Client *cptr, struct Client *server, char *mask, int prompt_length)
 {
   static char prompt[64];
   struct DLink *lp;