From 60a9969b9471dec190d5526b79cb731ea2e1b751 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 7 Apr 2004 18:21:29 +0000 Subject: Added new documentation git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@424 e03df62e-2008-0410-955e-edbf42e46eb7 --- docs/module-doc/annotated.html | 2 +- docs/module-doc/base_8h-source.html | 2 +- docs/module-doc/base_8h.html | 2 +- docs/module-doc/channels_8cpp-source.html | 2 +- docs/module-doc/channels_8cpp.html | 2 +- docs/module-doc/channels_8h-source.html | 2 +- docs/module-doc/channels_8h.html | 2 +- docs/module-doc/classAdmin-members.html | 2 +- docs/module-doc/classAdmin.html | 14 +- docs/module-doc/classBanItem-members.html | 2 +- docs/module-doc/classBanItem.html | 2 +- docs/module-doc/classConfigReader-members.html | 5 +- docs/module-doc/classConfigReader.html | 114 ++-- docs/module-doc/classConfigReader__coll__graph.gif | Bin 4604 -> 6183 bytes 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/classExtMode-members.html | 2 +- docs/module-doc/classExtMode.html | 16 +- docs/module-doc/classFileReader-members.html | 2 +- docs/module-doc/classFileReader.html | 106 +-- 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 | 2 +- docs/module-doc/classModeParameter-members.html | 2 +- docs/module-doc/classModeParameter.html | 2 +- docs/module-doc/classModule-members.html | 2 +- docs/module-doc/classModule.html | 78 +-- docs/module-doc/classModuleFactory-members.html | 2 +- docs/module-doc/classModuleFactory.html | 12 +- docs/module-doc/classServer-members.html | 32 +- docs/module-doc/classServer.html | 655 ++++++++++-------- docs/module-doc/classVersion-members.html | 2 +- docs/module-doc/classVersion.html | 16 +- docs/module-doc/classchanrec-members.html | 2 +- docs/module-doc/classchanrec.html | 2 +- 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 | 2 +- docs/module-doc/classconnection.html | 4 +- docs/module-doc/classes.html | 2 +- docs/module-doc/classpacket-members.html | 2 +- docs/module-doc/classpacket.html | 2 +- docs/module-doc/classserverrec-members.html | 2 +- docs/module-doc/classserverrec.html | 2 +- docs/module-doc/classucrec-members.html | 2 +- docs/module-doc/classucrec.html | 2 +- docs/module-doc/classuserrec-members.html | 2 +- docs/module-doc/classuserrec.html | 2 +- docs/module-doc/connection_8h-source.html | 2 +- docs/module-doc/connection_8h.html | 2 +- docs/module-doc/ctables_8h-source.html | 2 +- docs/module-doc/ctables_8h.html | 2 +- docs/module-doc/files.html | 2 +- docs/module-doc/functions.html | 51 +- docs/module-doc/globals.html | 2 +- docs/module-doc/graph_legend.html | 2 +- docs/module-doc/hierarchy.html | 2 +- docs/module-doc/inherits.html | 2 +- docs/module-doc/main.html | 2 +- docs/module-doc/modules_8cpp-source.html | 756 +++++++++++---------- docs/module-doc/modules_8cpp.html | 149 ++-- docs/module-doc/modules_8cpp__incl.gif | Bin 17145 -> 19508 bytes docs/module-doc/modules_8h-source.html | 352 +++++----- docs/module-doc/modules_8h.html | 23 +- docs/module-doc/modules_8h__incl.gif | Bin 10354 -> 11698 bytes docs/module-doc/namespaces.html | 2 +- docs/module-doc/namespacestd.html | 2 +- docs/module-doc/servers_8cpp-source.html | 2 +- docs/module-doc/servers_8cpp.html | 2 +- docs/module-doc/servers_8h-source.html | 2 +- docs/module-doc/servers_8h.html | 2 +- docs/module-doc/users_8cpp-source.html | 2 +- docs/module-doc/users_8cpp.html | 2 +- docs/module-doc/users_8h-source.html | 2 +- docs/module-doc/users_8h.html | 2 +- 82 files changed, 1359 insertions(+), 1150 deletions(-) (limited to 'docs/module-doc') diff --git a/docs/module-doc/annotated.html b/docs/module-doc/annotated.html index 8e1782cf2..37b66f08b 100644 --- a/docs/module-doc/annotated.html +++ b/docs/module-doc/annotated.html @@ -31,7 +31,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 Tue Apr 6 21:13:39 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:29 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 000327420..06e8dd74e 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 Tue Apr 6 21:13:19 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:14 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/base_8h.html b/docs/module-doc/base_8h.html index 35ac0526c..e4299027d 100644 --- a/docs/module-doc/base_8h.html +++ b/docs/module-doc/base_8h.html @@ -34,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 Tue Apr 6 21:13:22 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:16 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/channels_8cpp-source.html b/docs/module-doc/channels_8cpp-source.html index 8bb5e3ede..de7bf1fb6 100644 --- a/docs/module-doc/channels_8cpp-source.html +++ b/docs/module-doc/channels_8cpp-source.html @@ -106,7 +106,7 @@ 00098 } 00099 return std::string(""); 00100 } -
Generated on Tue Apr 6 21:13:19 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:14 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/channels_8cpp.html b/docs/module-doc/channels_8cpp.html index 6530b425c..d64d85b60 100644 --- a/docs/module-doc/channels_8cpp.html +++ b/docs/module-doc/channels_8cpp.html @@ -55,7 +55,7 @@ Definition at line 10 Referenced by chanrec::GetModeParameter(), and chanrec::SetCustomModeParam(). -
Generated on Tue Apr 6 21:13:23 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:17 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/channels_8h-source.html b/docs/module-doc/channels_8h-source.html index 9c19f3652..5a4b6d8fd 100644 --- a/docs/module-doc/channels_8h-source.html +++ b/docs/module-doc/channels_8h-source.html @@ -129,7 +129,7 @@ 00207 00208 #endif 00209 -
Generated on Tue Apr 6 21:13:19 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:14 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/channels_8h.html b/docs/module-doc/channels_8h.html index 3c0e91dbb..29dfca93d 100644 --- a/docs/module-doc/channels_8h.html +++ b/docs/module-doc/channels_8h.html @@ -258,7 +258,7 @@ Holds a complete invite list. Definition at line 77 of file channels.h. -
Generated on Tue Apr 6 21:13:25 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:19 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classAdmin-members.html b/docs/module-doc/classAdmin-members.html index b1dd27e83..a3e60dd93 100644 --- a/docs/module-doc/classAdmin-members.html +++ b/docs/module-doc/classAdmin-members.html @@ -14,7 +14,7 @@ NameAdmin NickAdmin ~classbase()classbase [inline] -
Generated on Tue Apr 6 21:13:40 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:30 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classAdmin.html b/docs/module-doc/classAdmin.html index f9a98e2ef..cffa38dd6 100644 --- a/docs/module-doc/classAdmin.html +++ b/docs/module-doc/classAdmin.html @@ -35,7 +35,7 @@ It is constructed by class Server, and

-Definition at line 78 of file modules.h.


Constructor & Destructor Documentation

+Definition at line 79 of file modules.h.

Constructor & Destructor Documentation

@@ -79,9 +79,9 @@ Definition at line 78 of

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

-

00105 : Name(name), Email(email), Nick(nick) { };
+
00106 : Name(name), Email(email), Nick(nick) { };
 
@@ -107,7 +107,7 @@ Definition at line 105

-Definition at line 81 of file modules.h. +Definition at line 82 of file modules.h.

@@ -131,7 +131,7 @@ Definition at line 81 of

-Definition at line 81 of file modules.h. +Definition at line 82 of file modules.h.

@@ -155,12 +155,12 @@ Definition at line 81 of

-Definition at line 81 of file modules.h. +Definition at line 82 of file modules.h.


The documentation for this class was generated from the following files: -
Generated on Tue Apr 6 21:13:40 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:30 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classBanItem-members.html b/docs/module-doc/classBanItem-members.html index 39cd4e14f..5dbdc2c2c 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 Tue Apr 6 21:13:42 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:31 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classBanItem.html b/docs/module-doc/classBanItem.html index dc17cfeda..fdca00743 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 34 of file channels.h.


The documentation for this class was generated from the following file: -
Generated on Tue Apr 6 21:13:42 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:31 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classConfigReader-members.html b/docs/module-doc/classConfigReader-members.html index 1b86845c8..c631c1929 100644 --- a/docs/module-doc/classConfigReader-members.html +++ b/docs/module-doc/classConfigReader-members.html @@ -8,16 +8,17 @@ Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ConfigReader Member List

This is the complete list of members for ConfigReader, including all inherited members. + - + -
ageclassbase
cacheConfigReader [protected]
classbase()classbase [inline]
ConfigReader()ConfigReader
ConfigReader(std::string filename)ConfigReader
Enumerate(std::string tag)ConfigReader
fnameConfigReader [protected]
errorConfigReader [protected]
ReadValue(std::string tag, std::string name, int index)ConfigReader
Verify()ConfigReader
~classbase()classbase [inline]
~ConfigReader()ConfigReader

Generated on Tue Apr 6 21:13:50 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:37 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classConfigReader.html b/docs/module-doc/classConfigReader.html index f19df250a..1e56ef39b 100644 --- a/docs/module-doc/classConfigReader.html +++ b/docs/module-doc/classConfigReader.html @@ -35,8 +35,10 @@ Inheritance diagram for ConfigReader:

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


Protected Attributes

-std::string fnameThe filename of the configuration file, as set by the constructor.

+std::stringstream * cacheThe contents of the configuration file This protected member should never be accessed by a module (and cannot be accessed unless the core is changed).

+bool errorUsed to store errors.


Detailed Description

Allows reading of values from configuration files This class allows a module to read from either the main configuration file (inspircd.conf) or from a module-specified configuration file. @@ -45,7 +47,7 @@ It may either be instantiated with one parameter or none. Constructing the class

-Definition at line 448 of file modules.h.


Constructor & Destructor Documentation

+Definition at line 469 of file modules.h.

Constructor & Destructor Documentation

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

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

-Definition at line 296 of file modules.cpp. +Definition at line 319 of file modules.cpp.

-References fname. +References cache, and error.

-

00297 {
-00298         fname = CONFIG_FILE;
-00299 }
+
00320 {
+00321         this->cache = new std::stringstream(stringstream::in | stringstream::out);
+00322         this->error = LoadConf(CONFIG_FILE,this->cache);
+00323 }
 
@@ -115,9 +118,14 @@ Overloaded constructor.

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

-Definition at line 307 of file modules.cpp. +Definition at line 333 of file modules.cpp.

-

00307 : fname(filename) { };
+References cache, and error.
+

+

00334 {
+00335         this->cache = new std::stringstream(stringstream::in | stringstream::out);
+00336         this->error = LoadConf(filename.c_str(),this->cache);
+00337 };
 
@@ -150,10 +158,14 @@ Default destructor.

This method destroys the ConfigReader class.

-Definition at line 302 of file modules.cpp. +Definition at line 326 of file modules.cpp. +

+References cache.

-

00303 {
-00304 }
+
00327 {
+00328         if (this->cache)
+00329                 delete this->cache;
+00330 }
 
@@ -188,13 +200,11 @@ 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 317 of file modules.cpp. +Definition at line 347 of file modules.cpp.

-References fname. -

-

00318 {
-00319         return EnumConf(fname.c_str(),tag.c_str());
-00320 }
+
00348 {
+00349         return EnumConf(cache,tag.c_str());
+00350 }
 
@@ -243,15 +253,13 @@ 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 309 of file modules.cpp. -

-References fname. +Definition at line 339 of file modules.cpp.

-

00310 {
-00311         char val[MAXBUF];
-00312         ReadConf(fname.c_str(),tag.c_str(),name.c_str(),index,val);
-00313         return val;
-00314 }
+
00340 {
+00341         char val[MAXBUF];
+00342         ReadConf(cache,tag.c_str(),name.c_str(),index,val);
+00343         return val;
+00344 }
 
@@ -282,24 +290,54 @@ References fname.

Returns true if a config file is valid.

-This method is unimplemented and will always return true. +This method is partially implemented and will only return false if the config file does not exist or could not be opened.

-Definition at line 323 of file modules.cpp. +Definition at line 353 of file modules.cpp.

-

00324 {
-00325         return true;
-00326 }
+References error.
+

+

00354 {
+00355         return this->error;
+00356 }
 

Member Data Documentation

-

+

+ + + + +
+ + +
std::stringstream* ConfigReader::cache [protected] +
+
+ + + + + +
+   + + +

+The contents of the configuration file This protected member should never be accessed by a module (and cannot be accessed unless the core is changed). +

+It will contain a pointer to the configuration file data with unneeded data (such as comments) stripped from it. +

+Definition at line 477 of file modules.h. +

+Referenced by ConfigReader(), and ~ConfigReader().

+

@@ -312,18 +350,18 @@ Definition at line 323 +Referenced by ConfigReader(), and Verify().
-
std::string ConfigReader::fname [protected] + bool ConfigReader::error [protected]

-The filename of the configuration file, as set by the constructor. +Used to store errors.

