diff options
author | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-06-13 12:37:17 +0000 |
---|---|---|
committer | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-06-13 12:37:17 +0000 |
commit | b95c53765cd3bdd85a60072f3f32d4ce4ad950bc (patch) | |
tree | 7ab56b05fa8448dec5edfdd22258bc735c6a922b | |
parent | aaa81d2dfb32ac81455d1b4fdbba343bd685f554 (diff) |
BUILD : 1.7.14 (1048) BUGS : 510 NOTES : Fixed a lot of redundant function declarations
git-svn-id: svn://svn.anope.org/anope/trunk@1048 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@772 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | include/encrypt.h | 1 | ||||
-rw-r--r-- | include/extern.h | 11 | ||||
-rw-r--r-- | include/modules.h | 13 | ||||
-rw-r--r-- | src/botserv.c | 2 | ||||
-rw-r--r-- | src/channels.c | 23 | ||||
-rw-r--r-- | src/chanserv.c | 10 | ||||
-rw-r--r-- | src/config.c | 2 | ||||
-rw-r--r-- | src/core/cs_identify.c | 2 | ||||
-rw-r--r-- | src/core/os_chanlist.c | 2 | ||||
-rw-r--r-- | src/core/os_defcon.c | 2 | ||||
-rw-r--r-- | src/core/os_modinfo.c | 6 | ||||
-rw-r--r-- | src/core/os_modlist.c | 7 | ||||
-rw-r--r-- | src/core/os_modload.c | 7 | ||||
-rw-r--r-- | src/core/os_modunload.c | 5 | ||||
-rw-r--r-- | src/core/os_restart.c | 2 | ||||
-rw-r--r-- | src/core/os_stats.c | 2 | ||||
-rw-r--r-- | src/core/os_userlist.c | 2 | ||||
-rw-r--r-- | src/events.c | 2 | ||||
-rw-r--r-- | src/hostserv.c | 16 | ||||
-rw-r--r-- | src/init.c | 2 | ||||
-rw-r--r-- | src/memoserv.c | 2 | ||||
-rw-r--r-- | src/modules.c | 2 | ||||
-rw-r--r-- | src/nickserv.c | 15 | ||||
-rw-r--r-- | src/operserv.c | 4 | ||||
-rw-r--r-- | src/process.c | 5 | ||||
-rw-r--r-- | src/protocol/inspircd.c | 16 | ||||
-rw-r--r-- | src/users.c | 2 | ||||
-rw-r--r-- | version.log | 6 |
29 files changed, 47 insertions, 125 deletions
@@ -20,6 +20,7 @@ Provided by Anope Dev. <dev@anope.org> - 2006 06/11 F Module Clear Error macro was broken on *BSD. [#515] 06/13 F Walking memory using wrong pointer in moduleGetConfigDirective. [#516] 06/13 F Added cleanup code to tools/anopesmtp. [#464] +06/13 F Fixed a lot of redundant function declarations. [#510] Provided by ThaPrince <jon@vile.com> - 2006 05/19 A Plexus 3 support. [ #00] diff --git a/include/encrypt.h b/include/encrypt.h index 462e1b373..45569b5fb 100644 --- a/include/encrypt.h +++ b/include/encrypt.h @@ -13,4 +13,3 @@ */ E int encrypt(const char *src, int len, char *dest, int size); -E int check_password(const char *plaintext, const char *password); diff --git a/include/extern.h b/include/extern.h index fefdc56bb..54a6bb974 100644 --- a/include/extern.h +++ b/include/extern.h @@ -33,6 +33,7 @@ E char *uplink; /* IRC Variables */ + E IRCDVar *ircd; E IRCDCAPAB *ircdcap; E char *flood_mode_char_set; @@ -82,10 +83,6 @@ E void bot_raw_mode(User * requester, ChannelInfo * ci, char *mode, char *nick); /**** channels.c ****/ E Channel *chanlist[1024]; -E CBMode cbmodes[128]; -E CUMode cumodes[128]; -E CMMode cmmodes[128]; -E char csmodes[128]; E void add_ban(Channel * chan, char *mask); E void chan_adduser2(User * user, Channel * c); @@ -1019,8 +1016,8 @@ E void finish_sync(Server *serv, int sync_links); E Exception *exceptions; E int16 nexceptions; -Session *sessionlist[1024]; -int32 nsessions; +E Session *sessionlist[1024]; +E int32 nsessions; E void get_session_stats(long *nrec, long *memuse); E void get_exception_stats(long *nrec, long *memuse); @@ -1295,12 +1292,10 @@ I int anope_event_netctrl(char *source, int ac, char **av); I int anope_event_notice(char *source, int ac, char **av); I int anope_event_snotice(char *source, int ac, char **av); I int anope_event_sqline(char *source, int ac, char **av); -I int anope_event_error(char *source, int ac, char **av); I int anope_event_smo(char *source, int ac, char **av); I int anope_event_myid(char *source, int ac, char **av); I int anope_event_vctrl(char *source, int ac, char **av); I int anope_event_tctrl(char *source, int ac, char **av); -I int anope_event_netinfo(char *source, int ac, char **av); I int anope_event_snetinfo(char *source, int ac, char **av); I int anope_event_umode2(char *source, int ac, char **av); I int anope_event_globops(char *source, int ac, char **av); diff --git a/include/modules.h b/include/modules.h index 91910ea40..49d7a8dbd 100644 --- a/include/modules.h +++ b/include/modules.h @@ -299,11 +299,11 @@ MDE int moduleAddOperHelp(Command * c, int (*func) (User * u)); MDE int moduleAddAdminHelp(Command * c, int (*func) (User * u)); MDE int moduleAddRootHelp(Command * c, int (*func) (User * u)); MDE void moduleSetType(MODType type); -MDE Module *mod_current_module; -MDE char *mod_current_module_name; -MDE char *mod_current_buffer; -MDE int mod_current_op; -MDE User *mod_current_user; +extern MDE Module *mod_current_module; +extern MDE char *mod_current_module_name; +extern MDE char *mod_current_buffer; +extern MDE int mod_current_op; +extern MDE User *mod_current_user; MDE int moduleGetConfigDirective(Directive *h); /*************************************************************************/ @@ -329,7 +329,6 @@ MDE int moduleAddMessage(Message *m, int pos); int delMessage(MessageHash *msgTable[], Message *m, char *mod_name); /* Del a Message from a msg table */ MDE int moduleDelMessage(char *name); int destroyMessage(Message *m); /* destroy a Message*/ -Message *findMessage(MessageHash *msgTable[], const char *name); /*************************************************************************/ @@ -360,13 +359,11 @@ MDE void moduleDeleteLanguage(int langNumber); MDE int moduleAddCallback(char *name,time_t when,int (*func)(int argc, char *argv[]),int argc, char **argv); MDE void moduleDelCallback(char *name); -MDE void moduleCallBackRun(void); MDE char *moduleGetData(ModuleData **md, char *key); /* Get the value for this key from this struct */ MDE int moduleAddData(ModuleData **md, char *key, char *value); /* Set the value for this key for this struct */ MDE void moduleDelData(ModuleData **md, char *key); /* Delete this key/value pair */ MDE void moduleDelAllData(ModuleData **md); /* Delete all key/value pairs for this module for this struct */ -MDE void moduleCleanStruct(ModuleData **moduleData); /* Clean a moduleData hash */ 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 */ diff --git a/src/botserv.c b/src/botserv.c index 0e040624d..6b40ab3df 100644 --- a/src/botserv.c +++ b/src/botserv.c @@ -25,10 +25,8 @@ int nbots = 0; /*************************************************************************/ -BotInfo *makebot(char *nick); static UserData *get_user_data(Channel * c, User * u); -E void unassign(User * u, ChannelInfo * ci); static void check_ban(ChannelInfo * ci, User * u, int ttbtype); static void bot_kick(ChannelInfo * ci, User * u, int message, ...); diff --git a/src/channels.c b/src/channels.c index 1289c3af8..7242971e1 100644 --- a/src/channels.c +++ b/src/channels.c @@ -19,26 +19,6 @@ Channel *chanlist[1024]; #define HASH(chan) ((chan)[1] ? ((chan)[1]&31)<<5 | ((chan)[2]&31) : 0) -void add_ban(Channel * chan, char *mask); -void add_exception(Channel * chan, char *mask); -void add_invite(Channel * chan, char *mask); -void chan_adduser2(User * user, Channel * c); -Channel *chan_create(char *chan); -void chan_delete(Channel * c); -void del_ban(Channel * chan, char *mask); -void del_exception(Channel * chan, char *mask); -void del_invite(Channel * chan, char *mask); -char *get_flood(Channel * chan); -char *get_key(Channel * chan); -char *get_limit(Channel * chan); -char *get_redirect(Channel * chan); -Channel *join_user_update(User * user, Channel * chan, char *name); -void set_flood(Channel * chan, char *value); -void set_key(Channel * chan, char *value); -void set_limit(Channel * chan, char *value); -void set_redirect(Channel * chan, char *value); -void do_mass_mode(char *modes); - /**************************** External Calls *****************************/ /*************************************************************************/ @@ -752,7 +732,8 @@ void do_sjoin(const char *source, int ac, char **av) Channel *c; User *user; Server *serv; - char *s, *end, cubuf[7], *end2, *cumodes[6]; + char *s = NULL; + char *end, cubuf[7], *end2, *cumodes[6]; int is_sqlined = 0; int ts = 0; int is_created = 0; diff --git a/src/chanserv.c b/src/chanserv.c index 6531eacec..2c53e4af1 100644 --- a/src/chanserv.c +++ b/src/chanserv.c @@ -116,18 +116,8 @@ CSModeUtil csmodeutils[] = { { NULL } }; -/* *INDENT-ON* */ /*************************************************************************/ -void alpha_insert_chan(ChannelInfo * ci); -ChannelInfo *makechan(const char *chan); -int delchan(ChannelInfo * ci); -void reset_levels(ChannelInfo * ci); -int is_identified(User * user, ChannelInfo * ci); - -void moduleAddChanServCmds(void); -/*************************************************************************/ -/* *INDENT-OFF* */ void moduleAddChanServCmds(void) { modules_core_init(ChanServCoreNumber, ChanServCoreModules); } diff --git a/src/config.c b/src/config.c index de5a75f93..3efdc5555 100644 --- a/src/config.c +++ b/src/config.c @@ -711,6 +711,8 @@ int parse_directive(Directive * d, char *dir, int ac, char *av[MAXPARAMS], } #endif + /* Should we remove PARAM_DEPRECATED because it's + * useless right now? -GD */ if (d->params[i].type == PARAM_DEPRECATED) { void (*func) (void); error(linenum, "Deprecated directive `%s' used", d->name); diff --git a/src/core/cs_identify.c b/src/core/cs_identify.c index 0df40f127..33091c01a 100644 --- a/src/core/cs_identify.c +++ b/src/core/cs_identify.c @@ -17,7 +17,9 @@ int do_identify(User * u); void myChanServHelp(User * u); +#ifdef _WIN32 extern MDE int check_password(const char *plaintext, const char *password); +#endif /** * Create the command, and tell anope about it. diff --git a/src/core/os_chanlist.c b/src/core/os_chanlist.c index 6a25c3bc9..36d86b769 100644 --- a/src/core/os_chanlist.c +++ b/src/core/os_chanlist.c @@ -17,7 +17,9 @@ int do_chanlist(User * u); void myOperServHelp(User * u); +#ifdef _WIN32 extern MDE int anope_get_private_mode(); +#endif /** * Create the command, and tell anope about it. diff --git a/src/core/os_defcon.c b/src/core/os_defcon.c index 3517f32d3..ad1247189 100644 --- a/src/core/os_defcon.c +++ b/src/core/os_defcon.c @@ -15,8 +15,10 @@ #include "module.h" +#ifdef _WIN32 extern MDE time_t DefContimer; extern MDE void runDefCon(void); +#endif int do_defcon(User * u); void defcon_sendlvls(User * u); diff --git a/src/core/os_modinfo.c b/src/core/os_modinfo.c index c8bba7f92..fc34102be 100644 --- a/src/core/os_modinfo.c +++ b/src/core/os_modinfo.c @@ -19,12 +19,6 @@ int do_modinfo(User * u); void myOperServHelp(User * u); int showModuleMsgLoaded(MessageHash * msgList, char *mod_name, User * u); int showModuleCmdLoaded(CommandHash * cmdList, char *mod_name, User * u); -extern MDE Module *findModule(char *name); - -extern MDE Module *mod_current_module; -extern MDE int mod_current_op; -extern MDE User *mod_current_user; -extern MDE ModuleHash *MODULE_HASH[MAX_CMD_HASH]; /** * Create the command, and tell anope about it. diff --git a/src/core/os_modlist.c b/src/core/os_modlist.c index 2a56983ea..11aee77ed 100644 --- a/src/core/os_modlist.c +++ b/src/core/os_modlist.c @@ -15,13 +15,6 @@ #include "module.h" -extern MDE Module *mod_current_module; -extern MDE int mod_current_op; -extern MDE User *mod_current_user; -extern MDE ModuleHash *MODULE_HASH[MAX_CMD_HASH]; - -extern MDE Module *createModule(char *filename); - int do_modlist(User * u); void myOperServHelp(User * u); diff --git a/src/core/os_modload.c b/src/core/os_modload.c index 9aef94948..065b260ee 100644 --- a/src/core/os_modload.c +++ b/src/core/os_modload.c @@ -15,13 +15,6 @@ #include "module.h" -extern MDE Module *mod_current_module; -extern MDE int mod_current_op; -extern MDE User *mod_current_user; -extern MDE ModuleHash *MODULE_HASH[MAX_CMD_HASH]; - -extern MDE Module *createModule(char *filename); - int do_modload(User * u); void myOperServHelp(User * u); diff --git a/src/core/os_modunload.c b/src/core/os_modunload.c index 8724811e1..81e877978 100644 --- a/src/core/os_modunload.c +++ b/src/core/os_modunload.c @@ -15,11 +15,6 @@ #include "module.h" -extern MDE Module *mod_current_module; -extern MDE int mod_current_op; -extern MDE User *mod_current_user; -extern MDE ModuleHash *MODULE_HASH[MAX_CMD_HASH]; - int do_modunload(User * u); void myOperServHelp(User * u); diff --git a/src/core/os_restart.c b/src/core/os_restart.c index eb4bd7e2c..8f2af8a5a 100644 --- a/src/core/os_restart.c +++ b/src/core/os_restart.c @@ -15,8 +15,10 @@ #include "module.h" +#ifdef _WIN32 /* OperServ restart needs access to this if were gonna avoid sending ourself a signal */ extern MDE void do_restart_services(void); +#endif int do_restart(User * u); void myOperServHelp(User * u); diff --git a/src/core/os_stats.c b/src/core/os_stats.c index a4e4f05bf..e359c35f2 100644 --- a/src/core/os_stats.c +++ b/src/core/os_stats.c @@ -21,8 +21,10 @@ int do_stats(User * u); void get_operserv_stats(long *nrec, long *memuse); void myOperServHelp(User * u); +#ifdef _WIN32 extern MDE struct clone clonelist[CLONE_DETECT_SIZE]; extern MDE struct clone warnings[CLONE_DETECT_SIZE]; +#endif /** * Create the command, and tell anope about it. diff --git a/src/core/os_userlist.c b/src/core/os_userlist.c index 7d7b75bc1..215128ff4 100644 --- a/src/core/os_userlist.c +++ b/src/core/os_userlist.c @@ -15,8 +15,10 @@ #include "module.h" +#ifdef _WIN32 extern MDE int anope_get_invite_mode(); extern MDE int anope_get_invis_mode(); +#endif int do_userlist(User * u); void myOperServHelp(User * u); diff --git a/src/events.c b/src/events.c index d1b44793e..e509e6a20 100644 --- a/src/events.c +++ b/src/events.c @@ -15,8 +15,6 @@ #include "language.h" #include "version.h" -extern Module *mod_current_module; -extern char *mod_current_module_name; char *mod_current_evtbuffer = NULL; EvtMessageHash *EVENT[MAX_CMD_HASH]; diff --git a/src/hostserv.c b/src/hostserv.c index a338c660c..d089f5e73 100644 --- a/src/hostserv.c +++ b/src/hostserv.c @@ -23,26 +23,14 @@ void load_hs_dbase_v2(dbFILE * f); void load_hs_dbase_v3(dbFILE * f); HostCore *head = NULL; /* head of the HostCore list */ -HostCore *createHostCorelist(HostCore * next, char *nick, char *vIdent, - char *vHost, char *creator, int32 tmp_time); -HostCore *findHostCore(HostCore * head, char *nick, boolean * found); -HostCore *insertHostCore(HostCore * head, HostCore * prev, char *nick, - char *vIdent, char *vHost, char *creator, - int32 tmp_time); -HostCore *deleteHostCore(HostCore * head, HostCore * prev); -void delHostCore(char *nick); - -E int is_host_setter(User * u); -E int is_host_remover(User * u); - -E int do_on_id(User * u); -E void set_lastmask(User * u); E int do_hs_sync(NickCore * nc, char *vIdent, char *hostmask, char *creator, time_t time); E void moduleAddHostServCmds(void); + /*************************************************************************/ + void moduleAddHostServCmds(void) { modules_core_init(HostServCoreNumber, HostServCoreModules); diff --git a/src/init.c b/src/init.c index c589d886a..f286bab71 100644 --- a/src/init.c +++ b/src/init.c @@ -18,7 +18,7 @@ int servernum = 0; extern void moduleAddMsgs(void); extern void moduleAddIRCDMsgs(void); -extern int protocol_module_init(void); + /*************************************************************************/ void introduce_user(const char *user) diff --git a/src/memoserv.c b/src/memoserv.c index cc131d73d..558e86ded 100644 --- a/src/memoserv.c +++ b/src/memoserv.c @@ -22,7 +22,7 @@ NickCore *nclists[1024]; E void moduleAddMemoServCmds(void); static void new_memo_mail(NickCore *nc, Memo *m); E void rsend_notify(User *u, Memo *m, const char *chan); -E int delmemo(MemoInfo * mi, int num); + /*************************************************************************/ void moduleAddMemoServCmds(void) { diff --git a/src/modules.c b/src/modules.c index ee9e351b0..1ba71f719 100644 --- a/src/modules.c +++ b/src/modules.c @@ -2420,7 +2420,7 @@ void updateProtectDetails(char *level_info_protect_word, int moduleGetConfigDirective(Directive * d) { FILE *config; - char *dir; + char *dir = NULL; char buf[1024]; int linenum = 0; int ac = 0; diff --git a/src/nickserv.c b/src/nickserv.c index 04f1d962e..1c46a76c6 100644 --- a/src/nickserv.c +++ b/src/nickserv.c @@ -31,22 +31,7 @@ unsigned int guestnum; /* Current guest number */ /*************************************************************************/ -extern char *getvHost(char *nick); - -void alpha_insert_alias(NickAlias * na); -void insert_core(NickCore * nc); -void insert_requestnick(NickRequest * nr); -void change_core_display(NickCore * nc, char *newdisplay); - -void collide(NickAlias * na, int from_timeout); -void release(NickAlias * na, int from_timeout); static void add_ns_timeout(NickAlias * na, int type, time_t delay); -void del_ns_timeout(NickAlias * na, int type); -int delnickrequest(NickRequest * nr); -NickRequest *findrequestnick(const char *nick); - -int do_setmodes(User * u); -int should_mode_change(int16 status, int16 mode); /*************************************************************************/ /* *INDENT-OFF* */ diff --git a/src/operserv.c b/src/operserv.c index 052f0efed..70c2b6ade 100644 --- a/src/operserv.c +++ b/src/operserv.c @@ -51,13 +51,9 @@ static void free_sqline_entry(SList * slist, void *item); static int is_szline_entry_equal(SList * slist, void *item1, void *item2); static void free_szline_entry(SList * slist, void *item); -void resetDefCon(int level); - time_t DefContimer; int DefConModesSet = 0; -void runDefCon(void); char *defconReverseModes(const char *modes); -void oper_global(char *nick, char *fmt, ...); #ifdef DEBUG_COMMANDS diff --git a/src/process.c b/src/process.c index 8de1e6c87..92dcc8931 100644 --- a/src/process.c +++ b/src/process.c @@ -15,10 +15,7 @@ #include "services.h" #include "messages.h" #include "modules.h" -extern Module *mod_current_module; -extern char *mod_current_module_name; -extern User *mod_current_user; -extern char *mod_current_buffer; + /*************************************************************************/ /* Use ignore code? */ diff --git a/src/protocol/inspircd.c b/src/protocol/inspircd.c index 6666099cf..d3d4ac0b4 100644 --- a/src/protocol/inspircd.c +++ b/src/protocol/inspircd.c @@ -18,6 +18,10 @@ #include "pseudo.h" #include "inspircd.h" +#include <sys/socket.h> +#include <netinet/in.h> +#include <arpa/inet.h> + #ifdef _WIN32 #include "winsock.h" int inet_aton (const char *name, struct in_addr *addr) @@ -567,7 +571,7 @@ void inspircd_cmd_376(char *source) void inspircd_cmd_nick(char *nick, char *name, char *modes) { - // :test.chatspike.net NICK 1133519355 Brain synapse.brainbox.winbot.co.uk netadmin.chatspike.net ~brain +xwsioS 10.0.0.2 :Craig Edwards + /* :test.chatspike.net NICK 1133519355 Brain synapse.brainbox.winbot.co.uk netadmin.chatspike.net ~brain +xwsioS 10.0.0.2 :Craig Edwards */ send_cmd(ServerName, "NICK %ld %s %s %s %s +%s 0.0.0.0 :%s",(long int) time(NULL),nick,ServiceHost,ServiceHost,ServiceUser,modes,name); send_cmd(ServerName, "OPERTYPE Service"); } @@ -1327,11 +1331,11 @@ int anope_event_nick(char *source, int ac, char **av) if (ac != 1) { if (ac == 8) { inet_aton(av[6],&addy); - user = do_nick("", av[1], // nick - av[4], // username - av[2], // realhost - source, // server - av[7], // realname + user = do_nick("", av[1], /* nick */ + av[4], /* username */ + av[2], /* realhost */ + source, /* server */ + av[7], /* realname */ strtoul(av[0], NULL, 10), 0, htonl(*ad), diff --git a/src/users.c b/src/users.c index 228a3fec1..1bdfd93dd 100644 --- a/src/users.c +++ b/src/users.c @@ -482,7 +482,7 @@ User *do_nick(const char *source, char *nick, char *username, char *host, char *server, char *realname, time_t ts, uint32 svid, uint32 ip, char *vhost, char *uid) { - User *user; + User *user = NULL; char *tmp = NULL; NickAlias *old_na; /* Old nick rec */ diff --git a/version.log b/version.log index 763764366..5e36263e4 100644 --- a/version.log +++ b/version.log @@ -9,10 +9,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="14" VERSION_EXTRA="" -VERSION_BUILD="1047" +VERSION_BUILD="1048" # $Log$ # +# BUILD : 1.7.14 (1048) +# BUGS : 510 +# NOTES : Fixed a lot of redundant function declarations +# # BUILD : 1.7.14 (1047) # BUGS : 464 # NOTES : Added cleanup code to tools/anopesmtp to clear out used memory etc... |