From 52899de0ff2d62ca0542b243c41626010bf62083 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 25 Mar 2005 03:51:56 +0000 Subject: Documentation update git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@899 e03df62e-2008-0410-955e-edbf42e46eb7 --- docs/module-doc/modules_8h-source.html | 542 +++++++++++++++++---------------- 1 file changed, 278 insertions(+), 264 deletions(-) (limited to 'docs/module-doc/modules_8h-source.html') diff --git a/docs/module-doc/modules_8h-source.html b/docs/module-doc/modules_8h-source.html index 2ae27ca19..27aa2af8e 100644 --- a/docs/module-doc/modules_8h-source.html +++ b/docs/module-doc/modules_8h-source.html @@ -1,279 +1,293 @@ -modules.h Source File +InspIRCd: modules.h Source File - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  
-

modules.h

Go to the documentation of this file.
00001 /*
-00002 
-00003 
-00004 
-00005 */
-00006 
-00007 
-00008 #ifndef __PLUGIN_H
-00009 #define __PLUGIN_H
-00010 
-00011 // log levels
-00012 
-00013 #define DEBUG 10
-00014 #define VERBOSE 20
-00015 #define DEFAULT 30
-00016 #define SPARSE 40
-00017 #define NONE 50
-00018 
-00019 // used with OnExtendedMode() method of modules
-00020 
-00021 #define MT_CHANNEL 1
-00022 #define MT_CLIENT 2
-00023 #define MT_SERVER 3
-00024 
-00025 // used with OnAccessCheck() method of modules
-00026 
-00027 #define ACR_DEFAULT 0           // Do default action (act as if the module isnt even loaded)
-00028 #define ACR_DENY 1              // deny the action
-00029 #define ACR_ALLOW 2             // allow the action
-00030 
-00031 #define AC_KICK 0               // a user is being kicked
-00032 #define AC_DEOP 1               // a user is being deopped
-00033 #define AC_OP 2                 // a user is being opped
-00034 #define AC_VOICE 3              // a user is being voiced
-00035 #define AC_DEVOICE 4            // a user is being devoiced
-00036 #define AC_HALFOP 5             // a user is being halfopped
-00037 #define AC_DEHALFOP 6           // a user is being dehalfopped
-00038 #define AC_INVITE 7             // a user is being invited
-00039 #define AC_GENERAL_MODE 8       // a user channel mode is being changed
+
+
+

modules.h

Go to the documentation of this file.
00001 /*       +------------------------------------+
+00002  *       | Inspire Internet Relay Chat Daemon |
+00003  *       +------------------------------------+
+00004  *
+00005  *  Inspire is copyright (C) 2002-2004 ChatSpike-Dev.
+00006  *                       E-mail:
+00007  *                <brain@chatspike.net>
+00008  *                <Craig@chatspike.net>
+00009  *     
+00010  * Written by Craig Edwards, Craig McLure, and others.
+00011  * This program is free but copyrighted software; see
+00012  *            the file COPYING for details.
+00013  *
+00014  * ---------------------------------------------------
+00015  */
+00016 
+00017 
+00018 #ifndef __PLUGIN_H
+00019 #define __PLUGIN_H
+00020 
+00021 // log levels
+00022 
+00023 #define DEBUG 10
+00024 #define VERBOSE 20
+00025 #define DEFAULT 30
+00026 #define SPARSE 40
+00027 #define NONE 50
+00028 
+00029 // used with OnExtendedMode() method of modules
+00030 
+00031 #define MT_CHANNEL 1
+00032 #define MT_CLIENT 2
+00033 #define MT_SERVER 3
+00034 
+00035 // used with OnAccessCheck() method of modules
+00036 
+00037 #define ACR_DEFAULT 0           // Do default action (act as if the module isnt even loaded)
+00038 #define ACR_DENY 1              // deny the action
+00039 #define ACR_ALLOW 2             // allow the action
 00040 