-Definition at line 453 of file modules.h. +Definition at line 480 of file modules.h.

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


The documentation for this class was generated from the following files: -
Generated on Tue Apr 6 21:13:50 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:37 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classConfigReader__coll__graph.gif b/docs/module-doc/classConfigReader__coll__graph.gif index 71ec86efa..24e6715dc 100644 Binary files a/docs/module-doc/classConfigReader__coll__graph.gif and b/docs/module-doc/classConfigReader__coll__graph.gif differ diff --git a/docs/module-doc/classConnectClass-members.html b/docs/module-doc/classConnectClass-members.html index e52b029ec..db1aa1475 100644 --- a/docs/module-doc/classConnectClass-members.html +++ b/docs/module-doc/classConnectClass-members.html @@ -15,7 +15,7 @@ registration_timeoutConnectClass typeConnectClass ~classbase()classbase [inline] -
Generated on Tue Apr 6 21:13:52 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:39 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classConnectClass.html b/docs/module-doc/classConnectClass.html index 3a3fcfbbf..60c0e6e44 100644 --- a/docs/module-doc/classConnectClass.html +++ b/docs/module-doc/classConnectClass.html @@ -171,7 +171,7 @@ Definition at line 37 of fi
The documentation for this class was generated from the following file: -
Generated on Tue Apr 6 21:13:52 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:39 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classExemptItem-members.html b/docs/module-doc/classExemptItem-members.html index 6cd3e1510..6d5875847 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 Tue Apr 6 21:13:56 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:42 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classExemptItem.html b/docs/module-doc/classExemptItem.html index 23035997b..56b8ad60d 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 42 of file channels.h.


The documentation for this class was generated from the following file: -
Generated on Tue Apr 6 21:13:56 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:42 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classExtMode-members.html b/docs/module-doc/classExtMode-members.html index d8120c081..db605f8b3 100644 --- a/docs/module-doc/classExtMode-members.html +++ b/docs/module-doc/classExtMode-members.html @@ -13,7 +13,7 @@ params_when_offExtMode params_when_onExtMode typeExtMode -
Generated on Tue Apr 6 21:13:57 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:43 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classExtMode.html b/docs/module-doc/classExtMode.html index 40350bd95..1d86b7641 100644 --- a/docs/module-doc/classExtMode.html +++ b/docs/module-doc/classExtMode.html @@ -74,9 +74,9 @@

-Definition at line 25 of file modules.cpp. +Definition at line 26 of file modules.cpp.

-

00025 : modechar(mc), type(ty), needsoper(oper), params_when_on(p_on), params_when_off(p_off) { };
+
00026 : modechar(mc), type(ty), needsoper(oper), params_when_on(p_on), params_when_off(p_off) { };
 
@@ -102,7 +102,7 @@ Definition at line 25 o

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

@@ -126,7 +126,7 @@ Definition at line 20 o

-Definition at line 24 of file modules.cpp. +Definition at line 25 of file modules.cpp.

@@ -150,7 +150,7 @@ Definition at line 24 o

-Definition at line 23 of file modules.cpp. +Definition at line 24 of file modules.cpp.

@@ -174,7 +174,7 @@ Definition at line 23 o

-Definition at line 22 of file modules.cpp. +Definition at line 23 of file modules.cpp.

@@ -198,12 +198,12 @@ Definition at line 22 o

-Definition at line 21 of file modules.cpp. +Definition at line 22 of file modules.cpp.


The documentation for this class was generated from the following file: -
Generated on Tue Apr 6 21:13:57 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:43 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classFileReader-members.html b/docs/module-doc/classFileReader-members.html index 19d5078e6..449dbb019 100644 --- a/docs/module-doc/classFileReader-members.html +++ b/docs/module-doc/classFileReader-members.html @@ -18,7 +18,7 @@ LoadFile(std::string filename)FileReader ~classbase()classbase [inline] ~FileReader()FileReader -
Generated on Tue Apr 6 21:13:59 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:44 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classFileReader.html b/docs/module-doc/classFileReader.html index 54dfd90e2..000c829b8 100644 --- a/docs/module-doc/classFileReader.html +++ b/docs/module-doc/classFileReader.html @@ -31,8 +31,8 @@ Inheritance diagram for FileReader:

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

bool Exists () - Retrieve one line from the file.

std::string GetLine (int x) + Retrieve one line from the file.

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


Private Attributes

@@ -45,7 +45,7 @@ This class contains methods for read-only manipulation of a text file in memory.

-Definition at line 493 of file modules.h.


Constructor & Destructor Documentation

+Definition at line 522 of file modules.h.

Constructor & Destructor Documentation

@@ -75,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 336 of file modules.cpp. +Definition at line 366 of file modules.cpp.

-

00337 {
-00338 }
+
00367 {
+00368 }
 
@@ -112,15 +112,15 @@ 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.

-Definition at line 329 of file modules.cpp. +Definition at line 359 of file modules.cpp.

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

-

00330 {
-00331         file_cache c;
-00332         readfile(c,filename.c_str());
-00333         this->fc = c;
-00334 }
+
00360 {
+00361         file_cache c;
+00362         readfile(c,filename.c_str());
+00363         this->fc = c;
+00364 }
 
@@ -153,10 +153,10 @@ Default destructor.

This deletes the memory allocated to the file.

-Definition at line 348 of file modules.cpp. +Definition at line 378 of file modules.cpp.

-

00349 {
-00350 }
+
00379 {
+00380 }
 
@@ -186,24 +186,22 @@ Definition at line 348

-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 352 of file modules.cpp. +Definition at line 382 of file modules.cpp.

-References fc. +References fc.

-

00353 {
-00354         if (fc.size() == 0)
-00355         {
-00356                 return(false);
-00357         }
-00358         else
-00359         {
-00360                 return(true);
-00361         }
-00362 }
+
00383 {
+00384         if (fc.size() == 0)
+00385         {
+00386                 return(false);
+00387         }
+00388         else
+00389         {
+00390                 return(true);
+00391         }
+00392 }
 
@@ -236,13 +234,13 @@ 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 371 of file modules.cpp. +Definition at line 401 of file modules.cpp.

-References fc. +References fc.

-

00372 {
-00373         return fc.size();
-00374 }
+
00402 {
+00403         return fc.size();
+00404 }
 
@@ -272,17 +270,19 @@ References fc.

- +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 364 of file modules.cpp. +Definition at line 394 of file modules.cpp.

-References fc. +References fc.

-

00365 {
-00366         if ((x<0) || (x>fc.size()))
-00367                 return "";
-00368         return fc[x];
-00369 }
+
00395 {
+00396         if ((x<0) || (x>fc.size()))
+00397                 return "";
+00398         return fc[x];
+00399 }
 
@@ -316,15 +316,15 @@ 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.

-Definition at line 340 of file modules.cpp. +Definition at line 370 of file modules.cpp.

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

-

00341 {
-00342         file_cache c;
-00343         readfile(c,filename.c_str());
-00344         this->fc = c;
-00345 }
+
00371 {
+00372         file_cache c;
+00373         readfile(c,filename.c_str());
+00374         this->fc = c;
+00375 }
 
@@ -350,14 +350,14 @@ References fc, and

-Definition at line 495 of file modules.h. +Definition at line 524 of file modules.h.

-Referenced by Exists(), 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 Tue Apr 6 21:13:59 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:44 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classHostItem-members.html b/docs/module-doc/classHostItem-members.html index c38516921..eda9c2842 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 Tue Apr 6 21:14:01 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:45 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classHostItem.html b/docs/module-doc/classHostItem.html index c414e50ea..569fb0bc5 100644 --- a/docs/module-doc/classHostItem.html +++ b/docs/module-doc/classHostItem.html @@ -181,7 +181,7 @@ Definition at line 21 of
The documentation for this class was generated from the following file: -
Generated on Tue Apr 6 21:14:01 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:45 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classInviteItem-members.html b/docs/module-doc/classInviteItem-members.html index 2698d97dc..657d9c637 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 Tue Apr 6 21:14:04 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:47 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classInviteItem.html b/docs/module-doc/classInviteItem.html index 16beb7763..fe9bea3b2 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 50 of file channels.h.


The documentation for this class was generated from the following file: -
Generated on Tue Apr 6 21:14:04 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:47 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classInvited-members.html b/docs/module-doc/classInvited-members.html index 837df1cfc..199390a0c 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 Tue Apr 6 21:14:02 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:46 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classInvited.html b/docs/module-doc/classInvited.html index 6e276c7a6..f8768aa6c 100644 --- a/docs/module-doc/classInvited.html +++ b/docs/module-doc/classInvited.html @@ -58,7 +58,7 @@ Referenced by userrec::Invite
The documentation for this class was generated from the following file:
-
Generated on Tue Apr 6 21:14:02 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:46 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classModeParameter-members.html b/docs/module-doc/classModeParameter-members.html index f5798aeed..20ba3d46b 100644 --- a/docs/module-doc/classModeParameter-members.html +++ b/docs/module-doc/classModeParameter-members.html @@ -13,7 +13,7 @@ modeModeParameter parameterModeParameter ~classbase()classbase [inline] -
Generated on Tue Apr 6 21:14:06 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:49 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classModeParameter.html b/docs/module-doc/classModeParameter.html index cf5fab601..164a0b9b7 100644 --- a/docs/module-doc/classModeParameter.html +++ b/docs/module-doc/classModeParameter.html @@ -114,7 +114,7 @@ Referenced by chanrec::Set
The documentation for this class was generated from the following file:
-
Generated on Tue Apr 6 21:14:06 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:49 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classModule-members.html b/docs/module-doc/classModule-members.html index 92f1e2261..33dca5d0e 100644 --- a/docs/module-doc/classModule-members.html +++ b/docs/module-doc/classModule-members.html @@ -28,7 +28,7 @@ OnWhois(userrec *source, userrec *dest)Module [virtual] ~classbase()classbase [inline] ~Module()Module [virtual] -
Generated on Tue Apr 6 21:14:07 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:50 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classModule.html b/docs/module-doc/classModule.html index 8520f7bbc..6609129f4 100644 --- a/docs/module-doc/classModule.html +++ b/docs/module-doc/classModule.html @@ -66,7 +66,7 @@ All modules must inherit from this class, its methods will be called when irc se

-Definition at line 90 of file modules.h.


Constructor & Destructor Documentation

+Definition at line 91 of file modules.h.

Constructor & Destructor Documentation

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

-Definition at line 107 of file modules.cpp. +Definition at line 108 of file modules.cpp.

-

00107 { }
+
00108 { }
 
@@ -131,9 +131,9 @@ Default destructor destroys a module class.

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

-

00108 { }
+
00109 { }
 
@@ -167,9 +167,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 119 of file modules.cpp. +Definition at line 120 of file modules.cpp.

-

00119 { return Version(1,0,0,0); }
+
00120 { return Version(1,0,0,0); }
 
@@ -234,11 +234,11 @@ Definition at line 119

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 a channel mode, target is a chanrec*, and if it is a user mode, target is a userrec*. You must cast this value yourself to make use of it. +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 a channel mode, target is a chanrec*, and if it is a user mode, target is a userrec*. You must cast this value yourself to make use of it.

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

-

00118 { }
+
00119 { }
 
