From a753fb1bc711e10794e939e424f3cdd703116d82 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 2 Apr 2004 12:38:41 +0000 Subject: Added support for modules to create commands - this needs a proof-of-concept module yet, do not use unless you like to live dangerously. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@351 e03df62e-2008-0410-955e-edbf42e46eb7 --- docs/module-doc/annotated.html | 3 +- docs/module-doc/base_8h-source.html | 2 +- docs/module-doc/base_8h.html | 21 +- docs/module-doc/base_8h__dep__incl.gif | Bin 11505 -> 14070 bytes docs/module-doc/channels_8h-source.html | 75 ++-- docs/module-doc/channels_8h.html | 29 +- docs/module-doc/channels_8h__dep__incl.gif | Bin 3274 -> 4865 bytes docs/module-doc/classAdmin-members.html | 4 +- docs/module-doc/classAdmin.html | 34 +- docs/module-doc/classAdmin__coll__graph.gif | Bin 5479 -> 5108 bytes docs/module-doc/classBanItem-members.html | 2 +- docs/module-doc/classBanItem.html | 2 +- docs/module-doc/classConfigReader-members.html | 8 +- docs/module-doc/classConfigReader.html | 81 ++-- docs/module-doc/classConnectClass-members.html | 2 +- docs/module-doc/classConnectClass.html | 2 +- docs/module-doc/classExemptItem-members.html | 2 +- docs/module-doc/classExemptItem.html | 2 +- docs/module-doc/classFileReader-members.html | 11 +- docs/module-doc/classFileReader.html | 151 ++++--- docs/module-doc/classHostItem-members.html | 2 +- docs/module-doc/classHostItem.html | 2 +- docs/module-doc/classInviteItem-members.html | 2 +- docs/module-doc/classInviteItem.html | 2 +- docs/module-doc/classInvited-members.html | 2 +- docs/module-doc/classInvited.html | 4 +- docs/module-doc/classModule-members.html | 5 +- docs/module-doc/classModule.html | 128 ++++-- docs/module-doc/classModuleFactory-members.html | 2 +- docs/module-doc/classModuleFactory.html | 12 +- docs/module-doc/classServer-members.html | 28 +- docs/module-doc/classServer.html | 376 +++++++++++------ docs/module-doc/classVersion-members.html | 2 +- docs/module-doc/classVersion.html | 16 +- docs/module-doc/classchanrec-members.html | 8 +- docs/module-doc/classchanrec.html | 183 +++++++-- docs/module-doc/classclassbase-members.html | 2 +- docs/module-doc/classclassbase.html | 2 +- docs/module-doc/classcommand__t-members.html | 2 +- docs/module-doc/classcommand__t.html | 2 +- docs/module-doc/classconnection-members.html | 7 +- docs/module-doc/classconnection.html | 79 +++- docs/module-doc/classconnection__coll__graph.gif | Bin 17694 -> 18868 bytes docs/module-doc/classes.html | 20 +- docs/module-doc/classpacket-members.html | 2 +- docs/module-doc/classpacket.html | 10 +- docs/module-doc/classserverrec-members.html | 7 +- docs/module-doc/classserverrec.html | 8 +- docs/module-doc/classserverrec__coll__graph.gif | Bin 19463 -> 20871 bytes docs/module-doc/classucrec-members.html | 2 +- docs/module-doc/classucrec.html | 16 +- docs/module-doc/classuserrec-members.html | 7 +- docs/module-doc/classuserrec.html | 61 +-- docs/module-doc/classuserrec__coll__graph.gif | Bin 12076 -> 12762 bytes docs/module-doc/connection_8h-source.html | 102 ++--- docs/module-doc/connection_8h.html | 29 +- docs/module-doc/connection_8h__incl.gif | Bin 18703 -> 18700 bytes docs/module-doc/ctables_8h-source.html | 2 +- docs/module-doc/ctables_8h.html | 9 +- docs/module-doc/files.html | 3 +- docs/module-doc/functions.html | 64 +-- docs/module-doc/globals.html | 47 ++- docs/module-doc/graph_legend.html | 2 +- docs/module-doc/hierarchy.html | 3 +- docs/module-doc/inherits.html | 6 +- docs/module-doc/main.html | 2 +- docs/module-doc/modules_8cpp-source.html | 501 +++++++++++++---------- docs/module-doc/modules_8cpp.html | 343 +++++++++++++++- docs/module-doc/modules_8cpp__incl.gif | Bin 12522 -> 17145 bytes docs/module-doc/modules_8h-source.html | 260 ++++++------ docs/module-doc/modules_8h.html | 187 ++++++++- docs/module-doc/modules_8h__incl.gif | Bin 6704 -> 10354 bytes docs/module-doc/servers_8cpp-source.html | 4 +- docs/module-doc/servers_8cpp.html | 4 +- docs/module-doc/servers_8cpp__incl.gif | Bin 13482 -> 13464 bytes docs/module-doc/servers_8h-source.html | 10 +- docs/module-doc/servers_8h.html | 33 +- docs/module-doc/servers_8h__incl.gif | Bin 6714 -> 6654 bytes docs/module-doc/tree.html | 45 +- docs/module-doc/users_8cpp-source.html | 57 +-- docs/module-doc/users_8cpp.html | 2 +- docs/module-doc/users_8h-source.html | 6 +- docs/module-doc/users_8h.html | 10 +- include/modules.h | 19 + src/InspIRCd.layout | 36 +- src/inspircd.cpp | 68 ++- src/modules.cpp | 16 +- 87 files changed, 2195 insertions(+), 1107 deletions(-) diff --git a/docs/module-doc/annotated.html b/docs/module-doc/annotated.html index 9879d9358..ed5abbe31 100644 --- a/docs/module-doc/annotated.html +++ b/docs/module-doc/annotated.html @@ -16,6 +16,7 @@ ConnectClassHolds information relevent to <connect allow> and <connect deny> tags in the config file connection ExemptItemA subclass of HostItem designed to hold channel exempts (+e) + ExtMode FileReaderCaches a text file into memory and can be used to retrieve lines from it HostItemHolds an entry for a ban list, exemption list, or invite list InvitedHolds a channel name to which a user has been invited @@ -29,7 +30,7 @@ userrecHolds all information about a user This class stores all information about a user connected to the irc server VersionHolds a module's Version information The four members (set by the constructor only) indicate details as to the version number of a module -
Generated on Sun Mar 30 19:35:25 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:33 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/base_8h-source.html b/docs/module-doc/base_8h-source.html index e9446e8fa..469f7da72 100644 --- a/docs/module-doc/base_8h-source.html +++ b/docs/module-doc/base_8h-source.html @@ -29,7 +29,7 @@ 00028 00029 #endif 00030 -
Generated on Sun Mar 30 19:34:53 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:27 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/base_8h.html b/docs/module-doc/base_8h.html index 21d927c07..bdf85e41f 100644 --- a/docs/module-doc/base_8h.html +++ b/docs/module-doc/base_8h.html @@ -15,15 +15,16 @@ Include dependency graph for base.h:

This graph shows which files directly or indirectly include this file:

Included by dependency graph
- - - - - - - - - + + + + + + + + + +

@@ -33,7 +34,7 @@ This graph shows which files directly or indirectly include this file:

class  classbase  The base class for all inspircd classes. More...

-
Generated on Sun Mar 30 19:34:59 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:28 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/base_8h__dep__incl.gif b/docs/module-doc/base_8h__dep__incl.gif index 45c01e127..bdb0299db 100644 Binary files a/docs/module-doc/base_8h__dep__incl.gif and b/docs/module-doc/base_8h__dep__incl.gif differ diff --git a/docs/module-doc/channels_8h-source.html b/docs/module-doc/channels_8h-source.html index b4c35f4a8..412803c9b 100644 --- a/docs/module-doc/channels_8h-source.html +++ b/docs/module-doc/channels_8h-source.html @@ -50,11 +50,11 @@ 00051 }; 00052 00053 -00056 typedef vector<BanItem> BanList; +00056 typedef std::vector<BanItem> BanList; 00057 -00060 typedef vector<ExemptItem> ExemptList; +00060 typedef std::vector<ExemptItem> ExemptList; 00061 -00064 typedef vector<InviteItem> InviteList; +00064 typedef std::vector<InviteItem> InviteList; 00065 00070 class chanrec : public classbase 00071 { @@ -84,43 +84,38 @@ 00131 00134 BanList bans; 00135 -00138 chanrec() -00139 { -00140 strcpy(name,""); -00141 strcpy(custom_modes,""); -00142 strcpy(topic,""); -00143 strcpy(setby,""); -00144 strcpy(key,""); -00145 created = topicset = limit = 0; -00146 topiclock = noexternal = inviteonly = moderated = secret = c_private = false; -00147 } -00148 -00149 virtual ~chanrec() { /* stub */ } -00150 }; -00151 -00152 /* used to hold a channel and a users modes on that channel, e.g. +v, +h, +o -00153 * needs to come AFTER struct chanrec */ -00154 -00155 #define UCMODE_OP 1 -00156 #define UCMODE_VOICE 2 -00157 #define UCMODE_HOP 4 -00158 #define UCMODE_PROTECT 8 -00159 #define UCMODE_FOUNDER 16 -00160 -00166 class ucrec : public classbase -00167 { -00168 public: -00172 long uc_modes; -00173 -00177 chanrec *channel; -00178 -00179 ucrec() { /* stub */ } -00180 virtual ~ucrec() { /* stub */ } -00181 }; -00182 -00183 #endif -00184 -
Generated on Sun Mar 30 19:34:53 2003 for InspIRCd by +00138 void SetCustomMode(char mode,bool mode_on); +00139 +00142 void SetCustomModeParam(char mode,char* parameter,bool mode_on); +00143 +00146 chanrec(); +00147 +00148 virtual ~chanrec() { /* stub */ } +00149 }; +00150 +00151 /* used to hold a channel and a users modes on that channel, e.g. +v, +h, +o +00152 * needs to come AFTER struct chanrec */ +00153 +00154 #define UCMODE_OP 1 +00155 #define UCMODE_VOICE 2 +00156 #define UCMODE_HOP 4 +00157 #define UCMODE_PROTECT 8 +00158 #define UCMODE_FOUNDER 16 +00159 +00165 class ucrec : public classbase +00166 { +00167 public: +00171 long uc_modes; +00172 +00176 chanrec *channel; +00177 +00178 ucrec() { /* stub */ } +00179 virtual ~ucrec() { /* stub */ } +00180 }; +00181 +00182 #endif +00183 +
Generated on Fri Apr 2 13:37:27 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/channels_8h.html b/docs/module-doc/channels_8h.html index a405b8b44..a3666bb59 100644 --- a/docs/module-doc/channels_8h.html +++ b/docs/module-doc/channels_8h.html @@ -20,8 +20,9 @@ Include dependency graph for channels.h:

Included by dependency graph
- - + + +

@@ -47,11 +48,11 @@ This graph shows which files directly or indirectly include this file:

#define UCMODE_PROTECT   8 #define UCMODE_FOUNDER   16

Typedefs

-typedef vector< BanItemBanList +typedef std::vector< BanItemBanList  Holds a complete ban list.

-typedef vector< ExemptItemExemptList +typedef std::vector< ExemptItemExemptList  Holds a complete exempt list.

-typedef vector< InviteItemInviteList +typedef std::vector< InviteItemInviteList  Holds a complete invite list.


Define Documentation

@@ -76,7 +77,7 @@ This graph shows which files directly or indirectly include this file:

-Definition at line 159 of file channels.h. +Definition at line 158 of file channels.h.

@@ -100,7 +101,7 @@ Definition at line 159 o

-Definition at line 157 of file channels.h. +Definition at line 156 of file channels.h.

@@ -124,7 +125,7 @@ Definition at line 157 o

-Definition at line 155 of file channels.h. +Definition at line 154 of file channels.h.

@@ -148,7 +149,7 @@ Definition at line 155 o

-Definition at line 158 of file channels.h. +Definition at line 157 of file channels.h.

@@ -172,7 +173,7 @@ Definition at line 158 o

-Definition at line 156 of file channels.h. +Definition at line 155 of file channels.h.


Typedef Documentation

@@ -182,7 +183,7 @@ Definition at line 156 o -
typedef vector<BanItem> BanList + typedef std::vector<BanItem> BanList
@@ -208,7 +209,7 @@ Definition at line 56 of -
typedef vector<ExemptItem> ExemptList + typedef std::vector<ExemptItem> ExemptList
@@ -234,7 +235,7 @@ Definition at line 60 of -
typedef vector<InviteItem> InviteList + typedef std::vector<InviteItem> InviteList
@@ -254,7 +255,7 @@ Holds a complete invite list. Definition at line 64 of file channels.h. -
Generated on Sun Mar 30 19:35:02 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:29 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/channels_8h__dep__incl.gif b/docs/module-doc/channels_8h__dep__incl.gif index 5da863d58..ebb5cea13 100644 Binary files a/docs/module-doc/channels_8h__dep__incl.gif and b/docs/module-doc/channels_8h__dep__incl.gif differ diff --git a/docs/module-doc/classAdmin-members.html b/docs/module-doc/classAdmin-members.html index 71c622652..c0fb96fe9 100644 --- a/docs/module-doc/classAdmin-members.html +++ b/docs/module-doc/classAdmin-members.html @@ -7,14 +7,14 @@
Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Admin Member List

This is the complete list of members for Admin, including all inherited members. - + -
Admin(string name, string email, string nick)Admin
Admin(std::string name, std::string email, std::string nick)Admin
ageclassbase
classbase()classbase [inline]
EmailAdmin
NameAdmin
NickAdmin
~classbase()classbase [inline]

Generated on Sun Mar 30 19:35:28 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:34 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classAdmin.html b/docs/module-doc/classAdmin.html index f4a52be04..44b91c229 100644 --- a/docs/module-doc/classAdmin.html +++ b/docs/module-doc/classAdmin.html @@ -22,11 +22,11 @@ Inheritance diagram for Admin:

[legend]
List of all members. - + - - - + + +

Public Member Functions

 Admin (string name, string email, string nick)
 Admin (std::string name, std::string email, std::string nick)

Public Attributes

const string Name
const string Email
const string Nick
const std::string Name
const std::string Email
const std::string Nick

Detailed Description

Holds /ADMIN data This class contains the admin details of the local server. @@ -35,7 +35,7 @@ It is constructed by class Server, and

-Definition at line 53 of file modules.h.


Constructor & Destructor Documentation

+Definition at line 59 of file modules.h.

Constructor & Destructor Documentation

@@ -44,19 +44,19 @@ Definition at line 53 of - + - + - + @@ -79,9 +79,9 @@ Definition at line 53 of

-Definition at line 20 of file modules.cpp. +Definition at line 86 of file modules.cpp.

-

00020 : Name(name), Email(email), Nick(nick) { };
+
00086 : Name(name), Email(email), Nick(nick) { };
 
Admin::Admin string std::string    name,
string std::string    email,
string std::string    nick
@@ -92,7 +92,7 @@ Definition at line 20 o -
const string Admin::Email + const std::string Admin::Email
@@ -107,7 +107,7 @@ Definition at line 20 o

-Definition at line 56 of file modules.h. +Definition at line 62 of file modules.h.

@@ -116,7 +116,7 @@ Definition at line 56 of -
const string Admin::Name + const std::string Admin::Name
@@ -131,7 +131,7 @@ Definition at line 56 of

-Definition at line 56 of file modules.h. +Definition at line 62 of file modules.h.

@@ -140,7 +140,7 @@ Definition at line 56 of -
const string Admin::Nick + const std::string Admin::Nick
@@ -155,12 +155,12 @@ Definition at line 56 of

-Definition at line 56 of file modules.h. +Definition at line 62 of file modules.h.


The documentation for this class was generated from the following files: -
Generated on Sun Mar 30 19:35:28 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:34 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classAdmin__coll__graph.gif b/docs/module-doc/classAdmin__coll__graph.gif index e44815fb6..01f5cffd2 100644 Binary files a/docs/module-doc/classAdmin__coll__graph.gif and b/docs/module-doc/classAdmin__coll__graph.gif differ diff --git a/docs/module-doc/classBanItem-members.html b/docs/module-doc/classBanItem-members.html index ea7414c7a..3d73df95c 100644 --- a/docs/module-doc/classBanItem-members.html +++ b/docs/module-doc/classBanItem-members.html @@ -15,7 +15,7 @@ set_timeHostItem ~classbase()classbase [inline] ~HostItem()HostItem [inline, virtual] -
Generated on Sun Mar 30 19:35:31 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:34 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classBanItem.html b/docs/module-doc/classBanItem.html index d039e35e7..a8f3bef9f 100644 --- a/docs/module-doc/classBanItem.html +++ b/docs/module-doc/classBanItem.html @@ -31,7 +31,7 @@ A subclass of HostItem designed to h

Definition at line 33 of file channels.h.


The documentation for this class was generated from the following file: -
Generated on Sun Mar 30 19:35:31 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:34 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classConfigReader-members.html b/docs/module-doc/classConfigReader-members.html index 156ff1475..856781c26 100644 --- a/docs/module-doc/classConfigReader-members.html +++ b/docs/module-doc/classConfigReader-members.html @@ -10,14 +10,14 @@ ageclassbase classbase()classbase [inline] ConfigReader()ConfigReader - ConfigReader(string filename)ConfigReader - Enumerate(string tag)ConfigReader + ConfigReader(std::string filename)ConfigReader + Enumerate(std::string tag)ConfigReader fnameConfigReader [protected] - ReadValue(string tag, string name, int index)ConfigReader + ReadValue(std::string tag, std::string name, int index)ConfigReader Verify()ConfigReader ~classbase()classbase [inline] ~ConfigReader()ConfigReader -
Generated on Sun Mar 30 19:35:47 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:37 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classConfigReader.html b/docs/module-doc/classConfigReader.html index 7858c077e..5fb1368d4 100644 --- a/docs/module-doc/classConfigReader.html +++ b/docs/module-doc/classConfigReader.html @@ -24,18 +24,18 @@ Inheritance diagram for ConfigReader:

ConfigReader ()  Default constructor.

ConfigReader (string filename) + ConfigReader (std::string filename)  Overloaded constructor.

 ~ConfigReader ()  Default destructor.

-string ReadValue (string tag, string name, int index) +std::string ReadValue (std::string tag, std::string name, int index)  Retrieves a value from the config file.

-int Enumerate (string tag) +int Enumerate (std::string tag)  Counts the number of times a given tag appears in the config file.

bool Verify ()  Returns true if a config file is valid.


