summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRobin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>2008-09-30 18:45:08 +0000
committerRobin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>2008-09-30 18:45:08 +0000
commite3adfa41917b7708b1e9b498b4c3a8fd46fd1530 (patch)
tree45945d034ba7061fec26d764cfb63376c62e5822 /include
parent640b5fb2e1f56fcf6869ff289ed33479c3d5ebdb (diff)
Make a bunch of stuff build under g++.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1171 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include')
-rw-r--r--include/extern.h12
-rw-r--r--include/modules.h2
-rw-r--r--include/services.h52
3 files changed, 27 insertions, 39 deletions
diff --git a/include/extern.h b/include/extern.h
index a9a68a250..4ec60f8b6 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -53,7 +53,7 @@ E IRCDProto ircdproto;
/**** actions.c ****/
-E void kill_user(char *source, char *user, char *reason);
+E void kill_user(const char *source, const char *user, const char *reason);
E void bad_password(User * u);
E void sqline(char *mask, char *reason);
E void common_unban(ChannelInfo * ci, char *nick);
@@ -594,7 +594,7 @@ E char *getvHost(char *nick);
E int is_host_remover(User * u);
E int is_host_setter(User *u);
E HostCore *hostCoreListHead();
-E HostCore *findHostCore(HostCore * head, char *nick, boolean * found);
+E HostCore *findHostCore(HostCore * head, char *nick, bool *found);
E HostCore *createHostCorelist(HostCore * next, char *nick, char *vIdent, char *vHost, char *creator, int32 tmp_time);
E HostCore *insertHostCore(HostCore * head, HostCore * prev, char *nick, char *vIdent, char *vHost, char *creator, int32 tmp_time);
E HostCore *deleteHostCore(HostCore * head, HostCore * prev);
@@ -833,7 +833,7 @@ E size_t strlcpy(char *, const char *, size_t);
E size_t strlcat(char *, const char *, size_t);
#endif
E char *stristr(char *s1, char *s2);
-E char *strnrepl(char *s, int32 size, const char *old, const char *new);
+E char *strnrepl(char *s, int32 size, const char *old, const char *nstr);
E char *merge_args(int argc, char **argv);
E int match_wild(const char *pattern, const char *str);
E int match_wild_nocase(const char *pattern, const char *str);
@@ -887,7 +887,7 @@ E int str_is_cidr(char *str, uint32 * ip, uint32 * mask, char **host);
/**** modules.c ****/
E void modules_core_init(int number, char **list);
-E void modules_unload_all(boolean fini, boolean unload_proto); /* Read warnings near function source */
+E void modules_unload_all(bool fini, bool unload_proto); /* Read warnings near function source */
E void moduleCallBackRun(void);
E void moduleCleanStruct(ModuleData **moduleData);
E void ModuleDatabaseBackup(char *dbname);
@@ -1157,7 +1157,7 @@ E User *do_nick(const char *source, char *nick, char *username, char *host,
E void do_umode(const char *source, int ac, char **av);
E void do_umode2(const char *source, int ac, char **av);
E void do_quit(const char *source, int ac, char **av);
-E void do_kill(char *source, char *reason);
+E void do_kill(const char *source, const char *reason);
E int is_oper(User * user);
E int is_protected(User * user);
@@ -1276,7 +1276,7 @@ E void anope_cmd_svshold(char *nick); /* SVSHOLD */
E void anope_cmd_release_svshold(char *nick); /* SVSHOLD */
E void anope_cmd_svsinfo(); /* SVSINFO */
E void anope_cmd_svsjoin(char *source, char *nick,char *chan, char *param); /* SVSJOIN */
-E void anope_cmd_svskill(char *source,char *user, const char *fmt, ...); /* SVSKILL */
+E void anope_cmd_svskill(const char *source, const char *user, const char *fmt, ...); /* SVSKILL */
E void anope_cmd_svsmode(User * u, int ac, char **av); /* SVSMODE */
E void anope_cmd_svsmode_chan(char *name, char *mode, char *nick); /* SVSMODE */
E void anope_cmd_svsnick(char *nick,char *newnick, time_t when); /* SVSNICK */
diff --git a/include/modules.h b/include/modules.h
index c04138a23..a7d34ccc1 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -363,7 +363,7 @@ MDE void moduleDelData(ModuleData **md, char *key); /* Delete this key/value
MDE void moduleDelAllData(ModuleData **md); /* Delete all key/value pairs for this module for this struct */
void moduleDelAllDataMod(Module *m); /* remove all module data from all structs for this module */
int moduleDataDebug(ModuleData **md); /* Allow for debug output of a moduleData struct */
-MDE boolean moduleMinVersion(int major,int minor,int patch,int build); /* Checks if the current version of anope is before or after a given verison */
+MDE bool moduleMinVersion(int major,int minor,int patch,int build); /* Checks if the current version of anope is before or after a given verison */
/*************************************************************************/
/* Module Queue Operations */
diff --git a/include/services.h b/include/services.h
index e1376f1bb..946958a01 100644
--- a/include/services.h
+++ b/include/services.h
@@ -246,23 +246,6 @@ typedef struct uid_ Uid;
/*************************************************************************/
-/* Windows defines a boolean type as an
- * unsigned char. It does however need
- * true/false. -- codemastr
- */
-#ifndef _WIN32
-typedef enum { false, true } boolean;
-#else
- #ifndef true
- #define true 1
- #endif
- #ifndef false
- #define false 0
- #endif
-#endif /* _WIN32 */
-
-/*************************************************************************/
-
/* Protocol tweaks */
typedef struct ircdvars_ IRCDVar;
@@ -850,6 +833,16 @@ struct server_ {
#define SERVER_JUPED 0x0002
/*************************************************************************/
+struct u_chanlist {
+ struct u_chanlist *next, *prev;
+ Channel *chan;
+ int16 status; /* Associated flags; see CSTATUS_* below. */
+};
+
+struct u_chaninfolist {
+ struct u_chaninfolist *next, *prev;
+ ChannelInfo *chan;
+};
/* Online user and channel data. */
struct user_ {
@@ -877,16 +870,8 @@ struct user_ {
int isSuperAdmin; /* is SuperAdmin on or off? */
- struct u_chanlist {
- struct u_chanlist *next, *prev;
- Channel *chan;
- int16 status; /* Associated flags; see CSTATUS_* below. */
- } *chans; /* Channels user has joined */
-
- struct u_chaninfolist {
- struct u_chaninfolist *next, *prev;
- ChannelInfo *chan;
- } *founder_chans; /* Channels user has identified for */
+ struct u_chanlist *chans; /* Channels user has joined */
+ struct u_chaninfolist *founder_chans; /* Channels user has identified for */
short invalid_pw_count; /* # of invalid password attempts */
time_t invalid_pw_time; /* Time of last invalid password */
@@ -977,6 +962,12 @@ struct userdata_ {
#define ENTRYTYPE_HOST_WILD 0x00000040
#define ENTRYTYPE_HOST 0x00000080
+struct c_userlist {
+ struct c_userlist *next, *prev;
+ User *user;
+ UserData *ud;
+};
+
struct channel_ {
Channel *next, *prev;
char name[CHANMAX];
@@ -993,11 +984,8 @@ struct channel_ {
EList *bans;
EList *excepts;
EList *invites;
- struct c_userlist {
- struct c_userlist *next, *prev;
- User *user;
- UserData *ud;
- } *users;
+
+ struct c_userlist *users;
int16 usercount;
BanData *bd;