|
Omega Security Services 0.7.3
|
#include "stdinc.h"#include "server.h"Go to the source code of this file.
Defines | |
| #define | NAME "m_foo" |
| #define | AUTHOR "Twitch" |
| #define | VERSION "Module API Demonstration" |
Functions | |
| static int | foo_init () |
| static void | foo_connect () |
| static void | cmd_foo (User *, char *) |
| static void | help_m_foo (User *) |
| static void | help_foo_ext (User *) |
| static int | Module_Init () |
| static void | Module_Close () |
| MODHEADER (NAME, VERSION, AUTHOR, MAKE_ABI(0, 5, 2), Module_Init, Module_Close) | |
Variables | |
| User * | s_FooServ |
| char * | foo_nick = "FooServ" |
| char * | ident = "security" |
| char * | host = "foos.dont.know" |
| char * | modes = "+oSpq" |
| char * | name = "Foo Service" |
| #define AUTHOR "Twitch" |
Definition at line 52 of file m_example.c.
| #define NAME "m_foo" |
Defines
Definition at line 51 of file m_example.c.
| #define VERSION "Module API Demonstration" |
Definition at line 53 of file m_example.c.
| static void cmd_foo | ( | User * | u, |
| char * | av | ||
| ) | [static] |
This is a command hook function it is called when the command it is hooking is triggured.
| u | (User *) - Pointer to the user structure of the person calling the command |
| av | (string) - Paramaters passed after the command. |
Definition at line 175 of file m_example.c.
References s_FooServ, and sendto_one().
Referenced by Module_Init().
| static void foo_connect | ( | ) | [static] |
Introduce the client to server and put him nito the log channel.
Definition at line 149 of file m_example.c.
References AddToChannelU(), Channel::channelts, find_channel(), ircd_add_user(), logchan, new_chan(), and s_FooServ.
Referenced by Module_Init().
| static int foo_init | ( | ) | [static] |
ProtoTypes
This function is a standard C style function it returns true if our new client is created
Definition at line 132 of file m_example.c.
References foo_nick, host, ident, name, NewClient(), and s_FooServ.
Referenced by Module_Init().
| static void help_foo_ext | ( | User * | u | ) | [static] |
Definition at line 190 of file m_example.c.
References s_FooServ, and sendto_one().
Referenced by Module_Init().
| static void help_m_foo | ( | User * | u | ) | [static] |
Definition at line 183 of file m_example.c.
References s_FooServ, and sendto_one().
Referenced by Module_Close(), and Module_Init().
| MODHEADER | ( | NAME | , |
| VERSION | , | ||
| AUTHOR | , | ||
| MAKE_ABI(0, 5, 2) | , | ||
| Module_Init | , | ||
| Module_Close | |||
| ) |
The module header is required on all Modules it specifies the following
| name | (string) - The module name |
| version | (string) - Current Module version |
| author | (string) - Author of the module |
| abi | (MAKE_ABI) - The version of the binary interface that the module was designed for. This must be a MAKE_ABI returned value. |
| init_funct | *(int)() - Pointer to the Module factory. |
| close_funct | *(void)() - Point to the closeing procedure. |
| static void Module_Close | ( | ) | [static] |
Closing proceedure this is were you remove your clients and commands and is called on unload.
Definition at line 115 of file m_example.c.
References DelClient(), DelHelp(), help_m_foo(), and s_FooServ.
| static int Module_Init | ( | ) | [static] |
Module_Init() - Module factory called when the module is loaded. return int Any status changes the module should pass to the core... see MOD API documentation.
Definition at line 92 of file m_example.c.
References ACC_USER, AddCmd(), AddHelp(), cmd_foo(), foo_connect(), foo_init(), help_foo_ext(), help_m_foo(), MOD_CONT, MOD_STOP, and s_FooServ.
| char* foo_nick = "FooServ" |
Definition at line 39 of file m_example.c.
Referenced by foo_init().
| char* host = "foos.dont.know" |
Definition at line 41 of file m_example.c.
Referenced by DestAccList(), find_access(), foo_init(), get_hostname(), and SigHandler().
| char* ident = "security" |
Definition at line 40 of file m_example.c.
Referenced by foo_init(), and receive().
| char* modes = "+oSpq" |
Definition at line 42 of file m_example.c.
| char* name = "Foo Service" |
Definition at line 43 of file m_example.c.
Referenced by foo_init().
| User* s_FooServ |
Configurable Settings
Definition at line 38 of file m_example.c.
Referenced by cmd_foo(), foo_connect(), foo_init(), help_foo_ext(), help_m_foo(), Module_Close(), and Module_Init().