Protected Attributes

-string fname +std::string fname  The filename of the configuration file, as set by the constructor.


Detailed Description

@@ -45,7 +45,7 @@ It may either be instantiated with one parameter or none. Constructing the class

-Definition at line 252 of file modules.h.


Constructor & Destructor Documentation

+Definition at line 302 of file modules.h.

Constructor & Destructor Documentation

@@ -75,13 +75,13 @@ Default constructor.

This constructor initialises the ConfigReader class to read the inspircd.conf file as specified when running ./configure.

-Definition at line 152 of file modules.cpp. +Definition at line 225 of file modules.cpp.

-References fname. +References fname.

-

00153 {
-00154         fname = CONFIG_FILE;
-00155 }
+
00226 {
+00227         fname = CONFIG_FILE;
+00228 }
 
@@ -93,7 +93,7 @@ References fname. ConfigReader::ConfigReader (  - string  + std::string    filename )  @@ -115,9 +115,9 @@ Overloaded constructor.

This constructor initialises the ConfigReader class to read a user-specified config file

-Definition at line 163 of file modules.cpp. +Definition at line 236 of file modules.cpp.

-

00163 : fname(filename) { };
+
00236 : fname(filename) { };
 
@@ -150,10 +150,10 @@ Default destructor.

This method destroys the ConfigReader class.

-Definition at line 158 of file modules.cpp. +Definition at line 231 of file modules.cpp.

-

00159 {
-00160 }
+
00232 {
+00233 }
 
@@ -166,7 +166,7 @@ Definition at line 158 int ConfigReader::Enumerate (  - string  + std::string    tag )  @@ -188,13 +188,13 @@ Counts the number of times a given tag appears in the config file.

This method counts the number of times a tag appears in a config file, for use where there are several tags of the same kind, e.g. with opers and connect types. It can be used with the index value of ConfigReader::ReadValue to loop through all copies of a multiple instance tag.

-Definition at line 174 of file modules.cpp. +Definition at line 246 of file modules.cpp.

-References fname. +References fname.

-

00175 {
-00176         return EnumConf(fname.c_str(),tag.c_str());
-00177 }
+
00247 {
+00248         return EnumConf(fname.c_str(),tag.c_str());
+00249 }
 
@@ -204,15 +204,15 @@ References fname. - + - + - + @@ -243,16 +243,15 @@ Retrieves a value from the config file.

This method retrieves a value from the config file. Where multiple copies of the tag exist in the config file, index indicates which of the values to retrieve.

-Definition at line 165 of file modules.cpp. +Definition at line 238 of file modules.cpp.

-References fname. +References fname.

-

00166 {
-00167         char val[MAXBUF];
-00168         ReadConf(fname.c_str(),tag.c_str(),name.c_str(),index,val);
-00169         string s = val;
-00170         return s;
-00171 }
+
00239 {
+00240         char val[MAXBUF];
+00241         ReadConf(fname.c_str(),tag.c_str(),name.c_str(),index,val);
+00242         return val;
+00243 }
 
string ConfigReader::ReadValue std::string ConfigReader::ReadValue string std::string    tag,
string std::string    name,
@@ -285,11 +284,11 @@ Returns true if a config file is valid.

This method is unimplemented and will always return true.

-Definition at line 180 of file modules.cpp. +Definition at line 252 of file modules.cpp.

-

00181 {
-00182         return true;
-00183 }
+
00253 {
+00254         return true;
+00255 }
 
@@ -300,7 +299,7 @@ Definition at line 180 -
string ConfigReader::fname [protected] + std::string ConfigReader::fname [protected]
@@ -317,14 +316,14 @@ The filename of the configuration file, as set by the constructor.

-Definition at line 257 of file modules.h. +Definition at line 307 of file modules.h.

-Referenced by ConfigReader(), Enumerate(), and ReadValue(). +Referenced by ConfigReader(), Enumerate(), and ReadValue().


The documentation for this class was generated from the following files: -
Generated on Sun Mar 30 19:35:47 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:37 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classConnectClass-members.html b/docs/module-doc/classConnectClass-members.html index 6aa94af03..41af98c8b 100644 --- a/docs/module-doc/classConnectClass-members.html +++ b/docs/module-doc/classConnectClass-members.html @@ -13,7 +13,7 @@ passConnectClass typeConnectClass ~classbase()classbase [inline] -
Generated on Sun Mar 30 19:35:50 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:37 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classConnectClass.html b/docs/module-doc/classConnectClass.html index e7dcf8c6e..37a3b3988 100644 --- a/docs/module-doc/classConnectClass.html +++ b/docs/module-doc/classConnectClass.html @@ -106,7 +106,7 @@ Definition at line 37 of fi
The documentation for this class was generated from the following file: -
Generated on Sun Mar 30 19:35:50 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:37 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classExemptItem-members.html b/docs/module-doc/classExemptItem-members.html index e16833939..0af329b96 100644 --- a/docs/module-doc/classExemptItem-members.html +++ b/docs/module-doc/classExemptItem-members.html @@ -15,7 +15,7 @@ set_timeHostItem ~classbase()classbase [inline] ~HostItem()HostItem [inline, virtual] -
Generated on Sun Mar 30 19:35:58 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:39 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classExemptItem.html b/docs/module-doc/classExemptItem.html index 8d9649559..74eb595da 100644 --- a/docs/module-doc/classExemptItem.html +++ b/docs/module-doc/classExemptItem.html @@ -31,7 +31,7 @@ A subclass of HostItem designed to h

Definition at line 41 of file channels.h.


The documentation for this class was generated from the following file: -
Generated on Sun Mar 30 19:35:58 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:39 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classFileReader-members.html b/docs/module-doc/classFileReader-members.html index 58b99bda6..5212798f9 100644 --- a/docs/module-doc/classFileReader-members.html +++ b/docs/module-doc/classFileReader-members.html @@ -9,15 +9,16 @@

FileReader Member List

This is the complete list of members for FileReader, including all inherited members. + - - - - + + + + -
ageclassbase
classbase()classbase [inline]
Exists()FileReader
fcFileReader [private]
FileReader()FileReader
FileReader(string filename)FileReader
FileSize()FileReader
GetLine(int x)FileReader
LoadFile(string filename)FileReader
FileReader(std::string filename)FileReader
FileSize()FileReader
GetLine(int x)FileReader
LoadFile(std::string filename)FileReader
~classbase()classbase [inline]
~FileReader()FileReader

Generated on Sun Mar 30 19:36:01 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:39 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classFileReader.html b/docs/module-doc/classFileReader.html index b60532125..d2ba2399b 100644 --- a/docs/module-doc/classFileReader.html +++ b/docs/module-doc/classFileReader.html @@ -24,18 +24,19 @@ Inheritance diagram for FileReader:

FileReader ()  Default constructor.

FileReader (string filename) + FileReader (std::string filename)  Secondary constructor.

 ~FileReader ()  Default destructor.

-void LoadFile (string filename) +void LoadFile (std::string filename)  Used to load a file.

-string GetLine (int x) +bool Exists ()  Retrieve one line from the file.

-int FileSize () - Returns the size of the file in lines.

+std::string GetLine (int x) +int FileSize () + Returns the size of the file in lines.


Private Attributes

-file_cache fc +file_cache fc

Detailed Description

Caches a text file into memory and can be used to retrieve lines from it. @@ -44,7 +45,7 @@ This class contains methods for read-only manipulation of a text file in memory.

-Definition at line 297 of file modules.h.


Constructor & Destructor Documentation

+Definition at line 347 of file modules.h.

Constructor & Destructor Documentation

@@ -74,10 +75,10 @@ Default constructor.

This method does not load any file into memory, you must use the LoadFile method after constructing the class this way.

-Definition at line 193 of file modules.cpp. +Definition at line 265 of file modules.cpp.

-

00194 {
-00195 }
+
00266 {
+00267 }
 
@@ -89,7 +90,7 @@ Definition at line 193 FileReader::FileReader (  - string  + std::string    filename )  @@ -109,17 +110,17 @@ Definition at line 193

Secondary constructor.

-This method initialises the class with a file loaded into it ready for GetLine and and other methods to be called. If the file could not be loaded, FileReader::FileSize returns 0. +This method initialises the class with a file loaded into it ready for GetLine and and other methods to be called. If the file could not be loaded, FileReader::FileSize returns 0.

-Definition at line 186 of file modules.cpp. +Definition at line 258 of file modules.cpp.

-References fc, and file_cache. +References fc, and file_cache.

-

00187 {
-00188         file_cache c;
-00189         readfile(c,filename.c_str());
-00190         this->fc = c;
-00191 }
+
00259 {
+00260         file_cache c;
+00261         readfile(c,filename.c_str());
+00262         this->fc = c;
+00263 }
 
@@ -152,15 +153,61 @@ Default destructor.

This deletes the memory allocated to the file.

-Definition at line 204 of file modules.cpp. +Definition at line 277 of file modules.cpp.

-

00205 {
-00206 }
+
00278 {
+00279 }
 

Member Function Documentation

-

+

+ + + + +
+ + + + + + + + + +
bool FileReader::Exists  
+
+ + + + + +
+   + + +

+Retrieve one line from the file. +

+This method retrieves one line from the text file. If an empty non-NULL string is returned, the index was out of bounds, or the line had no data on it. +

+Definition at line 281 of file modules.cpp. +

+References fc. +

+

00282 {
+00283         if (fc.size() == 0)
+00284         {
+00285                 return(false);
+00286         }
+00287         else
+00288         {
+00289                 return(true);
+00290         }
+00291 }
+
+

@@ -189,23 +236,23 @@ Returns the size of the file in lines.

This method returns the number of lines in the read file. If it is 0, no lines have been read into memory, either because the file is empty or it does not exist, or cannot be opened due to permission problems.

-Definition at line 215 of file modules.cpp. +Definition at line 300 of file modules.cpp.

-References fc. +References fc.

-

00216 {
-00217         return fc.size();
-00218 }
+
00301 {
+00302         return fc.size();
+00303 }
 
-

+

- + @@ -269,17 +314,17 @@ References fc.

Used to load a file.

-This method loads a file into the class ready for GetLine and and other methods to be called. If the file could not be loaded, FileReader::FileSize returns 0. +This method loads a file into the class ready for GetLine and and other methods to be called. If the file could not be loaded, FileReader::FileSize returns 0.

-Definition at line 197 of file modules.cpp. +Definition at line 269 of file modules.cpp.

-References fc, and file_cache. +References fc, and file_cache.

-

00198 {
-00199         file_cache c;
-00200         readfile(c,filename.c_str());
-00201         this->fc = c;
-00202 }
+
00270 {
+00271         file_cache c;
+00272         readfile(c,filename.c_str());
+00273         this->fc = c;
+00274 }
 
- + @@ -225,19 +272,17 @@ References fc.
string FileReader::GetLine std::string FileReader::GetLine int    x

-Retrieve one line from the file. -

-This method retrieves one line from the text file. If an empty non-NULL string is returned, the index was out of bounds, or the line had no data on it. +

-Definition at line 208 of file modules.cpp. +Definition at line 293 of file modules.cpp.

-References fc. +References fc.

-

00209 {
-00210         if ((x<0) || (x>fc.size()))
-00211                 return "";
-00212         return fc[x];
-00213 }
+
00294 {
+00295         if ((x<0) || (x>fc.size()))
+00296                 return "";
+00297         return fc[x];
+00298 }
 
@@ -249,7 +294,7 @@ References fc.
void FileReader::LoadFile string std::string    filename
@@ -290,7 +335,7 @@ References fc, and -
file_cache FileReader::fc [private] + file_cache FileReader::fc [private]
@@ -305,14 +350,14 @@ References
fc, and

-Definition at line 299 of file modules.h. +Definition at line 349 of file modules.h.

-Referenced by FileReader(), FileSize(), GetLine(), and LoadFile(). +Referenced by Exists(), FileReader(), FileSize(), GetLine(), and LoadFile().


The documentation for this class was generated from the following files: -
Generated on Sun Mar 30 19:36:00 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:39 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classHostItem-members.html b/docs/module-doc/classHostItem-members.html index acab71e65..d4cd904b3 100644 --- a/docs/module-doc/classHostItem-members.html +++ b/docs/module-doc/classHostItem-members.html @@ -15,7 +15,7 @@ set_timeHostItem ~classbase()classbase [inline] ~HostItem()HostItem [inline, virtual] -
Generated on Sun Mar 30 19:36:04 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:40 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classHostItem.html b/docs/module-doc/classHostItem.html index 7c6ae247a..d6d0bf1d9 100644 --- a/docs/module-doc/classHostItem.html +++ b/docs/module-doc/classHostItem.html @@ -181,7 +181,7 @@ Definition at line 20 of
The documentation for this class was generated from the following file: -
Generated on Sun Mar 30 19:36:04 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:40 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classInviteItem-members.html b/docs/module-doc/classInviteItem-members.html index 84b51da84..9ed7b3423 100644 --- a/docs/module-doc/classInviteItem-members.html +++ b/docs/module-doc/classInviteItem-members.html @@ -15,7 +15,7 @@ set_timeHostItem ~classbase()classbase [inline] ~HostItem()HostItem [inline, virtual] -
Generated on Sun Mar 30 19:36:10 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:41 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classInviteItem.html b/docs/module-doc/classInviteItem.html index e7c4f08d8..9975b710a 100644 --- a/docs/module-doc/classInviteItem.html +++ b/docs/module-doc/classInviteItem.html @@ -31,7 +31,7 @@ A subclass of HostItem designed to h

Definition at line 49 of file channels.h.


The documentation for this class was generated from the following file: -
Generated on Sun Mar 30 19:36:10 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:41 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classInvited-members.html b/docs/module-doc/classInvited-members.html index 6a4760eb5..767028b0b 100644 --- a/docs/module-doc/classInvited-members.html +++ b/docs/module-doc/classInvited-members.html @@ -11,7 +11,7 @@ channelInvited classbase()classbase [inline] ~classbase()classbase [inline] -
Generated on Sun Mar 30 19:36:07 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:40 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classInvited.html b/docs/module-doc/classInvited.html index 6d587ee01..b0a25c634 100644 --- a/docs/module-doc/classInvited.html +++ b/docs/module-doc/classInvited.html @@ -53,12 +53,12 @@ Definition at line 25 of fi

Definition at line 28 of file users.h.

-Referenced by userrec::InviteTo(). +Referenced by userrec::InviteTo().


The documentation for this class was generated from the following file: -
Generated on Sun Mar 30 19:36:07 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:40 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classModule-members.html b/docs/module-doc/classModule-members.html index 77d9a44b3..dbcdc378f 100644 --- a/docs/module-doc/classModule-members.html +++ b/docs/module-doc/classModule-members.html @@ -13,15 +13,16 @@ Module()Module Module::OnPacketReceive(char *p)Module [virtual] Module::OnPacketTransmit(char *p)Module [virtual] - Module::OnServerRaw(string &raw, bool inbound)Module [virtual] + OnExtendedMode(userrec *user, chanrec *chan, char modechar, int type, bool mode_on, string_list &params)Module [virtual] OnRehash()Module [virtual] + OnServerRaw(std::string &raw, bool inbound)Module [virtual] OnUserConnect(userrec *user)Module [virtual] OnUserJoin(userrec *user, chanrec *channel)Module [virtual] OnUserPart(userrec *user, chanrec *channel)Module [virtual] OnUserQuit(userrec *user)Module [virtual] ~classbase()classbase [inline] ~Module()Module [virtual] -
Generated on Sun Mar 30 19:36:13 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:42 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classModule.html b/docs/module-doc/classModule.html index 7fd4956d7..926b2a40a 100644 --- a/docs/module-doc/classModule.html +++ b/docs/module-doc/classModule.html @@ -42,8 +42,10 @@ Inheritance diagram for Module:



virtual void OnRehash ()  Called on rehash.

-virtual void Module::OnServerRaw (string &raw, bool inbound) +virtual void OnServerRaw (std::string &raw, bool inbound)  Called when a raw command is transmitted or received.

+virtual bool OnExtendedMode (userrec *user, chanrec *chan, char modechar, int type, bool mode_on, string_list &params) + Called whenever an extended mode is to be processed.


Detailed Description

Base class for all InspIRCd modules This class is the base class for InspIRCd modules. @@ -52,7 +54,7 @@ All modules must inherit from this class, its methods will be called when irc se

-Definition at line 65 of file modules.h.


Constructor & Destructor Documentation

+Definition at line 71 of file modules.h.

Constructor & Destructor Documentation

@@ -82,9 +84,9 @@ Default constructor creates a module class.

-Definition at line 27 of file modules.cpp. +Definition at line 88 of file modules.cpp.

-

00027 { }
+
00088 { }
 
@@ -117,9 +119,9 @@ Default destructor destroys a module class.

-Definition at line 28 of file modules.cpp. +Definition at line 89 of file modules.cpp.

-

00028 { }
+
00089 { }
 
@@ -153,9 +155,9 @@ Returns the version number of a Module.

The method should return a Version object with its version information assigned via Version::Version

-Definition at line 37 of file modules.cpp. +Definition at line 99 of file modules.cpp.

-

00037 { return Version(1,0,0,0); }
+
00099 { return Version(1,0,0,0); }
 
@@ -221,22 +223,46 @@ Called before a packet is transmitted across the irc network between two irc ser The packet is represented as a char*, as it should be regarded as a buffer, and not a string. This allows you to easily represent it in the correct ways to implement encryption, compression, digital signatures and anything else you may want to add. This should be regarded as a pre-processor and will be called before ANY other operations within the ircd core program. -

+

+ +
- + - - + + + + + + + + + + + + + + + + + + + + - + + + + + + + @@ -256,9 +282,14 @@ The packet is represented as a char*, as it should be regarded as a buffer, and +
00098 { }
+
virtual void Module::Module::OnServerRaw bool Module::OnExtendedMode string &   raw, userrec  user,
chanrec  chan,
char   modechar,
int   type,
bool   inbound  mode_on,
string_list  params

-Called when a raw command is transmitted or received. +Called whenever an extended mode is to be processed. +

+The type parameter is MT_SERVER, MT_CLIENT or MT_CHANNEL, dependent on where the mode is being changed. mode_on is set when the mode is being set, in which case params contains a list of parameters for the mode as strings. If mode_on is false, the mode is being removed, and parameters may contain the parameters for the mode, dependent on wether they were defined when a mode handler was set up with Server::AddExtendedMode If the mode is not a channel mode, chanrec* chan is null, and should not be read from or written to. +

+Definition at line 98 of file modules.cpp.

