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

Go to the source code of this file.

Macros

#define AUTHOR   "Rob"
 
#define VERSION   VERSION_STRING
 
#define DEFAULT_DB_NAME   "autoop.db"
 
#define LANG_NUM_STRINGS   8
 
#define AUTOOP_SYNTAX   0
 
#define AUTOOP_STATUS_ON   1
 
#define AUTOOP_STATUS_OFF   2
 
#define AUTOOP_NO_NICK   3
 
#define AUTOOP_ON   4
 
#define AUTOOP_OFF   5
 
#define AUTOOP_DESC   6
 
#define AUTOOP_HELP   7
 

Functions

static int mLoadData (void)
 
static int mLoadConfig (int argc, char **argv)
 
int AnopeInit (int argc, char **argv)
 
void AnopeFini (void)
 

Variables

UsercurrentUser
 
char * NSAutoOPDBName
 

Macro Definition Documentation

#define AUTHOR   "Rob"

Definition at line 21 of file ns_noop_convert.c.

Referenced by AnopeInit().

#define AUTOOP_DESC   6

Definition at line 36 of file ns_noop_convert.c.

#define AUTOOP_HELP   7

Definition at line 37 of file ns_noop_convert.c.

#define AUTOOP_NO_NICK   3

Definition at line 33 of file ns_noop_convert.c.

#define AUTOOP_OFF   5

Definition at line 35 of file ns_noop_convert.c.

#define AUTOOP_ON   4

Definition at line 34 of file ns_noop_convert.c.

#define AUTOOP_STATUS_OFF   2

Definition at line 32 of file ns_noop_convert.c.

#define AUTOOP_STATUS_ON   1

Definition at line 31 of file ns_noop_convert.c.

#define AUTOOP_SYNTAX   0

Definition at line 30 of file ns_noop_convert.c.

#define DEFAULT_DB_NAME   "autoop.db"

Definition at line 25 of file ns_noop_convert.c.

Referenced by mLoadConfig().

#define LANG_NUM_STRINGS   8

Definition at line 28 of file ns_noop_convert.c.

#define VERSION   VERSION_STRING

Definition at line 22 of file ns_noop_convert.c.

Referenced by AnopeInit().

Function Documentation

void AnopeFini ( void  )

Unload the module

Definition at line 78 of file ns_noop_convert.c.

References NSAutoOPDBName.

int AnopeInit ( int  argc,
char **  argv 
)

AnopeInit is called when the module is loaded

Parameters
argcArgument count
argvArgument list
Returns
MOD_CONT to allow the module, MOD_STOP to stop it

Definition at line 56 of file ns_noop_convert.c.

References alog(), AUTHOR, mLoadConfig(), mLoadData(), MOD_STOP, moduleAddAuthor(), moduleAddVersion(), moduleSetType(), NSAutoOPDBName, SUPPORTED, and VERSION.

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

Load the configuration directives from Services configuration file.

Returns
0 for success

Definition at line 129 of file ns_noop_convert.c.

References alog(), DEFAULT_DB_NAME, MOD_CONT, MOD_STOP, moduleGetConfigDirective(), NSAutoOPDBName, PARAM_RELOAD, PARAM_STRING, and sstrdup().

Referenced by AnopeInit().

static int mLoadData ( void  )
static

Load data from the db file, and populate the autoop setting

Returns
0 for success

Definition at line 90 of file ns_noop_convert.c.

References alog(), findnick(), nickcore_::flags, myStrGetToken(), nickalias_::nc, NI_AUTOOP, and NSAutoOPDBName.

Referenced by AnopeInit().

Variable Documentation

User* currentUser

Definition at line 41 of file ns_noop_convert.c.

char* NSAutoOPDBName

Definition at line 43 of file ns_noop_convert.c.

Referenced by AnopeFini(), AnopeInit(), mLoadConfig(), and mLoadData().