@@ -273,9 +273,9 @@ Called whenever a user types /INFO. The userrec will contain the information of the user who typed the command. Modules may use this method to output their own credits in /INFO (which is the ircd's version of an about box). It is purposefully not possible to modify any info that has already been output, or halt the list. You must write a 371 numeric to the user, containing your info in the following format:

:information here

-Definition at line 121 of file modules.cpp. +Definition at line 122 of file modules.cpp.

-

00121 { };
+
00122 { };
 
@@ -309,9 +309,9 @@ Called whenever a user opers locally.

The userrec will contain the oper mode 'o' as this function is called after any modifications are made to the user's structure by the core.

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

-

00120 { };
+
00121 { };
 
@@ -345,9 +345,9 @@ Called after a packet is received from another irc server.

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 immediately after the packet is received but before any other operations with the core of the ircd.

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

-

00114 { }
+
00115 { }
 
@@ -381,9 +381,9 @@ 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.

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

-

00113 { }
+
00114 { }
 
@@ -416,9 +416,9 @@ 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 115 of file modules.cpp. +Definition at line 116 of file modules.cpp.

-

00115 { }
+
00116 { }
 
@@ -461,9 +461,9 @@ 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 116 of file modules.cpp. +Definition at line 117 of file modules.cpp.

-

00116 { }
+
00117 { }
 
@@ -497,9 +497,9 @@ Called when a user connects.

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

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

-

00109 { }
+
00110 { }
 
@@ -542,9 +542,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 111 of file modules.cpp. +Definition at line 112 of file modules.cpp.

-

00111 { }
+
00112 { }
 
@@ -587,9 +587,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 112 of file modules.cpp. +Definition at line 113 of file modules.cpp.

-

00112 { }
+
00113 { }
 
@@ -640,9 +640,9 @@ Returning any nonzero value from this function stops the process immediately, ca IMPORTANT NOTE!

If the user joins a NEW channel which does not exist yet, OnUserPreJoin will be called BEFORE the channel record is created. This will cause chanrec* chan to be NULL. There is very little you can do in form of processing on the actual channel record at this point, however the channel NAME will still be passed in char* cname, so that you could for example implement a channel blacklist or whitelist, etc.

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

-

00117 { return 0; }
+
00118 { return 0; }
 
@@ -697,9 +697,9 @@ Called whenever a user is about to PRIVMSG A user or a channel, before any proce

Returning any nonzero value from this function stops the process immediately, causing no output to be sent to the user by the core. If you do this you must produce your own numerics, notices etc. This is useful for modules which may want to filter or redirect messages. target_type can be one of TYPE_USER or TYPE_CHANNEL. If the target_type value is a user, you must cast dest to a userrec* otherwise you must cast it to a chanrec*, this is the details of where the message is destined to be sent.

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

-

00123 { return 0; };
+
00124 { return 0; };
 
@@ -754,9 +754,9 @@ Called whenever a user is about to NOTICE A user or a channel, before any proces

Returning any nonzero value from this function stops the process immediately, causing no output to be sent to the user by the core. If you do this you must produce your own numerics, notices etc. This is useful for modules which may want to filter or redirect messages. target_type can be one of TYPE_USER or TYPE_CHANNEL. If the target_type value is a user, you must cast dest to a userrec* otherwise you must cast it to a chanrec*, this is the details of where the message is destined to be sent.

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

-

00124 { return 0; };
+
00125 { return 0; };
 
@@ -790,9 +790,9 @@ Called when a user quits.

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

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

-

00110 { }
+
00111 { }
 
@@ -835,15 +835,15 @@ Called whenever a /WHOIS is performed on a local user.

The source parameter contains the details of the user who issued the WHOIS command, and the dest parameter contains the information of the user they are whoising.

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

-

00122 { };
+
00123 { };
 

The documentation for this class was generated from the following files: -
Generated on Tue Apr 6 21:14:07 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:50 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classModuleFactory-members.html b/docs/module-doc/classModuleFactory-members.html index cf9858b06..523c611a4 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 Tue Apr 6 21:14:09 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:51 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classModuleFactory.html b/docs/module-doc/classModuleFactory.html index 851e1e646..0dd282315 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 539 of file modules.h.


Constructor & Destructor Documentation

+Definition at line 574 of file modules.h.

Constructor & Destructor Documentation

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

-Definition at line 542 of file modules.h. +Definition at line 577 of file modules.h.

-

00542 { }
+
00577 { }
 
@@ -95,9 +95,9 @@ Definition at line 542 of

-Definition at line 543 of file modules.h. +Definition at line 578 of file modules.h.

-

00543 { }
+
00578 { }
 
@@ -134,7 +134,7 @@ Your inherited class of ModuleFactory must return a pointer to your modules.h -
Generated on Tue Apr 6 21:14:09 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:51 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classServer-members.html b/docs/module-doc/classServer-members.html index f00c656b2..7234bba5f 100644 --- a/docs/module-doc/classServer-members.html +++ b/docs/module-doc/classServer-members.html @@ -7,37 +7,39 @@
Main Page   Namespace List   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 requires_oper, int params_when_on, int params_when_off)Server [virtual]
AddCommand(char *cmd, handlerfunc f, char flags, int minparams)Server [virtual]
AddExtendedMode(char modechar, int type, bool requires_oper, int params_when_on, int params_when_off)Server [virtual]
ageclassbase
ChangeUserNick(userrec *user, std::string nickname)Server [virtual]
ChanMode(userrec *User, chanrec *Chan)Server [virtual]
ChangeUserNick(userrec *user, std::string nickname)Server [virtual]
ChanMode(userrec *User, chanrec *Chan)Server [virtual]
classbase()classbase [inline]
CommonChannels(userrec *u1, userrec *u2)Server [virtual]
FindChannel(std::string channel)Server [virtual]
FindNick(std::string nick)Server [virtual]
GetAdmin()Server [virtual]
GetNetworkName()Server [virtual]
GetServerName()Server [virtual]
CountUsers(chanrec *c)Server [virtual]
FindChannel(std::string channel)Server [virtual]
FindNick(std::string nick)Server [virtual]
GetAdmin()Server [virtual]
GetNetworkName()Server [virtual]
GetServerName()Server [virtual]
IsNick(std::string nick)Server [virtual]
JoinUserToChannel(userrec *user, std::string cname, std::string key)Server [virtual]
Log(int level, std::string s)Server [virtual]
QuitUser(userrec *user, std::string reason)Server [virtual]
MatchText(std::string sliteral, std::string spattern)Server [virtual]
PartUserFromChannel(userrec *user, std::string cname, std::string reason)Server [virtual]
QuitUser(userrec *user, std::string reason)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]
SendMode(char **parameters, int pcnt, userrec *user)Server [virtual]
SendMode(char **parameters, int pcnt, userrec *user)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]
SendToModeMask(std::string modes, int flags, std::string text)Server [virtual]
SendToModeMask(std::string modes, int flags, std::string text)Server [virtual]
SendWallops(userrec *User, std::string text)Server [virtual]
Server()Server
Server::JoinUserToChannel(userrec *user, std::string cname, std::string key)Server [virtual]
Server::PartUserFromChannel(userrec *user, std::string cname, std::string reason)Server [virtual]
~classbase()classbase [inline]
~Server()Server [virtual]

Generated on Tue Apr 6 21:14:13 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:54 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classServer.html b/docs/module-doc/classServer.html index a37bd6257..37cd97528 100644 --- a/docs/module-doc/classServer.html +++ b/docs/module-doc/classServer.html @@ -48,34 +48,38 @@ Inheritance diagram for Server:



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

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

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

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

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

-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 requires_oper, 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.

-virtual void SendMode (char **parameters, int pcnt, userrec *user) - Sends a servermode.

-virtual void SendToModeMask (std::string modes, int flags, std::string text) - Sends to all users matching a mode mask You must specify one or more usermodes as the first parameter.

-virtual chanrecServer::JoinUserToChannel (userrec *user, std::string cname, std::string key) - Forces a user to join a channel.

-virtual chanrecServer::PartUserFromChannel (userrec *user, std::string cname, std::string reason) - Forces a user to part a channel.

-virtual void ChangeUserNick (userrec *user, std::string nickname) - Forces a user nickchange.

-virtual void QuitUser (userrec *user, std::string reason) - Forces a user to quit with the specified reason.

+virtual int CountUsers (chanrec *c) + Returns a count of the number of users on a channel.

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

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

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

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

+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 requires_oper, 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.

+virtual void SendMode (char **parameters, int pcnt, userrec *user) + Sends a servermode.

+virtual void SendToModeMask (std::string modes, int flags, std::string text) + Sends to all users matching a mode mask You must specify one or more usermodes as the first parameter.

+virtual chanrecJoinUserToChannel (userrec *user, std::string cname, std::string key) + Forces a user to join a channel.

+virtual chanrecPartUserFromChannel (userrec *user, std::string cname, std::string reason) + Forces a user to part a channel.

+virtual void ChangeUserNick (userrec *user, std::string nickname) + Forces a user nickchange.

+virtual void QuitUser (userrec *user, std::string reason) + Forces a user to quit with the specified reason.

+virtual bool MatchText (std::string sliteral, std::string spattern) + Matches text against a glob pattern.


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. @@ -84,7 +88,7 @@ All modules should instantiate at least one copy of this class, and use its memb

-Definition at line 239 of file modules.h.


Constructor & Destructor Documentation

+Definition at line 240 of file modules.h.

Constructor & Destructor Documentation

@@ -114,10 +118,10 @@ Default constructor.

Creates a Server object.

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

-

00131 {
-00132 }
+
00132 {
+00133 }
 
@@ -150,15 +154,15 @@ Default destructor.

Destroys a Server object.

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

-

00135 {
-00136 }
+
00136 {
+00137 }
 

Member Function Documentation

-

+

@@ -211,17 +215,17 @@ This allows modules to add extra commands into the command table. You must place 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 174 of file modules.cpp. +Definition at line 183 of file modules.cpp.

References createcommand().

-

00175 {
-00176         createcommand(cmd,f,flags,minparams);
-00177 }
+
00184 {
+00185         createcommand(cmd,f,flags,minparams);
+00186 }
 
-

+

@@ -278,32 +282,32 @@ Adds an extended mode letter which is parsed by a module This allows modules to

+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. requires_oper is used with MT_CLIENT type modes only to indicate the mode can only be set or unset by an oper. If this is used for MT_CHANNEL type modes it is ignored. 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 +k, 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 275 of file modules.cpp. -

-References DoAddExtendedMode(), MT_CLIENT, and MT_SERVER. -

-

00276 {
-00277         if (type == MT_SERVER)
-00278         {
-00279                 log(DEBUG,"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion");
-00280                 return false;
-00281         }
-00282         if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT))
-00283         {
-00284                 log(DEBUG,"*** API ERROR *** Parameters on MT_CLIENT modes are not supported");
-00285                 return false;
-00286         }
-00287         if ((params_when_on>1) || (params_when_off>1))
-00288         {
-00289                 log(DEBUG,"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported");
-00290                 return false;
-00291         }
-00292         return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off);
-00293 }
+Definition at line 293 of file modules.cpp.
+

+References DoAddExtendedMode(), MT_CLIENT, and MT_SERVER. +

+

00294 {
+00295         if (type == MT_SERVER)
+00296         {
+00297                 log(DEBUG,"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion");
+00298                 return false;
+00299         }
+00300         if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT))
+00301         {
+00302                 log(DEBUG,"*** API ERROR *** Parameters on MT_CLIENT modes are not supported");
+00303                 return false;
+00304         }
+00305         if ((params_when_on>1) || (params_when_off>1))
+00306         {
+00307                 log(DEBUG,"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported");
+00308                 return false;
+00309         }
+00310         return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off);
+00311 }
 
-

+

@@ -342,15 +346,15 @@ Forces a user nickchange.

This command works similarly to SVSNICK, and can be used to implement Q-lines etc. If you specify an invalid nickname, the nick change will be dropped and the target user will receive the error numeric for it.

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

-

00159 {
-00160         force_nickchange(user,nickname.c_str());
-00161 }
+
00168 {
+00169         force_nickchange(user,nickname.c_str());
+00170 }
 
-

+

@@ -389,11 +393,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 253 of file modules.cpp. +Definition at line 271 of file modules.cpp.

-

00254 {
-00255         return cmode(User,Chan);
-00256 }
+
00272 {
+00273         return cmode(User,Chan);
+00274 }
 
@@ -436,15 +440,53 @@ 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 216 of file modules.cpp. +Definition at line 234 of file modules.cpp.

-

00217 {
-00218         return (common_channels(u1,u2) != 0);
-00219 }
+
00235 {
+00236         return (common_channels(u1,u2) != 0);
+00237 }
 
-

+

+ + + + +
+ + + + + + + + + + +
int Server::CountUsers chanrec  c [virtual]
+
+ + + + + +
+   + + +

+Returns a count of the number of users on a channel. +

+This will NEVER be 0, as if the chanrec exists, it will have at least one user in the channel. +

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

+

00314 {
+00315         return usercount(c);
+00316 }
+
+

@@ -474,15 +516,15 @@ 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 248 of file modules.cpp. +Definition at line 266 of file modules.cpp.

-

00249 {
-00250         return FindChan(channel.c_str());
-00251 }
+
00267 {
+00268         return FindChan(channel.c_str());
+00269 }
 
-

+

@@ -512,15 +554,15 @@ 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 243 of file modules.cpp. +Definition at line 261 of file modules.cpp.

-

00244 {
-00245         return Find(nick);
-00246 }
+
00262 {
+00263         return Find(nick);
+00264 }
 
-

+

@@ -549,15 +591,15 @@ 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 268 of file modules.cpp. +Definition at line 286 of file modules.cpp.

-

00269 {
-00270         return Admin(getadminname(),getadminemail(),getadminnick());
-00271 }
+
00287 {
+00288         return Admin(getadminname(),getadminemail(),getadminnick());
+00289 }
 
-

+

@@ -586,15 +628,15 @@ Returns the network name, global to all linked servers.

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

-

00264 {
-00265         return getnetworkname();
-00266 }
+
00282 {
+00283         return getnetworkname();
+00284 }
 
-

+

@@ -623,11 +665,11 @@ Returns the server name of the server where the module is loaded.

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

-

00259 {
-00260         return getservername();
-00261 }
+
00277 {
+00278         return getservername();
+00279 }
 
@@ -661,11 +703,64 @@ Returns true if a nick is valid.

Nicks for unregistered connections will return false.

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

+

00257 {
+00258         return (isnick(nick.c_str()) != 0);
+00259 }
+
+ + +

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
chanrec * Server::JoinUserToChannel userrec  user,
std::string   cname,
std::string   key
[virtual]
+
+ + + +
+   + + +

+Forces a user to join a channel. +

+This is similar to svsjoin and can be used to implement redirection, etc. On success, the return value is a valid pointer to a chanrec* of the channel the user was joined to. On failure, the result is NULL. +

+Definition at line 157 of file modules.cpp.

-