-This method is the lowest level of handler available to a module. It will be called with raw data which is passing through a connected socket. If you wish, you may munge this data by changing the string parameter "raw". If you do this, after your function exits it will immediately be cut down to 510 characters plus a carriage return and linefeed.

@@ -290,9 +321,54 @@ Called on rehash.

This method is called prior to a /REHASH or when a SIGHUP is received from the operating system. You should use it to reload any files so that your module keeps in step with the rest of the application.

-Definition at line 35 of file modules.cpp. +Definition at line 96 of file modules.cpp. +

+

00096 { }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void Module::OnServerRaw std::string &   raw,
bool   inbound
[virtual]
+
+ + + +
+   + + +

+Called when a raw command is transmitted or received. +

+This method is the lowest level of handler available to a module. It will be called with raw data which is passing through a connected socket. If you wish, you may munge this data by changing the string parameter "raw". If you do this, after your function exits it will immediately be cut down to 510 characters plus a carriage return and linefeed. +

+Definition at line 97 of file modules.cpp.

-

00035 { }
+
00097 { }
 
@@ -326,9 +402,9 @@ Called when a user connects.

The details of the connecting user are available to you in the parameter userrec *user

-Definition at line 29 of file modules.cpp. +Definition at line 90 of file modules.cpp.

-

00029 { }
+
00090 { }
 
@@ -371,9 +447,9 @@ Called when a user joins a channel.

The details of the joining user are available to you in the parameter userrec *user, and the details of the channel they have joined is available in the variable chanrec *channel

-Definition at line 31 of file modules.cpp. +Definition at line 92 of file modules.cpp.

-

00031 { }
+
00092 { }
 
@@ -416,9 +492,9 @@ Called when a user parts a channel.

The details of the leaving user are available to you in the parameter userrec *user, and the details of the channel they have left is available in the variable chanrec *channel

-Definition at line 32 of file modules.cpp. +Definition at line 93 of file modules.cpp.

-

00032 { }
+
00093 { }
 
@@ -452,15 +528,15 @@ Called when a user quits.

The details of the exiting user are available to you in the parameter userrec *user

-Definition at line 30 of file modules.cpp. +Definition at line 91 of file modules.cpp.

-

00030 { }
+
00091 { }
 

The documentation for this class was generated from the following files: -
Generated on Sun Mar 30 19:36:13 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:42 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classModuleFactory-members.html b/docs/module-doc/classModuleFactory-members.html index 41068ba46..a96bcad47 100644 --- a/docs/module-doc/classModuleFactory-members.html +++ b/docs/module-doc/classModuleFactory-members.html @@ -13,7 +13,7 @@ ModuleFactory()ModuleFactory [inline] ~classbase()classbase [inline] ~ModuleFactory()ModuleFactory [inline, virtual] -
Generated on Sun Mar 30 19:36:16 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:42 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classModuleFactory.html b/docs/module-doc/classModuleFactory.html index ac37d000b..bd6c71fca 100644 --- a/docs/module-doc/classModuleFactory.html +++ b/docs/module-doc/classModuleFactory.html @@ -34,7 +34,7 @@ This is to allow for modules to create many different variants of

-Definition at line 342 of file modules.h.


Constructor & Destructor Documentation

+Definition at line 393 of file modules.h.

Constructor & Destructor Documentation

@@ -62,9 +62,9 @@ Definition at line 342 of

-Definition at line 345 of file modules.h. +Definition at line 396 of file modules.h.

-

00345 { }
+
00396 { }
 
@@ -95,9 +95,9 @@ Definition at line 345 of

-Definition at line 346 of file modules.h. +Definition at line 397 of file modules.h.

-

00346 { }
+
00397 { }
 
@@ -134,7 +134,7 @@ Your inherited class of ModuleFactory must return a pointer to your modules.h -
Generated on Sun Mar 30 19:36:16 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:42 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classServer-members.html b/docs/module-doc/classServer-members.html index 66e47420d..afd500c66 100644 --- a/docs/module-doc/classServer-members.html +++ b/docs/module-doc/classServer-members.html @@ -7,29 +7,31 @@
Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Server Member List

This is the complete list of members for Server, including all inherited members. + + - - + + - - - - - - - - - - + + + + + + + + + + -
AddCommand(char *cmd, handlerfunc f, char flags, int minparams)Server [virtual]
AddExtendedMode(char modechar, int type, bool default_on, int params_when_on, int params_when_off)Server [virtual]
ageclassbase
ChanMode(userrec *User, chanrec *Chan)Server [virtual]
classbase()classbase [inline]
CommonChannels(userrec *u1, userrec *u2)Server [virtual]
FindChannel(string channel)Server [virtual]
FindNick(string nick)Server [virtual]
FindChannel(std::string channel)Server [virtual]
FindNick(std::string nick)Server [virtual]
GetAdmin()Server [virtual]
GetNetworkName()Server [virtual]
GetServerName()Server [virtual]
IsNick(string nick)Server [virtual]
Log(int level, string s)Server [virtual]
Send(int Socket, string s)Server [virtual]
SendChannel(userrec *User, chanrec *Channel, string s, bool IncludeSender)Server [virtual]
SendCommon(userrec *User, string text, bool IncludeSender)Server [virtual]
SendFrom(int Socket, userrec *User, string s)Server [virtual]
SendOpers(string s)Server [virtual]
SendServ(int Socket, string s)Server [virtual]
SendTo(userrec *Source, userrec *Dest, string s)Server [virtual]
SendWallops(userrec *User, string text)Server [virtual]
IsNick(std::string nick)Server [virtual]
Log(int level, std::string s)Server [virtual]
Send(int Socket, std::string s)Server [virtual]
SendChannel(userrec *User, chanrec *Channel, std::string s, bool IncludeSender)Server [virtual]
SendCommon(userrec *User, std::string text, bool IncludeSender)Server [virtual]
SendFrom(int Socket, userrec *User, std::string s)Server [virtual]
SendOpers(std::string s)Server [virtual]
SendServ(int Socket, std::string s)Server [virtual]
SendTo(userrec *Source, userrec *Dest, std::string s)Server [virtual]
SendWallops(userrec *User, std::string text)Server [virtual]
Server()Server
~classbase()classbase [inline]
~Server()Server [virtual]

Generated on Sun Mar 30 19:36:22 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:44 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classServer.html b/docs/module-doc/classServer.html index f9af699a5..c7b08f426 100644 --- a/docs/module-doc/classServer.html +++ b/docs/module-doc/classServer.html @@ -26,40 +26,44 @@ Inheritance diagram for Server:



virtual ~Server ()  Default destructor.

-virtual void SendOpers (string s) +virtual void SendOpers (std::string s)  Sends text to all opers.

-virtual void Log (int level, string s) +virtual void Log (int level, std::string s)  Writes a log string.

-virtual void Send (int Socket, string s) +virtual void Send (int Socket, std::string s)  Sends a line of text down a TCP/IP socket.

-virtual void SendServ (int Socket, string s) +virtual void SendServ (int Socket, std::string s)  Sends text from the server to a socket.

-virtual void SendFrom (int Socket, userrec *User, string s) +virtual void SendFrom (int Socket, userrec *User, std::string s)  Sends text from a user to a socket.

-virtual void SendTo (userrec *Source, userrec *Dest, string s) +virtual void SendTo (userrec *Source, userrec *Dest, std::string s)  Sends text from a user to another user.

-virtual void SendChannel (userrec *User, chanrec *Channel, string s, bool IncludeSender) +virtual void SendChannel (userrec *User, chanrec *Channel, std::string s, bool IncludeSender)  Sends text from a user to a channel (mulicast).

virtual bool CommonChannels (userrec *u1, userrec *u2)  Returns true if two users share a common channel.

-virtual void SendCommon (userrec *User, string text, bool IncludeSender) +virtual void SendCommon (userrec *User, std::string text, bool IncludeSender)  Sends text from a user to one or more channels (mulicast).

-virtual void SendWallops (userrec *User, string text) +virtual void SendWallops (userrec *User, std::string text)  Sends a WALLOPS message.

-virtual bool IsNick (string nick) +virtual bool IsNick (std::string nick)  Returns true if a nick is valid.

-virtual userrecFindNick (string nick) +virtual userrecFindNick (std::string nick)  Attempts to look up a nick and return a pointer to it.

-virtual chanrecFindChannel (string channel) +virtual chanrecFindChannel (std::string channel)  Attempts to look up a channel and return a pointer to it.

-virtual string ChanMode (userrec *User, chanrec *Chan) +virtual std::string ChanMode (userrec *User, chanrec *Chan)  Attempts to look up a user's privilages on a channel.

-virtual string GetServerName () +virtual std::string GetServerName ()  Returns the server name of the server where the module is loaded.

-virtual string GetNetworkName () +virtual std::string GetNetworkName ()  Returns the network name, global to all linked servers.

virtual Admin GetAdmin ()  Returns the information of the server as returned by the /ADMIN command.

+virtual bool AddExtendedMode (char modechar, int type, bool default_on, int params_when_on, int params_when_off) + Adds an extended mode letter which is parsed by a module This allows modules to add extra mode letters, e.g.

+virtual void AddCommand (char *cmd, handlerfunc f, char flags, int minparams) + Adds a command to the command table.


Detailed Description

Allows server output and query functions This class contains methods which allow a module to query the state of the irc server, and produce output to users and other servers. @@ -68,7 +72,7 @@ All modules should instantiate at least one copy of this class, and use its memb

-Definition at line 147 of file modules.h.


Constructor & Destructor Documentation

+Definition at line 163 of file modules.h.

Constructor & Destructor Documentation

@@ -98,10 +102,10 @@ Default constructor.

Creates a Server object.

-Definition at line 43 of file modules.cpp. +Definition at line 105 of file modules.cpp.

-

00044 {
-00045 }
+
00106 {
+00107 }
 
@@ -134,21 +138,148 @@ Default destructor.

Destroys a Server object.

-Definition at line 47 of file modules.cpp. +Definition at line 109 of file modules.cpp.

-

00048 {
-00049 }
+
00110 {
+00111 }
 

Member Function Documentation

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Server::AddCommand char *   cmd,
handlerfunc   f,
char   flags,
int   minparams
[virtual]
+
+ + + + + +
+   + + +

+Adds a command to the command table. +

+This allows modules to add extra commands into the command table. You must place a function within your module which is is of type handlerfunc:

+typedef void (handlerfunc) (char**, int, userrec*); ... void handle_kill(char **parameters, int pcnt, userrec *user)

+When the command is typed, the parameters will be placed into the parameters array (similar to argv) and the parameter count will be placed into pcnt (similar to argv). There will never be any less parameters than the 'minparams' value you specified when creating the command. The *user parameter is the class of the user which caused the command to trigger, who will always have the flag you specified in 'flags' when creating the initial command. For example to create an oper only command create the commands with flags='o'. +

+Definition at line 123 of file modules.cpp. +

+References createcommand(). +

+

