Anope IRC Services  Version 1.8
Macros | Functions | Variables
hs_request.c File Reference
#include "module.h"
Include dependency graph for hs_request.c:

Go to the source code of this file.

Macros

#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 *vIdent, 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
 
HostCorehs_request_head
 

Macro Definition Documentation

#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 hsreq_load_db(), hsreq_save_db(), 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().

Function Documentation

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 
)
static int hs_do_activate ( User u)
static
static int hs_do_list_out ( User u)
static

Definition at line 488 of file hs_request.c.

References MOD_CONT, moduleGetLastBuffer(), show_list(), and stricmp().

Referenced by AnopeInit().

static int hs_do_reject ( User u)
static
static int hs_do_request ( User u)
static
static int hs_do_waiting ( User u)
static

Definition at line 504 of file hs_request.c.

References MOD_CONT, and show_list().

Referenced by AnopeInit().

static void hs_help ( User u)
static

Definition at line 596 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
static int hs_help_reject ( User u)
static
static int hs_help_request ( User u)
static
static int hs_help_waiting ( User u)
static
static void hsreq_load_db ( void  )
static
static void hsreq_save_db ( void  )
static
static int hsreqevt_db_backup ( int  argc,
char **  argv 
)
static

Definition at line 702 of file hs_request.c.

References EVENT_START, HSREQ_DEFAULT_DBNAME, HSRequestDBName, MOD_CONT, ModuleDatabaseBackup(), and stricmp().

Referenced by AnopeInit().

static int hsreqevt_db_saving ( int  argc,
char **  argv 
)
static

Definition at line 694 of file hs_request.c.

References EVENT_START, hsreq_save_db(), MOD_CONT, and stricmp().

Referenced by AnopeInit().

static int hsreqevt_nick_dropped ( int  argc,
char **  argv 
)
static

Definition at line 347 of file hs_request.c.

References deleteHostCore(), findHostCore(), and MOD_CONT.

Referenced by AnopeInit().

static void my_add_host_request ( char *  nick,
char *  vIdent,
char *  vhost,
char *  creator,
int32  tmp_time 
)
static

Definition at line 456 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 743 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 479 of file hs_request.c.

Referenced by hs_do_request().

static void my_load_config ( void  )
static
static void my_memo_lang ( User u,
char *  name,
int  z,
char *  source,
int  number,
  ... 
)
static
static void req_send_memos ( User u,
char *  vIdent,
char *  vHost 
)
static
static void show_list ( User u)
static

Variable Documentation

HostCore* hs_request_head

Definition at line 84 of file hs_request.c.

Referenced by hs_do_activate(), hs_do_reject(), hsreq_save_db(), and show_list().

char* HSRequestDBName = NULL
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