00239 {
-00240         return (isnick(nick.c_str()) != 0);
-00241 }
+
00158 {
+00159         return add_channel(user,cname.c_str(),key.c_str());
+00160 }
 
@@ -708,15 +803,118 @@ 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 169 of file modules.cpp. +Definition at line 178 of file modules.cpp. +

+

00179 {
+00180         log(level,"%s",s.c_str());
+00181 }
+
+ + +

+ + + + +
+ + + + + + + + + + + + + + + + + + + +
bool Server::MatchText std::string   sliteral,
std::string   spattern
[virtual]
+
+ + + +
+   + + +

+Matches text against a glob pattern.

-

00170 {
-00171         log(level,"%s",s.c_str());
-00172 }
+Uses the ircd's internal matching function to match string against a globbing pattern, e.g. *!*@*.com Returns true if the literal successfully matches the pattern, false if otherwise.
+

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

+

00145 {
+00146         char literal[MAXBUF],pattern[MAXBUF];
+00147         strncpy(literal,sliteral.c_str(),MAXBUF);
+00148         strncpy(pattern,spattern.c_str(),MAXBUF);
+00149         return match(literal,pattern);
+00150 }
 
-

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
chanrec * Server::PartUserFromChannel userrec  user,
std::string   cname,
std::string   reason
[virtual]
+
+ + + + + +
+   + + +

+Forces a user to part a channel. +

+This is similar to svspart and can be used to implement redirection, etc. Although the return value of this function is a pointer to a channel record, the returned data is undefined and should not be read or written to. This behaviour may be changed in a future version. +

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

+

00163 {
+00164         return del_channel(user,cname.c_str(),reason.c_str());
+00165 }
+
+

@@ -757,11 +955,11 @@ To the user, it will appear as if they typed /QUIT themselves, except for the fa WARNING!

Once you call this function, userrec* user will immediately become INVALID. You MUST NOT write to, or read from this pointer after calling the QuitUser method UNDER ANY CIRCUMSTANCES! The best course of action after calling this method is to immediately bail from your handler.

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

-

00164 {
-00165         kill_link(user,reason.c_str());
-00166 }
+
00173 {
+00174         kill_link(user,reason.c_str());
+00175 }
 
@@ -804,11 +1002,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 184 of file modules.cpp. +Definition at line 193 of file modules.cpp.

-

00185 {
-00186         Write(Socket,"%s",s.c_str());
-00187 }
+
00194 {
+00195         Write(Socket,"%s",s.c_str());
+00196 }
 
@@ -863,18 +1061,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 204 of file modules.cpp. -

-

00205 {
-00206         if (IncludeSender)
-00207         {
-00208                 WriteChannel(Channel,User,"%s",s.c_str());
-00209         }
-00210         else
-00211         {
-00212                 ChanExceptSender(Channel,User,"%s",s.c_str());
-00213         }
-00214 }
+Definition at line 222 of file modules.cpp.
+

+

00223 {
+00224         if (IncludeSender)
+00225         {
+00226                 WriteChannel(Channel,User,"%s",s.c_str());
+00227         }
+00228         else
+00229         {
+00230                 ChanExceptSender(Channel,User,"%s",s.c_str());
+00231         }
+00232 }
 
@@ -923,18 +1121,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 221 of file modules.cpp. -

-

00222 {
-00223         if (IncludeSender)
-00224         {
-00225                 WriteCommon(User,"%s",text.c_str());
-00226         }
-00227         else
-00228         {
-00229                 WriteCommonExcept(User,"%s",text.c_str());
-00230         }
-00231 }
+Definition at line 239 of file modules.cpp.
+

+

00240 {
+00241         if (IncludeSender)
+00242         {
+00243                 WriteCommon(User,"%s",text.c_str());
+00244         }
+00245         else
+00246         {
+00247                 WriteCommonExcept(User,"%s",text.c_str());
+00248         }
+00249 }
 
@@ -983,15 +1181,15 @@ 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 194 of file modules.cpp. +Definition at line 203 of file modules.cpp.

-

00195 {
-00196         WriteFrom(Socket,User,"%s",s.c_str());
-00197 }
+
00204 {
+00205         WriteFrom(Socket,User,"%s",s.c_str());
+00206 }
 
-

+

@@ -1043,13 +1241,13 @@ modes[2] = user->nick;

Srv->SendMode(modes,3,user);

The modes will originate from the server where the command was issued, however responses (e.g. numerics) will be sent to the user you provide as the third parameter. You must be sure to get the number of parameters correct in the pcnt parameter otherwise you could leave your server in an unstable state!

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

References server_mode().

-

00180 {
-00181         server_mode(parameters,pcnt,user);
-00182 }
+
00189 {
+00190         server_mode(parameters,pcnt,user);
+00191 }
 
@@ -1083,11 +1281,11 @@ Sends text to all opers.

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

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

-

00139 {
-00140         WriteOpers("%s",s.c_str());
-00141 }
+
00140 {
+00141         WriteOpers("%s",s.c_str());
+00142 }
 
@@ -1130,11 +1328,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 189 of file modules.cpp. +Definition at line 198 of file modules.cpp.

-

00190 {
-00191         WriteServ(Socket,"%s",s.c_str());
-00192 }
+
00199 {
+00200         WriteServ(Socket,"%s",s.c_str());
+00201 }
 
@@ -1181,17 +1379,32 @@ Definition at line 189

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) +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) If you specify NULL as the source, then the data will originate from the local server, e.g. instead of:

+:user!ident TEXT

+The format will become:

+:localserver TEXT

+Which is useful for numerics and server notices to single users, etc.

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

-

00200 {
-00201         WriteTo(Source,Dest,"%s",s.c_str());
-00202 }
+References connection::fd.
+

+

00209 {
+00210         if (!Source)
+00211         {
+00212                 // if source is NULL, then the message originates from the local server
+00213                 Write(Dest->fd,":%s %s",this->GetServerName().c_str(),s.c_str());
+00214         }
+00215         else
+00216         {
+00217                 // otherwise it comes from the user specified
+00218                 WriteTo(Source,Dest,"%s",s.c_str());
+00219         }
+00220 }
 
-

+

@@ -1238,11 +1451,11 @@ These can be RFC specified modes such as +i, or module provided modes, including Serv->SendToModeMask("xi", WM_OR, "m00");

Then the text 'm00' will be sent to all users with EITHER mode x or i. Conversely if you used WM_AND, the user must have both modes set to receive the message.

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

-

00144 {
-00145         WriteMode(modes.c_str(),flags,"%s",text.c_str());
-00146 }
+
00153 {
+00154         WriteMode(modes.c_str(),flags,"%s",text.c_str());
+00155 }
 
@@ -1285,109 +1498,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 233 of file modules.cpp. +Definition at line 251 of file modules.cpp.

-

00234 {
-00235         WriteWallOps(User,"%s",text.c_str());
-00236 }
+
00252 {
+00253         WriteWallOps(User,"%s",text.c_str());
+00254 }
 
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
virtual chanrec* Server::Server::JoinUserToChannel userrec  user,
std::string   cname,
std::string   key
[virtual]
-
- - - - - -
-   - - -

-Forces a user to join a channel. -

-This is similar to svsjoin and can be used to implement redirection, etc. On success, the return value is a valid pointer to a chanrec* of the channel the user was joined to. On failure, the result is NULL.

-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
virtual chanrec* Server::Server::PartUserFromChannel userrec  user,
std::string   cname,
std::string   reason
[virtual]
-
- - - - - -
-   - - -

-Forces a user to part a channel. -

-This is similar to svspart and can be used to implement redirection, etc. Although the return value of this function is a pointer to a channel record, the returned data is undefined and should not be read or written to. This behaviour may be changed in a future version.


The documentation for this class was generated from the following files: -
Generated on Tue Apr 6 21:14:13 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:54 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classVersion-members.html b/docs/module-doc/classVersion-members.html index 30a2064df..7d6d906a1 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 Tue Apr 6 21:14:23 2004 for InspIRCd by +
Generated on Wed Apr 7 19:21:00 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classVersion.html b/docs/module-doc/classVersion.html index 0c8dd995b..dd3427bee 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 66 of file modules.h.

Constructor & Destructor Documentation

+Definition at line 67 of file modules.h.

Constructor & Destructor Documentation

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

-Definition at line 101 of file modules.cpp. +Definition at line 102 of file modules.cpp.

-

00101 : Major(major), Minor(minor), Revision(revision), Build(build) { };
+
00102 : Major(major), Minor(minor), Revision(revision), Build(build) { };
 
@@ -114,7 +114,7 @@ Definition at line 101

-Definition at line 69 of file modules.h. +Definition at line 70 of file modules.h.

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

-Definition at line 69 of file modules.h. +Definition at line 70 of file modules.h.

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

-Definition at line 69 of file modules.h. +Definition at line 70 of file modules.h.

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

-Definition at line 69 of file modules.h. +Definition at line 70 of file modules.h.


The documentation for this class was generated from the following files: -
Generated on Tue Apr 6 21:14:23 2004 for InspIRCd by +
Generated on Wed Apr 7 19:21:00 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classchanrec-members.html b/docs/module-doc/classchanrec-members.html index 73e1a0fe2..2c173f165 100644 --- a/docs/module-doc/classchanrec-members.html +++ b/docs/module-doc/classchanrec-members.html @@ -31,7 +31,7 @@ topicsetchanrec ~chanrec()chanrec [inline, virtual] ~classbase()classbase [inline] -
Generated on Tue Apr 6 21:13:44 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:33 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classchanrec.html b/docs/module-doc/classchanrec.html index 633651143..4c0c068bf 100644 --- a/docs/module-doc/classchanrec.html +++ b/docs/module-doc/classchanrec.html @@ -808,7 +808,7 @@ Referenced by chanrec()
The documentation for this class was generated from the following files: -
Generated on Tue Apr 6 21:13:44 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:33 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classclassbase-members.html b/docs/module-doc/classclassbase-members.html index fa6791f1f..e40b362ed 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 Tue Apr 6 21:13:46 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:35 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classclassbase.html b/docs/module-doc/classclassbase.html index 865b24b6a..f0014c1bc 100644 --- a/docs/module-doc/classclassbase.html +++ b/docs/module-doc/classclassbase.html @@ -144,7 +144,7 @@ Definition at line 20 of fil
The documentation for this class was generated from the following file: -
Generated on Tue Apr 6 21:13:46 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:35 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 d38126a49..d929d53fe 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 Tue Apr 6 21:13:48 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20: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 dbd8578f7..e64a29035 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 Tue Apr 6 21:13:48 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20: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 40b71002c..4d0009024 100644 --- a/docs/module-doc/classconnection-members.html +++ b/docs/module-doc/classconnection-members.html @@ -36,7 +36,7 @@ signonconnection TerminateLink(char *targethost)connection ~classbase()classbase [inline] -
Generated on Tue Apr 6 21:13:54 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:41 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classconnection.html b/docs/module-doc/classconnection.html index a1d100b94..7aa6cd612 100644 --- a/docs/module-doc/classconnection.html +++ b/docs/module-doc/classconnection.html @@ -528,7 +528,7 @@ Referenced by userrec::userre

Definition at line 43 of file connection.h.

-Referenced by serverrec::serverrec(), and userrec::userrec(). +Referenced by Server::SendTo(), serverrec::serverrec(), and userrec::userrec().

@@ -837,7 +837,7 @@ Referenced by serverrec::se


The documentation for this class was generated from the following file: -
Generated on Tue Apr 6 21:13:54 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:41 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classes.html b/docs/module-doc/classes.html index fa0c9e401..f87191e90 100644 --- a/docs/module-doc/classes.html +++ b/docs/module-doc/classes.html @@ -19,7 +19,7 @@
  P  
userrec   chanrec   ExemptItem   Invited   packet   
  V  
classbase   ExtMode   InviteItem   
  S  