-00041 #include "dynamic.h"
-00042 #include "base.h"
-00043 #include "ctables.h"
-00044 #include <string>
-00045 #include <deque>
-00046 #include <sstream>
-00047 
-00050 typedef std::deque<std::string> file_cache;
-00051 typedef file_cache string_list;
-00052 
-00055 typedef std::deque<userrec*> chanuserlist;
-00056 
+00041 #define AC_KICK 0               // a user is being kicked
+00042 #define AC_DEOP 1               // a user is being deopped
+00043 #define AC_OP 2                 // a user is being opped
+00044 #define AC_VOICE 3              // a user is being voiced
+00045 #define AC_DEVOICE 4            // a user is being devoiced
+00046 #define AC_HALFOP 5             // a user is being halfopped
+00047 #define AC_DEHALFOP 6           // a user is being dehalfopped
+00048 #define AC_INVITE 7             // a user is being invited
+00049 #define AC_GENERAL_MODE 8       // a user channel mode is being changed
+00050 
+00051 #include "dynamic.h"
+00052 #include "base.h"
+00053 #include "ctables.h"
+00054 #include <string>
+00055 #include <deque>
+00056 #include <sstream>
 00057 
-00058 // This #define allows us to call a method in all
-00059 // loaded modules in a readable simple way, e.g.:
-00060 // 'FOREACH_MOD OnConnect(user);'
-00061 
-00062 #define FOREACH_MOD for (int i = 0; i <= MODCOUNT; i++) modules[i]->
-00063 
-00064 // This define is similar to the one above but returns a result in MOD_RESULT.
-00065 // The first module to return a nonzero result is the value to be accepted,
-00066 // and any modules after are ignored.
+00060 typedef std::deque<std::string> file_cache;
+00061 typedef file_cache string_list;
+00062 
+00065 typedef std::deque<userrec*> chanuserlist;
+00066 
 00067 
-00068 // *********************************************************************************************
-00069 
-00070 #define FOREACH_RESULT(x) { MOD_RESULT = 0; \
-00071                         for (int i = 0; i <= MODCOUNT; i++) { \
-00072                         int res = modules[i]->x ; \
-00073                         if (res != 0) { \
-00074                                 MOD_RESULT = res; \
-00075                                 break; \
-00076                         } \
-00077                 } \
-00078         } 
-00079    
-00080 // *********************************************************************************************
-00081 
-00082 extern void createcommand(char* cmd, handlerfunc f, char flags, int minparams);
-00083 extern void server_mode(char **parameters, int pcnt, userrec *user);
-00084 
-00085 // class Version holds the version information of a Module, returned
-00086 // by Module::GetVersion (thanks RD)
-00087 
-00092 class Version : public classbase
-00093 {
-00094  public:
-00095          const int Major, Minor, Revision, Build;
-00096          Version(int major, int minor, int revision, int build);
-00097 };
-00098 
-00104 class Admin : public classbase
-00105 {
-00106  public:
-00107          const std::string Name, Email, Nick;
-00108          Admin(std::string name, std::string email, std::string nick);
-00109 };
-00110 
-00116 class Module : public classbase
-00117 {
-00118  public:
-00119 
-00123         Module();
-00124 
-00128         virtual ~Module();
+00068 // This #define allows us to call a method in all
+00069 // loaded modules in a readable simple way, e.g.:
+00070 // 'FOREACH_MOD OnConnect(user);'
+00071 
+00072 #define FOREACH_MOD for (int i = 0; i <= MODCOUNT; i++) modules[i]->
+00073 
+00074 // This define is similar to the one above but returns a result in MOD_RESULT.
+00075 // The first module to return a nonzero result is the value to be accepted,
+00076 // and any modules after are ignored.
+00077 
+00078 // *********************************************************************************************
+00079 
+00080 #define FOREACH_RESULT(x) { MOD_RESULT = 0; \
+00081                         for (int i = 0; i <= MODCOUNT; i++) { \
+00082                         int res = modules[i]->x ; \
+00083                         if (res != 0) { \
+00084                                 MOD_RESULT = res; \
+00085                                 break; \
+00086                         } \
+00087                 } \
+00088         } 
+00089    
+00090 // *********************************************************************************************
+00091 
+00092 extern void createcommand(char* cmd, handlerfunc f, char flags, int minparams);
+00093 extern void server_mode(char **parameters, int pcnt, userrec *user);
+00094 
+00095 // class Version holds the version information of a Module, returned
+00096 // by Module::GetVersion (thanks RD)
+00097 
+00102 class Version : public classbase
+00103 {
+00104  public:
+00105          const int Major, Minor, Revision, Build;
+00106          Version(int major, int minor, int revision, int build);
+00107 };
+00108 
+00114 class Admin : public classbase
+00115 {
+00116  public:
+00117          const std::string Name, Email, Nick;
+00118          Admin(std::string name, std::string email, std::string nick);
+00119 };
+00120 
+00126 class Module : public classbase
+00127 {
+00128  public:
 00129 
-00134         virtual Version GetVersion();
-00135 
-00139         virtual void OnUserConnect(userrec* user);
-00140 
-00144         virtual void OnUserQuit(userrec* user);
+00133         Module();
+00134 
+00138         virtual ~Module();
+00139 
+00144         virtual Version GetVersion();
 00145 
-00150         virtual void OnUserJoin(userrec* user, chanrec* channel);
-00151 
-00156         virtual void OnUserPart(userrec* user, chanrec* channel);
-00157 
-00164         virtual void OnPacketTransmit(char *p);
-00165 
-00173         virtual void OnPacketReceive(char *p);
-00174 
-00180         virtual void OnRehash();
-00181 
-00190         virtual void OnServerRaw(std::string &raw, bool inbound, userrec* user);
+00149         virtual void OnUserConnect(userrec* user);
+00150 
+00154         virtual void OnUserQuit(userrec* user);
+00155 
+00160         virtual void OnUserJoin(userrec* user, chanrec* channel);
+00161 
+00166         virtual void OnUserPart(userrec* user, chanrec* channel);
+00167 
+00174         virtual void OnPacketTransmit(char *p);
+00175 
+00183         virtual void OnPacketReceive(char *p);
+00184 
+00190         virtual void OnRehash();
 00191 
-00201         virtual int OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params);
-00202         
-00216         virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname);
-00217         
-00218         
-00223         virtual void OnOper(userrec* user);
-00224         
-00233         virtual void OnInfo(userrec* user);
+00200         virtual void OnServerRaw(std::string &raw, bool inbound, userrec* user);
+00201 
+00211         virtual int OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params);
+00212         
+00226         virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname);
+00227         
+00228         
+00233         virtual void OnOper(userrec* user);
 00234         
