#include "module.h"
Go to the source code of this file.
Defines | |
| #define | AUTHOR "Rob" |
| #define | VERSION VERSION_STRING |
| #define | HSREQ_DEFAULT_DBNAME "hs_request.db" |
| #define | LNG_NUM_STRINGS 21 |
| #define | LNG_REQUEST_SYNTAX 0 |
| #define | LNG_REQUESTED 1 |
| #define | LNG_REQUEST_WAIT 2 |
| #define | LNG_REQUEST_MEMO 3 |
| #define | LNG_ACTIVATE_SYNTAX 4 |
| #define | LNG_ACTIVATED 5 |
| #define | LNG_ACTIVATE_MEMO 6 |
| #define | LNG_REJECT_SYNTAX 7 |
| #define | LNG_REJECTED 8 |
| #define | LNG_REJECT_MEMO 9 |
| #define | LNG_REJECT_MEMO_REASON 10 |
| #define | LNG_NO_REQUEST 11 |
| #define | LNG_HELP 12 |
| #define | LNG_HELP_SETTER 13 |
| #define | LNG_HELP_REQUEST 14 |
| #define | LNG_HELP_ACTIVATE 15 |
| #define | LNG_HELP_ACTIVATE_MEMO 16 |
| #define | LNG_HELP_REJECT 17 |
| #define | LNG_HELP_REJECT_MEMO 18 |
| #define | LNG_WAITING_SYNTAX 19 |
| #define | LNG_HELP_WAITING 20 |
Functions | |
| 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) |
| 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) |
| static void | my_add_host_request (char *nick, char *vIdent, char *vhost, char *creator, int32 tmp_time) |
| 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) |
| 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) |
| static void | my_load_config (void) |
| static void | my_add_languages (void) |
| int | AnopeInit (int argc, char **argv) |
| void | AnopeFini (void) |
Variables | |
| static int | HSRequestMemoUser = 0 |
| static int | HSRequestMemoOper = 0 |
| static int | HSRequestMemoSetters = 0 |
| char * | HSRequestDBName = NULL |
| HostCore * | hs_request_head |
| #define AUTHOR "Rob" |
Definition at line 20 of file hs_request.c.
Referenced by AnopeInit().
| #define HSREQ_DEFAULT_DBNAME "hs_request.db" |
Definition at line 29 of file hs_request.c.
Referenced by hsreqevt_db_backup(), and my_load_config().
| #define LNG_ACTIVATE_MEMO 6 |
Definition at line 40 of file hs_request.c.
Referenced by hs_do_activate().
| #define LNG_ACTIVATE_SYNTAX 4 |
Definition at line 38 of file hs_request.c.
Referenced by hs_do_activate(), and hs_help_activate().
| #define LNG_ACTIVATED 5 |
Definition at line 39 of file hs_request.c.
Referenced by hs_do_activate().
| #define LNG_HELP 12 |
Definition at line 46 of file hs_request.c.
Referenced by hs_help().
| #define LNG_HELP_ACTIVATE 15 |
Definition at line 49 of file hs_request.c.
Referenced by hs_help_activate().
| #define LNG_HELP_ACTIVATE_MEMO 16 |
Definition at line 50 of file hs_request.c.
Referenced by hs_help_activate().
| #define LNG_HELP_REJECT 17 |
Definition at line 51 of file hs_request.c.
Referenced by hs_help_reject().
| #define LNG_HELP_REJECT_MEMO 18 |
Definition at line 52 of file hs_request.c.
Referenced by hs_help_reject().
| #define LNG_HELP_REQUEST 14 |
Definition at line 48 of file hs_request.c.
Referenced by hs_help_request().
| #define LNG_HELP_SETTER 13 |
Definition at line 47 of file hs_request.c.
Referenced by hs_help().
| #define LNG_HELP_WAITING 20 |
Definition at line 54 of file hs_request.c.
Referenced by hs_help_waiting().
| #define LNG_NO_REQUEST 11 |
Definition at line 45 of file hs_request.c.
Referenced by hs_do_activate(), and hs_do_reject().
| #define LNG_NUM_STRINGS 21 |
Definition at line 32 of file hs_request.c.
Referenced by my_add_languages().
| #define LNG_REJECT_MEMO 9 |
Definition at line 43 of file hs_request.c.
Referenced by hs_do_reject().
| #define LNG_REJECT_MEMO_REASON 10 |
Definition at line 44 of file hs_request.c.
Referenced by hs_do_reject().
| #define LNG_REJECT_SYNTAX 7 |
Definition at line 41 of file hs_request.c.
Referenced by hs_do_reject(), and hs_help_reject().
| #define LNG_REJECTED 8 |
Definition at line 42 of file hs_request.c.
Referenced by hs_do_reject().
| #define LNG_REQUEST_MEMO 3 |
Definition at line 37 of file hs_request.c.
Referenced by req_send_memos().
| #define LNG_REQUEST_SYNTAX 0 |
Definition at line 34 of file hs_request.c.
Referenced by hs_do_request(), and hs_help_request().
| #define LNG_REQUEST_WAIT 2 |
Definition at line 36 of file hs_request.c.
Referenced by hs_do_request().
| #define LNG_REQUESTED 1 |
Definition at line 35 of file hs_request.c.
Referenced by hs_do_request().
| #define LNG_WAITING_SYNTAX 19 |
Definition at line 53 of file hs_request.c.
Referenced by hs_help_waiting().
| #define VERSION VERSION_STRING |
Definition at line 21 of file hs_request.c.
Referenced by AnopeInit().
| void AnopeFini | ( | void | ) |
Definition at line 143 of file hs_request.c.
References alog(), debug, deleteHostCore(), hsreq_save_db(), and HSRequestDBName.
| int AnopeInit | ( | int | argc, | |
| char ** | argv | |||
| ) |
Definition at line 86 of file hs_request.c.
References alog(), AUTHOR, c, createCommand(), createEventHook(), debug, EVENT_DB_BACKUP, EVENT_DB_SAVING, EVENT_NICK_DROPPED, EVENT_NICK_EXPIRE, HOSTSERV, hs_do_activate(), hs_do_list_out(), hs_do_reject(), hs_do_request(), hs_do_waiting(), hs_help(), hs_help_activate(), hs_help_reject(), hs_help_request(), hs_help_waiting(), hsreq_load_db(), hsreqevt_db_backup(), hsreqevt_db_saving(), hsreqevt_nick_dropped(), is_host_setter(), is_services_oper(), MOD_HEAD, moduleAddAuthor(), moduleAddCommand(), moduleAddEventHook(), moduleAddHelp(), moduleAddVersion(), moduleSetHostHelp(), moduleSetType(), my_add_languages(), my_load_config(), nick_identified(), SUPPORTED, and VERSION.
| static int hs_do_activate | ( | User * | u | ) | [static] |
Definition at line 401 of file hs_request.c.
References addHostCore(), alog(), deleteHostCore(), findHostCore(), findnick(), HSRequestMemoUser, LNG_ACTIVATE_MEMO, LNG_ACTIVATE_SYNTAX, LNG_ACTIVATED, LNG_NO_REQUEST, moduleGetLastBuffer(), moduleNoticeLang(), my_memo_lang(), myStrGetToken(), hostcore_::next, user_::nick, hostcore_::nick, notice_lang(), s_HostServ, hostcore_::vHost, and hostcore_::vIdent.
Referenced by AnopeInit().
| static int hs_do_list_out | ( | User * | u | ) | [static] |
Definition at line 478 of file hs_request.c.
References moduleGetLastBuffer(), show_list(), and stricmp().
Referenced by AnopeInit().
| static int hs_do_reject | ( | User * | u | ) | [static] |
Definition at line 352 of file hs_request.c.
References alog(), deleteHostCore(), findHostCore(), HSRequestMemoUser, LNG_NO_REQUEST, LNG_REJECT_MEMO, LNG_REJECT_MEMO_REASON, LNG_REJECT_SYNTAX, LNG_REJECTED, moduleGetLastBuffer(), moduleNoticeLang(), my_memo_lang(), myStrGetToken(), myStrGetTokenRemainder(), hostcore_::next, user_::nick, hostcore_::nick, and s_HostServ.
Referenced by AnopeInit().
| static int hs_do_request | ( | User * | u | ) | [static] |
Definition at line 157 of file hs_request.c.
References alog(), findnick(), HOSTMAX, HSRequestMemoOper, HSRequestMemoSetters, ircd, isValidHost(), user_::lastmemosend, LNG_REQUEST_SYNTAX, LNG_REQUEST_WAIT, LNG_REQUESTED, moduleGetLastBuffer(), moduleNoticeLang(), MSSendDelay, my_add_host_request(), my_isvalidchar(), myStrGetOnlyToken(), myStrGetToken(), myStrGetTokenRemainder(), user_::nick, notice_lang(), req_send_memos(), s_HostServ, snprintf(), USERMAX, and ircdvars_::vident.
Referenced by AnopeInit().
| static int hs_do_waiting | ( | User * | u | ) | [static] |
| static void hs_help | ( | User * | u | ) | [static] |
Definition at line 586 of file hs_request.c.
References is_host_setter(), LNG_HELP, LNG_HELP_SETTER, moduleNoticeLang(), and s_HostServ.
Referenced by AnopeInit().
| static int hs_help_activate | ( | User * | u | ) | [static] |
Definition at line 543 of file hs_request.c.
References HSRequestMemoUser, is_host_setter(), LNG_ACTIVATE_SYNTAX, LNG_HELP_ACTIVATE, LNG_HELP_ACTIVATE_MEMO, moduleNoticeLang(), user_::nick, notice(), notice_lang(), and s_HostServ.
Referenced by AnopeInit().
| static int hs_help_reject | ( | User * | u | ) | [static] |
Definition at line 558 of file hs_request.c.
References HSRequestMemoUser, is_host_setter(), LNG_HELP_REJECT, LNG_HELP_REJECT_MEMO, LNG_REJECT_SYNTAX, moduleNoticeLang(), user_::nick, notice(), notice_lang(), and s_HostServ.
Referenced by AnopeInit().
| static int hs_help_request | ( | User * | u | ) | [static] |
Definition at line 534 of file hs_request.c.
References LNG_HELP_REQUEST, LNG_REQUEST_SYNTAX, moduleNoticeLang(), user_::nick, notice(), and s_HostServ.
Referenced by AnopeInit().
| static int hs_help_waiting | ( | User * | u | ) | [static] |
Definition at line 573 of file hs_request.c.
References is_host_setter(), LNG_HELP_WAITING, LNG_WAITING_SYNTAX, moduleNoticeLang(), user_::nick, notice(), notice_lang(), and s_HostServ.
Referenced by AnopeInit().
| static void hsreq_load_db | ( | void | ) | [static] |
Definition at line 592 of file hs_request.c.
References alog(), debug, HSRequestDBName, my_add_host_request(), myStrGetToken(), normalizeBuffer(), and stricmp().
Referenced by AnopeInit().
| static void hsreq_save_db | ( | void | ) | [static] |
Definition at line 651 of file hs_request.c.
References alog(), hostcore_::creator, current, debug, HSRequestDBName, hostcore_::next, hostcore_::nick, hostcore_::time, hostcore_::vHost, and hostcore_::vIdent.
Referenced by AnopeFini(), and hsreqevt_db_saving().
| static int hsreqevt_db_backup | ( | int | argc, | |
| char ** | argv | |||
| ) | [static] |
Definition at line 692 of file hs_request.c.
References EVENT_START, HSREQ_DEFAULT_DBNAME, HSRequestDBName, ModuleDatabaseBackup(), and stricmp().
Referenced by AnopeInit().
| static int hsreqevt_db_saving | ( | int | argc, | |
| char ** | argv | |||
| ) | [static] |
Definition at line 684 of file hs_request.c.
References EVENT_START, hsreq_save_db(), and stricmp().
Referenced by AnopeInit().
| static int hsreqevt_nick_dropped | ( | int | argc, | |
| char ** | argv | |||
| ) | [static] |
Definition at line 337 of file hs_request.c.
References deleteHostCore(), and findHostCore().
Referenced by AnopeInit().
| static void my_add_host_request | ( | char * | nick, | |
| char * | vIdent, | |||
| char * | vhost, | |||
| char * | creator, | |||
| int32 | tmp_time | |||
| ) | [static] |
Definition at line 446 of file hs_request.c.
References createHostCorelist(), deleteHostCore(), findHostCore(), and insertHostCore().
Referenced by hs_do_request(), and hsreq_load_db().
| static void my_add_languages | ( | void | ) | [static] |
Definition at line 734 of file hs_request.c.
References LANG_DE, LANG_EN_US, LANG_FR, LANG_IT, LANG_NL, LANG_PT, LANG_RU, LNG_NUM_STRINGS, and moduleInsertLanguage().
Referenced by AnopeInit().
| static int my_isvalidchar | ( | const char | c | ) | [static] |
Definition at line 469 of file hs_request.c.
Referenced by hs_do_request().
| static void my_load_config | ( | void | ) | [static] |
Definition at line 704 of file hs_request.c.
References alog(), debug, HSREQ_DEFAULT_DBNAME, HSRequestDBName, HSRequestMemoOper, HSRequestMemoSetters, HSRequestMemoUser, moduleGetConfigDirective(), and sstrdup().
Referenced by AnopeInit().
| static void my_memo_lang | ( | User * | u, | |
| char * | name, | |||
| int | z, | |||
| char * | source, | |||
| int | number, | |||
| ... | ||||
| ) | [static] |
Definition at line 258 of file hs_request.c.
References alog(), ModuleLang_::argc, ModuleLang_::argv, findModule(), finduser(), Module_::lang, nickcore_::language, memo_send(), memo_send_from(), mod_current_module, mod_current_module_name, user_::na, Module_::name, nickalias_::nc, sstrdup(), strscpy(), and vsnprintf().
Referenced by hs_do_activate(), hs_do_reject(), and req_send_memos().
| static void req_send_memos | ( | User * | u, | |
| char * | vHost | |||
| ) | [static] |
Definition at line 309 of file hs_request.c.
References checkDefCon(), slist_::count, DEFCON_NO_NEW_MEMOS, HostNumber, HostSetters, HSRequestMemoOper, HSRequestMemoSetters, slist_::list, LNG_REQUEST_MEMO, my_memo_lang(), user_::na, nickalias_::nick, RootNumber, servadmins, ServicesRoots, and servopers.
Referenced by hs_do_request().
| static void show_list | ( | User * | u | ) | [static] |
Definition at line 501 of file hs_request.c.
References hostcore_::creator, current, getstring, hostcore_::next, hostcore_::nick, notice_lang(), NSListMax, s_HostServ, hostcore_::time, hostcore_::vHost, and hostcore_::vIdent.
Referenced by hs_do_list_out(), and hs_do_waiting().
Definition at line 84 of file hs_request.c.
| char* HSRequestDBName = NULL |
Definition at line 27 of file hs_request.c.
Referenced by AnopeFini(), hsreq_load_db(), hsreq_save_db(), hsreqevt_db_backup(), and my_load_config().
int HSRequestMemoOper = 0 [static] |
Definition at line 25 of file hs_request.c.
Referenced by hs_do_request(), my_load_config(), and req_send_memos().
int HSRequestMemoSetters = 0 [static] |
Definition at line 26 of file hs_request.c.
Referenced by hs_do_request(), my_load_config(), and req_send_memos().
int HSRequestMemoUser = 0 [static] |
Definition at line 24 of file hs_request.c.
Referenced by hs_do_activate(), hs_do_reject(), hs_help_activate(), hs_help_reject(), and my_load_config().
1.7.1