00124 {
+00125         createcommand(cmd,f,flags,minparams);
+00126 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
bool Server::AddExtendedMode char   modechar,
int   type,
bool   default_on,
int   params_when_on,
int   params_when_off
[virtual]
+
+ + + + + +
+   + + +

+Adds an extended mode letter which is parsed by a module This allows modules to add extra mode letters, e.g. +

++x for hostcloak. the "type" parameter is either MT_CHANNEL, MT_CLIENT, or MT_SERVER, to indicate wether the mode is a channel mode, a client mode, or a server mode. default_on is true if the mode is to be applied to default connections. params_when_on is the number of modes to expect when the mode is turned on (for type MT_CHANNEL only), e.g. with mode +b, this would have a value of 1. the params_when_off value has a similar value to params_when_on, except it indicates the number of parameters to expect when the mode is disabled. Modes which act in a similar way to channel mode +l (e.g. require a parameter to enable, but not to disable) should use this parameter. The function returns false if the mode is unavailable, and will not attempt to allocate another character, as this will confuse users. This also means that as only one module can claim a specific mode character, the core does not need to keep track of which modules own which modes, which speeds up operation of the server. In this version, a mode can have at most one parameter, attempting to use more parameters will have undefined effects. +

+Definition at line 220 of file modules.cpp. +

+

00221 {
+00222 }
+

- + @@ -181,12 +312,11 @@ Attempts to look up a user's privilages on a channel.

This function will return a string containing either @, , +, or an empty string, representing the user's privilages upon the channel you specify.

-Definition at line 130 of file modules.cpp. +Definition at line 198 of file modules.cpp.

-

00131 {
-00132         string mode = cmode(User,Chan);
-00133         return mode;
-00134 }
+
00199 {
+00200         return cmode(User,Chan);
+00201 }
 
string Server::ChanMode std::string Server::ChanMode userrec   User,
@@ -229,11 +359,11 @@ Returns true if two users share a common channel.

This method is used internally by the NICK and QUIT commands, and the Server::SendCommon method.

-Definition at line 93 of file modules.cpp. +Definition at line 161 of file modules.cpp.

-

00094 {
-00095         return (common_channels(u1,u2) != 0);
-00096 }
+
00162 {
+00163         return (common_channels(u1,u2) != 0);
+00164 }
 
@@ -245,7 +375,7 @@ Definition at line 93 o chanrec * Server::FindChannel (  - string  + std::string    channel [virtual] @@ -267,11 +397,11 @@ Attempts to look up a channel and return a pointer to it.

This function will return NULL if the channel does not exist.

-Definition at line 125 of file modules.cpp. +Definition at line 193 of file modules.cpp.

-

00126 {
-00127         return FindChan(channel.c_str());
-00128 }
+
00194 {
+00195         return FindChan(channel.c_str());
+00196 }
 
@@ -283,7 +413,7 @@ Definition at line 125 userrec * Server::FindNick (  - string  + std::string    nick [virtual] @@ -305,11 +435,11 @@ Attempts to look up a nick and return a pointer to it.

This function will return NULL if the nick does not exist.

-Definition at line 120 of file modules.cpp. +Definition at line 188 of file modules.cpp.

-

00121 {
-00122         return Find(nick);
-00123 }
+
00189 {
+00190         return Find(nick);
+00191 }
 
@@ -342,11 +472,11 @@ Returns the information of the server as returned by the /ADMIN command.

See the Admin class for further information of the return value. The members Admin::Nick, Admin::Email and Admin::Name contain the information for the server where the module is loaded.

-Definition at line 146 of file modules.cpp. +Definition at line 213 of file modules.cpp.

-

00147 {
-00148         return Admin(getadminname(),getadminemail(),getadminnick());
-00149 }
+
00214 {
+00215         return Admin(getadminname(),getadminemail(),getadminnick());
+00216 }
 
@@ -356,7 +486,7 @@ Definition at line 146 - + @@ -379,11 +509,11 @@ Returns the network name, global to all linked servers.

-Definition at line 141 of file modules.cpp. +Definition at line 208 of file modules.cpp.

-

00142 {
-00143         return getnetworkname();
-00144 }
+
00209 {
+00210         return getnetworkname();
+00211 }
 
string Server::GetNetworkName std::string Server::GetNetworkName  
@@ -393,7 +523,7 @@ Definition at line 141 - + @@ -416,11 +546,11 @@ Returns the server name of the server where the module is loaded.

-Definition at line 136 of file modules.cpp. +Definition at line 203 of file modules.cpp.

-

00137 {
-00138         return getservername();
-00139 }
+
00204 {
+00205         return getservername();
+00206 }
 
string Server::GetServerName std::string Server::GetServerName  
@@ -432,7 +562,7 @@ Definition at line 136 bool Server::IsNick (  - string  + std::string    nick [virtual] @@ -454,11 +584,11 @@ Returns true if a nick is valid.

Nicks for unregistered connections will return false.

-Definition at line 115 of file modules.cpp. +Definition at line 183 of file modules.cpp.

-

00116 {
-00117         return (isnick(nick.c_str()) != 0);
-00118 }
+
00184 {
+00185         return (isnick(nick.c_str()) != 0);
+00186 }
 
@@ -476,7 +606,7 @@ Definition at line 115 - string  + std::string    s @@ -501,11 +631,11 @@ Writes a log string.

This method writes a line of text to the log. If the level given is lower than the level given in the configuration, this command has no effect.

-Definition at line 56 of file modules.cpp. +Definition at line 118 of file modules.cpp.

-

00057 {
-00058         log(level,"%s",s.c_str());
-00059 }
+
00119 {
+00120         log(level,"%s",s.c_str());
+00121 }
 
@@ -523,7 +653,7 @@ Definition at line 56 o - string  + std::string    s @@ -548,11 +678,11 @@ Sends a line of text down a TCP/IP socket.

This method writes a line of text to an established socket, cutting it to 510 characters plus a carriage return and linefeed if required.

-Definition at line 61 of file modules.cpp. +Definition at line 129 of file modules.cpp.

-

00062 {
-00063         Write(Socket,"%s",s.c_str());
-00064 }
+
00130 {
+00131         Write(Socket,"%s",s.c_str());
+00132 }
 
@@ -576,7 +706,7 @@ Definition at line 61 o - string  + std::string    s, @@ -607,18 +737,18 @@ Sends text from a user to a channel (mulicast).

This method writes a line of text to a channel, with the given user's nick/ident /host combination prepended, as used in PRIVMSG etc commands (see RFC 1459). If the IncludeSender flag is set, then the text is also sent back to the user from which it originated, as seen in MODE (see RFC 1459).

-Definition at line 81 of file modules.cpp. -

-

00082 {
-00083         if (IncludeSender)
-00084         {
-00085                 WriteChannel(Channel,User,"%s",s.c_str());
-00086         }
-00087         else
-00088         {
-00089                 ChanExceptSender(Channel,User,"%s",s.c_str());
-00090         }
-00091 }
+Definition at line 149 of file modules.cpp.
+

+

00150 {
+00151         if (IncludeSender)
+00152         {
+00153                 WriteChannel(Channel,User,"%s",s.c_str());
+00154         }
+00155         else
+00156         {
+00157                 ChanExceptSender(Channel,User,"%s",s.c_str());
+00158         }
+00159 }
 
@@ -636,7 +766,7 @@ Definition at line 81 o - string  + std::string    text, @@ -667,18 +797,18 @@ Sends text from a user to one or more channels (mulicast).

This method writes a line of text to all users which share a common channel with a given user, with the user's nick/ident/host combination prepended, as used in PRIVMSG etc commands (see RFC 1459). If the IncludeSender flag is set, then the text is also sent back to the user from which it originated, as seen in NICK (see RFC 1459). Otherwise, it is only sent to the other recipients, as seen in QUIT.

-Definition at line 98 of file modules.cpp. -

-

00099 {
-00100         if (IncludeSender)
-00101         {
-00102                 WriteCommon(User,"%s",text.c_str());
-00103         }
-00104         else
-00105         {
-00106                 WriteCommonExcept(User,"%s",text.c_str());
-00107         }
-00108 }
+Definition at line 166 of file modules.cpp.
+

+

00167 {
+00168         if (IncludeSender)
+00169         {
+00170                 WriteCommon(User,"%s",text.c_str());
+00171         }
+00172         else
+00173         {
+00174                 WriteCommonExcept(User,"%s",text.c_str());
+00175         }
+00176 }
 
@@ -702,7 +832,7 @@ Definition at line 98 o - string  + std::string    s @@ -727,11 +857,11 @@ Sends text from a user to a socket.

This method writes a line of text to an established socket, with the given user's nick/ident /host combination prepended, as used in PRIVSG etc commands (see RFC 1459)

-Definition at line 71 of file modules.cpp. +Definition at line 139 of file modules.cpp.

-

00072 {
-00073         WriteFrom(Socket,User,"%s",s.c_str());
-00074 }
+
00140 {
+00141         WriteFrom(Socket,User,"%s",s.c_str());
+00142 }
 
@@ -743,7 +873,7 @@ Definition at line 71 o void Server::SendOpers (  - string  + std::string    s [virtual] @@ -765,11 +895,11 @@ Sends text to all opers.

This method sends a server notice to all opers with the usermode +s.

-Definition at line 51 of file modules.cpp. +Definition at line 113 of file modules.cpp.

-

00052 {
-00053         WriteOpers("%s",s.c_str());
-00054 }
+
00114 {
+00115         WriteOpers("%s",s.c_str());
+00116 }
 
@@ -787,7 +917,7 @@ Definition at line 51 o - string  + std::string    s @@ -812,11 +942,11 @@ Sends text from the server to a socket.

This method writes a line of text to an established socket, with the servername prepended as used by numerics (see RFC 1459)

-Definition at line 66 of file modules.cpp. +Definition at line 134 of file modules.cpp.

-

00067 {
-00068         WriteServ(Socket,"%s",s.c_str());
-00069 }
+
00135 {
+00136         WriteServ(Socket,"%s",s.c_str());
+00137 }
 
@@ -840,7 +970,7 @@ Definition at line 66 o - string  + std::string    s @@ -865,11 +995,11 @@ Sends text from a user to another user.

This method writes a line of text to a user, with a user's nick/ident /host combination prepended, as used in PRIVMSG etc commands (see RFC 1459)

-Definition at line 76 of file modules.cpp. +Definition at line 144 of file modules.cpp.

-

00077 {
-00078         WriteTo(Source,Dest,"%s",s.c_str());
-00079 }
+
00145 {
+00146         WriteTo(Source,Dest,"%s",s.c_str());
+00147 }
 
@@ -887,7 +1017,7 @@ Definition at line 76 o - string  + std::string    text @@ -912,17 +1042,17 @@ Sends a WALLOPS message.

This method writes a WALLOPS message to all users with the +w flag, originating from the specified user.

-Definition at line 110 of file modules.cpp. +Definition at line 178 of file modules.cpp.

-

00111 {
-00112         WriteWallOps(User,"%s",text.c_str());
-00113 }
+
00179 {
+00180         WriteWallOps(User,"%s",text.c_str());
+00181 }
 

The documentation for this class was generated from the following files: -
Generated on Sun Mar 30 19:36:22 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:43 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classVersion-members.html b/docs/module-doc/classVersion-members.html index 4334f28aa..4db33ae9a 100644 --- a/docs/module-doc/classVersion-members.html +++ b/docs/module-doc/classVersion-members.html @@ -15,7 +15,7 @@ RevisionVersion Version(int major, int minor, int revision, int build)Version ~classbase()classbase [inline] -
Generated on Sun Mar 30 19:36:38 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:46 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classVersion.html b/docs/module-doc/classVersion.html index fa12546c7..a9a55493e 100644 --- a/docs/module-doc/classVersion.html +++ b/docs/module-doc/classVersion.html @@ -36,7 +36,7 @@ A class of type Version is returned by the GetVersion method of the 40 of file modules.h.

Constructor & Destructor Documentation

+Definition at line 47 of file modules.h.

Constructor & Destructor Documentation

@@ -86,9 +86,9 @@ Definition at line 40 of

-Definition at line 16 of file modules.cpp. +Definition at line 82 of file modules.cpp.

-

00016 : Major(major), Minor(minor), Revision(revision), Build(build) { };
+
00082 : Major(major), Minor(minor), Revision(revision), Build(build) { };
 
@@ -114,7 +114,7 @@ Definition at line 16 o

-Definition at line 43 of file modules.h. +Definition at line 50 of file modules.h.

@@ -138,7 +138,7 @@ Definition at line 43 of

-Definition at line 43 of file modules.h. +Definition at line 50 of file modules.h.

@@ -162,7 +162,7 @@ Definition at line 43 of

-Definition at line 43 of file modules.h. +Definition at line 50 of file modules.h.

@@ -186,12 +186,12 @@ Definition at line 43 of

-Definition at line 43 of file modules.h. +Definition at line 50 of file modules.h.


The documentation for this class was generated from the following files: -
Generated on Sun Mar 30 19:36:38 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:46 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classchanrec-members.html b/docs/module-doc/classchanrec-members.html index 4e934ca83..cab336e61 100644 --- a/docs/module-doc/classchanrec-members.html +++ b/docs/module-doc/classchanrec-members.html @@ -10,7 +10,7 @@ ageclassbase banschanrec c_privatechanrec - chanrec()chanrec [inline] + chanrec()chanrec classbase()classbase [inline] createdchanrec custom_modeschanrec @@ -22,12 +22,14 @@ noexternalchanrec secretchanrec setbychanrec + SetCustomMode(char mode, bool mode_on)chanrec + SetCustomModeParam(char mode, char *parameter, bool mode_on)chanrec topicchanrec topiclockchanrec topicsetchanrec - ~chanrec()chanrec [inline, virtual] + ~chanrec()chanrec [inline, virtual] ~classbase()classbase [inline] -
Generated on Sun Mar 30 19:35:36 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:35 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classchanrec.html b/docs/module-doc/classchanrec.html index a3e7664aa..725c7b075 100644 --- a/docs/module-doc/classchanrec.html +++ b/docs/module-doc/classchanrec.html @@ -22,9 +22,13 @@ Inheritance diagram for chanrec:

[legend]
List of all members. - - - + + + + + + + @@ -65,7 +69,7 @@ This class represents a channel, and contains its name, modes, time created, top

Definition at line 70 of file channels.h.


Constructor & Destructor Documentation

-

+


Public Member Functions

 chanrec ()
 Creates a channel record and initialises it with default values.

virtual ~chanrec ()
void SetCustomMode (char mode, bool mode_on)
 Sets or unsets a custom mode in the channels info.

void SetCustomModeParam (char mode, char *parameter, bool mode_on)
 Sets or unsets the parameterrs for a custom mode in a channels info.

 chanrec ()
 Creates a channel record and initialises it with default values.

virtual ~chanrec ()

Public Attributes

char name [CHANMAX]
 The channels name.

- +
@@ -75,7 +79,7 @@ Definition at line 70 of   [inline]
@@ -94,21 +98,23 @@ Creates a channel record and initialises it with default values.

-Definition at line 138 of file channels.h. +Definition at line 6 of file channels.cpp.

-

00139         {
-00140                 strcpy(name,"");
-00141                 strcpy(custom_modes,"");
-00142                 strcpy(topic,"");
-00143                 strcpy(setby,"");
-00144                 strcpy(key,"");
-00145                 created = topicset = limit = 0;
-00146                 topiclock = noexternal = inviteonly = moderated = secret = c_private = false;
-00147         }
+References c_private, created, inviteonly, limit, moderated, noexternal, secret, topiclock, and topicset.
+

+

00007 {
+00008         strcpy(name,"");
+00009         strcpy(custom_modes,"");
+00010         strcpy(topic,"");
+00011         strcpy(setby,"");
+00012         strcpy(key,"");
+00013         created = topicset = limit = 0;
+00014         topiclock = noexternal = inviteonly = moderated = secret = c_private = false;
+00015 }
 
-

+

+ +
@@ -135,9 +141,108 @@ Definition at line 138 o

-Definition at line 149 of file channels.h. +Definition at line 148 of file channels.h. +

+

00148 { /* stub */ }
+
+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
void chanrec::SetCustomMode char   mode,
bool   mode_on
+
+ + + + + +
+   + + +

+Sets or unsets a custom mode in the channels info. +

+ +

+Definition at line 17 of file channels.cpp. +

+

00018 {
+00019 }
+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
void chanrec::SetCustomModeParam char   mode,
char *   parameter,
bool   mode_on
+
+ + + +
+   + + +

+Sets or unsets the parameterrs for a custom mode in a channels info. +

+ +

+Definition at line 21 of file channels.cpp.

-

00149 { /* stub */ }
+
00022 {
+00023 }
 
@@ -191,7 +296,9 @@ Nonzero if the mode +p is set.

This value cannot be set at the same time as chanrec::secret

-Definition at line 130 of file channels.h. +Definition at line 130 of file channels.h. +

+Referenced by chanrec().

@@ -217,7 +324,9 @@ Creation time.

-Definition at line 86 of file channels.h. +Definition at line 86 of file channels.h. +

+Referenced by chanrec().

@@ -269,7 +378,9 @@ Nonzero if the mode +i is set.

-Definition at line 116 of file channels.h. +Definition at line 116 of file channels.h. +

+Referenced by chanrec().

@@ -321,7 +432,9 @@ Contains the channel user limit.

If this value is zero, there is no limit in place.

-Definition at line 99 of file channels.h. +Definition at line 99 of file channels.h. +

+Referenced by chanrec().

@@ -347,7 +460,9 @@ Nonzero if the mode +m is set.

-Definition at line 120 of file channels.h. +Definition at line 120 of file channels.h. +

+Referenced by chanrec().

@@ -399,7 +514,9 @@ Nonzero if the mode +n is set.

-Definition at line 112 of file channels.h. +Definition at line 112 of file channels.h. +

+Referenced by chanrec().

@@ -425,7 +542,9 @@ Nonzero if the mode +s is set.

This value cannot be set at the same time as chanrec::c_private

-Definition at line 125 of file channels.h. +Definition at line 125 of file channels.h. +

+Referenced by chanrec().

@@ -503,7 +622,9 @@ Nonzero if the mode +t is set.

-Definition at line 108 of file channels.h. +Definition at line 108 of file channels.h. +

+Referenced by chanrec().

@@ -529,12 +650,14 @@ Time topic was set.

If no topic was ever set, this will be equal to chanrec::created

-Definition at line 90 of file channels.h. +Definition at line 90 of file channels.h. +

+Referenced by chanrec(). -


The documentation for this class was generated from the following file: -
Generated on Sun Mar 30 19:35:36 2003 for InspIRCd by +
The documentation for this class was generated from the following files: +
Generated on Fri Apr 2 13:37:35 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classclassbase-members.html b/docs/module-doc/classclassbase-members.html index 5d8898857..f6ba49518 100644 --- a/docs/module-doc/classclassbase-members.html +++ b/docs/module-doc/classclassbase-members.html @@ -10,7 +10,7 @@ ageclassbase classbase()classbase [inline] ~classbase()classbase [inline] -
Generated on Sun Mar 30 19:35:40 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:36 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classclassbase.html b/docs/module-doc/classclassbase.html index 6d9ba0697..af72fc1e4 100644 --- a/docs/module-doc/classclassbase.html +++ b/docs/module-doc/classclassbase.html @@ -143,7 +143,7 @@ Definition at line 20 of fil
The documentation for this class was generated from the following file: -
Generated on Sun Mar 30 19:35:40 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:36 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classcommand__t-members.html b/docs/module-doc/classcommand__t-members.html index dd991c9c3..8f6ff3c8c 100644 --- a/docs/module-doc/classcommand__t-members.html +++ b/docs/module-doc/classcommand__t-members.html @@ -16,7 +16,7 @@ total_bytescommand_t use_countcommand_t ~classbase()classbase [inline] -
Generated on Sun Mar 30 19:35:44 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:36 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classcommand__t.html b/docs/module-doc/classcommand__t.html index e4a5c43d6..ffb1c94c9 100644 --- a/docs/module-doc/classcommand__t.html +++ b/docs/module-doc/classcommand__t.html @@ -199,7 +199,7 @@ Definition at line 44 of
The documentation for this class was generated from the following file: -
Generated on Sun Mar 30 19:35:44 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:36 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classconnection-members.html b/docs/module-doc/classconnection-members.html index f329cfb3c..de453e70f 100644 --- a/docs/module-doc/classconnection-members.html +++ b/docs/module-doc/classconnection-members.html @@ -22,20 +22,21 @@ hostconnection idle_lastmsgconnection inbufconnection + internal_addrconnection ipconnection keyconnection lastpingconnection npingconnection portconnection - RecvPacket(char *message, char *host, int &prt)connection + RecvPacket(char *message, char *host, int &prt, long &theirkey)connection registeredconnection SendACK(char *host, int port, int reply_id)connection - SendPacket(char *message, char *host, int port)connection + SendPacket(char *message, char *host, int port, long ourkey)connection SendSYN(char *host, int port)connection signonconnection TerminateLink(char *targethost)connection ~classbase()classbase [inline] -
Generated on Sun Mar 30 19:35:54 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:38 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classconnection.html b/docs/module-doc/classconnection.html index c4f33d09b..06110d80c 100644 --- a/docs/module-doc/classconnection.html +++ b/docs/module-doc/classconnection.html @@ -25,8 +25,8 @@ Inheritance diagram for connection:

CreateListener (char *host, int p) bool BeginLink (char *targethost, int port, char *password) void TerminateLink (char *targethost) -bool SendPacket (char *message, char *host, int port) -bool RecvPacket (char *message, char *host, int &prt) +bool SendPacket (char *message, char *host, int port, long ourkey) +bool RecvPacket (char *message, char *host, int &prt, long &theirkey) bool SendSYN (char *host, int port) bool SendACK (char *host, int port, int reply_id) long GenKey () @@ -47,6 +47,7 @@ Inheritance diagram for connection:

signon time_t idle_lastmsg time_t nping +char internal_addr [1024]

Constructor & Destructor Documentation

@@ -209,7 +210,13 @@ Inheritance diagram for connection:

int &  -   prt +   prt, + + + + + long &  +   theirkey @@ -297,7 +304,13 @@ Inheritance diagram for connection:

int  -   port +   port, + + + + + long  +   ourkey @@ -409,7 +422,7 @@ Inheritance diagram for connection:

46 of file connection.h. +Definition at line 47 of file connection.h.

Referenced by userrec::userrec(). @@ -435,7 +448,7 @@ Referenced by userrec::userre

-Definition at line 47 of file connection.h. +Definition at line 48 of file connection.h.

Referenced by userrec::userrec(). @@ -461,7 +474,7 @@ Referenced by userrec::userre

-Definition at line 48 of file connection.h. +Definition at line 49 of file connection.h.

Referenced by userrec::userrec(). @@ -487,7 +500,7 @@ Referenced by userrec::userre

-Definition at line 49 of file connection.h. +Definition at line 50 of file connection.h.

Referenced by userrec::userrec(). @@ -513,7 +526,7 @@ Referenced by userrec::userre

-Definition at line 42 of file connection.h. +Definition at line 43 of file connection.h.

Referenced by serverrec::serverrec(), and userrec::userrec(). @@ -539,7 +552,7 @@ Referenced by serverrec::se

-Definition at line 50 of file connection.h. +Definition at line 51 of file connection.h.

Referenced by userrec::userrec(). @@ -565,7 +578,7 @@ Referenced by userrec::userre

-Definition at line 43 of file connection.h. +Definition at line 44 of file connection.h.

@@ -589,7 +602,7 @@ Definition at line 43

-Definition at line 55 of file connection.h. +Definition at line 56 of file connection.h.

Referenced by userrec::userrec(). @@ -615,7 +628,31 @@ Referenced by userrec::userre

-Definition at line 45 of file connection.h. +Definition at line 46 of file connection.h. + + +

+ + + + +
+ + +
char connection::internal_addr[1024] +
+
+ + + +
+   + + +

+ +

+Definition at line 58 of file connection.h.

@@ -639,7 +676,7 @@ Definition at line 45

-Definition at line 44 of file connection.h. +Definition at line 45 of file connection.h.

Referenced by userrec::userrec(). @@ -665,7 +702,7 @@ Referenced by userrec::userre

-Definition at line 41 of file connection.h. +Definition at line 42 of file connection.h.

@@ -689,7 +726,7 @@ Definition at line 41

-Definition at line 53 of file connection.h. +Definition at line 54 of file connection.h.

Referenced by serverrec::serverrec(), and userrec::userrec(). @@ -715,7 +752,7 @@ Referenced by serverrec::se

-Definition at line 56 of file connection.h. +Definition at line 57 of file connection.h.

Referenced by userrec::userrec(). @@ -741,7 +778,7 @@ Referenced by userrec::userre

-Definition at line 51 of file connection.h. +Definition at line 52 of file connection.h.

Referenced by userrec::userrec(). @@ -767,7 +804,7 @@ Referenced by userrec::userre

-Definition at line 52 of file connection.h. +Definition at line 53 of file connection.h.

Referenced by userrec::userrec(). @@ -793,14 +830,14 @@ Referenced by userrec::userre

-Definition at line 54 of file connection.h. +Definition at line 55 of file connection.h.

Referenced by serverrec::serverrec(), and userrec::userrec().


The documentation for this class was generated from the following file: -
Generated on Sun Mar 30 19:35:54 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:38 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classconnection__coll__graph.gif b/docs/module-doc/classconnection__coll__graph.gif index e20ed5119..c3e247008 100644 Binary files a/docs/module-doc/classconnection__coll__graph.gif and b/docs/module-doc/classconnection__coll__graph.gif differ diff --git a/docs/module-doc/classes.html b/docs/module-doc/classes.html index a430077e3..3f0856447 100644 --- a/docs/module-doc/classes.html +++ b/docs/module-doc/classes.html @@ -8,18 +8,18 @@ Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

InspIRCd Compound Index

  A  
-
command_t   FileReader   Module   serverrec   
Admin   ConfigReader   
  H  
-
ModuleFactory   
  U  
+
command_t   
  F  
+
  M  
+
serverrec   
Admin   ConfigReader   FileReader   Module   
  U  
  B  
-
ConnectClass   HostItem   
  P  
-
ucrec   
BanItem   connection   
  I  
-
packet   userrec   
  C  
+
ConnectClass   
  H  
+
ModuleFactory   ucrec   
BanItem   connection   HostItem   
  P  
+
userrec   
  C  
  E  
-
Invited   
  S  
-
  V  
-
chanrec   ExemptItem   InviteItem   Server   Version   
classbase   
  F  
-
  M  
-

Generated on Sun Mar 30 19:35:25 2003 for InspIRCd by +
  I  
+packet   
  V  
+chanrec   ExemptItem   Invited   
  S  
+Version   classbase   ExtMode   InviteItem   Server   
Generated on Fri Apr 2 13:37:33 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classpacket-members.html b/docs/module-doc/classpacket-members.html index a87c17778..bb95ba019 100644 --- a/docs/module-doc/classpacket-members.html +++ b/docs/module-doc/classpacket-members.html @@ -16,7 +16,7 @@ typepacket ~classbase()classbase [inline] ~packet()packet -
Generated on Sun Mar 30 19:36:19 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:43 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classpacket.html b/docs/module-doc/classpacket.html index 7c06a33e4..56f2b7c42 100644 --- a/docs/module-doc/classpacket.html +++ b/docs/module-doc/classpacket.html @@ -106,7 +106,7 @@ Inheritance diagram for packet:

31 of file connection.h. +Definition at line 32 of file connection.h.

@@ -130,7 +130,7 @@ Definition at line 31

-Definition at line 29 of file connection.h. +Definition at line 30 of file connection.h.

@@ -154,7 +154,7 @@ Definition at line 29

-Definition at line 28 of file connection.h. +Definition at line 29 of file connection.h.

@@ -178,12 +178,12 @@ Definition at line 28

-Definition at line 30 of file connection.h. +Definition at line 31 of file connection.h.


The documentation for this class was generated from the following file: -
Generated on Sun Mar 30 19:36:19 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:43 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classserverrec-members.html b/docs/module-doc/classserverrec-members.html index f3a9e9974..7000e4964 100644 --- a/docs/module-doc/classserverrec-members.html +++ b/docs/module-doc/classserverrec-members.html @@ -23,6 +23,7 @@ hostconnection idle_lastmsgconnection inbufconnection + internal_addrconnection ipconnection jupiterserverrec keyconnection @@ -32,10 +33,10 @@ opercountserverrec pingtimeserverrec portconnection - RecvPacket(char *message, char *host, int &prt)connection + RecvPacket(char *message, char *host, int &prt, long &theirkey)connection registeredconnection SendACK(char *host, int port, int reply_id)connection - SendPacket(char *message, char *host, int port)connection + SendPacket(char *message, char *host, int port, long ourkey)connection SendSYN(char *host, int port)connection serverrec()serverrec serverrec(char *n, long ver, bool jupe)serverrec @@ -46,7 +47,7 @@ versionserverrec ~classbase()classbase [inline] ~serverrec()serverrec -
Generated on Sun Mar 30 19:36:27 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:44 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classserverrec.html b/docs/module-doc/classserverrec.html index 57305431d..5e3687f8e 100644 --- a/docs/module-doc/classserverrec.html +++ b/docs/module-doc/classserverrec.html @@ -18,7 +18,7 @@ Inheritance diagram for serverrec:

[legend]
Collaboration diagram for serverrec:

Collaboration graph
- +
[legend]
List of all members. @@ -84,7 +84,7 @@ Constructor.

Definition at line 12 of file servers.cpp.

-References connection::fd, hops_away, jupiter, connection::lastping, opercount, pingtime, connection::signon, usercount, usercount_i, and version. +References connection::fd, hops_away, jupiter, connection::lastping, opercount, pingtime, connection::signon, usercount, usercount_i, and version.

00013 {
 00014         strcpy(name,"");
@@ -146,7 +146,7 @@ Constructor which initialises some of the main variables.
 

Definition at line 29 of file servers.cpp.

-References connection::fd, hops_away, jupiter, connection::lastping, opercount, connection::signon, usercount, usercount_i, and version. +References connection::fd, hops_away, jupiter, connection::lastping, opercount, connection::signon, usercount, usercount_i, and version.

00030 {
 00031         strcpy(name,n);
@@ -422,7 +422,7 @@ Referenced by serverrec()
 
The documentation for this class was generated from the following files:
-
Generated on Sun Mar 30 19:36:27 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:44 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classserverrec__coll__graph.gif b/docs/module-doc/classserverrec__coll__graph.gif index 1617481d2..e00af729c 100644 Binary files a/docs/module-doc/classserverrec__coll__graph.gif and b/docs/module-doc/classserverrec__coll__graph.gif differ diff --git a/docs/module-doc/classucrec-members.html b/docs/module-doc/classucrec-members.html index d29848ed0..7275119b2 100644 --- a/docs/module-doc/classucrec-members.html +++ b/docs/module-doc/classucrec-members.html @@ -14,7 +14,7 @@
-
ucrec()ucrec [inline]
~classbase()classbase [inline]
~ucrec()ucrec [inline, virtual]

Generated on Sun Mar 30 19:36:30 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:45 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classucrec.html b/docs/module-doc/classucrec.html index 04b1aede5..15f7910f3 100644 --- a/docs/module-doc/classucrec.html +++ b/docs/module-doc/classucrec.html @@ -38,7 +38,7 @@ The uc_modes member holds a bitmask of which privilages the user has on the chan

-Definition at line 166 of file channels.h.


Constructor & Destructor Documentation

+Definition at line 165 of file channels.h.

Constructor & Destructor Documentation

@@ -66,9 +66,9 @@ Definition at line 166 o

-Definition at line 179 of file channels.h. +Definition at line 178 of file channels.h.

-

00179 { /* stub */ }
+
00178 { /* stub */ }
 
@@ -99,9 +99,9 @@ Definition at line 179 o

-Definition at line 180 of file channels.h. +Definition at line 179 of file channels.h.

-

00180 { /* stub */ }
+
00179 { /* stub */ }
 
@@ -129,7 +129,7 @@ Points to the channel record where the given modes apply.

If the record is not in use, this value will be NULL.

-Definition at line 177 of file channels.h. +Definition at line 176 of file channels.h.

Referenced by userrec::userrec(). @@ -157,12 +157,12 @@ Contains a bitmask of the UCMODE_OP ...

UCMODE_FOUNDER values. If this value is zero, the user has no privilages upon the channel.

-Definition at line 172 of file channels.h. +Definition at line 171 of file channels.h.


The documentation for this class was generated from the following file: -
Generated on Sun Mar 30 19:36:30 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:45 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classuserrec-members.html b/docs/module-doc/classuserrec-members.html index 2624c519e..24f9b9811 100644 --- a/docs/module-doc/classuserrec-members.html +++ b/docs/module-doc/classuserrec-members.html @@ -29,6 +29,7 @@ identuserrec idle_lastmsgconnection inbufconnection + internal_addrconnection invitesuserrec [private] InviteTo(char *channel)userrec [virtual] ipconnection @@ -39,12 +40,12 @@ nickuserrec npingconnection portconnection - RecvPacket(char *message, char *host, int &prt)connection + RecvPacket(char *message, char *host, int &prt, long &theirkey)connection registeredconnection RemoveInvite(char *channel)userrec [virtual] resultuserrec SendACK(char *host, int port, int reply_id)connection - SendPacket(char *message, char *host, int port)connection + SendPacket(char *message, char *host, int port, long ourkey)connection SendSYN(char *host, int port)connection serveruserrec signonconnection @@ -52,7 +53,7 @@ userrec()userrec ~classbase()classbase [inline] ~userrec()userrec [inline, virtual] -
Generated on Sun Mar 30 19:36:35 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:46 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classuserrec.html b/docs/module-doc/classuserrec.html index e9c680250..371c15e9f 100644 --- a/docs/module-doc/classuserrec.html +++ b/docs/module-doc/classuserrec.html @@ -18,8 +18,8 @@ Inheritance diagram for userrec:

[legend]
Collaboration diagram for userrec:

Collaboration graph
- - + +
[legend]
List of all members. @@ -95,7 +95,7 @@ Definition at line 58 of fi

Definition at line 11 of file users.cpp.

-References connection::bytes_in, connection::bytes_out, ucrec::channel, chans, connection::cmds_in, connection::cmds_out, connection::fd, connection::haspassed, connection::idle_lastmsg, invites, connection::ip, connection::lastping, connection::nping, connection::port, connection::registered, and connection::signon. +References connection::bytes_in, connection::bytes_out, ucrec::channel, chans, connection::cmds_in, connection::cmds_out, connection::fd, connection::haspassed, connection::idle_lastmsg, invites, connection::ip, connection::lastping, connection::nping, connection::port, connection::registered, and connection::signon.

00012 {
 00013         // the PROPER way to do it, AVOID bzero at *ALL* costs
@@ -266,15 +266,15 @@ Adds a channel to a users invite list (invites them to a channel).
 

-Definition at line 60 of file users.cpp. +Definition at line 63 of file users.cpp.

References Invited::channel, and invites.

-

00061 {
-00062         Invited i;
-00063         strcpy(i.channel,channel);
-00064         invites.push_back(i);
-00065 }
+
00064 {
+00065         Invited i;
+00066         strcpy(i.channel,channel);
+00067         invites.push_back(i);
+00068 }
 
@@ -315,12 +315,15 @@ References invites.
00050 {
 00051         for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
 00052         {
-00053                 if (!strcasecmp(i->channel,channel))
-00054                 {
-00055                         return true;
-00056                 }
-00057         }
-00058 }
+00053                 if (i->channel) {
+00054                         if (!strcasecmp(i->channel,channel))
+00055                         {
+00056                                 return true;
+00057                         }
+00058                 }
+00059         }
+00060         return false;
+00061 }
 
@@ -354,20 +357,22 @@ Removes a channel from a users invite list.

This member function is called on successfully joining an invite only channel to which the user has previously been invited, to clear the invitation.

-Definition at line 67 of file users.cpp. +Definition at line 70 of file users.cpp.

References invites.

-

00068 {
-00069         for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
-00070         {
-00071                 if (!strcasecmp(i->channel,channel))
-00072                 {
-00073                         invites.erase(i);
-00074                         return;
-00075                 }
-00076         }
-00077 }
+
00071 {
+00072         for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
+00073         {
+00074                 if (i->channel) {
+00075                         if (!strcasecmp(i->channel,channel))
+00076                         {
+00077                                 invites.erase(i);
+00078                                 return;
+00079                         }
+00080                 }
+00081         }
+00082 }
 
@@ -527,7 +532,7 @@ A list of channels the user has a pending invite to.

Definition at line 64 of file users.h.

-Referenced by InviteTo(), IsInvited(), RemoveInvite(), and userrec(). +Referenced by InviteTo(), IsInvited(), RemoveInvite(), and userrec().

@@ -638,7 +643,7 @@ Definition at line 96 of fi


The documentation for this class was generated from the following files: -
Generated on Sun Mar 30 19:36:35 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:46 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classuserrec__coll__graph.gif b/docs/module-doc/classuserrec__coll__graph.gif index d4dbd0632..27ce7c656 100644 Binary files a/docs/module-doc/classuserrec__coll__graph.gif and b/docs/module-doc/classuserrec__coll__graph.gif differ diff --git a/docs/module-doc/connection_8h-source.html b/docs/module-doc/connection_8h-source.html index c339f079d..114d23931 100644 --- a/docs/module-doc/connection_8h-source.html +++ b/docs/module-doc/connection_8h-source.html @@ -13,7 +13,7 @@ 00005 #include "inspircd_config.h" 00006 #include "base.h" 00007 #include <string> -00008 #include <map.h> +00008 #include <map> 00009 #include <sys/socket.h> 00010 #include <sys/types.h> 00011 #include <netdb.h> @@ -28,56 +28,58 @@ 00020 #define PT_SYN_ONLY 0 00021 #define PT_ACK_ONLY 1 00022 #define PT_SYN_WITH_DATA 2 -00023 -00024 -00025 class packet : public classbase -00026 { -00027 public: -00028 long key; -00029 short int id; -00030 short int type; -00031 char data[MAXBUF]; -00032 -00033 packet(); -00034 ~packet(); -00035 }; -00036 +00023 #define PT_KEY_EXCHANGE 3 +00024 +00025 +00026 class packet : public classbase +00027 { +00028 public: +00029 long key; +00030 short int id; +00031 short int type; +00032 char data[MAXBUF]; +00033 +00034 packet(); +00035 ~packet(); +00036 }; 00037 -00038 class connection : public classbase -00039 { -00040 public: -00041 long key; -00042 int fd; // file descriptor -00043 char host[256]; // hostname -00044 long ip; // ipv4 address -00045 char inbuf[MAXBUF]; // recvQ -00046 long bytes_in; -00047 long bytes_out; -00048 long cmds_in; -00049 long cmds_out; -00050 bool haspassed; -00051 int port; -00052 int registered; -00053 time_t lastping; -00054 time_t signon; -00055 time_t idle_lastmsg; -00056 time_t nping; -00057 -00058 connection(); -00059 bool CreateListener(char* host, int p); -00060 bool BeginLink(char* targethost, int port, char* password); -00061 void TerminateLink(char* targethost); -00062 bool SendPacket(char *message, char* host, int port); -00063 bool RecvPacket(char *message, char* host, int &prt); -00064 bool SendSYN(char* host, int port); -00065 bool SendACK(char* host, int port, int reply_id); -00066 long GenKey(); -00067 }; -00068 -00069 -00070 #endif -00071 -

Generated on Sun Mar 30 19:34:53 2003 for InspIRCd by +00038 +00039 class connection : public classbase +00040 { +00041 public: +00042 long key; +00043 int fd; // file descriptor +00044 char host[256]; // hostname +00045 long ip; // ipv4 address +00046 char inbuf[MAXBUF]; // recvQ +00047 long bytes_in; +00048 long bytes_out; +00049 long cmds_in; +00050 long cmds_out; +00051 bool haspassed; +00052 int port; +00053 int registered; +00054 time_t lastping; +00055 time_t signon; +00056 time_t idle_lastmsg; +00057 time_t nping; +00058 char internal_addr[1024]; +00059 +00060 connection(); +00061 bool CreateListener(char* host, int p); +00062 bool BeginLink(char* targethost, int port, char* password); +00063 void TerminateLink(char* targethost); +00064 bool SendPacket(char *message, char* host, int port, long ourkey); +00065 bool RecvPacket(char *message, char* host, int &prt, long &theirkey); +00066 bool SendSYN(char* host, int port); +00067 bool SendACK(char* host, int port, int reply_id); +00068 long GenKey(); +00069 }; +00070 +00071 +00072 #endif +00073 +

Generated on Fri Apr 2 13:37:27 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/connection_8h.html b/docs/module-doc/connection_8h.html index 9ea64018b..87d174027 100644 --- a/docs/module-doc/connection_8h.html +++ b/docs/module-doc/connection_8h.html @@ -9,7 +9,7 @@

connection.h File Reference

#include "inspircd_config.h"
#include "base.h"
#include <string>
-#include <map.h>
+#include <map>
#include <sys/socket.h>
#include <sys/types.h>
#include <netdb.h>
@@ -43,6 +43,7 @@ This graph shows which files directly or indirectly include this file:

#define PT_SYN_ONLY   0 #define PT_ACK_ONLY   1 #define PT_SYN_WITH_DATA   2 +#define PT_KEY_EXCHANGE   3

Define Documentation

@@ -69,6 +70,30 @@ This graph shows which files directly or indirectly include this file:

21 of file connection.h. +

+ + + + +
+ + +
#define PT_KEY_EXCHANGE   3 +
+
+ + + + + +
+   + + +

+ +

+Definition at line 23 of file connection.h.

@@ -117,7 +142,7 @@ Definition at line 20 Definition at line 22 of file connection.h.
-


Generated on Sun Mar 30 19:35:06 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:30 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/connection_8h__incl.gif b/docs/module-doc/connection_8h__incl.gif index e9a0dd77c..b297abff2 100644 Binary files a/docs/module-doc/connection_8h__incl.gif and b/docs/module-doc/connection_8h__incl.gif differ diff --git a/docs/module-doc/ctables_8h-source.html b/docs/module-doc/ctables_8h-source.html index e0318350e..40dc67167 100644 --- a/docs/module-doc/ctables_8h-source.html +++ b/docs/module-doc/ctables_8h-source.html @@ -43,7 +43,7 @@ 00049 00050 #endif 00051 -

Generated on Sun Mar 30 19:34:54 2003 for InspIRCd by +

Generated on Fri Apr 2 13:37:27 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/ctables_8h.html b/docs/module-doc/ctables_8h.html index d2d828923..4221d4abb 100644 --- a/docs/module-doc/ctables_8h.html +++ b/docs/module-doc/ctables_8h.html @@ -16,6 +16,13 @@ Include dependency graph for ctables.h:

+

+This graph shows which files directly or indirectly include this file:

Included by dependency graph
+ + + + +

Go to the source code of this file. @@ -50,7 +57,7 @@ Include dependency graph for ctables.h:

23 of file ctables.h.
-


Generated on Sun Mar 30 19:35:08 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:30 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/files.html b/docs/module-doc/files.html index bcc4cc6b7..4be939d87 100644 --- a/docs/module-doc/files.html +++ b/docs/module-doc/files.html @@ -8,6 +8,7 @@ Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

InspIRCd File List

Here is a list of all files with brief descriptions: + @@ -18,7 +19,7 @@
base.h [code]
channels.cpp [code]
channels.h [code]
connection.h [code]
ctables.h [code]
users.cpp [code]
users.h [code]
-
Generated on Sun Mar 30 19:34:53 2003 for InspIRCd by +
Generated on Fri Apr 2 13:37:27 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/functions.html b/docs/module-doc/functions.html index ad807f002..091beb352 100644 --- a/docs/module-doc/functions.html +++ b/docs/module-doc/functions.html @@ -12,7 +12,9 @@

Here is a list of all class members with links to the classes they belong to:

- a -

@@ -30,7 +32,7 @@ Here is a list of all class members with links to the classes they belong to:

chanrec
  • ChanMode() : Server
  • channel : Invited, ucrec
  • chanrec() -: chanrec
  • chans +: chanrec
  • chans : userrec
  • classbase() : classbase
  • cmds_in : connection
  • cmds_out @@ -46,20 +48,23 @@ Here is a list of all class members with links to the classes they belong to:

    - d -

    - e -

    +: ConfigReader
  • Exists() +: FileReader
  • ExtMode() +: ExtMode

    - f -

    @@ -90,7 +95,8 @@ Here is a list of all class members with links to the classes they belong to:

    packet
  • ident : userrec
  • idle_lastmsg : connection
  • inbuf -: connection
  • inviteonly +: connection
  • internal_addr +: connection
  • inviteonly : chanrec
  • invites : userrec
  • InviteTo() : userrec
  • ip @@ -117,27 +123,29 @@ Here is a list of all class members with links to the classes they belong to:

    Major : Version
  • min_params : command_t
  • Minor -: Version
  • moderated +: Version
  • modechar +: ExtMode
  • moderated : chanrec
  • modes : userrec
  • Module() : Module
  • Module::OnPacketReceive() : Module
  • Module::OnPacketTransmit() -: Module
  • Module::OnServerRaw() -: Module
  • ModuleFactory() +: Module
  • ModuleFactory() : ModuleFactory

    - n -

    - o -

    - t -

      @@ -189,7 +201,7 @@ Here is a list of all class members with links to the classes they belong to:

      chanrec
    • topicset : chanrec
    • total_bytes : command_t
    • type -: ConnectClass, packet
    +: ConnectClass, packet, ExtMode

    - u -

    - ~ -

    -
    Generated on Sun Mar 30 19:35:25 2003 for InspIRCd by +
    Generated on Fri Apr 2 13:37:33 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/globals.html b/docs/module-doc/globals.html index 42a92021c..cb7a7e52a 100644 --- a/docs/module-doc/globals.html +++ b/docs/module-doc/globals.html @@ -7,10 +7,14 @@
    Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

    InspIRCd File Members

    -b | c | d | e | f | h | i | l | m | n | p | s | u | v
    +a | b | c | d | e | f | h | i | l | m | n | p | s | u | v
  • -Here is a list of all file members with links to the files they belong to:

    - b - +Here is a list of all file members with links to the files they belong to:

    - a - +

    +

    - b -

    @@ -19,7 +23,8 @@ Here is a list of all file members with links to the files they belong to:

    CC_ALLOW : users.h
  • CC_DENY : users.h
  • ClassVector -: users.h +: users.h
  • createcommand() +: modules.h

    - d -

    • DEBUG @@ -27,14 +32,17 @@ Here is a list of all file members with links to the files they belong to:

      modules.h

    - e -

    +
  • EMode +: modules.cpp
  • ExemptList +: channels.h
  • ExtModeList +: modules.cpp
  • ExtModeListIter +: modules.cpp

    - f -

    +: modules.cpp
  • file_cache +: modules.h
  • FOREACH_MOD +: modules.h

    - h -

    +: modules.h

    - l -

    - n -

    - u -

    • UCMODE_FOUNDER @@ -86,7 +101,7 @@ Here is a list of all file members with links to the files they belong to:

      -
      Generated on Sun Mar 30 19:36:38 2003 for InspIRCd by +
      Generated on Fri Apr 2 13:37:46 2004 for InspIRCd by doxygen1.3-rc3
      diff --git a/docs/module-doc/graph_legend.html b/docs/module-doc/graph_legend.html index 216eadfa5..5e1bbbc7c 100644 --- a/docs/module-doc/graph_legend.html +++ b/docs/module-doc/graph_legend.html @@ -69,7 +69,7 @@ A purple dashed arrow is used if a class is contained or used by another class.
    • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
    -
    Generated on Sun Mar 30 19:36:39 2003 for InspIRCd by +
    Generated on Fri Apr 2 13:37:46 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/hierarchy.html b/docs/module-doc/hierarchy.html index 73840b1e6..05eedb308 100644 --- a/docs/module-doc/hierarchy.html +++ b/docs/module-doc/hierarchy.html @@ -36,8 +36,9 @@ This inheritance list is sorted roughly, but not completely, alphabetically: +
  • ExtMode -
    Generated on Sun Mar 30 19:35:25 2003 for InspIRCd by +
    Generated on Fri Apr 2 13:37:33 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/inherits.html b/docs/module-doc/inherits.html index 72682ae85..fd4327674 100644 --- a/docs/module-doc/inherits.html +++ b/docs/module-doc/inherits.html @@ -33,8 +33,12 @@ + + + + -
    Generated on Sun Mar 30 19:36:42 2003 for InspIRCd by +
    Generated on Fri Apr 2 13:37:47 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/main.html b/docs/module-doc/main.html index 9baa861c5..fa3a2d291 100644 --- a/docs/module-doc/main.html +++ b/docs/module-doc/main.html @@ -8,7 +8,7 @@ Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

  • InspIRCd Documentation

    -


    Generated on Sun Mar 30 19:34:53 2003 for InspIRCd by +
    Generated on Fri Apr 2 13:37:27 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/modules_8cpp-source.html b/docs/module-doc/modules_8cpp-source.html index 6955b58ba..00de97628 100644 --- a/docs/module-doc/modules_8cpp-source.html +++ b/docs/module-doc/modules_8cpp-source.html @@ -14,225 +14,310 @@ 00006 00007 00008 #include <typeinfo> -00009 #include <iostream.h> +00009 #include <iostream> 00010 #include "globals.h" 00011 #include "modules.h" -00012 #include "inspircd_io.h" -00013 -00014 // version is a simple class for holding a modules version number -00015 -00016 Version::Version(int major, int minor, int revision, int build) : Major(major), Minor(minor), Revision(revision), Build(build) { }; -00017 -00018 // admin is a simple class for holding a server's administrative info -00019 -00020 Admin::Admin(string name, string email, string nick) : Name(name), Email(email), Nick(nick) { }; -00021 -00022 // -00023 // Announce to the world that the Module base -00024 // class has been created or destroyed -00025 // -00026 -00027 Module::Module() { } -00028 Module::~Module() { } -00029 void Module::OnUserConnect(userrec* user) { } -00030 void Module::OnUserQuit(userrec* user) { } -00031 void Module::OnUserJoin(userrec* user, chanrec* channel) { } -00032 void Module::OnUserPart(userrec* user, chanrec* channel) { } -00033 void Module::OnPacketTransmit(char *p) { } -00034 void Module::OnPacketReceive(char *p) { } -00035 void Module::OnRehash() { } -00036 void Module::OnServerRaw(string &raw, bool inbound) { } -00037 Version Module::GetVersion() { return Version(1,0,0,0); } -00038 -00039 // server is a wrapper class that provides methods to all of the C-style -00040 // exports in the core -00041 // -00042 -00043 Server::Server() -00044 { -00045 } -00046 -00047 Server::~Server() +00012 #include "ctables.h" +00013 #include "inspircd_io.h" +00014 +00015 // class type for holding an extended mode character - internal to core +00016 +00017 class ExtMode +00018 { +00019 public: +00020 char modechar; +00021 int type; +00022 bool default_on; +00023 int params_when_on; +00024 int params_when_off; +00025 ExtMode(char mc, int ty, bool d_on, int p_on, int p_off) : modechar(mc), type(ty), default_on(d_on), params_when_on(p_on), params_when_off(p_off) { }; +00026 }; +00027 +00028 typedef std::vector<ExtMode> ExtModeList; +00029 typedef ExtModeList::iterator ExtModeListIter; +00030 +00031 ExtModeList EMode; +00032 +00033 // returns true if an extended mode character is in use +00034 bool ModeDefined(char modechar, int type) +00035 { +00036 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +00037 { +00038 if ((i->modechar == modechar) && (i->type == type)) +00039 { +00040 return true; +00041 } +00042 } +00043 return false; +00044 } +00045 +00046 // returns number of parameters for a custom mode when it is switched on +00047 bool ModeDefinedOn(char modechar, int type) 00048 { -00049 } -00050 -00051 void Server::SendOpers(string s) -00052 { -00053 WriteOpers("%s",s.c_str()); -00054 } -00055 -00056 void Server::Log(int level, string s) -00057 { -00058 log(level,"%s",s.c_str()); -00059 } -00060 -00061 void Server::Send(int Socket, string s) -00062 { -00063 Write(Socket,"%s",s.c_str()); -00064 } -00065 -00066 void Server::SendServ(int Socket, string s) -00067 { -00068 WriteServ(Socket,"%s",s.c_str()); -00069 } -00070 -00071 void Server::SendFrom(int Socket, userrec* User, string s) -00072 { -00073 WriteFrom(Socket,User,"%s",s.c_str()); -00074 } -00075 -00076 void Server::SendTo(userrec* Source, userrec* Dest, string s) -00077 { -00078 WriteTo(Source,Dest,"%s",s.c_str()); -00079 } -00080 -00081 void Server::SendChannel(userrec* User, chanrec* Channel, string s,bool IncludeSender) -00082 { -00083 if (IncludeSender) -00084 { -00085 WriteChannel(Channel,User,"%s",s.c_str()); -00086 } -00087 else -00088 { -00089 ChanExceptSender(Channel,User,"%s",s.c_str()); -00090 } -00091 } -00092 -00093 bool Server::CommonChannels(userrec* u1, userrec* u2) -00094 { -00095 return (common_channels(u1,u2) != 0); -00096 } -00097 -00098 void Server::SendCommon(userrec* User, string text,bool IncludeSender) -00099 { -00100 if (IncludeSender) -00101 { -00102 WriteCommon(User,"%s",text.c_str()); -00103 } -00104 else -00105 { -00106 WriteCommonExcept(User,"%s",text.c_str()); -00107 } -00108 } -00109 -00110 void Server::SendWallops(userrec* User, string text) -00111 { -00112 WriteWallOps(User,"%s",text.c_str()); -00113 } -00114 -00115 bool Server::IsNick(string nick) -00116 { -00117 return (isnick(nick.c_str()) != 0); -00118 } -00119 -00120 userrec* Server::FindNick(string nick) -00121 { -00122 return Find(nick); -00123 } -00124 -00125 chanrec* Server::FindChannel(string channel) -00126 { -00127 return FindChan(channel.c_str()); -00128 } -00129 -00130 string Server::ChanMode(userrec* User, chanrec* Chan) -00131 { -00132 string mode = cmode(User,Chan); -00133 return mode; -00134 } -00135 -00136 string Server::GetServerName() -00137 { -00138 return getservername(); -00139 } -00140 -00141 string Server::GetNetworkName() -00142 { -00143 return getnetworkname(); -00144 } -00145 -00146 Admin Server::GetAdmin() -00147 { -00148 return Admin(getadminname(),getadminemail(),getadminnick()); -00149 } -00150 -00151 -00152 ConfigReader::ConfigReader() -00153 { -00154 fname = CONFIG_FILE; -00155 } -00156 -00157 -00158 ConfigReader::~ConfigReader() -00159 { -00160 } -00161 -00162 -00163 ConfigReader::ConfigReader(string filename) : fname(filename) { }; -00164 -00165 string ConfigReader::ReadValue(string tag, string name, int index) -00166 { -00167 char val[MAXBUF]; -00168 ReadConf(fname.c_str(),tag.c_str(),name.c_str(),index,val); -00169 string s = val; -00170 return s; -00171 } -00172 -00173 -00174 int ConfigReader::Enumerate(string tag) -00175 { -00176 return EnumConf(fname.c_str(),tag.c_str()); -00177 } -00178 -00179 -00180 bool ConfigReader::Verify() -00181 { -00182 return true; -00183 } -00184 -00185 -00186 FileReader::FileReader(string filename) -00187 { -00188 file_cache c; -00189 readfile(c,filename.c_str()); -00190 this->fc = c; +00049 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +00050 { +00051 if ((i->modechar == modechar) && (i->type == type)) +00052 { +00053 return i->params_when_on; +00054 } +00055 } +00056 return 0; +00057 } +00058 +00059 // returns number of parameters for a custom mode when it is switched on +00060 bool ModeDefinedOff(char modechar, int type) +00061 { +00062 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +00063 { +00064 if ((i->modechar == modechar) && (i->type == type)) +00065 { +00066 return i->params_when_off; +00067 } +00068 } +00069 return 0; +00070 } +00071 +00072 // returns true if an extended mode character is in use +00073 bool AddExtendedMode(char modechar, int type, bool default_on, int params_on, int params_off) +00074 { +00075 EMode.push_back( ExtMode (modechar,type,default_on,params_on,params_off)); +00076 return true; +00077 } +00078 +00079 +00080 // version is a simple class for holding a modules version number +00081 +00082 Version::Version(int major, int minor, int revision, int build) : Major(major), Minor(minor), Revision(revision), Build(build) { }; +00083 +00084 // admin is a simple class for holding a server's administrative info +00085 +00086 Admin::Admin(std::string name, std::string email, std::string nick) : Name(name), Email(email), Nick(nick) { }; +00087 +00088 Module::Module() { } +00089 Module::~Module() { } +00090 void Module::OnUserConnect(userrec* user) { } +00091 void Module::OnUserQuit(userrec* user) { } +00092 void Module::OnUserJoin(userrec* user, chanrec* channel) { } +00093 void Module::OnUserPart(userrec* user, chanrec* channel) { } +00094 void Module::OnPacketTransmit(char *p) { } +00095 void Module::OnPacketReceive(char *p) { } +00096 void Module::OnRehash() { } +00097 void Module::OnServerRaw(std::string &raw, bool inbound) { } +00098 bool Module::OnExtendedMode(userrec* user, chanrec* chan, char modechar, int type, bool mode_on, string_list &params) { } +00099 Version Module::GetVersion() { return Version(1,0,0,0); } +00100 +00101 // server is a wrapper class that provides methods to all of the C-style +00102 // exports in the core +00103 // +00104 +00105 Server::Server() +00106 { +00107 } +00108 +00109 Server::~Server() +00110 { +00111 } +00112 +00113 void Server::SendOpers(std::string s) +00114 { +00115 WriteOpers("%s",s.c_str()); +00116 } +00117 +00118 void Server::Log(int level, std::string s) +00119 { +00120 log(level,"%s",s.c_str()); +00121 } +00122 +00123 void Server::AddCommand(char* cmd, handlerfunc f, char flags, int minparams) +00124 { +00125 createcommand(cmd,f,flags,minparams); +00126 } +00127 +00128 +00129 void Server::Send(int Socket, std::string s) +00130 { +00131 Write(Socket,"%s",s.c_str()); +00132 } +00133 +00134 void Server::SendServ(int Socket, std::string s) +00135 { +00136 WriteServ(Socket,"%s",s.c_str()); +00137 } +00138 +00139 void Server::SendFrom(int Socket, userrec* User, std::string s) +00140 { +00141 WriteFrom(Socket,User,"%s",s.c_str()); +00142 } +00143 +00144 void Server::SendTo(userrec* Source, userrec* Dest, std::string s) +00145 { +00146 WriteTo(Source,Dest,"%s",s.c_str()); +00147 } +00148 +00149 void Server::SendChannel(userrec* User, chanrec* Channel, std::string s,bool IncludeSender) +00150 { +00151 if (IncludeSender) +00152 { +00153 WriteChannel(Channel,User,"%s",s.c_str()); +00154 } +00155 else +00156 { +00157 ChanExceptSender(Channel,User,"%s",s.c_str()); +00158 } +00159 } +00160 +00161 bool Server::CommonChannels(userrec* u1, userrec* u2) +00162 { +00163 return (common_channels(u1,u2) != 0); +00164 } +00165 +00166 void Server::SendCommon(userrec* User, std::string text,bool IncludeSender) +00167 { +00168 if (IncludeSender) +00169 { +00170 WriteCommon(User,"%s",text.c_str()); +00171 } +00172 else +00173 { +00174 WriteCommonExcept(User,"%s",text.c_str()); +00175 } +00176 } +00177 +00178 void Server::SendWallops(userrec* User, std::string text) +00179 { +00180 WriteWallOps(User,"%s",text.c_str()); +00181 } +00182 +00183 bool Server::IsNick(std::string nick) +00184 { +00185 return (isnick(nick.c_str()) != 0); +00186 } +00187 +00188 userrec* Server::FindNick(std::string nick) +00189 { +00190 return Find(nick); 00191 } 00192 -00193 FileReader::FileReader() +00193 chanrec* Server::FindChannel(std::string channel) 00194 { -00195 } -00196 -00197 void FileReader::LoadFile(string filename) -00198 { -00199 file_cache c; -00200 readfile(c,filename.c_str()); -00201 this->fc = c; -00202 } -00203 -00204 FileReader::~FileReader() -00205 { +00195 return FindChan(channel.c_str()); +00196 } +00197 +00198 std::string Server::ChanMode(userrec* User, chanrec* Chan) +00199 { +00200 return cmode(User,Chan); +00201 } +00202 +00203 std::string Server::GetServerName() +00204 { +00205 return getservername(); 00206 } 00207 -00208 string FileReader::GetLine(int x) +00208 std::string Server::GetNetworkName() 00209 { -00210 if ((x<0) || (x>fc.size())) -00211 return ""; -00212 return fc[x]; -00213 } -00214 -00215 int FileReader::FileSize() -00216 { -00217 return fc.size(); -00218 } +00210 return getnetworkname(); +00211 } +00212 +00213 Admin Server::GetAdmin() +00214 { +00215 return Admin(getadminname(),getadminemail(),getadminnick()); +00216 } +00217 +00218 00219 -00220 -00221 vector<Module*> modules(255); -00222 vector<ircd_module*> factory(255); +00220 bool Server::AddExtendedMode(char modechar, int type, bool default_on, int params_when_on, int params_when_off) +00221 { +00222 } 00223 -00224 int MODCOUNT = -1; -00225 -00226 -

    Generated on Sun Mar 30 19:34:54 2003 for InspIRCd by +00224 +00225 ConfigReader::ConfigReader() +00226 { +00227 fname = CONFIG_FILE; +00228 } +00229 +00230 +00231 ConfigReader::~ConfigReader() +00232 { +00233 } +00234 +00235 +00236 ConfigReader::ConfigReader(std::string filename) : fname(filename) { }; +00237 +00238 std::string ConfigReader::ReadValue(std::string tag, std::string name, int index) +00239 { +00240 char val[MAXBUF]; +00241 ReadConf(fname.c_str(),tag.c_str(),name.c_str(),index,val); +00242 return val; +00243 } +00244 +00245 +00246 int ConfigReader::Enumerate(std::string tag) +00247 { +00248 return EnumConf(fname.c_str(),tag.c_str()); +00249 } +00250 +00251 +00252 bool ConfigReader::Verify() +00253 { +00254 return true; +00255 } +00256 +00257 +00258 FileReader::FileReader(std::string filename) +00259 { +00260 file_cache c; +00261 readfile(c,filename.c_str()); +00262 this->fc = c; +00263 } +00264 +00265 FileReader::FileReader() +00266 { +00267 } +00268 +00269 void FileReader::LoadFile(std::string filename) +00270 { +00271 file_cache c; +00272 readfile(c,filename.c_str()); +00273 this->fc = c; +00274 } +00275 +00276 +00277 FileReader::~FileReader() +00278 { +00279 } +00280 +00281 bool FileReader::Exists() +00282 { +00283 if (fc.size() == 0) +00284 { +00285 return(false); +00286 } +00287 else +00288 { +00289 return(true); +00290 } +00291 } +00292 +00293 std::string FileReader::GetLine(int x) +00294 { +00295 if ((x<0) || (x>fc.size())) +00296 return ""; +00297 return fc[x]; +00298 } +00299 +00300 int FileReader::FileSize() +00301 { +00302 return fc.size(); +00303 } +00304 +00305 +00306 std::vector<Module*> modules(255); +00307 std::vector<ircd_module*> factory(255); +00308 +00309 int MODCOUNT = -1; +00310 +00311 +

    Generated on Fri Apr 2 13:37:27 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/modules_8cpp.html b/docs/module-doc/modules_8cpp.html index aaed85b4e..88f136261 100644 --- a/docs/module-doc/modules_8cpp.html +++ b/docs/module-doc/modules_8cpp.html @@ -7,35 +7,164 @@
    Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

    modules.cpp File Reference

    #include <typeinfo>
    -#include <iostream.h>
    +#include <iostream>
    #include "globals.h"
    #include "modules.h"
    +#include "ctables.h"
    #include "inspircd_io.h"

    Include dependency graph for modules.cpp:

    Include dependency graph
    - - + + +

    Go to the source code of this file. + + + + + - - + + + + + + - + + +

    Compounds

    class  ExtMode

    Typedefs

    typedef std::vector< ExtModeExtModeList
    typedef ExtModeList::iterator ExtModeListIter

    Functions

    vector< Module * > modules (255)
    vector< ircd_module * > factory (255)
    bool ModeDefined (char modechar, int type)
    bool ModeDefinedOn (char modechar, int type)
    bool ModeDefinedOff (char modechar, int type)
    bool AddExtendedMode (char modechar, int type, bool default_on, int params_on, int params_off)
    std::vector< Module * > modules (255)
    std::vector< ircd_module * > factory (255)

    Variables

    int MODCOUNT = -1
    ExtModeList EMode
    int MODCOUNT = -1
    +


    Typedef Documentation

    +

    + + + + +
    + + +
    typedef std::vector<ExtMode> ExtModeList +
    +
    + + + + + +
    +   + + +

    + +

    +Definition at line 28 of file modules.cpp.

    +

    + + + + +
    + + +
    typedef ExtModeList::iterator ExtModeListIter +
    +
    + + + + +
    +   + + +

    + +

    +Definition at line 29 of file modules.cpp. +

    +Referenced by ModeDefined(), ModeDefinedOff(), and ModeDefinedOn().


    Function Documentation

    -

    +

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    bool AddExtendedMode char   modechar,
    int   type,
    bool   default_on,
    int   params_on,
    int   params_off
    +
    + + + + + +
    +   + + +

    + +

    +Definition at line 73 of file modules.cpp. +

    +References EMode. +

    +

    00074 {
    +00075         EMode.push_back( ExtMode (modechar,type,default_on,params_on,params_off));
    +00076         return true;
    +00077 }
    +
    +

    - + @@ -58,13 +187,175 @@ Include dependency graph for modules.cpp:

    +

    vector<ircd_module*> factory std::vector<ircd_module*> factory 255   
    + +
    - + + + + + + + + + + + + + + + + + +
    vector<Module*> modules bool ModeDefined char   modechar,
    int   type
    +
    + + + + + +
    +   + + +

    + +

    +Definition at line 34 of file modules.cpp. +

    +References EMode, and ExtModeListIter. +

    +

    00035 {
    +00036         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    +00037         {
    +00038                 if ((i->modechar == modechar) && (i->type == type))
    +00039                 {
    +00040                         return true;
    +00041                 }
    +00042         }
    +00043         return false;
    +00044 }
    +
    +

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    bool ModeDefinedOff char   modechar,
    int   type
    +
    + + + + + +
    +   + + +

    + +

    +Definition at line 60 of file modules.cpp. +

    +References EMode, and ExtModeListIter. +

    +

    00061 {
    +00062         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    +00063         {
    +00064                 if ((i->modechar == modechar) && (i->type == type))
    +00065                 {
    +00066                         return i->params_when_off;
    +00067                 }
    +00068         }
    +00069         return 0;
    +00070 }
    +
    +

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    bool ModeDefinedOn char   modechar,
    int   type
    +
    + + + + + +
    +   + + +

    + +

    +Definition at line 47 of file modules.cpp. +

    +References EMode, and ExtModeListIter. +

    +

    00048 {
    +00049         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    +00050         {
    +00051                 if ((i->modechar == modechar) && (i->type == type))
    +00052                 {
    +00053                         return i->params_when_on;
    +00054                 }
    +00055         }
    +00056         return 0;
    +00057 }
    +
    +

    + + + - + + + + - - - + + + + + +
    + + + @@ -88,7 +379,33 @@ Include dependency graph for modules.cpp:

    +

    +

    std::vector<Module*> modules 255   
    + + + +
    + + +
    ExtModeList EMode +
    +
    + + + + + +
    +   + + +

    + +

    +Definition at line 31 of file modules.cpp. +

    +Referenced by AddExtendedMode(), ModeDefined(), ModeDefinedOff(), and ModeDefinedOn().

    +

    +Definition at line 309 of file modules.cpp.
    @@ -109,10 +426,10 @@ Include dependency graph for modules.cpp:

    224 of file modules.cpp.
    -


    Generated on Sun Mar 30 19:35:10 2003 for InspIRCd by +
    Generated on Fri Apr 2 13:37:31 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/modules_8cpp__incl.gif b/docs/module-doc/modules_8cpp__incl.gif index 8bda5cc6d..835d4034b 100644 Binary files a/docs/module-doc/modules_8cpp__incl.gif and b/docs/module-doc/modules_8cpp__incl.gif differ diff --git a/docs/module-doc/modules_8h-source.html b/docs/module-doc/modules_8h-source.html index 2a095fcc1..577ffd62a 100644 --- a/docs/module-doc/modules_8h-source.html +++ b/docs/module-doc/modules_8h-source.html @@ -22,135 +22,147 @@ 00014 #define SPARSE 40 00015 #define NONE 50 00016 -00017 #include "dynamic.h" -00018 #include "base.h" -00019 #include <string> -00020 #include <deque> -00021 -00024 typedef deque<string> file_cache; -00025 +00017 #define MT_CHANNEL 1 +00018 #define MT_CLIENT 2 +00019 #define MT_SERVER 3 +00020 +00021 #include "dynamic.h" +00022 #include "base.h" +00023 #include "ctables.h" +00024 #include <string> +00025 #include <deque> 00026 -00027 // This #define allows us to call a method in all -00028 // loaded modules in a readable simple way, e.g.: -00029 // 'FOREACH_MOD OnConnect(user);' -00030 -00031 #define FOREACH_MOD for (int i = 0; i <= MODCOUNT; i++) modules[i]-> -00032 -00033 // class Version holds the version information of a Module, returned -00034 // by Module::GetVersion (thanks RD) +00029 typedef std::deque<std::string> file_cache; +00030 typedef file_cache string_list; +00031 +00032 // This #define allows us to call a method in all +00033 // loaded modules in a readable simple way, e.g.: +00034 // 'FOREACH_MOD OnConnect(user);' 00035 -00040 class Version : public classbase -00041 { -00042 public: -00043 const int Major, Minor, Revision, Build; -00044 Version(int major, int minor, int revision, int build); -00045 }; -00046 -00047 -00053 class Admin : public classbase -00054 { -00055 public: -00056 const string Name, Email, Nick; -00057 Admin(string name,string email,string nick); -00058 }; -00059 -00065 class Module : public classbase -00066 { -00067 public: -00068 -00072 Module(); -00073 -00077 virtual ~Module(); -00078 -00083 virtual Version GetVersion(); +00036 #define FOREACH_MOD for (int i = 0; i <= MODCOUNT; i++) modules[i]-> +00037 +00038 extern void createcommand(char* cmd, handlerfunc f, char flags, int minparams); +00039 +00040 // class Version holds the version information of a Module, returned +00041 // by Module::GetVersion (thanks RD) +00042 +00047 class Version : public classbase +00048 { +00049 public: +00050 const int Major, Minor, Revision, Build; +00051 Version(int major, int minor, int revision, int build); +00052 }; +00053 +00059 class Admin : public classbase +00060 { +00061 public: +00062 const std::string Name, Email, Nick; +00063 Admin(std::string name, std::string email, std::string nick); +00064 }; +00065 +00071 class Module : public classbase +00072 { +00073 public: +00074 +00078 Module(); +00079 +00083 virtual ~Module(); 00084 -00088 virtual void OnUserConnect(userrec* user); -00089 -00093 virtual void OnUserQuit(userrec* user); -00094 -00099 virtual void OnUserJoin(userrec* user, chanrec* channel); +00089 virtual Version GetVersion(); +00090 +00094 virtual void OnUserConnect(userrec* user); +00095 +00099 virtual void OnUserQuit(userrec* user); 00100 -00105 virtual void OnUserPart(userrec* user, chanrec* channel); +00105 virtual void OnUserJoin(userrec* user, chanrec* channel); 00106 -00113 virtual void Module::OnPacketTransmit(char *p); -00114 -00122 virtual void Module::OnPacketReceive(char *p); -00123 -00129 virtual void OnRehash(); -00130 -00137 virtual void Module::OnServerRaw(string &raw, bool inbound); -00138 -00139 }; -00140 -00141 -00147 class Server : public classbase -00148 { -00149 public: -00153 Server(); -00157 virtual ~Server(); -00158 -00162 virtual void SendOpers(string s); -00167 virtual void Log(int level, string s); -00172 virtual void Send(int Socket, string s); -00177 virtual void SendServ(int Socket, string s); -00182 virtual void SendFrom(int Socket, userrec* User, string s); -00187 virtual void SendTo(userrec* Source, userrec* Dest, string s); -00194 virtual void SendChannel(userrec* User, chanrec* Channel, string s,bool IncludeSender); -00199 virtual bool CommonChannels(userrec* u1, userrec* u2); -00207 virtual void SendCommon(userrec* User, string text,bool IncludeSender); -00212 virtual void SendWallops(userrec* User, string text); -00213 -00217 virtual bool IsNick(string nick); -00221 virtual userrec* FindNick(string nick); -00225 virtual chanrec* FindChannel(string channel); -00230 virtual string ChanMode(userrec* User, chanrec* Chan); -00233 virtual string GetServerName(); -00236 virtual string GetNetworkName(); -00242 virtual Admin GetAdmin(); -00243 -00244 }; -00245 -00252 class ConfigReader : public classbase -00253 { -00254 protected: -00257 string fname; -00258 public: -00263 ConfigReader(); // default constructor reads ircd.conf -00267 ConfigReader(string filename); // read a module-specific config -00271 ~ConfigReader(); -00276 string ReadValue(string tag, string name, int index); -00283 int Enumerate(string tag); -00287 bool Verify(); -00288 }; -00289 -00290 -00291 -00297 class FileReader : public classbase -00298 { -00299 file_cache fc; -00300 public: -00305 FileReader(); -00311 FileReader(string filename); -00315 ~FileReader(); -00321 void LoadFile(string filename); -00326 string GetLine(int x); -00332 int FileSize(); -00333 }; -00334 -00335 -00342 class ModuleFactory : public classbase -00343 { -00344 public: -00345 ModuleFactory() { } -00346 virtual ~ModuleFactory() { } -00351 virtual Module * CreateModule() = 0; -00352 }; -00353 -00354 -00355 typedef DLLFactory<ModuleFactory> ircd_module; -00356 -00357 #endif -
    Generated on Sun Mar 30 19:34:54 2003 for InspIRCd by +00111 virtual void OnUserPart(userrec* user, chanrec* channel); +00112 +00119 virtual void Module::OnPacketTransmit(char *p); +00120 +00128 virtual void Module::OnPacketReceive(char *p); +00129 +00135 virtual void OnRehash(); +00136 +00143 virtual void OnServerRaw(std::string &raw, bool inbound); +00144 +00153 virtual bool OnExtendedMode(userrec* user, chanrec* chan, char modechar, int type, bool mode_on, string_list &params); +00154 +00155 }; +00156 +00157 +00163 class Server : public classbase +00164 { +00165 public: +00169 Server(); +00173 virtual ~Server(); +00174 +00178 virtual void SendOpers(std::string s); +00183 virtual void Log(int level, std::string s); +00188 virtual void Send(int Socket, std::string s); +00193 virtual void SendServ(int Socket, std::string s); +00198 virtual void SendFrom(int Socket, userrec* User, std::string s); +00203 virtual void SendTo(userrec* Source, userrec* Dest, std::string s); +00210 virtual void SendChannel(userrec* User, chanrec* Channel, std::string s,bool IncludeSender); +00215 virtual bool CommonChannels(userrec* u1, userrec* u2); +00223 virtual void SendCommon(userrec* User, std::string text,bool IncludeSender); +00228 virtual void SendWallops(userrec* User, std::string text); +00229 +00233 virtual bool IsNick(std::string nick); +00237 virtual userrec* FindNick(std::string nick); +00241 virtual chanrec* FindChannel(std::string channel); +00246 virtual std::string ChanMode(userrec* User, chanrec* Chan); +00249 virtual std::string GetServerName(); +00252 virtual std::string GetNetworkName(); +00258 virtual Admin GetAdmin(); +00276 virtual bool AddExtendedMode(char modechar, int type, bool default_on, int params_when_on, int params_when_off); +00277 +00292 virtual void AddCommand(char* cmd, handlerfunc f, char flags, int minparams); +00293 +00294 }; +00295 +00302 class ConfigReader : public classbase +00303 { +00304 protected: +00307 std::string fname; +00308 public: +00313 ConfigReader(); // default constructor reads ircd.conf +00317 ConfigReader(std::string filename); // read a module-specific config +00321 ~ConfigReader(); +00326 std::string ReadValue(std::string tag, std::string name, int index); +00333 int Enumerate(std::string tag); +00337 bool Verify(); +00338 }; +00339 +00340 +00341 +00347 class FileReader : public classbase +00348 { +00349 file_cache fc; +00350 public: +00355 FileReader(); +00361 FileReader(std::string filename); +00365 ~FileReader(); +00371 void LoadFile(std::string filename); +00376 bool Exists(); +00377 std::string GetLine(int x); +00383 int FileSize(); +00384 }; +00385 +00386 +00393 class ModuleFactory : public classbase +00394 { +00395 public: +00396 ModuleFactory() { } +00397 virtual ~ModuleFactory() { } +00402 virtual Module * CreateModule() = 0; +00403 }; +00404 +00405 +00406 typedef DLLFactory<ModuleFactory> ircd_module; +00407 +00408 #endif +
    Generated on Fri Apr 2 13:37:27 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/modules_8h.html b/docs/module-doc/modules_8h.html index 6bc8a7c8c..2ba5b9dad 100644 --- a/docs/module-doc/modules_8h.html +++ b/docs/module-doc/modules_8h.html @@ -8,13 +8,15 @@ Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

    modules.h File Reference

    #include "dynamic.h"
    #include "base.h"
    +#include "ctables.h"
    #include <string>
    #include <deque>

    Include dependency graph for modules.h:

    Include dependency graph
    - + +

    @@ -47,11 +49,17 @@ This graph shows which files directly or indirectly include this file:

    #define DEFAULT   30
    #define SPARSE   40
    #define NONE   50
    #define FOREACH_MOD   for (int i = 0; i <= MODCOUNT; i++) modules[i]->
    #define MT_CHANNEL   1
    #define MT_CLIENT   2
    #define MT_SERVER   3
    #define FOREACH_MOD   for (int i = 0; i <= MODCOUNT; i++) modules[i]->

    Typedefs

    typedef deque< string > file_cache
     Low level definition of a FileReader classes file cache area.

    typedef DLLFactory< ModuleFactoryircd_module
    typedef std::deque< std::string > file_cache
     Low level definition of a FileReader classes file cache area.

    typedef file_cache string_list
    typedef DLLFactory< ModuleFactoryircd_module

    Functions

    void createcommand (char *cmd, handlerfunc f, char flags, int minparams)


    Define Documentation

    @@ -102,13 +110,13 @@ Definition at line 11 of Definition at line 13 of file modules.h.

    -

    +

    @@ -123,7 +131,79 @@ Definition at line 13 of

    -Definition at line 31 of file modules.h. +Definition at line 36 of file modules.h. + +

    -
    #define FOREACH_MOD   for (int i = 0; i <= MODCOUNT; i++) modules[i]-> + #define FOREACH_MOD   for (int i = 0; i <= MODCOUNT; i++) modules[i]->
    +

    + + + + +
    + + +
    #define MT_CHANNEL   1 +
    +
    + + + + + +
    +   + + +

    + +

    +Definition at line 17 of file modules.h.

    +

    + + + + +
    + + +
    #define MT_CLIENT   2 +
    +
    + + + + + +
    +   + + +

    + +

    +Definition at line 18 of file modules.h.

    +

    + + + + +
    + + +
    #define MT_SERVER   3 +
    +
    + + + +
    +   + + +

    + +

    +Definition at line 19 of file modules.h.

    @@ -199,13 +279,13 @@ Definition at line 12 of


    Typedef Documentation

    -

    +

    @@ -222,12 +302,12 @@ Low level definition of a FileReader

    -Definition at line 24 of file modules.h. +Definition at line 29 of file modules.h.

    -Referenced by FileReader::FileReader(), and FileReader::LoadFile(). +Referenced by FileReader::FileReader(), and FileReader::LoadFile().

    -
    typedef deque<string> file_cache + typedef std::deque<std::string> file_cache
    -

    +

    +Definition at line 406 of file modules.h. + +
    @@ -248,10 +328,87 @@ Referenced by FileReader::F

    -Definition at line 355 of file modules.h.

    +

    + + + + +
    + + +
    typedef file_cache string_list +
    +
    + + + + + +
    +   + + +

    + +

    +Definition at line 30 of file modules.h.

    +


    Function Documentation

    +

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    void createcommand char *   cmd,
    handlerfunc   f,
    char   flags,
    int   minparams
    +
    + + + +
    +   + + +

    + +

    +Referenced by Server::AddCommand().

    -


    Generated on Sun Mar 30 19:35:14 2003 for InspIRCd by +
    Generated on Fri Apr 2 13:37:31 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/modules_8h__incl.gif b/docs/module-doc/modules_8h__incl.gif index 8d4968496..61434f1b5 100644 Binary files a/docs/module-doc/modules_8h__incl.gif and b/docs/module-doc/modules_8h__incl.gif differ diff --git a/docs/module-doc/servers_8cpp-source.html b/docs/module-doc/servers_8cpp-source.html index 8a35f5020..e36a1e279 100644 --- a/docs/module-doc/servers_8cpp-source.html +++ b/docs/module-doc/servers_8cpp-source.html @@ -15,7 +15,7 @@ 00007 #include "servers.h" 00008 #include "inspircd.h" 00009 #include <stdio.h> -00010 #include <map.h> +00010 #include <map> 00011 00012 serverrec::serverrec() 00013 { @@ -46,7 +46,7 @@ 00038 fd = 0; 00039 } 00040 -

    Generated on Sun Mar 30 19:34:54 2003 for InspIRCd by +

    Generated on Fri Apr 2 13:37:27 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/servers_8cpp.html b/docs/module-doc/servers_8cpp.html index 4deb59b75..df236e2ef 100644 --- a/docs/module-doc/servers_8cpp.html +++ b/docs/module-doc/servers_8cpp.html @@ -10,7 +10,7 @@ #include "servers.h"
    #include "inspircd.h"
    #include <stdio.h>
    -#include <map.h>
    +#include <map>

    Include dependency graph for servers.cpp:

    Include dependency graph
    @@ -23,7 +23,7 @@ Include dependency graph for servers.cpp:

    Go to the source code of this file.
    -
    Generated on Sun Mar 30 19:35:16 2003 for InspIRCd by +
    Generated on Fri Apr 2 13:37:31 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/servers_8cpp__incl.gif b/docs/module-doc/servers_8cpp__incl.gif index 1783340d4..515e4087d 100644 Binary files a/docs/module-doc/servers_8cpp__incl.gif and b/docs/module-doc/servers_8cpp__incl.gif differ diff --git a/docs/module-doc/servers_8h-source.html b/docs/module-doc/servers_8h-source.html index e0c6cb504..2074436cf 100644 --- a/docs/module-doc/servers_8h-source.html +++ b/docs/module-doc/servers_8h-source.html @@ -14,7 +14,7 @@ 00006 #include "inspircd_config.h" 00007 #include "connection.h" 00008 #include <string> -00009 #include <map.h> +00009 #include <map> 00010 00011 #ifndef __SERVERS_H__ 00012 #define __SERVERS_H__ @@ -42,11 +42,9 @@ 00058 00059 00060 -00061 typedef map<string, serverrec*> server_list; -00062 -00063 #endif -00064 -

    Generated on Sun Mar 30 19:34:54 2003 for InspIRCd by +00061 #endif +00062 +

    Generated on Fri Apr 2 13:37:27 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/servers_8h.html b/docs/module-doc/servers_8h.html index 0494a236b..7d7049f95 100644 --- a/docs/module-doc/servers_8h.html +++ b/docs/module-doc/servers_8h.html @@ -9,12 +9,12 @@

    servers.h File Reference

    #include "inspircd_config.h"
    #include "connection.h"
    #include <string>
    -#include <map.h>
    +#include <map>

    Include dependency graph for servers.h:

    Include dependency graph
    - +

    @@ -32,8 +32,6 @@ This graph shows which files directly or indirectly include this file:


    Defines

    #define LINK_ACTIVE   1 #define LINK_INACTIVE   0 -

    Typedefs

    -typedef map< string, serverrec * > server_list

    Define Documentation

    @@ -84,32 +82,7 @@ Definition at line 14 of Definition at line 15 of file servers.h. -


    Typedef Documentation

    -

    - - - - -
    - - -
    typedef map<string, serverrec*> server_list -
    -
    - - - - - -
    -   - - -

    - -

    -Definition at line 61 of file servers.h.

    -


    Generated on Sun Mar 30 19:35:19 2003 for InspIRCd by +
    Generated on Fri Apr 2 13:37:32 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/servers_8h__incl.gif b/docs/module-doc/servers_8h__incl.gif index 0f4fa50ff..bd4799098 100644 Binary files a/docs/module-doc/servers_8h__incl.gif and b/docs/module-doc/servers_8h__incl.gif differ diff --git a/docs/module-doc/tree.html b/docs/module-doc/tree.html index 13321d9da..5537b7116 100644 --- a/docs/module-doc/tree.html +++ b/docs/module-doc/tree.html @@ -114,6 +114,7 @@

    File List

    Class Hierarchy

    Compound Members

    File Members

    diff --git a/docs/module-doc/users_8cpp-source.html b/docs/module-doc/users_8cpp-source.html index b586cb13d..fa84b42c1 100644 --- a/docs/module-doc/users_8cpp-source.html +++ b/docs/module-doc/users_8cpp-source.html @@ -58,32 +58,37 @@ 00050 { 00051 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) 00052 { -00053 if (!strcasecmp(i->channel,channel)) -00054 { -00055 return true; -00056 } -00057 } -00058 } -00059 -00060 void userrec::InviteTo(char* channel) -00061 { -00062 Invited i; -00063 strcpy(i.channel,channel); -00064 invites.push_back(i); -00065 } -00066 -00067 void userrec::RemoveInvite(char* channel) -00068 { -00069 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) -00070 { -00071 if (!strcasecmp(i->channel,channel)) -00072 { -00073 invites.erase(i); -00074 return; -00075 } -00076 } -00077 } -
    Generated on Sun Mar 30 19:34:54 2003 for InspIRCd by +00053 if (i->channel) { +00054 if (!strcasecmp(i->channel,channel)) +00055 { +00056 return true; +00057 } +00058 } +00059 } +00060 return false; +00061 } +00062 +00063 void userrec::InviteTo(char* channel) +00064 { +00065 Invited i; +00066 strcpy(i.channel,channel); +00067 invites.push_back(i); +00068 } +00069 +00070 void userrec::RemoveInvite(char* channel) +00071 { +00072 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) +00073 { +00074 if (i->channel) { +00075 if (!strcasecmp(i->channel,channel)) +00076 { +00077 invites.erase(i); +00078 return; +00079 } +00080 } +00081 } +00082 } +
    Generated on Fri Apr 2 13:37:27 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/users_8cpp.html b/docs/module-doc/users_8cpp.html index 5023e8f27..54a8431a1 100644 --- a/docs/module-doc/users_8cpp.html +++ b/docs/module-doc/users_8cpp.html @@ -25,7 +25,7 @@ Include dependency graph for users.cpp:

    Go to the source code of this file.
    -
    Generated on Sun Mar 30 19:35:21 2003 for InspIRCd by +
    Generated on Fri Apr 2 13:37:33 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/users_8h-source.html b/docs/module-doc/users_8h-source.html index 47f4689e1..3934902c8 100644 --- a/docs/module-doc/users_8h-source.html +++ b/docs/module-doc/users_8h-source.html @@ -43,11 +43,11 @@ 00039 char pass[MAXBUF]; 00040 }; 00041 -00044 typedef vector<Invited> InvitedList; +00044 typedef std::vector<Invited> InvitedList; 00045 00046 00047 -00050 typedef vector<ConnectClass> ClassVector; +00050 typedef std::vector<ConnectClass> ClassVector; 00051 00058 class userrec : public connection 00059 { @@ -92,7 +92,7 @@ 00140 00141 00142 #endif -
    Generated on Sun Mar 30 19:34:54 2003 for InspIRCd by +
    Generated on Fri Apr 2 13:37:27 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/users_8h.html b/docs/module-doc/users_8h.html index 181f286bf..183608ec4 100644 --- a/docs/module-doc/users_8h.html +++ b/docs/module-doc/users_8h.html @@ -42,9 +42,9 @@ This graph shows which files directly or indirectly include this file:

    #define CC_ALLOW   0 #define CC_DENY   1

    Typedefs

    -typedef vector< InvitedInvitedList +typedef std::vector< InvitedInvitedList  Holds a complete list of all channels to which a user has been invited and has not yet joined.

    -typedef vector< ConnectClassClassVector +typedef std::vector< ConnectClassClassVector  Holds a complete list of all allow and deny tags from the configuration file (connection classes).


    Define Documentation

    @@ -199,7 +199,7 @@ Definition at line 17 of fi -
    typedef vector<ConnectClass> ClassVector + typedef std::vector<ConnectClass> ClassVector
    @@ -225,7 +225,7 @@ Definition at line 50 of fi -
    typedef vector<Invited> InvitedList + typedef std::vector<Invited> InvitedList
    @@ -245,7 +245,7 @@ Holds a complete list of all channels to which a user has been invited and has n Definition at line 44 of file users.h. -
    Generated on Sun Mar 30 19:35:25 2003 for InspIRCd by +
    Generated on Fri Apr 2 13:37:33 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/include/modules.h b/include/modules.h index d9d04e762..b26554d56 100644 --- a/include/modules.h +++ b/include/modules.h @@ -20,6 +20,7 @@ #include "dynamic.h" #include "base.h" +#include "ctables.h" #include #include @@ -34,6 +35,8 @@ typedef file_cache string_list; #define FOREACH_MOD for (int i = 0; i <= MODCOUNT; i++) modules[i]-> +extern void createcommand(char* cmd, handlerfunc f, char flags, int minparams); + // class Version holds the version information of a Module, returned // by Module::GetVersion (thanks RD) @@ -271,6 +274,22 @@ class Server : public classbase * effects. */ virtual bool AddExtendedMode(char modechar, int type, bool default_on, int params_when_on, int params_when_off); + + /** Adds a command to the command table. + * This allows modules to add extra commands into the command table. You must place a function within your + * module which is is of type handlerfunc: + * + * typedef void (handlerfunc) (char**, int, userrec*); + * ... + * void handle_kill(char **parameters, int pcnt, userrec *user) + * + * When the command is typed, the parameters will be placed into the parameters array (similar to argv) and + * the parameter count will be placed into pcnt (similar to argv). There will never be any less parameters + * than the 'minparams' value you specified when creating the command. The *user parameter is the class of + * the user which caused the command to trigger, who will always have the flag you specified in 'flags' when + * creating the initial command. For example to create an oper only command create the commands with flags='o'. + */ + virtual void AddCommand(char* cmd, handlerfunc f, char flags, int minparams); }; diff --git a/src/InspIRCd.layout b/src/InspIRCd.layout index b54226867..d2493a3e8 100644 --- a/src/InspIRCd.layout +++ b/src/InspIRCd.layout @@ -1,5 +1,5 @@ [Editors] -Focused=1 +Focused=4 Order=1,7,3,2,0,6,5,4,25,24,-1 [Editor_0] @@ -12,10 +12,10 @@ LeftChar=1 [Editor_1] Open=1 -Top=1 -CursorCol=4 -CursorRow=1129 -TopLine=1078 +Top=0 +CursorCol=1 +CursorRow=2505 +TopLine=2476 LeftChar=1 [Editor_2] @@ -36,10 +36,10 @@ LeftChar=1 [Editor_4] Open=1 -Top=0 -CursorCol=19 -CursorRow=59 -TopLine=1 +Top=1 +CursorCol=5 +CursorRow=47 +TopLine=27 LeftChar=1 [Editor_5] @@ -91,7 +91,7 @@ TopLine=1 LeftChar=1 [Editor_11] -Open=1 +Open=0 Top=0 CursorCol=1 CursorRow=1 @@ -107,7 +107,7 @@ TopLine=120 LeftChar=1 [Editor_13] -Open=1 +Open=0 Top=0 CursorCol=60 CursorRow=64 @@ -115,10 +115,10 @@ TopLine=20 LeftChar=1 [Editor_14] -Open=0 +Open=1 Top=0 CursorCol=1 -CursorRow=1 +CursorRow=23 TopLine=1 LeftChar=1 @@ -163,15 +163,15 @@ TopLine=1 LeftChar=1 [Editor_20] -Open=0 +Open=1 Top=0 -CursorCol=13 -CursorRow=271 -TopLine=232 +CursorCol=21 +CursorRow=23 +TopLine=276 LeftChar=1 [Editor_21] -Open=1 +Open=0 Top=0 CursorCol=1 CursorRow=25 diff --git a/src/inspircd.cpp b/src/inspircd.cpp index bb081f720..082576797 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -77,6 +77,7 @@ time_t startup_time = time(NULL); extern vector modules; extern vector factory; +vector fd_reap; extern int MODCOUNT; @@ -958,17 +959,20 @@ int usercount_i(chanrec *c) strcpy(list,""); for (user_hash::const_iterator i = clientlist.begin(); i != clientlist.end(); i++) { - if (has_channel(i->second,c)) + if (i->second) { - if (isnick(i->second->nick)) + if (has_channel(i->second,c)) { - if ((!has_channel(i->second,c)) && (strchr(i->second->modes,'i'))) + if (isnick(i->second->nick)) { - /* user is +i, and source not on the channel, does not show - * nick in NAMES list */ - continue; + if ((!has_channel(i->second,c)) && (strchr(i->second->modes,'i'))) + { + /* user is +i, and source not on the channel, does not show + * nick in NAMES list */ + continue; + } + count++; } - count++; } } } @@ -2465,34 +2469,34 @@ void kill_link(userrec *user,char* reason) log(DEBUG,"kill_link: %s '%s'",user->nick,reason); Write(user->fd,"ERROR :Closing link (%s@%s) [%s]",user->ident,user->host,reason); fdatasync(user->fd); - WriteOpers("*** Client exiting: %s!%s@%s [%s]",user->nick,user->ident,user->host,reason); - FOREACH_MOD OnUserQuit(user); log(DEBUG,"closing fd %d",user->fd); + /* bugfix, cant close() a nonblocking socket (sux!) */ - WriteCommonExcept(user,"QUIT :%s",reason); - Blocking(user->fd); - close(user->fd); - NonBlocking(user->fd); + if (user->registered == 7) { + FOREACH_MOD OnUserQuit(user); + WriteCommonExcept(user,"QUIT :%s",reason); + } + + /* push the socket on a stack of sockets due to be closed at the next opportunity */ + fd_reap.push_back(user->fd); bool do_purge = false; if (user->registered == 7) { + WriteOpers("*** Client exiting: %s!%s@%s [%s]",user->nick,user->ident,user->host,reason); AddWhoWas(user); - do_purge = true; } if (iter != clientlist.end()) { log(DEBUG,"deleting user hash value %d",iter->second); - if (iter->second) { + if ((iter->second) && (user->registered == 7)) { delete iter->second; } clientlist.erase(iter); } - - if (do_purge) { - purge_empty_chans(); - } + + purge_empty_chans(); } @@ -2504,6 +2508,8 @@ void handle_kill(char **parameters, int pcnt, userrec *user) log(DEBUG,"kill: %s %s",parameters[0],parameters[1]); if (u) { + WriteTo(user, u, "KILL %s :%s!%s!%s (%s)", u->nick, ServerName,user->dhost,user->nick,parameters[1]); + // :Brain!brain@NetAdmin.chatspike.net KILL [Brain] :homer!NetAdmin.chatspike.net!Brain (test kill) WriteOpers("*** Local Kill by %s: %s!%s@%s (%s)",user->nick,u->nick,u->ident,u->host,parameters[1]); sprintf(killreason,"Killed (%s (%s))",user->nick,parameters[1]); kill_link(u,killreason); @@ -3318,7 +3324,7 @@ void ConnectUser(userrec *user) void handle_version(char **parameters, int pcnt, userrec *user) { - WriteServ(user->fd,"351 %s :%s %s :%s",user->nick,VERSION,ServerName,SYSTEM); + WriteServ(user->fd,"351 %s :%s %s %s :%s",user->nick,VERSION,"$Id$",ServerName,SYSTEM); } void handle_ping(char **parameters, int pcnt, userrec *user) @@ -4290,6 +4296,8 @@ void handle_link_packet(long theirkey, char* udp_msg, char* udp_host, int udp_po } } +int reap_counter = 0; + int InspIRCd(void) { struct sockaddr_in client, server; @@ -4464,12 +4472,32 @@ int InspIRCd(void) tv.tv_usec = 0; flip_flop++; + reap_counter++; if (flip_flop > 20) { tv.tv_usec = 1; flip_flop = 0; } + vector::iterator niterator; + + + // *FIX* Instead of closing sockets in kill_link when they receive the ERROR :blah line, we should queue + // them in a list, then reap the list every second or so. + if (reap_counter>5000) { + if (fd_reap.size() > 0) { + for( int n = 0; n < fd_reap.size(); n++) + { + Blocking(fd_reap[n]); + close(fd_reap[n]); + NonBlocking(fd_reap[n]); + } + } + fd_reap.clear(); + reap_counter=0; + } + + tv.tv_sec = 0; selectResult = select(MAXSOCKS, &selectFds, NULL, NULL, &tv); diff --git a/src/modules.cpp b/src/modules.cpp index 389fb60e3..820488c99 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -9,6 +9,7 @@ #include #include "globals.h" #include "modules.h" +#include "ctables.h" #include "inspircd_io.h" // class type for holding an extended mode character - internal to core @@ -43,7 +44,7 @@ bool ModeDefined(char modechar, int type) } // returns number of parameters for a custom mode when it is switched on -int ModeDefinedOn(char modechar, int type) +bool ModeDefinedOn(char modechar, int type) { for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) { @@ -56,7 +57,7 @@ int ModeDefinedOn(char modechar, int type) } // returns number of parameters for a custom mode when it is switched on -int ModeDefinedOff(char modechar, int type) +bool ModeDefinedOff(char modechar, int type) { for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) { @@ -84,11 +85,6 @@ Version::Version(int major, int minor, int revision, int build) : Major(major), Admin::Admin(std::string name, std::string email, std::string nick) : Name(name), Email(email), Nick(nick) { }; -// -// Announce to the world that the Module base -// class has been created or destroyed -// - Module::Module() { } Module::~Module() { } void Module::OnUserConnect(userrec* user) { } @@ -124,6 +120,12 @@ void Server::Log(int level, std::string s) log(level,"%s",s.c_str()); } +void Server::AddCommand(char* cmd, handlerfunc f, char flags, int minparams) +{ + createcommand(cmd,f,flags,minparams); +} + + void Server::Send(int Socket, std::string s) { Write(Socket,"%s",s.c_str()); -- cgit v1.2.3