From 3779ed916a1bf70d744a7ba6ac5fa31862057d0f Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 21 Sep 2012 21:39:32 -0400 Subject: Made all module functions static to fix OSX's linker from linking modules with similar function names to each other which causes complete and total chaos. --- src/core/bs_act.c | 8 ++-- src/core/bs_assign.c | 8 ++-- src/core/bs_badwords.c | 20 ++++----- src/core/bs_bot.c | 16 +++---- src/core/bs_botlist.c | 8 ++-- src/core/bs_fantasy.c | 4 +- src/core/bs_fantasy_kick.c | 4 +- src/core/bs_fantasy_kickban.c | 4 +- src/core/bs_fantasy_owner.c | 4 +- src/core/bs_fantasy_seen.c | 4 +- src/core/bs_help.c | 4 +- src/core/bs_info.c | 12 +++--- src/core/bs_kick.c | 8 ++-- src/core/bs_say.c | 8 ++-- src/core/bs_set.c | 8 ++-- src/core/bs_unassign.c | 8 ++-- src/core/cs_access.c | 12 +++--- src/core/cs_akick.c | 24 +++++------ src/core/cs_ban.c | 12 +++--- src/core/cs_clear.c | 8 ++-- src/core/cs_drop.c | 8 ++-- src/core/cs_forbid.c | 8 ++-- src/core/cs_getkey.c | 8 ++-- src/core/cs_getpass.c | 8 ++-- src/core/cs_help.c | 4 +- src/core/cs_identify.c | 8 ++-- src/core/cs_info.c | 8 ++-- src/core/cs_invite.c | 8 ++-- src/core/cs_kick.c | 8 ++-- src/core/cs_list.c | 8 ++-- src/core/cs_logout.c | 12 +++--- src/core/cs_modes.c | 48 ++++++++++----------- src/core/cs_register.c | 8 ++-- src/core/cs_sendpass.c | 8 ++-- src/core/cs_set.c | 92 ++++++++++++++++++++--------------------- src/core/cs_status.c | 8 ++-- src/core/cs_suspend.c | 12 +++--- src/core/cs_topic.c | 8 ++-- src/core/cs_xop.c | 34 +++++++-------- src/core/enc_md5.c | 16 +++---- src/core/enc_none.c | 16 +++---- src/core/enc_old.c | 12 +++--- src/core/enc_sha1.c | 24 +++++------ src/core/he_help.c | 4 +- src/core/hs_del.c | 8 ++-- src/core/hs_delall.c | 8 ++-- src/core/hs_group.c | 8 ++-- src/core/hs_help.c | 4 +- src/core/hs_list.c | 8 ++-- src/core/hs_off.c | 8 ++-- src/core/hs_on.c | 8 ++-- src/core/hs_set.c | 8 ++-- src/core/hs_setall.c | 8 ++-- src/core/ms_cancel.c | 8 ++-- src/core/ms_check.c | 8 ++-- src/core/ms_del.c | 12 +++--- src/core/ms_help.c | 4 +- src/core/ms_info.c | 8 ++-- src/core/ms_list.c | 16 +++---- src/core/ms_read.c | 16 +++---- src/core/ms_rsend.c | 8 ++-- src/core/ms_send.c | 8 ++-- src/core/ms_sendall.c | 8 ++-- src/core/ms_set.c | 16 +++---- src/core/ms_staff.c | 8 ++-- src/core/ns_access.c | 8 ++-- src/core/ns_alist.c | 8 ++-- src/core/ns_drop.c | 12 +++--- src/core/ns_forbid.c | 8 ++-- src/core/ns_getemail.c | 8 ++-- src/core/ns_getpass.c | 8 ++-- src/core/ns_ghost.c | 8 ++-- src/core/ns_group.c | 20 ++++----- src/core/ns_help.c | 4 +- src/core/ns_identify.c | 8 ++-- src/core/ns_info.c | 6 +-- src/core/ns_list.c | 8 ++-- src/core/ns_logout.c | 8 ++-- src/core/ns_recover.c | 12 +++--- src/core/ns_register.c | 20 ++++----- src/core/ns_release.c | 12 +++--- src/core/ns_saset.c | 64 ++++++++++++++-------------- src/core/ns_sendpass.c | 8 ++-- src/core/ns_set.c | 60 +++++++++++++-------------- src/core/ns_status.c | 8 ++-- src/core/ns_suspend.c | 12 +++--- src/core/ns_update.c | 8 ++-- src/core/os_admin.c | 16 +++---- src/core/os_akill.c | 24 +++++------ src/core/os_chankill.c | 8 ++-- src/core/os_chanlist.c | 8 ++-- src/core/os_clearmodes.c | 8 ++-- src/core/os_defcon.c | 12 +++--- src/core/os_global.c | 8 ++-- src/core/os_help.c | 4 +- src/core/os_ignore.c | 12 +++--- src/core/os_jupe.c | 8 ++-- src/core/os_kick.c | 8 ++-- src/core/os_logonnews.c | 10 ++--- src/core/os_mode.c | 8 ++-- src/core/os_modinfo.c | 16 +++---- src/core/os_modlist.c | 8 ++-- src/core/os_modload.c | 8 ++-- src/core/os_modunload.c | 8 ++-- src/core/os_noop.c | 8 ++-- src/core/os_oline.c | 8 ++-- src/core/os_oper.c | 16 +++---- src/core/os_opernews.c | 10 ++--- src/core/os_quit.c | 8 ++-- src/core/os_randomnews.c | 4 +- src/core/os_raw.c | 4 +- src/core/os_reload.c | 8 ++-- src/core/os_restart.c | 8 ++-- src/core/os_session.c | 4 +- src/core/os_set.c | 8 ++-- src/core/os_sgline.c | 24 +++++------ src/core/os_shutdown.c | 8 ++-- src/core/os_sqline.c | 24 +++++------ src/core/os_staff.c | 16 +++---- src/core/os_stats.c | 14 +++---- src/core/os_svsnick.c | 8 ++-- src/core/os_szline.c | 24 +++++------ src/core/os_umode.c | 8 ++-- src/core/os_update.c | 8 ++-- src/core/os_userlist.c | 8 ++-- src/modules/bs_fantasy_unban.c | 4 +- src/modules/cs_appendtopic.c | 16 +++---- src/modules/cs_enforce.c | 26 ++++++------ src/modules/cs_tban.c | 36 ++++++++-------- src/modules/hs_request.c | 94 +++++++++++++++++++++--------------------- src/modules/ns_maxemail.c | 36 ++++++++-------- src/modules/ns_noop_convert.c | 26 ++++++------ src/modules/os_ignore_db.c | 54 ++++++++++++------------ src/modules/os_info.c | 60 +++++++++++++-------------- 134 files changed, 911 insertions(+), 911 deletions(-) (limited to 'src') diff --git a/src/core/bs_act.c b/src/core/bs_act.c index b55200386..c3cdbefc2 100644 --- a/src/core/bs_act.c +++ b/src/core/bs_act.c @@ -14,8 +14,8 @@ #include "module.h" -int do_act(User * u); -void myBotServHelp(User * u); +static int do_act(User * u); +static void myBotServHelp(User * u); /** * Create the command, and tell anope about it. @@ -50,7 +50,7 @@ void AnopeFini(void) * Add the help response to Anopes /bs help output. * @param u The user who is requesting help **/ -void myBotServHelp(User * u) +static void myBotServHelp(User * u) { notice_lang(s_BotServ, u, BOT_HELP_CMD_ACT); } @@ -60,7 +60,7 @@ void myBotServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_act(User * u) +static int do_act(User * u) { ChannelInfo *ci; diff --git a/src/core/bs_assign.c b/src/core/bs_assign.c index aee9da128..f3aad65d1 100644 --- a/src/core/bs_assign.c +++ b/src/core/bs_assign.c @@ -14,8 +14,8 @@ #include "module.h" -int do_assign(User * u); -void myBotServHelp(User * u); +static int do_assign(User * u); +static void myBotServHelp(User * u); /** * Create the command, and tell anope about it. @@ -52,7 +52,7 @@ void AnopeFini(void) * Add the help response to Anopes /bs help output. * @param u The user who is requesting help **/ -void myBotServHelp(User * u) +static void myBotServHelp(User * u) { notice_lang(s_BotServ, u, BOT_HELP_CMD_ASSIGN); } @@ -62,7 +62,7 @@ void myBotServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_assign(User * u) +static int do_assign(User * u) { char *chan = strtok(NULL, " "); char *nick = strtok(NULL, " "); diff --git a/src/core/bs_badwords.c b/src/core/bs_badwords.c index 051a352df..f469fad03 100644 --- a/src/core/bs_badwords.c +++ b/src/core/bs_badwords.c @@ -14,11 +14,11 @@ #include "module.h" -int do_badwords(User * u); -void myBotServHelp(User * u); -int badwords_del_callback(User * u, int num, va_list args); -int badwords_list(User * u, int index, ChannelInfo * ci, int *sent_header); -int badwords_list_callback(User * u, int num, va_list args); +static int do_badwords(User * u); +static void myBotServHelp(User * u); +static int badwords_del_callback(User * u, int num, va_list args); +static int badwords_list(User * u, int index, ChannelInfo * ci, int *sent_header); +static int badwords_list_callback(User * u, int num, va_list args); /** * Create the command, and tell anope about it. @@ -57,7 +57,7 @@ void AnopeFini(void) * Add the help response to Anopes /bs help output. * @param u The user who is requesting help **/ -void myBotServHelp(User * u) +static void myBotServHelp(User * u) { notice_lang(s_BotServ, u, BOT_HELP_CMD_BADWORDS); } @@ -67,7 +67,7 @@ void myBotServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_badwords(User * u) +static int do_badwords(User * u) { char *chan = strtok(NULL, " "); char *cmd = strtok(NULL, " "); @@ -283,7 +283,7 @@ int do_badwords(User * u) return MOD_CONT; } -int badwords_del_callback(User * u, int num, va_list args) +static int badwords_del_callback(User * u, int num, va_list args) { BadWord *bw; ChannelInfo *ci = va_arg(args, ChannelInfo *); @@ -303,7 +303,7 @@ int badwords_del_callback(User * u, int num, va_list args) return 1; } -int badwords_list(User * u, int index, ChannelInfo * ci, int *sent_header) +static int badwords_list(User * u, int index, ChannelInfo * ci, int *sent_header) { BadWord *bw = &ci->badwords[index]; @@ -325,7 +325,7 @@ int badwords_list(User * u, int index, ChannelInfo * ci, int *sent_header) return 1; } -int badwords_list_callback(User * u, int num, va_list args) +static int badwords_list_callback(User * u, int num, va_list args) { ChannelInfo *ci = va_arg(args, ChannelInfo *); int *sent_header = va_arg(args, int *); diff --git a/src/core/bs_bot.c b/src/core/bs_bot.c index 7f9f0b75c..809c60d98 100644 --- a/src/core/bs_bot.c +++ b/src/core/bs_bot.c @@ -14,10 +14,10 @@ #include "module.h" -int do_bot(User * u); -int delbot(BotInfo * bi); -void myBotServHelp(User * u); -void change_bot_nick(BotInfo * bi, char *newnick); +static int do_bot(User * u); +static int delbot(BotInfo * bi); +static void myBotServHelp(User * u); +static void change_bot_nick(BotInfo * bi, char *newnick); /** * Create the command, and tell anope about it. @@ -56,7 +56,7 @@ void AnopeFini(void) * Add the help response to Anopes /bs help output. * @param u The user who is requesting help **/ -void myBotServHelp(User * u) +static void myBotServHelp(User * u) { if (is_services_admin(u)) { notice_lang(s_BotServ, u, BOT_HELP_CMD_BOT); @@ -68,7 +68,7 @@ void myBotServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_bot(User * u) +static int do_bot(User * u) { BotInfo *bi; char *cmd = strtok(NULL, " "); @@ -349,7 +349,7 @@ int do_bot(User * u) return MOD_CONT; } -int delbot(BotInfo * bi) +static int delbot(BotInfo * bi) { cs_remove_bot(bi); @@ -372,7 +372,7 @@ int delbot(BotInfo * bi) return 1; } -void change_bot_nick(BotInfo * bi, char *newnick) +static void change_bot_nick(BotInfo * bi, char *newnick) { if (bi->next) bi->next->prev = bi->prev; diff --git a/src/core/bs_botlist.c b/src/core/bs_botlist.c index ed407df46..4a4abed56 100644 --- a/src/core/bs_botlist.c +++ b/src/core/bs_botlist.c @@ -14,8 +14,8 @@ #include "module.h" -int do_botlist(User * u); -void myBotServHelp(User * u); +static int do_botlist(User * u); +static void myBotServHelp(User * u); /** * Create the botlist command, and tell anope about it. @@ -53,7 +53,7 @@ void AnopeFini(void) * Add the help response to Anopes /bs help output. * @param u The user who is requesting help **/ -void myBotServHelp(User * u) +static void myBotServHelp(User * u) { notice_lang(s_BotServ, u, BOT_HELP_CMD_BOTLIST); } @@ -63,7 +63,7 @@ void myBotServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_botlist(User * u) +static int do_botlist(User * u) { int i, count = 0; BotInfo *bi; diff --git a/src/core/bs_fantasy.c b/src/core/bs_fantasy.c index c8fa9dad8..d0b7d711c 100644 --- a/src/core/bs_fantasy.c +++ b/src/core/bs_fantasy.c @@ -14,7 +14,7 @@ #include "module.h" -int do_fantasy(int argc, char **argv); +static int do_fantasy(int argc, char **argv); /** * Create the hook, and tell anope about it. @@ -49,7 +49,7 @@ void AnopeFini(void) * @param argv Argument list * @return MOD_CONT or MOD_STOP **/ -int do_fantasy(int argc, char **argv) +static int do_fantasy(int argc, char **argv) { User *u; ChannelInfo *ci; diff --git a/src/core/bs_fantasy_kick.c b/src/core/bs_fantasy_kick.c index 3953bc671..568a09368 100644 --- a/src/core/bs_fantasy_kick.c +++ b/src/core/bs_fantasy_kick.c @@ -14,7 +14,7 @@ #include "module.h" -int do_fantasy(int argc, char **argv); +static int do_fantasy(int argc, char **argv); /** * Create the hook, and tell anope about it. @@ -51,7 +51,7 @@ void AnopeFini(void) * @param argv Argument list * @return MOD_CONT or MOD_STOP **/ -int do_fantasy(int argc, char **argv) +static int do_fantasy(int argc, char **argv) { User *u, *u2; ChannelInfo *ci; diff --git a/src/core/bs_fantasy_kickban.c b/src/core/bs_fantasy_kickban.c index 52d7b82ab..9c85468d1 100644 --- a/src/core/bs_fantasy_kickban.c +++ b/src/core/bs_fantasy_kickban.c @@ -14,7 +14,7 @@ #include "module.h" -int do_fantasy(int argc, char **argv); +static int do_fantasy(int argc, char **argv); /** * Create the hook, and tell anope about it. @@ -51,7 +51,7 @@ void AnopeFini(void) * @param argv Argument list * @return MOD_CONT or MOD_STOP **/ -int do_fantasy(int argc, char **argv) +static int do_fantasy(int argc, char **argv) { User *u, *u2; ChannelInfo *ci; diff --git a/src/core/bs_fantasy_owner.c b/src/core/bs_fantasy_owner.c index b1da5858e..f541c0b49 100644 --- a/src/core/bs_fantasy_owner.c +++ b/src/core/bs_fantasy_owner.c @@ -14,7 +14,7 @@ #include "module.h" -int do_fantasy(int argc, char **argv); +static int do_fantasy(int argc, char **argv); /** * Create the hook, and tell anope about it. @@ -51,7 +51,7 @@ void AnopeFini(void) * @param argv Argument list * @return MOD_CONT or MOD_STOP **/ -int do_fantasy(int argc, char **argv) +static int do_fantasy(int argc, char **argv) { User *u; ChannelInfo *ci; diff --git a/src/core/bs_fantasy_seen.c b/src/core/bs_fantasy_seen.c index 9b0beca85..f8395168c 100644 --- a/src/core/bs_fantasy_seen.c +++ b/src/core/bs_fantasy_seen.c @@ -14,7 +14,7 @@ #include "module.h" -int do_fantasy(int argc, char **argv); +static int do_fantasy(int argc, char **argv); /** * Create the hook, and tell anope about it. @@ -51,7 +51,7 @@ void AnopeFini(void) * @param argv Argument list * @return MOD_CONT or MOD_STOP **/ -int do_fantasy(int argc, char **argv) +static int do_fantasy(int argc, char **argv) { User *u; ChannelInfo *ci; diff --git a/src/core/bs_help.c b/src/core/bs_help.c index cd17a7d3a..7a4cec85f 100644 --- a/src/core/bs_help.c +++ b/src/core/bs_help.c @@ -14,7 +14,7 @@ #include "module.h" -int do_help(User * u); +static int do_help(User * u); /** * Create the help command, and tell anope about it. @@ -51,7 +51,7 @@ void AnopeFini(void) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_help(User * u) +static int do_help(User * u) { char *cmd = strtok(NULL, ""); diff --git a/src/core/bs_info.c b/src/core/bs_info.c index 0151e9228..9afb5d093 100644 --- a/src/core/bs_info.c +++ b/src/core/bs_info.c @@ -14,9 +14,9 @@ #include "module.h" -int do_info(User * u); -void send_bot_channels(User * u, BotInfo * bi); -void myBotServHelp(User * u); +static int do_info(User * u); +static void send_bot_channels(User * u, BotInfo * bi); +static void myBotServHelp(User * u); /** * Create the info command, and tell anope about it. @@ -54,7 +54,7 @@ void AnopeFini(void) * Add the help response to Anopes /bs help output. * @param u The user who is requesting help **/ -void myBotServHelp(User * u) +static void myBotServHelp(User * u) { notice_lang(s_BotServ, u, BOT_HELP_CMD_INFO); } @@ -64,7 +64,7 @@ void myBotServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_info(User * u) +static int do_info(User * u) { BotInfo *bi; ChannelInfo *ci; @@ -251,7 +251,7 @@ int do_info(User * u) return MOD_CONT; } -void send_bot_channels(User * u, BotInfo * bi) +static void send_bot_channels(User * u, BotInfo * bi) { int i; ChannelInfo *ci; diff --git a/src/core/bs_kick.c b/src/core/bs_kick.c index 983a114f8..d77afb960 100644 --- a/src/core/bs_kick.c +++ b/src/core/bs_kick.c @@ -14,9 +14,9 @@ #include "module.h" -int do_kickcmd(User * u); +static int do_kickcmd(User * u); -void myBotServHelp(User * u); +static void myBotServHelp(User * u); /** * Create the command, and tell anope about it. @@ -79,7 +79,7 @@ void AnopeFini(void) * Add the help response to Anopes /bs help output. * @param u The user who is requesting help **/ -void myBotServHelp(User * u) +static void myBotServHelp(User * u) { notice_lang(s_BotServ, u, BOT_HELP_CMD_KICK); } @@ -89,7 +89,7 @@ void myBotServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_kickcmd(User * u) +static int do_kickcmd(User * u) { char *chan = strtok(NULL, " "); char *option = strtok(NULL, " "); diff --git a/src/core/bs_say.c b/src/core/bs_say.c index ba89337f2..885f927d2 100644 --- a/src/core/bs_say.c +++ b/src/core/bs_say.c @@ -14,8 +14,8 @@ #include "module.h" -int do_say(User * u); -void myBotServHelp(User * u); +static int do_say(User * u); +static void myBotServHelp(User * u); /** * Create the command, and tell anope about it. @@ -52,7 +52,7 @@ void AnopeFini(void) * Add the help response to Anopes /bs help output. * @param u The user who is requesting help **/ -void myBotServHelp(User * u) +static void myBotServHelp(User * u) { notice_lang(s_BotServ, u, BOT_HELP_CMD_SAY); } @@ -62,7 +62,7 @@ void myBotServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_say(User * u) +static int do_say(User * u) { ChannelInfo *ci; diff --git a/src/core/bs_set.c b/src/core/bs_set.c index 7f6ad7ac6..68cf8cb93 100644 --- a/src/core/bs_set.c +++ b/src/core/bs_set.c @@ -14,8 +14,8 @@ #include "module.h" -int do_set(User * u); -void myBotServHelp(User * u); +static int do_set(User * u); +static void myBotServHelp(User * u); /** * Create the command, and tell anope about it. @@ -79,7 +79,7 @@ void AnopeFini(void) * Add the help response to Anopes /bs help output. * @param u The user who is requesting help **/ -void myBotServHelp(User * u) +static void myBotServHelp(User * u) { notice_lang(s_BotServ, u, BOT_HELP_CMD_SET); } @@ -89,7 +89,7 @@ void myBotServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_set(User * u) +static int do_set(User * u) { char *chan = strtok(NULL, " "); char *option = strtok(NULL, " "); diff --git a/src/core/bs_unassign.c b/src/core/bs_unassign.c index af4728082..25d0fb65f 100644 --- a/src/core/bs_unassign.c +++ b/src/core/bs_unassign.c @@ -14,8 +14,8 @@ #include "module.h" -int do_unassign(User * u); -void myBotServHelp(User * u); +static int do_unassign(User * u); +static void myBotServHelp(User * u); /** * Create the unassign command, and tell anope about it. @@ -53,7 +53,7 @@ void AnopeFini(void) * Add the help response to Anopes /bs help output. * @param u The user who is requesting help **/ -void myBotServHelp(User * u) +static void myBotServHelp(User * u) { notice_lang(s_BotServ, u, BOT_HELP_CMD_UNASSIGN); } @@ -63,7 +63,7 @@ void myBotServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_unassign(User * u) +static int do_unassign(User * u) { char *chan = strtok(NULL, " "); ChannelInfo *ci; diff --git a/src/core/cs_access.c b/src/core/cs_access.c index df0ff6948..cc1a81c10 100644 --- a/src/core/cs_access.c +++ b/src/core/cs_access.c @@ -15,10 +15,10 @@ #include "module.h" -int do_access(User * u); -int do_levels(User * u); +static int do_access(User * u); +static int do_levels(User * u); -void myChanServHelp(User * u); +static void myChanServHelp(User * u); /** * Create the command, and tell anope about it. @@ -63,7 +63,7 @@ void AnopeFini(void) * Add the help response to anopes /cs help output. * @param u The user who is requesting help **/ -void myChanServHelp(User * u) +static void myChanServHelp(User * u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_ACCESS); notice_lang(s_ChanServ, u, CHAN_HELP_CMD_LEVELS); @@ -139,7 +139,7 @@ static int access_list_callback(User * u, int num, va_list args) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_access(User * u) +static int do_access(User * u) { char *chan = strtok(NULL, " "); char *cmd = strtok(NULL, " "); @@ -395,7 +395,7 @@ int do_access(User * u) } -int do_levels(User * u) +static int do_levels(User * u) { char *chan = strtok(NULL, " "); char *cmd = strtok(NULL, " "); diff --git a/src/core/cs_akick.c b/src/core/cs_akick.c index dfaaa0896..36ca62e60 100644 --- a/src/core/cs_akick.c +++ b/src/core/cs_akick.c @@ -15,9 +15,9 @@ #include "module.h" -int do_akick(User * u); -void myChanServHelp(User * u); -int get_access_nc(NickCore *nc, ChannelInfo *ci); +static int do_akick(User * u); +static void myChanServHelp(User * u); +static int get_access_nc(NickCore *nc, ChannelInfo *ci); /** * Create the command, and tell anope about it. @@ -56,7 +56,7 @@ void AnopeFini(void) * Add the help response to anopes /cs help output. * @param u The user who is requesting help **/ -void myChanServHelp(User * u) +static void myChanServHelp(User * u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_AKICK); } @@ -67,7 +67,7 @@ void myChanServHelp(User * u) * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ /* `last' is set to the last index this routine was called with */ -int akick_del(User * u, AutoKick * akick) +static int akick_del(User * u, AutoKick * akick) { if (!(akick->flags & AK_USED)) return 0; @@ -90,7 +90,7 @@ int akick_del(User * u, AutoKick * akick) return 1; } -int akick_del_callback(User * u, int num, va_list args) +static int akick_del_callback(User * u, int num, va_list args) { ChannelInfo *ci = va_arg(args, ChannelInfo *); int *last = va_arg(args, int *); @@ -104,7 +104,7 @@ int akick_del_callback(User * u, int num, va_list args) } -int akick_list(User * u, int index, ChannelInfo * ci, int *sent_header) +static int akick_list(User * u, int index, ChannelInfo * ci, int *sent_header) { AutoKick *akick = &ci->akick[index]; @@ -123,7 +123,7 @@ int akick_list(User * u, int index, ChannelInfo * ci, int *sent_header) return 1; } -int akick_list_callback(User * u, int num, va_list args) +static int akick_list_callback(User * u, int num, va_list args) { ChannelInfo *ci = va_arg(args, ChannelInfo *); int *sent_header = va_arg(args, int *); @@ -132,7 +132,7 @@ int akick_list_callback(User * u, int num, va_list args) return akick_list(u, num - 1, ci, sent_header); } -int akick_view(User * u, int index, ChannelInfo * ci, int *sent_header) +static int akick_view(User * u, int index, ChannelInfo * ci, int *sent_header) { AutoKick *akick = &ci->akick[index]; char timebuf[64]; @@ -167,7 +167,7 @@ int akick_view(User * u, int index, ChannelInfo * ci, int *sent_header) return 1; } -int akick_view_callback(User * u, int num, va_list args) +static int akick_view_callback(User * u, int num, va_list args) { ChannelInfo *ci = va_arg(args, ChannelInfo *); int *sent_header = va_arg(args, int *); @@ -178,7 +178,7 @@ int akick_view_callback(User * u, int num, va_list args) -int do_akick(User * u) +static int do_akick(User * u) { char *chan = strtok(NULL, " "); char *cmd = strtok(NULL, " "); @@ -668,7 +668,7 @@ int do_akick(User * u) } -int get_access_nc(NickCore *nc, ChannelInfo *ci) +static int get_access_nc(NickCore *nc, ChannelInfo *ci) { ChanAccess *access; if (!ci || !nc) diff --git a/src/core/cs_ban.c b/src/core/cs_ban.c index 48cfb6f80..cf0617e4d 100644 --- a/src/core/cs_ban.c +++ b/src/core/cs_ban.c @@ -14,9 +14,9 @@ #include "module.h" -int do_unban(User * u); -int do_ban(User * u); -void myChanServHelp(User * u); +static int do_unban(User * u); +static int do_ban(User * u); +static void myChanServHelp(User * u); /** * Create the command, and tell anope about it. @@ -57,7 +57,7 @@ void AnopeFini(void) * Add the help response to anopes /cs help output. * @param u The user who is requesting help **/ -void myChanServHelp(User * u) +static void myChanServHelp(User * u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_BAN); notice_lang(s_ChanServ, u, CHAN_HELP_CMD_UNBAN); @@ -68,7 +68,7 @@ void myChanServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_ban(User * u) +static int do_ban(User * u) { char *chan = strtok(NULL, " "); char *params = strtok(NULL, " "); @@ -202,7 +202,7 @@ int do_ban(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_unban(User * u) +static int do_unban(User * u) { char *chan = strtok(NULL, " "); Channel *c; diff --git a/src/core/cs_clear.c b/src/core/cs_clear.c index 2554aeab0..fc0f4ee56 100644 --- a/src/core/cs_clear.c +++ b/src/core/cs_clear.c @@ -14,8 +14,8 @@ #include "module.h" -int do_clear(User * u); -void myChanServHelp(User * u); +static int do_clear(User * u); +static void myChanServHelp(User * u); /** * Create the command, and tell anope about it. @@ -54,7 +54,7 @@ void AnopeFini(void) * Add the help response to anopes /cs help output. * @param u The user who is requesting help **/ -void myChanServHelp(User * u) +static void myChanServHelp(User * u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_CLEAR); } @@ -64,7 +64,7 @@ void myChanServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_clear(User * u) +static int do_clear(User * u) { char *chan = strtok(NULL, " "); char *what = strtok(NULL, " "); diff --git a/src/core/cs_drop.c b/src/core/cs_drop.c index cf0cc7011..0d2ed8b96 100644 --- a/src/core/cs_drop.c +++ b/src/core/cs_drop.c @@ -14,8 +14,8 @@ #include "module.h" -int do_drop(User * u); -void myChanServHelp(User * u); +static int do_drop(User * u); +static void myChanServHelp(User * u); /** * Create the command, and tell anope about it. @@ -54,7 +54,7 @@ void AnopeFini(void) * Add the help response to anopes /cs help output. * @param u The user who is requesting help **/ -void myChanServHelp(User * u) +static void myChanServHelp(User * u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_DROP); } @@ -64,7 +64,7 @@ void myChanServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_drop(User * u) +static int do_drop(User * u) { char *chan = strtok(NULL, " "); ChannelInfo *ci; diff --git a/src/core/cs_forbid.c b/src/core/cs_forbid.c index 9dc9be5b6..6ca8f87ef 100644 --- a/src/core/cs_forbid.c +++ b/src/core/cs_forbid.c @@ -14,8 +14,8 @@ #include "module.h" -int do_forbid(User * u); -void myChanServHelp(User * u); +static int do_forbid(User * u); +static void myChanServHelp(User * u); /** * Create the command, and tell anope about it. @@ -53,7 +53,7 @@ void AnopeFini(void) * Add the help response to anopes /cs help output. * @param u The user who is requesting help **/ -void myChanServHelp(User * u) +static void myChanServHelp(User * u) { if (is_services_admin(u)) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_FORBID); @@ -65,7 +65,7 @@ void myChanServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_forbid(User * u) +static int do_forbid(User * u) { Channel *c; ChannelInfo *ci; diff --git a/src/core/cs_getkey.c b/src/core/cs_getkey.c index 431edc12b..427a8222f 100644 --- a/src/core/cs_getkey.c +++ b/src/core/cs_getkey.c @@ -14,8 +14,8 @@ #include "module.h" -int do_getkey(User * u); -void myChanServHelp(User * u); +static int do_getkey(User * u); +static void myChanServHelp(User * u); /** * Create the command, and tell anope about it. @@ -54,7 +54,7 @@ void AnopeFini(void) * Add the help response to anopes /cs help output. * @param u The user who is requesting help **/ -void myChanServHelp(User * u) +static void myChanServHelp(User * u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_GETKEY); } @@ -64,7 +64,7 @@ void myChanServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_getkey(User * u) +static int do_getkey(User * u) { char *chan = strtok(NULL, " "); ChannelInfo *ci; diff --git a/src/core/cs_getpass.c b/src/core/cs_getpass.c index fc59c385c..327fce6a0 100644 --- a/src/core/cs_getpass.c +++ b/src/core/cs_getpass.c @@ -14,8 +14,8 @@ #include "module.h" -int do_getpass(User * u); -void myChanServHelp(User * u); +static int do_getpass(User * u); +static void myChanServHelp(User * u); /** * Create the command, and tell anope about it. @@ -55,7 +55,7 @@ void AnopeFini(void) * Add the help response to anopes /cs help output. * @param u The user who is requesting help **/ -void myChanServHelp(User * u) +static void myChanServHelp(User * u) { if (is_services_admin(u)) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_GETPASS); @@ -68,7 +68,7 @@ void myChanServHelp(User * u) * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_getpass(User * u) +static int do_getpass(User * u) { char *chan = strtok(NULL, " "); char tmp_pass[PASSMAX]; diff --git a/src/core/cs_help.c b/src/core/cs_help.c index 622a10742..d35050a49 100644 --- a/src/core/cs_help.c +++ b/src/core/cs_help.c @@ -14,7 +14,7 @@ #include "module.h" -int do_help(User * u); +static int do_help(User * u); /** * Create the off command, and tell anope about it. @@ -49,7 +49,7 @@ void AnopeFini(void) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_help(User * u) +static int do_help(User * u) { char *cmd = strtok(NULL, ""); diff --git a/src/core/cs_identify.c b/src/core/cs_identify.c index 0e7231e1d..ad0280fe8 100644 --- a/src/core/cs_identify.c +++ b/src/core/cs_identify.c @@ -14,8 +14,8 @@ #include "module.h" -int do_identify(User * u); -void myChanServHelp(User * u); +static int do_identify(User * u); +static void myChanServHelp(User * u); /** * Create the command, and tell anope about it. @@ -58,7 +58,7 @@ void AnopeFini(void) * Add the help response to anopes /cs help output. * @param u The user who is requesting help **/ -void myChanServHelp(User * u) +static void myChanServHelp(User * u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_IDENTIFY); } @@ -68,7 +68,7 @@ void myChanServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_identify(User * u) +static int do_identify(User * u) { char *chan = strtok(NULL, " "); char *pass = strtok(NULL, " "); diff --git a/src/core/cs_info.c b/src/core/cs_info.c index 62cf6219c..e297fb468 100644 --- a/src/core/cs_info.c +++ b/src/core/cs_info.c @@ -14,8 +14,8 @@ #include "module.h" -int do_info(User * u); -void myChanServHelp(User * u); +static int do_info(User * u); +static void myChanServHelp(User * u); /** * Create the command, and tell anope about it. @@ -55,7 +55,7 @@ void AnopeFini(void) * Add the help response to anopes /cs help output. * @param u The user who is requesting help **/ -void myChanServHelp(User * u) +static void myChanServHelp(User * u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_INFO); } @@ -65,7 +65,7 @@ void myChanServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_info(User * u) +static int do_info(User * u) { /* SADMINS and users, who have identified for a channel, can now cause it's * Enstry Message and Successor to be displayed by supplying the ALL parameter. diff --git a/src/core/cs_invite.c b/src/core/cs_invite.c index 1173fafcb..944ab26c8 100644 --- a/src/core/cs_invite.c +++ b/src/core/cs_invite.c @@ -14,8 +14,8 @@ #include "module.h" -void myChanServHelp(User * u); -int do_invite(User * u); +static void myChanServHelp(User * u); +static int do_invite(User * u); /** * Create the command, and tell anope about it. @@ -54,7 +54,7 @@ void AnopeFini(void) * Add the help response to anopes /cs help output. * @param u The user who is requesting help **/ -void myChanServHelp(User * u) +static void myChanServHelp(User * u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_INVITE); } @@ -64,7 +64,7 @@ void myChanServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_invite(User * u) +static int do_invite(User * u) { char *chan = strtok(NULL, " "); Channel *c; diff --git a/src/core/cs_kick.c b/src/core/cs_kick.c index 7b2fb212f..96c520278 100644 --- a/src/core/cs_kick.c +++ b/src/core/cs_kick.c @@ -14,8 +14,8 @@ #include "module.h" -int do_cs_kick(User * u); -void myChanServHelp(User * u); +static int do_cs_kick(User * u); +static void myChanServHelp(User * u); /** * Create the command, and tell anope about it. @@ -52,7 +52,7 @@ void AnopeFini(void) * Add the help response to anopes /cs help output. * @param u The user who is requesting help **/ -void myChanServHelp(User * u) +static void myChanServHelp(User * u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_KICK); } @@ -62,7 +62,7 @@ void myChanServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_cs_kick(User * u) +static int do_cs_kick(User * u) { char *chan = strtok(NULL, " "); char *params = strtok(NULL, " "); diff --git a/src/core/cs_list.c b/src/core/cs_list.c index 08a47a803..49f01be1f 100644 --- a/src/core/cs_list.c +++ b/src/core/cs_list.c @@ -14,8 +14,8 @@ #include "module.h" -int do_list(User * u); -void myChanServHelp(User * u); +static int do_list(User * u); +static void myChanServHelp(User * u); /** * Create the command, and tell anope about it. @@ -56,7 +56,7 @@ void AnopeFini(void) * Add the help response to anopes /cs help output. * @param u The user who is requesting help **/ -void myChanServHelp(User * u) +static void myChanServHelp(User * u) { if (!CSListOpersOnly || (is_oper(u))) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_LIST); @@ -68,7 +68,7 @@ void myChanServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_list(User * u) +static int do_list(User * u) { char *pattern = strtok(NULL, " "); int spattern_size; diff --git a/src/core/cs_logout.c b/src/core/cs_logout.c index 597213d8a..e20ac4d94 100644 --- a/src/core/cs_logout.c +++ b/src/core/cs_logout.c @@ -14,9 +14,9 @@ #include "module.h" -int do_logout(User * u); -void myChanServHelp(User * u); -void make_unidentified(User * u, ChannelInfo * ci); +static int do_logout(User * u); +static void myChanServHelp(User * u); +static void make_unidentified(User * u, ChannelInfo * ci); /** * Create the command, and tell anope about it. @@ -56,7 +56,7 @@ void AnopeFini(void) * Add the help response to anopes /cs help output. * @param u The user who is requesting help **/ -void myChanServHelp(User * u) +static void myChanServHelp(User * u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_LOGOUT); } @@ -66,7 +66,7 @@ void myChanServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_logout(User * u) +static int do_logout(User * u) { char *chan = strtok(NULL, " "); char *nick = strtok(NULL, " "); @@ -108,7 +108,7 @@ int do_logout(User * u) return MOD_CONT; } -void make_unidentified(User * u, ChannelInfo * ci) +static void make_unidentified(User * u, ChannelInfo * ci) { struct u_chaninfolist *uci; diff --git a/src/core/cs_modes.c b/src/core/cs_modes.c index 7587adcc1..15a9eadd7 100644 --- a/src/core/cs_modes.c +++ b/src/core/cs_modes.c @@ -14,18 +14,18 @@ #include "module.h" -void myChanServHelp(User * u); -int do_util(User * u, CSModeUtil * util); -int do_op(User * u); -int do_deop(User * u); -int do_voice(User * u); -int do_devoice(User * u); -int do_halfop(User * u); -int do_dehalfop(User * u); -int do_protect(User * u); -int do_deprotect(User * u); -int do_owner(User * u); -int do_deowner(User * u); +static void myChanServHelp(User * u); +static int do_util(User * u, CSModeUtil * util); +static int do_op(User * u); +static int do_deop(User * u); +static int do_voice(User * u); +static int do_devoice(User * u); +static int do_halfop(User * u); +static int do_dehalfop(User * u); +static int do_protect(User * u); +static int do_deprotect(User * u); +static int do_owner(User * u); +static int do_deowner(User * u); /** * Create the command, and tell anope about it. @@ -87,7 +87,7 @@ void AnopeFini(void) * Add the help response to anopes /cs help output. * @param u The user who is requesting help **/ -void myChanServHelp(User * u) +static void myChanServHelp(User * u) { if (ircd->owner) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_OWNER); @@ -117,35 +117,35 @@ void myChanServHelp(User * u) * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_op(User * u) +static int do_op(User * u) { return do_util(u, &csmodeutils[MUT_OP]); } /*************************************************************************/ -int do_deop(User * u) +static int do_deop(User * u) { return do_util(u, &csmodeutils[MUT_DEOP]); } /*************************************************************************/ -int do_voice(User * u) +static int do_voice(User * u) { return do_util(u, &csmodeutils[MUT_VOICE]); } /*************************************************************************/ -int do_devoice(User * u) +static int do_devoice(User * u) { return do_util(u, &csmodeutils[MUT_DEVOICE]); } /*************************************************************************/ -int do_halfop(User * u) +static int do_halfop(User * u) { if (ircd->halfop) { return do_util(u, &csmodeutils[MUT_HALFOP]); @@ -156,7 +156,7 @@ int do_halfop(User * u) /*************************************************************************/ -int do_dehalfop(User * u) +static int do_dehalfop(User * u) { if (ircd->halfop) { return do_util(u, &csmodeutils[MUT_DEHALFOP]); @@ -167,7 +167,7 @@ int do_dehalfop(User * u) /*************************************************************************/ -int do_protect(User * u) +static int do_protect(User * u) { if (ircd->protect || ircd->admin) { return do_util(u, &csmodeutils[MUT_PROTECT]); @@ -178,7 +178,7 @@ int do_protect(User * u) /*************************************************************************/ -int do_deprotect(User * u) +static int do_deprotect(User * u) { if (ircd->protect || ircd->admin) { return do_util(u, &csmodeutils[MUT_DEPROTECT]); @@ -189,7 +189,7 @@ int do_deprotect(User * u) /*************************************************************************/ -int do_owner(User * u) +static int do_owner(User * u) { char *av[2]; char *chan = strtok(NULL, " "); @@ -245,7 +245,7 @@ int do_owner(User * u) /*************************************************************************/ -int do_deowner(User * u) +static int do_deowner(User * u) { char *av[2]; char *chan = strtok(NULL, " "); @@ -301,7 +301,7 @@ int do_deowner(User * u) /* do_util: not a command, but does the job of other */ -int do_util(User * u, CSModeUtil * util) +static int do_util(User * u, CSModeUtil * util) { char *av[2]; char *chan = strtok(NULL, " "); diff --git a/src/core/cs_register.c b/src/core/cs_register.c index b04553133..5f33af31c 100644 --- a/src/core/cs_register.c +++ b/src/core/cs_register.c @@ -14,8 +14,8 @@ #include "module.h" -int do_register(User * u); -void myChanServHelp(User * u); +static int do_register(User * u); +static void myChanServHelp(User * u); /** * Create the off command, and tell anope about it. @@ -55,7 +55,7 @@ void AnopeFini(void) * Add the help response to anopes /cs help output. * @param u The user who is requesting help **/ -void myChanServHelp(User * u) +static void myChanServHelp(User * u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_REGISTER); } @@ -65,7 +65,7 @@ void myChanServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_register(User * u) +static int do_register(User * u) { char *chan = strtok(NULL, " "); char *pass = strtok(NULL, " "); diff --git a/src/core/cs_sendpass.c b/src/core/cs_sendpass.c index 225f494e5..2e48a3cda 100644 --- a/src/core/cs_sendpass.c +++ b/src/core/cs_sendpass.c @@ -14,8 +14,8 @@ #include "module.h" -int do_sendpass(User * u); -void myChanServHelp(User * u); +static int do_sendpass(User * u); +static void myChanServHelp(User * u); /** * Create the command, and tell anope about it. @@ -58,7 +58,7 @@ void AnopeFini(void) * Add the help response to anopes /cs help output. * @param u The user who is requesting help **/ -void myChanServHelp(User * u) +static void myChanServHelp(User * u) { if (!RestrictMail || is_services_oper(u)) notice_lang(s_ChanServ, u, CHAN_HELP_CMD_SENDPASS); @@ -69,7 +69,7 @@ void myChanServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_sendpass(User * u) +static int do_sendpass(User * u) { char *chan = strtok(NULL, " "); diff --git a/src/core/cs_set.c b/src/core/cs_set.c index a06d75457..e832ef336 100644 --- a/src/core/cs_set.c +++ b/src/core/cs_set.c @@ -15,29 +15,29 @@ #include "module.h" #include "encrypt.h" -int do_set(User * u); -int do_set_founder(User * u, ChannelInfo * ci, char *param); -int do_set_successor(User * u, ChannelInfo * ci, char *param); -int do_set_password(User * u, ChannelInfo * ci, char *param); -int do_set_desc(User * u, ChannelInfo * ci, char *param); -int do_set_url(User * u, ChannelInfo * ci, char *param); -int do_set_email(User * u, ChannelInfo * ci, char *param); -int do_set_entrymsg(User * u, ChannelInfo * ci, char *param); -int do_set_bantype(User * u, ChannelInfo * ci, char *param); -int do_set_mlock(User * u, ChannelInfo * ci, char *param); -int do_set_keeptopic(User * u, ChannelInfo * ci, char *param); -int do_set_topiclock(User * u, ChannelInfo * ci, char *param); -int do_set_private(User * u, ChannelInfo * ci, char *param); -int do_set_secureops(User * u, ChannelInfo * ci, char *param); -int do_set_securefounder(User * u, ChannelInfo * ci, char *param); -int do_set_restricted(User * u, ChannelInfo * ci, char *param); -int do_set_secure(User * u, ChannelInfo * ci, char *param); -int do_set_signkick(User * u, ChannelInfo * ci, char *param); -int do_set_opnotice(User * u, ChannelInfo * ci, char *param); -int do_set_xop(User * u, ChannelInfo * ci, char *param); -int do_set_peace(User * u, ChannelInfo * ci, char *param); -int do_set_noexpire(User * u, ChannelInfo * ci, char *param); -void myChanServHelp(User * u); +static int do_set(User * u); +static int do_set_founder(User * u, ChannelInfo * ci, char *param); +static int do_set_successor(User * u, ChannelInfo * ci, char *param); +static int do_set_password(User * u, ChannelInfo * ci, char *param); +static int do_set_desc(User * u, ChannelInfo * ci, char *param); +static int do_set_url(User * u, ChannelInfo * ci, char *param); +static int do_set_email(User * u, ChannelInfo * ci, char *param); +static int do_set_entrymsg(User * u, ChannelInfo * ci, char *param); +static int do_set_bantype(User * u, ChannelInfo * ci, char *param); +static int do_set_mlock(User * u, ChannelInfo * ci, char *param); +static int do_set_keeptopic(User * u, ChannelInfo * ci, char *param); +static int do_set_topiclock(User * u, ChannelInfo * ci, char *param); +static int do_set_private(User * u, ChannelInfo * ci, char *param); +static int do_set_secureops(User * u, ChannelInfo * ci, char *param); +static int do_set_securefounder(User * u, ChannelInfo * ci, char *param); +static int do_set_restricted(User * u, ChannelInfo * ci, char *param); +static int do_set_secure(User * u, ChannelInfo * ci, char *param); +static int do_set_signkick(User * u, ChannelInfo * ci, char *param); +static int do_set_opnotice(User * u, ChannelInfo * ci, char *param); +static int do_set_xop(User * u, ChannelInfo * ci, char *param); +static int do_set_peace(User * u, ChannelInfo * ci, char *param); +static int do_set_noexpire(User * u, ChannelInfo * ci, char *param); +static void myChanServHelp(User * u); /** * Create the command, and tell anope about it. @@ -140,7 +140,7 @@ void AnopeFini(void) * Add the help response to anopes /cs help output. * @param u The user who is requesting help **/ -void myChanServHelp(User * u) +static void myChanServHelp(User * u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_SET); } @@ -159,7 +159,7 @@ void myChanServHelp(User * u) * the first passed in the function call can be retrieved using * strtok(NULL, toks). */ -int do_set(User * u) +static int do_set(User * u) { char *chan = strtok(NULL, " "); char *cmd = strtok(NULL, " "); @@ -282,7 +282,7 @@ int do_set(User * u) /*************************************************************************/ -int do_set_founder(User * u, ChannelInfo * ci, char *param) +static int do_set_founder(User * u, ChannelInfo * ci, char *param) { NickAlias *na = findnick(param); NickCore *nc, *nc0 = ci->founder; @@ -320,7 +320,7 @@ int do_set_founder(User * u, ChannelInfo * ci, char *param) /*************************************************************************/ -int do_set_successor(User * u, ChannelInfo * ci, char *param) +static int do_set_successor(User * u, ChannelInfo * ci, char *param) { NickAlias *na; NickCore *nc; @@ -364,7 +364,7 @@ int do_set_successor(User * u, ChannelInfo * ci, char *param) /*************************************************************************/ -int do_set_password(User * u, ChannelInfo * ci, char *param) +static int do_set_password(User * u, ChannelInfo * ci, char *param) { int len = strlen(param); @@ -406,7 +406,7 @@ int do_set_password(User * u, ChannelInfo * ci, char *param) /*************************************************************************/ -int do_set_desc(User * u, ChannelInfo * ci, char *param) +static int do_set_desc(User * u, ChannelInfo * ci, char *param) { if (ci->desc) free(ci->desc); @@ -419,7 +419,7 @@ int do_set_desc(User * u, ChannelInfo * ci, char *param) /*************************************************************************/ -int do_set_url(User * u, ChannelInfo * ci, char *param) +static int do_set_url(User * u, ChannelInfo * ci, char *param) { if (ci->url) free(ci->url); @@ -439,7 +439,7 @@ int do_set_url(User * u, ChannelInfo * ci, char *param) /*************************************************************************/ -int do_set_email(User * u, ChannelInfo * ci, char *param) +static int do_set_email(User * u, ChannelInfo * ci, char *param) { if (ci->email) free(ci->email); @@ -459,7 +459,7 @@ int do_set_email(User * u, ChannelInfo * ci, char *param) /*************************************************************************/ -int do_set_entrymsg(User * u, ChannelInfo * ci, char *param) +static int do_set_entrymsg(User * u, ChannelInfo * ci, char *param) { if (ci->entry_message) free(ci->entry_message); @@ -480,7 +480,7 @@ int do_set_entrymsg(User * u, ChannelInfo * ci, char *param) /*************************************************************************/ -int do_set_mlock(User * u, ChannelInfo * ci, char *param) +static int do_set_mlock(User * u, ChannelInfo * ci, char *param) { int add = -1; /* 1 if adding, 0 if deleting, -1 if neither */ unsigned char mode; @@ -580,7 +580,7 @@ int do_set_mlock(User * u, ChannelInfo * ci, char *param) /*************************************************************************/ -int do_set_bantype(User * u, ChannelInfo * ci, char *param) +static int do_set_bantype(User * u, ChannelInfo * ci, char *param) { char *endptr; @@ -600,7 +600,7 @@ int do_set_bantype(User * u, ChannelInfo * ci, char *param) /*************************************************************************/ -int do_set_keeptopic(User * u, ChannelInfo * ci, char *param) +static int do_set_keeptopic(User * u, ChannelInfo * ci, char *param) { if (stricmp(param, "ON") == 0) { ci->flags |= CI_KEEPTOPIC; @@ -621,7 +621,7 @@ int do_set_keeptopic(User * u, ChannelInfo * ci, char *param) /*************************************************************************/ -int do_set_topiclock(User * u, ChannelInfo * ci, char *param) +static int do_set_topiclock(User * u, ChannelInfo * ci, char *param) { if (stricmp(param, "ON") == 0) { ci->flags |= CI_TOPICLOCK; @@ -642,7 +642,7 @@ int do_set_topiclock(User * u, ChannelInfo * ci, char *param) /*************************************************************************/ -int do_set_private(User * u, ChannelInfo * ci, char *param) +static int do_set_private(User * u, ChannelInfo * ci, char *param) { if (stricmp(param, "ON") == 0) { ci->flags |= CI_PRIVATE; @@ -663,7 +663,7 @@ int do_set_private(User * u, ChannelInfo * ci, char *param) /*************************************************************************/ -int do_set_secureops(User * u, ChannelInfo * ci, char *param) +static int do_set_secureops(User * u, ChannelInfo * ci, char *param) { if (stricmp(param, "ON") == 0) { ci->flags |= CI_SECUREOPS; @@ -684,7 +684,7 @@ int do_set_secureops(User * u, ChannelInfo * ci, char *param) /*************************************************************************/ -int do_set_securefounder(User * u, ChannelInfo * ci, char *param) +static int do_set_securefounder(User * u, ChannelInfo * ci, char *param) { if (stricmp(param, "ON") == 0) { ci->flags |= CI_SECUREFOUNDER; @@ -705,7 +705,7 @@ int do_set_securefounder(User * u, ChannelInfo * ci, char *param) /*************************************************************************/ -int do_set_restricted(User * u, ChannelInfo * ci, char *param) +static int do_set_restricted(User * u, ChannelInfo * ci, char *param) { if (stricmp(param, "ON") == 0) { ci->flags |= CI_RESTRICTED; @@ -730,7 +730,7 @@ int do_set_restricted(User * u, ChannelInfo * ci, char *param) /*************************************************************************/ -int do_set_secure(User * u, ChannelInfo * ci, char *param) +static int do_set_secure(User * u, ChannelInfo * ci, char *param) { if (stricmp(param, "ON") == 0) { ci->flags |= CI_SECURE; @@ -750,7 +750,7 @@ int do_set_secure(User * u, ChannelInfo * ci, char *param) /*************************************************************************/ -int do_set_signkick(User * u, ChannelInfo * ci, char *param) +static int do_set_signkick(User * u, ChannelInfo * ci, char *param) { if (stricmp(param, "ON") == 0) { ci->flags |= CI_SIGNKICK; @@ -778,7 +778,7 @@ int do_set_signkick(User * u, ChannelInfo * ci, char *param) /*************************************************************************/ -int do_set_opnotice(User * u, ChannelInfo * ci, char *param) +static int do_set_opnotice(User * u, ChannelInfo * ci, char *param) { if (stricmp(param, "ON") == 0) { ci->flags |= CI_OPNOTICE; @@ -801,7 +801,7 @@ int do_set_opnotice(User * u, ChannelInfo * ci, char *param) #define CHECKLEV(lev) ((ci->levels[(lev)] != ACCESS_INVALID) && (access->level >= ci->levels[(lev)])) -int do_set_xop(User * u, ChannelInfo * ci, char *param) +static int do_set_xop(User * u, ChannelInfo * ci, char *param) { if (stricmp(param, "ON") == 0) { if (!(ci->flags & CI_XOP)) { @@ -856,7 +856,7 @@ int do_set_xop(User * u, ChannelInfo * ci, char *param) /*************************************************************************/ -int do_set_peace(User * u, ChannelInfo * ci, char *param) +static int do_set_peace(User * u, ChannelInfo * ci, char *param) { if (stricmp(param, "ON") == 0) { ci->flags |= CI_PEACE; @@ -876,7 +876,7 @@ int do_set_peace(User * u, ChannelInfo * ci, char *param) /*************************************************************************/ -int do_set_noexpire(User * u, ChannelInfo * ci, char *param) +static int do_set_noexpire(User * u, ChannelInfo * ci, char *param) { if (!is_services_admin(u)) { notice_lang(s_ChanServ, u, PERMISSION_DENIED); diff --git a/src/core/cs_status.c b/src/core/cs_status.c index efbe4ba29..7d417b261 100644 --- a/src/core/cs_status.c +++ b/src/core/cs_status.c @@ -14,8 +14,8 @@ #include "module.h" -int do_status(User * u); -void myChanServHelp(User * u); +static int do_status(User * u); +static void myChanServHelp(User * u); /** * Create the command, and tell anope about it. @@ -55,7 +55,7 @@ void AnopeFini(void) * Add the help response to anopes /cs help output. * @param u The user who is requesting help **/ -void myChanServHelp(User * u) +static void myChanServHelp(User * u) { if (is_services_admin(u)) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_STATUS); @@ -67,7 +67,7 @@ void myChanServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_status(User * u) +static int do_status(User * u) { ChannelInfo *ci; User *u2; diff --git a/src/core/cs_suspend.c b/src/core/cs_suspend.c index 0554d4764..2dbb350e0 100644 --- a/src/core/cs_suspend.c +++ b/src/core/cs_suspend.c @@ -14,9 +14,9 @@ #include "module.h" -int do_suspend(User * u); -int do_unsuspend(User * u); -void myChanServHelp(User * u); +static int do_suspend(User * u); +static int do_unsuspend(User * u); +static void myChanServHelp(User * u); /** * Create the command, and tell anope about it. @@ -60,7 +60,7 @@ void AnopeFini(void) * Add the help response to anopes /cs help output. * @param u The user who is requesting help **/ -void myChanServHelp(User * u) +static void myChanServHelp(User * u) { if (is_services_oper(u)) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_SUSPEND); @@ -73,7 +73,7 @@ void myChanServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_suspend(User * u) +static int do_suspend(User * u) { ChannelInfo *ci; char *chan = strtok(NULL, " "); @@ -152,7 +152,7 @@ int do_suspend(User * u) /*************************************************************************/ -int do_unsuspend(User * u) +static int do_unsuspend(User * u) { ChannelInfo *ci; char *chan = strtok(NULL, " "); diff --git a/src/core/cs_topic.c b/src/core/cs_topic.c index 9173016e0..211592e95 100644 --- a/src/core/cs_topic.c +++ b/src/core/cs_topic.c @@ -14,8 +14,8 @@ #include "module.h" -int do_cs_topic(User * u); -void myChanServHelp(User * u); +static int do_cs_topic(User * u); +static void myChanServHelp(User * u); /** * Create the command, and tell anope about it. @@ -52,7 +52,7 @@ void AnopeFini(void) * Add the help response to anopes /cs help output. * @param u The user who is requesting help **/ -void myChanServHelp(User * u) +static void myChanServHelp(User * u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_TOPIC); } @@ -62,7 +62,7 @@ void myChanServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_cs_topic(User * u) +static int do_cs_topic(User * u) { char *chan = strtok(NULL, " "); char *topic = strtok(NULL, ""); diff --git a/src/core/cs_xop.c b/src/core/cs_xop.c index e3af435dc..33d0e6b36 100644 --- a/src/core/cs_xop.c +++ b/src/core/cs_xop.c @@ -14,15 +14,15 @@ #include "module.h" -int do_xop(User * u, char *xname, int xlev, int *xmsgs); -int do_aop(User * u); -int do_hop(User * u); -int do_sop(User * u); -int do_vop(User * u); +static int do_xop(User * u, char *xname, int xlev, int *xmsgs); +static int do_aop(User * u); +static int do_hop(User * u); +static int do_sop(User * u); +static int do_vop(User * u); -void myChanServHelp(User * u); +static void myChanServHelp(User * u); -int xop_msgs[4][14] = { +static int xop_msgs[4][14] = { {CHAN_AOP_SYNTAX, CHAN_AOP_DISABLED, CHAN_AOP_NICKS_ONLY, @@ -123,7 +123,7 @@ void AnopeFini(void) * Add the help response to anopes /cs help output. * @param u The user who is requesting help **/ -void myChanServHelp(User * u) +static void myChanServHelp(User * u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_SOP); notice_lang(s_ChanServ, u, CHAN_HELP_CMD_AOP); @@ -138,14 +138,14 @@ void myChanServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_aop(User * u) +static int do_aop(User * u) { return do_xop(u, "AOP", ACCESS_AOP, xop_msgs[0]); } /*************************************************************************/ -int do_hop(User * u) +static int do_hop(User * u) { if (ircd->halfop) return do_xop(u, "HOP", ACCESS_HOP, xop_msgs[3]); @@ -154,14 +154,14 @@ int do_hop(User * u) /*************************************************************************/ -int do_sop(User * u) +static int do_sop(User * u) { return do_xop(u, "SOP", ACCESS_SOP, xop_msgs[1]); } /*************************************************************************/ -int do_vop(User * u) +static int do_vop(User * u) { return do_xop(u, "VOP", ACCESS_VOP, xop_msgs[2]); } @@ -170,7 +170,7 @@ int do_vop(User * u) * `perm' is incremented whenever a permission-denied error occurs */ -int xop_del(User * u, ChannelInfo * ci, ChanAccess * access, int *perm, int uacc, int xlev) +static int xop_del(User * u, ChannelInfo * ci, ChanAccess * access, int *perm, int uacc, int xlev) { char *nick; if (!access->in_use || !access->nc || access->level != xlev) @@ -186,7 +186,7 @@ int xop_del(User * u, ChannelInfo * ci, ChanAccess * access, int *perm, int uacc return 1; } -int xop_del_callback(User * u, int num, va_list args) +static int xop_del_callback(User * u, int num, va_list args) { ChannelInfo *ci = va_arg(args, ChannelInfo *); int *last = va_arg(args, int *); @@ -202,7 +202,7 @@ int xop_del_callback(User * u, int num, va_list args) } -int xop_list(User * u, int index, ChannelInfo * ci, +static int xop_list(User * u, int index, ChannelInfo * ci, int *sent_header, int xlev, int xmsg) { ChanAccess *access = &ci->access[index]; @@ -220,7 +220,7 @@ int xop_list(User * u, int index, ChannelInfo * ci, return 1; } -int xop_list_callback(User * u, int num, va_list args) +static int xop_list_callback(User * u, int num, va_list args) { ChannelInfo *ci = va_arg(args, ChannelInfo *); int *sent_header = va_arg(args, int *); @@ -234,7 +234,7 @@ int xop_list_callback(User * u, int num, va_list args) } -int do_xop(User * u, char *xname, int xlev, int *xmsgs) +static int do_xop(User * u, char *xname, int xlev, int *xmsgs) { char *chan = strtok(NULL, " "); char *cmd = strtok(NULL, " "); diff --git a/src/core/enc_md5.c b/src/core/enc_md5.c index 87c3e7ca6..780b05dcc 100644 --- a/src/core/enc_md5.c +++ b/src/core/enc_md5.c @@ -74,8 +74,8 @@ typedef void *POINTER; #define S44 21 void Ano_MD5Transform (UINT4 [4], unsigned char [64]); -void Encode (unsigned char *, UINT4 *, unsigned int); -void Decode (UINT4 *, unsigned char *, unsigned int); +static void Encode (unsigned char *, UINT4 *, unsigned int); +static void Decode (UINT4 *, unsigned char *, unsigned int); static unsigned char PADDING[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -299,7 +299,7 @@ unsigned char block[64]; /* Encodes input (UINT4) into output (unsigned char). Assumes len is a multiple of 4. */ -void Encode (output, input, len) +static void Encode (output, input, len) unsigned char *output; UINT4 *input; unsigned int len; @@ -317,7 +317,7 @@ unsigned int len; /* Decodes input (unsigned char) into output (UINT4). Assumes len is a multiple of 4. */ -void Decode (output, input, len) +static void Decode (output, input, len) UINT4 *output; unsigned char *input; unsigned int len; @@ -335,7 +335,7 @@ unsigned int len; #define XTOI(c) ((c)>9 ? (c)-'A'+10 : (c)-'0') -int md5_encrypt(const char *src, int len, char *dest, int size) +static int md5_encrypt(const char *src, int len, char *dest, int size) { MD5_CTX context; char tmp[33]; @@ -362,7 +362,7 @@ int md5_encrypt(const char *src, int len, char *dest, int size) } -int md5_encrypt_check_len(int passlen, int bufsize) +static int md5_encrypt_check_len(int passlen, int bufsize) { if (bufsize < 16) fatal("enc_md5: md5_check_len(): buffer too small (%d)", bufsize); @@ -370,13 +370,13 @@ int md5_encrypt_check_len(int passlen, int bufsize) } -int md5_decrypt(const char *src, char *dest, int size) +static int md5_decrypt(const char *src, char *dest, int size) { return 0; } -int md5_check_password(const char *plaintext, const char *password) +static int md5_check_password(const char *plaintext, const char *password) { char buf[BUFSIZE]; diff --git a/src/core/enc_none.c b/src/core/enc_none.c index 65b1fb707..c3c30a85e 100644 --- a/src/core/enc_none.c +++ b/src/core/enc_none.c @@ -9,10 +9,10 @@ #include "module.h" -int plain_encrypt(const char *src,int len,char *dest,int size); -int plain_encrypt_check_len(int passlen, int bufsize); -int plain_decrypt(const char *src, char *dest, int size); -int plain_check_password(const char *plaintext, const ch