-Version   
Generated on Tue Apr 6 21:13:39 2004 for InspIRCd by +Version   
Generated on Wed Apr 7 19:20:29 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classpacket-members.html b/docs/module-doc/classpacket-members.html index bf42c60a2..a57bf6b56 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 Tue Apr 6 21:14:11 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:53 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classpacket.html b/docs/module-doc/classpacket.html index 0528a20d8..c431b46c9 100644 --- a/docs/module-doc/classpacket.html +++ b/docs/module-doc/classpacket.html @@ -183,7 +183,7 @@ Definition at line 31
The documentation for this class was generated from the following file: -
Generated on Tue Apr 6 21:14:11 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:53 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classserverrec-members.html b/docs/module-doc/classserverrec-members.html index 07f0c9586..17d8f9482 100644 --- a/docs/module-doc/classserverrec-members.html +++ b/docs/module-doc/classserverrec-members.html @@ -47,7 +47,7 @@ versionserverrec ~classbase()classbase [inline] ~serverrec()serverrec -
Generated on Tue Apr 6 21:14:16 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:56 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classserverrec.html b/docs/module-doc/classserverrec.html index 1e2a94b0a..9f4c7060f 100644 --- a/docs/module-doc/classserverrec.html +++ b/docs/module-doc/classserverrec.html @@ -422,7 +422,7 @@ Referenced by serverrec()
The documentation for this class was generated from the following files:
-
Generated on Tue Apr 6 21:14:16 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:56 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classucrec-members.html b/docs/module-doc/classucrec-members.html index a40813d80..5e3db8265 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 Tue Apr 6 21:14:18 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:57 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classucrec.html b/docs/module-doc/classucrec.html index 92aca3453..ca9f03c54 100644 --- a/docs/module-doc/classucrec.html +++ b/docs/module-doc/classucrec.html @@ -162,7 +162,7 @@ Definition at line 197 o
The documentation for this class was generated from the following file: -
Generated on Tue Apr 6 21:14:18 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:57 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classuserrec-members.html b/docs/module-doc/classuserrec-members.html index a61e477ff..e2b565995 100644 --- a/docs/module-doc/classuserrec-members.html +++ b/docs/module-doc/classuserrec-members.html @@ -54,7 +54,7 @@ userrec()userrec ~classbase()classbase [inline] ~userrec()userrec [inline, virtual] -
Generated on Tue Apr 6 21:14:21 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:59 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/classuserrec.html b/docs/module-doc/classuserrec.html index 4bfab1cc1..3d42a4d77 100644 --- a/docs/module-doc/classuserrec.html +++ b/docs/module-doc/classuserrec.html @@ -675,7 +675,7 @@ Referenced by userrec().
The documentation for this class was generated from the following files: -
Generated on Tue Apr 6 21:14:21 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:59 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/connection_8h-source.html b/docs/module-doc/connection_8h-source.html index 5f3cf8ef6..f0096c56f 100644 --- a/docs/module-doc/connection_8h-source.html +++ b/docs/module-doc/connection_8h-source.html @@ -79,7 +79,7 @@ 00071 00072 #endif 00073 -

Generated on Tue Apr 6 21:13:19 2004 for InspIRCd by +

Generated on Wed Apr 7 19:20:14 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/connection_8h.html b/docs/module-doc/connection_8h.html index fb027e995..80e0f3bb9 100644 --- a/docs/module-doc/connection_8h.html +++ b/docs/module-doc/connection_8h.html @@ -142,7 +142,7 @@ Definition at line 20 Definition at line 22 of file connection.h. -
Generated on Tue Apr 6 21:13:27 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:21 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/ctables_8h-source.html b/docs/module-doc/ctables_8h-source.html index 89ea9bf5d..28aa921bb 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 Tue Apr 6 21:13:19 2004 for InspIRCd by +

Generated on Wed Apr 7 19:20:14 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/ctables_8h.html b/docs/module-doc/ctables_8h.html index 3a19a1b8c..cf59e4eb7 100644 --- a/docs/module-doc/ctables_8h.html +++ b/docs/module-doc/ctables_8h.html @@ -57,7 +57,7 @@ This graph shows which files directly or indirectly include this file:

23 of file ctables.h. -
Generated on Tue Apr 6 21:13:29 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:22 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/files.html b/docs/module-doc/files.html index d126b7f72..f9f7247fc 100644 --- a/docs/module-doc/files.html +++ b/docs/module-doc/files.html @@ -19,7 +19,7 @@ users.cpp [code] users.h [code] -
Generated on Tue Apr 6 21:13:19 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:14 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/functions.html b/docs/module-doc/functions.html index 6c7a2df1e..56277b2fd 100644 --- a/docs/module-doc/functions.html +++ b/docs/module-doc/functions.html @@ -13,8 +13,8 @@ Here is a list of all class members with links to the classes they belong to:

- a -

@@ -29,9 +29,10 @@ Here is a list of all class members with links to the classes they belong to:

- c -

- g -

- h -

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

    Server

- j -

- k -

- r -

-
Generated on Tue Apr 6 21:13:39 2004 for InspIRCd by +
Generated on Wed Apr 7 19:20:29 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/globals.html b/docs/module-doc/globals.html index 35ec5a0e9..20d067619 100644 --- a/docs/module-doc/globals.html +++ b/docs/module-doc/globals.html @@ -102,7 +102,7 @@ Here is a list of all file members with links to the files they belong to:

