diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-30 12:26:11 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-30 12:26:11 +0000 |
commit | f61345bd0eed92ccc4882a190a19c902fbbfc5fb (patch) | |
tree | 241963780303a3ce75b0d1a51b20cb93fd829901 /docs/man | |
parent | 1a897a19105498bff0104e296a6c39a5864e5600 (diff) |
Added manpages, extra docs
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@753 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'docs/man')
46 files changed, 5212 insertions, 0 deletions
diff --git a/docs/man/Admin.3 b/docs/man/Admin.3 new file mode 100644 index 000000000..67401feae --- /dev/null +++ b/docs/man/Admin.3 @@ -0,0 +1,65 @@ +.TH "Admin" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +Admin \- Holds /ADMIN data This class contains the admin details of the local server. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <modules.h>\fP +.PP +Inherits \fBclassbase\fP. +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "\fBAdmin\fP (std::string name, std::string email, std::string nick)" +.br +.in -1c +.SS "Public Attributes" + +.in +1c +.ti -1c +.RI "const std::string \fBName\fP" +.br +.ti -1c +.RI "const std::string \fBEmail\fP" +.br +.ti -1c +.RI "const std::string \fBNick\fP" +.br +.in -1c +.SH "Detailed Description" +.PP +Holds /ADMIN data This class contains the admin details of the local server. + +It is constructed by class \fBServer\fP, and has three read-only values, Name, Email and Nick that contain the specified values for the server where the module is running. +.PP +Definition at line 80 of file modules.h. +.SH "Constructor & Destructor Documentation" +.PP +.SS "Admin::Admin (std::string name, std::string email, std::string nick)" +.PP +Definition at line 109 of file modules.cpp. +.PP +.nf +109 : Name(name), Email(email), Nick(nick) { }; +.fi +.SH "Member Data Documentation" +.PP +.SS "const std::string Admin::Email" +.PP +Definition at line 83 of file modules.h. +.SS "const std::string Admin::Name" +.PP +Definition at line 83 of file modules.h. +.SS "const std::string Admin::Nick" +.PP +Definition at line 83 of file modules.h. + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/BanItem.3 b/docs/man/BanItem.3 new file mode 100644 index 000000000..b0bef45ad --- /dev/null +++ b/docs/man/BanItem.3 @@ -0,0 +1,21 @@ +.TH "BanItem" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +BanItem \- A subclass of \fBHostItem\fP designed to hold channel bans (+b). + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <channels.h>\fP +.PP +Inherits \fBHostItem\fP. +.PP +.SH "Detailed Description" +.PP +A subclass of \fBHostItem\fP designed to hold channel bans (+b).Definition at line 34 of file channels.h. + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/ConfigReader.3 b/docs/man/ConfigReader.3 new file mode 100644 index 000000000..173a61b18 --- /dev/null +++ b/docs/man/ConfigReader.3 @@ -0,0 +1,165 @@ +.TH "ConfigReader" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +ConfigReader \- 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. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <modules.h>\fP +.PP +Inherits \fBclassbase\fP. +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "\fBConfigReader\fP ()" +.br +.RI "\fIDefault constructor.\fP" +.ti -1c +.RI "\fBConfigReader\fP (std::string filename)" +.br +.RI "\fIOverloaded constructor.\fP" +.ti -1c +.RI "\fB~ConfigReader\fP ()" +.br +.RI "\fIDefault destructor.\fP" +.ti -1c +.RI "std::string \fBReadValue\fP (std::string tag, std::string name, int index)" +.br +.RI "\fIRetrieves a value from the config file.\fP" +.ti -1c +.RI "int \fBEnumerate\fP (std::string tag)" +.br +.RI "\fICounts the number of times a given tag appears in the config file.\fP" +.ti -1c +.RI "bool \fBVerify\fP ()" +.br +.RI "\fIReturns true if a config file is valid.\fP" +.ti -1c +.RI "int \fBEnumerateValues\fP (std::string tag, int index)" +.br +.RI "\fIReturns the number of items within a tag.\fP" +.in -1c +.SS "Protected Attributes" + +.in +1c +.ti -1c +.RI "std::stringstream * \fBcache\fP" +.br +.RI "\fIThe contents of the configuration file This protected member should never be accessed by a module (and cannot be accessed unless the core is changed).\fP" +.ti -1c +.RI "bool \fBerror\fP" +.br +.RI "\fIUsed to store errors.\fP" +.in -1c +.SH "Detailed Description" +.PP +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. + +It may either be instantiated with one parameter or none. Constructing the class using one parameter allows you to specify a path to your own configuration file, otherwise, inspircd.conf is read. +.PP +Definition at line 518 of file modules.h. +.SH "Constructor & Destructor Documentation" +.PP +.SS "ConfigReader::ConfigReader ()" +.PP +Default constructor.This constructor initialises the ConfigReader class to read the inspircd.conf file as specified when running ./configure.Definition at line 343 of file modules.cpp. +.PP +References cache, and error. +.PP +.nf +344 { +345 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); +346 this->error = LoadConf(CONFIG_FILE,this->cache); +347 } +.fi +.SS "ConfigReader::ConfigReader (std::string filename)" +.PP +Overloaded constructor.This constructor initialises the ConfigReader class to read a user-specified config fileDefinition at line 357 of file modules.cpp. +.PP +References cache, and error. +.PP +.nf +358 { +359 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); +360 this->error = LoadConf(filename.c_str(),this->cache); +361 }; +.fi +.SS "ConfigReader::~ConfigReader ()" +.PP +Default destructor.This method destroys the ConfigReader class.Definition at line 350 of file modules.cpp. +.PP +References cache. +.PP +.nf +351 { +352 if (this->cache) +353 delete this->cache; +354 } +.fi +.SH "Member Function Documentation" +.PP +.SS "int ConfigReader::Enumerate (std::string tag)" +.PP +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 \fBConfigReader::ReadValue\fP to loop through all copies of a multiple instance tag.Definition at line 375 of file modules.cpp. +.PP +.nf +376 { +377 return EnumConf(cache,tag.c_str()); +378 } +.fi +.SS "int ConfigReader::EnumerateValues (std::string tag, int index)" +.PP +Returns the number of items within a tag.For example if the tag was <test tag='blah' data='foo'> then this function would return 2. Spaces and newlines both qualify as valid seperators between values.Definition at line 380 of file modules.cpp. +.PP +.nf +381 { +382 return EnumValues(cache, tag.c_str(), index); +383 } +.fi +.SS "std::string ConfigReader::ReadValue (std::string tag, std::string name, int index)" +.PP +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 363 of file modules.cpp. +.PP +.nf +364 { +365 char val[MAXBUF]; +366 char t[MAXBUF]; +367 char n[MAXBUF]; +368 strncpy(t,tag.c_str(),MAXBUF); +369 strncpy(n,name.c_str(),MAXBUF); +370 ReadConf(cache,t,n,index,val); +371 return std::string(val); +372 } +.fi +.SS "bool ConfigReader::Verify ()" +.PP +Returns true if a config file is valid.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 385 of file modules.cpp. +.PP +References error. +.PP +.nf +386 { +387 return this->error; +388 } +.fi +.SH "Member Data Documentation" +.PP +.SS "std::stringstream* ConfigReader::cache\fC [protected]\fP" +.PP +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 526 of file modules.h. +.PP +Referenced by ConfigReader(), and ~ConfigReader(). +.SS "bool ConfigReader::error\fC [protected]\fP" +.PP +Used to store errors.Definition at line 529 of file modules.h. +.PP +Referenced by ConfigReader(), and Verify(). + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/ConnectClass.3 b/docs/man/ConnectClass.3 new file mode 100644 index 000000000..66933e48f --- /dev/null +++ b/docs/man/ConnectClass.3 @@ -0,0 +1,83 @@ +.TH "ConnectClass" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +ConnectClass \- Holds information relevent to <connect allow> and <connect deny> tags in the config file. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <users.h>\fP +.PP +Inherits \fBclassbase\fP. +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "\fBConnectClass\fP ()" +.br +.in -1c +.SS "Public Attributes" + +.in +1c +.ti -1c +.RI "int \fBtype\fP" +.br +.RI "\fIType of line, either CC_ALLOW or CC_DENY.\fP" +.ti -1c +.RI "int \fBregistration_timeout\fP" +.br +.RI "\fIMax time to register the connection in seconds.\fP" +.ti -1c +.RI "int \fBflood\fP" +.br +.RI "\fINumber of lines in buffer before excess flood is triggered.\fP" +.ti -1c +.RI "char \fBhost\fP [MAXBUF]" +.br +.RI "\fIHost mask for this line.\fP" +.ti -1c +.RI "char \fBpass\fP [MAXBUF]" +.br +.RI "\fI(Optional) Password for this line\fP" +.in -1c +.SH "Detailed Description" +.PP +Holds information relevent to <connect allow> and <connect deny> tags in the config file.Definition at line 34 of file users.h. +.SH "Constructor & Destructor Documentation" +.PP +.SS "ConnectClass::ConnectClass ()\fC [inline]\fP" +.PP +Definition at line 53 of file users.h. +.PP +.nf +54 { +55 registration_timeout = 0; +56 flood = 0; +57 strcpy(host,''); +58 strcpy(pass,''); +59 } +.fi +.SH "Member Data Documentation" +.PP +.SS "int ConnectClass::flood" +.PP +Number of lines in buffer before excess flood is triggered.Definition at line 45 of file users.h. +.SS "char ConnectClass::host[MAXBUF]" +.PP +Host mask for this line.Definition at line 48 of file users.h. +.SS "char ConnectClass::pass[MAXBUF]" +.PP +(Optional) Password for this lineDefinition at line 51 of file users.h. +.SS "int ConnectClass::registration_timeout" +.PP +Max time to register the connection in seconds.Definition at line 42 of file users.h. +.SS "int ConnectClass::type" +.PP +Type of line, either CC_ALLOW or CC_DENY.Definition at line 39 of file users.h. + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/ExemptItem.3 b/docs/man/ExemptItem.3 new file mode 100644 index 000000000..bbcd9aa7c --- /dev/null +++ b/docs/man/ExemptItem.3 @@ -0,0 +1,21 @@ +.TH "ExemptItem" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +ExemptItem \- A subclass of \fBHostItem\fP designed to hold channel exempts (+e). + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <channels.h>\fP +.PP +Inherits \fBHostItem\fP. +.PP +.SH "Detailed Description" +.PP +A subclass of \fBHostItem\fP designed to hold channel exempts (+e).Definition at line 42 of file channels.h. + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/ExtMode.3 b/docs/man/ExtMode.3 new file mode 100644 index 000000000..2d9829b39 --- /dev/null +++ b/docs/man/ExtMode.3 @@ -0,0 +1,66 @@ +.TH "ExtMode" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +ExtMode \- +.SH SYNOPSIS +.br +.PP +Inherits \fBclassbase\fP. +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "\fBExtMode\fP (char mc, int ty, bool oper, int p_on, int p_off)" +.br +.in -1c +.SS "Public Attributes" + +.in +1c +.ti -1c +.RI "char \fBmodechar\fP" +.br +.ti -1c +.RI "int \fBtype\fP" +.br +.ti -1c +.RI "int \fBparams_when_on\fP" +.br +.ti -1c +.RI "int \fBparams_when_off\fP" +.br +.ti -1c +.RI "bool \fBneedsoper\fP" +.br +.in -1c +.SH "Constructor & Destructor Documentation" +.PP +.SS "ExtMode::ExtMode (char mc, int ty, bool oper, int p_on, int p_off)\fC [inline]\fP" +.PP +Definition at line 29 of file modules.cpp. +.PP +.nf +29 : modechar(mc), type(ty), needsoper(oper), params_when_on(p_on), params_when_off(p_off) { }; +.fi +.SH "Member Data Documentation" +.PP +.SS "char ExtMode::modechar" +.PP +Definition at line 24 of file modules.cpp. +.SS "bool ExtMode::needsoper" +.PP +Definition at line 28 of file modules.cpp. +.SS "int ExtMode::params_when_off" +.PP +Definition at line 27 of file modules.cpp. +.SS "int ExtMode::params_when_on" +.PP +Definition at line 26 of file modules.cpp. +.SS "int ExtMode::type" +.PP +Definition at line 25 of file modules.cpp. + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/Extensible.3 b/docs/man/Extensible.3 new file mode 100644 index 000000000..8620f6153 --- /dev/null +++ b/docs/man/Extensible.3 @@ -0,0 +1,67 @@ +.TH "Extensible" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +Extensible \- class Extensible is the parent class of many classes such as userrec and chanrec. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <base.h>\fP +.PP +Inherits \fBclassbase\fP. +.PP +Inherited by \fBchanrec\fP, \fBcommand_t\fP, \fBconnection\fP, \fBircd_connector\fP, and \fBucrec\fP. +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "bool \fBExtend\fP (std::string key, \fBVoidPointer\fP p)" +.br +.RI "\fIExtend an Extensible class.\fP" +.ti -1c +.RI "bool \fBShrink\fP (std::string key)" +.br +.RI "\fIShrink an Extensible class.\fP" +.ti -1c +.RI "\fBVoidPointer\fP \fBGetExt\fP (std::string key)" +.br +.RI "\fIGet an extension item.\fP" +.in -1c +.SS "Private Attributes" + +.in +1c +.ti -1c +.RI "std::map< std::string, \fBVoidPointer\fP > \fBExtension_Items\fP" +.br +.RI "\fIPrivate data store.\fP" +.in -1c +.SH "Detailed Description" +.PP +class Extensible is the parent class of many classes such as userrec and chanrec. + +class Extensible implements a system which allows modules to 'extend' the class by attaching data within a map associated with the object. In this way modules can store their own custom information within user objects, channel objects and server objects, without breaking other modules (this is more sensible than using a flags variable, and each module defining bits within the flag as 'theirs' as it is less prone to conflict and supports arbitary data storage). +.PP +Definition at line 38 of file base.h. +.SH "Member Function Documentation" +.PP +.SS "bool Extensible::Extend (std::string key, \fBVoidPointer\fP p)" +.PP +Extend an Extensible class.You must provide a key to store the data as, and a void* to the data (typedef VoidPointer) The data will be inserted into the map. If the data already exists, you may not insert it twice, \fBExtensible::Extend\fP will return false in this case. On successful extension, Extend returns true. +.SS "\fBVoidPointer\fP Extensible::GetExt (std::string key)" +.PP +Get an extension item.You must provide a key name, which is case sensitive. If you provide a non-existent key name, the function returns NULL, otherwise a pointer to the item referenced by the key is returned. +.SS "bool Extensible::Shrink (std::string key)" +.PP +Shrink an Extensible class.You must provide a key name. The given key name will be removed from the classes data. If you provide a nonexistent key (case is important) then the function will return false. Returns true on success. +.SH "Member Data Documentation" +.PP +.SS "std::map<std::string,\fBVoidPointer\fP> Extensible::Extension_Items\fC [private]\fP" +.PP +Private data store.Definition at line 42 of file base.h. + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/FileReader.3 b/docs/man/FileReader.3 new file mode 100644 index 000000000..5f08e45c4 --- /dev/null +++ b/docs/man/FileReader.3 @@ -0,0 +1,159 @@ +.TH "FileReader" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +FileReader \- Caches a text file into memory and can be used to retrieve lines from it. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <modules.h>\fP +.PP +Inherits \fBclassbase\fP. +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "\fBFileReader\fP ()" +.br +.RI "\fIDefault constructor.\fP" +.ti -1c +.RI "\fBFileReader\fP (std::string filename)" +.br +.RI "\fISecondary constructor.\fP" +.ti -1c +.RI "\fB~FileReader\fP ()" +.br +.RI "\fIDefault destructor.\fP" +.ti -1c +.RI "void \fBLoadFile\fP (std::string filename)" +.br +.RI "\fIUsed to load a file.\fP" +.ti -1c +.RI "bool \fBExists\fP ()" +.br +.RI "\fIReturns true if the file exists This function will return false if the file could not be opened.\fP" +.ti -1c +.RI "std::string \fBGetLine\fP (int x)" +.br +.RI "\fIRetrieve one line from the file.\fP" +.ti -1c +.RI "int \fBFileSize\fP ()" +.br +.RI "\fIReturns the size of the file in lines.\fP" +.in -1c +.SS "Private Attributes" + +.in +1c +.ti -1c +.RI "\fBfile_cache\fP \fBfc\fP" +.br +.in -1c +.SH "Detailed Description" +.PP +Caches a text file into memory and can be used to retrieve lines from it. + +This class contains methods for read-only manipulation of a text file in memory. Either use the constructor type with one parameter to load a file into memory at construction, or use the LoadFile method to load a file. +.PP +Definition at line 578 of file modules.h. +.SH "Constructor & Destructor Documentation" +.PP +.SS "FileReader::FileReader ()" +.PP +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 398 of file modules.cpp. +.PP +.nf +399 { +400 } +.fi +.SS "FileReader::FileReader (std::string filename)" +.PP +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, \fBFileReader::FileSize\fP returns 0.Definition at line 391 of file modules.cpp. +.PP +References fc, and file_cache. +.PP +.nf +392 { +393 file_cache c; +394 readfile(c,filename.c_str()); +395 this->fc = c; +396 } +.fi +.SS "FileReader::~FileReader ()" +.PP +Default destructor.This deletes the memory allocated to the file.Definition at line 410 of file modules.cpp. +.PP +.nf +411 { +412 } +.fi +.SH "Member Function Documentation" +.PP +.SS "bool FileReader::Exists ()" +.PP +Returns true if the file exists This function will return false if the file could not be opened.Definition at line 414 of file modules.cpp. +.PP +References fc. +.PP +.nf +415 { +416 if (fc.size() == 0) +417 { +418 return(false); +419 } +420 else +421 { +422 return(true); +423 } +424 } +.fi +.SS "int FileReader::FileSize ()" +.PP +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 433 of file modules.cpp. +.PP +References fc. +.PP +.nf +434 { +435 return fc.size(); +436 } +.fi +.SS "std::string FileReader::GetLine (int x)" +.PP +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 426 of file modules.cpp. +.PP +References fc. +.PP +.nf +427 { +428 if ((x<0) || (x>fc.size())) +429 return ''; +430 return fc[x]; +431 } +.fi +.SS "void FileReader::LoadFile (std::string filename)" +.PP +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, \fBFileReader::FileSize\fP returns 0.Definition at line 402 of file modules.cpp. +.PP +References fc, and file_cache. +.PP +.nf +403 { +404 file_cache c; +405 readfile(c,filename.c_str()); +406 this->fc = c; +407 } +.fi +.SH "Member Data Documentation" +.PP +.SS "\fBfile_cache\fP FileReader::fc\fC [private]\fP" +.PP +Definition at line 580 of file modules.h. +.PP +Referenced by Exists(), FileReader(), FileSize(), GetLine(), and LoadFile(). + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/GLine.3 b/docs/man/GLine.3 new file mode 100644 index 000000000..9321754aa --- /dev/null +++ b/docs/man/GLine.3 @@ -0,0 +1,34 @@ +.TH "GLine" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +GLine \- GLine class. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <xline.h>\fP +.PP +Inherits \fBXLine\fP. +.PP +.SS "Public Attributes" + +.in +1c +.ti -1c +.RI "char \fBhostmask\fP [MAXBUF]" +.br +.RI "\fIHostmask (ident) to match against May contain wildcards.\fP" +.in -1c +.SH "Detailed Description" +.PP +GLine class.Definition at line 57 of file xline.h. +.SH "Member Data Documentation" +.PP +.SS "char GLine::hostmask[MAXBUF]" +.PP +Hostmask (ident) to match against May contain wildcards.Definition at line 63 of file xline.h. + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/HostItem.3 b/docs/man/HostItem.3 new file mode 100644 index 000000000..e79df0966 --- /dev/null +++ b/docs/man/HostItem.3 @@ -0,0 +1,77 @@ +.TH "HostItem" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +HostItem \- Holds an entry for a ban list, exemption list, or invite list. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <channels.h>\fP +.PP +Inherits \fBclassbase\fP. +.PP +Inherited by \fBBanItem\fP, \fBExemptItem\fP, and \fBInviteItem\fP. +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "\fBHostItem\fP ()" +.br +.ti -1c +.RI "virtual \fB~HostItem\fP ()" +.br +.in -1c +.SS "Public Attributes" + +.in +1c +.ti -1c +.RI "time_t \fBset_time\fP" +.br +.ti -1c +.RI "char \fBset_by\fP [NICKMAX]" +.br +.ti -1c +.RI "char \fBdata\fP [MAXBUF]" +.br +.in -1c +.SH "Detailed Description" +.PP +Holds an entry for a ban list, exemption list, or invite list. + +This class contains a single element in a channel list, such as a banlist. +.PP +Definition at line 18 of file channels.h. +.SH "Constructor & Destructor Documentation" +.PP +.SS "HostItem::HostItem ()\fC [inline]\fP" +.PP +Definition at line 25 of file channels.h. +.PP +.nf +25 { /* stub */ } +.fi +.SS "virtual HostItem::~HostItem ()\fC [inline, virtual]\fP" +.PP +Definition at line 26 of file channels.h. +.PP +.nf +26 { /* stub */ } +.fi +.SH "Member Data Documentation" +.PP +.SS "char HostItem::data[MAXBUF]" +.PP +Definition at line 23 of file channels.h. +.SS "char HostItem::set_by[NICKMAX]" +.PP +Definition at line 22 of file channels.h. +.SS "time_t HostItem::set_time" +.PP +Definition at line 21 of file channels.h. + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/InviteItem.3 b/docs/man/InviteItem.3 new file mode 100644 index 000000000..2a4812eec --- /dev/null +++ b/docs/man/InviteItem.3 @@ -0,0 +1,21 @@ +.TH "InviteItem" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +InviteItem \- A subclass of \fBHostItem\fP designed to hold channel invites (+I). + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <channels.h>\fP +.PP +Inherits \fBHostItem\fP. +.PP +.SH "Detailed Description" +.PP +A subclass of \fBHostItem\fP designed to hold channel invites (+I).Definition at line 50 of file channels.h. + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/Invited.3 b/docs/man/Invited.3 new file mode 100644 index 000000000..8ec25bfcc --- /dev/null +++ b/docs/man/Invited.3 @@ -0,0 +1,35 @@ +.TH "Invited" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +Invited \- Holds a channel name to which a user has been invited. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <users.h>\fP +.PP +Inherits \fBclassbase\fP. +.PP +.SS "Public Attributes" + +.in +1c +.ti -1c +.RI "char \fBchannel\fP [CHANMAX]" +.br +.in -1c +.SH "Detailed Description" +.PP +Holds a channel name to which a user has been invited.Definition at line 25 of file users.h. +.SH "Member Data Documentation" +.PP +.SS "char Invited::channel[CHANMAX]" +.PP +Definition at line 28 of file users.h. +.PP +Referenced by userrec::InviteTo(). + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/KLine.3 b/docs/man/KLine.3 new file mode 100644 index 000000000..e15e3b98a --- /dev/null +++ b/docs/man/KLine.3 @@ -0,0 +1,34 @@ +.TH "KLine" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +KLine \- KLine class. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <xline.h>\fP +.PP +Inherits \fBXLine\fP. +.PP +.SS "Public Attributes" + +.in +1c +.ti -1c +.RI "char \fBhostmask\fP [MAXBUF]" +.br +.RI "\fIHostmask (ident) to match against May contain wildcards.\fP" +.in -1c +.SH "Detailed Description" +.PP +KLine class.Definition at line 46 of file xline.h. +.SH "Member Data Documentation" +.PP +.SS "char KLine::hostmask[MAXBUF]" +.PP +Hostmask (ident) to match against May contain wildcards.Definition at line 52 of file xline.h. + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/ModeParameter.3 b/docs/man/ModeParameter.3 new file mode 100644 index 000000000..2d37212bd --- /dev/null +++ b/docs/man/ModeParameter.3 @@ -0,0 +1,55 @@ +.TH "ModeParameter" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +ModeParameter \- Holds a custom parameter to a module-defined channel mode e.g. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <channels.h>\fP +.PP +Inherits \fBclassbase\fP. +.PP +.SS "Public Attributes" + +.in +1c +.ti -1c +.RI "char \fBmode\fP" +.br +.ti -1c +.RI "char \fBparameter\fP [MAXBUF]" +.br +.ti -1c +.RI "char \fBchannel\fP [CHANMAX]" +.br +.in -1c +.SH "Detailed Description" +.PP +Holds a custom parameter to a module-defined channel mode e.g. + +for +L this would hold the channel name. +.PP +Definition at line 59 of file channels.h. +.SH "Member Data Documentation" +.PP +.SS "char ModeParameter::channel[CHANMAX]" +.PP +Definition at line 64 of file channels.h. +.PP +Referenced by chanrec::SetCustomModeParam(). +.SS "char ModeParameter::mode" +.PP +Definition at line 62 of file channels.h. +.PP +Referenced by chanrec::SetCustomModeParam(). +.SS "char ModeParameter::parameter[MAXBUF]" +.PP +Definition at line 63 of file channels.h. +.PP +Referenced by chanrec::SetCustomModeParam(). + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/Module.3 b/docs/man/Module.3 new file mode 100644 index 000000000..08189dd75 --- /dev/null +++ b/docs/man/Module.3 @@ -0,0 +1,249 @@ +.TH "Module" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +Module \- Base class for all InspIRCd modules This class is the base class for InspIRCd modules. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <modules.h>\fP +.PP +Inherits \fBclassbase\fP. +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "\fBModule\fP ()" +.br +.RI "\fIDefault constructor creates a module class.\fP" +.ti -1c +.RI "virtual \fB~Module\fP ()" +.br +.RI "\fIDefault destructor destroys a module class.\fP" +.ti -1c +.RI "virtual \fBVersion\fP \fBGetVersion\fP ()" +.br +.RI "\fIReturns the version number of a Module.\fP" +.ti -1c +.RI "virtual void \fBOnUserConnect\fP (\fBuserrec\fP *user)" +.br +.RI "\fICalled when a user connects.\fP" +.ti -1c +.RI "virtual void \fBOnUserQuit\fP (\fBuserrec\fP *user)" +.br +.RI "\fICalled when a user quits.\fP" +.ti -1c +.RI "virtual void \fBOnUserJoin\fP (\fBuserrec\fP *user, \fBchanrec\fP *channel)" +.br +.RI "\fICalled when a user joins a channel.\fP" +.ti -1c +.RI "virtual void \fBOnUserPart\fP (\fBuserrec\fP *user, \fBchanrec\fP *channel)" +.br +.RI "\fICalled when a user parts a channel.\fP" +.ti -1c +.RI "virtual void \fBOnPacketTransmit\fP (char *p)" +.br +.RI "\fICalled before a packet is transmitted across the irc network between two irc servers.\fP" +.ti -1c +.RI "virtual void \fBOnPacketReceive\fP (char *p)" +.br +.RI "\fICalled after a packet is received from another irc server.\fP" +.ti -1c +.RI "virtual void \fBOnRehash\fP ()" +.br +.RI "\fICalled on rehash.\fP" +.ti -1c +.RI "virtual void \fBOnServerRaw\fP (std::string &raw, bool inbound, \fBuserrec\fP *user)" +.br +.RI "\fICalled when a raw command is transmitted or received.\fP" +.ti -1c +.RI "virtual bool \fBOnExtendedMode\fP (\fBuserrec\fP *user, void *target, char modechar, int type, bool mode_on, \fBstring_list\fP ¶ms)" +.br +.RI "\fICalled whenever an extended mode is to be processed.\fP" +.ti -1c +.RI "virtual int \fBOnUserPreJoin\fP (\fBuserrec\fP *user, \fBchanrec\fP *chan, const char *cname)" +.br +.RI "\fICalled whenever a user is about to join a channel, before any processing is done.\fP" +.ti -1c +.RI "virtual void \fBOnOper\fP (\fBuserrec\fP *user)" +.br +.RI "\fICalled whenever a user opers locally.\fP" +.ti -1c +.RI "virtual void \fBOnInfo\fP (\fBuserrec\fP *user)" +.br +.RI "\fICalled whenever a user types /INFO.\fP" +.ti -1c +.RI "virtual void \fBOnWhois\fP (\fBuserrec\fP *source, \fBuserrec\fP *dest)" +.br +.RI "\fICalled whenever a /WHOIS is performed on a local user.\fP" +.ti -1c +.RI "virtual int \fBOnUserPreMessage\fP (\fBuserrec\fP *user, void *dest, int target_type, std::string text)" +.br +.RI "\fICalled whenever a user is about to PRIVMSG A user or a channel, before any processing is done.\fP" +.ti -1c +.RI "virtual int \fBOnUserPreNotice\fP (\fBuserrec\fP *user, void *dest, int target_type, std::string text)" +.br +.RI "\fICalled whenever a user is about to NOTICE A user or a channel, before any processing is done.\fP" +.ti -1c +.RI "virtual int \fBOnUserPreNick\fP (\fBuserrec\fP *user, std::string newnick)" +.br +.RI "\fICalled before any nickchange, local or remote.\fP" +.in -1c +.SH "Detailed Description" +.PP +Base class for all InspIRCd modules This class is the base class for InspIRCd modules. + +All modules must inherit from this class, its methods will be called when irc server events occur. class inherited from module must be instantiated by the \fBModuleFactory\fP class (see relevent section) for the plugin to be initialised. +.PP +Definition at line 92 of file modules.h. +.SH "Constructor & Destructor Documentation" +.PP +.SS "Module::Module ()" +.PP +Default constructor creates a module class.Definition at line 111 of file modules.cpp. +.PP +.nf +111 { } +.fi +.SS "Module::~Module ()\fC [virtual]\fP" +.PP +Default destructor destroys a module class.Definition at line 112 of file modules.cpp. +.PP +.nf +112 { } +.fi +.SH "Member Function Documentation" +.PP +.SS "\fBVersion\fP Module::GetVersion ()\fC [virtual]\fP" +.PP +Returns the version number of a Module.The method should return a \fBVersion\fP object with its version information assigned via \fBVersion::Version\fPDefinition at line 123 of file modules.cpp. +.PP +.nf +123 { return Version(1,0,0,0); } +.fi +.SS "bool Module::OnExtendedMode (\fBuserrec\fP * user, void * target, char modechar, int type, bool mode_on, \fBstring_list\fP & params)\fC [virtual]\fP" +.PP +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 \fBServer::AddExtendedMode\fP 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 122 of file modules.cpp. +.PP +.nf +122 { return false; } +.fi +.SS "void Module::OnInfo (\fBuserrec\fP * user)\fC [virtual]\fP" +.PP +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: +.PP +:information hereDefinition at line 125 of file modules.cpp. +.PP +.nf +125 { }; +.fi +.SS "void Module::OnOper (\fBuserrec\fP * user)\fC [virtual]\fP" +.PP +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 124 of file modules.cpp. +.PP +.nf +124 { }; +.fi +.SS "void Module::OnPacketReceive (char * p)\fC [virtual]\fP" +.PP +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 118 of file modules.cpp. +.PP +.nf +118 { } +.fi +.SS "void Module::OnPacketTransmit (char * p)\fC [virtual]\fP" +.PP +Called before a packet is transmitted across the irc network between two irc servers.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 117 of file modules.cpp. +.PP +.nf +117 { } +.fi +.SS "void Module::OnRehash ()\fC [virtual]\fP" +.PP +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 119 of file modules.cpp. +.PP +.nf +119 { } +.fi +.SS "void Module::OnServerRaw (std::string & raw, bool inbound, \fBuserrec\fP * user)\fC [virtual]\fP" +.PP +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. For INBOUND messages only (where inbound is set to true) the value of user will be the userrec of the connection sending the data. This is not possible for outbound data because the data may be being routed to multiple targets.Definition at line 120 of file modules.cpp. +.PP +.nf +120 { } +.fi +.SS "void Module::OnUserConnect (\fBuserrec\fP * user)\fC [virtual]\fP" +.PP +Called when a user connects.The details of the connecting user are available to you in the parameter userrec *userDefinition at line 113 of file modules.cpp. +.PP +.nf +113 { } +.fi +.SS "void Module::OnUserJoin (\fBuserrec\fP * user, \fBchanrec\fP * channel)\fC [virtual]\fP" +.PP +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 *channelDefinition at line 115 of file modules.cpp. +.PP +.nf +115 { } +.fi +.SS "void Module::OnUserPart (\fBuserrec\fP * user, \fBchanrec\fP * channel)\fC [virtual]\fP" +.PP +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 *channelDefinition at line 116 of file modules.cpp. +.PP +.nf +116 { } +.fi +.SS "int Module::OnUserPreJoin (\fBuserrec\fP * user, \fBchanrec\fP * chan, const char * cname)\fC [virtual]\fP" +.PP +Called whenever a user is about to join a channel, before any processing is done.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 mimic +b, +k, +l etc. +.PP +IMPORTANT NOTE! +.PP +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 121 of file modules.cpp. +.PP +.nf +121 { return 0; } +.fi +.SS "int Module::OnUserPreMessage (\fBuserrec\fP * user, void * dest, int target_type, std::string text)\fC [virtual]\fP" +.PP +Called whenever a user is about to PRIVMSG A user or a channel, before any processing is done.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 127 of file modules.cpp. +.PP +.nf +127 { return 0; }; +.fi +.SS "int Module::OnUserPreNick (\fBuserrec\fP * user, std::string newnick)\fC [virtual]\fP" +.PP +Called before any nickchange, local or remote.This can be used to implement Q-lines etc. Please note that although you can see remote nickchanges through this function, you should NOT make any changes to the userrec if the user is a remote user as this may cause a desnyc. check user->server before taking any action (including returning nonzero from the method). If your method returns nonzero, the nickchange is silently forbidden, and it is down to your module to generate some meaninful output.Definition at line 129 of file modules.cpp. +.PP +.nf +129 { return 0; }; +.fi +.SS "int Module::OnUserPreNotice (\fBuserrec\fP * user, void * dest, int target_type, std::string text)\fC [virtual]\fP" +.PP +Called whenever a user is about to NOTICE A user or a channel, before any processing is done.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 128 of file modules.cpp. +.PP +.nf +128 { return 0; }; +.fi +.SS "void Module::OnUserQuit (\fBuserrec\fP * user)\fC [virtual]\fP" +.PP +Called when a user quits.The details of the exiting user are available to you in the parameter userrec *userDefinition at line 114 of file modules.cpp. +.PP +.nf +114 { } +.fi +.SS "void Module::OnWhois (\fBuserrec\fP * source, \fBuserrec\fP * dest)\fC [virtual]\fP" +.PP +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 126 of file modules.cpp. +.PP +.nf +126 { }; +.fi + + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/ModuleFactory.3 b/docs/man/ModuleFactory.3 new file mode 100644 index 000000000..4d6298ae9 --- /dev/null +++ b/docs/man/ModuleFactory.3 @@ -0,0 +1,60 @@ +.TH "ModuleFactory" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +ModuleFactory \- Instantiates classes inherited from \fBModule\fP This class creates a class inherited from type \fBModule\fP, using new. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <modules.h>\fP +.PP +Inherits \fBclassbase\fP. +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "\fBModuleFactory\fP ()" +.br +.ti -1c +.RI "virtual \fB~ModuleFactory\fP ()" +.br +.ti -1c +.RI "virtual \fBModule\fP * \fBCreateModule\fP ()=0" +.br +.RI "\fICreates a new module.\fP" +.in -1c +.SH "Detailed Description" +.PP +Instantiates classes inherited from \fBModule\fP This class creates a class inherited from type \fBModule\fP, using new. + +This is to allow for modules to create many different variants of \fBModule\fP, dependent on architecture, configuration, etc. In most cases, the simple class shown in the example module m_foobar.so will suffice for most modules. +.PP +Definition at line 633 of file modules.h. +.SH "Constructor & Destructor Documentation" +.PP +.SS "ModuleFactory::ModuleFactory ()\fC [inline]\fP" +.PP +Definition at line 636 of file modules.h. +.PP +.nf +636 { } +.fi +.SS "virtual ModuleFactory::~ModuleFactory ()\fC [inline, virtual]\fP" +.PP +Definition at line 637 of file modules.h. +.PP +.nf +637 { } +.fi +.SH "Member Function Documentation" +.PP +.SS "virtual \fBModule\fP* ModuleFactory::CreateModule ()\fC [pure virtual]\fP" +.PP +Creates a new module.Your inherited class of ModuleFactory must return a pointer to your \fBModule\fP class using this method. + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/QLine.3 b/docs/man/QLine.3 new file mode 100644 index 000000000..2df695bea --- /dev/null +++ b/docs/man/QLine.3 @@ -0,0 +1,41 @@ +.TH "QLine" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +QLine \- QLine class. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <xline.h>\fP +.PP +Inherits \fBXLine\fP. +.PP +.SS "Public Attributes" + +.in +1c +.ti -1c +.RI "char \fBnick\fP [MAXBUF]" +.br +.RI "\fINickname to match against.\fP" +.ti -1c +.RI "bool \fBis_global\fP" +.br +.RI "\fISet if this is a global Z:line (e.g.\fP" +.in -1c +.SH "Detailed Description" +.PP +QLine class.Definition at line 83 of file xline.h. +.SH "Member Data Documentation" +.PP +.SS "bool QLine::is_global" +.PP +Set if this is a global Z:line (e.g.it came from another server)Definition at line 93 of file xline.h. +.SS "char QLine::nick[MAXBUF]" +.PP +Nickname to match against.May contain wildcards.Definition at line 89 of file xline.h. + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/Server.3 b/docs/man/Server.3 new file mode 100644 index 000000000..b25d3de50 --- /dev/null +++ b/docs/man/Server.3 @@ -0,0 +1,561 @@ +.TH "Server" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +Server \- 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. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <modules.h>\fP +.PP +Inherits \fBclassbase\fP. +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "\fBServer\fP ()" +.br +.RI "\fIDefault constructor.\fP" +.ti -1c +.RI "virtual \fB~Server\fP ()" +.br +.RI "\fIDefault destructor.\fP" +.ti -1c +.RI "virtual void \fBSendOpers\fP (std::string s)" +.br +.RI "\fISends text to all opers.\fP" +.ti -1c +.RI "virtual void \fBLog\fP (int level, std::string s)" +.br +.RI "\fIWrites a log string.\fP" +.ti -1c +.RI "virtual void \fBSend\fP (int Socket, std::string s)" +.br +.RI "\fISends a line of text down a TCP/IP socket.\fP" +.ti -1c +.RI "virtual void \fBSendServ\fP (int Socket, std::string s)" +.br +.RI "\fISends text from the server to a socket.\fP" +.ti -1c +.RI "virtual void \fBSendFrom\fP (int Socket, \fBuserrec\fP *User, std::string s)" +.br +.RI "\fISends text from a user to a socket.\fP" +.ti -1c +.RI "virtual void \fBSendTo\fP (\fBuserrec\fP *Source, \fBuserrec\fP *Dest, std::string s)" +.br +.RI "\fISends text from a user to another user.\fP" +.ti -1c +.RI "virtual void \fBSendChannel\fP (\fBuserrec\fP *User, \fBchanrec\fP *Channel, std::string s, bool IncludeSender)" +.br +.RI "\fISends text from a user to a channel (mulicast).\fP" +.ti -1c +.RI "virtual bool \fBCommonChannels\fP (\fBuserrec\fP *u1, \fBuserrec\fP *u2)" +.br +.RI "\fIReturns true if two users share a common channel.\fP" +.ti -1c +.RI "virtual void \fBSendCommon\fP (\fBuserrec\fP *User, std::string text, bool IncludeSender)" +.br +.RI "\fISends text from a user to one or more channels (mulicast).\fP" +.ti -1c +.RI "virtual void \fBSendWallops\fP (\fBuserrec\fP *User, std::string text)" +.br +.RI "\fISends a WALLOPS message.\fP" +.ti -1c +.RI "virtual bool \fBIsNick\fP (std::string nick)" +.br +.RI "\fIReturns true if a nick is valid.\fP" +.ti -1c +.RI "virtual int \fBCountUsers\fP (\fBchanrec\fP *c)" +.br +.RI "\fIReturns a count of the number of users on a channel.\fP" +.ti -1c +.RI "virtual \fBuserrec\fP * \fBFindNick\fP (std::string nick)" +.br +.RI "\fIAttempts to look up a nick and return a pointer to it.\fP" +.ti -1c +.RI "virtual \fBchanrec\fP * \fBFindChannel\fP (std::string channel)" +.br +.RI "\fIAttempts to look up a channel and return a pointer to it.\fP" +.ti -1c +.RI "virtual std::string \fBChanMode\fP (\fBuserrec\fP *User, \fBchanrec\fP *Chan)" +.br +.RI "\fIAttempts to look up a user's privilages on a channel.\fP" +.ti -1c +.RI "virtual std::string \fBGetServerName\fP ()" +.br +.RI "\fIReturns the server name of the server where the module is loaded.\fP" +.ti -1c +.RI "virtual std::string \fBGetNetworkName\fP ()" +.br +.RI "\fIReturns the network name, global to all linked servers.\fP" +.ti -1c +.RI "virtual \fBAdmin\fP \fBGetAdmin\fP ()" +.br +.RI "\fIReturns the information of the server as returned by the /ADMIN command.\fP" +.ti -1c +.RI "virtual bool \fBAddExtendedMode\fP (char modechar, int type, bool requires_oper, int params_when_on, int params_when_off)" +.br +.RI "\fIAdds an extended mode letter which is parsed by a module This allows modules to add extra mode letters, e.g.\fP" +.ti -1c +.RI "virtual void \fBAddCommand\fP (char *cmd, handlerfunc f, char flags, int minparams)" +.br +.RI "\fIAdds a command to the command table.\fP" +.ti -1c +.RI "virtual void \fBSendMode\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.RI "\fISends a servermode.\fP" +.ti -1c +.RI "virtual void \fBSendToModeMask\fP (std::string modes, int flags, std::string text)" +.br +.RI "\fISends to all users matching a mode mask You must specify one or more usermodes as the first parameter.\fP" +.ti -1c +.RI "virtual \fBchanrec\fP * \fBJoinUserToChannel\fP (\fBuserrec\fP *user, std::string cname, std::string key)" +.br +.RI "\fIForces a user to join a channel.\fP" +.ti -1c +.RI "virtual \fBchanrec\fP * \fBPartUserFromChannel\fP (\fBuserrec\fP *user, std::string cname, std::string reason)" +.br +.RI "\fIForces a user to part a channel.\fP" +.ti -1c +.RI "virtual void \fBChangeUserNick\fP (\fBuserrec\fP *user, std::string nickname)" +.br +.RI "\fIForces a user nickchange.\fP" +.ti -1c +.RI "virtual void \fBQuitUser\fP (\fBuserrec\fP *user, std::string reason)" +.br +.RI "\fIForces a user to quit with the specified reason.\fP" +.ti -1c +.RI "virtual bool \fBMatchText\fP (std::string sliteral, std::string spattern)" +.br +.RI "\fIMatches text against a glob pattern.\fP" +.ti -1c +.RI "virtual void \fBCallCommandHandler\fP (std::string commandname, char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.RI "\fICalls the handler for a command, either implemented by the core or by another module.\fP" +.ti -1c +.RI "virtual void \fBChangeHost\fP (\fBuserrec\fP *user, std::string host)" +.br +.RI "\fIChange displayed hostname of a user.\fP" +.ti -1c +.RI "virtual void \fBChangeGECOS\fP (\fBuserrec\fP *user, std::string gecos)" +.br +.RI "\fIChange GECOS (fullname) of a user.\fP" +.ti -1c +.RI "virtual bool \fBIsUlined\fP (std::string server)" +.br +.RI "\fIReturns true if the servername you give is ulined.\fP" +.in -1c +.SH "Detailed Description" +.PP +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. + +All modules should instantiate at least one copy of this class, and use its member functions to perform their tasks. +.PP +Definition at line 252 of file modules.h. +.SH "Constructor & Destructor Documentation" +.PP +.SS "Server::Server ()" +.PP +Default constructor.Creates a Server object.Definition at line 135 of file modules.cpp. +.PP +.nf +136 { +137 } +.fi +.SS "Server::~Server ()\fC [virtual]\fP" +.PP +Default destructor.Destroys a Server object.Definition at line 139 of file modules.cpp. +.PP +.nf +140 { +141 } +.fi +.SH "Member Function Documentation" +.PP +.SS "void Server::AddCommand (char * cmd, handlerfunc f, char flags, int minparams)\fC [virtual]\fP" +.PP +Adds a command to the command table.This allows modules to add extra commands into the command table. You must place a function within your module which is is of type handlerfunc: +.PP +typedef void (handlerfunc) (char**, int, userrec*); ... void \fBhandle_kill(char **parameters, int pcnt, userrec *user)\fP +.PP +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 197 of file modules.cpp. +.PP +References createcommand(). +.PP +.nf +198 { +199 createcommand(cmd,f,flags,minparams); +200 } +.fi +.SS "bool Server::AddExtendedMode (char modechar, int type, bool requires_oper, int params_when_on, int params_when_off)\fC [virtual]\fP" +.PP +Adds an extended mode letter which is parsed by a module This allows modules to add extra mode letters, e.g.+x for hostcloak. the 'type' parameter is either MT_CHANNEL, MT_CLIENT, or MT_SERVER, to indicate wether the mode is a channel mode, a client mode, or a server mode. 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 317 of file modules.cpp. +.PP +References DoAddExtendedMode(), MT_CLIENT, and MT_SERVER. +.PP +.nf +318 { +319 if (type == MT_SERVER) +320 { +321 log(DEBUG,'*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion'); +322 return false; +323 } +324 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT)) +325 { +326 log(DEBUG,'*** API ERROR *** Parameters on MT_CLIENT modes are not supported'); +327 return false; +328 } +329 if ((params_when_on>1) || (params_when_off>1)) +330 { +331 log(DEBUG,'*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported'); +332 return false; +333 } +334 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off); +335 } +.fi +.SS "void Server::CallCommandHandler (std::string commandname, char ** parameters, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP" +.PP +Calls the handler for a command, either implemented by the core or by another module.You can use this function to trigger other commands in the ircd, such as PRIVMSG, JOIN, KICK etc, or even as a method of callback. By defining command names that are untypeable for users on irc (e.g. those which contain a or +.br +) you may use them as callback identifiers. The first parameter to this method is the name of the command handler you wish to call, e.g. PRIVMSG. This will be a command handler previously registered by the core or wih \fBAddCommand()\fP. The second parameter is an array of parameters, and the third parameter is a count of parameters in the array. If you do not pass enough parameters to meet the minimum needed by the handler, the functiom will silently ignore it. The final parameter is the user executing the command handler, used for privilage checks, etc.Definition at line 187 of file modules.cpp. +.PP +.nf +188 { +189 call_handler(commandname.c_str(),parameters,pcnt,user); +190 } +.fi +.SS "void Server::ChangeGECOS (\fBuserrec\fP * user, std::string gecos)\fC [virtual]\fP" +.PP +Change GECOS (fullname) of a user.You should always call this method to change a user's GECOS rather than writing directly to the fullname member of userrec, as any change applied via this method will be propogated to any linked servers.Definition at line 275 of file modules.cpp. +.PP +References ChangeName(). +.PP +.nf +276 { +277 ChangeName(user,gecos.c_str()); +278 } +.fi +.SS "void Server::ChangeHost (\fBuserrec\fP * user, std::string host)\fC [virtual]\fP" +.PP +Change displayed hostname of a user.You should always call this method to change a user's host rather than writing directly to the dhost member of userrec, as any change applied via this method will be propogated to any linked servers.Definition at line 270 of file modules.cpp. +.PP +References ChangeDisplayedHost(). +.PP +.nf +271 { +272 ChangeDisplayedHost(user,host.c_str()); +273 } +.fi +.SS "void Server::ChangeUserNick (\fBuserrec\fP * user, std::string nickname)\fC [virtual]\fP" +.PP +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 171 of file modules.cpp. +.PP +.nf +172 { +173 force_nickchange(user,nickname.c_str()); +174 } +.fi +.SS "std::string Server::ChanMode (\fBuserrec\fP * User, \fBchanrec\fP * Chan)\fC [virtual]\fP" +.PP +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 295 of file modules.cpp. +.PP +References cmode(). +.PP +.nf +296 { +297 return cmode(User,Chan); +298 } +.fi +.SS "bool Server::CommonChannels (\fBuserrec\fP * u1, \fBuserrec\fP * u2)\fC [virtual]\fP" +.PP +Returns true if two users share a common channel.This method is used internally by the NICK and QUIT commands, and the \fBServer::SendCommon\fP method.Definition at line 248 of file modules.cpp. +.PP +References common_channels(). +.PP +.nf +249 { +250 return (common_channels(u1,u2) != 0); +251 } +.fi +.SS "int Server::CountUsers (\fBchanrec\fP * c)\fC [virtual]\fP" +.PP +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 337 of file modules.cpp. +.PP +.nf +338 { +339 return usercount(c); +340 } +.fi +.SS "\fBchanrec\fP * Server::FindChannel (std::string channel)\fC [virtual]\fP" +.PP +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 290 of file modules.cpp. +.PP +.nf +291 { +292 return FindChan(channel.c_str()); +293 } +.fi +.SS "\fBuserrec\fP * Server::FindNick (std::string nick)\fC [virtual]\fP" +.PP +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 285 of file modules.cpp. +.PP +.nf +286 { +287 return Find(nick); +288 } +.fi +.SS "\fBAdmin\fP Server::GetAdmin ()\fC [virtual]\fP" +.PP +Returns the information of the server as returned by the /ADMIN command.See the \fBAdmin\fP class for further information of the return value. The members \fBAdmin::Nick\fP, \fBAdmin::Email\fP and \fBAdmin::Name\fP contain the information for the server where the module is loaded.Definition at line 310 of file modules.cpp. +.PP +.nf +311 { +312 return Admin(getadminname(),getadminemail(),getadminnick()); +313 } +.fi +.SS "std::string Server::GetNetworkName ()\fC [virtual]\fP" +.PP +Returns the network name, global to all linked servers.Definition at line 305 of file modules.cpp. +.PP +.nf +306 { +307 return getnetworkname(); +308 } +.fi +.SS "std::string Server::GetServerName ()\fC [virtual]\fP" +.PP +Returns the server name of the server where the module is loaded.Definition at line 300 of file modules.cpp. +.PP +.nf +301 { +302 return getservername(); +303 } +.fi +.SS "bool Server::IsNick (std::string nick)\fC [virtual]\fP" +.PP +Returns true if a nick is valid.Nicks for unregistered connections will return false.Definition at line 280 of file modules.cpp. +.PP +References isnick(). +.PP +.nf +281 { +282 return (isnick(nick.c_str()) != 0); +283 } +.fi +.SS "bool Server::IsUlined (std::string server)\fC [virtual]\fP" +.PP +Returns true if the servername you give is ulined.ULined servers have extra privilages. They are allowed to change nicknames on remote servers, change modes of clients which are on remote servers and set modes of channels where there are no channel operators for that channel on the ulined server, amongst other things. Ulined server data is also broadcast across the mesh at all times as opposed to selectively messaged in the case of normal servers, as many ulined server types (such as services) do not support meshed links and must operate in this manner.Definition at line 182 of file modules.cpp. +.PP +References is_uline(). +.PP +.nf +183 { +184 return is_uline(server.c_str()); +185 } +.fi +.SS "\fBchanrec\fP * Server::JoinUserToChannel (\fBuserrec\fP * user, std::string cname, std::string key)\fC [virtual]\fP" +.PP +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 161 of file modules.cpp. +.PP +.nf +162 { +163 return add_channel(user,cname.c_str(),key.c_str(),true); +164 } +.fi +.SS "void Server::Log (int level, std::string s)\fC [virtual]\fP" +.PP +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 192 of file modules.cpp. +.PP +.nf +193 { +194 log(level,'%s',s.c_str()); +195 } +.fi +.SS "bool Server::MatchText (std::string sliteral, std::string spattern)\fC [virtual]\fP" +.PP +Matches text against a glob pattern.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 148 of file modules.cpp. +.PP +.nf +149 { +150 char literal[MAXBUF],pattern[MAXBUF]; +151 strncpy(literal,sliteral.c_str(),MAXBUF); +152 strncpy(pattern,spattern.c_str(),MAXBUF); +153 return match(literal,pattern); +154 } +.fi +.SS "\fBchanrec\fP * Server::PartUserFromChannel (\fBuserrec\fP * user, std::string cname, std::string reason)\fC [virtual]\fP" +.PP +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 166 of file modules.cpp. +.PP +.nf +167 { +168 return del_channel(user,cname.c_str(),reason.c_str(),false); +169 } +.fi +.SS "void Server::QuitUser (\fBuserrec\fP * user, std::string reason)\fC [virtual]\fP" +.PP +Forces a user to quit with the specified reason.To the user, it will appear as if they typed /QUIT themselves, except for the fact that this function may bypass the quit prefix specified in the config file. +.PP +WARNING! +.PP +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 176 of file modules.cpp. +.PP +References userrec::nick, and send_network_quit(). +.PP +.nf +177 { +178 send_network_quit(user->nick,reason.c_str()); +179 kill_link(user,reason.c_str()); +180 } +.fi +.SS "void Server::Send (int Socket, std::string s)\fC [virtual]\fP" +.PP +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 207 of file modules.cpp. +.PP +.nf +208 { +209 Write(Socket,'%s',s.c_str()); +210 } +.fi +.SS "void Server::SendChannel (\fBuserrec\fP * User, \fBchanrec\fP * Channel, std::string s, bool IncludeSender)\fC [virtual]\fP" +.PP +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 236 of file modules.cpp. +.PP +.nf +237 { +238 if (IncludeSender) +239 { +240 WriteChannel(Channel,User,'%s',s.c_str()); +241 } +242 else +243 { +244 ChanExceptSender(Channel,User,'%s',s.c_str()); +245 } +246 } +.fi +.SS "void Server::SendCommon (\fBuserrec\fP * User, std::string text, bool IncludeSender)\fC [virtual]\fP" +.PP +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 253 of file modules.cpp. +.PP +.nf +254 { +255 if (IncludeSender) +256 { +257 WriteCommon(User,'%s',text.c_str()); +258 } +259 else +260 { +261 WriteCommonExcept(User,'%s',text.c_str()); +262 } +263 } +.fi +.SS "void Server::SendFrom (int Socket, \fBuserrec\fP * User, std::string s)\fC [virtual]\fP" +.PP +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 217 of file modules.cpp. +.PP +.nf +218 { +219 WriteFrom(Socket,User,'%s',s.c_str()); +220 } +.fi +.SS "void Server::SendMode (char ** parameters, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP" +.PP +Sends a servermode.you must format the parameters array with the target, modes and parameters for those modes. +.PP +For example: +.PP +char *modes[3]; +.PP +modes[0] = ChannelName; +.PP +modes[1] = '+o'; +.PP +modes[2] = user->nick; +.PP +Srv->SendMode(modes,3,user); +.PP +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 202 of file modules.cpp. +.PP +References server_mode(). +.PP +.nf +203 { +204 server_mode(parameters,pcnt,user); +205 } +.fi +.SS "void Server::SendOpers (std::string s)\fC [virtual]\fP" +.PP +Sends text to all opers.This method sends a server notice to all opers with the usermode +s.Definition at line 143 of file modules.cpp. +.PP +.nf +144 { +145 WriteOpers('%s',s.c_str()); +146 } +.fi +.SS "void Server::SendServ (int Socket, std::string s)\fC [virtual]\fP" +.PP +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 212 of file modules.cpp. +.PP +.nf +213 { +214 WriteServ(Socket,'%s',s.c_str()); +215 } +.fi +.SS "void Server::SendTo (\fBuserrec\fP * Source, \fBuserrec\fP * Dest, std::string s)\fC [virtual]\fP" +.PP +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) If you specify NULL as the source, then the data will originate from the local server, e.g. instead of: +.PP +:user!ident TEXT +.PP +The format will become: +.PP +:localserver TEXT +.PP +Which is useful for numerics and server notices to single users, etc.Definition at line 222 of file modules.cpp. +.PP +References connection::fd. +.PP +.nf +223 { +224 if (!Source) +225 { +226 // if source is NULL, then the message originates from the local server +227 Write(Dest->fd,':%s %s',this->GetServerName().c_str(),s.c_str()); +228 } +229 else +230 { +231 // otherwise it comes from the user specified +232 WriteTo(Source,Dest,'%s',s.c_str()); +233 } +234 } +.fi +.SS "void Server::SendToModeMask (std::string modes, int flags, std::string text)\fC [virtual]\fP" +.PP +Sends to all users matching a mode mask You must specify one or more usermodes as the first parameter.These can be RFC specified modes such as +i, or module provided modes, including ones provided by your own module. In the second parameter you must place a flag value which indicates wether the modes you have given will be logically ANDed or OR'ed. You may use one of either WM_AND or WM_OR. for example, if you were to use: +.PP +Serv->SendToModeMask('xi', WM_OR, 'm00'); +.PP +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 156 of file modules.cpp. +.PP +.nf +157 { +158 WriteMode(modes.c_str(),flags,'%s',text.c_str()); +159 } +.fi +.SS "void Server::SendWallops (\fBuserrec\fP * User, std::string text)\fC [virtual]\fP" +.PP +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 265 of file modules.cpp. +.PP +.nf +266 { +267 WriteWallOps(User,false,'%s',text.c_str()); +268 } +.fi + + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/Version.3 b/docs/man/Version.3 new file mode 100644 index 000000000..6683330ce --- /dev/null +++ b/docs/man/Version.3 @@ -0,0 +1,71 @@ +.TH "Version" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +Version \- Holds a module's Version information The four members (set by the constructor only) indicate details as to the version number of a module. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <modules.h>\fP +.PP +Inherits \fBclassbase\fP. +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "\fBVersion\fP (int major, int minor, int revision, int build)" +.br +.in -1c +.SS "Public Attributes" + +.in +1c +.ti -1c +.RI "const int \fBMajor\fP" +.br +.ti -1c +.RI "const int \fBMinor\fP" +.br +.ti -1c +.RI "const int \fBRevision\fP" +.br +.ti -1c +.RI "const int \fBBuild\fP" +.br +.in -1c +.SH "Detailed Description" +.PP +Holds a module's Version information The four members (set by the constructor only) indicate details as to the version number of a module. + +A class of type Version is returned by the GetVersion method of the \fBModule\fP class. +.PP +Definition at line 68 of file modules.h. +.SH "Constructor & Destructor Documentation" +.PP +.SS "Version::Version (int major, int minor, int revision, int build)" +.PP +Definition at line 105 of file modules.cpp. +.PP +.nf +105 : Major(major), Minor(minor), Revision(revision), Build(build) { }; +.fi +.SH "Member Data Documentation" +.PP +.SS "const int Version::Build" +.PP +Definition at line 71 of file modules.h. +.SS "const int Version::Major" +.PP +Definition at line 71 of file modules.h. +.SS "const int Version::Minor" +.PP +Definition at line 71 of file modules.h. +.SS "const int Version::Revision" +.PP +Definition at line 71 of file modules.h. + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/XLine.3 b/docs/man/XLine.3 new file mode 100644 index 000000000..d203c5581 --- /dev/null +++ b/docs/man/XLine.3 @@ -0,0 +1,64 @@ +.TH "XLine" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +XLine \- XLine is the base class for ban lines such as G lines and K lines. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <xline.h>\fP +.PP +Inherits \fBclassbase\fP. +.PP +Inherited by \fBGLine\fP, \fBKLine\fP, \fBQLine\fP, and \fBZLine\fP. +.PP +.SS "Public Attributes" + +.in +1c +.ti -1c +.RI "time_t \fBset_time\fP" +.br +.RI "\fIThe time the line was added.\fP" +.ti -1c +.RI "long \fBduration\fP" +.br +.RI "\fIThe duration of the ban, or 0 if permenant.\fP" +.ti -1c +.RI "char \fBsource\fP [MAXBUF]" +.br +.RI "\fISource of the ban.\fP" +.ti -1c +.RI "char \fBreason\fP [MAXBUF]" +.br +.RI "\fIReason for the ban.\fP" +.ti -1c +.RI "long \fBn_matches\fP" +.br +.RI "\fINumber of times the core matches the ban, for statistics.\fP" +.in -1c +.SH "Detailed Description" +.PP +XLine is the base class for ban lines such as G lines and K lines.Definition at line 18 of file xline.h. +.SH "Member Data Documentation" +.PP +.SS "long XLine::duration" +.PP +The duration of the ban, or 0 if permenant.Definition at line 28 of file xline.h. +.SS "long XLine::n_matches" +.PP +Number of times the core matches the ban, for statistics.Definition at line 40 of file xline.h. +.SS "char XLine::reason[MAXBUF]" +.PP +Reason for the ban.Definition at line 36 of file xline.h. +.SS "time_t XLine::set_time" +.PP +The time the line was added.Definition at line 24 of file xline.h. +.SS "char XLine::source[MAXBUF]" +.PP +Source of the ban.This can be a servername or an oper nicknameDefinition at line 32 of file xline.h. + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/ZLine.3 b/docs/man/ZLine.3 new file mode 100644 index 000000000..0eb73e5ec --- /dev/null +++ b/docs/man/ZLine.3 @@ -0,0 +1,41 @@ +.TH "ZLine" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +ZLine \- ZLine class. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <xline.h>\fP +.PP +Inherits \fBXLine\fP. +.PP +.SS "Public Attributes" + +.in +1c +.ti -1c +.RI "char \fBipaddr\fP [MAXBUF]" +.br +.RI "\fIIP Address (xx.yy.zz.aa) to match against May contain wildcards.\fP" +.ti -1c +.RI "bool \fBis_global\fP" +.br +.RI "\fISet if this is a global Z:line (e.g.\fP" +.in -1c +.SH "Detailed Description" +.PP +ZLine class.Definition at line 68 of file xline.h. +.SH "Member Data Documentation" +.PP +.SS "char ZLine::ipaddr[MAXBUF]" +.PP +IP Address (xx.yy.zz.aa) to match against May contain wildcards.Definition at line 74 of file xline.h. +.SS "bool ZLine::is_global" +.PP +Set if this is a global Z:line (e.g.it came from another server)Definition at line 78 of file xline.h. + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/base.h.3 b/docs/man/base.h.3 new file mode 100644 index 000000000..a6f61c650 --- /dev/null +++ b/docs/man/base.h.3 @@ -0,0 +1,44 @@ +.TH "base.h" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +base.h \- +.SH SYNOPSIS +.br +.PP +\fC#include 'inspircd_config.h'\fP +.br +\fC#include <time.h>\fP +.br +\fC#include <map>\fP +.br +\fC#include <string>\fP +.br + +.SS "Compounds" + +.in +1c +.ti -1c +.RI "class \fBclassbase\fP" +.br +.RI "\fIThe base class for all inspircd classes.\fP" +.ti -1c +.RI "class \fBExtensible\fP" +.br +.RI "\fIclass Extensible is the parent class of many classes such as userrec and chanrec.\fP" +.in -1c +.SS "Typedefs" + +.in +1c +.ti -1c +.RI "typedef void * \fBVoidPointer\fP" +.br +.in -1c +.SH "Typedef Documentation" +.PP +.SS "typedef void* VoidPointer" +.PP +Definition at line 13 of file base.h. +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/channels.cpp.3 b/docs/man/channels.cpp.3 new file mode 100644 index 000000000..7221ff459 --- /dev/null +++ b/docs/man/channels.cpp.3 @@ -0,0 +1,45 @@ +.TH "channels.cpp" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +channels.cpp \- +.SH SYNOPSIS +.br +.PP +\fC#include 'inspircd_config.h'\fP +.br +\fC#include 'channels.h'\fP +.br +\fC#include 'inspircd.h'\fP +.br +\fC#include <stdio.h>\fP +.br +\fC#include <string>\fP +.br +\fC#include <vector>\fP +.br + +.SS "Namespaces" + +.in +1c +.ti -1c +.RI "namespace \fBstd\fP" +.br +.in -1c +.SS "Variables" + +.in +1c +.ti -1c +.RI "std::vector< \fBModeParameter\fP > \fBcustom_mode_params\fP" +.br +.in -1c +.SH "Variable Documentation" +.PP +.SS "std::vector<\fBModeParameter\fP> custom_mode_params" +.PP +Definition at line 10 of file channels.cpp. +.PP +Referenced by chanrec::GetModeParameter(), and chanrec::SetCustomModeParam(). +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/channels.h.3 b/docs/man/channels.h.3 new file mode 100644 index 000000000..dbeb93a68 --- /dev/null +++ b/docs/man/channels.h.3 @@ -0,0 +1,117 @@ +.TH "channels.h" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +channels.h \- +.SH SYNOPSIS +.br +.PP +\fC#include 'inspircd_config.h'\fP +.br +\fC#include 'base.h'\fP +.br +\fC#include <time.h>\fP +.br +\fC#include <vector>\fP +.br +\fC#include <string>\fP +.br + +.SS "Compounds" + +.in +1c +.ti -1c +.RI "class \fBBanItem\fP" +.br +.RI "\fIA subclass of \fBHostItem\fP designed to hold channel bans (+b).\fP" +.ti -1c +.RI "class \fBchanrec\fP" +.br +.RI "\fIHolds all relevent information for a channel.\fP" +.ti -1c +.RI "class \fBExemptItem\fP" +.br +.RI "\fIA subclass of \fBHostItem\fP designed to hold channel exempts (+e).\fP" +.ti -1c +.RI "class \fBHostItem\fP" +.br +.RI "\fIHolds an entry for a ban list, exemption list, or invite list.\fP" +.ti -1c +.RI "class \fBInviteItem\fP" +.br +.RI "\fIA subclass of \fBHostItem\fP designed to hold channel invites (+I).\fP" +.ti -1c +.RI "class \fBModeParameter\fP" +.br +.RI "\fIHolds a custom parameter to a module-defined channel mode e.g.\fP" +.ti -1c +.RI "class \fBucrec\fP" +.br +.RI "\fIHolds a user's modes on a channel This class associates a users privilages with a channel by creating a pointer link between a userrec and chanrec class.\fP" +.in -1c +.SS "Defines" + +.in +1c +.ti -1c +.RI "#define \fBUCMODE_OP\fP 1" +.br +.ti -1c +.RI "#define \fBUCMODE_VOICE\fP 2" +.br +.ti -1c +.RI "#define \fBUCMODE_HOP\fP 4" +.br +.ti -1c +.RI "#define \fBUCMODE_PROTECT\fP 8" +.br +.ti -1c +.RI "#define \fBUCMODE_FOUNDER\fP 16" +.br +.in -1c +.SS "Typedefs" + +.in +1c +.ti -1c +.RI "typedef std::vector< \fBBanItem\fP > \fBBanList\fP" +.br +.RI "\fIHolds a complete ban list.\fP" +.ti -1c +.RI "typedef std::vector< \fBExemptItem\fP > \fBExemptList\fP" +.br +.RI "\fIHolds a complete exempt list.\fP" +.ti -1c +.RI "typedef std::vector< \fBInviteItem\fP > \fBInviteList\fP" +.br +.RI "\fIHolds a complete invite list.\fP" +.in -1c +.SH "Define Documentation" +.PP +.SS "#define UCMODE_FOUNDER 16" +.PP +Definition at line 184 of file channels.h. +.SS "#define UCMODE_HOP 4" +.PP +Definition at line 182 of file channels.h. +.SS "#define UCMODE_OP 1" +.PP +Definition at line 180 of file channels.h. +.SS "#define UCMODE_PROTECT 8" +.PP +Definition at line 183 of file channels.h. +.SS "#define UCMODE_VOICE 2" +.PP +Definition at line 181 of file channels.h. +.SH "Typedef Documentation" +.PP +.SS "typedef std::vector<\fBBanItem\fP> BanList" +.PP +Holds a complete ban list.Definition at line 69 of file channels.h. +.SS "typedef std::vector<\fBExemptItem\fP> ExemptList" +.PP +Holds a complete exempt list.Definition at line 73 of file channels.h. +.SS "typedef std::vector<\fBInviteItem\fP> InviteList" +.PP +Holds a complete invite list.Definition at line 77 of file channels.h. +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/chanrec.3 b/docs/man/chanrec.3 new file mode 100644 index 000000000..a1975578e --- /dev/null +++ b/docs/man/chanrec.3 @@ -0,0 +1,314 @@ +.TH "chanrec" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +chanrec \- Holds all relevent information for a channel. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <channels.h>\fP +.PP +Inherits \fBExtensible\fP. +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "void \fBSetCustomMode\fP (char mode, bool mode_on)" +.br +.RI "\fISets or unsets a custom mode in the channels info.\fP" +.ti -1c +.RI "void \fBSetCustomModeParam\fP (char mode, char *parameter, bool mode_on)" +.br +.RI "\fISets or unsets the parameters for a custom mode in a channels info.\fP" +.ti -1c +.RI "bool \fBIsCustomModeSet\fP (char mode)" +.br +.RI "\fIReturns true if a custom mode is set on a channel.\fP" +.ti -1c +.RI "std::string \fBGetModeParameter\fP (char mode)" +.br +.RI "\fIReturns the parameter for a custom mode on a channel.\fP" +.ti -1c +.RI "\fBchanrec\fP ()" +.br +.RI "\fICreates a channel record and initialises it with default values.\fP" +.ti -1c +.RI "virtual \fB~chanrec\fP ()" +.br +.in -1c +.SS "Public Attributes" + +.in +1c +.ti -1c +.RI "char \fBname\fP [CHANMAX]" +.br +.RI "\fIThe channels name.\fP" +.ti -1c +.RI "char \fBcustom_modes\fP [MAXMODES]" +.br +.RI "\fICustom modes for the channel.\fP" +.ti -1c +.RI "char \fBtopic\fP [MAXBUF]" +.br +.RI "\fIChannel topic.\fP" +.ti -1c +.RI "time_t \fBcreated\fP" +.br +.RI "\fICreation time.\fP" +.ti -1c +.RI "time_t \fBtopicset\fP" +.br +.RI "\fITime topic was set.\fP" +.ti -1c +.RI "char \fBsetby\fP [NICKMAX]" +.br +.RI "\fIThe last user to set the topic.\fP" +.ti -1c +.RI "long \fBlimit\fP" +.br +.RI "\fIContains the channel user limit.\fP" +.ti -1c +.RI "char \fBkey\fP [32]" +.br +.RI "\fIContains the channel key.\fP" +.ti -1c +.RI "short int \fBtopiclock\fP" +.br +.RI "\fINonzero if the mode +t is set.\fP" +.ti -1c +.RI "short int \fBnoexternal\fP" +.br +.RI "\fINonzero if the mode +n is set.\fP" +.ti -1c +.RI "short int \fBinviteonly\fP" +.br +.RI "\fINonzero if the mode +i is set.\fP" +.ti -1c +.RI "short int \fBmoderated\fP" +.br +.RI "\fINonzero if the mode +m is set.\fP" +.ti -1c +.RI "short int \fBsecret\fP" +.br +.RI "\fINonzero if the mode +s is set.\fP" +.ti -1c +.RI "short int \fBc_private\fP" +.br +.RI "\fINonzero if the mode +p is set.\fP" +.ti -1c +.RI "\fBBanList\fP \fBbans\fP" +.br +.RI "\fIThe list of all bans set on the channel.\fP" +.in -1c +.SH "Detailed Description" +.PP +Holds all relevent information for a channel. + +This class represents a channel, and contains its name, modes, time created, topic, topic set time, etc, and an instance of the BanList type. +.PP +Definition at line 83 of file channels.h. +.SH "Constructor & Destructor Documentation" +.PP +.SS "chanrec::chanrec ()" +.PP +Creates a channel record and initialises it with default values.Definition at line 12 of file channels.cpp. +.PP +References c_private, created, inviteonly, limit, moderated, noexternal, secret, topiclock, and topicset. +.PP +.nf +13 { +14 strcpy(name,''); +15 strcpy(custom_modes,''); +16 strcpy(topic,''); +17 strcpy(setby,''); +18 strcpy(key,''); +19 created = topicset = limit = 0; +20 topiclock = noexternal = inviteonly = moderated = secret = c_private = false; +21 } +.fi +.SS "virtual chanrec::~chanrec ()\fC [inline, virtual]\fP" +.PP +Definition at line 174 of file channels.h. +.PP +.nf +174 { /* stub */ } +.fi +.SH "Member Function Documentation" +.PP +.SS "std::string chanrec::GetModeParameter (char mode)" +.PP +Returns the parameter for a custom mode on a channel.For example if '+L #foo' is set, and you pass this method 'L', it will return '#foo'. If the mode is not set on the channel, or the mode has no parameters associated with it, it will return an empty string.Definition at line 87 of file channels.cpp. +.PP +References custom_mode_params. +.PP +.nf +88 { +89 if (custom_mode_params.size()) +90 { +91 for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++) +92 { +93 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel))) +94 { +95 return std::string(i->parameter); +96 } +97 } +98 } +99 return std::string(''); +100 } +.fi +.SS "bool chanrec::IsCustomModeSet (char mode)" +.PP +Returns true if a custom mode is set on a channel.Definition at line 81 of file channels.cpp. +.PP +.nf +82 { +83 log(DEBUG,'Checking ISCustomModeSet: %c %s',mode,this->custom_modes); +84 return (strchr(this->custom_modes,mode) != 0); +85 } +.fi +.SS "void chanrec::SetCustomMode (char mode, bool mode_on)" +.PP +Sets or unsets a custom mode in the channels info.Definition at line 23 of file channels.cpp. +.PP +References custom_modes, and SetCustomModeParam(). +.PP +.nf +24 { +25 if (mode_on) { +26 char m[3]; +27 m[0] = mode; +28 m[1] = '\0'; +29 if (!strchr(this->custom_modes,mode)) +30 { +31 strncat(custom_modes,m,MAXMODES); +32 } +33 log(DEBUG,'Custom mode %c set',mode); +34 } +35 else { +36 char temp[MAXBUF]; +37 int count = 0; +38 for (int q = 0; q < strlen(custom_modes); q++) { +39 if (custom_modes[q] != mode) { +40 temp[count++] = mode; +41 } +42 } +43 temp[count] = '\0'; +44 strncpy(custom_modes,temp,MAXMODES); +45 log(DEBUG,'Custom mode %c removed',mode); +46 this->SetCustomModeParam(mode,'',false); +47 } +48 } +.fi +.SS "void chanrec::SetCustomModeParam (char mode, char * parameter, bool mode_on)" +.PP +Sets or unsets the parameters for a custom mode in a channels info.Definition at line 50 of file channels.cpp. +.PP +References ModeParameter::channel, custom_mode_params, ModeParameter::mode, and ModeParameter::parameter. +.PP +Referenced by SetCustomMode(). +.PP +.nf +51 { +52 +53 log(DEBUG,'SetCustomModeParam called'); +54 ModeParameter M; +55 M.mode = mode; +56 strcpy(M.channel,this->name); +57 strcpy(M.parameter,parameter); +58 if (mode_on) +59 { +60 log(DEBUG,'Custom mode parameter %c %s added',mode,parameter); +61 custom_mode_params.push_back(M); +62 } +63 else +64 { +65 if (custom_mode_params.size()) +66 { +67 for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++) +68 { +69 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel))) +70 { +71 log(DEBUG,'Custom mode parameter %c %s removed',mode,parameter); +72 custom_mode_params.erase(i); +73 return; +74 } +75 } +76 } +77 log(DEBUG,'*** BUG *** Attempt to remove non-existent mode parameter!'); +78 } +79 } +.fi +.SH "Member Data Documentation" +.PP +.SS "\fBBanList\fP chanrec::bans" +.PP +The list of all bans set on the channel.Definition at line 148 of file channels.h. +.SS "short int chanrec::c_private" +.PP +Nonzero if the mode +p is set.This value cannot be set at the same time as \fBchanrec::secret\fPDefinition at line 144 of file channels.h. +.PP +Referenced by chanrec(). +.SS "time_t chanrec::created" +.PP +Creation time.Definition at line 100 of file channels.h. +.PP +Referenced by chanrec(). +.SS "char chanrec::custom_modes[MAXMODES]" +.PP +Custom modes for the channel.Plugins may use this field in any way they see fit.Definition at line 92 of file channels.h. +.PP +Referenced by SetCustomMode(). +.SS "short int chanrec::inviteonly" +.PP +Nonzero if the mode +i is set.Definition at line 130 of file channels.h. +.PP +Referenced by chanrec(). +.SS "char chanrec::key[32]" +.PP +Contains the channel key.If this value is an empty string, there is no channel key in place.Definition at line 118 of file channels.h. +.SS "long chanrec::limit" +.PP +Contains the channel user limit.If this value is zero, there is no limit in place.Definition at line 113 of file channels.h. +.PP +Referenced by chanrec(). +.SS "short int chanrec::moderated" +.PP +Nonzero if the mode +m is set.Definition at line 134 of file channels.h. +.PP +Referenced by chanrec(). +.SS "char chanrec::name[CHANMAX]" +.PP +The channels name.Definition at line 88 of file channels.h. +.SS "short int chanrec::noexternal" +.PP +Nonzero if the mode +n is set.Definition at line 126 of file channels.h. +.PP +Referenced by chanrec(). +.SS "short int chanrec::secret" +.PP +Nonzero if the mode +s is set.This value cannot be set at the same time as \fBchanrec::c_private\fPDefinition at line 139 of file channels.h. +.PP +Referenced by chanrec(). +.SS "char chanrec::setby[NICKMAX]" +.PP +The last user to set the topic.If this member is an empty string, no topic was ever set.Definition at line 108 of file channels.h. +.SS "char chanrec::topic[MAXBUF]" +.PP +Channel topic.If this is an empty string, no channel topic is set.Definition at line 97 of file channels.h. +.SS "short int chanrec::topiclock" +.PP +Nonzero if the mode +t is set.Definition at line 122 of file channels.h. +.PP +Referenced by chanrec(). +.SS "time_t chanrec::topicset" +.PP +Time topic was set.If no topic was ever set, this will be equal to \fBchanrec::created\fPDefinition at line 104 of file channels.h. +.PP +Referenced by chanrec(). + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/classbase.3 b/docs/man/classbase.3 new file mode 100644 index 000000000..5421750c5 --- /dev/null +++ b/docs/man/classbase.3 @@ -0,0 +1,61 @@ +.TH "classbase" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +classbase \- The base class for all inspircd classes. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <base.h>\fP +.PP +Inherited by \fBAdmin\fP, \fBConfigReader\fP, \fBConnectClass\fP, \fBExtensible\fP, \fBExtMode\fP, \fBFileReader\fP, \fBHostItem\fP, \fBInvited\fP, \fBModeParameter\fP, \fBModule\fP, \fBModuleFactory\fP, \fBpacket\fP, \fBServer\fP, \fBVersion\fP, and \fBXLine\fP. +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "\fBclassbase\fP ()" +.br +.RI "\fIConstructor, Sets the object's time.\fP" +.ti -1c +.RI "\fB~classbase\fP ()" +.br +.in -1c +.SS "Public Attributes" + +.in +1c +.ti -1c +.RI "time_t \fBage\fP" +.br +.RI "\fITime that the object was instantiated (used for TS calculation etc).\fP" +.in -1c +.SH "Detailed Description" +.PP +The base class for all inspircd classes.Definition at line 17 of file base.h. +.SH "Constructor & Destructor Documentation" +.PP +.SS "classbase::classbase ()\fC [inline]\fP" +.PP +Constructor, Sets the object's time.Definition at line 27 of file base.h. +.PP +.nf +27 { age = time(NULL); } +.fi +.SS "classbase::~classbase ()\fC [inline]\fP" +.PP +Definition at line 28 of file base.h. +.PP +.nf +28 { } +.fi +.SH "Member Data Documentation" +.PP +.SS "time_t classbase::age" +.PP +Time that the object was instantiated (used for TS calculation etc).Definition at line 22 of file base.h. + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/command_t.3 b/docs/man/command_t.3 new file mode 100644 index 000000000..0c2be8c9b --- /dev/null +++ b/docs/man/command_t.3 @@ -0,0 +1,69 @@ +.TH "command_t" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +command_t \- A structure that defines a command. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <ctables.h>\fP +.PP +Inherits \fBExtensible\fP. +.PP +.SS "Public Attributes" + +.in +1c +.ti -1c +.RI "char \fBcommand\fP [MAXBUF]" +.br +.RI "\fICommand name.\fP" +.ti -1c +.RI "handlerfunc * \fBhandler_function\fP" +.br +.RI "\fIHandler function as in typedef.\fP" +.ti -1c +.RI "char \fBflags_needed\fP" +.br +.RI "\fIUser flags needed to execute the command or 0.\fP" +.ti -1c +.RI "int \fBmin_params\fP" +.br +.RI "\fIMinimum number of parameters command takes.\fP" +.ti -1c +.RI "long \fBuse_count\fP" +.br +.RI "\fIused by /stats m\fP" +.ti -1c +.RI "long \fBtotal_bytes\fP" +.br +.RI "\fIused by /stats m\fP" +.in -1c +.SH "Detailed Description" +.PP +A structure that defines a command.Definition at line 25 of file ctables.h. +.SH "Member Data Documentation" +.PP +.SS "char command_t::command[MAXBUF]" +.PP +Command name.Definition at line 30 of file ctables.h. +.SS "char command_t::flags_needed" +.PP +User flags needed to execute the command or 0.Definition at line 36 of file ctables.h. +.SS "handlerfunc* command_t::handler_function" +.PP +Handler function as in typedef.Definition at line 33 of file ctables.h. +.SS "int command_t::min_params" +.PP +Minimum number of parameters command takes.Definition at line 39 of file ctables.h. +.SS "long command_t::total_bytes" +.PP +used by /stats mDefinition at line 45 of file ctables.h. +.SS "long command_t::use_count" +.PP +used by /stats mDefinition at line 42 of file ctables.h. + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/commands.h.3 b/docs/man/commands.h.3 new file mode 100644 index 000000000..e9fcbfa9d --- /dev/null +++ b/docs/man/commands.h.3 @@ -0,0 +1,397 @@ +.TH "commands.h" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +commands.h \- +.SH SYNOPSIS +.br +.PP +\fC#include <typeinfo>\fP +.br +\fC#include <iostream>\fP +.br +\fC#include <string>\fP +.br +\fC#include <deque>\fP +.br +\fC#include <sstream>\fP +.br +\fC#include <vector>\fP +.br +\fC#include 'users.h'\fP +.br +\fC#include 'channels.h'\fP +.br + +.SS "Functions" + +.in +1c +.ti -1c +.RI "void \fBhandle_join\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.RI "\fIThese are the handlers for user commands.\fP" +.ti -1c +.RI "void \fBhandle_part\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_kick\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_die\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_restart\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_kill\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_summon\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_users\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_pass\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_invite\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_topic\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_names\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_privmsg\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_notice\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_info\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_time\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_whois\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_quit\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_who\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_wallops\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_list\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_rehash\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_lusers\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_admin\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_ping\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_pong\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_motd\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_rules\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_user\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_userhost\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_ison\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_away\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_whowas\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_trace\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_modules\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_stats\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_connect\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_squit\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_links\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_map\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_oper\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_nick\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_kline\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_gline\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_zline\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_qline\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_link_packet\fP (char *udp_msg, char *tcp_host, \fBserverrec\fP *serv)" +.br +.RI "\fISpecial functions for processing server to server traffic.\fP" +.ti -1c +.RI "void \fBprocess_restricted_commands\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host, char *ipaddr, int port)" +.br +.ti -1c +.RI "void \fBhandle_amp\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.br +.RI "\fIThese are the handlers for server commands (tokens).\fP" +.ti -1c +.RI "void \fBhandle_dollar\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.br +.ti -1c +.RI "void \fBhandle_J\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.br +.ti -1c +.RI "void \fBhandle_R\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.br +.ti -1c +.RI "void \fBhandle_plus\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.br +.ti -1c +.RI "void \fBhandle_b\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.br +.ti -1c +.RI "void \fBhandle_a\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.br +.ti -1c +.RI "void \fBhandle_F\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.br +.ti -1c +.RI "void \fBhandle_N\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.br +.ti -1c +.RI "void \fBhandle_AT\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.br +.ti -1c +.RI "void \fBhandle_k\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.br +.ti -1c +.RI "void \fBhandle_n\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.br +.ti -1c +.RI "void \fBhandle_Q\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.br +.ti -1c +.RI "void \fBhandle_K\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.br +.ti -1c +.RI "void \fBhandle_L\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.br +.ti -1c +.RI "void \fBhandle_m\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.br +.ti -1c +.RI "void \fBhandle_M\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.br +.ti -1c +.RI "void \fBhandle_T\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.br +.ti -1c +.RI "void \fBhandle_t\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.br +.ti -1c +.RI "void \fBhandle_i\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.br +.ti -1c +.RI "void \fBhandle_P\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.br +.ti -1c +.RI "void \fBhandle_V\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.br +.ti -1c +.RI "bool \fBis_uline\fP (const char *server)" +.br +.RI "\fIFunctions for u:lined servers.\fP" +.in -1c +.SH "Function Documentation" +.PP +.SS "void handle_a (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.PP +.SS "void handle_admin (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_amp (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.PP +These are the handlers for server commands (tokens). +.SS "void handle_AT (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.PP +.SS "void handle_away (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_b (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.PP +.SS "void handle_connect (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_die (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_dollar (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.PP +.SS "void handle_F (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.PP +.SS "void handle_gline (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_i (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.PP +.SS "void handle_info (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_invite (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_ison (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_J (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.PP +.SS "void handle_join (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +These are the handlers for user commands. +.SS "void handle_K (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.PP +.SS "void handle_k (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.PP +.SS "void handle_kick (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_kill (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_kline (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_L (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.PP +.SS "void handle_link_packet (char * udp_msg, char * tcp_host, \fBserverrec\fP * serv)" +.PP +Special functions for processing server to server traffic. +.SS "void handle_links (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_list (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_lusers (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_M (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.PP +.SS "void handle_m (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.PP +.SS "void handle_map (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_modules (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_motd (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_n (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.PP +.SS "void handle_N (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.PP +.SS "void handle_names (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_nick (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_notice (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_oper (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_P (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.PP +.SS "void handle_part (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_pass (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_ping (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_plus (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.PP +.SS "void handle_pong (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_privmsg (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_Q (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.PP +.SS "void handle_qline (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_quit (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_R (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.PP +.SS "void handle_rehash (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_restart (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_rules (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_squit (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_stats (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_summon (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_t (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.PP +.SS "void handle_T (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.PP +.SS "void handle_time (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_topic (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_trace (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_user (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_userhost (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_users (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_V (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.PP +.SS "void handle_wallops (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_who (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_whois (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_whowas (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void handle_zline (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "bool is_uline (const char * server)" +.PP +Functions for u:lined servers.Referenced by Server::IsUlined(). +.SS "void process_restricted_commands (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host, char * ipaddr, int port)" +.PP +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/connection.3 b/docs/man/connection.3 new file mode 100644 index 000000000..2355c782f --- /dev/null +++ b/docs/man/connection.3 @@ -0,0 +1,264 @@ +.TH "connection" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +connection \- Please note: classes serverrec and userrec both inherit from class connection. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <connection.h>\fP +.PP +Inherits \fBExtensible\fP. +.PP +Inherited by \fBserverrec\fP, and \fBuserrec\fP. +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "\fBconnection\fP ()" +.br +.RI "\fIDefault constructor.\fP" +.ti -1c +.RI "bool \fBCreateListener\fP (char *\fBhost\fP, int p)" +.br +.RI "\fICreate a listening socket on 'host' using port number 'p'.\fP" +.ti -1c +.RI "bool \fBBeginLink\fP (char *targethost, int \fBport\fP, char *password, char *servername, int myport)" +.br +.RI "\fIBegin an outbound link to another ircd at targethost.\fP" +.ti -1c +.RI "bool \fBMeshCookie\fP (char *targethost, int \fBport\fP, long cookie, char *servername)" +.br +.RI "\fIBegin an outbound mesh link to another ircd on a network you are already an authenticated member of.\fP" +.ti -1c +.RI "void \fBTerminateLink\fP (char *targethost)" +.br +.RI "\fITerminate a link to 'targethost' by calling the \fBircd_connector::CloseConnection\fP method.\fP" +.ti -1c +.RI "bool \fBSendPacket\fP (char *message, const char *\fBhost\fP)" +.br +.RI "\fISend a message to a server by name, if the server is unavailable directly route the packet via another server If the server still cannot be reached after attempting to route the message remotely, returns false.\fP" +.ti -1c +.RI "bool \fBRecvPacket\fP (std::deque< std::string > &messages, char *\fBhost\fP)" +.br +.RI "\fIReturns the next available packet and returns true if data is available.\fP" +.ti -1c +.RI "\fBircd_connector\fP * \fBFindHost\fP (std::string \fBhost\fP)" +.br +.RI "\fIFind the \fBircd_connector\fP oject related to a certain servername given in 'host'.\fP" +.ti -1c +.RI "bool \fBAddIncoming\fP (int \fBfd\fP, char *targethost, int sourceport)" +.br +.RI "\fIAdd an incoming connection to the connection pool.\fP" +.ti -1c +.RI "long \fBGenKey\fP ()" +.br +.RI "\fIThis function is deprecated and may be removed in a later alpha/beta.\fP" +.in -1c +.SS "Public Attributes" + +.in +1c +.ti -1c +.RI "int \fBfd\fP" +.br +.RI "\fIFile descriptor of the connection.\fP" +.ti -1c +.RI "char \fBhost\fP [256]" +.br +.RI "\fIHostname of connection.\fP" +.ti -1c +.RI "char \fBip\fP [32]" +.br +.RI "\fIIP of connection.\fP" +.ti -1c +.RI "char \fBinbuf\fP [MAXBUF]" +.br +.RI "\fIInbuf of connection.\fP" +.ti -1c +.RI "long \fBbytes_in\fP" +.br +.RI "\fIStats counter for bytes inbound.\fP" +.ti -1c +.RI "long \fBbytes_out\fP" +.br +.RI "\fIStats counter for bytes outbound.\fP" +.ti -1c +.RI "long \fBcmds_in\fP" +.br +.RI "\fIStats counter for commands inbound.\fP" +.ti -1c +.RI "long \fBcmds_out\fP" +.br +.RI "\fIStats counter for commands outbound.\fP" +.ti -1c +.RI "bool \fBhaspassed\fP" +.br +.RI "\fITrue if server/user has authenticated, false if otherwise.\fP" +.ti -1c +.RI "int \fBport\fP" +.br +.RI "\fIPort number For a userrec, this is the port they connected to the network on.\fP" +.ti -1c +.RI "int \fBregistered\fP" +.br +.RI "\fIUsed by userrec to indicate the registration status of the connection.\fP" +.ti -1c +.RI "short int \fBstate\fP" +.br +.RI "\fIReserved for future use.\fP" +.ti -1c +.RI "time_t \fBlastping\fP" +.br +.RI "\fITime the connection was last pinged.\fP" +.ti -1c +.RI "time_t \fBsignon\fP" +.br +.RI "\fITime the connection was created, set in the constructor.\fP" +.ti -1c +.RI "time_t \fBidle_lastmsg\fP" +.br +.RI "\fITime that the connection last sent data, used to calculate idle time.\fP" +.ti -1c +.RI "time_t \fBnping\fP" +.br +.RI "\fIUsed by PING checks with clients.\fP" +.ti -1c +.RI "char \fBinternal_addr\fP [MAXBUF]" +.br +.RI "\fIUnused, will be removed in a future alpha/beta.\fP" +.ti -1c +.RI "int \fBinternal_port\fP" +.br +.RI "\fIUnused, will be removed in a future alpha/beta.\fP" +.ti -1c +.RI "std::vector< \fBircd_connector\fP > \fBconnectors\fP" +.br +.RI "\fIWith a serverrec, this is a list of all established server connections.\fP" +.in -1c +.SH "Detailed Description" +.PP +Please note: classes serverrec and userrec both inherit from class connection.Definition at line 161 of file connection.h. +.SH "Constructor & Destructor Documentation" +.PP +.SS "connection::connection ()" +.PP +Default constructor. +.SH "Member Function Documentation" +.PP +.SS "bool connection::AddIncoming (int fd, char * targethost, int sourceport)" +.PP +Add an incoming connection to the connection pool.(reserved for core use) +.SS "bool connection::BeginLink (char * targethost, int port, char * password, char * servername, int myport)" +.PP +Begin an outbound link to another ircd at targethost. +.SS "bool connection::CreateListener (char * host, int p)" +.PP +Create a listening socket on 'host' using port number 'p'. +.SS "\fBircd_connector\fP* connection::FindHost (std::string host)" +.PP +Find the \fBircd_connector\fP oject related to a certain servername given in 'host'. +.SS "long connection::GenKey ()" +.PP +This function is deprecated and may be removed in a later alpha/beta. +.SS "bool connection::MeshCookie (char * targethost, int port, long cookie, char * servername)" +.PP +Begin an outbound mesh link to another ircd on a network you are already an authenticated member of. +.SS "bool connection::RecvPacket (std::deque< std::string > & messages, char * host)" +.PP +Returns the next available packet and returns true if data is available.Writes the servername the data came from to 'host'. If no data is available this function returns false. This function will automatically close broken links and reroute pathways, generating split messages on the network. +.SS "bool connection::SendPacket (char * message, const char * host)" +.PP +Send a message to a server by name, if the server is unavailable directly route the packet via another server If the server still cannot be reached after attempting to route the message remotely, returns false. +.SS "void connection::TerminateLink (char * targethost)" +.PP +Terminate a link to 'targethost' by calling the \fBircd_connector::CloseConnection\fP method. +.SH "Member Data Documentation" +.PP +.SS "long connection::bytes_in" +.PP +Stats counter for bytes inbound.Definition at line 182 of file connection.h. +.PP +Referenced by userrec::userrec(). +.SS "long connection::bytes_out" +.PP +Stats counter for bytes outbound.Definition at line 186 of file connection.h. +.PP +Referenced by userrec::userrec(). +.SS "long connection::cmds_in" +.PP +Stats counter for commands inbound.Definition at line 190 of file connection.h. +.PP +Referenced by userrec::userrec(). +.SS "long connection::cmds_out" +.PP +Stats counter for commands outbound.Definition at line 194 of file connection.h. +.PP +Referenced by userrec::userrec(). +.SS "std::vector<\fBircd_connector\fP> connection::connectors" +.PP +With a serverrec, this is a list of all established server connections.With a userrec this is unused.Definition at line 241 of file connection.h. +.SS "int connection::fd" +.PP +File descriptor of the connection.Definition at line 166 of file connection.h. +.PP +Referenced by Server::SendTo(), serverrec::serverrec(), and userrec::userrec(). +.SS "bool connection::haspassed" +.PP +True if server/user has authenticated, false if otherwise.Definition at line 198 of file connection.h. +.PP +Referenced by userrec::userrec(). +.SS "char connection::host[256]" +.PP +Hostname of connection.Not used if this is a serverrecDefinition at line 170 of file connection.h. +.SS "time_t connection::idle_lastmsg" +.PP +Time that the connection last sent data, used to calculate idle time.Definition at line 224 of file connection.h. +.PP +Referenced by userrec::userrec(). +.SS "char connection::inbuf[MAXBUF]" +.PP +Inbuf of connection.Only used for userrecDefinition at line 178 of file connection.h. +.SS "char connection::internal_addr[MAXBUF]" +.PP +Unused, will be removed in a future alpha/beta.Definition at line 232 of file connection.h. +.SS "int connection::internal_port" +.PP +Unused, will be removed in a future alpha/beta.Definition at line 236 of file connection.h. +.SS "char connection::ip[32]" +.PP +IP of connection.Reserved for future use.Definition at line 174 of file connection.h. +.SS "time_t connection::lastping" +.PP +Time the connection was last pinged.Definition at line 216 of file connection.h. +.PP +Referenced by serverrec::serverrec(), and userrec::userrec(). +.SS "time_t connection::nping" +.PP +Used by PING checks with clients.Definition at line 228 of file connection.h. +.PP +Referenced by userrec::userrec(). +.SS "int connection::port" +.PP +Port number For a userrec, this is the port they connected to the network on.For a serverrec this is the current listening port of the serverrec object.Definition at line 204 of file connection.h. +.PP +Referenced by userrec::userrec(). +.SS "int connection::registered" +.PP +Used by userrec to indicate the registration status of the connection.Definition at line 208 of file connection.h. +.PP +Referenced by userrec::userrec(). +.SS "time_t connection::signon" +.PP +Time the connection was created, set in the constructor.Definition at line 220 of file connection.h. +.PP +Referenced by serverrec::serverrec(), and userrec::userrec(). +.SS "short int connection::state" +.PP +Reserved for future use.Definition at line 212 of file connection.h. + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/connection.h.3 b/docs/man/connection.h.3 new file mode 100644 index 000000000..628f2a280 --- /dev/null +++ b/docs/man/connection.h.3 @@ -0,0 +1,96 @@ +.TH "connection.h" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +connection.h \- +.SH SYNOPSIS +.br +.PP +\fC#include 'inspircd_config.h'\fP +.br +\fC#include 'base.h'\fP +.br +\fC#include <string>\fP +.br +\fC#include <map>\fP +.br +\fC#include <sys/socket.h>\fP +.br +\fC#include <sys/types.h>\fP +.br +\fC#include <netdb.h>\fP +.br +\fC#include <netinet/in.h>\fP +.br +\fC#include <unistd.h>\fP +.br +\fC#include <errno.h>\fP +.br +\fC#include <time.h>\fP +.br +\fC#include <vector>\fP +.br +\fC#include <deque>\fP +.br + +.SS "Compounds" + +.in +1c +.ti -1c +.RI "class \fBconnection\fP" +.br +.RI "\fIPlease note: classes serverrec and userrec both inherit from class connection.\fP" +.ti -1c +.RI "class \fBircd_connector\fP" +.br +.RI "\fIEach connection has one or more of these each represents ONE outbound connection to another ircd so each inbound has multiple outbounds.\fP" +.ti -1c +.RI "class \fBpacket\fP" +.br +.RI "\fIClass packet is deprecated.\fP" +.in -1c +.SS "Defines" + +.in +1c +.ti -1c +.RI "#define \fBSTATE_DISCONNECTED\fP 0" +.br +.ti -1c +.RI "#define \fBSTATE_CONNECTED\fP 1" +.br +.ti -1c +.RI "#define \fBSTATE_SYNC\fP 2" +.br +.ti -1c +.RI "#define \fBSTATE_NOAUTH_INBOUND\fP 3" +.br +.ti -1c +.RI "#define \fBSTATE_NOAUTH_OUTBOUND\fP 4" +.br +.ti -1c +.RI "#define \fBSTATE_SERVICES\fP 5" +.br +.in -1c +.SH "Define Documentation" +.PP +.SS "#define STATE_CONNECTED 1" +.PP +Definition at line 23 of file connection.h. +.SS "#define STATE_DISCONNECTED 0" +.PP +Definition at line 22 of file connection.h. +.SS "#define STATE_NOAUTH_INBOUND 3" +.PP +Definition at line 25 of file connection.h. +.SS "#define STATE_NOAUTH_OUTBOUND 4" +.PP +Definition at line 26 of file connection.h. +.SS "#define STATE_SERVICES 5" +.PP +Definition at line 27 of file connection.h. +.SS "#define STATE_SYNC 2" +.PP +Definition at line 24 of file connection.h. +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/ctables.h.3 b/docs/man/ctables.h.3 new file mode 100644 index 000000000..ae6a3269d --- /dev/null +++ b/docs/man/ctables.h.3 @@ -0,0 +1,26 @@ +.TH "ctables.h" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +ctables.h \- +.SH SYNOPSIS +.br +.PP +\fC#include 'inspircd_config.h'\fP +.br +\fC#include 'inspircd.h'\fP +.br +\fC#include 'base.h'\fP +.br + +.SS "Compounds" + +.in +1c +.ti -1c +.RI "class \fBcommand_t\fP" +.br +.RI "\fIA structure that defines a command.\fP" +.in -1c +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/ircd_connector.3 b/docs/man/ircd_connector.3 new file mode 100644 index 000000000..59da7d7dc --- /dev/null +++ b/docs/man/ircd_connector.3 @@ -0,0 +1,206 @@ +.TH "ircd_connector" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +ircd_connector \- Each connection has one or more of these each represents ONE outbound connection to another ircd so each inbound has multiple outbounds. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <connection.h>\fP +.PP +Inherits \fBExtensible\fP. +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "bool \fBMakeOutboundConnection\fP (char *\fBhost\fP, int \fBport\fP)" +.br +.RI "\fICreate an outbound connection to a listening socket.\fP" +.ti -1c +.RI "std::string \fBGetServerName\fP ()" +.br +.RI "\fIReturn the servername on this established connection.\fP" +.ti -1c +.RI "void \fBSetServerName\fP (std::string serv)" +.br +.RI "\fISet the server name of this connection.\fP" +.ti -1c +.RI "int \fBGetDescriptor\fP ()" +.br +.RI "\fIGet the file descriptor associated with this connection.\fP" +.ti -1c +.RI "void \fBSetDescriptor\fP (int \fBfd\fP)" +.br +.RI "\fISet the file descriptor for this connection.\fP" +.ti -1c +.RI "int \fBGetState\fP ()" +.br +.RI "\fIGet the state flags for this connection.\fP" +.ti -1c +.RI "void \fBSetState\fP (int \fBstate\fP)" +.br +.RI "\fISet the state flags for this connection.\fP" +.ti -1c +.RI "char * \fBGetServerIP\fP ()" +.br +.RI "\fIGet the ip address (not servername) associated with this connection.\fP" +.ti -1c +.RI "std::string \fBGetDescription\fP ()" +.br +.RI "\fIGet the server description of this connection.\fP" +.ti -1c +.RI "void \fBSetDescription\fP (std::string desc)" +.br +.RI "\fISet the server description of this connection.\fP" +.ti -1c +.RI "int \fBGetServerPort\fP ()" +.br +.RI "\fIGet the port number being used for this connection If the connection is outbound this will be the remote port otherwise it will be the local port, so it can always be gautanteed as open at the address given in \fBGetServerIP()\fP.\fP" +.ti -1c +.RI "void \fBSetServerPort\fP (int p)" +.br +.RI "\fISet the port used by this connection.\fP" +.ti -1c +.RI "bool \fBSetHostAndPort\fP (char *\fBhost\fP, int \fBport\fP)" +.br +.RI "\fISet both the host and the port in one operation for this connection.\fP" +.ti -1c +.RI "void \fBCloseConnection\fP ()" +.br +.RI "\fIClose the connection by calling close() on its file descriptor This function call updates no other data.\fP" +.in -1c +.SS "Public Attributes" + +.in +1c +.ti -1c +.RI "char \fBhost\fP [MAXBUF]" +.br +.RI "\fIWhen MakeOutboundConnection is called, these public members are filled with the details passed to the function, for future reference.\fP" +.ti -1c +.RI "int \fBport\fP" +.br +.RI "\fIWhen MakeOutboundConnection is called, these public members are filled with the details passed to the function, for future reference.\fP" +.ti -1c +.RI "std::vector< std::string > \fBroutes\fP" +.br +.RI "\fI\fBServer\fP names of servers that this server is linked to So for A->B->C, if this was the record for B it would contain A and C whilever both servers are connected to B.\fP" +.in -1c +.SS "Private Member Functions" + +.in +1c +.ti -1c +.RI "bool \fBSetHostAddress\fP (char *\fBhost\fP, int \fBport\fP)" +.br +.RI "\fIPRIVATE function to set the host address and port to connect to.\fP" +.in -1c +.SS "Private Attributes" + +.in +1c +.ti -1c +.RI "sockaddr_in \fBaddr\fP" +.br +.RI "\fISockaddr of the outbound ip and port.\fP" +.ti -1c +.RI "int \fBfd\fP" +.br +.RI "\fIFile descriptor of the connection.\fP" +.ti -1c +.RI "std::string \fBservername\fP" +.br +.RI "\fI\fBServer\fP name.\fP" +.ti -1c +.RI "std::string \fBdescription\fP" +.br +.RI "\fI\fBServer\fP 'GECOS'.\fP" +.ti -1c +.RI "int \fBstate\fP" +.br +.RI "\fIState.\fP" +.in -1c +.SH "Detailed Description" +.PP +Each connection has one or more of these each represents ONE outbound connection to another ircd so each inbound has multiple outbounds. + +A listening socket that accepts server type connections is represented by one class serverrec. Class serverrec will instantiate several objects of type ircd_connector to represent each established connection, inbound or outbound. So, to determine all linked servers you must walk through all the serverrecs that the core defines, and in each one iterate through until you find connection(s) relating to the server you want information on. The core and module API provide functions for this. +.PP +Definition at line 41 of file connection.h. +.SH "Member Function Documentation" +.PP +.SS "void ircd_connector::CloseConnection ()" +.PP +Close the connection by calling close() on its file descriptor This function call updates no other data. +.SS "std::string ircd_connector::GetDescription ()" +.PP +Get the server description of this connection. +.SS "int ircd_connector::GetDescriptor ()" +.PP +Get the file descriptor associated with this connection. +.SS "char* ircd_connector::GetServerIP ()" +.PP +Get the ip address (not servername) associated with this connection. +.SS "std::string ircd_connector::GetServerName ()" +.PP +Return the servername on this established connection. +.SS "int ircd_connector::GetServerPort ()" +.PP +Get the port number being used for this connection If the connection is outbound this will be the remote port otherwise it will be the local port, so it can always be gautanteed as open at the address given in \fBGetServerIP()\fP. +.SS "int ircd_connector::GetState ()" +.PP +Get the state flags for this connection. +.SS "bool ircd_connector::MakeOutboundConnection (char * host, int port)" +.PP +Create an outbound connection to a listening socket. +.SS "void ircd_connector::SetDescription (std::string desc)" +.PP +Set the server description of this connection. +.SS "void ircd_connector::SetDescriptor (int fd)" +.PP +Set the file descriptor for this connection. +.SS "bool ircd_connector::SetHostAddress (char * host, int port)\fC [private]\fP" +.PP +PRIVATE function to set the host address and port to connect to. +.SS "bool ircd_connector::SetHostAndPort (char * host, int port)" +.PP +Set both the host and the port in one operation for this connection. +.SS "void ircd_connector::SetServerName (std::string serv)" +.PP +Set the server name of this connection. +.SS "void ircd_connector::SetServerPort (int p)" +.PP +Set the port used by this connection. +.SS "void ircd_connector::SetState (int state)" +.PP +Set the state flags for this connection. +.SH "Member Data Documentation" +.PP +.SS "sockaddr_in ircd_connector::addr\fC [private]\fP" +.PP +Sockaddr of the outbound ip and port.Definition at line 46 of file connection.h. +.SS "std::string ircd_connector::description\fC [private]\fP" +.PP +\fBServer\fP 'GECOS'.Definition at line 58 of file connection.h. +.SS "int ircd_connector::fd\fC [private]\fP" +.PP +File descriptor of the connection.Definition at line 50 of file connection.h. +.SS "char ircd_connector::host[MAXBUF]" +.PP +When MakeOutboundConnection is called, these public members are filled with the details passed to the function, for future reference.Definition at line 75 of file connection.h. +.SS "int ircd_connector::port" +.PP +When MakeOutboundConnection is called, these public members are filled with the details passed to the function, for future reference.Definition at line 81 of file connection.h. +.SS "std::vector<std::string> ircd_connector::routes" +.PP +\fBServer\fP names of servers that this server is linked to So for A->B->C, if this was the record for B it would contain A and C whilever both servers are connected to B.Definition at line 87 of file connection.h. +.SS "std::string ircd_connector::servername\fC [private]\fP" +.PP +\fBServer\fP name.Definition at line 54 of file connection.h. +.SS "int ircd_connector::state\fC [private]\fP" +.PP +State.STATE_NOAUTH_INBOUND, STATE_NOAUTH_OUTBOUND STATE_SYNC, STATE_DISCONNECTED, STATE_CONNECTEDDefinition at line 63 of file connection.h. + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/message.h.3 b/docs/man/message.h.3 new file mode 100644 index 000000000..2ad72a7ab --- /dev/null +++ b/docs/man/message.h.3 @@ -0,0 +1,140 @@ +.TH "message.h" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +message.h \- +.SH SYNOPSIS +.br +.PP +\fC#include <typeinfo>\fP +.br +\fC#include <iostream>\fP +.br +\fC#include <string>\fP +.br +\fC#include <deque>\fP +.br +\fC#include <sstream>\fP +.br +\fC#include <vector>\fP +.br +\fC#include 'users.h'\fP +.br +\fC#include 'channels.h'\fP +.br + +.SS "Functions" + +.in +1c +.ti -1c +.RI "int \fBcommon_channels\fP (\fBuserrec\fP *u, \fBuserrec\fP *u2)" +.br +.ti -1c +.RI "void \fBchop\fP (char *str)" +.br +.ti -1c +.RI "void \fBtidystring\fP (char *str)" +.br +.ti -1c +.RI "void \fBsafedelete\fP (\fBchanrec\fP *p)" +.br +.ti -1c +.RI "void \fBsafedelete\fP (\fBuserrec\fP *p)" +.br +.ti -1c +.RI "void \fBBlocking\fP (int s)" +.br +.ti -1c +.RI "void \fBNonBlocking\fP (int s)" +.br +.ti -1c +.RI "int \fBCleanAndResolve\fP (char *resolvedHost, const char *unresolvedHost)" +.br +.ti -1c +.RI "int \fBc_count\fP (\fBuserrec\fP *u)" +.br +.ti -1c +.RI "bool \fBhasumode\fP (\fBuserrec\fP *user, char mode)" +.br +.ti -1c +.RI "void \fBChangeName\fP (\fBuserrec\fP *user, const char *gecos)" +.br +.ti -1c +.RI "void \fBChangeDisplayedHost\fP (\fBuserrec\fP *user, const char *host)" +.br +.ti -1c +.RI "int \fBisident\fP (const char *n)" +.br +.ti -1c +.RI "int \fBisnick\fP (const char *n)" +.br +.ti -1c +.RI "char * \fBcmode\fP (\fBuserrec\fP *user, \fBchanrec\fP *chan)" +.br +.ti -1c +.RI "int \fBcstatus\fP (\fBuserrec\fP *user, \fBchanrec\fP *chan)" +.br +.ti -1c +.RI "int \fBhas_channel\fP (\fBuserrec\fP *u, \fBchanrec\fP *c)" +.br +.ti -1c +.RI "void \fBTidyBan\fP (char *ban)" +.br +.ti -1c +.RI "char * \fBchlist\fP (\fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBsend_network_quit\fP (const char *nick, const char *reason)" +.br +.in -1c +.SH "Function Documentation" +.PP +.SS "void Blocking (int s)" +.PP +.SS "int c_count (\fBuserrec\fP * u)" +.PP +.SS "void ChangeDisplayedHost (\fBuserrec\fP * user, const char * host)" +.PP +Referenced by Server::ChangeHost(). +.SS "void ChangeName (\fBuserrec\fP * user, const char * gecos)" +.PP +Referenced by Server::ChangeGECOS(). +.SS "char* chlist (\fBuserrec\fP * user)" +.PP +.SS "void chop (char * str)" +.PP +.SS "int CleanAndResolve (char * resolvedHost, const char * unresolvedHost)" +.PP +.SS "char* cmode (\fBuserrec\fP * user, \fBchanrec\fP * chan)" +.PP +Referenced by Server::ChanMode(). +.SS "int common_channels (\fBuserrec\fP * u, \fBuserrec\fP * u2)" +.PP +Referenced by Server::CommonChannels(). +.SS "int cstatus (\fBuserrec\fP * user, \fBchanrec\fP * chan)" +.PP +.SS "int has_channel (\fBuserrec\fP * u, \fBchanrec\fP * c)" +.PP +.SS "bool hasumode (\fBuserrec\fP * user, char mode)" +.PP +.SS "int isident (const char * n)" +.PP +.SS "int isnick (const char * n)" +.PP +Referenced by Server::IsNick(). +.SS "void NonBlocking (int s)" +.PP +.SS "void safedelete (\fBuserrec\fP * p)" +.PP +.SS "void safedelete (\fBchanrec\fP * p)" +.PP +.SS "void send_network_quit (const char * nick, const char * reason)" +.PP +Referenced by Server::QuitUser(). +.SS "void TidyBan (char * ban)" +.PP +.SS "void tidystring (char * str)" +.PP +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/mode.h.3 b/docs/man/mode.h.3 new file mode 100644 index 000000000..831d26ea6 --- /dev/null +++ b/docs/man/mode.h.3 @@ -0,0 +1,109 @@ +.TH "mode.h" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +mode.h \- +.SH SYNOPSIS +.br +.PP +\fC#include <typeinfo>\fP +.br +\fC#include <iostream>\fP +.br +\fC#include <string>\fP +.br +\fC#include <deque>\fP +.br +\fC#include <sstream>\fP +.br +\fC#include <vector>\fP +.br +\fC#include 'users.h'\fP +.br +\fC#include 'channels.h'\fP +.br + +.SS "Functions" + +.in +1c +.ti -1c +.RI "char * \fBgive_ops\fP (\fBuserrec\fP *user, char *dest, \fBchanrec\fP *chan, int status)" +.br +.ti -1c +.RI "char * \fBgive_hops\fP (\fBuserrec\fP *user, char *dest, \fBchanrec\fP *chan, int status)" +.br +.ti -1c +.RI "char * \fBgive_voice\fP (\fBuserrec\fP *user, char *dest, \fBchanrec\fP *chan, int status)" +.br +.ti -1c +.RI "char * \fBtake_ops\fP (\fBuserrec\fP *user, char *dest, \fBchanrec\fP *chan, int status)" +.br +.ti -1c +.RI "char * \fBtake_hops\fP (\fBuserrec\fP *user, char *dest, \fBchanrec\fP *chan, int status)" +.br +.ti -1c +.RI "char * \fBtake_voice\fP (\fBuserrec\fP *user, char *dest, \fBchanrec\fP *chan, int status)" +.br +.ti -1c +.RI "char * \fBadd_ban\fP (\fBuserrec\fP *user, char *dest, \fBchanrec\fP *chan, int status)" +.br +.ti -1c +.RI "char * \fBtake_ban\fP (\fBuserrec\fP *user, char *dest, \fBchanrec\fP *chan, int status)" +.br +.ti -1c +.RI "void \fBprocess_modes\fP (char **parameters, \fBuserrec\fP *user, \fBchanrec\fP *chan, int status, int pcnt, bool servermode, bool silent, bool local)" +.br +.ti -1c +.RI "bool \fBallowed_umode\fP (char umode, char *sourcemodes, bool adding)" +.br +.ti -1c +.RI "bool \fBprocess_module_umode\fP (char umode, \fBuserrec\fP *source, void *dest, bool adding)" +.br +.ti -1c +.RI "void \fBhandle_mode\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBserver_mode\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBmerge_mode\fP (char **parameters, int pcnt)" +.br +.ti -1c +.RI "void \fBmerge_mode2\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.in -1c +.SH "Function Documentation" +.PP +.SS "char* add_ban (\fBuserrec\fP * user, char * dest, \fBchanrec\fP * chan, int status)" +.PP +.SS "bool allowed_umode (char umode, char * sourcemodes, bool adding)" +.PP +.SS "char* give_hops (\fBuserrec\fP * user, char * dest, \fBchanrec\fP * chan, int status)" +.PP +.SS "char* give_ops (\fBuserrec\fP * user, char * dest, \fBchanrec\fP * chan, int status)" +.PP +.SS "char* give_voice (\fBuserrec\fP * user, char * dest, \fBchanrec\fP * chan, int status)" +.PP +.SS "void handle_mode (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void merge_mode (char ** parameters, int pcnt)" +.PP +.SS "void merge_mode2 (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "void process_modes (char ** parameters, \fBuserrec\fP * user, \fBchanrec\fP * chan, int status, int pcnt, bool servermode, bool silent, bool local)" +.PP +.SS "bool process_module_umode (char umode, \fBuserrec\fP * source, void * dest, bool adding)" +.PP +.SS "void server_mode (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +.SS "char* take_ban (\fBuserrec\fP * user, char * dest, \fBchanrec\fP * chan, int status)" +.PP +.SS "char* take_hops (\fBuserrec\fP * user, char * dest, \fBchanrec\fP * chan, int status)" +.PP +.SS "char* take_ops (\fBuserrec\fP * user, char * dest, \fBchanrec\fP * chan, int status)" +.PP +.SS "char* take_voice (\fBuserrec\fP * user, char * dest, \fBchanrec\fP * chan, int status)" +.PP +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/modules.cpp.3 b/docs/man/modules.cpp.3 new file mode 100644 index 000000000..c15b3e75c --- /dev/null +++ b/docs/man/modules.cpp.3 @@ -0,0 +1,205 @@ +.TH "modules.cpp" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +modules.cpp \- +.SH SYNOPSIS +.br +.PP +\fC#include <typeinfo>\fP +.br +\fC#include <iostream>\fP +.br +\fC#include 'globals.h'\fP +.br +\fC#include 'modules.h'\fP +.br +\fC#include 'ctables.h'\fP +.br +\fC#include 'inspircd_io.h'\fP +.br +\fC#include 'wildcard.h'\fP +.br +\fC#include 'mode.h'\fP +.br +\fC#include 'message.h'\fP +.br +\fC#include 'commands.h'\fP +.br + +.SS "Compounds" + +.in +1c +.ti -1c +.RI "class \fBExtMode\fP" +.br +.in -1c +.SS "Typedefs" + +.in +1c +.ti -1c +.RI "typedef std::vector< \fBExtMode\fP > \fBExtModeList\fP" +.br +.ti -1c +.RI "typedef ExtModeList::iterator \fBExtModeListIter\fP" +.br +.in -1c +.SS "Functions" + +.in +1c +.ti -1c +.RI "bool \fBModeDefined\fP (char modechar, int type)" +.br +.ti -1c +.RI "bool \fBModeDefinedOper\fP (char modechar, int type)" +.br +.ti -1c +.RI "int \fBModeDefinedOn\fP (char modechar, int type)" +.br +.ti -1c +.RI "int \fBModeDefinedOff\fP (char modechar, int type)" +.br +.ti -1c +.RI "bool \fBDoAddExtendedMode\fP (char modechar, int type, bool requires_oper, int params_on, int params_off)" +.br +.ti -1c +.RI "std::vector< \fBModule\fP * > \fBmodules\fP (255)" +.br +.ti -1c +.RI "std::vector< \fBircd_module\fP * > \fBfactory\fP (255)" +.br +.in -1c +.SS "Variables" + +.in +1c +.ti -1c +.RI "\fBExtModeList\fP \fBEMode\fP" +.br +.ti -1c +.RI "int \fBMODCOUNT\fP = -1" +.br +.in -1c +.SH "Typedef Documentation" +.PP +.SS "typedef std::vector<\fBExtMode\fP> ExtModeList" +.PP +Definition at line 32 of file modules.cpp. +.SS "typedef ExtModeList::iterator ExtModeListIter" +.PP +Definition at line 33 of file modules.cpp. +.PP +Referenced by ModeDefined(), ModeDefinedOff(), ModeDefinedOn(), and ModeDefinedOper(). +.SH "Function Documentation" +.PP +.SS "bool DoAddExtendedMode (char modechar, int type, bool requires_oper, int params_on, int params_off)" +.PP +Definition at line 93 of file modules.cpp. +.PP +References EMode, and ModeDefined(). +.PP +Referenced by Server::AddExtendedMode(). +.PP +.nf +94 { +95 if (ModeDefined(modechar,type)) { +96 return false; +97 } +98 EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off)); +99 return true; +100 } +.fi +.SS "std::vector<\fBircd_module\fP*> factory (255)" +.PP +.SS "bool ModeDefined (char modechar, int type)" +.PP +Definition at line 38 of file modules.cpp. +.PP +References EMode, and ExtModeListIter. +.PP +Referenced by DoAddExtendedMode(). +.PP +.nf +39 { +40 log(DEBUG,'Size of extmodes vector is %d',EMode.size()); +41 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +42 { +43 log(DEBUG,'i->modechar==%c, modechar=%c, i->type=%d, type=%d',i->modechar,modechar,i->type,type); +44 if ((i->modechar == modechar) && (i->type == type)) +45 { +46 return true; +47 } +48 } +49 return false; +50 } +.fi +.SS "int ModeDefinedOff (char modechar, int type)" +.PP +Definition at line 80 of file modules.cpp. +.PP +References EMode, and ExtModeListIter. +.PP +.nf +81 { +82 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +83 { +84 if ((i->modechar == modechar) && (i->type == type)) +85 { +86 return i->params_when_off; +87 } +88 } +89 return 0; +90 } +.fi +.SS "int ModeDefinedOn (char modechar, int type)" +.PP +Definition at line 67 of file modules.cpp. +.PP +References EMode, and ExtModeListIter. +.PP +.nf +68 { +69 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +70 { +71 if ((i->modechar == modechar) && (i->type == type)) +72 { +73 return i->params_when_on; +74 } +75 } +76 return 0; +77 } +.fi +.SS "bool ModeDefinedOper (char modechar, int type)" +.PP +Definition at line 52 of file modules.cpp. +.PP +References EMode, and ExtModeListIter. +.PP +.nf +53 { +54 log(DEBUG,'Size of extmodes vector is %d',EMode.size()); +55 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +56 { +57 log(DEBUG,'i->modechar==%c, modechar=%c, i->type=%d, type=%d',i->modechar,modechar,i->type,type); +58 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true)) +59 { +60 return true; +61 } +62 } +63 return false; +64 } +.fi +.SS "std::vector<\fBModule\fP*> modules (255)" +.PP +.SH "Variable Documentation" +.PP +.SS "\fBExtModeList\fP EMode" +.PP +Definition at line 35 of file modules.cpp. +.PP +Referenced by DoAddExtendedMode(), ModeDefined(), ModeDefinedOff(), ModeDefinedOn(), and ModeDefinedOper(). +.SS "int MODCOUNT = -1" +.PP +Definition at line 442 of file modules.cpp. +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/modules.h.3 b/docs/man/modules.h.3 new file mode 100644 index 000000000..8256d3a8b --- /dev/null +++ b/docs/man/modules.h.3 @@ -0,0 +1,183 @@ +.TH "modules.h" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +modules.h \- +.SH SYNOPSIS +.br +.PP +\fC#include 'dynamic.h'\fP +.br +\fC#include 'base.h'\fP +.br +\fC#include 'ctables.h'\fP +.br +\fC#include <string>\fP +.br +\fC#include <deque>\fP +.br +\fC#include <sstream>\fP +.br + +.SS "Compounds" + +.in +1c +.ti -1c +.RI "class \fBAdmin\fP" +.br +.RI "\fIHolds /ADMIN data This class contains the admin details of the local server.\fP" +.ti -1c +.RI "class \fBConfigReader\fP" +.br +.RI "\fIAllows 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.\fP" +.ti -1c +.RI "class \fBFileReader\fP" +.br +.RI "\fICaches a text file into memory and can be used to retrieve lines from it.\fP" +.ti -1c +.RI "class \fBModule\fP" +.br +.RI "\fIBase class for all InspIRCd modules This class is the base class for InspIRCd modules.\fP" +.ti -1c +.RI "class \fBModuleFactory\fP" +.br +.RI "\fIInstantiates classes inherited from \fBModule\fP This class creates a class inherited from type \fBModule\fP, using new.\fP" +.ti -1c +.RI "class \fBServer\fP" +.br +.RI "\fIAllows 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.\fP" +.ti -1c +.RI "class \fBVersion\fP" +.br +.RI "\fIHolds a module's Version information The four members (set by the constructor only) indicate details as to the version number of a module.\fP" +.in -1c +.SS "Defines" + +.in +1c +.ti -1c +.RI "#define \fBDEBUG\fP 10" +.br +.ti -1c +.RI "#define \fBVERBOSE\fP 20" +.br +.ti -1c +.RI "#define \fBDEFAULT\fP 30" +.br +.ti -1c +.RI "#define \fBSPARSE\fP 40" +.br +.ti -1c +.RI "#define \fBNONE\fP 50" +.br +.ti -1c +.RI "#define \fBMT_CHANNEL\fP 1" +.br +.ti -1c +.RI "#define \fBMT_CLIENT\fP 2" +.br +.ti -1c +.RI "#define \fBMT_SERVER\fP 3" +.br +.ti -1c +.RI "#define \fBFOREACH_MOD\fP for (int i = 0; i <= \fBMODCOUNT\fP; i++) modules[i]->" +.br +.ti -1c +.RI "#define \fBFOREACH_RESULT\fP(x)" +.br +.in -1c +.SS "Typedefs" + +.in +1c +.ti -1c +.RI "typedef std::deque< std::string > \fBfile_cache\fP" +.br +.RI "\fILow level definition of a \fBFileReader\fP classes file cache area.\fP" +.ti -1c +.RI "typedef \fBfile_cache\fP \fBstring_list\fP" +.br +.ti -1c +.RI "typedef DLLFactory< \fBModuleFactory\fP > \fBircd_module\fP" +.br +.in -1c +.SS "Functions" + +.in +1c +.ti -1c +.RI "void \fBcreatecommand\fP (char *cmd, handlerfunc f, char flags, int minparams)" +.br +.ti -1c +.RI "void \fBserver_mode\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.in -1c +.SH "Define Documentation" +.PP +.SS "#define DEBUG 10" +.PP +Definition at line 11 of file modules.h. +.SS "#define DEFAULT 30" +.PP +Definition at line 13 of file modules.h. +.SS "#define FOREACH_MOD for (int i = 0; i <= \fBMODCOUNT\fP; i++) modules[i]->" +.PP +Definition at line 38 of file modules.h. +.SS "#define FOREACH_RESULT(x)" +.PP +\fBValue:\fP.nf +{ MOD_RESULT = 0; \ + for (int i = 0; i <= MODCOUNT; i++) { \ + int res = modules[i]->x ; \ + if (res) { \ + MOD_RESULT = res; \ + break; \ + } \ + } \ + } +.fi +.PP +Definition at line 46 of file modules.h. +.SS "#define MT_CHANNEL 1" +.PP +Definition at line 17 of file modules.h. +.SS "#define MT_CLIENT 2" +.PP +Definition at line 18 of file modules.h. +.PP +Referenced by Server::AddExtendedMode(). +.SS "#define MT_SERVER 3" +.PP +Definition at line 19 of file modules.h. +.PP +Referenced by Server::AddExtendedMode(). +.SS "#define NONE 50" +.PP +Definition at line 15 of file modules.h. +.SS "#define SPARSE 40" +.PP +Definition at line 14 of file modules.h. +.SS "#define VERBOSE 20" +.PP +Definition at line 12 of file modules.h. +.SH "Typedef Documentation" +.PP +.SS "typedef std::deque<std::string> file_cache" +.PP +Low level definition of a \fBFileReader\fP classes file cache area.Definition at line 30 of file modules.h. +.PP +Referenced by FileReader::FileReader(), and FileReader::LoadFile(). +.SS "typedef DLLFactory<\fBModuleFactory\fP> ircd_module" +.PP +Definition at line 646 of file modules.h. +.SS "typedef \fBfile_cache\fP string_list" +.PP +Definition at line 31 of file modules.h. +.SH "Function Documentation" +.PP +.SS "void createcommand (char * cmd, handlerfunc f, char flags, int minparams)" +.PP +Referenced by Server::AddCommand(). +.SS "void server_mode (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP +Referenced by Server::SendMode(). +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/packet.3 b/docs/man/packet.3 new file mode 100644 index 000000000..6bfbbf968 --- /dev/null +++ b/docs/man/packet.3 @@ -0,0 +1,25 @@ +.TH "packet" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +packet \- Class packet is deprecated. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <connection.h>\fP +.PP +Inherits \fBclassbase\fP. +.PP +.SH "Detailed Description" +.PP +Class packet is deprecated. + +This declaration is preserved here to maintain documentation only. +.PP +Definition at line 155 of file connection.h. + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/serverrec.3 b/docs/man/serverrec.3 new file mode 100644 index 000000000..42f51e9b8 --- /dev/null +++ b/docs/man/serverrec.3 @@ -0,0 +1,176 @@ +.TH "serverrec" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +serverrec \- A class that defines the local server or a remote server. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <servers.h>\fP +.PP +Inherits \fBconnection\fP. +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "\fBserverrec\fP ()" +.br +.RI "\fIConstructor.\fP" +.ti -1c +.RI "\fBserverrec\fP (char *n, long ver, bool jupe)" +.br +.RI "\fIConstructor which initialises some of the main variables.\fP" +.ti -1c +.RI "\fB~serverrec\fP ()" +.br +.RI "\fIDestructor.\fP" +.in -1c +.SS "Public Attributes" + +.in +1c +.ti -1c +.RI "char \fBname\fP [MAXBUF]" +.br +.RI "\fIserver name\fP" +.ti -1c +.RI "long \fBpingtime\fP" +.br +.RI "\fIlast ping response (ms)\fP" +.ti -1c +.RI "long \fBusercount_i\fP" +.br +.RI "\fIinvisible users on server\fP" +.ti -1c +.RI "long \fBusercount\fP" +.br +.RI "\fInon-invisible users on server\fP" +.ti -1c +.RI "long \fBopercount\fP" +.br +.RI "\fIopers on server\fP" +.ti -1c +.RI "int \fBhops_away\fP" +.br +.RI "\fInumber of hops away (for quick access)\fP" +.ti -1c +.RI "long \fBversion\fP" +.br +.RI "\fIircd version\fP" +.ti -1c +.RI "bool \fBjupiter\fP" +.br +.RI "\fIis a JUPE server (faked to enforce a server ban)\fP" +.ti -1c +.RI "char \fBdescription\fP [MAXBUF]" +.br +.RI "\fIDescription of the server.\fP" +.ti -1c +.RI "bool \fBsync_soon\fP" +.br +.in -1c +.SH "Detailed Description" +.PP +A class that defines the local server or a remote server.Definition at line 19 of file servers.h. +.SH "Constructor & Destructor Documentation" +.PP +.SS "serverrec::serverrec ()" +.PP +Constructor.Definition at line 12 of file servers.cpp. +.PP +References connection::fd, hops_away, jupiter, connection::lastping, opercount, pingtime, connection::signon, sync_soon, usercount, usercount_i, and version. +.PP +.nf +13 { +14 strcpy(name,''); +15 pingtime = 0; +16 lastping = time(NULL); +17 usercount_i = usercount = opercount = version = 0; +18 hops_away = 1; +19 signon = time(NULL); +20 jupiter = false; +21 fd = 0; +22 sync_soon = false; +23 } +.fi +.SS "serverrec::serverrec (char * n, long ver, bool jupe)" +.PP +Constructor which initialises some of the main variables.Definition at line 30 of file servers.cpp. +.PP +References connection::fd, hops_away, jupiter, connection::lastping, opercount, connection::signon, sync_soon, usercount, usercount_i, and version. +.PP +.nf +31 { +32 strcpy(name,n); +33 lastping = time(NULL); +34 usercount_i = usercount = opercount = 0; +35 version = ver; +36 hops_away = 1; +37 signon = time(NULL); +38 jupiter = jupe; +39 fd = 0; +40 sync_soon = false; +41 } +.fi +.SS "serverrec::~serverrec ()" +.PP +Destructor.Definition at line 26 of file servers.cpp. +.PP +.nf +27 { +28 } +.fi +.SH "Member Data Documentation" +.PP +.SS "char serverrec::description[MAXBUF]" +.PP +Description of the server.Definition at line 50 of file servers.h. +.SS "int serverrec::hops_away" +.PP +number of hops away (for quick access)Definition at line 40 of file servers.h. +.PP +Referenced by serverrec(). +.SS "bool serverrec::jupiter" +.PP +is a JUPE server (faked to enforce a server ban)Definition at line 46 of file servers.h. +.PP +Referenced by serverrec(). +.SS "char serverrec::name[MAXBUF]" +.PP +server nameDefinition at line 25 of file servers.h. +.SS "long serverrec::opercount" +.PP +opers on serverDefinition at line 37 of file servers.h. +.PP +Referenced by serverrec(). +.SS "long serverrec::pingtime" +.PP +last ping response (ms)Definition at line 28 of file servers.h. +.PP +Referenced by serverrec(). +.SS "bool serverrec::sync_soon" +.PP +Definition at line 52 of file servers.h. +.PP +Referenced by serverrec(). +.SS "long serverrec::usercount" +.PP +non-invisible users on serverDefinition at line 34 of file servers.h. +.PP +Referenced by serverrec(). +.SS "long serverrec::usercount_i" +.PP +invisible users on serverDefinition at line 31 of file servers.h. +.PP +Referenced by serverrec(). +.SS "long serverrec::version" +.PP +ircd versionDefinition at line 43 of file servers.h. +.PP +Referenced by serverrec(). + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/servers.cpp.3 b/docs/man/servers.cpp.3 new file mode 100644 index 000000000..1b09bba03 --- /dev/null +++ b/docs/man/servers.cpp.3 @@ -0,0 +1,22 @@ +.TH "servers.cpp" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +servers.cpp \- +.SH SYNOPSIS +.br +.PP +\fC#include 'inspircd_config.h'\fP +.br +\fC#include 'servers.h'\fP +.br +\fC#include 'inspircd.h'\fP +.br +\fC#include <stdio.h>\fP +.br +\fC#include <map>\fP +.br + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/servers.h.3 b/docs/man/servers.h.3 new file mode 100644 index 000000000..9913d595d --- /dev/null +++ b/docs/man/servers.h.3 @@ -0,0 +1,46 @@ +.TH "servers.h" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +servers.h \- +.SH SYNOPSIS +.br +.PP +\fC#include 'inspircd_config.h'\fP +.br +\fC#include 'connection.h'\fP +.br +\fC#include <string>\fP +.br +\fC#include <map>\fP +.br + +.SS "Compounds" + +.in +1c +.ti -1c +.RI "class \fBserverrec\fP" +.br +.RI "\fIA class that defines the local server or a remote server.\fP" +.in -1c +.SS "Defines" + +.in +1c +.ti -1c +.RI "#define \fBLINK_ACTIVE\fP 1" +.br +.ti -1c +.RI "#define \fBLINK_INACTIVE\fP 0" +.br +.in -1c +.SH "Define Documentation" +.PP +.SS "#define LINK_ACTIVE 1" +.PP +Definition at line 14 of file servers.h. +.SS "#define LINK_INACTIVE 0" +.PP +Definition at line 15 of file servers.h. +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/std.3 b/docs/man/std.3 new file mode 100644 index 000000000..f0a99584a --- /dev/null +++ b/docs/man/std.3 @@ -0,0 +1,11 @@ +.TH "std" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +std \- +.SH SYNOPSIS +.br +.PP +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/ucrec.3 b/docs/man/ucrec.3 new file mode 100644 index 000000000..f7f3ad0db --- /dev/null +++ b/docs/man/ucrec.3 @@ -0,0 +1,75 @@ +.TH "ucrec" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +ucrec \- Holds a user's modes on a channel This class associates a users privilages with a channel by creating a pointer link between a userrec and chanrec class. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <channels.h>\fP +.PP +Inherits \fBExtensible\fP. +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "\fBucrec\fP ()" +.br +.ti -1c +.RI "virtual \fB~ucrec\fP ()" +.br +.in -1c +.SS "Public Attributes" + +.in +1c +.ti -1c +.RI "long \fBuc_modes\fP" +.br +.RI "\fIContains a bitmask of the UCMODE_OP ...\fP" +.ti -1c +.RI "\fBchanrec\fP * \fBchannel\fP" +.br +.RI "\fIPoints to the channel record where the given modes apply.\fP" +.in -1c +.SH "Detailed Description" +.PP +Holds a user's modes on a channel This class associates a users privilages with a channel by creating a pointer link between a userrec and chanrec class. + +The uc_modes member holds a bitmask of which privilages the user has on the channel, such as op, voice, etc. +.PP +Definition at line 191 of file channels.h. +.SH "Constructor & Destructor Documentation" +.PP +.SS "ucrec::ucrec ()\fC [inline]\fP" +.PP +Definition at line 204 of file channels.h. +.PP +.nf +204 { /* stub */ } +.fi +.SS "virtual ucrec::~ucrec ()\fC [inline, virtual]\fP" +.PP +Definition at line 205 of file channels.h. +.PP +.nf +205 { /* stub */ } +.fi +.SH "Member Data Documentation" +.PP +.SS "\fBchanrec\fP* ucrec::channel" +.PP +Points to the channel record where the given modes apply.If the record is not in use, this value will be NULL.Definition at line 202 of file channels.h. +.PP +Referenced by userrec::userrec(). +.SS "long ucrec::uc_modes" +.PP +Contains a bitmask of the UCMODE_OP ...UCMODE_FOUNDER values. If this value is zero, the user has no privilages upon the channel.Definition at line 197 of file channels.h. +.PP +Referenced by userrec::userrec(). + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/userrec.3 b/docs/man/userrec.3 new file mode 100644 index 000000000..1fda5c0d4 --- /dev/null +++ b/docs/man/userrec.3 @@ -0,0 +1,288 @@ +.TH "userrec" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +userrec \- Holds all information about a user This class stores all information about a user connected to the irc server. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <users.h>\fP +.PP +Inherits \fBconnection\fP. +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "\fBuserrec\fP ()" +.br +.ti -1c +.RI "virtual \fB~userrec\fP ()" +.br +.ti -1c +.RI "virtual char * \fBGetFullHost\fP ()" +.br +.RI "\fIReturns the full displayed host of the user This member function returns the hostname of the user as seen by other users on the server, in nick!identhost form.\fP" +.ti -1c +.RI "virtual char * \fBGetFullRealHost\fP ()" +.br +.RI "\fIReturns the full real host of the user This member function returns the hostname of the user as seen by other users on the server, in nick!identhost form.\fP" +.ti -1c +.RI "virtual bool \fBIsInvited\fP (char *channel)" +.br +.RI "\fIReturns true if a user is invited to a channel.\fP" +.ti -1c +.RI "virtual void \fBInviteTo\fP (char *channel)" +.br +.RI "\fIAdds a channel to a users invite list (invites them to a channel).\fP" +.ti -1c +.RI "virtual void \fBRemoveInvite\fP (char *channel)" +.br +.RI "\fIRemoves a channel from a users invite list.\fP" +.in -1c +.SS "Public Attributes" + +.in +1c +.ti -1c +.RI "char \fBnick\fP [NICKMAX]" +.br +.RI "\fIThe users nickname.\fP" +.ti -1c +.RI "char \fBident\fP [64]" +.br +.RI "\fIThe users ident reply.\fP" +.ti -1c +.RI "char \fBdhost\fP [256]" +.br +.RI "\fIThe host displayed to non-opers (used for cloaking etc).\fP" +.ti -1c +.RI "char \fBfullname\fP [128]" +.br +.RI "\fIThe users full name.\fP" +.ti -1c +.RI "char \fBmodes\fP [MAXBUF]" +.br +.RI "\fIThe user's mode string.\fP" +.ti -1c +.RI "\fBucrec\fP \fBchans\fP [MAXCHANS]" +.br +.ti -1c +.RI "char \fBserver\fP [256]" +.br +.RI "\fIThe server the user is connected to.\fP" +.ti -1c +.RI "char \fBawaymsg\fP [512]" +.br +.RI "\fIThe user's away message.\fP" +.ti -1c +.RI "char \fBresult\fP [256]" +.br +.RI "\fIStores the result of the last GetFullHost or GetRealHost call.\fP" +.ti -1c +.RI "int \fBflood\fP" +.br +.RI "\fINumber of lines the user can place into the buffer (up to the global NetBufferSize bytes) before they are disconnected for excess flood.\fP" +.ti -1c +.RI "unsigned long \fBtimeout\fP" +.br +.RI "\fINumber of seconds this user is given to send USER/NICK If they do not send their details in this time limit they will be disconnected.\fP" +.in -1c +.SS "Private Attributes" + +.in +1c +.ti -1c +.RI "\fBInvitedList\fP \fBinvites\fP" +.br +.RI "\fIA list of channels the user has a pending invite to.\fP" +.in -1c +.SH "Detailed Description" +.PP +Holds all information about a user This class stores all information about a user connected to the irc server. + +Everything about a connection is stored here primarily, from the user's socket ID (file descriptor) through to the user's nickname and hostname. Use the Find method of the server class to locate a specific user by nickname. +.PP +Definition at line 78 of file users.h. +.SH "Constructor & Destructor Documentation" +.PP +.SS "userrec::userrec ()" +.PP +Definition at line 11 of file users.cpp. +.PP +References connection::bytes_in, connection::bytes_out, ucrec::channel, chans, connection::cmds_in, connection::cmds_out, connection::fd, flood, connection::haspassed, connection::idle_lastmsg, invites, connection::lastping, connection::nping, connection::port, connection::registered, connection::signon, timeout, and ucrec::uc_modes. +.PP +.nf +12 { +13 // the PROPER way to do it, AVOID bzero at *ALL* costs +14 strcpy(nick,''); +15 strcpy(ip,'127.0.0.1'); +16 timeout = 0; +17 strcpy(ident,''); +18 strcpy(host,''); +19 strcpy(dhost,''); +20 strcpy(fullname,''); +21 strcpy(modes,''); +22 strcpy(inbuf,''); +23 strcpy(server,''); +24 strcpy(awaymsg,''); +25 fd = lastping = signon = idle_lastmsg = nping = registered = 0; +26 flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0; +27 haspassed = false; +28 strcpy(result,''); +29 for (int i = 0; i < MAXCHANS; i++) +30 { +31 this->chans[i].channel = NULL; +32 this->chans[i].uc_modes = 0; +33 } +34 invites.clear(); +35 } +.fi +.SS "virtual userrec::~userrec ()\fC [inline, virtual]\fP" +.PP +Definition at line 142 of file users.h. +.PP +.nf +142 { } +.fi +.SH "Member Function Documentation" +.PP +.SS "char * userrec::GetFullHost ()\fC [virtual]\fP" +.PP +Returns the full displayed host of the user This member function returns the hostname of the user as seen by other users on the server, in nick!identhost form.Definition at line 39 of file users.cpp. +.PP +References result. +.PP +.nf +40 { +41 sprintf(result,'%s!%s@%s',nick,ident,dhost); +42 return result; +43 } +.fi +.SS "char * userrec::GetFullRealHost ()\fC [virtual]\fP" +.PP +Returns the full real host of the user This member function returns the hostname of the user as seen by other users on the server, in nick!identhost form.If any form of hostname cloaking is in operation, e.g. through a module, then this method will ignore it and return the true hostname.Definition at line 46 of file users.cpp. +.PP +References result. +.PP +.nf +47 { +48 sprintf(result,'%s!%s@%s',nick,ident,host); +49 return result; +50 } +.fi +.SS "void userrec::InviteTo (char * channel)\fC [virtual]\fP" +.PP +Adds a channel to a users invite list (invites them to a channel).Definition at line 66 of file users.cpp. +.PP +References Invited::channel, and invites. +.PP +.nf +67 { +68 Invited i; +69 strcpy(i.channel,channel); +70 invites.push_back(i); +71 } +.fi +.SS "bool userrec::IsInvited (char * channel)\fC [virtual]\fP" +.PP +Returns true if a user is invited to a channel.Definition at line 52 of file users.cpp. +.PP +References invites. +.PP +.nf +53 { +54 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) +55 { +56 if (i->channel) { +57 if (!strcasecmp(i->channel,channel)) +58 { +59 return true; +60 } +61 } +62 } +63 return false; +64 } +.fi +.SS "void userrec::RemoveInvite (char * channel)\fC [virtual]\fP" +.PP +Removes a channel from a users invite list.This member function is called on successfully joining an invite only channel to which the user has previously been invited, to clear the invitation.Definition at line 73 of file users.cpp. +.PP +References invites. +.PP +.nf +74 { +75 log(DEBUG,'Removing invites'); +76 if (channel) +77 { +78 if (invites.size()) +79 { +80 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) +81 { +82 if (i->channel) +83 { +84 if (!strcasecmp(i->channel,channel)) +85 { +86 invites.erase(i); +87 return; +88 } +89 } +90 } +91 } +92 } +93 } +.fi +.SH "Member Data Documentation" +.PP +.SS "char userrec::awaymsg[512]" +.PP +The user's away message.If this string is empty, the user is not marked as away.Definition at line 121 of file users.h. +.SS "\fBucrec\fP userrec::chans[MAXCHANS]" +.PP +Definition at line 112 of file users.h. +.PP +Referenced by userrec(). +.SS "char userrec::dhost[256]" +.PP +The host displayed to non-opers (used for cloaking etc).This usually matches the value of \fBuserrec::host\fP.Definition at line 100 of file users.h. +.SS "int userrec::flood" +.PP +Number of lines the user can place into the buffer (up to the global NetBufferSize bytes) before they are disconnected for excess flood.Definition at line 132 of file users.h. +.PP +Referenced by userrec(). +.SS "char userrec::fullname[128]" +.PP +The users full name.Definition at line 104 of file users.h. +.SS "char userrec::ident[64]" +.PP +The users ident reply.Definition at line 95 of file users.h. +.SS "\fBInvitedList\fP userrec::invites\fC [private]\fP" +.PP +A list of channels the user has a pending invite to.Definition at line 84 of file users.h. +.PP +Referenced by InviteTo(), IsInvited(), RemoveInvite(), and userrec(). +.SS "char userrec::modes[MAXBUF]" +.PP +The user's mode string.This may contain any of the following RFC characters: o, w, s, i Your module may define other mode characters as it sees fit.Definition at line 110 of file users.h. +.SS "char userrec::nick[NICKMAX]" +.PP +The users nickname.An invalid nickname indicates an unregistered connection prior to the NICK command.Definition at line 91 of file users.h. +.PP +Referenced by Server::QuitUser(). +.SS "char userrec::result[256]" +.PP +Stores the result of the last GetFullHost or GetRealHost call.You may use this to increase the speed of use of this class.Definition at line 126 of file users.h. +.PP +Referenced by GetFullHost(), and GetFullRealHost(). +.SS "char userrec::server[256]" +.PP +The server the user is connected to.Definition at line 116 of file users.h. +.SS "unsigned long userrec::timeout" +.PP +Number of seconds this user is given to send USER/NICK If they do not send their details in this time limit they will be disconnected.Definition at line 138 of file users.h. +.PP +Referenced by userrec(). + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/users.cpp.3 b/docs/man/users.cpp.3 new file mode 100644 index 000000000..dd8c654f6 --- /dev/null +++ b/docs/man/users.cpp.3 @@ -0,0 +1,22 @@ +.TH "users.cpp" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +users.cpp \- +.SH SYNOPSIS +.br +.PP +\fC#include 'inspircd_config.h'\fP +.br +\fC#include 'channels.h'\fP +.br +\fC#include 'users.h'\fP +.br +\fC#include 'inspircd.h'\fP +.br +\fC#include <stdio.h>\fP +.br + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/users.h.3 b/docs/man/users.h.3 new file mode 100644 index 000000000..cb2b55091 --- /dev/null +++ b/docs/man/users.h.3 @@ -0,0 +1,98 @@ +.TH "users.h" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +users.h \- +.SH SYNOPSIS +.br +.PP +\fC#include 'inspircd_config.h'\fP +.br +\fC#include 'channels.h'\fP +.br +\fC#include 'connection.h'\fP +.br +\fC#include <string>\fP +.br + +.SS "Compounds" + +.in +1c +.ti -1c +.RI "class \fBConnectClass\fP" +.br +.RI "\fIHolds information relevent to <connect allow> and <connect deny> tags in the config file.\fP" +.ti -1c +.RI "class \fBInvited\fP" +.br +.RI "\fIHolds a channel name to which a user has been invited.\fP" +.ti -1c +.RI "class \fBuserrec\fP" +.br +.RI "\fIHolds all information about a user This class stores all information about a user connected to the irc server.\fP" +.in -1c +.SS "Defines" + +.in +1c +.ti -1c +.RI "#define \fBSTATUS_OP\fP 4" +.br +.ti -1c +.RI "#define \fBSTATUS_HOP\fP 2" +.br +.ti -1c +.RI "#define \fBSTATUS_VOICE\fP 1" +.br +.ti -1c +.RI "#define \fBSTATUS_NORMAL\fP 0" +.br +.ti -1c +.RI "#define \fBCC_ALLOW\fP 0" +.br +.ti -1c +.RI "#define \fBCC_DENY\fP 1" +.br +.in -1c +.SS "Typedefs" + +.in +1c +.ti -1c +.RI "typedef std::vector< \fBInvited\fP > \fBInvitedList\fP" +.br +.RI "\fIHolds a complete list of all channels to which a user has been invited and has not yet joined.\fP" +.ti -1c +.RI "typedef std::vector< \fBConnectClass\fP > \fBClassVector\fP" +.br +.RI "\fIHolds a complete list of all allow and deny tags from the configuration file (connection classes).\fP" +.in -1c +.SH "Define Documentation" +.PP +.SS "#define CC_ALLOW 0" +.PP +Definition at line 20 of file users.h. +.SS "#define CC_DENY 1" +.PP +Definition at line 21 of file users.h. +.SS "#define STATUS_HOP 2" +.PP +Definition at line 16 of file users.h. +.SS "#define STATUS_NORMAL 0" +.PP +Definition at line 18 of file users.h. +.SS "#define STATUS_OP 4" +.PP +Definition at line 15 of file users.h. +.SS "#define STATUS_VOICE 1" +.PP +Definition at line 17 of file users.h. +.SH "Typedef Documentation" +.PP +.SS "typedef std::vector<\fBConnectClass\fP> ClassVector" +.PP +Holds a complete list of all allow and deny tags from the configuration file (connection classes).Definition at line 70 of file users.h. +.SS "typedef std::vector<\fBInvited\fP> InvitedList" +.PP +Holds a complete list of all channels to which a user has been invited and has not yet joined.Definition at line 64 of file users.h. +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/xline.h.3 b/docs/man/xline.h.3 new file mode 100644 index 000000000..294b073f3 --- /dev/null +++ b/docs/man/xline.h.3 @@ -0,0 +1,183 @@ +.TH "xline.h" 3 "30 Apr 2004" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +xline.h \- +.SH SYNOPSIS +.br +.PP +\fC#include <typeinfo>\fP +.br +\fC#include <iostream>\fP +.br +\fC#include <string>\fP +.br +\fC#include <deque>\fP +.br +\fC#include <sstream>\fP +.br +\fC#include <vector>\fP +.br +\fC#include 'users.h'\fP +.br +\fC#include 'channels.h'\fP +.br + +.SS "Compounds" + +.in +1c +.ti -1c +.RI "class \fBGLine\fP" +.br +.RI "\fIGLine class.\fP" +.ti -1c +.RI "class \fBKLine\fP" +.br +.RI "\fIKLine class.\fP" +.ti -1c +.RI "class \fBQLine\fP" +.br +.RI "\fIQLine class.\fP" +.ti -1c +.RI "class \fBXLine\fP" +.br +.RI "\fIXLine is the base class for ban lines such as G lines and K lines.\fP" +.ti -1c +.RI "class \fBZLine\fP" +.br +.RI "\fIZLine class.\fP" +.in -1c +.SS "Functions" + +.in +1c +.ti -1c +.RI "void \fBread_xline_defaults\fP ()" +.br +.ti -1c +.RI "void \fBadd_gline\fP (long duration, char *source, char *reason, char *hostmask)" +.br +.ti -1c +.RI "void \fBadd_qline\fP (long duration, char *source, char *reason, char *nickname)" +.br +.ti -1c +.RI "void \fBadd_zline\fP (long duration, char *source, char *reason, char *ipaddr)" +.br +.ti -1c +.RI "void \fBadd_kline\fP (long duration, char *source, char *reason, char *hostmask)" +.br +.ti -1c +.RI "bool \fBdel_gline\fP (char *hostmask)" +.br +.ti -1c +.RI "bool \fBdel_qline\fP (char *nickname)" +.br +.ti -1c +.RI "bool \fBdel_zline\fP (char *ipaddr)" +.br +.ti -1c +.RI "bool \fBdel_kline\fP (char *hostmask)" +.br +.ti -1c +.RI "char * \fBmatches_qline\fP (const char *nick)" +.br +.ti -1c +.RI "char * \fBmatches_gline\fP (const char *host)" +.br +.ti -1c +.RI "char * \fBmatches_zline\fP (const char *ipaddr)" +.br +.ti -1c +.RI "char * \fBmatches_kline\fP (const char *host)" +.br +.ti -1c +.RI "void \fBexpire_lines\fP ()" +.br +.ti -1c +.RI "void \fBapply_lines\fP ()" +.br +.ti -1c +.RI "void \fBstats_k\fP (\fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBstats_g\fP (\fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBstats_q\fP (\fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBstats_z\fP (\fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBgline_set_creation_time\fP (char *host, time_t create_time)" +.br +.ti -1c +.RI "void \fBqline_set_creation_time\fP (char *nick, time_t create_time)" +.br +.ti -1c +.RI "void \fBzline_set_creation_time\fP (char *ip, time_t create_time)" +.br +.ti -1c +.RI "bool \fBzline_make_global\fP (char *ipaddr)" +.br +.ti -1c +.RI "bool \fBqline_make_global\fP (char *nickname)" +.br +.ti -1c +.RI "void \fBsync_xlines\fP (\fBserverrec\fP *serv, char *tcp_host)" +.br +.in -1c +.SH "Function Documentation" +.PP +.SS "void add_gline (long duration, char * source, char * reason, char * hostmask)" +.PP +.SS "void add_kline (long duration, char * source, char * reason, char * hostmask)" +.PP +.SS "void add_qline (long duration, char * source, char * reason, char * nickname)" +.PP +.SS "void add_zline (long duration, char * source, char * reason, char * ipaddr)" +.PP +.SS "void apply_lines ()" +.PP +.SS "bool del_gline (char * hostmask)" +.PP +.SS "bool del_kline (char * hostmask)" +.PP +.SS "bool del_qline (char * nickname)" +.PP +.SS "bool del_zline (char * ipaddr)" +.PP +.SS "void expire_lines ()" +.PP +.SS "void gline_set_creation_time (char * host, time_t create_time)" +.PP +.SS "char* matches_gline (const char * host)" +.PP +.SS "char* matches_kline (const char * host)" +.PP +.SS "char* matches_qline (const char * nick)" +.PP +.SS "char* matches_zline (const char * ipaddr)" +.PP +.SS "bool qline_make_global (char * nickname)" +.PP +.SS "void qline_set_creation_time (char * nick, time_t create_time)" +.PP +.SS "void read_xline_defaults ()" +.PP +.SS "void stats_g (\fBuserrec\fP * user)" +.PP +.SS "void stats_k (\fBuserrec\fP * user)" +.PP +.SS "void stats_q (\fBuserrec\fP * user)" +.PP +.SS "void stats_z (\fBuserrec\fP * user)" +.PP +.SS "void sync_xlines (\fBserverrec\fP * serv, char * tcp_host)" +.PP +.SS "bool zline_make_global (char * ipaddr)" +.PP +.SS "void zline_set_creation_time (char * ip, time_t create_time)" +.PP +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. |