summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
84ba698)
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
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_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*[]);
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*[]);
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_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*[]);
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*[]);
char name[HOSTLEN+1];
struct Map *next;
struct Map *prev;
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);
extern void map_update(struct Client *server);
extern void map_dump_head_in_sand(struct Client *cptr);
m_who.c \
m_whois.c \
m_whowas.c \
m_who.c \
m_whois.c \
m_whowas.c \
match.c \
motd.c \
msgq.c \
match.c \
motd.c \
msgq.c \
#include "hash.h"
#include "ircd.h"
#include "ircd_log.h"
#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"
#include "ircd_features.h"
#include "ircd_reply.h"
#include "ircd_string.h"
#include "ircd_reply.h"
#include "ircd_snprintf.h"
#include "ircd_string.h"
#include "ircd_reply.h"
#include "ircd_snprintf.h"
#include "ircd_string.h"
#include "list.h"
#include "match.h"
#include "msg.h"
#include "list.h"
#include "match.h"
#include "msg.h"
/* Add a server to the map list. */
static void map_add(struct Client *server)
{
/* Add a server to the map list. */
static void map_add(struct Client *server)
{
assert(!IsHub(server));
assert(!IsService(server));
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;
if(MapList)
MapList->prev = new;
/* Remove a server from the map list */
static void map_remove(struct Map *cptr)
{
/* Remove a server from the map list */
static void map_remove(struct Map *cptr)
{
+ /* assert(cptr != 0);*/
if(cptr->next)
cptr->next->prev = cptr->prev;
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)
{
* 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 */
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))
{
/* Show max clients not current, otherwise a split can be detected. */
if(!ircd_strcmp(cli_name(cptr), map->name))
map_add(cli_name(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;
{
struct Map *map = 0;
struct Map *smap = 0;
/* Don't show servers we haven't seen in more than a week */
if(map->lasttime < TStime() - 604800)
{
/* 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);
if(!acptr)
{
map_remove(map);
#endif /* HEAD_IN_SAND_MAP */
#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;
{
static char prompt[64];
struct DLink *lp;