-
Generated on Tue Apr 6 21:14:23 2004 for InspIRCd by +
Generated on Wed Apr 7 19:21:00 2004 for InspIRCd by doxygen1.3-rc3
diff --git a/docs/module-doc/graph_legend.html b/docs/module-doc/graph_legend.html index d5d0cedaf..74b47f62e 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 Tue Apr 6 21:14:23 2004 for InspIRCd by +
    Generated on Wed Apr 7 19:21:01 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/hierarchy.html b/docs/module-doc/hierarchy.html index 35b40e7d5..0ecdf7354 100644 --- a/docs/module-doc/hierarchy.html +++ b/docs/module-doc/hierarchy.html @@ -39,7 +39,7 @@ This inheritance list is sorted roughly, but not completely, alphabetically:
  • ExtMode -
    Generated on Tue Apr 6 21:13:39 2004 for InspIRCd by +
    Generated on Wed Apr 7 19:20:29 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/inherits.html b/docs/module-doc/inherits.html index 58acc7af6..4a6f31a42 100644 --- a/docs/module-doc/inherits.html +++ b/docs/module-doc/inherits.html @@ -39,7 +39,7 @@ -
    Generated on Tue Apr 6 21:14:26 2004 for InspIRCd by +
    Generated on Wed Apr 7 19:21:03 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/main.html b/docs/module-doc/main.html index 17778ac5c..13863df46 100644 --- a/docs/module-doc/main.html +++ b/docs/module-doc/main.html @@ -8,7 +8,7 @@ Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

  • InspIRCd Documentation

    -


    Generated on Tue Apr 6 21:13:19 2004 for InspIRCd by +
    Generated on Wed Apr 7 19:20:14 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 a6398c94a..38b2bb45b 100644 --- a/docs/module-doc/modules_8cpp-source.html +++ b/docs/module-doc/modules_8cpp-source.html @@ -19,376 +19,406 @@ 00011 #include "modules.h" 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 int params_when_on; -00023 int params_when_off; -00024 bool needsoper; -00025 ExtMode(char mc, int ty, bool oper, int p_on, int p_off) : modechar(mc), type(ty), needsoper(oper), 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 log(DEBUG,"Size of extmodes vector is %d",EMode.size()); -00037 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -00038 { -00039 log(DEBUG,"i->modechar==%c, modechar=%c, i->type=%d, type=%d",i->modechar,modechar,i->type,type); -00040 if ((i->modechar == modechar) && (i->type == type)) -00041 { -00042 return true; -00043 } -00044 } -00045 return false; -00046 } -00047 -00048 bool ModeDefinedOper(char modechar, int type) -00049 { -00050 log(DEBUG,"Size of extmodes vector is %d",EMode.size()); -00051 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -00052 { -00053 log(DEBUG,"i->modechar==%c, modechar=%c, i->type=%d, type=%d",i->modechar,modechar,i->type,type); -00054 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true)) -00055 { -00056 return true; -00057 } -00058 } -00059 return false; -00060 } -00061 -00062 // returns number of parameters for a custom mode when it is switched on -00063 int ModeDefinedOn(char modechar, int type) -00064 { -00065 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -00066 { -00067 if ((i->modechar == modechar) && (i->type == type)) -00068 { -00069 return i->params_when_on; -00070 } -00071 } -00072 return 0; -00073 } -00074 -00075 // returns number of parameters for a custom mode when it is switched on -00076 int ModeDefinedOff(char modechar, int type) -00077 { -00078 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -00079 { -00080 if ((i->modechar == modechar) && (i->type == type)) -00081 { -00082 return i->params_when_off; -00083 } -00084 } -00085 return 0; -00086 } -00087 -00088 // returns true if an extended mode character is in use -00089 bool DoAddExtendedMode(char modechar, int type, bool requires_oper, int params_on, int params_off) -00090 { -00091 if (ModeDefined(modechar,type)) { -00092 return false; -00093 } -00094 EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off)); -00095 return true; -00096 } -00097 +00014 #include "wildcard.h" +00015 +00016 // class type for holding an extended mode character - internal to core +00017 +00018 class ExtMode +00019 { +00020 public: +00021 char modechar; +00022 int type; +00023 int params_when_on; +00024 int params_when_off; +00025 bool needsoper; +00026 ExtMode(char mc, int ty, bool oper, int p_on, int p_off) : modechar(mc), type(ty), needsoper(oper), params_when_on(p_on), params_when_off(p_off) { }; +00027 }; +00028 +00029 typedef std::vector<ExtMode> ExtModeList; +00030 typedef ExtModeList::iterator ExtModeListIter; +00031 +00032 ExtModeList EMode; +00033 +00034 // returns true if an extended mode character is in use +00035 bool ModeDefined(char modechar, int type) +00036 { +00037 log(DEBUG,"Size of extmodes vector is %d",EMode.size()); +00038 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +00039 { +00040 log(DEBUG,"i->modechar==%c, modechar=%c, i->type=%d, type=%d",i->modechar,modechar,i->type,type); +00041 if ((i->modechar == modechar) && (i->type == type)) +00042 { +00043 return true; +00044 } +00045 } +00046 return false; +00047 } +00048 +00049 bool ModeDefinedOper(char modechar, int type) +00050 { +00051 log(DEBUG,"Size of extmodes vector is %d",EMode.size()); +00052 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +00053 { +00054 log(DEBUG,"i->modechar==%c, modechar=%c, i->type=%d, type=%d",i->modechar,modechar,i->type,type); +00055 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true)) +00056 { +00057 return true; +00058 } +00059 } +00060 return false; +00061 } +00062 +00063 // returns number of parameters for a custom mode when it is switched on +00064 int ModeDefinedOn(char modechar, int type) +00065 { +00066 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +00067 { +00068 if ((i->modechar == modechar) && (i->type == type)) +00069 { +00070 return i->params_when_on; +00071 } +00072 } +00073 return 0; +00074 } +00075 +00076 // returns number of parameters for a custom mode when it is switched on +00077 int ModeDefinedOff(char modechar, int type) +00078 { +00079 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +00080 { +00081 if ((i->modechar == modechar) && (i->type == type)) +00082 { +00083 return i->params_when_off; +00084 } +00085 } +00086 return 0; +00087 } +00088 +00089 // returns true if an extended mode character is in use +00090 bool DoAddExtendedMode(char modechar, int type, bool requires_oper, int params_on, int params_off) +00091 { +00092 if (ModeDefined(modechar,type)) { +00093 return false; +00094 } +00095 EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off)); +00096 return true; +00097 } 00098 -00099 // version is a simple class for holding a modules version number -00100 -00101 Version::Version(int major, int minor, int revision, int build) : Major(major), Minor(minor), Revision(revision), Build(build) { }; -00102 -00103 // admin is a simple class for holding a server's administrative info -00104 -00105 Admin::Admin(std::string name, std::string email, std::string nick) : Name(name), Email(email), Nick(nick) { }; -00106 -00107 Module::Module() { } -00108 Module::~Module() { } -00109 void Module::OnUserConnect(userrec* user) { } -00110 void Module::OnUserQuit(userrec* user) { } -00111 void Module::OnUserJoin(userrec* user, chanrec* channel) { } -00112 void Module::OnUserPart(userrec* user, chanrec* channel) { } -00113 void Module::OnPacketTransmit(char *p) { } -00114 void Module::OnPacketReceive(char *p) { } -00115 void Module::OnRehash() { } -00116 void Module::OnServerRaw(std::string &raw, bool inbound) { } -00117 int Module::OnUserPreJoin(userrec* user, chanrec* chan, const char* cname) { return 0; } -00118 bool Module::OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params) { } -00119 Version Module::GetVersion() { return Version(1,0,0,0); } -00120 void Module::OnOper(userrec* user) { }; -00121 void Module::OnInfo(userrec* user) { }; -00122 void Module::OnWhois(userrec* source, userrec* dest) { }; -00123 int Module::OnUserPreMessage(userrec* user,void* dest,int target_type, std::string text) { return 0; }; -00124 int Module::OnUserPreNotice(userrec* user,void* dest,int target_type, std::string text) { return 0; }; -00125 -00126 // server is a wrapper class that provides methods to all of the C-style -00127 // exports in the core -00128 // -00129 -00130 Server::Server() -00131 { -00132 } -00133 -00134 Server::~Server() -00135 { -00136 } -00137 -00138 void Server::SendOpers(std::string s) -00139 { -00140 WriteOpers("%s",s.c_str()); -00141 } -00142 -00143 void Server::SendToModeMask(std::string modes, int flags, std::string text) -00144 { -00145 WriteMode(modes.c_str(),flags,"%s",text.c_str()); -00146 } -00147 -00148 chanrec* Server::JoinUserToChannel(userrec* user, std::string cname, std::string key) -00149 { -00150 return add_channel(user,cname.c_str(),key.c_str()); -00151 } -00152 -00153 chanrec* Server::PartUserFromChannel(userrec* user, std::string cname, std::string reason) -00154 { -00155 return del_channel(user,cname.c_str(),reason.c_str()); -00156 } -00157 -00158 void Server::ChangeUserNick(userrec* user, std::string nickname) -00159 { -00160 force_nickchange(user,nickname.c_str()); -00161 } -00162 -00163 void Server::QuitUser(userrec* user, std::string reason) -00164 { -00165 kill_link(user,reason.c_str()); -00166 } -00167 -00168 -00169 void Server::Log(int level, std::string s) -00170 { -00171 log(level,"%s",s.c_str()); -00172 } -00173 -00174 void Server::AddCommand(char* cmd, handlerfunc f, char flags, int minparams) -00175 { -00176 createcommand(cmd,f,flags,minparams); -00177 } -00178 -00179 void Server::SendMode(char **parameters, int pcnt, userrec *user) -00180 { -00181 server_mode(parameters,pcnt,user); -00182 } -00183 -00184 void Server::Send(int Socket, std::string s) -00185 { -00186 Write(Socket,"%s",s.c_str()); -00187 } -00188 -00189 void Server::SendServ(int Socket, std::string s) -00190 { -00191 WriteServ(Socket,"%s",s.c_str()); -00192 } -00193 -00194 void Server::SendFrom(int Socket, userrec* User, std::string s) -00195 { -00196 WriteFrom(Socket,User,"%s",s.c_str()); -00197 } -00198 -00199 void Server::SendTo(userrec* Source, userrec* Dest, std::string s) -00200 { -00201 WriteTo(Source,Dest,"%s",s.c_str()); -00202 } -00203 -00204 void Server::SendChannel(userrec* User, chanrec* Channel, std::string s,bool IncludeSender) -00205 { -00206 if (IncludeSender) -00207 { -00208 WriteChannel(Channel,User,"%s",s.c_str()); -00209 } -00210 else +00099 +00100 // version is a simple class for holding a modules version number +00101 +00102 Version::Version(int major, int minor, int revision, int build) : Major(major), Minor(minor), Revision(revision), Build(build) { }; +00103 +00104 // admin is a simple class for holding a server's administrative info +00105 +00106 Admin::Admin(std::string name, std::string email, std::string nick) : Name(name), Email(email), Nick(nick) { }; +00107 +00108 Module::Module() { } +00109 Module::~Module() { } +00110 void Module::OnUserConnect(userrec* user) { } +00111 void Module::OnUserQuit(userrec* user) { } +00112 void Module::OnUserJoin(userrec* user, chanrec* channel) { } +00113 void Module::OnUserPart(userrec* user, chanrec* channel) { } +00114 void Module::OnPacketTransmit(char *p) { } +00115 void Module::OnPacketReceive(char *p) { } +00116 void Module::OnRehash() { } +00117 void Module::OnServerRaw(std::string &raw, bool inbound) { } +00118 int Module::OnUserPreJoin(userrec* user, chanrec* chan, const char* cname) { return 0; } +00119 bool Module::OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params) { } +00120 Version Module::GetVersion() { return Version(1,0,0,0); } +00121 void Module::OnOper(userrec* user) { }; +00122 void Module::OnInfo(userrec* user) { }; +00123 void Module::OnWhois(userrec* source, userrec* dest) { }; +00124 int Module::OnUserPreMessage(userrec* user,void* dest,int target_type, std::string text) { return 0; }; +00125 int Module::OnUserPreNotice(userrec* user,void* dest,int target_type, std::string text) { return 0; }; +00126 +00127 // server is a wrapper class that provides methods to all of the C-style +00128 // exports in the core +00129 // +00130 +00131 Server::Server() +00132 { +00133 } +00134 +00135 Server::~Server() +00136 { +00137 } +00138 +00139 void Server::SendOpers(std::string s) +00140 { +00141 WriteOpers("%s",s.c_str()); +00142 } +00143 +00144 bool Server::MatchText(std::string sliteral, std::string spattern) +00145 { +00146 char literal[MAXBUF],pattern[MAXBUF]; +00147 strncpy(literal,sliteral.c_str(),MAXBUF); +00148 strncpy(pattern,spattern.c_str(),MAXBUF); +00149 return match(literal,pattern); +00150 } +00151 +00152 void Server::SendToModeMask(std::string modes, int flags, std::string text) +00153 { +00154 WriteMode(modes.c_str(),flags,"%s",text.c_str()); +00155 } +00156 +00157 chanrec* Server::JoinUserToChannel(userrec* user, std::string cname, std::string key) +00158 { +00159 return add_channel(user,cname.c_str(),key.c_str()); +00160 } +00161 +00162 chanrec* Server::PartUserFromChannel(userrec* user, std::string cname, std::string reason) +00163 { +00164 return del_channel(user,cname.c_str(),reason.c_str()); +00165 } +00166 +00167 void Server::ChangeUserNick(userrec* user, std::string nickname) +00168 { +00169 force_nickchange(user,nickname.c_str()); +00170 } +00171 +00172 void Server::QuitUser(userrec* user, std::string reason) +00173 { +00174 kill_link(user,reason.c_str()); +00175 } +00176 +00177 +00178 void Server::Log(int level, std::string s) +00179 { +00180 log(level,"%s",s.c_str()); +00181 } +00182 +00183 void Server::AddCommand(char* cmd, handlerfunc f, char flags, int minparams) +00184 { +00185 createcommand(cmd,f,flags,minparams); +00186 } +00187 +00188 void Server::SendMode(char **parameters, int pcnt, userrec *user) +00189 { +00190 server_mode(parameters,pcnt,user); +00191 } +00192 +00193 void Server::Send(int Socket, std::string s) +00194 { +00195 Write(Socket,"%s",s.c_str()); +00196 } +00197 +00198 void Server::SendServ(int Socket, std::string s) +00199 { +00200 WriteServ(Socket,"%s",s.c_str()); +00201 } +00202 +00203 void Server::SendFrom(int Socket, userrec* User, std::string s) +00204 { +00205 WriteFrom(Socket,User,"%s",s.c_str()); +00206 } +00207 +00208 void Server::SendTo(userrec* Source, userrec* Dest, std::string s) +00209 { +00210 if (!Source) 00211 { -00212 ChanExceptSender(Channel,User,"%s",s.c_str()); -00213 } -00214 } -00215 -00216 bool Server::CommonChannels(userrec* u1, userrec* u2) -00217 { -00218 return (common_channels(u1,u2) != 0); -00219 } -00220 -00221 void Server::SendCommon(userrec* User, std::string text,bool IncludeSender) -00222 { -00223 if (IncludeSender) -00224 { -00225 WriteCommon(User,"%s",text.c_str()); -00226 } -00227 else -00228 { -00229 WriteCommonExcept(User,"%s",text.c_str()); -00230 } -00231 } -00232 -00233 void Server::SendWallops(userrec* User, std::string text) -00234 { -00235 WriteWallOps(User,"%s",text.c_str()); -00236 } -00237 -00238 bool Server::IsNick(std::string nick) -00239 { -00240 return (isnick(nick.c_str()) != 0); -00241 } -00242 -00243 userrec* Server::FindNick(std::string nick) -00244 { -00245 return Find(nick); -00246 } -00247 -00248 chanrec* Server::FindChannel(std::string channel) -00249 { -00250 return FindChan(channel.c_str()); -00251 } -00252 -00253 std::string Server::ChanMode(userrec* User, chanrec* Chan) -00254 { -00255 return cmode(User,Chan); -00256 } -00257 -00258 std::string Server::GetServerName() -00259 { -00260 return getservername(); -00261 } -00262 -00263 std::string Server::GetNetworkName() -00264 { -00265 return getnetworkname(); -00266 } -00267 -00268 Admin Server::GetAdmin() -00269 { -00270 return Admin(getadminname(),getadminemail(),getadminnick()); -00271 } -00272 -00273 -00274 -00275 bool Server::AddExtendedMode(char modechar, int type, bool requires_oper, int params_when_on, int params_when_off) -00276 { -00277 if (type == MT_SERVER) -00278 { -00279 log(DEBUG,"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion"); -00280 return false; -00281 } -00282 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT)) -00283 { -00284 log(DEBUG,"*** API ERROR *** Parameters on MT_CLIENT modes are not supported"); -00285 return false; -00286 } -00287 if ((params_when_on>1) || (params_when_off>1)) -00288 { -00289 log(DEBUG,"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported"); -00290 return false; -00291 } -00292 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off); -00293 } -00294 -00295 -00296 ConfigReader::ConfigReader() -00297 { -00298 fname = CONFIG_FILE; -00299 } -00300 -00301 -00302 ConfigReader::~ConfigReader() -00303 { -00304 } -00305 -00306 -00307 ConfigReader::ConfigReader(std::string filename) : fname(filename) { }; -00308 -00309 std::string ConfigReader::ReadValue(std::string tag, std::string name, int index) -00310 { -00311 char val[MAXBUF]; -00312 ReadConf(fname.c_str(),tag.c_str(),name.c_str(),index,val); -00313 return val; -00314 } -00315 -00316 -00317 int ConfigReader::Enumerate(std::string tag) -00318 { -00319 return EnumConf(fname.c_str(),tag.c_str()); -00320 } -00321 -00322 -00323 bool ConfigReader::Verify() -00324 { -00325 return true; -00326 } -00327 -00328 -00329 FileReader::FileReader(std::string filename) -00330 { -00331 file_cache c; -00332 readfile(c,filename.c_str()); -00333 this->fc = c; -00334 } -00335 -00336 FileReader::FileReader() -00337 { -00338 } -00339 -00340 void FileReader::LoadFile(std::string filename) -00341 { -00342 file_cache c; -00343 readfile(c,filename.c_str()); -00344 this->fc = c; -00345 } +00212 // if source is NULL, then the message originates from the local server +00213 Write(Dest->fd,":%s %s",this->GetServerName().c_str(),s.c_str()); +00214 } +00215 else +00216 { +00217 // otherwise it comes from the user specified +00218 WriteTo(Source,Dest,"%s",s.c_str()); +00219 } +00220 } +00221 +00222 void Server::SendChannel(userrec* User, chanrec* Channel, std::string s,bool IncludeSender) +00223 { +00224 if (IncludeSender) +00225 { +00226 WriteChannel(Channel,User,"%s",s.c_str()); +00227 } +00228 else +00229 { +00230 ChanExceptSender(Channel,User,"%s",s.c_str()); +00231 } +00232 } +00233 +00234 bool Server::CommonChannels(userrec* u1, userrec* u2) +00235 { +00236 return (common_channels(u1,u2) != 0); +00237 } +00238 +00239 void Server::SendCommon(userrec* User, std::string text,bool IncludeSender) +00240 { +00241 if (IncludeSender) +00242 { +00243 WriteCommon(User,"%s",text.c_str()); +00244 } +00245 else +00246 { +00247 WriteCommonExcept(User,"%s",text.c_str()); +00248 } +00249 } +00250 +00251 void Server::SendWallops(userrec* User, std::string text) +00252 { +00253 WriteWallOps(User,"%s",text.c_str()); +00254 } +00255 +00256 bool Server::IsNick(std::string nick) +00257 { +00258 return (isnick(nick.c_str()) != 0); +00259 } +00260 +00261 userrec* Server::FindNick(std::string nick) +00262 { +00263 return Find(nick); +00264 } +00265 +00266 chanrec* Server::FindChannel(std::string channel) +00267 { +00268 return FindChan(channel.c_str()); +00269 } +00270 +00271 std::string Server::ChanMode(userrec* User, chanrec* Chan) +00272 { +00273 return cmode(User,Chan); +00274 } +00275 +00276 std::string Server::GetServerName() +00277 { +00278 return getservername(); +00279 } +00280 +00281 std::string Server::GetNetworkName() +00282 { +00283 return getnetworkname(); +00284 } +00285 +00286 Admin Server::GetAdmin() +00287 { +00288 return Admin(getadminname(),getadminemail(),getadminnick()); +00289 } +00290 +00291 +00292 +00293 bool Server::AddExtendedMode(char modechar, int type, bool requires_oper, int params_when_on, int params_when_off) +00294 { +00295 if (type == MT_SERVER) +00296 { +00297 log(DEBUG,"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion"); +00298 return false; +00299 } +00300 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT)) +00301 { +00302 log(DEBUG,"*** API ERROR *** Parameters on MT_CLIENT modes are not supported"); +00303 return false; +00304 } +00305 if ((params_when_on>1) || (params_when_off>1)) +00306 { +00307 log(DEBUG,"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported"); +00308 return false; +00309 } +00310 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off); +00311 } +00312 +00313 int Server::CountUsers(chanrec* c) +00314 { +00315 return usercount(c); +00316 } +00317 +00318 +00319 ConfigReader::ConfigReader() +00320 { +00321 this->cache = new std::stringstream(stringstream::in | stringstream::out); +00322 this->error = LoadConf(CONFIG_FILE,this->cache); +00323 } +00324 +00325 +00326 ConfigReader::~ConfigReader() +00327 { +00328 if (this->cache) +00329 delete this->cache; +00330 } +00331 +00332 +00333 ConfigReader::ConfigReader(std::string filename) +00334 { +00335 this->cache = new std::stringstream(stringstream::in | stringstream::out); +00336 this->error = LoadConf(filename.c_str(),this->cache); +00337 }; +00338 +00339 std::string ConfigReader::ReadValue(std::string tag, std::string name, int index) +00340 { +00341 char val[MAXBUF]; +00342 ReadConf(cache,tag.c_str(),name.c_str(),index,val); +00343 return val; +00344 } +00345 00346 -00347 -00348 FileReader::~FileReader() -00349 { +00347 int ConfigReader::Enumerate(std::string tag) +00348 { +00349 return EnumConf(cache,tag.c_str()); 00350 } 00351 -00352 bool FileReader::Exists() -00353 { -00354 if (fc.size() == 0) -00355 { -00356 return(false); -00357 } -00358 else -00359 { -00360 return(true); -00361 } -00362 } -00363 -00364 std::string FileReader::GetLine(int x) -00365 { -00366 if ((x<0) || (x>fc.size())) -00367 return ""; -00368 return fc[x]; -00369 } -00370 -00371 int FileReader::FileSize() -00372 { -00373 return fc.size(); -00374 } -00375 +00352 +00353 bool ConfigReader::Verify() +00354 { +00355 return this->error; +00356 } +00357 +00358 +00359 FileReader::FileReader(std::string filename) +00360 { +00361 file_cache c; +00362 readfile(c,filename.c_str()); +00363 this->fc = c; +00364 } +00365 +00366 FileReader::FileReader() +00367 { +00368 } +00369 +00370 void FileReader::LoadFile(std::string filename) +00371 { +00372 file_cache c; +00373 readfile(c,filename.c_str()); +00374 this->fc = c; +00375 } 00376 -00377 std::vector<Module*> modules(255); -00378 std::vector<ircd_module*> factory(255); -00379 -00380 int MODCOUNT = -1; +00377 +00378 FileReader::~FileReader() +00379 { +00380 } 00381 -00382 -

    Generated on Tue Apr 6 21:13:19 2004 for InspIRCd by +00382 bool FileReader::Exists() +00383 { +00384 if (fc.size() == 0) +00385 { +00386 return(false); +00387 } +00388 else +00389 { +00390 return(true); +00391 } +00392 } +00393 +00394 std::string FileReader::GetLine(int x) +00395 { +00396 if ((x<0) || (x>fc.size())) +00397 return ""; +00398 return fc[x]; +00399 } +00400 +00401 int FileReader::FileSize() +00402 { +00403 return fc.size(); +00404 } +00405 +00406 +00407 std::vector<Module*> modules(255); +00408 std::vector<ircd_module*> factory(255); +00409 +00410 int MODCOUNT = -1; +00411 +00412 +

    Generated on Wed Apr 7 19:20:14 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/modules_8cpp.html b/docs/module-doc/modules_8cpp.html index dcff258df..6b32431a5 100644 --- a/docs/module-doc/modules_8cpp.html +++ b/docs/module-doc/modules_8cpp.html @@ -12,13 +12,14 @@ #include "modules.h"
    #include "ctables.h"
    #include "inspircd_io.h"
    +#include "wildcard.h"

    Include dependency graph for modules.cpp:

    Include dependency graph
    - - + +

    @@ -63,7 +64,7 @@ Include dependency graph for modules.cpp:

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

    @@ -87,9 +88,9 @@ Definition at line 28 o

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

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


    Function Documentation

    @@ -148,19 +149,19 @@ Referenced by ModeDefined()

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

    -References EMode, and ModeDefined(). +References EMode, and ModeDefined().

    -Referenced by Server::AddExtendedMode(). +Referenced by Server::AddExtendedMode().

    -

    00090 {
    -00091         if (ModeDefined(modechar,type)) {
    -00092                 return false;
    -00093         }
    -00094         EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off));
    -00095         return true;
    -00096 }
    +
    00091 {
    +00092         if (ModeDefined(modechar,type)) {
    +00093                 return false;
    +00094         }
    +00095         EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off));
    +00096         return true;
    +00097 }
     
    @@ -230,24 +231,24 @@ Referenced by Server::AddEx

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

    -References EMode, and ExtModeListIter. +References EMode, and ExtModeListIter.

    -Referenced by DoAddExtendedMode(). +Referenced by DoAddExtendedMode().

    -

    00035 {
    -00036         log(DEBUG,"Size of extmodes vector is %d",EMode.size());
    -00037         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    -00038         {
    -00039                 log(DEBUG,"i->modechar==%c, modechar=%c, i->type=%d, type=%d",i->modechar,modechar,i->type,type);
    -00040                 if ((i->modechar == modechar) && (i->type == type))
    -00041                 {
    -00042                         return true;
    -00043                 }
    -00044         }
    -00045         return false;
    -00046 }
    +
    00036 {
    +00037         log(DEBUG,"Size of extmodes vector is %d",EMode.size());
    +00038         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    +00039         {
    +00040                 log(DEBUG,"i->modechar==%c, modechar=%c, i->type=%d, type=%d",i->modechar,modechar,i->type,type);
    +00041                 if ((i->modechar == modechar) && (i->type == type))
    +00042                 {
    +00043                         return true;
    +00044                 }
    +00045         }
    +00046         return false;
    +00047 }
     
    @@ -288,20 +289,20 @@ Referenced by DoAddExtended

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

    -References EMode, and ExtModeListIter. +References EMode, and ExtModeListIter.

    -

    00077 {
    -00078         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    -00079         {
    -00080                 if ((i->modechar == modechar) && (i->type == type))
    -00081                 {
    -00082                         return i->params_when_off;
    -00083                 }
    -00084         }
    -00085         return 0;
    -00086 }
    +
    00078 {
    +00079         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    +00080         {
    +00081                 if ((i->modechar == modechar) && (i->type == type))
    +00082                 {
    +00083                         return i->params_when_off;
    +00084                 }
    +00085         }
    +00086         return 0;
    +00087 }
     
    @@ -342,20 +343,20 @@ References EMode, and <

    -Definition at line 63 of file modules.cpp. +Definition at line 64 of file modules.cpp.

    -References EMode, and ExtModeListIter. +References EMode, and ExtModeListIter.

    -

    00064 {
    -00065         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    -00066         {
    -00067                 if ((i->modechar == modechar) && (i->type == type))
    -00068                 {
    -00069                         return i->params_when_on;
    -00070                 }
    -00071         }
    -00072         return 0;
    -00073 }
    +
    00065 {
    +00066         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    +00067         {
    +00068                 if ((i->modechar == modechar) && (i->type == type))
    +00069                 {
    +00070                         return i->params_when_on;
    +00071                 }
    +00072         }
    +00073         return 0;
    +00074 }
     
    @@ -396,22 +397,22 @@ References EMode, and <

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

    -References EMode, and ExtModeListIter. -

    -

    00049 {
    -00050         log(DEBUG,"Size of extmodes vector is %d",EMode.size());
    -00051         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    -00052         {
    -00053                 log(DEBUG,"i->modechar==%c, modechar=%c, i->type=%d, type=%d",i->modechar,modechar,i->type,type);
    -00054                 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true))
    -00055                 {
    -00056                         return true;
    -00057                 }
    -00058         }
    -00059         return false;
    -00060 }
    +Definition at line 49 of file modules.cpp.
    +

    +References EMode, and ExtModeListIter. +

    +

    00050 {
    +00051         log(DEBUG,"Size of extmodes vector is %d",EMode.size());
    +00052         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    +00053         {
    +00054                 log(DEBUG,"i->modechar==%c, modechar=%c, i->type=%d, type=%d",i->modechar,modechar,i->type,type);
    +00055                 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true))
    +00056                 {
    +00057                         return true;
    +00058                 }
    +00059         }
    +00060         return false;
    +00061 }
     
    @@ -466,9 +467,9 @@ References EMode, and <

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

    -Referenced by DoAddExtendedMode(), ModeDefined(), ModeDefinedOff(), ModeDefinedOn(), and ModeDefinedOper(). +Referenced by DoAddExtendedMode(), ModeDefined(), ModeDefinedOff(), ModeDefinedOn(), and ModeDefinedOper().

    @@ -492,10 +493,10 @@ Referenced by DoAddExtended

    -Definition at line 380 of file modules.cpp. +Definition at line 410 of file modules.cpp. -


    Generated on Tue Apr 6 21:13:31 2004 for InspIRCd by +
    Generated on Wed Apr 7 19:20:23 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 835d4034b..e6a677511 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 d461928e2..7fca50afb 100644 --- a/docs/module-doc/modules_8h-source.html +++ b/docs/module-doc/modules_8h-source.html @@ -31,180 +31,192 @@ 00023 #include "ctables.h" 00024 #include <string> 00025 #include <deque> -00026 -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 -00036 #define FOREACH_MOD for (int i = 0; i <= MODCOUNT; i++) modules[i]-> -00037 -00038 // This define is similar to the one above but returns a result in MOD_RESULT. -00039 // The first module to return a nonzero result is the value to be accepted, -00040 // and any modules after are ignored. -00041 -00042 // ********************************************************************************************* -00043 -00044 #define FOREACH_RESULT(x) { MOD_RESULT = 0; \ -00045 for (int i = 0; i <= MODCOUNT; i++) { \ -00046 int res = modules[i]->x ; \ -00047 if (res) { \ -00048 MOD_RESULT = res; \ -00049 break; \ -00050 } \ -00051 } \ -00052 } -00053 -00054 // ********************************************************************************************* -00055 -00056 extern void createcommand(char* cmd, handlerfunc f, char flags, int minparams); -00057 extern void server_mode(char **parameters, int pcnt, userrec *user); -00058 -00059 // class Version holds the version information of a Module, returned -00060 // by Module::GetVersion (thanks RD) -00061 -00066 class Version : public classbase -00067 { -00068 public: -00069 const int Major, Minor, Revision, Build; -00070 Version(int major, int minor, int revision, int build); -00071 }; -00072 -00078 class Admin : public classbase -00079 { -00080 public: -00081 const std::string Name, Email, Nick; -00082 Admin(std::string name, std::string email, std::string nick); -00083 }; -00084 -00090 class Module : public classbase -00091 { -00092 public: -00093 -00097 Module(); -00098 -00102 virtual ~Module(); -00103 -00108 virtual Version GetVersion(); -00109 -00113 virtual void OnUserConnect(userrec* user); -00114 -00118 virtual void OnUserQuit(userrec* user); -00119 -00124 virtual void OnUserJoin(userrec* user, chanrec* channel); -00125 -00130 virtual void OnUserPart(userrec* user, chanrec* channel); -00131 -00138 virtual void OnPacketTransmit(char *p); -00139 -00147 virtual void OnPacketReceive(char *p); -00148 -00154 virtual void OnRehash(); -00155 -00162 virtual void OnServerRaw(std::string &raw, bool inbound); -00163 -00173 virtual bool OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params); -00174 -00187 virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname); -00188 +00026 #include <sstream> +00027 +00030 typedef std::deque<std::string> file_cache; +00031 typedef file_cache string_list; +00032 +00033 // This #define allows us to call a method in all +00034 // loaded modules in a readable simple way, e.g.: +00035 // 'FOREACH_MOD OnConnect(user);' +00036 +00037 #define FOREACH_MOD for (int i = 0; i <= MODCOUNT; i++) modules[i]-> +00038 +00039 // This define is similar to the one above but returns a result in MOD_RESULT. +00040 // The first module to return a nonzero result is the value to be accepted, +00041 // and any modules after are ignored. +00042 +00043 // ********************************************************************************************* +00044 +00045 #define FOREACH_RESULT(x) { MOD_RESULT = 0; \ +00046 for (int i = 0; i <= MODCOUNT; i++) { \ +00047 int res = modules[i]->x ; \ +00048 if (res) { \ +00049 MOD_RESULT = res; \ +00050 break; \ +00051 } \ +00052 } \ +00053 } +00054 +00055 // ********************************************************************************************* +00056 +00057 extern void createcommand(char* cmd, handlerfunc f, char flags, int minparams); +00058 extern void server_mode(char **parameters, int pcnt, userrec *user); +00059 +00060 // class Version holds the version information of a Module, returned +00061 // by Module::GetVersion (thanks RD) +00062 +00067 class Version : public classbase +00068 { +00069 public: +00070 const int Major, Minor, Revision, Build; +00071 Version(int major, int minor, int revision, int build); +00072 }; +00073 +00079 class Admin : public classbase +00080 { +00081 public: +00082 const std::string Name, Email, Nick; +00083 Admin(std::string name, std::string email, std::string nick); +00084 }; +00085 +00091 class Module : public classbase +00092 { +00093 public: +00094 +00098 Module(); +00099 +00103 virtual ~Module(); +00104 +00109 virtual Version GetVersion(); +00110 +00114 virtual void OnUserConnect(userrec* user); +00115 +00119 virtual void OnUserQuit(userrec* user); +00120 +00125 virtual void OnUserJoin(userrec* user, chanrec* channel); +00126 +00131 virtual void OnUserPart(userrec* user, chanrec* channel); +00132 +00139 virtual void OnPacketTransmit(char *p); +00140 +00148 virtual void OnPacketReceive(char *p); +00149 +00155 virtual void OnRehash(); +00156 +00163 virtual void OnServerRaw(std::string &raw, bool inbound); +00164 +00174 virtual bool OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params); +00175 +00188 virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname); 00189 -00194 virtual void OnOper(userrec* user); -00195 -00204 virtual void OnInfo(userrec* user); -00205 -00210 virtual void OnWhois(userrec* source, userrec* dest); -00211 -00220 virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string text); -00221 -00230 virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string text); -00231 }; -00232 +00190 +00195 virtual void OnOper(userrec* user); +00196 +00205 virtual void OnInfo(userrec* user); +00206 +00211 virtual void OnWhois(userrec* source, userrec* dest); +00212 +00221 virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string text); +00222 +00231 virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string text); +00232 }; 00233 -00239 class Server : public classbase -00240 { -00241 public: -00245 Server(); -00249 virtual ~Server(); -00250 -00254 virtual void SendOpers(std::string s); -00259 virtual void Log(int level, std::string s); -00264 virtual void Send(int Socket, std::string s); -00269 virtual void SendServ(int Socket, std::string s); -00274 virtual void SendFrom(int Socket, userrec* User, std::string s); -00279 virtual void SendTo(userrec* Source, userrec* Dest, std::string s); -00286 virtual void SendChannel(userrec* User, chanrec* Channel, std::string s,bool IncludeSender); -00291 virtual bool CommonChannels(userrec* u1, userrec* u2); -00299 virtual void SendCommon(userrec* User, std::string text,bool IncludeSender); -00304 virtual void SendWallops(userrec* User, std::string text); -00305 -00309 virtual bool IsNick(std::string nick); -00313 virtual userrec* FindNick(std::string nick); -00317 virtual chanrec* FindChannel(std::string channel); -00322 virtual std::string ChanMode(userrec* User, chanrec* Chan); -00325 virtual std::string GetServerName(); -00328 virtual std::string GetNetworkName(); -00334 virtual Admin GetAdmin(); -00353 virtual bool AddExtendedMode(char modechar, int type, bool requires_oper, int params_when_on, int params_when_off); -00354 -00369 virtual void AddCommand(char* cmd, handlerfunc f, char flags, int minparams); -00370 -00392 virtual void SendMode(char **parameters, int pcnt, userrec *user); -00393 -00406 virtual void SendToModeMask(std::string modes, int flags, std::string text); -00407 -00413 virtual chanrec* Server::JoinUserToChannel(userrec* user, std::string cname, std::string key); -00414 -00420 virtual chanrec* Server::PartUserFromChannel(userrec* user, std::string cname, std::string reason); -00421 -00427 virtual void ChangeUserNick(userrec* user, std::string nickname); -00428 -00439 virtual void QuitUser(userrec* user, std::string reason); -00440 }; -00441 -00448 class ConfigReader : public classbase -00449 { -00450 protected: -00453 std::string fname; -00454 public: -00459 ConfigReader(); // default constructor reads ircd.conf -00463 ConfigReader(std::string filename); // read a module-specific config -00467 ~ConfigReader(); -00472 std::string ReadValue(std::string tag, std::string name, int index); -00479 int Enumerate(std::string tag); -00483 bool Verify(); -00484 }; -00485 -00486 -00487 -00493 class FileReader : public classbase -00494 { -00495 file_cache fc; -00496 public: -00501 FileReader(); -00507 FileReader(std::string filename); -00511 ~FileReader(); -00517 void LoadFile(std::string filename); -00522 bool Exists(); -00523 std::string GetLine(int x); -00529 int FileSize(); -00530 }; +00234 +00240 class Server : public classbase +00241 { +00242 public: +00246 Server(); +00250 virtual ~Server(); +00251 +00255 virtual void SendOpers(std::string s); +00260 virtual void Log(int level, std::string s); +00265 virtual void Send(int Socket, std::string s); +00270 virtual void SendServ(int Socket, std::string s); +00275 virtual void SendFrom(int Socket, userrec* User, std::string s); +00290 virtual void SendTo(userrec* Source, userrec* Dest, std::string s); +00297 virtual void SendChannel(userrec* User, chanrec* Channel, std::string s,bool IncludeSender); +00302 virtual bool CommonChannels(userrec* u1, userrec* u2); +00310 virtual void SendCommon(userrec* User, std::string text,bool IncludeSender); +00315 virtual void SendWallops(userrec* User, std::string text); +00316 +00320 virtual bool IsNick(std::string nick); +00324 virtual int CountUsers(chanrec* c); +00328 virtual userrec* FindNick(std::string nick); +00332 virtual chanrec* FindChannel(std::string channel); +00337 virtual std::string ChanMode(userrec* User, chanrec* Chan); +00340 virtual std::string GetServerName(); +00343 virtual std::string GetNetworkName(); +00349 virtual Admin GetAdmin(); +00368 virtual bool AddExtendedMode(char modechar, int type, bool requires_oper, int params_when_on, int params_when_off); +00369 +00384 virtual void AddCommand(char* cmd, handlerfunc f, char flags, int minparams); +00385 +00407 virtual void SendMode(char **parameters, int pcnt, userrec *user); +00408 +00421 virtual void SendToModeMask(std::string modes, int flags, std::string text); +00422 +00428 virtual chanrec* JoinUserToChannel(userrec* user, std::string cname, std::string key); +00429 +00435 virtual chanrec* PartUserFromChannel(userrec* user, std::string cname, std::string reason); +00436 +00442 virtual void ChangeUserNick(userrec* user, std::string nickname); +00443 +00454 virtual void QuitUser(userrec* user, std::string reason); +00455 +00460 virtual bool MatchText(std::string sliteral, std::string spattern); +00461 }; +00462 +00469 class ConfigReader : public classbase +00470 { +00471 protected: +00477 std::stringstream *cache; +00480 bool error; +00481 +00482 public: +00487 ConfigReader(); // default constructor reads ircd.conf +00491 ConfigReader(std::string filename); // read a module-specific config +00495 ~ConfigReader(); +00500 std::string ReadValue(std::string tag, std::string name, int index); +00507 int Enumerate(std::string tag); +00512 bool Verify(); +00513 }; +00514 +00515 +00516 +00522 class FileReader : public classbase +00523 { +00524 file_cache fc; +00525 public: +00530 FileReader(); 00531 -00532 -00539 class ModuleFactory : public classbase -00540 { -00541 public: -00542 ModuleFactory() { } -00543 virtual ~ModuleFactory() { } -00548 virtual Module * CreateModule() = 0; -00549 }; +00537 FileReader(std::string filename); +00538 +00542 ~FileReader(); +00543 +00549 void LoadFile(std::string filename); 00550 -00551 -00552 typedef DLLFactory<ModuleFactory> ircd_module; -00553 -00554 #endif -

    Generated on Tue Apr 6 21:13:19 2004 for InspIRCd by +00551 bool Exists(); +00552 +00557 std::string GetLine(int x); +00558 +00564 int FileSize(); +00565 }; +00566 +00567 +00574 class ModuleFactory : public classbase +00575 { +00576 public: +00577 ModuleFactory() { } +00578 virtual ~ModuleFactory() { } +00583 virtual Module * CreateModule() = 0; +00584 }; +00585 +00586 +00587 typedef DLLFactory<ModuleFactory> ircd_module; +00588 +00589 #endif +

    Generated on Wed Apr 7 19:20:14 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/modules_8h.html b/docs/module-doc/modules_8h.html index e43381373..03e670031 100644 --- a/docs/module-doc/modules_8h.html +++ b/docs/module-doc/modules_8h.html @@ -11,6 +11,7 @@ #include "ctables.h"
    #include <string>
    #include <deque>
    +#include <sstream>

    Include dependency graph for modules.h:

    Include dependency graph
    @@ -133,7 +134,7 @@ Definition at line 13 of

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

    @@ -171,7 +172,7 @@ Definition at line 36 of }

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

    @@ -221,7 +222,7 @@ Definition at line 17 of

    Definition at line 18 of file modules.h.

    -Referenced by Server::AddExtendedMode(). +Referenced by Server::AddExtendedMode().

    @@ -247,7 +248,7 @@ Referenced by Server::AddEx

    Definition at line 19 of file modules.h.

    -Referenced by Server::AddExtendedMode(). +Referenced by Server::AddExtendedMode().

    @@ -346,9 +347,9 @@ Low level definition of a FileReader

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

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

    @@ -372,7 +373,7 @@ Referenced by FileReader::F

    -Definition at line 552 of file modules.h. +Definition at line 587 of file modules.h.

    @@ -396,7 +397,7 @@ Definition at line 552 of

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


    Function Documentation

    @@ -449,7 +450,7 @@ Definition at line 30 of

    -Referenced by Server::AddCommand(). +Referenced by Server::AddCommand().

    @@ -495,10 +496,10 @@ Referenced by Server::AddCo

    -Referenced by Server::SendMode(). +Referenced by Server::SendMode(). -


    Generated on Tue Apr 6 21:13:33 2004 for InspIRCd by +
    Generated on Wed Apr 7 19:20:24 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 61434f1b5..806bd4fdd 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/namespaces.html b/docs/module-doc/namespaces.html index 909dd0d39..c24ab0648 100644 --- a/docs/module-doc/namespaces.html +++ b/docs/module-doc/namespaces.html @@ -9,7 +9,7 @@

    InspIRCd Namespace List

    Here is a list of all namespaces with brief descriptions:
    std
    -
    Generated on Tue Apr 6 21:14:23 2004 for InspIRCd by +
    Generated on Wed Apr 7 19:21:00 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/namespacestd.html b/docs/module-doc/namespacestd.html index 50b2f95e1..6645559fe 100644 --- a/docs/module-doc/namespacestd.html +++ b/docs/module-doc/namespacestd.html @@ -11,7 +11,7 @@
    -
    Generated on Tue Apr 6 21:14:23 2004 for InspIRCd by +
    Generated on Wed Apr 7 19:21:00 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/servers_8cpp-source.html b/docs/module-doc/servers_8cpp-source.html index bebb0f160..b1c7afe77 100644 --- a/docs/module-doc/servers_8cpp-source.html +++ b/docs/module-doc/servers_8cpp-source.html @@ -46,7 +46,7 @@ 00038 fd = 0; 00039 } 00040 -

    Generated on Tue Apr 6 21:13:19 2004 for InspIRCd by +

    Generated on Wed Apr 7 19:20:14 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/servers_8cpp.html b/docs/module-doc/servers_8cpp.html index 2aaff1bfc..2bc24eee2 100644 --- a/docs/module-doc/servers_8cpp.html +++ b/docs/module-doc/servers_8cpp.html @@ -23,7 +23,7 @@ Include dependency graph for servers.cpp:

    Go to the source code of this file.
    -
    Generated on Tue Apr 6 21:13:34 2004 for InspIRCd by +
    Generated on Wed Apr 7 19:20:25 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/servers_8h-source.html b/docs/module-doc/servers_8h-source.html index 3947cce61..f798bade3 100644 --- a/docs/module-doc/servers_8h-source.html +++ b/docs/module-doc/servers_8h-source.html @@ -44,7 +44,7 @@ 00060 00061 #endif 00062 -

    Generated on Tue Apr 6 21:13:19 2004 for InspIRCd by +

    Generated on Wed Apr 7 19:20:14 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/servers_8h.html b/docs/module-doc/servers_8h.html index ff0fd16ce..72e4c1d7f 100644 --- a/docs/module-doc/servers_8h.html +++ b/docs/module-doc/servers_8h.html @@ -82,7 +82,7 @@ Definition at line 14 of Definition at line 15 of file servers.h. -
    Generated on Tue Apr 6 21:13:36 2004 for InspIRCd by +
    Generated on Wed Apr 7 19:20:26 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/users_8cpp-source.html b/docs/module-doc/users_8cpp-source.html index e4b99f245..1b579972a 100644 --- a/docs/module-doc/users_8cpp-source.html +++ b/docs/module-doc/users_8cpp-source.html @@ -93,7 +93,7 @@ 00085 } 00086 } 00087 } -

    Generated on Tue Apr 6 21:13:20 2004 for InspIRCd by +

    Generated on Wed Apr 7 19:20:14 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/users_8cpp.html b/docs/module-doc/users_8cpp.html index 85fe7b735..32f4f7dc6 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 Tue Apr 6 21:13:37 2004 for InspIRCd by +
    Generated on Wed Apr 7 19:20:27 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 fb6e45302..caf73ee91 100644 --- a/docs/module-doc/users_8h-source.html +++ b/docs/module-doc/users_8h-source.html @@ -102,7 +102,7 @@ 00150 00151 00152 #endif -

    Generated on Tue Apr 6 21:13:20 2004 for InspIRCd by +

    Generated on Wed Apr 7 19:20:14 2004 for InspIRCd by doxygen1.3-rc3
    diff --git a/docs/module-doc/users_8h.html b/docs/module-doc/users_8h.html index 027b085c8..40ab7d22c 100644 --- a/docs/module-doc/users_8h.html +++ b/docs/module-doc/users_8h.html @@ -245,7 +245,7 @@ Holds a complete list of all channels to which a user has been invited and has n Definition at line 52 of file users.h. -
    Generated on Tue Apr 6 21:13:39 2004 for InspIRCd by +
    Generated on Wed Apr 7 19:20:29 2004 for InspIRCd by doxygen1.3-rc3
    -- cgit v1.2.3