diff options
author | Adam <Adam@anope.org> | 2012-09-21 21:39:32 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-09-21 21:39:32 -0400 |
commit | 3779ed916a1bf70d744a7ba6ac5fa31862057d0f (patch) | |
tree | 0e1f5f3b2b8c36eefa8e52872fb2164fa5569075 /src | |
parent | 3f05a42515b588b508419040e71b74ea2a27f1d0 (diff) |
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.
Diffstat (limited to 'src')
134 files changed, 911 insertions, 911 deletions
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 char *password); +static int plain_encrypt(const char *src,int len,char *dest,int size); +static int plain_encrypt_check_len(int passlen, int bufsize); +static int plain_decrypt(const char *src, char *dest, int size); +static int plain_check_password(const char *plaintext, const char *password); int AnopeInit(int argc, char **argv) { @@ -36,7 +36,7 @@ void AnopeFini(void) { encmodule_check_password(NULL); } -int plain_encrypt(const char *src,int len,char *dest,int size) { +static int plain_encrypt(const char *src,int len,char *dest,int size) { if(size>=len) { memset(dest,0,size); strncpy(dest,src,len); @@ -46,21 +46,21 @@ int plain_encrypt(const char *src,int len,char *dest,int size) { return -1; } -int plain_encrypt_check_len(int passlen, int bufsize) { +static int plain_encrypt_check_len(int passlen, int bufsize) { if(bufsize>=passlen) { return 0; } return bufsize; } -int plain_decrypt(const char *src, char *dest, int size) { +static int plain_decrypt(const char *src, char *dest, int size) { memset(dest,0,size); strncpy(dest,src,size); dest[size] = '\0'; return 1; } -int plain_check_password(const char *plaintext, const char *password) { +static int plain_check_password(const char *plaintext, const char *password) { if(strcmp(plaintext,password)==0) { return 1; } diff --git a/src/core/enc_old.c b/src/core/enc_old.c index decbeb9ea..e4c113d70 100644 --- a/src/core/enc_old.c +++ b/src/core/enc_old.c @@ -13,7 +13,7 @@ #include "module.h" -void binary_to_hex(unsigned char *bin, char *hex, int length) +static void my_binary_to_hex(unsigned char *bin, char *hex, int length) { static const char trans[] = "0123456789ABCDEF"; int i; @@ -358,7 +358,7 @@ unsigned int len; * resulting string would be longer than `size', return -1 and leave `dest' * unchanged; else return 0. */ -int old_encrypt(const char *src, int len, char *dest, int size) +static int old_encrypt(const char *src, int len, char *dest, int size) { MD5_CTX context; @@ -380,7 +380,7 @@ int old_encrypt(const char *src, int len, char *dest, int size) if(debug) { memset(tmp,0,33); - binary_to_hex(dest,tmp,16); + my_binary_to_hex(dest,tmp,16); alog("enc_old: Converted [%s] to [%s]",src,tmp); } @@ -388,7 +388,7 @@ int old_encrypt(const char *src, int len, char *dest, int size) } -int old_encrypt_check_len(int passlen, int bufsize) +static int old_encrypt_check_len(int passlen, int bufsize) { if (bufsize < 16) fatal("enc_old: old_check_len(): buffer too small (%d)", bufsize); @@ -399,7 +399,7 @@ int old_encrypt_check_len(int passlen, int bufsize) /* Compare a plaintext string against an encrypted password. Return 1 if * they match, 0 if not, and -1 if something went wrong. */ -int old_check_password(const char *plaintext, const char *password) +static int old_check_password(const char *plaintext, const char *password) { char buf[BUFSIZE]; @@ -411,7 +411,7 @@ int old_check_password(const char *plaintext, const char *password) return 0; } -int old_decrypt(const char *src, char *dest, int size) +static int old_decrypt(const char *src, char *dest, int size) { return 0; } diff --git a/src/core/enc_sha1.c b/src/core/enc_sha1.c index 3fa08fc73..1ed47ee90 100644 --- a/src/core/enc_sha1.c +++ b/src/core/enc_sha1.c @@ -25,10 +25,10 @@ typedef struct { unsigned char buffer[64]; } SHA1_CTX; -void SHA1Transform(uint32 state[5], unsigned char const buffer[64]); -void SHA1Init(SHA1_CTX* context); -void SHA1Update(SHA1_CTX* context, unsigned char const * data, uint32 len); -void SHA1Final(unsigned char digest[20], SHA1_CTX* context); +static void SHA1Transform(uint32 state[5], unsigned char const buffer[64]); +static void SHA1Init(SHA1_CTX* context); +static void SHA1Update(SHA1_CTX* context, unsigned char const * data, uint32 len); +static void SHA1Final(unsigned char digest[20], SHA1_CTX* context); #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) @@ -53,7 +53,7 @@ void SHA1Final(unsigned char digest[20], SHA1_CTX* context); /* Hash a single 512-bit block. This is the core of the algorithm. */ -void SHA1Transform(uint32 state[5], unsigned char const buffer[64]) +static void SHA1Transform(uint32 state[5], unsigned char const buffer[64]) { uint32 a, b, c, d, e; typedef union { @@ -108,7 +108,7 @@ static unsigned char workspace[64]; /* SHA1Init - Initialize new context */ -void SHA1Init(SHA1_CTX* context) +static void SHA1Init(SHA1_CTX* context) { /* SHA1 initialization constants */ context->state[0] = 0x67452301; @@ -122,7 +122,7 @@ void SHA1Init(SHA1_CTX* context) /* Run your data through this. */ -void SHA1Update(SHA1_CTX* context, unsigned char const * data, uint32 len) +static void SHA1Update(SHA1_CTX* context, unsigned char const * data, uint32 len) { uint32 i, j; @@ -144,7 +144,7 @@ void SHA1Update(SHA1_CTX* context, unsigned char const * data, uint32 len) /* Add padding and return the message digest. */ -void SHA1Final(unsigned char digest[20], SHA1_CTX* context) +static void SHA1Final(unsigned char digest[20], SHA1_CTX* context) { uint32 i; unsigned char finalcount[8]; @@ -175,7 +175,7 @@ void SHA1Final(unsigned char digest[20], SHA1_CTX* context) /*****************************************************************************/ -int sha1_encrypt(const char *src, int len, char *dest, int size) +static int sha1_encrypt(const char *src, int len, char *dest, int size) { SHA1_CTX context; unsigned char tmp[41]; @@ -204,7 +204,7 @@ int sha1_encrypt(const char *src, int len, char *dest, int size) } -int sha1_encrypt_check_len(int passlen, int bufsize) +static int sha1_encrypt_check_len(int passlen, int bufsize) { if (bufsize < 20) fatal("enc_sha1: sha1_check_len(): buffer too small (%d)", bufsize); @@ -212,13 +212,13 @@ int sha1_encrypt_check_len(int passlen, int bufsize) } -int sha1_decrypt(const char *src, char *dest, int size) +static int sha1_decrypt(const char *src, char *dest, int size) { return 0; } -int sha1_check_password(const char *plaintext, const char *password) +static int sha1_check_password(const char *plaintext, const char *password) { char buf[BUFSIZE]; diff --git a/src/core/he_help.c b/src/core/he_help.c index 8c097164a..961febcae 100644 --- a/src/core/he_help.c +++ b/src/core/he_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. @@ -54,7 +54,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/hs_del.c b/src/core/hs_del.c index 0a1ce18b6..779c075f6 100644 --- a/src/core/hs_del.c +++ b/src/core/hs_del.c @@ -14,8 +14,8 @@ #include "module.h" -int do_del(User * u); -void myHostServHelp(User * u); +static int do_del(User * u); +static void myHostServHelp(User * u); /** * Create the off command, and tell anope about it. @@ -54,7 +54,7 @@ void AnopeFini(void) * Add the help response to anopes /hs help output. * @param u The user who is requesting help **/ -void myHostServHelp(User * u) +static void myHostServHelp(User * u) { if (is_host_remover(u)) { notice_lang(s_HostServ, u, HOST_HELP_CMD_DEL); @@ -66,7 +66,7 @@ void myHostServHelp(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_del(User * u) +static int do_del(User * u) { NickAlias *na; char *nick = strtok(NULL, " "); diff --git a/src/core/hs_delall.c b/src/core/hs_delall.c index 859477691..eb164c430 100644 --- a/src/core/hs_delall.c +++ b/src/core/hs_delall.c @@ -14,8 +14,8 @@ #include "module.h" -int do_delall(User * u); -void myHostServHelp(User * u); +static int do_delall(User * u); +static void myHostServHelp(User * u); /** * Create the off command, and tell anope about it. @@ -54,7 +54,7 @@ void AnopeFini(void) * Add the help response to anopes /hs help output. * @param u The user who is requesting help **/ -void myHostServHelp(User * u) +static void myHostServHelp(User * u) { if (is_host_remover(u)) { notice_lang(s_HostServ, u, HOST_HELP_CMD_DELALL); @@ -66,7 +66,7 @@ void myHostServHelp(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_delall(User * u) +static int do_delall(User * u) { int i; char *nick = strtok(NULL, " "); diff --git a/src/core/hs_group.c b/src/core/hs_group.c index 309567d01..a30a1cdbe 100644 --- a/src/core/hs_group.c +++ b/src/core/hs_group.c @@ -14,8 +14,8 @@ #include "module.h" -int do_group(User * u); -void myHostServHelp(User * u); +static int do_group(User * u); +static void myHostServHelp(User * u); extern int do_hs_sync(NickCore * nc, char *vIdent, char *hostmask, char *creator, time_t time); @@ -57,7 +57,7 @@ void AnopeFini(void) * Add the help response to anopes /hs help output. * @param u The user who is requesting help **/ -void myHostServHelp(User * u) +static void myHostServHelp(User * u) { notice_lang(s_HostServ, u, HOST_HELP_CMD_GROUP); } @@ -67,7 +67,7 @@ void myHostServHelp(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_group(User * u) +static int do_group(User * u) { NickAlias *na; HostCore *tmp; diff --git a/src/core/hs_help.c b/src/core/hs_help.c index 5ac8e33a5..eacb7a735 100644 --- a/src/core/hs_help.c +++ b/src/core/hs_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/hs_list.c b/src/core/hs_list.c index 9c498c7f3..5693aae5d 100644 --- a/src/core/hs_list.c +++ b/src/core/hs_list.c @@ -14,8 +14,8 @@ #include "module.h" -int listOut(User * u); -void myHostServHelp(User * u); +static int listOut(User * u); +static void myHostServHelp(User * u); /** * Create the off command, and tell anope about it. @@ -53,7 +53,7 @@ void AnopeFini(void) * Add the help response to anopes /hs help output. * @param u The user who is requesting help **/ -void myHostServHelp(User * u) +static void myHostServHelp(User * u) { if (is_services_oper(u)) { notice_lang(s_HostServ, u, HOST_HELP_CMD_LIST); @@ -65,7 +65,7 @@ void myHostServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int listOut(User * u) +static int listOut(User * u) { char *key = strtok(NULL, ""); struct tm *tm; diff --git a/src/core/hs_off.c b/src/core/hs_off.c index 1931e7404..249a1822f 100644 --- a/src/core/hs_off.c +++ b/src/core/hs_off.c @@ -14,8 +14,8 @@ #include "module.h" -int do_off(User * u); -void myHostServHelp(User * u); +static int do_off(User * u); +static void myHostServHelp(User * u); /** * Create the off command, and tell anope about it. @@ -53,7 +53,7 @@ void AnopeFini(void) * Add the help response to anopes /hs help output. * @param u The user who is requesting help **/ -void myHostServHelp(User * u) +static void myHostServHelp(User * u) { notice_lang(s_HostServ, u, HOST_HELP_CMD_OFF); } @@ -63,7 +63,7 @@ void myHostServHelp(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_off(User * u) +static int do_off(User * u) { NickAlias *na; char *vhost; diff --git a/src/core/hs_on.c b/src/core/hs_on.c index 976cde0e6..b652f87d8 100644 --- a/src/core/hs_on.c +++ b/src/core/hs_on.c @@ -14,8 +14,8 @@ #include "module.h" -int do_on(User * u); -void myHostServHelp(User * u); +static int do_on(User * u); +static void myHostServHelp(User * u); /** * Create the off command, and tell anope about it. @@ -53,7 +53,7 @@ void AnopeFini(void) * Add the help response to anopes /hs help output. * @param u The user who is requesting help **/ -void myHostServHelp(User * u) +static void myHostServHelp(User * u) { notice_lang(s_HostServ, u, HOST_HELP_CMD_ON); } @@ -63,7 +63,7 @@ void myHostServHelp(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_on(User * u) +static int do_on(User * u) { NickAlias *na; char *vHost; diff --git a/src/core/hs_set.c b/src/core/hs_set.c index 9765737bf..5d13de3ee 100644 --- a/src/core/hs_set.c +++ b/src/core/hs_set.c @@ -14,8 +14,8 @@ #include "module.h" -int myDoSet(User * u); -void myHostServHelp(User * u); +static int myDoSet(User * u); +static void myHostServHelp(User * u); /** * Create the off command, and tell anope about it. @@ -54,7 +54,7 @@ void AnopeFini(void) * Add the help response to anopes /hs help output. * @param u The user who is requesting help **/ -void myHostServHelp(User * u) +static void myHostServHelp(User * u) { if (is_host_setter(u)) { notice_lang(s_HostServ, u, HOST_HELP_CMD_SET); @@ -66,7 +66,7 @@ void myHostServHelp(User * u) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int myDoSet(User * u) +static int myDoSet(User * u) { char *nick = strtok(NULL, " "); char *rawhostmask = strtok(NULL, " "); diff --git a/src/core/hs_setall.c b/src/core/hs_setall.c index c948dd8b6..2deb0350a 100644 --- a/src/core/hs_setall.c +++ b/src/core/hs_setall.c @@ -14,8 +14,8 @@ #include "module.h" -int do_setall(User * u); -void myHostServHelp(User * u); +static int do_setall(User * u); +static void myHostServHelp(User * u); extern int do_hs_sync(NickCore * nc, char *vIdent, char *hostmask, char *creator, time_t time); @@ -55,7 +55,7 @@ void AnopeFini(void) * Add the help response to anopes /hs help output. * @param u The user who is requesting help **/ -void myHostServHelp(User * u) +static void myHostServHelp(User * u) { if (is_host_setter(u)) { notice_lang(s_HostServ, u, HOST_HELP_CMD_SETALL); @@ -67,7 +67,7 @@ void myHostServHelp(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_setall(User * u) +static int do_setall(User * u) { char *nick = strtok(NULL, " "); diff --git a/src/core/ms_cancel.c b/src/core/ms_cancel.c index e052a5ce1..77e47ae19 100644 --- a/src/core/ms_cancel.c +++ b/src/core/ms_cancel.c @@ -14,8 +14,8 @@ #include "module.h" -int do_cancel(User * u); -void myMemoServHelp(User * u); +static int do_cancel(User * u); +static void myMemoServHelp(User * u); /** * Create the cancel command, and tell anope about it. @@ -52,7 +52,7 @@ void AnopeFini(void) * Add the help response to anopes /ms help output. * @param u The user who is requesting help **/ -void myMemoServHelp(User * u) +static void myMemoServHelp(User * u) { notice_lang(s_MemoServ, u, MEMO_HELP_CMD_CANCEL); } @@ -62,7 +62,7 @@ void myMemoServHelp(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_cancel(User * u) +static int do_cancel(User * u) { int ischan; int isforbid; diff --git a/src/core/ms_check.c b/src/core/ms_check.c index 6b5a93025..e3368103d 100644 --- a/src/core/ms_check.c +++ b/src/core/ms_check.c @@ -14,8 +14,8 @@ #include "module.h" -int do_memocheck(User * u); -void myMemoServHelp(User * u); +static int do_memocheck(User * u); +static void myMemoServHelp(User * u); /** * Create the command, and tell anope about it. @@ -52,7 +52,7 @@ void AnopeFini(void) * Add the help response to anopes /ms help output. * @param u The user who is requesting help **/ -void myMemoServHelp(User * u) +static void myMemoServHelp(User * u) { notice_lang(s_MemoServ, u, MEMO_HELP_CMD_CHECK); } @@ -62,7 +62,7 @@ void myMemoServHelp(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_memocheck(User * u) +static int do_memocheck(User * u) { NickAlias *na = NULL; MemoInfo *mi = NULL; diff --git a/src/core/ms_del.c b/src/core/ms_del.c index 3eda19b3a..b2fc8e1ab 100644 --- a/src/core/ms_del.c +++ b/src/core/ms_del.c @@ -14,9 +14,9 @@ #include "module.h" -int do_del(User * u); -int del_memo_callback(User * u, int num, va_list args); -void myMemoServHelp(User * u); +static int do_del(User * u); +static int del_memo_callback(User * u, int num, va_list args); +static void myMemoServHelp(User * u); /** * Create the command, and tell anope about it. @@ -52,7 +52,7 @@ void AnopeFini(void) * Add the help response to anopes /ms help output. * @param u The user who is requesting help **/ -void myMemoServHelp(User * u) +static void myMemoServHelp(User * u) { notice_lang(s_MemoServ, u, MEMO_HELP_CMD_DEL); } @@ -62,7 +62,7 @@ void myMemoServHelp(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_del(User * u) +static int do_del(User * u) { MemoInfo *mi; ChannelInfo *ci; @@ -172,7 +172,7 @@ int do_del(User * u) * @param va_list Variable Arguemtns * @return 1 if successful, 0 if it fails */ -int del_memo_callback(User * u, int num, va_list args) +static int del_memo_callback(User * u, int num, va_list args) { MemoInfo *mi = va_arg(args, MemoInfo *); int *last = va_arg(args, int *); diff --git a/src/core/ms_help.c b/src/core/ms_help.c index 332d982b6..85de568ea 100644 --- a/src/core/ms_help.c +++ b/src/core/ms_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. @@ -50,7 +50,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/ms_info.c b/src/core/ms_info.c index 7f106e42b..69ae5ab80 100644 --- a/src/core/ms_info.c +++ b/src/core/ms_info.c @@ -14,8 +14,8 @@ #include "module.h" -int do_info(User * u); -void myMemoServHelp(User * u); +static int do_info(User * u); +static void myMemoServHelp(User * u); /** * Create the command, and tell anope about it. @@ -52,7 +52,7 @@ void AnopeFini(void) * Add the help response to anopes /ms help output. * @param u The user who is requesting help **/ -void myMemoServHelp(User * u) +static void myMemoServHelp(User * u) { notice_lang(s_MemoServ, u, MEMO_HELP_CMD_INFO); } @@ -62,7 +62,7 @@ void myMemoServHelp(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) { MemoInfo *mi; NickAlias *na = NULL; diff --git a/src/core/ms_list.c b/src/core/ms_list.c index 18ca62b56..34ad071b4 100644 --- a/src/core/ms_list.c +++ b/src/core/ms_list.c @@ -13,11 +13,11 @@ /*************************************************************************/ #include "module.h" -int do_list(User * u); -int list_memo_callback(User * u, int num, va_list args); -int list_memo(User * u, int index, MemoInfo * mi, int *sent_header, +static int do_list(User * u); +static int list_memo_callback(User * u, int num, va_list args); +static int list_memo(User * u, int index, MemoInfo * mi, int *sent_header, int new, const char *chan); -void myMemoServHelp(User * u); +static void myMemoServHelp(User * u); /** * Create the command, and tell anope about it. @@ -54,7 +54,7 @@ void AnopeFini(void) * Add the help response to anopes /ms help output. * @param u The user who is requesting help **/ -void myMemoServHelp(User * u) +static void myMemoServHelp(User * u) { notice_lang(s_MemoServ, u, MEMO_HELP_CMD_LIST); } @@ -64,7 +64,7 @@ void myMemoServHelp(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 *param = strtok(NULL, " "), *chan = NULL; ChannelInfo *ci; @@ -137,7 +137,7 @@ int do_list(User * u) * @param va_list List of arguements * @return result form list_memo() */ -int list_memo_callback(User * u, int num, va_list args) +static int list_memo_callback(User * u, int num, va_list args) { MemoInfo *mi = va_arg(args, MemoInfo *); int *sent_header = va_arg(args, int *); @@ -162,7 +162,7 @@ int list_memo_callback(User * u, int num, va_list args) * @param chan Channel name * @return MOD_CONT */ -int list_memo(User * u, int index, MemoInfo * mi, int *sent_header, +static int list_memo(User * u, int index, MemoInfo * mi, int *sent_header, int new, const char *chan) { Memo *m; diff --git a/src/core/ms_read.c b/src/core/ms_read.c index 22f404f4b..a3ea8538d 100644 --- a/src/core/ms_read.c +++ b/src/core/ms_read.c @@ -14,10 +14,10 @@ #include "module.h" -int do_read(User * u); -int read_memo_callback(User * u, int num, va_list args); -int read_memo(User * u, int index, MemoInfo * mi, const char *chan); -void myMemoServHelp(User * u); +static int do_read(User * u); +static int read_memo_callback(User * u, int num, va_list args); +static int read_memo(User * u, int index, MemoInfo * mi, const char *chan); +static void myMemoServHelp(User * u); extern void rsend_notify(User * u, Memo * m, const char *chan); @@ -56,7 +56,7 @@ void AnopeFini(void) * Add the help response to anopes /ms help output. * @param u The user who is requesting help **/ -void myMemoServHelp(User * u) +static void myMemoServHelp(User * u) { notice_lang(s_MemoServ, u, MEMO_HELP_CMD_READ); } @@ -66,7 +66,7 @@ void myMemoServHelp(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_read(User * u) +static int do_read(User * u) { MemoInfo *mi; ChannelInfo *ci; @@ -149,7 +149,7 @@ int do_read(User * u) * @param va_list variable arguements * @return result of read_memo() */ -int read_memo_callback(User * u, int num, va_list args) +static int read_memo_callback(User * u, int num, va_list args) { MemoInfo *mi = va_arg(args, MemoInfo *); const char *chan = va_arg(args, const char *); @@ -171,7 +171,7 @@ int read_memo_callback(User * u, int num, va_list args) * @param chan Channel Name * @return 1 on success, 0 if failed */ -int read_memo(User * u, int index, MemoInfo * mi, const char *chan) +static int read_memo(User * u, int index, MemoInfo * mi, const char *chan) { Memo *m; char timebuf[64]; diff --git a/src/core/ms_rsend.c b/src/core/ms_rsend.c index 8975cae8f..5b0b1b4b1 100644 --- a/src/core/ms_rsend.c +++ b/src/core/ms_rsend.c @@ -14,8 +14,8 @@ #include "module.h" -int do_rsend(User * u); -void myMemoServHelp(User * u); +static int do_rsend(User * u); +static void myMemoServHelp(User * u); /** * Create the command, and tell anope about it. @@ -57,7 +57,7 @@ void AnopeFini(void) * Add the help response to anopes /ms help output. * @param u The user who is requesting help **/ -void myMemoServHelp(User * u) +static void myMemoServHelp(User * u) { if (((MSMemoReceipt == 1) && (is_services_oper(u))) || (MSMemoReceipt == 2)) { @@ -70,7 +70,7 @@ void myMemoServHelp(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_rsend(User * u) +static int do_rsend(User * u) { char *name = strtok(NULL, " "); char *text = strtok(NULL, ""); diff --git a/src/core/ms_send.c b/src/core/ms_send.c index 985715ed1..1a0205084 100644 --- a/src/core/ms_send.c +++ b/src/core/ms_send.c @@ -14,8 +14,8 @@ #include "module.h" -int do_send(User * u); -void myMemoServHelp(User * u); +static int do_send(User * u); +static void myMemoServHelp(User * u); /** * Create the command, and tell anope about it. @@ -53,7 +53,7 @@ void AnopeFini(void) * Add the help response to anopes /ms help output. * @param u The user who is requesting help **/ -void myMemoServHelp(User * u) +static void myMemoServHelp(User * u) { notice_lang(s_MemoServ, u, MEMO_HELP_CMD_SEND); } @@ -63,7 +63,7 @@ void myMemoServHelp(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_send(User * u) +static int do_send(User * u) { char *name = strtok(NULL, " "); char *text = strtok(NULL, ""); diff --git a/src/core/ms_sendall.c b/src/core/ms_sendall.c index 1e8a0b600..96d5cfe5a 100644 --- a/src/core/ms_sendall.c +++ b/src/core/ms_sendall.c @@ -14,8 +14,8 @@ #include "module.h" -int do_sendall(User * u); -void myMemoServHelp(User * u); +static int do_sendall(User * u); +static void myMemoServHelp(User * u); /** * Create the command, and tell anope about it. @@ -53,7 +53,7 @@ void AnopeFini(void) * Add the help response to anopes /ms help output. * @param u The user who is requesting help **/ -void myMemoServHelp(User * u) +static void myMemoServHelp(User * u) { if (is_services_admin(u)) { notice_lang(s_MemoServ, u, MEMO_HELP_CMD_SENDALL); @@ -65,7 +65,7 @@ void myMemoServHelp(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_sendall(User * u) +static int do_sendall(User * u) { int i, z = 1; NickCore *nc; diff --git a/src/core/ms_set.c b/src/core/ms_set.c index 1d9af84ca..9aa04c202 100644 --- a/src/core/ms_set.c +++ b/src/core/ms_set.c @@ -14,10 +14,10 @@ #include "module.h" -int do_set(User * u); -int do_set_notify(User * u, MemoInfo * mi, char *param); -int do_set_limit(User * u, MemoInfo * mi, char *param); -void myMemoServHelp(User * u); +static int do_set(User * u); +static int do_set_notify(User * u, MemoInfo * mi, char *param); +static int do_set_limit(User * u, MemoInfo * mi, char *param); +static void myMemoServHelp(User * u); /** * Create the command, and tell anope about it. @@ -66,7 +66,7 @@ void AnopeFini(void) * Add the help response to anopes /hs help output. * @param u The user who is requesting help **/ -void myMemoServHelp(User * u) +static void myMemoServHelp(User * u) { notice_lang(s_MemoServ, u, MEMO_HELP_CMD_SET); } @@ -76,7 +76,7 @@ void myMemoServHelp(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 *cmd = strtok(NULL, " "); char *param = strtok(NULL, ""); @@ -107,7 +107,7 @@ int do_set(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_notify(User * u, MemoInfo * mi, char *param) +static int do_set_notify(User * u, MemoInfo * mi, char *param) { if (stricmp(param, "ON") == 0) { u->na->nc->flags |= NI_MEMO_SIGNON | NI_MEMO_RECEIVE; @@ -156,7 +156,7 @@ int do_set_notify(User * u, MemoInfo * mi, char *param) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_set_limit(User * u, MemoInfo * mi, char *param) +static int do_set_limit(User * u, MemoInfo * mi, char *param) { char *p1 = strtok(param, " "); char *p2 = strtok(NULL, " "); diff --git a/src/core/ms_staff.c b/src/core/ms_staff.c index 43ec3cab8..056522f92 100644 --- a/src/core/ms_staff.c +++ b/src/core/ms_staff.c @@ -14,8 +14,8 @@ #include "module.h" -int do_staff(User * u); -void myMemoServHelp(User * u); +static int do_staff(User * u); +static void myMemoServHelp(User * u); /** * Create the command, and tell anope about it. @@ -53,7 +53,7 @@ void AnopeFini(void) * Add the help response to anopes /ms help output. * @param u The user who is requesting help **/ -void myMemoServHelp(User * u) +static void myMemoServHelp(User * u) { if (is_services_oper(u)) { notice_lang(s_MemoServ, u, MEMO_HELP_CMD_STAFF); @@ -65,7 +65,7 @@ void myMemoServHelp(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_staff(User * u) +static int do_staff(User * u) { NickCore *nc; int i, z = 0; diff --git a/src/core/ns_access.c b/src/core/ns_access.c index b2bdf45be..29f2e9d81 100644 --- a/src/core/ns_access.c +++ b/src/core/ns_access.c @@ -14,8 +14,8 @@ #include "module.h" -int do_access(User * u); -void myNickServHelp(User * u); +static int do_access(User * u); +static void myNickServHelp(User * u); /** * Create the command, and tell anope about it. @@ -54,7 +54,7 @@ void AnopeFini(void) * Add the help response to anopes /ns help output. * @param u The user who is requesting help **/ -void myNickServHelp(User * u) +static void myNickServHelp(User * u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_ACCESS); } @@ -64,7 +64,7 @@ void myNickServHelp(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_access(User * u) +static int do_access(User * u) { char *cmd = strtok(NULL, " "); char *mask = strtok(NULL, " "); diff --git a/src/core/ns_alist.c b/src/core/ns_alist.c index 69baaf2f8..9d7c127fa 100644 --- a/src/core/ns_alist.c +++ b/src/core/ns_alist.c @@ -14,8 +14,8 @@ #include "module.h" -int do_alist(User * u); -void myNickServHelp(User * u); +static int do_alist(User * u); +static void myNickServHelp(User * u); /** * Create the command, and tell anope about it. @@ -55,7 +55,7 @@ void AnopeFini(void) * Add the help response to anopes /ns help output. * @param u The user who is requesting help **/ -void myNickServHelp(User * u) +static void myNickServHelp(User * u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_ALIST); } @@ -65,7 +65,7 @@ void myNickServHelp(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_alist(User * u) +static int do_alist(User * u) { /* diff --git a/src/core/ns_drop.c b/src/core/ns_drop.c index 38854d282..7c3bd936f 100644 --- a/src/core/ns_drop.c +++ b/src/core/ns_drop.c @@ -14,9 +14,9 @@ #include "module.h" -int do_drop(User * u); -int do_unlink(User * u); -void myNickServHelp(User * u); +static int do_drop(User * u); +static int do_unlink(User * u); +static void myNickServHelp(User * u); /** * Create the command, and tell anope about it. @@ -57,7 +57,7 @@ void AnopeFini(void) * Add the help response to anopes /ns help output. * @param u The user who is requesting help **/ -void myNickServHelp(User * u) +static void myNickServHelp(User * u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_DROP); } @@ -67,7 +67,7 @@ void myNickServHelp(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 *nick = strtok(NULL, " "); NickAlias *na; @@ -148,7 +148,7 @@ int do_drop(User * u) } -int do_unlink(User * u) +static int do_unlink(User * u) { notice_lang(s_NickServ, u, OBSOLETE_COMMAND, "DROP"); return MOD_CONT; diff --git a/src/core/ns_forbid.c b/src/core/ns_forbid.c index bed2ecff1..e49ad251b 100644 --- a/src/core/ns_forbid.c +++ b/src/core/ns_forbid.c @@ -14,8 +14,8 @@ #include "module.h" -int do_forbid(User * u); -void myNickServHelp(User * u); +static int do_forbid(User * u); +static void myNickServHelp(User * u); NickAlias *makenick(const char *nick); /** @@ -56,7 +56,7 @@ void AnopeFini(void) * Add the help response to anopes /ns help output. * @param u The user who is requesting help **/ -void myNickServHelp(User * u) +static void myNickServHelp(User * u) { if (is_services_admin(u)) { notice_lang(s_NickServ, u, NICK_HELP_CMD_FORBID); @@ -68,7 +68,7 @@ void myNickServHelp(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) { NickAlias *na; char *nick = strtok(NULL, " "); diff --git a/src/core/ns_getemail.c b/src/core/ns_getemail.c index 976bd03ce..ec98eabce 100644 --- a/src/core/ns_getemail.c +++ b/src/core/ns_getemail.c @@ -19,8 +19,8 @@ #include "module.h" -int do_getemail(User * u); -void myNickServHelp(User * u); +static int do_getemail(User * u); +static void myNickServHelp(User * u); /** * Create the command, and tell anope about it. @@ -58,7 +58,7 @@ void AnopeFini(void) * Add the help response to anopes /ns help output. * @param u The user who is requesting help **/ -void myNickServHelp(User * u) +static void myNickServHelp(User * u) { if (is_services_admin(u)) { notice_lang(s_NickServ, u, NICK_HELP_CMD_GETEMAIL); @@ -70,7 +70,7 @@ void myNickServHelp(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_getemail(User * u) +static int do_getemail(User * u) { char *email = strtok(NULL, " "); int i, j = 0; diff --git a/src/core/ns_getpass.c b/src/core/ns_getpass.c index cfe6c5592..8a6bc561e 100644 --- a/src/core/ns_getpass.c +++ b/src/core/ns_getpass.c @@ -14,8 +14,8 @@ #include "module.h" -int do_getpass(User * u); -void myNickServHelp(User * u); +static int do_getpass(User * u); +static void myNickServHelp(User * u); /** * Create the command, and tell anope about it. @@ -53,7 +53,7 @@ void AnopeFini(void) * Add the help response to anopes /ns help output. * @param u The user who is requesting help **/ -void myNickServHelp(User * u) +static void myNickServHelp(User * u) { if (is_services_admin(u)) { notice_lang(s_NickServ, u, NICK_HELP_CMD_GETPASS); @@ -65,7 +65,7 @@ void myNickServHelp(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_getpass(User * u) +static int do_getpass(User * u) { char *nick = strtok(NULL, " "); char tmp_pass[PASSMAX]; diff --git a/src/core/ns_ghost.c b/src/core/ns_ghost.c index 3b531b2ef..96abcb640 100644 --- a/src/core/ns_ghost.c +++ b/src/core/ns_ghost.c @@ -14,8 +14,8 @@ #include "module.h" -int do_ghost(User * u); -void myNickServHelp(User * u); +static int do_ghost(User * u); +static void myNickServHelp(User * u); /** * Create the command, and tell anope about it. @@ -54,7 +54,7 @@ void AnopeFini(void) * Add the help response to anopes /ns help output. * @param u The user who is requesting help **/ -void myNickServHelp(User * u) +static void myNickServHelp(User * u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_GHOST); } @@ -64,7 +64,7 @@ void myNickServHelp(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_ghost(User * u) +static int do_ghost(User * u) { char *nick = strtok(NULL, " "); char *pass = strtok(NULL, " "); diff --git a/src/core/ns_group.c b/src/core/ns_group.c index 175d0ee03..050c8618a 100644 --- a/src/core/ns_group.c +++ b/src/core/ns_group.c @@ -14,15 +14,15 @@ #include "module.h" -int do_group(User * u); -void myNickServHelp(User * u); -int do_glist(User * u); -int do_listlinks(User * u); +static int do_group(User * u); +static void myNickServHelp(User * u); +static int do_glist(User * u); +static int do_listlinks(User * u); NickAlias *makealias(const char *nick, NickCore * nc); /* Obsolete commands */ -int do_link(User * u); +static int do_link(User * u); /** * Create the command, and tell anope about it. @@ -72,7 +72,7 @@ void AnopeFini(void) * Add the help response to anopes /ns help output. * @param u The user who is requesting help **/ -void myNickServHelp(User * u) +static void myNickServHelp(User * u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_GROUP); notice_lang(s_NickServ, u, NICK_HELP_CMD_GLIST); @@ -85,7 +85,7 @@ void myNickServHelp(User * u) **/ /* Register a nick in a specified group. */ -int do_group(User * u) +static int do_group(User * u) { NickAlias *na, *target; NickCore *nc; @@ -281,13 +281,13 @@ NickAlias *makealias(const char *nick, NickCore * nc) } -int do_link(User * u) +static int do_link(User * u) { notice_lang(s_NickServ, u, OBSOLETE_COMMAND, "GROUP"); return MOD_CONT; } -int do_glist(User * u) +static int do_glist(User * u) { char *nick = strtok(NULL, " "); @@ -338,7 +338,7 @@ int do_glist(User * u) } -int do_listlinks(User * u) +static int do_listlinks(User * u) { notice_lang(s_NickServ, u, OBSOLETE_COMMAND, "GLIST"); return MOD_CONT; diff --git a/src/core/ns_help.c b/src/core/ns_help.c index 6d383afcf..12d5345da 100644 --- a/src/core/ns_help.c +++ b/src/core/ns_help.c @@ -14,7 +14,7 @@ #include "module.h" -int do_help(User * u); +static int do_help(User * u); /** * Create the 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/ns_identify.c b/src/core/ns_identify.c index 7ceb1feaf..a3b5a9688 100644 --- a/src/core/ns_identify.c +++ b/src/core/ns_identify.c @@ -17,8 +17,8 @@ #define TO_COLLIDE 0 /* Collide the user with this nick */ #define TO_RELEASE 1 /* Release a collided nick */ -int do_identify(User * u); -void myNickServHelp(User * u); +static int do_identify(User * u); +static void myNickServHelp(User * u); /** * Create the command, and tell anope about it. @@ -61,7 +61,7 @@ void AnopeFini(void) * Add the help response to anopes /ns help output. * @param u The user who is requesting help **/ -void myNickServHelp(User * u) +static void myNickServHelp(User * u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_IDENTIFY); } @@ -71,7 +71,7 @@ void myNickServHelp(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 *pass = strtok(NULL, " "); NickAlias *na; diff --git a/src/core/ns_info.c b/src/core/ns_info.c index f9860f014..0065d3a8b 100644 --- a/src/core/ns_info.c +++ b/src/core/ns_info.c @@ -15,7 +15,7 @@ #include "module.h" static int do_info(User * u); -void myNickServHelp(User * u); +static void myNickServHelp(User * u); /** * Create the command, and tell anope about it. @@ -56,7 +56,7 @@ void AnopeFini(void) * Add the help response to anopes /ns help output. * @param u The user who is requesting help **/ -void myNickServHelp(User * u) +static void myNickServHelp(User * u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_INFO); } @@ -66,7 +66,7 @@ void myNickServHelp(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) { /* Show hidden info to nick owners and sadmins when the "ALL" parameter is diff --git a/src/core/ns_list.c b/src/core/ns_list.c index 6eb6aff63..6c62d648a 100644 --- a/src/core/ns_list.c +++ b/src/core/ns_list.c @@ -14,8 +14,8 @@ #include "module.h" -int do_list(User * u); -void myNickServHelp(User * u); +static int do_list(User * u); +static void myNickServHelp(User * u); /** * Create the command, and tell anope about it. @@ -55,7 +55,7 @@ void AnopeFini(void) * Add the help response to anopes /ns help output. * @param u The user who is requesting help **/ -void myNickServHelp(User * u) +static void myNickServHelp(User * u) { if (!NSListOpersOnly || (is_oper(u))) { notice_lang(s_NickServ, u, NICK_HELP_CMD_LIST); @@ -67,7 +67,7 @@ void myNickServHelp(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) { /* SADMINS can search for nicks based on their NS_VERBOTEN and NS_NO_EXPIRE diff --git a/src/core/ns_logout.c b/src/core/ns_logout.c index b24086bc8..148ec15c3 100644 --- a/src/core/ns_logout.c +++ b/src/core/ns_logout.c @@ -17,8 +17,8 @@ #define TO_COLLIDE 0 /* Collide the user with this nick */ #define TO_RELEASE 1 /* Release a collided nick */ -int do_logout(User * u); -void myNickServHelp(User * u); +static int do_logout(User * u); +static void myNickServHelp(User * u); /** * Create the command, and tell anope about it. @@ -58,7 +58,7 @@ void AnopeFini(void) * Add the help response to anopes /ns help output. * @param u The user who is requesting help **/ -void myNickServHelp(User * u) +static void myNickServHelp(User * u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_LOGOUT); } @@ -68,7 +68,7 @@ void myNickServHelp(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 *nick = strtok(NULL, " "); char *param = strtok(NULL, " "); diff --git a/src/core/ns_recover.c b/src/core/ns_recover.c index 301665aa9..d2c2782ea 100644 --- a/src/core/ns_recover.c +++ b/src/core/ns_recover.c @@ -16,9 +16,9 @@ Command *c; -int do_recover(User * u); -void myNickServHelp(User * u); -int myHelpResonse(User * u); +static int do_recover(User * u); +static void myNickServHelp(User * u); +static int myHelpResonse(User * u); /** * Create the command, and tell anope about it. @@ -53,7 +53,7 @@ void AnopeFini(void) * Add the help response to anopes /ns help output. * @param u The user who is requesting help **/ -void myNickServHelp(User * u) +static void myNickServHelp(User * u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_RECOVER); } @@ -62,7 +62,7 @@ void myNickServHelp(User * u) * Show the extended help on the RECOVER command. * @param u The user who is requesting help **/ -int myHelpResonse(User * u) +static int myHelpResonse(User * u) { char relstr[192]; @@ -80,7 +80,7 @@ int myHelpResonse(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_recover(User * u) +static int do_recover(User * u) { char *nick = strtok(NULL, " "); char *pass = strtok(NULL, " "); diff --git a/src/core/ns_register.c b/src/core/ns_register.c index 91611ca30..40a583ea9 100644 --- a/src/core/ns_register.c +++ b/src/core/ns_register.c @@ -15,13 +15,13 @@ #include "module.h" #include "encrypt.h" -int do_confirm(User * u); -int do_register(User * u); -int do_resend(User * u); -void myNickServHelp(User * u); +static int do_confirm(User * u); +static int do_register(User * u); +static int do_resend(User * u); +static void myNickServHelp(User * u); NickRequest *makerequest(const char *nick); NickAlias *makenick(const char *nick); -int do_sendregmail(User * u, NickRequest * nr); +static int do_sendregmail(User * u, NickRequest * nr); int ns_do_register(User * u); /** @@ -68,7 +68,7 @@ void AnopeFini(void) * Add the help response to anopes /ns help output. * @param u The user who is requesting help **/ -void myNickServHelp(User * u) +static void myNickServHelp(User * u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_REGISTER); if (NSEmailReg) { @@ -82,7 +82,7 @@ void myNickServHelp(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) { NickRequest *nr = NULL, *anr = NULL; NickCore *nc = NULL; @@ -234,7 +234,7 @@ int ns_do_register(User * u) } -int do_confirm(User * u) +static int do_confirm(User * u) { NickRequest *nr = NULL; @@ -436,7 +436,7 @@ NickAlias *makenick(const char *nick) /* Register a nick. */ -int do_resend(User * u) +static int do_resend(User * u) { NickRequest *nr = NULL; if (NSEmailReg) { @@ -458,7 +458,7 @@ int do_resend(User * u) return MOD_CONT; } -int do_sendregmail(User * u, NickRequest * nr) +static int do_sendregmail(User * u, NickRequest * nr) { MailInfo *mail = NULL; char buf[BUFSIZE]; diff --git a/src/core/ns_release.c b/src/core/ns_release.c index f27a402f0..936a2e329 100644 --- a/src/core/ns_release.c +++ b/src/core/ns_release.c @@ -16,9 +16,9 @@ Command *c; -int do_release(User * u); -void myNickServHelp(User * u); -int myHelpResonse(User * u); +static int do_release(User * u); +static void myNickServHelp(User * u); +static int myHelpResonse(User * u); /** * Create the command, and tell anope about it. @@ -55,7 +55,7 @@ void AnopeFini(void) * Add the help response to anopes /ns help output. * @param u The user who is requesting help **/ -void myNickServHelp(User * u) +static void myNickServHelp(User * u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_RELEASE); } @@ -64,7 +64,7 @@ void myNickServHelp(User * u) * Show the extended help on the RELEASE command. * @param u The user who is requesting help **/ -int myHelpResonse(User * u) +static int myHelpResonse(User * u) { char relstr[192]; @@ -82,7 +82,7 @@ int myHelpResonse(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_release(User * u) +static int do_release(User * u) { char *nick = strtok(NULL, " "); char *pass = strtok(NULL, " "); diff --git a/src/core/ns_saset.c b/src/core/ns_saset.c index fec885daa..4a7d7c144 100644 --- a/src/core/ns_saset.c +++ b/src/core/ns_saset.c @@ -15,22 +15,22 @@ #include "module.h" #include "encrypt.h" -int do_saset(User * u); -int do_saset_display(User * u, NickCore * nc, char *param); -int do_saset_password(User * u, NickCore * nc, char *param); -int do_saset_url(User * u, NickCore * nc, char *param); -int do_saset_email(User * u, NickCore * nc, char *param); -int do_saset_greet(User * u, NickCore * nc, char *param); -int do_saset_icq(User * u, NickCore * nc, char *param); -int do_saset_kill(User * u, NickCore * nc, char *param); -int do_saset_secure(User * u, NickCore * nc, char *param); -int do_saset_private(User * u, NickCore * nc, char *param); -int do_saset_msg(User * u, NickCore * nc, char *param); -int do_saset_hide(User * u, NickCore * nc, char *param); -int do_saset_noexpire(User * u, NickAlias * nc, char *param); -int do_saset_autoop(User * u, NickCore * nc, char *param); -int do_saset_language(User * u, NickCore * nc, char *param); -void myNickServHelp(User * u); +static int do_saset(User * u); +static int do_saset_display(User * u, NickCore * nc, char *param); +static int do_saset_password(User * u, NickCore * nc, char *param); +static int do_saset_url(User * u, NickCore * nc, char *param); +static int do_saset_email(User * u, NickCore * nc, char *param); +static int do_saset_greet(User * u, NickCore * nc, char *param); +static int do_saset_icq(User * u, NickCore * nc, char *param); +static int do_saset_kill(User * u, NickCore * nc, char *param); +static int do_saset_secure(User * u, NickCore * nc, char *param); +static int do_saset_private(User * u, NickCore * nc, char *param); +static int do_saset_msg(User * u, NickCore * nc, char *param); +static int do_saset_hide(User * u, NickCore * nc, char *param); +static int do_saset_noexpire(User * u, NickAlias * nc, char *param); +static int do_saset_autoop(User * u, NickCore * nc, char *param); +static int do_saset_language(User * u, NickCore * nc, char *param); +static void myNickServHelp(User * u); /** * Create the command, and tell anope about it. @@ -112,7 +112,7 @@ void AnopeFini(void) * Add the help response to anopes /ns help output. * @param u The user who is requesting help **/ -void myNickServHelp(User * u) +static void myNickServHelp(User * u) { if (is_services_oper(u)) notice_lang(s_NickServ, u, NICK_HELP_CMD_SASET); @@ -123,7 +123,7 @@ void myNickServHelp(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_saset(User * u) +static int do_saset(User * u) { char *nick = strtok(NULL, " "); char *cmd = strtok(NULL, " "); @@ -190,7 +190,7 @@ int do_saset(User * u) return MOD_CONT; } -int do_saset_display(User * u, NickCore * nc, char *param) +static int do_saset_display(User * u, NickCore * nc, char *param) { int i; NickAlias *na; @@ -226,7 +226,7 @@ int do_saset_display(User * u, NickCore * nc, char *param) return MOD_CONT; } -int do_saset_password(User * u, NickCore * nc, char *param) +static int do_saset_password(User * u, NickCore * nc, char *param) { int len = strlen(param); char tmp_pass[PASSMAX]; @@ -271,7 +271,7 @@ int do_saset_password(User * u, NickCore * nc, char *param) return MOD_CONT; } -int do_saset_url(User * u, NickCore * nc, char *param) +static int do_saset_url(User * u, NickCore * nc, char *param) { if (nc->url) free(nc->url); @@ -291,7 +291,7 @@ int do_saset_url(User * u, NickCore * nc, char *param) return MOD_CONT; } -int do_saset_email(User * u, NickCore * nc, char *param) +static int do_saset_email(User * u, NickCore * nc, char *param) { if (!param && NSForceEmail) { notice_lang(s_NickServ, u, NICK_SASET_EMAIL_UNSET_IMPOSSIBLE); @@ -324,7 +324,7 @@ int do_saset_email(User * u, NickCore * nc, char *param) return MOD_CONT; } -int do_saset_icq(User * u, NickCore * nc, char *param) +static int do_saset_icq(User * u, NickCore * nc, char *param) { if (param) { int32 tmp = atol(param); @@ -346,7 +346,7 @@ int do_saset_icq(User * u, NickCore * nc, char *param) return MOD_CONT; } -int do_saset_greet(User * u, NickCore * nc, char *param) +static int do_saset_greet(User * u, NickCore * nc, char *param) { if (nc->greet) free(nc->greet); @@ -372,7 +372,7 @@ int do_saset_greet(User * u, NickCore * nc, char *param) return MOD_CONT; } -int do_saset_kill(User * u, NickCore * nc, char *param) +static int do_saset_kill(User * u, NickCore * nc, char *param) { if (stricmp(param, "ON") == 0) { nc->flags |= NI_KILLPROTECT; @@ -409,7 +409,7 @@ int do_saset_kill(User * u, NickCore * nc, char *param) return MOD_CONT; } -int do_saset_secure(User * u, NickCore * nc, char *param) +static int do_saset_secure(User * u, NickCore * nc, char *param) { if (stricmp(param, "ON") == 0) { nc->flags |= NI_SECURE; @@ -428,7 +428,7 @@ int do_saset_secure(User * u, NickCore * nc, char *param) return MOD_CONT; } -int do_saset_private(User * u, NickCore * nc, char *param) +static int do_saset_private(User * u, NickCore * nc, char *param) { if (stricmp(param, "ON") == 0) { nc->flags |= NI_PRIVATE; @@ -447,7 +447,7 @@ int do_saset_private(User * u, NickCore * nc, char *param) return MOD_CONT; } -int do_saset_msg(User * u, NickCore * nc, char *param) +static int do_saset_msg(User * u, NickCore * nc, char *param) { if (!UsePrivmsg) { notice_lang(s_NickServ, u, NICK_SASET_OPTION_DISABLED, "MSG"); @@ -470,7 +470,7 @@ int do_saset_msg(User * u, NickCore * nc, char *param) return MOD_CONT; } -int do_saset_hide(User * u, NickCore * nc, char *param) +static int do_saset_hide(User * u, NickCore * nc, char *param) { int flag, onmsg, offmsg; char *param2; @@ -516,7 +516,7 @@ int do_saset_hide(User * u, NickCore * nc, char *param) return MOD_CONT; } -int do_saset_noexpire(User * u, NickAlias * na, char *param) +static int do_saset_noexpire(User * u, NickAlias * na, char *param) { if (!param) { syntax_error(s_NickServ, u, "SASET NOEXPIRE", @@ -540,7 +540,7 @@ int do_saset_noexpire(User * u, NickAlias * na, char *param) return MOD_CONT; } -int do_saset_autoop(User * u, NickCore * nc, char *param) +static int do_saset_autoop(User * u, NickCore * nc, char *param) { if (stricmp(param, "ON") == 0) { nc->flags &= ~NI_AUTOOP; @@ -559,7 +559,7 @@ int do_saset_autoop(User * u, NickCore * nc, char *param) return MOD_CONT; } -int do_saset_language(User * u, NickCore * nc, char *param) +static int do_saset_language(User * u, NickCore * nc, char *param) { int langnum; diff --git a/src/core/ns_sendpass.c b/src/core/ns_sendpass.c index 68a274c92..36e6a700d 100644 --- a/src/core/ns_sendpass.c +++ b/src/core/ns_sendpass.c @@ -14,9 +14,9 @@ #include "module.h" -int do_sendpass(User * u); +static int do_sendpass(User * u); -void myNickServHelp(User * u); +static void myNickServHelp(User * u); /** * Create the command, and tell anope about it. @@ -56,7 +56,7 @@ void AnopeFini(void) * Add the help response to anopes /ns help output. * @param u The user who is requesting help **/ -void myNickServHelp(User * u) +static void myNickServHelp(User * u) { if (!RestrictMail || is_services_oper(u)) notice_lang(s_NickServ, u, NICK_HELP_CMD_SENDPASS); @@ -67,7 +67,7 @@ void myNickServHelp(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 *nick = strtok(NULL, " "); diff --git a/src/core/ns_set.c b/src/core/ns_set.c index 302906f6c..6cc3908dc 100644 --- a/src/core/ns_set.c +++ b/src/core/ns_set.c @@ -15,21 +15,21 @@ #include "module.h" #include "encrypt.h" -int do_set(User * u); -int do_set_display(User * u, NickCore * nc, char *param); -int do_set_password(User * u, NickCore * nc, char *param); -int do_set_language(User * u, NickCore * nc, char *param); -int do_set_url(User * u, NickCore * nc, char *param); -int do_set_email(User * u, NickCore * nc, char *param); -int do_set_greet(User * u, NickCore * nc, char *param); -int do_set_icq(User * u, NickCore * nc, char *param); -int do_set_kill(User * u, NickCore * nc, char *param); -int do_set_secure(User * u, NickCore * nc, char *param); -int do_set_private(User * u, NickCore * nc, char *param); -int do_set_msg(User * u, NickCore * nc, char *param); -int do_set_hide(User * u, NickCore * nc, char *param); -int do_set_autoop(User *u, NickCore *nc, char *param); -void myNickServHelp(User * u); +static int do_set(User * u); +static int do_set_display(User * u, NickCore * nc, char *param); +static int do_set_password(User * u, NickCore * nc, char *param); +static int do_set_language(User * u, NickCore * nc, char *param); +static int do_set_url(User * u, NickCore * nc, char *param); +static int do_set_email(User * u, NickCore * nc, char *param); +static int do_set_greet(User * u, NickCore * nc, char *param); +static int do_set_icq(User * u, NickCore * nc, char *param); +static int do_set_kill(User * u, NickCore * nc, char *param); +static int do_set_secure(User * u, NickCore * nc, char *param); +static int do_set_private(User * u, NickCore * nc, char *param); +static int do_set_msg(User * u, NickCore * nc, char *param); +static int do_set_hide(User * u, NickCore * nc, char *param); +static int do_set_autoop(User *u, NickCore *nc, char *param); +static void myNickServHelp(User * u); /** * Create the command, and tell anope about it. @@ -103,7 +103,7 @@ void AnopeFini(void) * Add the help response to anopes /ns help output. * @param u The user who is requesting help **/ -void myNickServHelp(User * u) +static void myNickServHelp(User * u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_SET); } @@ -113,7 +113,7 @@ void myNickServHelp(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 *cmd = strtok(NULL, " "); char *param = strtok(NULL, " "); @@ -170,7 +170,7 @@ int do_set(User * u) return MOD_CONT; } -int do_set_display(User * u, NickCore * nc, char *param) +static int do_set_display(User * u, NickCore * nc, char *param) { int i; NickAlias *na; @@ -201,7 +201,7 @@ int do_set_display(User * u, NickCore * nc, char *param) return MOD_CONT; } -int do_set_password(User * u, NickCore * nc, char *param) +static int do_set_password(User * u, NickCore * nc, char *param) { int len = strlen(param); char tmp_pass[PASSMAX]; @@ -235,7 +235,7 @@ int do_set_password(User * u, NickCore * nc, char *param) return MOD_CONT; } -int do_set_language(User * u, NickCore * nc, char *param) +static int do_set_language(User * u, NickCore * nc, char *param) { int langnum; @@ -257,7 +257,7 @@ int do_set_language(User * u, NickCore * nc, char *param) return MOD_CONT; } -int do_set_url(User * u, NickCore * nc, char *param) +static int do_set_url(User * u, NickCore * nc, char *param) { if (nc->url) free(nc->url); @@ -276,7 +276,7 @@ int do_set_url(User * u, NickCore * nc, char *param) return MOD_CONT; } -int do_set_email(User * u, NickCore * nc, char *param) +static int do_set_email(User * u, NickCore * nc, char *param) { if (!param && NSForceEmail) { notice_lang(s_NickServ, u, NICK_SET_EMAIL_UNSET_IMPOSSIBLE); @@ -303,7 +303,7 @@ int do_set_email(User * u, NickCore * nc, char *param) return MOD_CONT; } -int do_set_icq(User * u, NickCore * nc, char *param) +static int do_set_icq(User * u, NickCore * nc, char *param) { if (param) { int32 tmp = atol(param); @@ -324,7 +324,7 @@ int do_set_icq(User * u, NickCore * nc, char *param) return MOD_CONT; } -int do_set_greet(User * u, NickCore * nc, char *param) +static int do_set_greet(User * u, NickCore * nc, char *param) { if (nc->greet) free(nc->greet); @@ -347,7 +347,7 @@ int do_set_greet(User * u, NickCore * nc, char *param) return MOD_CONT; } -int do_set_kill(User * u, NickCore * nc, char *param) +static int do_set_kill(User * u, NickCore * nc, char *param) { if (stricmp(param, "ON") == 0) { nc->flags |= NI_KILLPROTECT; @@ -384,7 +384,7 @@ int do_set_kill(User * u, NickCore * nc, char *param) return MOD_CONT; } -int do_set_secure(User * u, NickCore * nc, char *param) +static int do_set_secure(User * u, NickCore * nc, char *param) { if (stricmp(param, "ON") == 0) { nc->flags |= NI_SECURE; @@ -402,7 +402,7 @@ int do_set_secure(User * u, NickCore * nc, char *param) return MOD_CONT; } -int do_set_private(User * u, NickCore * nc, char *param) +static int do_set_private(User * u, NickCore * nc, char *param) { if (stricmp(param, "ON") == 0) { nc->flags |= NI_PRIVATE; @@ -421,7 +421,7 @@ int do_set_private(User * u, NickCore * nc, char *param) return MOD_CONT; } -int do_set_msg(User * u, NickCore * nc, char *param) +static int do_set_msg(User * u, NickCore * nc, char *param) { if (!UsePrivmsg) { notice_lang(s_NickServ, u, NICK_SET_OPTION_DISABLED, "MSG"); @@ -444,7 +444,7 @@ int do_set_msg(User * u, NickCore * nc, char *param) return MOD_CONT; } -int do_set_hide(User * u, NickCore * nc, char *param) +static int do_set_hide(User * u, NickCore * nc, char *param) { int flag, onmsg, offmsg; char *param2; @@ -490,7 +490,7 @@ int do_set_hide(User * u, NickCore * nc, char *param) return MOD_CONT; } -int do_set_autoop(User *u, NickCore *nc, char *param) { +static int do_set_autoop(User *u, NickCore *nc, char *param) { /** * This works the other way around, the absence of this flag denotes ON diff --git a/src/core/ns_status.c b/src/core/ns_status.c index 609478861..00926ae39 100644 --- a/src/core/ns_status.c +++ b/src/core/ns_status.c @@ -14,8 +14,8 @@ #include "module.h" -int do_status(User * u); -void myNickServHelp(User * u); +static int do_status(User * u); +static void myNickServHelp(User * u); /** * Create the command, and tell anope about it. @@ -52,7 +52,7 @@ void AnopeFini(void) * Add the help response to anopes /ns help output. * @param u The user who is requesting help **/ -void myNickServHelp(User * u) +static void myNickServHelp(User * u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_STATUS); } @@ -62,7 +62,7 @@ void myNickServHelp(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) { User *u2; NickAlias *na = NULL; diff --git a/src/core/ns_suspend.c b/src/core/ns_suspend.c index 49f669484..f26aad0ec 100644 --- a/src/core/ns_suspend.c +++ b/src/core/ns_suspend.c @@ -14,9 +14,9 @@ #include "module.h" -int do_suspend(User * u); -int do_unsuspend(User * u); -void myNickServHelp(User * u); +static int do_suspend(User * u); +static int do_unsuspend(User * u); +static void myNickServHelp(User * u); /** * Create the command, and tell anope about it. @@ -60,7 +60,7 @@ void AnopeFini(void) * Add the help response to anopes /ns help output. * @param u The user who is requesting help **/ -void myNickServHelp(User * u) +static void myNickServHelp(User * u) { if (is_services_oper(u)) { notice_lang(s_NickServ, u, NICK_HELP_CMD_SUSPEND); @@ -73,7 +73,7 @@ void myNickServHelp(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) { NickAlias *na, *na2; User *u2; @@ -151,7 +151,7 @@ int do_suspend(User * u) /*************************************************************************/ -int do_unsuspend(User * u) +static int do_unsuspend(User * u) { NickAlias *na; char *nick = strtok(NULL, " "); diff --git a/src/core/ns_update.c b/src/core/ns_update.c index c18f9dd1c..e79037082 100644 --- a/src/core/ns_update.c +++ b/src/core/ns_update.c @@ -14,8 +14,8 @@ #include "module.h" -int do_nickupdate(User * u); -void myNickServHelp(User * u); +static int do_nickupdate(User * u); +static void myNickServHelp(User * u); /** * Create the command, and tell anope about it. @@ -54,7 +54,7 @@ void AnopeFini(void) * Add the help response to anopes /ns help output. * @param u The user who is requesting help **/ -void myNickServHelp(User * u) +static void myNickServHelp(User * u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_UPDATE); } @@ -64,7 +64,7 @@ void myNickServHelp(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_nickupdate(User * u) +static int do_nickupdate(User * u) { NickAlias *na; diff --git a/src/core/os_admin.c b/src/core/os_admin.c index fd307b42a..8e8b402e9 100644 --- a/src/core/os_admin.c +++ b/src/core/os_admin.c @@ -14,11 +14,11 @@ #include "module.h" -int do_admin(User * u); -int admin_list_callback(SList * slist, int number, void *item, +static int do_admin(User * u); +static int admin_list_callback(SList * slist, int number, void *item, va_list args); -int admin_list(int number, NickCore * nc, User * u, int *sent_header); -void myOperServHelp(User * u); +static int admin_list(int number, NickCore * nc, User * u, int *sent_header); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -58,7 +58,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_ADMIN); } @@ -68,7 +68,7 @@ void myOperServHelp(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_admin(User * u) +static int do_admin(User * u) { char *cmd = strtok(NULL, " "); char *nick = strtok(NULL, " "); @@ -223,7 +223,7 @@ int do_admin(User * u) return MOD_CONT; } -int admin_list_callback(SList * slist, int number, void *item, +static int admin_list_callback(SList * slist, int number, void *item, va_list args) { User *u = va_arg(args, User *); @@ -232,7 +232,7 @@ int admin_list_callback(SList * slist, int number, void *item, return admin_list(number, item, u, sent_header); } -int admin_list(int number, NickCore * nc, User * u, int *sent_header) +static int admin_list(int number, NickCore * nc, User * u, int *sent_header) { if (!nc) return 0; diff --git a/src/core/os_akill.c b/src/core/os_akill.c index 9472ad00e..963cca57c 100644 --- a/src/core/os_akill.c +++ b/src/core/os_akill.c @@ -14,14 +14,14 @@ #include "module.h" -int do_akill(User * u); -int akill_view_callback(SList * slist, int number, void *item, +static int do_akill(User * u); +static int akill_view_callback(SList * slist, int number, void *item, va_list args); -int akill_view(int number, Akill * ak, User * u, int *sent_header); -int akill_list_callback(SList * slist, int number, void *item, +static int akill_view(int number, Akill * ak, User * u, int *sent_header); +static int akill_list_callback(SList * slist, int number, void *item, va_list args); -int akill_list(int number, Akill * ak, User * u, int *sent_header); -void myOperServHelp(User * u); +static int akill_list(int number, Akill * ak, User * u, int *sent_header); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -60,7 +60,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_oper(u)) { notice_lang(s_OperServ, u, OPER_HELP_CMD_AKILL); @@ -74,7 +74,7 @@ void myOperServHelp(User * u) **/ /* Manage the AKILL list. */ -int do_akill(User * u) +static int do_akill(User * u) { char *cmd = strtok(NULL, " "); char breason[BUFSIZE]; @@ -317,7 +317,7 @@ int do_akill(User * u) return MOD_CONT; } -int akill_view(int number, Akill * ak, User * u, int *sent_header) +static int akill_view(int number, Akill * ak, User * u, int *sent_header) { char mask[BUFSIZE]; char timebuf[32], expirebuf[256]; @@ -344,7 +344,7 @@ int akill_view(int number, Akill * ak, User * u, int *sent_header) /* Lists an AKILL entry, prefixing it with the header if needed */ -int akill_list_callback(SList * slist, int number, void *item, +static int akill_list_callback(SList * slist, int number, void *item, va_list args) { User *u = va_arg(args, User *); @@ -355,7 +355,7 @@ int akill_list_callback(SList * slist, int number, void *item, /* Callback for enumeration purposes */ -int akill_view_callback(SList * slist, int number, void *item, +static int akill_view_callback(SList * slist, int number, void *item, va_list args) { User *u = va_arg(args, User *); @@ -365,7 +365,7 @@ int akill_view_callback(SList * slist, int number, void *item, } /* Lists an AKILL entry, prefixing it with the header if needed */ -int akill_list(int number, Akill * ak, User * u, int *sent_header) +static int akill_list(int number, Akill * ak, User * u, int *sent_header) { char mask[BUFSIZE]; diff --git a/src/core/os_chankill.c b/src/core/os_chankill.c index 82125c0e2..0eb49f745 100644 --- a/src/core/os_chankill.c +++ b/src/core/os_chankill.c @@ -14,8 +14,8 @@ #include "module.h" -int do_chankill(User * u); -void myOperServHelp(User * u); +static int do_chankill(User * u); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -55,7 +55,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_admin(u)) { notice_lang(s_OperServ, u, OPER_HELP_CMD_CHANKILL); @@ -70,7 +70,7 @@ void myOperServHelp(User * u) * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. * **/ -int do_chankill(User * u) +static int do_chankill(User * u) { char *expiry, *channel, *reason; time_t expires; diff --git a/src/core/os_chanlist.c b/src/core/os_chanlist.c index e401207f9..8b6bb5a8e 100644 --- a/src/core/os_chanlist.c +++ b/src/core/os_chanlist.c @@ -14,8 +14,8 @@ #include "module.h" -int do_chanlist(User * u); -void myOperServHelp(User * u); +static int do_chanlist(User * u); +static void myOperServHelp(User * u); #ifdef _WIN32 extern MDE int anope_get_private_mode(); #endif @@ -57,7 +57,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_CHANLIST); } @@ -67,7 +67,7 @@ void myOperServHelp(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_chanlist(User * u) +static int do_chanlist(User * u) { char *pattern = strtok(NULL, " "); char *opt = strtok(NULL, " "); diff --git a/src/core/os_clearmodes.c b/src/core/os_clearmodes.c index 8363d7f06..d78852411 100644 --- a/src/core/os_clearmodes.c +++ b/src/core/os_clearmodes.c @@ -14,8 +14,8 @@ #include "module.h" -int do_clearmodes(User * u); -void myOperServHelp(User * u); +static int do_clearmodes(User * u); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -54,7 +54,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_oper(u)) { notice_lang(s_OperServ, u, OPER_HELP_CMD_CLEARMODES); @@ -66,7 +66,7 @@ void myOperServHelp(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_clearmodes(User * u) +static int do_clearmodes(User * u) { char *s; char *argv[2]; diff --git a/src/core/os_defcon.c b/src/core/os_defcon.c index 69efdfe0f..b006aed80 100644 --- a/src/core/os_defcon.c +++ b/src/core/os_defcon.c @@ -18,10 +18,10 @@ extern MDE time_t DefContimer; extern MDE void runDefCon(void); #endif -int do_defcon(User * u); -void defcon_sendlvls(User * u); +static int do_defcon(User * u); +static void defcon_sendlvls(User * u); -void myOperServHelp(User * u); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -59,7 +59,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_admin(u)) { notice_lang(s_OperServ, u, OPER_HELP_CMD_DEFCON); @@ -76,7 +76,7 @@ void myOperServHelp(User * u) * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. * **/ -int do_defcon(User * u) +static int do_defcon(User * u) { char *lvl = strtok(NULL, " "); int newLevel = 0; @@ -131,7 +131,7 @@ int do_defcon(User * u) /** * Send a message to the oper about which precautions are "active" for this level **/ -void defcon_sendlvls(User * u) +static void defcon_sendlvls(User * u) { if (checkDefCon(DEFCON_NO_NEW_CHANNELS)) { notice_lang(s_OperServ, u, OPER_HELP_DEFCON_NO_NEW_CHANNELS); diff --git a/src/core/os_global.c b/src/core/os_global.c index cff708fc1..611db4ddb 100644 --- a/src/core/os_global.c +++ b/src/core/os_global.c @@ -14,8 +14,8 @@ #include "module.h" -int do_global(User * u); -void myOperServHelp(User * u); +static int do_global(User * u); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -53,7 +53,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_admin(u)) { notice_lang(s_OperServ, u, OPER_HELP_CMD_GLOBAL); @@ -65,7 +65,7 @@ void myOperServHelp(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_global(User * u) +static int do_global(User * u) { char *msg = strtok(NULL, ""); diff --git a/src/core/os_help.c b/src/core/os_help.c index a1d1ea3d3..d25bbf758 100644 --- a/src/core/os_help.c +++ b/src/core/os_help.c @@ -14,7 +14,7 @@ #include "module.h" -int do_help(User * u); +static int do_help(User * u); /** * Create the command, and tell anope about it. @@ -50,7 +50,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) { const char *cmd = strtok(NULL, ""); diff --git a/src/core/os_ignore.c b/src/core/os_ignore.c index 5062379a2..8ebb8132f 100644 --- a/src/core/os_ignore.c +++ b/src/core/os_ignore.c @@ -14,9 +14,9 @@ #include "module.h" -int do_ignorelist(User * u); -void myOperServHelp(User * u); -int do_ignoreuser(User * u); +static int do_ignorelist(User * u); +static void myOperServHelp(User * u); +static int do_ignoreuser(User * u); /** * Create the command, and tell anope about it. @@ -53,7 +53,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_admin(u)) { notice_lang(s_OperServ, u, OPER_HELP_CMD_IGNORE); @@ -65,7 +65,7 @@ void myOperServHelp(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_ignoreuser(User * u) +static int do_ignoreuser(User * u) { char *cmd = strtok(NULL, " "); int t; @@ -126,7 +126,7 @@ int do_ignoreuser(User * u) } /* shows the Services ignore list */ -int do_ignorelist(User * u) +static int do_ignorelist(User * u) { IgnoreData *id; diff --git a/src/core/os_jupe.c b/src/core/os_jupe.c index c3882d113..b5c392b4e 100644 --- a/src/core/os_jupe.c +++ b/src/core/os_jupe.c @@ -14,8 +14,8 @@ #include "module.h" -int do_jupe(User * u); -void myOperServHelp(User * u); +static int do_jupe(User * u); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -53,7 +53,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_admin(u)) { notice_lang(s_OperServ, u, OPER_HELP_CMD_JUPE); @@ -65,7 +65,7 @@ void myOperServHelp(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_jupe(User * u) +static int do_jupe(User * u) { char *jserver = strtok(NULL, " "); char *reason = strtok(NULL, ""); diff --git a/src/core/os_kick.c b/src/core/os_kick.c index 3971bdbd5..f2464e81c 100644 --- a/src/core/os_kick.c +++ b/src/core/os_kick.c @@ -14,8 +14,8 @@ #include "module.h" -int do_os_kick(User * u); -void myOperServHelp(User * u); +static int do_os_kick(User * u); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -53,7 +53,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_oper(u)) { notice_lang(s_OperServ, u, OPER_HELP_CMD_KICK); @@ -65,7 +65,7 @@ void myOperServHelp(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_os_kick(User * u) +static int do_os_kick(User * u) { char *argv[3]; char *chan, *nick, *s; diff --git a/src/core/os_logonnews.c b/src/core/os_logonnews.c index eb3e6165e..059a10d8c 100644 --- a/src/core/os_logonnews.c +++ b/src/core/os_logonnews.c @@ -14,9 +14,9 @@ #include "module.h" -void myOperServHelp(User * u); -int load_config(void); -int reload_config(int argc, char **argv); +static void myOperServHelp(User * u); +static int load_config(void); +static int reload_config(int argc, char **argv); /** * Create the command, and tell anope about it. @@ -73,7 +73,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_admin(u)) { notice_lang(s_OperServ, u, OPER_HELP_CMD_LOGONNEWS); @@ -84,7 +84,7 @@ void myOperServHelp(User * u) /** * Upon /os reload refresh the count **/ -int reload_config(int argc, char **argv) { +static int reload_config(int argc, char **argv) { char buf[BUFSIZE]; Command *c; diff --git a/src/core/os_mode.c b/src/core/os_mode.c index 87cb8ed2d..a8c8bdafd 100644 --- a/src/core/os_mode.c +++ b/src/core/os_mode.c @@ -14,8 +14,8 @@ #include "module.h" -int do_os_mode(User * u); -void myOperServHelp(User * u); +static int do_os_mode(User * u); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -53,7 +53,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_oper(u)) { notice_lang(s_OperServ, u, OPER_HELP_CMD_MODE); @@ -65,7 +65,7 @@ void myOperServHelp(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_os_mode(User * u) +static int do_os_mode(User * u) { int ac; char **av; diff --git a/src/core/os_modinfo.c b/src/core/os_modinfo.c index d58a8fc90..806788272 100644 --- a/src/core/os_modinfo.c +++ b/src/core/os_modinfo.c @@ -14,10 +14,10 @@ #include "module.h" -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); +static int do_modinfo(User * u); +static void myOperServHelp(User * u); +static int showModuleMsgLoaded(MessageHash * msgList, char *mod_name, User * u); +static int showModuleCmdLoaded(CommandHash * cmdList, char *mod_name, User * u); /** * Create the command, and tell anope about it. @@ -54,7 +54,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_MODINFO); } @@ -64,7 +64,7 @@ void myOperServHelp(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_modinfo(User * u) +static int do_modinfo(User * u) { char *file; struct tm tm; @@ -102,7 +102,7 @@ int do_modinfo(User * u) return MOD_CONT; } -int showModuleCmdLoaded(CommandHash * cmdList, char *mod_name, User * u) +static int showModuleCmdLoaded(CommandHash * cmdList, char *mod_name, User * u) { Command *c; CommandHash *current; @@ -120,7 +120,7 @@ int showModuleCmdLoaded(CommandHash * cmdList, char *mod_name, User * u) return display; } -int showModuleMsgLoaded(MessageHash * msgList, char *mod_name, User * u) +static int showModuleMsgLoaded(MessageHash * msgList, char *mod_name, User * u) { Message *msg; MessageHash *mcurrent; diff --git a/src/core/os_modlist.c b/src/core/os_modlist.c index 741b29b3e..40cb5b407 100644 --- a/src/core/os_modlist.c +++ b/src/core/os_modlist.c @@ -14,8 +14,8 @@ #include "module.h" -int do_modlist(User * u); -void myOperServHelp(User * u); +static int do_modlist(User * u); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -53,7 +53,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_MODLIST); } @@ -63,7 +63,7 @@ void myOperServHelp(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_modlist(User * u) +static int do_modlist(User * u) { int idx; int count = 0; diff --git a/src/core/os_modload.c b/src/core/os_modload.c index d1d95278a..6d10db853 100644 --- a/src/core/os_modload.c +++ b/src/core/os_modload.c @@ -14,8 +14,8 @@ #include "module.h" -int do_modload(User * u); -void myOperServHelp(User * u); +static int do_modload(User * u); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -54,7 +54,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_root(u)) { notice_lang(s_OperServ, u, OPER_HELP_CMD_MODLOAD); @@ -66,7 +66,7 @@ void myOperServHelp(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_modload(User * u) +static int do_modload(User * u) { char *name; diff --git a/src/core/os_modunload.c b/src/core/os_modunload.c index 57b800620..ee5f19de6 100644 --- a/src/core/os_modunload.c +++ b/src/core/os_modunload.c @@ -14,9 +14,9 @@ #include "module.h" -int do_modunload(User * u); +static int do_modunload(User * u); -void myOperServHelp(User * u); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -55,7 +55,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_root(u)) { notice_lang(s_OperServ, u, OPER_HELP_CMD_MODUNLOAD); @@ -67,7 +67,7 @@ void myOperServHelp(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_modunload(User * u) +static int do_modunload(User * u) { char *name; diff --git a/src/core/os_noop.c b/src/core/os_noop.c index 8aee9e400..1c2ce839a 100644 --- a/src/core/os_noop.c +++ b/src/core/os_noop.c @@ -14,8 +14,8 @@ #include "module.h" -int do_noop(User * u); -void myOperServHelp(User * u); +static int do_noop(User * u); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -53,7 +53,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_admin(u)) { notice_lang(s_OperServ, u, OPER_HELP_CMD_NOOP); @@ -65,7 +65,7 @@ void myOperServHelp(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_noop(User * u) +static int do_noop(User * u) { char *cmd = strtok(NULL, " "); char *server = strtok(NULL, " "); diff --git a/src/core/os_oline.c b/src/core/os_oline.c index 9d261db84..54b69f30c 100644 --- a/src/core/os_oline.c +++ b/src/core/os_oline.c @@ -13,9 +13,9 @@ /*************************************************************************/ #include "module.h" -int do_operoline(User * u); +static int do_operoline(User * u); -void myOperServHelp(User * u); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -56,7 +56,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_admin(u) && u->isSuperAdmin) { notice_lang(s_OperServ, u, OPER_HELP_CMD_OLINE); @@ -68,7 +68,7 @@ void myOperServHelp(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_operoline(User * u) +static int do_operoline(User * u) { char *nick = strtok(NULL, " "); char *flags = strtok(NULL, ""); diff --git a/src/core/os_oper.c b/src/core/os_oper.c index a8abb2ba6..746d0ad67 100644 --- a/src/core/os_oper.c +++ b/src/core/os_oper.c @@ -14,11 +14,11 @@ #include "module.h" -int do_oper(User * u); -int oper_list_callback(SList * slist, int number, void *item, +static int do_oper(User * u); +static int oper_list_callback(SList * slist, int number, void *item, va_list args); -int oper_list(int number, NickCore * nc, User * u, int *sent_header); -void myOperServHelp(User * u); +static int oper_list(int number, NickCore * nc, User * u, int *sent_header); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -56,7 +56,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_OPER); } @@ -66,7 +66,7 @@ void myOperServHelp(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_oper(User * u) +static int do_oper(User * u) { char *cmd = strtok(NULL, " "); char *nick = strtok(NULL, " "); @@ -226,7 +226,7 @@ int do_oper(User * u) /* Lists an oper entry, prefixing it with the header if needed */ -int oper_list(int number, NickCore * nc, User * u, int *sent_header) +static int oper_list(int number, NickCore * nc, User * u, int *sent_header) { if (!nc) return 0; @@ -242,7 +242,7 @@ int oper_list(int number, NickCore * nc, User * u, int *sent_header) /* Callback for enumeration purposes */ -int oper_list_callback(SList * slist, int number, void *item, va_list args) +static int oper_list_callback(SList * slist, int number, void *item, va_list args) { User *u = va_arg(args, User *); int *sent_header = va_arg(args, int *); diff --git a/src/core/os_opernews.c b/src/core/os_opernews.c index 099d0718f..1604172d1 100644 --- a/src/core/os_opernews.c +++ b/src/core/os_opernews.c @@ -14,9 +14,9 @@ #include "module.h" -void myOperServHelp(User * u); -int load_config(void); -int reload_config(int argc, char **argv); +static void myOperServHelp(User * u); +static int load_config(void); +static int reload_config(int argc, char **argv); /** * Create the command, and tell anope about it. @@ -74,7 +74,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_admin(u)) { notice_lang(s_OperServ, u, OPER_HELP_CMD_OPERNEWS); @@ -84,7 +84,7 @@ void myOperServHelp(User * u) /** * Upon /os reload refresh the count **/ -int reload_config(int argc, char **argv) { +static int reload_config(int argc, char **argv) { char buf[BUFSIZE]; Command *c; diff --git a/src/core/os_quit.c b/src/core/os_quit.c index 6a3860dcf..711c176a0 100644 --- a/src/core/os_quit.c +++ b/src/core/os_quit.c @@ -14,8 +14,8 @@ #include "module.h" -int do_os_quit(User * u); -void myOperServHelp(User * u); +static int do_os_quit(User * u); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -53,7 +53,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_root(u)) { notice_lang(s_OperServ, u, OPER_HELP_CMD_QUIT); @@ -65,7 +65,7 @@ void myOperServHelp(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_os_quit(User * u) +static int do_os_quit(User * u) { quitmsg = calloc(28 + strlen(u->nick), 1); if (!quitmsg) diff --git a/src/core/os_randomnews.c b/src/core/os_randomnews.c index 407eb4e0e..26e180ef6 100644 --- a/src/core/os_randomnews.c +++ b/src/core/os_randomnews.c @@ -14,7 +14,7 @@ #include "module.h" -void myOperServHelp(User * u); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -57,7 +57,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_admin(u)) { notice_lang(s_OperServ, u, OPER_HELP_CMD_RANDOMNEWS); diff --git a/src/core/os_raw.c b/src/core/os_raw.c index 143523c9b..ff229d829 100644 --- a/src/core/os_raw.c +++ b/src/core/os_raw.c @@ -14,7 +14,7 @@ #include "module.h" -int do_raw(User * u); +static int do_raw(User * u); /** * Create the command, and tell anope about it. @@ -55,7 +55,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_raw(User * u) +static int do_raw(User * u) { char *text = strtok(NULL, ""); if (!text) diff --git a/src/core/os_reload.c b/src/core/os_reload.c index a9d094d97..a7d65e030 100644 --- a/src/core/os_reload.c +++ b/src/core/os_reload.c @@ -14,8 +14,8 @@ #include "module.h" -int do_reload(User * u); -void myOperServHelp(User * u); +static int do_reload(User * u); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -53,7 +53,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_root(u)) { notice_lang(s_OperServ, u, OPER_HELP_CMD_RELOAD); @@ -65,7 +65,7 @@ void myOperServHelp(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_reload(User * u) +static int do_reload(User * u) { if (!read_config(1)) { quitmsg = calloc(28 + strlen(u->nick), 1); diff --git a/src/core/os_restart.c b/src/core/os_restart.c index f8506a28a..0b9a3b7d3 100644 --- a/src/core/os_restart.c +++ b/src/core/os_restart.c @@ -19,8 +19,8 @@ extern MDE void do_restart_services(void); #endif -int do_restart(User * u); -void myOperServHelp(User * u); +static int do_restart(User * u); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -57,7 +57,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_root(u)) { notice_lang(s_OperServ, u, OPER_HELP_CMD_RESTART); @@ -69,7 +69,7 @@ void myOperServHelp(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_restart(User * u) +static int do_restart(User * u) { #ifdef SERVICES_BIN quitmsg = calloc(31 + strlen(u->nick), 1); diff --git a/src/core/os_session.c b/src/core/os_session.c index 1a9d0cebf..0d8d5f1aa 100644 --- a/src/core/os_session.c +++ b/src/core/os_session.c @@ -14,7 +14,7 @@ #include "module.h" -void myOperServHelp(User * u); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -58,7 +58,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_oper(u)) { notice_lang(s_OperServ, u, OPER_HELP_CMD_SESSION); diff --git a/src/core/os_set.c b/src/core/os_set.c index b1c8de58f..ed4ba4093 100644 --- a/src/core/os_set.c +++ b/src/core/os_set.c @@ -14,8 +14,8 @@ #include "module.h" -int do_set(User * u); -void myOperServHelp(User * u); +static int do_set(User * u); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -79,7 +79,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_root(u)) { notice_lang(s_OperServ, u, OPER_HELP_CMD_SET); @@ -91,7 +91,7 @@ void myOperServHelp(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 *option = strtok(NULL, " "); char *setting = strtok(NULL, " "); diff --git a/src/core/os_sgline.c b/src/core/os_sgline.c index 9f04d03e6..e63551e96 100644 --- a/src/core/os_sgline.c +++ b/src/core/os_sgline.c @@ -14,15 +14,15 @@ #include "module.h" -int sgline_view_callback(SList * slist, int number, void *item, +static int sgline_view_callback(SList * slist, int number, void *item, va_list args); -int sgline_view(int number, SXLine * sx, User * u, int *sent_header); -int sgline_list_callback(SList * slist, int number, void *item, +static int sgline_view(int number, SXLine * sx, User * u, int *sent_header); +static int sgline_list_callback(SList * slist, int number, void *item, va_list args); -int sgline_list(int number, SXLine * sx, User * u, int *sent_header); -int do_sgline(User * u); +static int sgline_list(int number, SXLine * sx, User * u, int *sent_header); +static int do_sgline(User * u); -void myOperServHelp(User * u); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -63,7 +63,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_oper(u)) { notice_lang(s_OperServ, u, OPER_HELP_CMD_SGLINE); @@ -75,7 +75,7 @@ void myOperServHelp(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_sgline(User * u) +static int do_sgline(User * u) { char *cmd = strtok(NULL, " "); @@ -297,7 +297,7 @@ int do_sgline(User * u) /* Lists an SGLINE entry, prefixing it with the header if needed */ -int sgline_view(int number, SXLine * sx, User * u, int *sent_header) +static int sgline_view(int number, SXLine * sx, User * u, int *sent_header) { char timebuf[32], expirebuf[256]; struct tm tm; @@ -322,7 +322,7 @@ int sgline_view(int number, SXLine * sx, User * u, int *sent_header) /* Callback for enumeration purposes */ -int sgline_view_callback(SList * slist, int number, void *item, +static int sgline_view_callback(SList * slist, int number, void *item, va_list args) { User *u = va_arg(args, User *); @@ -333,7 +333,7 @@ int sgline_view_callback(SList * slist, int number, void *item, /* Lists an SGLINE entry, prefixing it with the header if needed */ -int sgline_list(int number, SXLine * sx, User * u, int *sent_header) +static int sgline_list(int number, SXLine * sx, User * u, int *sent_header) { if (!sx) return 0; @@ -351,7 +351,7 @@ int sgline_list(int number, SXLine * sx, User * u, int *sent_header) /* Callback for enumeration purposes */ -int sgline_list_callback(SList * slist, int number, void *item, +static int sgline_list_callback(SList * slist, int number, void *item, va_list args) { User *u = va_arg(args, User *); diff --git a/src/core/os_shutdown.c b/src/core/os_shutdown.c index 766e06380..ca74e8dd2 100644 --- a/src/core/os_shutdown.c +++ b/src/core/os_shutdown.c @@ -14,8 +14,8 @@ #include "module.h" -int do_shutdown(User * u); -void myOperServHelp(User * u); +static int do_shutdown(User * u); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -53,7 +53,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_root(u)) { notice_lang(s_OperServ, u, OPER_HELP_CMD_SHUTDOWN); @@ -65,7 +65,7 @@ void myOperServHelp(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_shutdown(User * u) +static int do_shutdown(User * u) { quitmsg = calloc(32 + strlen(u->nick), 1); if (!quitmsg) diff --git a/src/core/os_sqline.c b/src/core/os_sqline.c index 6a68b11eb..894677b9d 100644 --- a/src/core/os_sqline.c +++ b/src/core/os_sqline.c @@ -14,15 +14,15 @@ #include "module.h" -int do_sqline(User * u); -int sqline_view_callback(SList * slist, int number, void *item, +static int do_sqline(User * u); +static int sqline_view_callback(SList * slist, int number, void *item, va_list args); -int sqline_view(int number, SXLine * sx, User * u, int *sent_header); -int sqline_list_callback(SList * slist, int number, void *item, +static int sqline_view(int number, SXLine * sx, User * u, int *sent_header); +static int sqline_list_callback(SList * slist, int number, void *item, va_list args); -int sqline_list(int number, SXLine * sx, User * u, int *sent_header); +static int sqline_list(int number, SXLine * sx, User * u, int *sent_header); -void myOperServHelp(User * u); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -62,7 +62,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_oper(u)) { notice_lang(s_OperServ, u, OPER_HELP_CMD_SQLINE); @@ -74,7 +74,7 @@ void myOperServHelp(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_sqline(User * u) +static int do_sqline(User * u) { char *cmd = strtok(NULL, " "); @@ -290,7 +290,7 @@ int do_sqline(User * u) return MOD_CONT; } -int sqline_view(int number, SXLine * sx, User * u, int *sent_header) +static int sqline_view(int number, SXLine * sx, User * u, int *sent_header) { char timebuf[32], expirebuf[256]; struct tm tm; @@ -315,7 +315,7 @@ int sqline_view(int number, SXLine * sx, User * u, int *sent_header) /* Callback for enumeration purposes */ -int sqline_view_callback(SList * slist, int number, void *item, +static int sqline_view_callback(SList * slist, int number, void *item, va_list args) { User *u = va_arg(args, User *); @@ -326,7 +326,7 @@ int sqline_view_callback(SList * slist, int number, void *item, /* Lists an SQLINE entry, prefixing it with the header if needed */ -int sqline_list(int number, SXLine * sx, User * u, int *sent_header) +static int sqline_list(int number, SXLine * sx, User * u, int *sent_header) { if (!sx) return 0; @@ -344,7 +344,7 @@ int sqline_list(int number, SXLine * sx, User * u, int *sent_header) /* Callback for enumeration purposes */ -int sqline_list_callback(SList * slist, int number, void *item, +static int sqline_list_callback(SList * slist, int number, void *item, va_list args) { User *u = va_arg(args, User *); diff --git a/src/core/os_staff.c b/src/core/os_staff.c index 51ba1269b..026632303 100644 --- a/src/core/os_staff.c +++ b/src/core/os_staff.c @@ -14,11 +14,11 @@ #include "module.h" -int do_staff(User * u); -void myOperServHelp(User * u); -int opers_list_callback(SList * slist, int number, void *item, +static int do_staff(User * u); +static void myOperServHelp(User * u); +static int opers_list_callback(SList * slist, int number, void *item, va_list args); -int opers_list(int number, NickCore * nc, User * u, char *level); +static int opers_list(int number, NickCore * nc, User * u, char *level); /** * Create the command, and tell anope about it. @@ -56,7 +56,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_STAFF); } @@ -66,7 +66,7 @@ void myOperServHelp(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_staff(User * u) +static int do_staff(User * u) { int idx = 0; User *au = NULL; @@ -108,7 +108,7 @@ int do_staff(User * u) /** * Function for the enumerator to call **/ -int opers_list_callback(SList * slist, int number, void *item, +static int opers_list_callback(SList * slist, int number, void *item, va_list args) { User *u = va_arg(args, User *); @@ -121,7 +121,7 @@ int opers_list_callback(SList * slist, int number, void *item, /** * Display an Opers list Entry **/ -int opers_list(int number, NickCore * nc, User * u, char *level) +static int opers_list(int number, NickCore * nc, User * u, char *level) { User *au = NULL; NickAlias *na; diff --git a/src/core/os_stats.c b/src/core/os_stats.c index e9384df8d..df5b85247 100644 --- a/src/core/os_stats.c +++ b/src/core/os_stats.c @@ -16,9 +16,9 @@ -int do_stats(User * u); -void get_operserv_stats(long *nrec, long *memuse); -void myOperServHelp(User * u); +static int do_stats(User * u); +static void get_operserv_stats(long *nrec, long *memuse); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -59,7 +59,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_STATS); } @@ -69,7 +69,7 @@ void myOperServHelp(User * u) * @param s The server to start counting from * @return Amount of servers connected to server s **/ -int stats_count_servers(Server * s) +static int stats_count_servers(Server * s) { int count = 0; @@ -88,7 +88,7 @@ int stats_count_servers(Server * s) * @param u The user who issued the command * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_stats(User * u) +static int do_stats(User * u) { time_t uptime = time(NULL) - start_time; char *extra = strtok(NULL, ""); @@ -383,7 +383,7 @@ int do_stats(User * u) return MOD_CONT; } -void get_operserv_stats(long *nrec, long *memuse) +static void get_operserv_stats(long *nrec, long *memuse) { int i; long mem = 0, count = 0, mem2 = 0, count2 = 0; diff --git a/src/core/os_svsnick.c b/src/core/os_svsnick.c index 2141ae5cf..ac3828b03 100644 --- a/src/core/os_svsnick.c +++ b/src/core/os_svsnick.c @@ -14,8 +14,8 @@ #include "module.h" -int do_svsnick(User * u); -void myOperServHelp(User * u); +static int do_svsnick(User * u); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -55,7 +55,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_admin(u) && u->isSuperAdmin) { notice_lang(s_OperServ, u, OPER_HELP_CMD_SVSNICK); @@ -69,7 +69,7 @@ void myOperServHelp(User * u) **/ /* Forcefully change a user's nickname */ -int do_svsnick(User * u) +static int do_svsnick(User * u) { char *nick = strtok(NULL, " "); char *newnick = strtok(NULL, " "); diff --git a/src/core/os_szline.c b/src/core/os_szline.c index 1c40e15a1..3079580b7 100644 --- a/src/core/os_szline.c +++ b/src/core/os_szline.c @@ -14,14 +14,14 @@ #include "module.h" -int do_szline(User * u); -void myOperServHelp(User * u); -int szline_view_callback(SList * slist, int number, void *item, +static int do_szline(User * u); +static void myOperServHelp(User * u); +static int szline_view_callback(SList * slist, int number, void *item, va_list args); -int szline_list_callback(SList * slist, int number, void *item, +static int szline_list_callback(SList * slist, int number, void *item, va_list args); -int szline_view(int number, SXLine * sx, User * u, int *sent_header); -int szline_list(int number, SXLine * sx, User * u, int *sent_header); +static int szline_view(int number, SXLine * sx, User * u, int *sent_header); +static int szline_list(int number, SXLine * sx, User * u, int *sent_header); /** * Create the command, and tell anope about it. @@ -61,7 +61,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_oper(u)) { notice_lang(s_OperServ, u, OPER_HELP_CMD_SZLINE); @@ -73,7 +73,7 @@ void myOperServHelp(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_szline(User * u) +static int do_szline(User * u) { char *cmd = strtok(NULL, " "); @@ -285,7 +285,7 @@ int do_szline(User * u) } -int szline_view(int number, SXLine * sx, User * u, int *sent_header) +static int szline_view(int number, SXLine * sx, User * u, int *sent_header) { char timebuf[32], expirebuf[256]; struct tm tm; @@ -310,7 +310,7 @@ int szline_view(int number, SXLine * sx, User * u, int *sent_header) /* Callback for enumeration purposes */ -int szline_view_callback(SList * slist, int number, void *item, +static int szline_view_callback(SList * slist, int number, void *item, va_list args) { User *u = va_arg(args, User *); @@ -321,7 +321,7 @@ int szline_view_callback(SList * slist, int number, void *item, /* Callback for enumeration purposes */ -int szline_list_callback(SList * slist, int number, void *item, +static int szline_list_callback(SList * slist, int number, void *item, va_list args) { User *u = va_arg(args, User *); @@ -332,7 +332,7 @@ int szline_list_callback(SList * slist, int number, void *item, /* Lists an SZLINE entry, prefixing it with the header if needed */ -int szline_list(int number, SXLine * sx, User * u, int *sent_header) +static int szline_list(int number, SXLine * sx, User * u, int *sent_header) { if (!sx) return 0; diff --git a/src/core/os_umode.c b/src/core/os_umode.c index 72b9f1d70..6ed7da297 100644 --- a/src/core/os_umode.c +++ b/src/core/os_umode.c @@ -14,8 +14,8 @@ #include "module.h" -int do_operumodes(User * u); -void myOperServHelp(User * u); +static int do_operumodes(User * u); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -56,7 +56,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_admin(u) && u->isSuperAdmin) { notice_lang(s_OperServ, u, OPER_HELP_CMD_UMODE); @@ -71,7 +71,7 @@ void myOperServHelp(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_operumodes(User * u) +static int do_operumodes(User * u) { char *nick = strtok(NULL, " "); char *modes = strtok(NULL, ""); diff --git a/src/core/os_update.c b/src/core/os_update.c index a1d62cbf9..da25e79ce 100644 --- a/src/core/os_update.c +++ b/src/core/os_update.c @@ -14,8 +14,8 @@ #include "module.h" -int do_update(User * u); -void myOperServHelp(User * u); +static int do_update(User * u); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -53,7 +53,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { if (is_services_root(u)) { notice_lang(s_OperServ, u, OPER_HELP_CMD_UPDATE); @@ -65,7 +65,7 @@ void myOperServHelp(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_update(User * u) +static int do_update(User * u) { notice_lang(s_OperServ, u, OPER_UPDATING); save_data = 1; diff --git a/src/core/os_userlist.c b/src/core/os_userlist.c index aec8e6351..f69fd3bc9 100644 --- a/src/core/os_userlist.c +++ b/src/core/os_userlist.c @@ -19,8 +19,8 @@ extern MDE int anope_get_invite_mode(); extern MDE int anope_get_invis_mode(); #endif -int do_userlist(User * u); -void myOperServHelp(User * u); +static int do_userlist(User * u); +static void myOperServHelp(User * u); /** * Create the command, and tell anope about it. @@ -58,7 +58,7 @@ void AnopeFini(void) * Add the help response to anopes /os help output. * @param u The user who is requesting help **/ -void myOperServHelp(User * u) +static void myOperServHelp(User * u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_USERLIST); } @@ -69,7 +69,7 @@ void myOperServHelp(User * u) * @param MOD_CONT to continue processing other modules, MOD_STOP to stop processing. **/ -int do_userlist(User * u) +static int do_userlist(User * u) { char *pattern = strtok(NULL, " "); char *opt = strtok(NULL, " "); diff --git a/src/modules/bs_fantasy_unban.c b/src/modules/bs_fantasy_unban.c index 50710071d..8d01e0a50 100644 --- a/src/modules/bs_fantasy_unban.c +++ b/src/modules/bs_fantasy_unban.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/modules/cs_appendtopic.c b/src/modules/cs_appendtopic.c index 7868430fe..13d232105 100644 --- a/src/modules/cs_appendtopic.c +++ b/src/modules/cs_appendtopic.c @@ -48,10 +48,10 @@ #define LNG_CHAN_HELP_APPENDTOPIC 1 #define LNG_APPENDTOPIC_SYNTAX 2 -int my_cs_appendtopic(User * u); -void my_cs_help(User * u); -int my_cs_help_appendtopic(User * u); -void my_add_languages(void); +static int my_cs_appendtopic(User * u); +static void my_cs_help(User * u); +static int my_cs_help_appendtopic(User * u); +static void my_add_languages(void); int AnopeInit(int argc, char **argv) { @@ -84,12 +84,12 @@ void AnopeFini(void) alog("[cs_appendtopic] Unloaded successfully"); } -void my_cs_help(User * u) +static void my_cs_help(User * u) { moduleNoticeLang(s_ChanServ, u, LNG_CHAN_HELP); } -int my_cs_help_appendtopic(User * u) +static int my_cs_help_appendtopic(User * u) { moduleNoticeLang(s_ChanServ, u, LNG_APPENDTOPIC_SYNTAX); notice(s_ChanServ, u->nick, " "); @@ -97,7 +97,7 @@ int my_cs_help_appendtopic(User * u) return MOD_STOP; } -int my_cs_appendtopic(User * u) +static int my_cs_appendtopic(User * u) { char *cur_buffer; char *chan; @@ -161,7 +161,7 @@ int my_cs_appendtopic(User * u) return MOD_CONT; } -void my_add_languages(void) +static void my_add_languages(void) { /* English (US) */ char *langtable_en_us[] = { diff --git a/src/modules/cs_enforce.c b/src/modules/cs_enforce.c index 30370d925..542676cfd 100644 --- a/src/modules/cs_enforce.c +++ b/src/modules/cs_enforce.c @@ -18,10 +18,10 @@ #define AUTHOR "Anope" #define VERSION VERSION_STRING -int my_cs_enforce(User * u); -void my_cs_help(User * u); -int my_cs_help_enforce(User * u); -void my_add_languages(void); +static int my_cs_enforce(User * u); +static void my_cs_help(User * u); +static int my_cs_help_enforce(User * u); +static void my_add_languages(void); #define LNG_NUM_STRINGS 6 @@ -61,7 +61,7 @@ void AnopeFini(void) } /* Enforcing functions */ -void do_enforce_secureops(Channel * c) +static void do_enforce_secureops(Channel * c) { struct c_userlist *user; struct c_userlist *next; @@ -90,7 +90,7 @@ void do_enforce_secureops(Channel * c) ci->flags = flags; } -void do_enforce_restricted(Channel * c) +static void do_enforce_restricted(Channel * c) { struct c_userlist *user; struct c_userlist *next; @@ -131,7 +131,7 @@ void do_enforce_restricted(Channel * c) ci->levels[CA_NOJOIN] = old_nojoin_level; } -void do_enforce_cmode_R(Channel * c) +static void do_enforce_cmode_R(Channel * c) { struct c_userlist *user; struct c_userlist *next; @@ -169,7 +169,7 @@ void do_enforce_cmode_R(Channel * c) } /* Enforcing Group Functions */ -void do_enforce_set(Channel * c) +static void do_enforce_set(Channel * c) { ChannelInfo *ci; @@ -182,7 +182,7 @@ void do_enforce_set(Channel * c) do_enforce_restricted(c); } -void do_enforce_modes(Channel * c) +static void do_enforce_modes(Channel * c) { CBMode *cbm; @@ -192,7 +192,7 @@ void do_enforce_modes(Channel * c) /* End of enforcing functions */ -int my_cs_enforce(User * u) +static int my_cs_enforce(User * u) { char *cur_buffer; char *chan=NULL; @@ -242,12 +242,12 @@ int my_cs_enforce(User * u) } /* Language and response stuff */ -void my_cs_help(User * u) +static void my_cs_help(User * u) { moduleNoticeLang(s_ChanServ, u, LNG_CHAN_HELP); } -int my_cs_help_enforce(User * u) +static int my_cs_help_enforce(User * u) { moduleNoticeLang(s_ChanServ, u, LNG_ENFORCE_SYNTAX); notice(s_ChanServ, u->nick, " "); @@ -261,7 +261,7 @@ int my_cs_help_enforce(User * u) return MOD_STOP; } -void my_add_languages(void) +static void my_add_languages(void) { /* English (US) */ char *langtable_en_us[] = { diff --git a/src/modules/cs_tban.c b/src/modules/cs_tban.c index e086da1c5..da152ce6d 100644 --- a/src/modules/cs_tban.c +++ b/src/modules/cs_tban.c @@ -21,17 +21,17 @@ #define AUTHOR "Rob" #define VERSION VERSION_STRING -void myHelp(User * u); -void myFullHelpSyntax(User * u); -int myFullHelp(User * u); -void mySendResponse(User * u, char *channel, char *mask, char *time); +static void myHelp(User * u); +static void myFullHelpSyntax(User * u); +static int myFullHelp(User * u); +static void mySendResponse(User * u, char *channel, char *mask, char *time); -int do_tban(User * u); -void addBan(Channel * c, time_t timeout, char *banmask); -int delBan(int argc, char **argv); -int canBanUser(Channel * c, User * u, User * u2); +static int do_tban(User * u); +static void addBan(Channel * c, time_t timeout, char *banmask); +static int delBan(int argc, char **argv); +static int canBanUser(Channel * c, User * u, User * u2); -void mAddLanguages(void); +static void mAddLanguages(void); #define LANG_NUM_STRINGS 4 #define TBAN_HELP 0 @@ -66,17 +66,17 @@ void AnopeFini(void) /* module is unloading */ } -void myHelp(User * u) +static void myHelp(User * u) { moduleNoticeLang(s_ChanServ, u, TBAN_HELP); } -void myFullHelpSyntax(User * u) +static void myFullHelpSyntax(User * u) { moduleNoticeLang(s_ChanServ, u, TBAN_SYNTAX); } -int myFullHelp(User * u) +static int myFullHelp(User * u) { myFullHelpSyntax(u); notice(s_ChanServ, u->nick, ""); @@ -84,12 +84,12 @@ int myFullHelp(User * u) return MOD_CONT; } -void mySendResponse(User * u, char *channel, char *mask, char *time) +static void mySendResponse(User * u, char *channel, char *mask, char *time) { moduleNoticeLang(s_ChanServ, u, TBAN_RESPONSE, mask, channel, time); } -int do_tban(User * u) +static int do_tban(User * u) { char mask[BUFSIZE]; Channel *c; @@ -130,7 +130,7 @@ int do_tban(User * u) return MOD_CONT; } -void addBan(Channel * c, time_t timeout, char *banmask) +static void addBan(Channel * c, time_t timeout, char *banmask) { char *av[3]; char *cb[2]; @@ -148,7 +148,7 @@ void addBan(Channel * c, time_t timeout, char *banmask) moduleAddCallback("tban", time(NULL) + timeout, delBan, 2, cb); } -int delBan(int argc, char **argv) +static int delBan(int argc, char **argv) { char *av[3]; Channel *c; @@ -166,7 +166,7 @@ int delBan(int argc, char **argv) return MOD_CONT; } -int canBanUser(Channel * c, User * u, User * u2) +static int canBanUser(Channel * c, User * u, User * u2) { ChannelInfo *ci; int ok = 0; @@ -188,7 +188,7 @@ int canBanUser(Channel * c, User * u, User * u2) } -void mAddLanguages(void) +static void mAddLanguages(void) { char *langtable_en_us[] = { " TBAN Bans the user for a given length of time", diff --git a/src/modules/hs_request.c b/src/modules/hs_request.c index 1a9327b58..250fb3c14 100644 --- a/src/modules/hs_request.c +++ b/src/modules/hs_request.c @@ -21,9 +21,9 @@ #define VERSION VERSION_STRING /* Configuration variables */ -int HSRequestMemoUser = 0; -int HSRequestMemoOper = 0; -int HSRequestMemoSetters = 0; +static int HSRequestMemoUser = 0; +static int HSRequestMemoOper = 0; +static int HSRequestMemoSetters = 0; char *HSRequestDBName = NULL; #define HSREQ_DEFAULT_DBNAME "hs_request.db" @@ -53,33 +53,33 @@ char *HSRequestDBName = NULL; #define LNG_WAITING_SYNTAX 19 #define LNG_HELP_WAITING 20 -int hs_do_request(User * u); -int hs_do_activate(User * u); -int hs_do_reject(User * u); -int hs_do_list_out(User * u); +static int hs_do_request(User * u); +static int hs_do_activate(User * u); +static int hs_do_reject(User * u); +static int hs_do_list_out(User * u); -int hs_help_request(User * u); -int hs_help_activate(User * u); -int hs_help_reject(User * u); -int hs_help_waiting(User * u); -void hs_help(User * u); +static int hs_help_request(User * u); +static int hs_help_activate(User * u); +static int hs_help_reject(User * u); +static int hs_help_waiting(User * u); +static void hs_help(User * u); -void my_add_host_request(char *nick, char *vIdent, char *vhost, +static void my_add_host_request(char *nick, char *vIdent, char *vhost, char *creator, int32 tmp_time); -int my_isvalidchar(const char c); -void my_memo_lang(User * u, char *name, int z, char *source, int number, ...); -void req_send_memos(User * u, char *vHost); -void show_list(User * u); -int hs_do_waiting(User * u); -int hsreqevt_nick_dropped(int argc, char **argv); +static int my_isvalidchar(const char c); +static void my_memo_lang(User * u, char *name, int z, char *source, int number, ...); +static void req_send_memos(User * u, char *vHost); +static void show_list(User * u); +static int hs_do_waiting(User * u); +static int hsreqevt_nick_dropped(int argc, char **argv); -void hsreq_save_db(void); -void hsreq_load_db(void); -int hsreqevt_db_saving(int argc, char **argv); -int hsreqevt_db_backup(int argc, char **argv); +static void hsreq_save_db(void); +static void hsreq_load_db(void); +static int hsreqevt_db_saving(int argc, char **argv); +static int hsreqevt_db_backup(int argc, char **argv); -void my_load_config(void); -void my_add_languages(void); +static void my_load_config(void); +static void my_add_languages(void); HostCore *hs_request_head; @@ -154,7 +154,7 @@ void AnopeFini(void) alog("hs_request un-loaded"); } -int hs_do_request(User * u) +static int hs_do_request(User * u) { char *cur_buffer; char *nick; @@ -255,7 +255,7 @@ int hs_do_request(User * u) return MOD_CONT; } -void my_memo_lang(User * u, char *name, int z, char *source, int number, ...) +static void my_memo_lang(User * u, char *name, int z, char *source, int number, ...) { va_list va; char buffer[4096], outbuf[4096]; @@ -306,7 +306,7 @@ void my_memo_lang(User * u, char *name, int z, char *source, int number, ...) } -void req_send_memos(User * u, char *vHost) +static void req_send_memos(User * u, char *vHost) { int i; int z = 2; @@ -334,7 +334,7 @@ void req_send_memos(User * u, char *vHost) } } -int hsreqevt_nick_dropped(int argc, char **argv) +static int hsreqevt_nick_dropped(int argc, char **argv) { HostCore *tmp; boolean found = false; @@ -349,7 +349,7 @@ int hsreqevt_nick_dropped(int argc, char **argv) return MOD_CONT; } -int hs_do_reject(User * u) +static int hs_do_reject(User * u) { char *cur_buffer; char *nick; @@ -398,7 +398,7 @@ int hs_do_reject(User * u) return MOD_CONT; } -int hs_do_activate(User * u) +static int hs_do_activate(User * u) { char *cur_buffer; char *nick; @@ -443,7 +443,7 @@ int hs_do_activate(User * u) } -void my_add_host_request(char *nick, char *vIdent, char *vhost, +static void my_add_host_request(char *nick, char *vIdent, char *vhost, char *creator, int32 tmp_time) { HostCore *tmp; @@ -466,7 +466,7 @@ void my_add_host_request(char *nick, char *vIdent, char *vhost, } } -int my_isvalidchar(const char c) +static int my_isvalidchar(const char c) { if (((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z')) || ((c >= '0') && (c <= '9')) || (c == '.') || (c == '-')) @@ -475,7 +475,7 @@ int my_isvalidchar(const char c) return 0; } -int hs_do_list_out(User * u) +static int hs_do_list_out(User * u) { char *key; @@ -491,14 +491,14 @@ int hs_do_list_out(User * u) return MOD_CONT; } -int hs_do_waiting(User * u) +static int hs_do_waiting(User * u) { show_list(u); return MOD_CONT; } -void show_list(User * u) +static void show_list(User * u) { struct tm *tm; char buf[BUFSIZE]; @@ -531,7 +531,7 @@ void show_list(User * u) notice_lang(s_HostServ, u, HOST_LIST_FOOTER, display_counter); } -int hs_help_request(User * u) +static int hs_help_request(User * u) { moduleNoticeLang(s_HostServ, u, LNG_REQUEST_SYNTAX); notice(s_HostServ, u->nick, " "); @@ -540,7 +540,7 @@ int hs_help_request(User * u) return MOD_CONT; } -int hs_help_activate(User * u) +static int hs_help_activate(User * u) { if (is_host_setter(u)) { moduleNoticeLang(s_HostServ, u, LNG_ACTIVATE_SYNTAX); @@ -555,7 +555,7 @@ int hs_help_activate(User * u) return MOD_CONT; } -int hs_help_reject(User * u) +static int hs_help_reject(User * u) { if (is_host_setter(u)) { moduleNoticeLang(s_HostServ, u, LNG_REJECT_SYNTAX); @@ -570,7 +570,7 @@ int hs_help_reject(User * u) return MOD_CONT; } -int hs_help_waiting(User * u) +static int hs_help_waiting(User * u) { if (is_host_setter(u)) { moduleNoticeLang(s_HostServ, u, LNG_WAITING_SYNTAX); @@ -583,13 +583,13 @@ int hs_help_waiting(User * u) return MOD_CONT; } -void hs_help(User * u) +static void hs_help(User * u) { moduleNoticeLang(s_HostServ, u, LNG_HELP); if (is_host_setter(u)) moduleNoticeLang(s_HostServ, u, LNG_HELP_SETTER); } -void hsreq_load_db(void) +static void hsreq_load_db(void) { FILE *fp; char *filename; @@ -648,7 +648,7 @@ void hsreq_load_db(void) alog("[hs_request] Succesfully loaded database"); } -void hsreq_save_db(void) +static void hsreq_save_db(void) { FILE *fp; char *filename; @@ -681,7 +681,7 @@ void hsreq_save_db(void) alog("[hs_request] Succesfully saved database"); } -int hsreqevt_db_saving(int argc, char **argv) +static int hsreqevt_db_saving(int argc, char **argv) { if ((argc >= 1) && (stricmp(argv[0], EVENT_START) == 0)) hsreq_save_db(); @@ -689,7 +689,7 @@ int hsreqevt_db_saving(int argc, char **argv) return MOD_CONT; } -int hsreqevt_db_backup(int argc, char **argv) +static int hsreqevt_db_backup(int argc, char **argv) { if ((argc >= 1) && (stricmp(argv[0], EVENT_START) == 0)) { if (HSRequestDBName) @@ -701,7 +701,7 @@ int hsreqevt_db_backup(int argc, char **argv) return MOD_CONT; } -void my_load_config(void) +static void my_load_config(void) { int i; char *tmp = NULL; @@ -731,7 +731,7 @@ void my_load_config(void) alog("debug: [hs_request] Set config vars: MemoUser=%d MemoOper=%d MemoSetters=%d DBName='%s'", HSRequestMemoUser, HSRequestMemoOper, HSRequestMemoSetters, HSRequestDBName); } -void my_add_languages(void) +static void my_add_languages(void) { char *langtable_en_us[] = { /* LNG_REQUEST_SYNTAX */ diff --git a/src/modules/ns_maxemail.c b/src/modules/ns_maxemail.c index f0ed118a0..3f009f5f5 100644 --- a/src/modules/ns_maxemail.c +++ b/src/modules/ns_maxemail.c @@ -18,16 +18,16 @@ #define AUTHOR "Anope" #define VERSION VERSION_STRING -void my_load_config(void); -void my_add_languages(void); -int my_ns_register(User * u); -int my_ns_set(User * u); -int my_event_reload(int argc, char **argv); -int my_event_addcommand(int argc, char **argv); -int my_event_delcommand(int argc, char **argv); +static void my_load_config(void); +static void my_add_languages(void); +static int my_ns_register(User * u); +static int my_ns_set(User * u); +static int my_event_reload(int argc, char **argv); +static int my_event_addcommand(int argc, char **argv); +static int my_event_delcommand(int argc, char **argv); -int NSEmailMax = 0; -int added_register = 0; +static int NSEmailMax = 0; +static int added_register = 0; #define LNG_NUM_STRINGS 2 #define LNG_NSEMAILMAX_REACHED 0 @@ -94,7 +94,7 @@ void AnopeFini(void) /* Nothing to do while unloading */ } -int count_email_in_use(char *email, User * u) +static int count_email_in_use(char *email, User * u) { NickCore *nc; int i; @@ -113,7 +113,7 @@ int count_email_in_use(char *email, User * u) return count; } -int check_email_limit_reached(char *email, User * u) +static int check_email_limit_reached(char *email, User * u) { if ((NSEmailMax < 1) || !email || is_services_admin(u)) return MOD_CONT; @@ -130,7 +130,7 @@ int check_email_limit_reached(char *email, User * u) return MOD_STOP; } -int my_ns_register(User * u) +static int my_ns_register(User * u) { char *cur_buffer; char *email; @@ -147,7 +147,7 @@ int my_ns_register(User * u) return ret; } -int my_ns_set(User * u) +static int my_ns_set(User * u) { char *cur_buffer; char *set; @@ -176,7 +176,7 @@ int my_ns_set(User * u) return ret; } -int my_event_reload(int argc, char **argv) +static int my_event_reload(int argc, char **argv) { if ((argc > 0) && (stricmp(argv[0], EVENT_START) == 0)) my_load_config(); @@ -184,7 +184,7 @@ int my_event_reload(int argc, char **argv) return MOD_CONT; } -int my_event_addcommand(int argc, char **argv) +static int my_event_addcommand(int argc, char **argv) { Command *c; int status; @@ -204,7 +204,7 @@ int my_event_addcommand(int argc, char **argv) return MOD_CONT; } -int my_event_delcommand(int argc, char **argv) +static int my_event_delcommand(int argc, char **argv) { if (argc == 2 && stricmp(argv[0], "ns_maxemail") && !stricmp(argv[1], "REGISTER") && added_register) { @@ -215,7 +215,7 @@ int my_event_delcommand(int argc, char **argv) return MOD_CONT; } -void my_load_config(void) +static void my_load_config(void) { Directive confvalues[] = { {"NSEmailMax", {{PARAM_INT, PARAM_RELOAD, &NSEmailMax}}} @@ -227,7 +227,7 @@ void my_load_config(void) alog("debug: [ns_maxemail] NSEmailMax set to %d", NSEmailMax); } -void my_add_languages(void) +static void my_add_languages(void) { char *langtable_en_us[] = { /* LNG_NSEMAILMAX_REACHED */ diff --git a/src/modules/ns_noop_convert.c b/src/modules/ns_noop_convert.c index 6ed49b75a..39dc7227b 100644 --- a/src/modules/ns_noop_convert.c +++ b/src/modules/ns_noop_convert.c @@ -39,23 +39,23 @@ /*************************************************************************/ User *currentUser; -int m_isIRCop = 0; +static int m_isIRCop = 0; char *NSAutoOPDBName; -int myNickServAutoOpHelp(User * u); -void myNickServHelp(User * u); +static int myNickServAutoOpHelp(User * u); +static void myNickServHelp(User * u); -int noop(User * u); -int mEventJoin(int argc, char **argv); -int setAutoOp(User * u); -int UnsetAutoOp(User * u); +static int noop(User * u); +static int mEventJoin(int argc, char **argv); +static int setAutoOp(User * u); +static int UnsetAutoOp(User * u); -int mLoadData(void); -int mSaveData(int argc, char **argv); -int mLoadConfig(int argc, char **argv); +static int mLoadData(void); +static int mSaveData(int argc, char **argv); +static int mLoadConfig(int argc, char **argv); -void m_AddLanguages(void); +static void m_AddLanguages(void); /*************************************************************************/ @@ -99,7 +99,7 @@ void AnopeFini(void) * Load data from the db file, and populate the autoop setting * @return 0 for success **/ -int mLoadData(void) +static int mLoadData(void) { int ret = 0; int len = 0; @@ -138,7 +138,7 @@ int mLoadData(void) * Load the configuration directives from Services configuration file. * @return 0 for success **/ -int mLoadConfig(int argc, char **argv) +static int mLoadConfig(int argc, char **argv) { char *tmp = NULL; diff --git a/src/modules/os_ignore_db.c b/src/modules/os_ignore_db.c index 04e84f146..58513f712 100644 --- a/src/modules/os_ignore_db.c +++ b/src/modules/os_ignore_db.c @@ -59,20 +59,20 @@ struct db_file_ { char *IgnoreDB; /* Functions */ -int new_open_db_read(DBFile *dbptr, char **key, char **value); -int new_open_db_write(DBFile *dbptr); -void new_close_db(FILE *fptr, char **key, char **value); -int new_read_db_entry(char **key, char **value, FILE * fptr); -int new_write_db_entry(const char *key, DBFile *dbptr, const char *fmt, ...); -int new_write_db_endofblock(DBFile *dbptr); -void fill_db_ptr(DBFile *dbptr, int version, int core_version, char service[256], char filename[256]); - -int save_ignoredb(int argc, char **argv); -int backup_ignoredb(int argc, char **argv); -void load_ignore_db(void); -void save_ignore_db(void); -void load_config(void); -int reload_config(int argc, char **argv); +static int new_open_db_read(DBFile *dbptr, char **key, char **value); +static int new_open_db_write(DBFile *dbptr); +static void new_close_db(FILE *fptr, char **key, char **value); +static int new_read_db_entry(char **key, char **value, FILE * fptr); +static int new_write_db_entry(const char *key, DBFile *dbptr, const char *fmt, ...); +static int new_write_db_endofblock(DBFile *dbptr); +static void fill_db_ptr(DBFile *dbptr, int version, int core_version, char service[256], char filename[256]); + +static int save_ignoredb(int argc, char **argv); +static int backup_ignoredb(int argc, char **argv); +static void load_ignore_db(void); +static void save_ignore_db(void); +static void load_config(void); +static int reload_config(int argc, char **argv); /* ------------------------------------------------------------------------------- */ @@ -128,7 +128,7 @@ void AnopeFini(void) { /* ------------------------------------------------------------------------------- */ -void load_config(void) { +static void load_config(void) { int i; Directive confvalues[][1] = { @@ -152,7 +152,7 @@ void load_config(void) { /** * Upon /os reload call the routines for reloading the configuration directives **/ -int reload_config(int argc, char **argv) { +static int reload_config(int argc, char **argv) { if (argc >= 1) { if (!stricmp(argv[0], EVENT_START)) { load_config(); @@ -164,7 +164,7 @@ int reload_config(int argc, char **argv) { /** * When anope saves her databases, we do the same. **/ -int save_ignoredb(int argc, char **argv) { +static int save_ignoredb(int argc, char **argv) { if ((argc >= 1) && (!stricmp(argv[0], EVENT_STOP))) save_ignore_db(); @@ -175,7 +175,7 @@ int save_ignoredb(int argc, char **argv) { /** * When anope backs her databases up, we do the same. **/ -int backup_ignoredb(int argc, char **argv) { +static int backup_ignoredb(int argc, char **argv) { if ((argc >= 1) && (!stricmp(argv[0], EVENT_STOP))) { if (debug) alog("[os_ignore_db] debug: Backing up %s database...", IgnoreDB); @@ -190,7 +190,7 @@ int backup_ignoredb(int argc, char **argv) { * DataBase Handling **************************************************************************/ -void load_ignore_db(void) { +static void load_ignore_db(void) { DBFile *dbptr = scalloc(1, sizeof(DBFile)); char *key, *value, *mask = NULL; int retval = 0; @@ -284,7 +284,7 @@ void load_ignore_db(void) { } -void save_ignore_db(void) { +static void save_ignore_db(void) { DBFile *dbptr = scalloc(1, sizeof(DBFile)); time_t now; IgnoreData *ign, *next; @@ -345,7 +345,7 @@ void save_ignore_db(void) { **************************************************************************/ -int new_open_db_read(DBFile *dbptr, char **key, char **value) { +static int new_open_db_read(DBFile *dbptr, char **key, char **value) { *key = malloc(MAXKEYLEN); *value = malloc(MAXVALLEN); @@ -396,7 +396,7 @@ int new_open_db_read(DBFile *dbptr, char **key, char **value) { } -int new_open_db_write(DBFile *dbptr) { +static int new_open_db_write(DBFile *dbptr) { if (!(dbptr->fptr = fopen(dbptr->filename, "wb"))) { if (debug) { alog("debug: %s Can't open %s database for writing", dbptr->service, dbptr->filename); @@ -417,7 +417,7 @@ int new_open_db_write(DBFile *dbptr) { } -void new_close_db(FILE *fptr, char **key, char **value) { +static void new_close_db(FILE *fptr, char **key, char **value) { if (key && *key) { free(*key); *key = NULL; @@ -433,7 +433,7 @@ void new_close_db(FILE *fptr, char **key, char **value) { } -int new_read_db_entry(char **key, char **value, FILE *fptr) { +static int new_read_db_entry(char **key, char **value, FILE *fptr) { char *string = *key; int character; int i = 0; @@ -473,7 +473,7 @@ int new_read_db_entry(char **key, char **value, FILE *fptr) { } -int new_write_db_entry(const char *key, DBFile *dbptr, const char *fmt, ...) { +static int new_write_db_entry(const char *key, DBFile *dbptr, const char *fmt, ...) { char string[MAXKEYLEN + MAXVALLEN + 2], value[MAXVALLEN]; /* safety byte :P */ va_list ap; unsigned int length; @@ -512,7 +512,7 @@ int new_write_db_entry(const char *key, DBFile *dbptr, const char *fmt, ...) { } -int new_write_db_endofblock(DBFile *dbptr) { +static int new_write_db_endofblock(DBFile *dbptr) { if (!dbptr) { return DB_WRITE_ERROR; } @@ -528,7 +528,7 @@ int new_write_db_endofblock(DBFile *dbptr) { -void fill_db_ptr(DBFile *dbptr, int version, int core_version, +static void fill_db_ptr(DBFile *dbptr, int version, int core_version, char service[256], char filename[256]) { dbptr->db_version = version; dbptr->core_db_version = core_version; diff --git a/src/modules/os_info.c b/src/modules/os_info.c index abb721c20..7d131daea 100644 --- a/src/modules/os_info.c +++ b/src/modules/os_info.c @@ -42,22 +42,22 @@ char *OSInfoDBName = NULL; -int myAddNickInfo(User * u); -int myAddChanInfo(User * u); -int myNickInfo(User * u); -int myChanInfo(User * u); - -int mNickHelp(User * u); -int mChanHelp(User * u); -void mMainChanHelp(User * u); -void mMainNickHelp(User * u); -void m_AddLanguages(void); - -int mLoadData(void); -int mSaveData(int argc, char **argv); -int mBackupData(int argc, char **argv); -int mLoadConfig(); -int mEventReload(int argc, char **argv); +static int myAddNickInfo(User * u); +static int myAddChanInfo(User * u); +static int myNickInfo(User * u); +static int myChanInfo(User * u); + +static int mNickHelp(User * u); +static int mChanHelp(User * u); +static void mMainChanHelp(User * u); +static void mMainNickHelp(User * u); +static void m_AddLanguages(void); + +static int mLoadData(void); +static int mSaveData(int argc, char **argv); +static int mBackupData(int argc, char **argv); +static int mLoadConfig(); +static int mEventReload(int argc, char **argv); /*************************************************************************/ @@ -142,7 +142,7 @@ void AnopeFini(void) * @return MOD_CONT if we want to process other commands in this command * stack, MOD_STOP if we dont **/ -int myAddNickInfo(User * u) +static int myAddNickInfo(User * u) { char *text = NULL; char *cmd = NULL; @@ -214,7 +214,7 @@ int myAddNickInfo(User * u) * @return MOD_CONT if we want to process other commands in this command * stack, MOD_STOP if we dont **/ -int myAddChanInfo(User * u) +static int myAddChanInfo(User * u) { char *text = NULL; char *cmd = NULL; @@ -281,7 +281,7 @@ int myAddChanInfo(User * u) * @param u The user who requested info * @return MOD_CONT to continue processing commands or MOD_STOP to stop **/ -int myNickInfo(User * u) +static int myNickInfo(User * u) { char *text = NULL; char *nick = NULL; @@ -318,7 +318,7 @@ int myNickInfo(User * u) * @param u The user who requested info * @return MOD_CONT to continue processing commands or MOD_STOP to stop **/ -int myChanInfo(User * u) +static int myChanInfo(User * u) { char *text = NULL; char *chan = NULL; @@ -352,7 +352,7 @@ int myChanInfo(User * u) * Load data from the db file, and populate our OperInfo lines * @return 0 for success **/ -int mLoadData(void) +static int mLoadData(void) { int ret = 0; FILE *in; @@ -411,7 +411,7 @@ int mLoadData(void) * Next do the same again for ChannelInfos * @return 0 for success **/ -int mSaveData(int argc, char **argv) +static int mSaveData(int argc, char **argv) { ChannelInfo *ci = NULL; NickCore *nc = NULL; @@ -462,7 +462,7 @@ int mSaveData(int argc, char **argv) * Backup our databases using the commands provided by Anope * @return MOD_CONT **/ -int mBackupData(int argc, char **argv) +static int mBackupData(int argc, char **argv) { if (argc >= 1 && !stricmp(argv[0], EVENT_START)) ModuleDatabaseBackup(OSInfoDBName); @@ -474,7 +474,7 @@ int mBackupData(int argc, char **argv) * Load the configuration directives from Services configuration file. * @return 0 for success **/ -int mLoadConfig(void) +static int mLoadConfig(void) { char *tmp = NULL; @@ -504,7 +504,7 @@ int mLoadConfig(void) * Manage the RELOAD EVENT * @return MOD_CONT **/ -int mEventReload(int argc, char **argv) +static int mEventReload(int argc, char **argv) { int ret = 0; if (argc >= 1) { @@ -527,7 +527,7 @@ int mEventReload(int argc, char **argv) /** * manages the multilanguage stuff **/ -void m_AddLanguages(void) +static void m_AddLanguages(void) { char *langtable_en_us[] = { /* OINFO_SYNTAX */ @@ -745,7 +745,7 @@ void m_AddLanguages(void) /*************************************************************************/ -int mNickHelp(User * u) +static int mNickHelp(User * u) { if (is_oper(u)) { moduleNoticeLang(s_NickServ, u, OINFO_HELP); @@ -755,7 +755,7 @@ int mNickHelp(User * u) return MOD_CONT; } -int mChanHelp(User * u) +static int mChanHelp(User * u) { if (is_oper(u)) { moduleNoticeLang(s_ChanServ, u, OCINFO_HELP); @@ -766,7 +766,7 @@ int mChanHelp(User * u) } /* This help will be added to the main NickServ list */ -void mMainNickHelp(User * u) +static void mMainNickHelp(User * u) { if (is_oper(u)) { moduleNoticeLang(s_NickServ, u, OINFO_HELP_CMD); @@ -774,7 +774,7 @@ void mMainNickHelp(User * u) } /* This help will be added to the main NickServ list */ -void mMainChanHelp(User * u) +static void mMainChanHelp(User * u) { if (is_oper(u)) { moduleNoticeLang(s_ChanServ, u, OCINFO_HELP_CMD); |