-00239         virtual void OnWhois(userrec* source, userrec* dest);
-00240         
-00249         virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string text);
-00250 
-00259         virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string text);
-00260         
-00268         virtual int OnUserPreNick(userrec* user, std::string newnick);
-00269         
-00292         virtual int OnAccessCheck(userrec* source,userrec* dest,chanrec* channel,int access_type);
-00298         virtual string_list OnUserSync(userrec* user);
-00299 
-00305         virtual string_list OnChannelSync(chanrec* chan);
-00306 };
-00307 
-00308 
-00314 class Server : public classbase
-00315 {
-00316  public:
-00320         Server();
-00324         virtual ~Server();
-00325 
-00329         virtual void SendOpers(std::string s);
-00334         virtual void Log(int level, std::string s);
-00339         virtual void Send(int Socket, std::string s);
-00344         virtual void SendServ(int Socket, std::string s);
-00349         virtual void SendFrom(int Socket, userrec* User, std::string s);
-00364         virtual void SendTo(userrec* Source, userrec* Dest, std::string s);
-00371         virtual void SendChannel(userrec* User, chanrec* Channel, std::string s,bool IncludeSender);
-00376         virtual bool CommonChannels(userrec* u1, userrec* u2);
-00384         virtual void SendCommon(userrec* User, std::string text,bool IncludeSender);
-00389         virtual void SendWallops(userrec* User, std::string text);
-00390 
-00394         virtual bool IsNick(std::string nick);
-00398         virtual int CountUsers(chanrec* c);
-00402         virtual userrec* FindNick(std::string nick);
-00406         virtual chanrec* FindChannel(std::string channel);
-00411         virtual std::string ChanMode(userrec* User, chanrec* Chan);
-00415         virtual bool IsOnChannel(userrec* User, chanrec* Chan);
-00418         virtual std::string GetServerName();
-00421         virtual std::string GetNetworkName();
-00427         virtual Admin GetAdmin();
-00446         virtual bool AddExtendedMode(char modechar, int type, bool requires_oper, int params_when_on, int params_when_off);
-00447 
-00469         virtual bool AddExtendedListMode(char modechar);
-00470         
-00485         virtual void AddCommand(char* cmd, handlerfunc f, char flags, int minparams);
-00486          
-00508         virtual void SendMode(char **parameters, int pcnt, userrec *user);
-00509         
-00522         virtual void SendToModeMask(std::string modes, int flags, std::string text);
-00523 
-00529         virtual chanrec* JoinUserToChannel(userrec* user, std::string cname, std::string key);
-00530         
-00536         virtual chanrec* PartUserFromChannel(userrec* user, std::string cname, std::string reason);
-00537         
-00543         virtual void ChangeUserNick(userrec* user, std::string nickname);
-00544         
-00555         virtual void QuitUser(userrec* user, std::string reason);
-00556         
-00561         virtual bool MatchText(std::string sliteral, std::string spattern);
-00562         
-00574         virtual void CallCommandHandler(std::string commandname, char** parameters, int pcnt, userrec* user);
-00575         
-00581         virtual void ChangeHost(userrec* user, std::string host);
-00582         
-00588         virtual void ChangeGECOS(userrec* user, std::string gecos);
-00589         
-00598         virtual bool IsUlined(std::string server);
-00599         
-00603         virtual chanuserlist GetUsers(chanrec* chan);
-00604 
-00605 };
-00606 
-00607 #define CONF_NOT_A_NUMBER       0x000010
-00608 #define CONF_NOT_UNSIGNED       0x000080
-00609 #define CONF_VALUE_NOT_FOUND    0x000100
-00610 #define CONF_FILE_NOT_FOUND     0x000200
-00611 
-00618 class ConfigReader : public classbase
-00619 {
-00620   protected:
-00626         std::stringstream *cache;
-00629         bool readerror;
-00630         long error;
-00631         
-00632   public:
-00637         ConfigReader();                 // default constructor reads ircd.conf
-00641         ConfigReader(std::string filename);     // read a module-specific config
-00645         ~ConfigReader();
-00650         std::string ReadValue(std::string tag, std::string name, int index);
-00656         bool ReadFlag(std::string tag, std::string name, int index);
-00665         long ReadInteger(std::string tag, std::string name, int index, bool needs_unsigned);
-00670         long GetError();
-00677         int Enumerate(std::string tag);
-00682         bool Verify();
-00683 
-00689         int EnumerateValues(std::string tag, int index);
-00690 };
-00691 
-00692 
-00693 
-00699 class FileReader : public classbase
-00700 {
-00701  file_cache fc;
-00702  public:
-00707          FileReader();
-00708 
-00714          FileReader(std::string filename);
-00715 
-00719          ~FileReader();
-00720 
-00726          void LoadFile(std::string filename);
-00727 
-00731          bool Exists();
-00732          
-00737          std::string GetLine(int x);
-00738 
-00744          int FileSize();
-00745 };
+00243         virtual void OnInfo(userrec* user);
+00244         
+00249         virtual void OnWhois(userrec* source, userrec* dest);
+00250         
+00256         virtual int OnUserPreInvite(userrec* source,userrec* dest,chanrec* channel);
+00257         
+00266         virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text);
+00267 
+00279         virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text);
+00280         
+00291         virtual int OnUserPreNick(userrec* user, std::string newnick);
+00292         
+00314         virtual int OnAccessCheck(userrec* source,userrec* dest,chanrec* channel,int access_type);
+00315 
+00321         virtual string_list OnUserSync(userrec* user);
+00322 
+00328         virtual string_list OnChannelSync(chanrec* chan);
+00329 };
+00330 
+00331 
+00337 class Server : public classbase
+00338 {
+00339  public:
+00343         Server();
+00347         virtual ~Server();
+00348 
+00352         virtual void SendOpers(std::string s);
+00357         virtual void Log(int level, std::string s);
+00362         virtual void Send(int Socket, std::string s);
+00367         virtual void SendServ(int Socket, std::string s);
+00372         virtual void SendFrom(int Socket, userrec* User, std::string s);
+00387         virtual void SendTo(userrec* Source, userrec* Dest, std::string s);
+00394         virtual void SendChannel(userrec* User, chanrec* Channel, std::string s,bool IncludeSender);
+00399         virtual bool CommonChannels(userrec* u1, userrec* u2);
+00407         virtual void SendCommon(userrec* User, std::string text,bool IncludeSender);
+00412         virtual void SendWallops(userrec* User, std::string text);
+00413 
+00417         virtual bool IsNick(std::string nick);
+00421         virtual int CountUsers(chanrec* c);
+00425         virtual userrec* FindNick(std::string nick);
+00429         virtual chanrec* FindChannel(std::string channel);
+00434         virtual std::string ChanMode(userrec* User, chanrec* Chan);
+00438         virtual bool IsOnChannel(userrec* User, chanrec* Chan);
+00441         virtual std::string GetServerName();
+00444         virtual std::string GetNetworkName();
+00450         virtual Admin GetAdmin();
+00469         virtual bool AddExtendedMode(char modechar, int type, bool requires_oper, int params_when_on, int params_when_off);
+00470 
+00492         virtual bool AddExtendedListMode(char modechar);
+00493         
+00508         virtual void AddCommand(char* cmd, handlerfunc f, char flags, int minparams);
+00509          
+00531         virtual void SendMode(char **parameters, int pcnt, userrec *user);
+00532         
+00545         virtual void SendToModeMask(std::string modes, int flags, std::string text);
+00546 
+00552         virtual chanrec* JoinUserToChannel(userrec* user, std::string cname, std::string key);
+00553         
+00559         virtual chanrec* PartUserFromChannel(userrec* user, std::string cname, std::string reason);
+00560         
+00566         virtual void ChangeUserNick(userrec* user, std::string nickname);
+00567         
+00578         virtual void QuitUser(userrec* user, std::string reason);
+00579         
+00584         virtual bool MatchText(std::string sliteral, std::string spattern);
+00585         
+00597         virtual void CallCommandHandler(std::string commandname, char** parameters, int pcnt, userrec* user);
+00598         
+00604         virtual void ChangeHost(userrec* user, std::string host);
+00605         
+00611         virtual void ChangeGECOS(userrec* user, std::string gecos);
+00612         
+00621         virtual bool IsUlined(std::string server);
+00622         
+00626         virtual chanuserlist GetUsers(chanrec* chan);
+00627 
+00628 };
+00629 
+00630 #define CONF_NOT_A_NUMBER       0x000010
+00631 #define CONF_NOT_UNSIGNED       0x000080
+00632 #define CONF_VALUE_NOT_FOUND    0x000100
+00633 #define CONF_FILE_NOT_FOUND     0x000200
+00634 
+00641 class ConfigReader : public classbase
+00642 {
+00643   protected:
+00649         std::stringstream *cache;
+00650         std::stringstream *errorlog;
+00653         bool readerror;
+00654         long error;
+00655         
+00656   public:
+00661         ConfigReader();                 // default constructor reads ircd.conf
+00665         ConfigReader(std::string filename);     // read a module-specific config
+00669         ~ConfigReader();
+00674         std::string ReadValue(std::string tag, std::string name, int index);
+00680         bool ReadFlag(std::string tag, std::string name, int index);
+00689         long ReadInteger(std::string tag, std::string name, int index, bool needs_unsigned);
+00694         long GetError();
+00701         int Enumerate(std::string tag);
+00706         bool Verify();
+00713         void DumpErrors(bool bail,userrec* user);
+00714 
+00720         int EnumerateValues(std::string tag, int index);
+00721 };
+00722 
+00723 
+00724 
+00730 class FileReader : public classbase
+00731 {
+00732  file_cache fc;
+00733  public:
+00738          FileReader();
+00739 
+00745          FileReader(std::string filename);
 00746 
-00747 
-00754 class ModuleFactory : public classbase
-00755 {
-00756  public:
-00757         ModuleFactory() { }
-00758         virtual ~ModuleFactory() { }
-00763         virtual Module * CreateModule() = 0;
-00764 };
-00765 
-00766 
-00767 typedef DLLFactory<ModuleFactory> ircd_module;
-00768 
-00769 #endif
-

Generated on Sun May 2 00:09:18 2004 for InspIRCd by +00750 ~FileReader(); +00751 +00757 void LoadFile(std::string filename); +00758 +00762 bool Exists(); +00763 +00768 std::string GetLine(int x); +00769 +00775 int FileSize(); +00776 }; +00777 +00778 +00785 class ModuleFactory : public classbase +00786 { +00787 public: +00788 ModuleFactory() { } +00789 virtual ~ModuleFactory() { } +00794 virtual Module * CreateModule() = 0; +00795 }; +00796 +00797 +00798 typedef DLLFactory<ModuleFactory> ircd_module; +00799 +00800 #endif +

Generated on Fri Mar 25 03:49:28 2005 for InspIRCd by -doxygen1.3-rc3
+doxygen +1.3.3 -- cgit v1.2.3