diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-14 14:52:12 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-14 14:52:12 +0000 |
commit | 03be04a9a2d86a4568d09d5e1689dd7ef37c863a (patch) | |
tree | d7040d4ceeaf75e849d59dd1ed077962b75fb4bf /docs/man | |
parent | 8b6b85c19528de8f0d35ab766d7559ad519869b3 (diff) |
Added extra docs for new config system
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2417 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'docs/man')
75 files changed, 2183 insertions, 1861 deletions
diff --git a/docs/man/man3/Admin.3 b/docs/man/man3/Admin.3 index f950ffbf8..31a231609 100644 --- a/docs/man/man3/Admin.3 +++ b/docs/man/man3/Admin.3 @@ -1,4 +1,4 @@ -.TH "Admin" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "Admin" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -43,10 +43,10 @@ Definition at line 125 of file modules.h. .PP .SS "Admin::Admin (\fBstd::string\fP name, \fBstd::string\fP email, \fBstd::string\fP nick)" .PP -Definition at line 244 of file modules.cpp. +Definition at line 171 of file modules.cpp. .PP .nf -244 : Name(name), Email(email), Nick(nick) { }; +171 : Name(name), Email(email), Nick(nick) { }; .fi .PP .SH "Member Data Documentation" diff --git a/docs/man/man3/BanItem.3 b/docs/man/man3/BanItem.3 index cbd5e52e0..ae351b6a6 100644 --- a/docs/man/man3/BanItem.3 +++ b/docs/man/man3/BanItem.3 @@ -1,4 +1,4 @@ -.TH "BanItem" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "BanItem" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/BoolSet.3 b/docs/man/man3/BoolSet.3 index 78ecd755f..219d7e913 100644 --- a/docs/man/man3/BoolSet.3 +++ b/docs/man/man3/BoolSet.3 @@ -1,4 +1,4 @@ -.TH "BoolSet" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "BoolSet" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ConfigReader.3 b/docs/man/man3/ConfigReader.3 index bc4f7caa3..009733cae 100644 --- a/docs/man/man3/ConfigReader.3 +++ b/docs/man/man3/ConfigReader.3 @@ -1,4 +1,4 @@ -.TH "ConfigReader" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ConfigReader" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -84,7 +84,7 @@ Allows reading of values from configuration files This class allows a module to 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 1510 of file modules.h. +Definition at line 1525 of file modules.h. .SH "Constructor & Destructor Documentation" .PP .SS "ConfigReader::ConfigReader ()" @@ -93,19 +93,19 @@ Default constructor. .PP This constructor initialises the ConfigReader class to read the inspircd.conf file as specified when running ./configure. .PP -Definition at line 807 of file modules.cpp. +Definition at line 734 of file modules.cpp. .PP -References cache, CONF_FILE_NOT_FOUND, error, errorlog, include_stack, and readerror. +References cache, ServerConfig::ClearStack(), CONF_FILE_NOT_FOUND, error, errorlog, ServerConfig::LoadConf(), and readerror. .PP .nf -808 { -809 include_stack.clear(); -810 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); -811 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out); -812 this->readerror = LoadConf(CONFIG_FILE,this->cache,this->errorlog); -813 if (!this->readerror) -814 this->error = CONF_FILE_NOT_FOUND; -815 } +735 { +736 Config->ClearStack(); +737 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); +738 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out); +739 this->readerror = Config->LoadConf(CONFIG_FILE,this->cache,this->errorlog); +740 if (!this->readerror) +741 this->error = CONF_FILE_NOT_FOUND; +742 } .fi .PP .SS "ConfigReader::ConfigReader (\fBstd::string\fP filename)" @@ -114,18 +114,19 @@ Overloaded constructor. .PP This constructor initialises the ConfigReader class to read a user-specified config file .PP -Definition at line 827 of file modules.cpp. +Definition at line 754 of file modules.cpp. .PP -References cache, CONF_FILE_NOT_FOUND, error, errorlog, and readerror. +References cache, ServerConfig::ClearStack(), CONF_FILE_NOT_FOUND, error, errorlog, ServerConfig::LoadConf(), and readerror. .PP .nf -828 { -829 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); -830 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out); -831 this->readerror = LoadConf(filename.c_str(),this->cache,this->errorlog); -832 if (!this->readerror) -833 this->error = CONF_FILE_NOT_FOUND; -834 }; +755 { +756 Config->ClearStack(); +757 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); +758 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out); +759 this->readerror = Config->LoadConf(filename.c_str(),this->cache,this->errorlog); +760 if (!this->readerror) +761 this->error = CONF_FILE_NOT_FOUND; +762 }; .fi .PP .SS "ConfigReader::~ConfigReader ()" @@ -134,17 +135,17 @@ Default destructor. .PP This method destroys the ConfigReader class. .PP -Definition at line 818 of file modules.cpp. +Definition at line 745 of file modules.cpp. .PP References cache, and errorlog. .PP .nf -819 { -820 if (this->cache) -821 delete this->cache; -822 if (this->errorlog) -823 delete this->errorlog; -824 } +746 { +747 if (this->cache) +748 delete this->cache; +749 if (this->errorlog) +750 delete this->errorlog; +751 } .fi .PP .SH "Member Function Documentation" @@ -155,41 +156,41 @@ Dumps the list of errors in a config file to an output location. .PP If bail is true, then the program will abort. If bail is false and user points to a valid user record, the error report will be spooled to the given user by means of NOTICE. if bool is false AND user is false, the error report will be spooled to all opers by means of a NOTICE to all opers. .PP -Definition at line 905 of file modules.cpp. +Definition at line 833 of file modules.cpp. .PP References errorlog, connection::fd, and userrec::nick. .PP .nf -906 { -907 if (bail) -908 { -909 printf('There were errors in your configuration:\n%s',errorlog->str().c_str()); -910 exit(0); -911 } -912 else -913 { -914 char dataline[1024]; -915 if (user) -916 { -917 WriteServ(user->fd,'NOTICE %s :There were errors in the configuration file:',user->nick); -918 while (!errorlog->eof()) -919 { -920 errorlog->getline(dataline,1024); -921 WriteServ(user->fd,'NOTICE %s :%s',user->nick,dataline); -922 } -923 } -924 else -925 { -926 WriteOpers('There were errors in the configuration file:',user->nick); -927 while (!errorlog->eof()) -928 { -929 errorlog->getline(dataline,1024); -930 WriteOpers(dataline); -931 } -932 } -933 return; -934 } -935 } +834 { +835 if (bail) +836 { +837 printf('There were errors in your configuration:\n%s',errorlog->str().c_str()); +838 exit(0); +839 } +840 else +841 { +842 char dataline[1024]; +843 if (user) +844 { +845 WriteServ(user->fd,'NOTICE %s :There were errors in the configuration file:',user->nick); +846 while (!errorlog->eof()) +847 { +848 errorlog->getline(dataline,1024); +849 WriteServ(user->fd,'NOTICE %s :%s',user->nick,dataline); +850 } +851 } +852 else +853 { +854 WriteOpers('There were errors in the configuration file:',user->nick); +855 while (!errorlog->eof()) +856 { +857 errorlog->getline(dataline,1024); +858 WriteOpers(dataline); +859 } +860 } +861 return; +862 } +863 } .fi .PP .SS "int ConfigReader::Enumerate (\fBstd::string\fP tag)" @@ -198,14 +199,14 @@ Counts the number of times a given tag appears in the config file. .PP 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. .PP -Definition at line 938 of file modules.cpp. +Definition at line 866 of file modules.cpp. .PP -References cache. +References cache, and ServerConfig::EnumConf(). .PP .nf -939 { -940 return EnumConf(cache,tag.c_str()); -941 } +867 { +868 return Config->EnumConf(cache,tag.c_str()); +869 } .fi .PP .SS "int ConfigReader::EnumerateValues (\fBstd::string\fP tag, int index)" @@ -214,14 +215,14 @@ Returns the number of items within a tag. .PP 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. .PP -Definition at line 943 of file modules.cpp. +Definition at line 871 of file modules.cpp. .PP -References cache. +References cache, and ServerConfig::EnumValues(). .PP .nf -944 { -945 return EnumValues(cache, tag.c_str(), index); -946 } +872 { +873 return Config->EnumValues(cache, tag.c_str(), index); +874 } .fi .PP .SS "long ConfigReader::GetError ()" @@ -230,16 +231,16 @@ Returns the last error to occur. .PP Valid errors can be found by looking in \fBmodules.h\fP. Any nonzero value indicates an error condition. A call to \fBGetError()\fP resets the error flag back to 0. .PP -Definition at line 898 of file modules.cpp. +Definition at line 826 of file modules.cpp. .PP References error. .PP .nf -899 { -900 long olderr = this->error; -901 this->error = 0; -902 return olderr; -903 } +827 { +828 long olderr = this->error; +829 this->error = 0; +830 return olderr; +831 } .fi .PP .SS "bool ConfigReader::ReadFlag (\fBstd::string\fP tag, \fBstd::string\fP name, int index)" @@ -248,26 +249,26 @@ Retrieves a boolean value from the config file. .PP This method retrieves a boolean value from the config file. Where multiple copies of the tag exist in the config file, index indicates which of the values to retrieve. The values '1', 'yes' and 'true' in the config file count as true to ReadFlag, and any other value counts as false. .PP -Definition at line 852 of file modules.cpp. +Definition at line 780 of file modules.cpp. .PP -References cache, CONF_VALUE_NOT_FOUND, and error. +References cache, CONF_VALUE_NOT_FOUND, error, and ServerConfig::ReadConf(). .PP .nf -853 { -854 char val[MAXBUF]; -855 char t[MAXBUF]; -856 char n[MAXBUF]; -857 strlcpy(t,tag.c_str(),MAXBUF); -858 strlcpy(n,name.c_str(),MAXBUF); -859 int res = ReadConf(cache,t,n,index,val); -860 if (!res) -861 { -862 this->error = CONF_VALUE_NOT_FOUND; -863 return false; -864 } -865 std::string s = val; -866 return ((s == 'yes') || (s == 'YES') || (s == 'true') || (s == 'TRUE') || (s == '1')); -867 } +781 { +782 char val[MAXBUF]; +783 char t[MAXBUF]; +784 char n[MAXBUF]; +785 strlcpy(t,tag.c_str(),MAXBUF); +786 strlcpy(n,name.c_str(),MAXBUF); +787 int res = Config->ReadConf(cache,t,n,index,val); +788 if (!res) +789 { +790 this->error = CONF_VALUE_NOT_FOUND; +791 return false; +792 } +793 std::string s = val; +794 return ((s == 'yes') || (s == 'YES') || (s == 'true') || (s == 'TRUE') || (s == '1')); +795 } .fi .PP .SS "long ConfigReader::ReadInteger (\fBstd::string\fP tag, \fBstd::string\fP name, int index, bool needs_unsigned)" @@ -276,38 +277,38 @@ Retrieves an integer value from the config file. .PP This method retrieves an integer value from the config file. Where multiple copies of the tag exist in the config file, index indicates which of the values to retrieve. Any invalid integer values in the tag will cause the objects error value to be set, and any call to \fBGetError()\fP will return CONF_INVALID_NUMBER to be returned. needs_unsigned is set if the number must be unsigned. If a signed number is placed into a tag which is specified unsigned, 0 will be returned and \fBGetError()\fP will return CONF_NOT_UNSIGNED .PP -Definition at line 869 of file modules.cpp. +Definition at line 797 of file modules.cpp. .PP -References cache, CONF_NOT_A_NUMBER, CONF_NOT_UNSIGNED, CONF_VALUE_NOT_FOUND, and error. +References cache, CONF_NOT_A_NUMBER, CONF_NOT_UNSIGNED, CONF_VALUE_NOT_FOUND, error, and ServerConfig::ReadConf(). .PP .nf -870 { -871 char val[MAXBUF]; -872 char t[MAXBUF]; -873 char n[MAXBUF]; -874 strlcpy(t,tag.c_str(),MAXBUF); -875 strlcpy(n,name.c_str(),MAXBUF); -876 int res = ReadConf(cache,t,n,index,val); -877 if (!res) -878 { -879 this->error = CONF_VALUE_NOT_FOUND; -880 return 0; -881 } -882 for (unsigned int i = 0; i < strlen(val); i++) -883 { -884 if (!isdigit(val[i])) -885 { -886 this->error = CONF_NOT_A_NUMBER; -887 return 0; -888 } -889 } -890 if ((needs_unsigned) && (atoi(val)<0)) -891 { -892 this->error = CONF_NOT_UNSIGNED; -893 return 0; -894 } -895 return atoi(val); -896 } +798 { +799 char val[MAXBUF]; +800 char t[MAXBUF]; +801 char n[MAXBUF]; +802 strlcpy(t,tag.c_str(),MAXBUF); +803 strlcpy(n,name.c_str(),MAXBUF); +804 int res = Config->ReadConf(cache,t,n,index,val); +805 if (!res) +806 { +807 this->error = CONF_VALUE_NOT_FOUND; +808 return 0; +809 } +810 for (unsigned int i = 0; i < strlen(val); i++) +811 { +812 if (!isdigit(val[i])) +813 { +814 this->error = CONF_NOT_A_NUMBER; +815 return 0; +816 } +817 } +818 if ((needs_unsigned) && (atoi(val)<0)) +819 { +820 this->error = CONF_NOT_UNSIGNED; +821 return 0; +822 } +823 return atoi(val); +824 } .fi .PP .SS "\fBstd::string\fP ConfigReader::ReadValue (\fBstd::string\fP tag, \fBstd::string\fP name, int index)" @@ -316,25 +317,25 @@ Retrieves a value from the config file. .PP 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. .PP -Definition at line 836 of file modules.cpp. +Definition at line 764 of file modules.cpp. .PP -References cache, CONF_VALUE_NOT_FOUND, and error. +References cache, CONF_VALUE_NOT_FOUND, error, and ServerConfig::ReadConf(). .PP .nf -837 { -838 char val[MAXBUF]; -839 char t[MAXBUF]; -840 char n[MAXBUF]; -841 strlcpy(t,tag.c_str(),MAXBUF); -842 strlcpy(n,name.c_str(),MAXBUF); -843 int res = ReadConf(cache,t,n,index,val); -844 if (!res) -845 { -846 this->error = CONF_VALUE_NOT_FOUND; -847 return ''; -848 } -849 return val; -850 } +765 { +766 char val[MAXBUF]; +767 char t[MAXBUF]; +768 char n[MAXBUF]; +769 strlcpy(t,tag.c_str(),MAXBUF); +770 strlcpy(n,name.c_str(),MAXBUF); +771 int res = Config->ReadConf(cache,t,n,index,val); +772 if (!res) +773 { +774 this->error = CONF_VALUE_NOT_FOUND; +775 return ''; +776 } +777 return val; +778 } .fi .PP .SS "bool ConfigReader::Verify ()" @@ -343,14 +344,14 @@ Returns true if a config file is valid. .PP This method is partially implemented and will only return false if the config file does not exist or could not be opened. .PP -Definition at line 948 of file modules.cpp. +Definition at line 876 of file modules.cpp. .PP References readerror. .PP .nf -949 { -950 return this->readerror; -951 } +877 { +878 return this->readerror; +879 } .fi .PP .SH "Member Data Documentation" @@ -361,24 +362,24 @@ The contents of the configuration file This protected member should never be acc .PP It will contain a pointer to the configuration file data with unneeded data (such as comments) stripped from it. .PP -Definition at line 1518 of file modules.h. +Definition at line 1533 of file modules.h. .PP Referenced by ConfigReader(), Enumerate(), EnumerateValues(), ReadFlag(), ReadInteger(), ReadValue(), and ~ConfigReader(). .SS "long \fBConfigReader::error\fP\fC [protected]\fP" .PP -Definition at line 1523 of file modules.h. +Definition at line 1538 of file modules.h. .PP Referenced by ConfigReader(), GetError(), ReadFlag(), ReadInteger(), and ReadValue(). .SS "std::stringstream* \fBConfigReader::errorlog\fP\fC [protected]\fP" .PP -Definition at line 1519 of file modules.h. +Definition at line 1534 of file modules.h. .PP Referenced by ConfigReader(), DumpErrors(), and ~ConfigReader(). .SS "bool \fBConfigReader::readerror\fP\fC [protected]\fP" .PP Used to store errors. .PP -Definition at line 1522 of file modules.h. +Definition at line 1537 of file modules.h. .PP Referenced by ConfigReader(), and Verify(). diff --git a/docs/man/man3/ConnectClass.3 b/docs/man/man3/ConnectClass.3 index ae23d9973..f4c5bbab4 100644 --- a/docs/man/man3/ConnectClass.3 +++ b/docs/man/man3/ConnectClass.3 @@ -1,4 +1,4 @@ -.TH "ConnectClass" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ConnectClass" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/DNS.3 b/docs/man/man3/DNS.3 index d88cb6f54..20f26f893 100644 --- a/docs/man/man3/DNS.3 +++ b/docs/man/man3/DNS.3 @@ -1,4 +1,4 @@ -.TH "DNS" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "DNS" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ELine.3 b/docs/man/man3/ELine.3 index 7152c62e3..2ecbb46ac 100644 --- a/docs/man/man3/ELine.3 +++ b/docs/man/man3/ELine.3 @@ -1,4 +1,4 @@ -.TH "ELine" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ELine" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -20,14 +20,14 @@ Inherits \fBXLine\fP. .in -1c .SH "Detailed Description" .PP -Definition at line 82 of file xline.h. +Definition at line 87 of file xline.h. .SH "Member Data Documentation" .PP .SS "char \fBELine::hostmask\fP[200]" .PP Hostmask (ident) to match against May contain wildcards. .PP -Definition at line 88 of file xline.h. +Definition at line 93 of file xline.h. .SH "Author" .PP diff --git a/docs/man/man3/Event.3 b/docs/man/man3/Event.3 index 45e6444b8..d47289f04 100644 --- a/docs/man/man3/Event.3 +++ b/docs/man/man3/Event.3 @@ -1,4 +1,4 @@ -.TH "Event" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "Event" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -65,10 +65,10 @@ Definition at line 197 of file modules.h. .PP Create a new Event. .PP -Definition at line 275 of file modules.cpp. +Definition at line 202 of file modules.cpp. .PP .nf -275 : data(anydata), source(src), id(eventid) { }; +202 : data(anydata), source(src), id(eventid) { }; .fi .PP .SH "Member Function Documentation" @@ -77,14 +77,14 @@ Definition at line 275 of file modules.cpp. .PP Get the Event data. .PP -Definition at line 277 of file modules.cpp. +Definition at line 204 of file modules.cpp. .PP References data. .PP .nf -278 { -279 return this->data; -280 } +205 { +206 return this->data; +207 } .fi .PP .SS "\fBstd::string\fP Event::GetEventID ()" @@ -93,28 +93,28 @@ Get the event ID. .PP Use this to determine the event type for safe casting of the data .PP -Definition at line 293 of file modules.cpp. +Definition at line 220 of file modules.cpp. .PP References id. .PP .nf -294 { -295 return this->id; -296 } +221 { +222 return this->id; +223 } .fi .PP .SS "\fBModule\fP * Event::GetSource ()" .PP Get the event Source. .PP -Definition at line 282 of file modules.cpp. +Definition at line 209 of file modules.cpp. .PP References source. .PP .nf -283 { -284 return this->source; -285 } +210 { +211 return this->source; +212 } .fi .PP .SS "char * Event::Send ()\fC [virtual]\fP" @@ -125,15 +125,15 @@ The return result of an \fBEvent::Send()\fP will always be NULL as no replies ar .PP Implements \fBModuleMessage\fP. .PP -Definition at line 287 of file modules.cpp. +Definition at line 214 of file modules.cpp. .PP References FOREACH_MOD. .PP .nf -288 { -289 FOREACH_MOD OnEvent(this); -290 return NULL; -291 } +215 { +216 FOREACH_MOD OnEvent(this); +217 return NULL; +218 } .fi .PP .SH "Member Data Documentation" diff --git a/docs/man/man3/ExemptItem.3 b/docs/man/man3/ExemptItem.3 index 75486b5a5..2420d3566 100644 --- a/docs/man/man3/ExemptItem.3 +++ b/docs/man/man3/ExemptItem.3 @@ -1,4 +1,4 @@ -.TH "ExemptItem" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ExemptItem" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ExtMode.3 b/docs/man/man3/ExtMode.3 index 367d3557d..3769c5758 100644 --- a/docs/man/man3/ExtMode.3 +++ b/docs/man/man3/ExtMode.3 @@ -1,11 +1,15 @@ -.TH "ExtMode" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ExtMode" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME -ExtMode \- +ExtMode \- Holds an extended mode's details. + +.PP .SH SYNOPSIS .br .PP +\fC#include <modules.h>\fP +.PP Inherits \fBclassbase\fP. .PP .SS "Public Member Functions" @@ -39,37 +43,41 @@ Inherits \fBclassbase\fP. .in -1c .SH "Detailed Description" .PP -Definition at line 133 of file modules.cpp. +Holds an extended mode's details. + +Used internally by \fBmodules.cpp\fP +.PP +Definition at line 236 of file modules.h. .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 142 of file modules.cpp. +Definition at line 245 of file modules.h. .PP .nf -142 : modechar(mc), type(ty), needsoper(oper), params_when_on(p_on), params_when_off(p_off) { }; +245 : modechar(mc), type(ty), needsoper(oper), params_when_on(p_on), params_when_off(p_off) { }; .fi .PP .SH "Member Data Documentation" .PP .SS "bool \fBExtMode::list\fP" .PP -Definition at line 141 of file modules.cpp. +Definition at line 244 of file modules.h. .SS "char \fBExtMode::modechar\fP" .PP -Definition at line 136 of file modules.cpp. +Definition at line 239 of file modules.h. .SS "bool \fBExtMode::needsoper\fP" .PP -Definition at line 138 of file modules.cpp. +Definition at line 241 of file modules.h. .SS "int \fBExtMode::params_when_off\fP" .PP -Definition at line 140 of file modules.cpp. +Definition at line 243 of file modules.h. .SS "int \fBExtMode::params_when_on\fP" .PP -Definition at line 139 of file modules.cpp. +Definition at line 242 of file modules.h. .SS "int \fBExtMode::type\fP" .PP -Definition at line 137 of file modules.cpp. +Definition at line 240 of file modules.h. .SH "Author" .PP diff --git a/docs/man/man3/Extensible.3 b/docs/man/man3/Extensible.3 index 4cdb11d5d..6ec3819c7 100644 --- a/docs/man/man3/Extensible.3 +++ b/docs/man/man3/Extensible.3 @@ -1,4 +1,4 @@ -.TH "Extensible" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "Extensible" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -30,7 +30,7 @@ Inherited by \fBchanrec\fP, \fBcommand_t\fP, and \fBconnection\fP. .br .RI "\fIGet an extension item. \fP" .ti -1c -.RI "void \fBGetExtList\fP (std::deque< \fBstd::string\fP > &\fBlist\fP)" +.RI "void \fBGetExtList\fP (std::deque< \fBstd::string\fP > &list)" .br .RI "\fIGet a list of all extension items names. \fP" .in -1c diff --git a/docs/man/man3/FileReader.3 b/docs/man/man3/FileReader.3 index bf779fb9e..05fbaae25 100644 --- a/docs/man/man3/FileReader.3 +++ b/docs/man/man3/FileReader.3 @@ -1,4 +1,4 @@ -.TH "FileReader" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "FileReader" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -57,7 +57,7 @@ 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 1599 of file modules.h. +Definition at line 1614 of file modules.h. .SH "Constructor & Destructor Documentation" .PP .SS "FileReader::FileReader ()" @@ -66,11 +66,11 @@ Default constructor. .PP This method does not load any file into memory, you must use the LoadFile method after constructing the class this way. .PP -Definition at line 961 of file modules.cpp. +Definition at line 889 of file modules.cpp. .PP .nf -962 { -963 } +890 { +891 } .fi .PP .SS "FileReader::FileReader (\fBstd::string\fP filename)" @@ -79,16 +79,16 @@ Secondary constructor. .PP 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. .PP -Definition at line 954 of file modules.cpp. +Definition at line 882 of file modules.cpp. .PP References fc. .PP .nf -955 { -956 file_cache c; -957 readfile(c,filename.c_str()); -958 this->fc = c; -959 } +883 { +884 file_cache c; +885 readfile(c,filename.c_str()); +886 this->fc = c; +887 } .fi .PP .SS "FileReader::~FileReader ()" @@ -97,11 +97,11 @@ Default destructor. .PP This deletes the memory allocated to the file. .PP -Definition at line 973 of file modules.cpp. +Definition at line 901 of file modules.cpp. .PP .nf -974 { -975 } +902 { +903 } .fi .PP .SH "Member Function Documentation" @@ -110,21 +110,21 @@ Definition at line 973 of file modules.cpp. .PP Returns true if the file exists This function will return false if the file could not be opened. .PP -Definition at line 977 of file modules.cpp. +Definition at line 905 of file modules.cpp. .PP References fc. .PP .nf -978 { -979 if (fc.size() == 0) -980 { -981 return(false); -982 } -983 else -984 { -985 return(true); -986 } -987 } +906 { +907 if (fc.size() == 0) +908 { +909 return(false); +910 } +911 else +912 { +913 return(true); +914 } +915 } .fi .PP .SS "int FileReader::FileSize ()" @@ -133,14 +133,14 @@ Returns the size of the file in lines. .PP 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. .PP -Definition at line 996 of file modules.cpp. +Definition at line 924 of file modules.cpp. .PP References fc. .PP .nf -997 { -998 return fc.size(); -999 } +925 { +926 return fc.size(); +927 } .fi .PP .SS "\fBstd::string\fP FileReader::GetLine (int x)" @@ -149,16 +149,16 @@ Retrieve one line from the file. .PP 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. .PP -Definition at line 989 of file modules.cpp. +Definition at line 917 of file modules.cpp. .PP References fc. .PP .nf -990 { -991 if ((x<0) || ((unsigned)x>fc.size())) -992 return ''; -993 return fc[x]; -994 } +918 { +919 if ((x<0) || ((unsigned)x>fc.size())) +920 return ''; +921 return fc[x]; +922 } .fi .PP .SS "void FileReader::LoadFile (\fBstd::string\fP filename)" @@ -167,23 +167,23 @@ Used to load a file. .PP 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. .PP -Definition at line 965 of file modules.cpp. +Definition at line 893 of file modules.cpp. .PP References fc. .PP .nf -966 { -967 file_cache c; -968 readfile(c,filename.c_str()); -969 this->fc = c; -970 } +894 { +895 file_cache c; +896 readfile(c,filename.c_str()); +897 this->fc = c; +898 } .fi .PP .SH "Member Data Documentation" .PP .SS "\fBfile_cache\fP \fBFileReader::fc\fP\fC [private]\fP" .PP -Definition at line 1601 of file modules.h. +Definition at line 1616 of file modules.h. .PP Referenced by Exists(), FileReader(), FileSize(), GetLine(), and LoadFile(). diff --git a/docs/man/man3/GLine.3 b/docs/man/man3/GLine.3 index 039de05ee..ce80b2e36 100644 --- a/docs/man/man3/GLine.3 +++ b/docs/man/man3/GLine.3 @@ -1,4 +1,4 @@ -.TH "GLine" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "GLine" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -24,14 +24,14 @@ Inherits \fBXLine\fP. .PP GLine class. .PP -Definition at line 73 of file xline.h. +Definition at line 78 of file xline.h. .SH "Member Data Documentation" .PP .SS "char \fBGLine::hostmask\fP[200]" .PP Hostmask (ident) to match against May contain wildcards. .PP -Definition at line 79 of file xline.h. +Definition at line 84 of file xline.h. .SH "Author" .PP diff --git a/docs/man/man3/HostItem.3 b/docs/man/man3/HostItem.3 index 9adfeb7d4..0862d378e 100644 --- a/docs/man/man3/HostItem.3 +++ b/docs/man/man3/HostItem.3 @@ -1,4 +1,4 @@ -.TH "HostItem" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "HostItem" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/InspSocket.3 b/docs/man/man3/InspSocket.3 index 63f2475d6..fc39dc8e6 100644 --- a/docs/man/man3/InspSocket.3 +++ b/docs/man/man3/InspSocket.3 @@ -1,4 +1,4 @@ -.TH "InspSocket" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "InspSocket" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -163,14 +163,14 @@ Definition at line 47 of file socket.h. .PP The default constructor does nothing and should not be used. .PP -Definition at line 49 of file socket.cpp. +Definition at line 48 of file socket.cpp. .PP References I_DISCONNECTED, and state. .PP .nf -50 { -51 this->state = I_DISCONNECTED; -52 } +49 { +50 this->state = I_DISCONNECTED; +51 } .fi .PP .SS "InspSocket::InspSocket (int newfd, char * ip)" @@ -179,16 +179,17 @@ This constructor is used to associate an existing connecting with an InspSocket .PP The given file descriptor must be valid, and when initialized, the InspSocket will be set with the given IP address and placed in CONNECTED state. .PP -Definition at line 54 of file socket.cpp. +Definition at line 53 of file socket.cpp. .PP References SocketEngine::AddFd(), fd, I_CONNECTED, IP, state, and X_ESTAB_MODULE. .PP .nf -55 { -56 this->fd = newfd; -57 this->state = I_CONNECTED; -58 this->IP = ip; -59 SE->AddFd(this->fd,true,X_ESTAB_MODULE); +54 { +55 this->fd = newfd; +56 this->state = I_CONNECTED; +57 this->IP = ip; +58 SE->AddFd(this->fd,true,X_ESTAB_MODULE); +59 socket_ref[this->fd] = this; 60 } .fi .PP @@ -211,7 +212,7 @@ This constructor is used to create a new socket, either listening for connection .PP Definition at line 62 of file socket.cpp. .PP -References SocketEngine::AddFd(), addr, addy, Close(), DEBUG, fd, I_CONNECTING, I_ERR_BIND, I_ERR_CONNECT, I_ERR_SOCKET, I_ERROR, I_LISTENING, IP, OnError(), state, timeout, timeout_end, and X_ESTAB_MODULE. +References SocketEngine::AddFd(), addr, addy, BindSocket(), Close(), DEBUG, fd, I_CONNECTING, I_ERR_BIND, I_ERR_CONNECT, I_ERR_SOCKET, I_ERROR, I_LISTENING, IP, OnError(), OpenTCPSocket(), state, timeout, timeout_end, and X_ESTAB_MODULE. .PP .nf 63 { @@ -239,70 +240,72 @@ References SocketEngine::AddFd(), addr, addy, Close(), DEBUG, fd, I_CONNECTING, 85 { 86 this->state = I_LISTENING; 87 SE->AddFd(this->fd,true,X_ESTAB_MODULE); -88 log(DEBUG,'New socket now in I_LISTENING state'); -89 return; -90 } -91 } -92 } else { -93 char* ip; -94 this->host = host; -95 hostent* hoste = gethostbyname(host.c_str()); -96 if (!hoste) { -97 ip = (char*)host.c_str(); -98 } else { -99 struct in_addr* ia = (in_addr*)hoste->h_addr; -100 ip = inet_ntoa(*ia); -101 } -102 -103 this->IP = ip; -104 -105 timeout_end = time(NULL)+maxtime; -106 timeout = false; -107 if ((this->fd = socket(AF_INET, SOCK_STREAM, 0)) == -1) -108 { -109 this->state = I_ERROR; -110 this->OnError(I_ERR_SOCKET); -111 return; -112 } -113 this->port = port; -114 inet_aton(ip,&addy); -115 addr.sin_family = AF_INET; -116 addr.sin_addr = addy; -117 addr.sin_port = htons(this->port); -118 -119 int flags; -120 flags = fcntl(this->fd, F_GETFL, 0); -121 fcntl(this->fd, F_SETFL, flags | O_NONBLOCK); -122 -123 if(connect(this->fd, (sockaddr*)&this->addr,sizeof(this->addr)) == -1) -124 { -125 if (errno != EINPROGRESS) -126 { -127 this->Close(); -128 this->OnError(I_ERR_CONNECT); -129 this->state = I_ERROR; -130 return; -131 } -132 } -133 this->state = I_CONNECTING; -134 SE->AddFd(this->fd,false,X_ESTAB_MODULE); -135 return; -136 } -137 } +88 socket_ref[this->fd] = this; +89 log(DEBUG,'New socket now in I_LISTENING state'); +90 return; +91 } +92 } +93 } else { +94 char* ip; +95 this->host = host; +96 hostent* hoste = gethostbyname(host.c_str()); +97 if (!hoste) { +98 ip = (char*)host.c_str(); +99 } else { +100 struct in_addr* ia = (in_addr*)hoste->h_addr; +101 ip = inet_ntoa(*ia); +102 } +103 +104 this->IP = ip; +105 +106 timeout_end = time(NULL)+maxtime; +107 timeout = false; +108 if ((this->fd = socket(AF_INET, SOCK_STREAM, 0)) == -1) +109 { +110 this->state = I_ERROR; +111 this->OnError(I_ERR_SOCKET); +112 return; +113 } +114 this->port = port; +115 inet_aton(ip,&addy); +116 addr.sin_family = AF_INET; +117 addr.sin_addr = addy; +118 addr.sin_port = htons(this->port); +119 +120 int flags; +121 flags = fcntl(this->fd, F_GETFL, 0); +122 fcntl(this->fd, F_SETFL, flags | O_NONBLOCK); +123 +124 if(connect(this->fd, (sockaddr*)&this->addr,sizeof(this->addr)) == -1) +125 { +126 if (errno != EINPROGRESS) +127 { +128 this->Close(); +129 this->OnError(I_ERR_CONNECT); +130 this->state = I_ERROR; +131 return; +132 } +133 } +134 this->state = I_CONNECTING; +135 SE->AddFd(this->fd,false,X_ESTAB_MODULE); +136 socket_ref[this->fd] = this; +137 return; +138 } +139 } .fi .PP .SS "InspSocket::~InspSocket ()\fC [virtual]\fP" .PP The destructor may implicitly call \fBOnClose()\fP, and will close() and shutdown() the file descriptor used for this socket. .PP -Definition at line 269 of file socket.cpp. +Definition at line 272 of file socket.cpp. .PP References Close(). .PP .nf -270 { -271 this->Close(); -272 } +273 { +274 this->Close(); +275 } .fi .PP .SH "Member Function Documentation" @@ -311,64 +314,65 @@ References Close(). .PP This method causes the socket to close, and may also be triggered by other methods such as OnTimeout and OnError. .PP -Definition at line 139 of file socket.cpp. +Definition at line 141 of file socket.cpp. .PP References fd, and OnClose(). .PP Referenced by InspSocket(), and ~InspSocket(). .PP .nf -140 { -141 if (this->fd != -1) -142 { -143 this->OnClose(); -144 shutdown(this->fd,2); -145 close(this->fd); -146 this->fd = -1; -147 } -148 } +142 { +143 if (this->fd != -1) +144 { +145 this->OnClose(); +146 shutdown(this->fd,2); +147 close(this->fd); +148 socket_ref[this->fd] = NULL; +149 this->fd = -1; +150 } +151 } .fi .PP .SS "int InspSocket::GetFd ()" .PP This method returns the socket's file descriptor as assigned by the operating system, or -1 if no descriptor has been assigned. .PP -Definition at line 256 of file socket.cpp. +Definition at line 259 of file socket.cpp. .PP References fd. .PP .nf -257 { -258 return this->fd; -259 } +260 { +261 return this->fd; +262 } .fi .PP .SS "\fBstd::string\fP InspSocket::GetIP ()" .PP Returns the IP address associated with this connection, or an empty string if no IP address exists. .PP -Definition at line 150 of file socket.cpp. +Definition at line 153 of file socket.cpp. .PP References IP. .PP .nf -151 { -152 return this->IP; -153 } +154 { +155 return this->IP; +156 } .fi .PP .SS "\fBInspSocketState\fP InspSocket::GetState ()" .PP Returns the current socket state. .PP -Definition at line 251 of file socket.cpp. +Definition at line 254 of file socket.cpp. .PP References state. .PP .nf -252 { -253 return this->state; -254 } +255 { +256 return this->state; +257 } .fi .PP .SS "void InspSocket::OnClose ()\fC [virtual]\fP" @@ -377,12 +381,12 @@ Whenever close() is called, \fBOnClose()\fP will be called first. .PP Please note that this means OnClose will be called alongside \fBOnError()\fP, \fBOnTimeout()\fP, and \fBClose()\fP, and also when cancelling a listening socket by calling the destructor indirectly. .PP -Definition at line 267 of file socket.cpp. +Definition at line 270 of file socket.cpp. .PP Referenced by Close(). .PP .nf -267 { return; } +270 { return; } .fi .PP .SS "bool InspSocket::OnConnected ()\fC [virtual]\fP" @@ -396,12 +400,12 @@ false to abort the connection, true to continue .PP .PP -Definition at line 261 of file socket.cpp. +Definition at line 264 of file socket.cpp. .PP Referenced by Poll(). .PP .nf -261 { return true; } +264 { return true; } .fi .PP .SS "bool InspSocket::OnDataReady ()\fC [virtual]\fP" @@ -417,22 +421,22 @@ false to close the socket .PP .PP -Definition at line 265 of file socket.cpp. +Definition at line 268 of file socket.cpp. .PP Referenced by Poll(). .PP .nf -265 { return true; } +268 { return true; } .fi .PP .SS "int InspSocket::OnDisconnect ()\fC [virtual]\fP" .PP When an established connection is terminated, the OnDisconnect method is triggered. .PP -Definition at line 263 of file socket.cpp. +Definition at line 266 of file socket.cpp. .PP .nf -263 { return 0; } +266 { return 0; } .fi .PP .SS "void InspSocket::OnError (\fBInspSocketError\fP e)\fC [virtual]\fP" @@ -448,12 +452,12 @@ A closed socket in itself is not an error, however errors also generate close ev .PP .PP -Definition at line 262 of file socket.cpp. +Definition at line 265 of file socket.cpp. .PP Referenced by InspSocket(), and Timeout(). .PP .nf -262 { return; } +265 { return; } .fi .PP .SS "int InspSocket::OnIncomingConnection (int newfd, char * ip)\fC [virtual]\fP" @@ -466,12 +470,12 @@ MySocket* newsocket = new MySocket(newfd,ip); .PP Once you have done this, you can then associate the new socket with the core using \fBServer::AddSocket()\fP. .PP -Definition at line 264 of file socket.cpp. +Definition at line 267 of file socket.cpp. .PP Referenced by Poll(). .PP .nf -264 { return 0; } +267 { return 0; } .fi .PP .SS "void InspSocket::OnTimeout ()\fC [virtual]\fP" @@ -480,12 +484,12 @@ When an outbound connection fails, and the attempt times out, you will receive t .PP The mthod will trigger once maxtime secons are reached (as given in the constructor) just before the socket's descriptor is closed. .PP -Definition at line 266 of file socket.cpp. +Definition at line 269 of file socket.cpp. .PP Referenced by Timeout(). .PP .nf -266 { return; } +269 { return; } .fi .PP .SS "bool InspSocket::Poll ()" @@ -494,64 +498,64 @@ Only the core should call this function. .PP When called, it is assumed the socket is ready to read data, and the method call routes the event to the various methods of InspSocket for you to handle. This can also cause the socket's state to change. .PP -Definition at line 214 of file socket.cpp. +Definition at line 217 of file socket.cpp. .PP References SocketEngine::AddFd(), client, SocketEngine::DelFd(), I_CONNECTED, I_CONNECTING, I_LISTENING, length, OnConnected(), OnDataReady(), OnIncomingConnection(), SetState(), and X_ESTAB_MODULE. .PP .nf -215 { -216 int incoming = -1; -217 -218 switch (this->state) -219 { -220 case I_CONNECTING: -221 this->SetState(I_CONNECTED); -222 /* Our socket was in write-state, so delete it and re-add it -223 * in read-state. -224 */ -225 SE->DelFd(this->fd); -226 SE->AddFd(this->fd,true,X_ESTAB_MODULE); -227 return this->OnConnected(); -228 break; -229 case I_LISTENING: -230 length = sizeof (client); -231 incoming = accept (this->fd, (sockaddr*)&client,&length); -232 this->OnIncomingConnection(incoming,inet_ntoa(client.sin_addr)); -233 return true; -234 break; -235 case I_CONNECTED: -236 return this->OnDataReady(); +218 { +219 int incoming = -1; +220 +221 switch (this->state) +222 { +223 case I_CONNECTING: +224 this->SetState(I_CONNECTED); +225 /* Our socket was in write-state, so delete it and re-add it +226 * in read-state. +227 */ +228 SE->DelFd(this->fd); +229 SE->AddFd(this->fd,true,X_ESTAB_MODULE); +230 return this->OnConnected(); +231 break; +232 case I_LISTENING: +233 length = sizeof (client); +234 incoming = accept (this->fd, (sockaddr*)&client,&length); +235 this->OnIncomingConnection(incoming,inet_ntoa(client.sin_addr)); +236 return true; 237 break; -238 default: -239 break; -240 } -241 -242 return true; -243 } +238 case I_CONNECTED: +239 return this->OnDataReady(); +240 break; +241 default: +242 break; +243 } +244 +245 return true; +246 } .fi .PP .SS "char * InspSocket::Read ()\fC [virtual]\fP" .PP Reads all pending bytes from the socket into a char* array which can be up to 16 kilobytes in length. .PP -Definition at line 155 of file socket.cpp. +Definition at line 158 of file socket.cpp. .PP References DEBUG, and ibuf. .PP .nf -156 { -157 int n = recv(this->fd,this->ibuf,sizeof(this->ibuf),0); -158 if (n > 0) -159 { -160 ibuf[n] = 0; -161 return ibuf; -162 } -163 else -164 { -165 log(DEBUG,'EOF or error on socket'); -166 return NULL; -167 } -168 } +159 { +160 int n = recv(this->fd,this->ibuf,sizeof(this->ibuf),0); +161 if (n > 0) +162 { +163 ibuf[n] = 0; +164 return ibuf; +165 } +166 else +167 { +168 log(DEBUG,'EOF or error on socket'); +169 return NULL; +170 } +171 } .fi .PP .SS "void InspSocket::SetState (\fBInspSocketState\fP s)" @@ -560,17 +564,17 @@ Changes the socket's state. .PP The core uses this to change socket states, and you should not call it directly. .PP -Definition at line 245 of file socket.cpp. +Definition at line 248 of file socket.cpp. .PP References DEBUG, and state. .PP Referenced by Poll(). .PP .nf -246 { -247 log(DEBUG,'Socket state change'); -248 this->state = s; -249 } +249 { +250 log(DEBUG,'Socket state change'); +251 this->state = s; +252 } .fi .PP .SS "bool InspSocket::Timeout (time_t current)" @@ -584,26 +588,26 @@ true if timed out, false if not timed out .PP .PP -Definition at line 197 of file socket.cpp. +Definition at line 200 of file socket.cpp. .PP References I_CONNECTING, I_ERR_TIMEOUT, I_ERROR, OnError(), OnTimeout(), state, timeout, and timeout_end. .PP .nf -198 { -199 if ((this->state == I_CONNECTING) && (current > timeout_end)) -200 { -201 // for non-listening sockets, the timeout can occur -202 // which causes termination of the connection after -203 // the given number of seconds without a successful -204 // connection. -205 this->OnTimeout(); -206 this->OnError(I_ERR_TIMEOUT); -207 timeout = true; -208 this->state = I_ERROR; -209 return true; -210 } -211 return false; -212 } +201 { +202 if ((this->state == I_CONNECTING) && (current > timeout_end)) +203 { +204 // for non-listening sockets, the timeout can occur +205 // which causes termination of the connection after +206 // the given number of seconds without a successful +207 // connection. +208 this->OnTimeout(); +209 this->OnError(I_ERR_TIMEOUT); +210 timeout = true; +211 this->state = I_ERROR; +212 return true; +213 } +214 return false; +215 } .fi .PP .SS "int InspSocket::Write (\fBstd::string\fP data)\fC [virtual]\fP" @@ -619,30 +623,30 @@ No carriage returns or linefeeds are appended to the string. .PP .PP -Definition at line 174 of file socket.cpp. +Definition at line 177 of file socket.cpp. .PP .nf -175 { -176 char* d = (char*)data.c_str(); -177 unsigned int written = 0; -178 int n = 0; -179 int s = data.length(); -180 while ((written < data.length()) && (n >= 0)) -181 { -182 n = send(this->fd,d,s,0); -183 if (n > 0) -184 { -185 // If we didnt write everything, advance -186 // the pointers so that when we retry -187 // the next time around the loop, we try -188 // to write what we failed to write before. -189 written += n; -190 s -= n; -191 d += n; -192 } -193 } -194 return written; -195 } +178 { +179 char* d = (char*)data.c_str(); +180 unsigned int written = 0; +181 int n = 0; +182 int s = data.length(); +183 while ((written < data.length()) && (n >= 0)) +184 { +185 n = send(this->fd,d,s,0); +186 if (n > 0) +187 { +188 // If we didnt write everything, advance +189 // the pointers so that when we retry +190 // the next time around the loop, we try +191 // to write what we failed to write before. +192 written += n; +193 s -= n; +194 d += n; +195 } +196 } +197 return written; +198 } .fi .PP .SH "Member Data Documentation" diff --git a/docs/man/man3/InviteItem.3 b/docs/man/man3/InviteItem.3 index 62fb66d89..618052d99 100644 --- a/docs/man/man3/InviteItem.3 +++ b/docs/man/man3/InviteItem.3 @@ -1,4 +1,4 @@ -.TH "InviteItem" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "InviteItem" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/Invited.3 b/docs/man/man3/Invited.3 index 0fbdee50c..b30256956 100644 --- a/docs/man/man3/Invited.3 +++ b/docs/man/man3/Invited.3 @@ -1,4 +1,4 @@ -.TH "Invited" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "Invited" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/KLine.3 b/docs/man/man3/KLine.3 index 823119cc2..f05160828 100644 --- a/docs/man/man3/KLine.3 +++ b/docs/man/man3/KLine.3 @@ -1,4 +1,4 @@ -.TH "KLine" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "KLine" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -24,14 +24,14 @@ Inherits \fBXLine\fP. .PP KLine class. .PP -Definition at line 62 of file xline.h. +Definition at line 67 of file xline.h. .SH "Member Data Documentation" .PP .SS "char \fBKLine::hostmask\fP[200]" .PP Hostmask (ident) to match against May contain wildcards. .PP -Definition at line 68 of file xline.h. +Definition at line 73 of file xline.h. .SH "Author" .PP diff --git a/docs/man/man3/ModeParameter.3 b/docs/man/man3/ModeParameter.3 index 4a9e1d33e..75add436a 100644 --- a/docs/man/man3/ModeParameter.3 +++ b/docs/man/man3/ModeParameter.3 @@ -1,4 +1,4 @@ -.TH "ModeParameter" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ModeParameter" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/Module.3 b/docs/man/man3/Module.3 index 11af088cb..5dea65737 100644 --- a/docs/man/man3/Module.3 +++ b/docs/man/man3/Module.3 @@ -1,4 +1,4 @@ -.TH "Module" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "Module" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -340,7 +340,7 @@ Base class for all InspIRCd modules This class is the base class for InspIRCd mo 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 239 of file modules.h. +Definition at line 254 of file modules.h. .SH "Constructor & Destructor Documentation" .PP .SS "Module::Module (\fBServer\fP * Me)" @@ -354,20 +354,20 @@ Default constructor Creates a module class. .PP .PP -Definition at line 301 of file modules.cpp. +Definition at line 228 of file modules.cpp. .PP .nf -301 { } +228 { } .fi .PP .SS "Module::~Module ()\fC [virtual]\fP" .PP Default destructor destroys a module class. .PP -Definition at line 302 of file modules.cpp. +Definition at line 229 of file modules.cpp. .PP .nf -302 { } +229 { } .fi .PP .SH "Member Function Documentation" @@ -378,12 +378,12 @@ Returns the version number of a Module. .PP The method should return a \fBVersion\fP object with its version information assigned via \fBVersion::Version\fP .PP -Definition at line 313 of file modules.cpp. +Definition at line 240 of file modules.cpp. .PP References VF_VENDOR. .PP .nf -313 { return Version(1,0,0,0,VF_VENDOR); } +240 { return Version(1,0,0,0,VF_VENDOR); } .fi .PP .SS "void Module::On005Numeric (\fBstd::string\fP & output)\fC [virtual]\fP" @@ -399,10 +399,10 @@ The module should modify the 005 numeric if needed to indicate its features. .PP .PP -Definition at line 323 of file modules.cpp. +Definition at line 250 of file modules.cpp. .PP .nf -323 { }; +250 { }; .fi .PP .SS "int Module::OnAccessCheck (\fBuserrec\fP * source, \fBuserrec\fP * dest, \fBchanrec\fP * channel, int access_type)\fC [virtual]\fP" @@ -446,12 +446,12 @@ This function is called before many functions which check a users status on a ch .PP .PP -Definition at line 322 of file modules.cpp. +Definition at line 249 of file modules.cpp. .PP References ACR_DEFAULT. .PP .nf -322 { return ACR_DEFAULT; }; +249 { return ACR_DEFAULT; }; .fi .PP .SS "int Module::OnAddBan (\fBuserrec\fP * source, \fBchanrec\fP * channel, \fBstd::string\fP banmask)\fC [virtual]\fP" @@ -476,10 +476,10 @@ Return a non-zero value to 'eat' the mode change and prevent the ban from being .PP .PP -Definition at line 348 of file modules.cpp. +Definition at line 275 of file modules.cpp. .PP .nf -348 { return 0; }; +275 { return 0; }; .fi .PP .SS "void Module::OnAddELine (long duration, \fBuserrec\fP * source, \fBstd::string\fP reason, \fBstd::string\fP hostmask)\fC [virtual]\fP" @@ -501,10 +501,10 @@ This method is triggered after the line is added. .PP .PP -Definition at line 374 of file modules.cpp. +Definition at line 301 of file modules.cpp. .PP .nf -374 { }; +301 { }; .fi .PP .SS "void Module::OnAddGLine (long duration, \fBuserrec\fP * source, \fBstd::string\fP reason, \fBstd::string\fP hostmask)\fC [virtual]\fP" @@ -526,10 +526,10 @@ This method is triggered after the line is added. .PP .PP -Definition at line 370 of file modules.cpp. +Definition at line 297 of file modules.cpp. .PP .nf -370 { }; +297 { }; .fi .PP .SS "void Module::OnAddKLine (long duration, \fBuserrec\fP * source, \fBstd::string\fP reason, \fBstd::string\fP hostmask)\fC [virtual]\fP" @@ -551,10 +551,10 @@ This method is triggered after the line is added. .PP .PP -Definition at line 372 of file modules.cpp. +Definition at line 299 of file modules.cpp. .PP .nf -372 { }; +299 { }; .fi .PP .SS "void Module::OnAddQLine (long duration, \fBuserrec\fP * source, \fBstd::string\fP reason, \fBstd::string\fP nickmask)\fC [virtual]\fP" @@ -576,10 +576,10 @@ This method is triggered after the line is added. .PP .PP -Definition at line 373 of file modules.cpp. +Definition at line 300 of file modules.cpp. .PP .nf -373 { }; +300 { }; .fi .PP .SS "void Module::OnAddZLine (long duration, \fBuserrec\fP * source, \fBstd::string\fP reason, \fBstd::string\fP ipmask)\fC [virtual]\fP" @@ -601,10 +601,10 @@ This method is triggered after the line is added. .PP .PP -Definition at line 371 of file modules.cpp. +Definition at line 298 of file modules.cpp. .PP .nf -371 { }; +298 { }; .fi .PP .SS "void Module::OnBackgroundTimer (time_t curtime)\fC [virtual]\fP" @@ -620,10 +620,10 @@ This timer can be used to control timed features. Its period is not accurate eno .PP .PP -Definition at line 327 of file modules.cpp. +Definition at line 254 of file modules.cpp. .PP .nf -327 { }; +254 { }; .fi .PP .SS "void Module::OnChangeHost (\fBuserrec\fP * user, \fBstd::string\fP newhost)\fC [virtual]\fP" @@ -641,10 +641,10 @@ This event triggers after the host has been set. .PP .PP -Definition at line 368 of file modules.cpp. +Definition at line 295 of file modules.cpp. .PP .nf -368 { }; +295 { }; .fi .PP .SS "int Module::OnChangeLocalUserGECOS (\fBuserrec\fP * user, \fBstd::string\fP newhost)\fC [virtual]\fP" @@ -667,10 +667,10 @@ return 1 to deny the name change, or 0 to allow it. .PP .PP -Definition at line 341 of file modules.cpp. +Definition at line 268 of file modules.cpp. .PP .nf -341 { return 0; }; +268 { return 0; }; .fi .PP .SS "int Module::OnChangeLocalUserHost (\fBuserrec\fP * user, \fBstd::string\fP newhost)\fC [virtual]\fP" @@ -693,10 +693,10 @@ Return 1 to deny the host change, or 0 to allow it. .PP .PP -Definition at line 340 of file modules.cpp. +Definition at line 267 of file modules.cpp. .PP .nf -340 { return 0; }; +267 { return 0; }; .fi .PP .SS "void Module::OnChangeName (\fBuserrec\fP * user, \fBstd::string\fP gecos)\fC [virtual]\fP" @@ -714,10 +714,10 @@ This event triggers after the name has been set. .PP .PP -Definition at line 369 of file modules.cpp. +Definition at line 296 of file modules.cpp. .PP .nf -369 { }; +296 { }; .fi .PP .SS "int Module::OnCheckBan (\fBuserrec\fP * user, \fBchanrec\fP * chan)\fC [virtual]\fP" @@ -740,10 +740,10 @@ This method will always be called for each join, wether or not the user actually .PP .PP -Definition at line 338 of file modules.cpp. +Definition at line 265 of file modules.cpp. .PP .nf -338 { return 0; }; +265 { return 0; }; .fi .PP .SS "int Module::OnCheckInvite (\fBuserrec\fP * user, \fBchanrec\fP * chan)\fC [virtual]\fP" @@ -766,10 +766,10 @@ This method will always be called for each join, wether or not the channel is ac .PP .PP -Definition at line 335 of file modules.cpp. +Definition at line 262 of file modules.cpp. .PP .nf -335 { return 0; }; +262 { return 0; }; .fi .PP .SS "int Module::OnCheckKey (\fBuserrec\fP * user, \fBchanrec\fP * chan, \fBstd::string\fP keygiven)\fC [virtual]\fP" @@ -792,10 +792,10 @@ This method will always be called for each join, wether or not the channel is ac .PP .PP -Definition at line 336 of file modules.cpp. +Definition at line 263 of file modules.cpp. .PP .nf -336 { return 0; }; +263 { return 0; }; .fi .PP .SS "int Module::OnCheckLimit (\fBuserrec\fP * user, \fBchanrec\fP * chan)\fC [virtual]\fP" @@ -818,10 +818,10 @@ This method will always be called for each join, wether or not the channel is ac .PP .PP -Definition at line 337 of file modules.cpp. +Definition at line 264 of file modules.cpp. .PP .nf -337 { return 0; }; +264 { return 0; }; .fi .PP .SS "bool Module::OnCheckReady (\fBuserrec\fP * user)\fC [virtual]\fP" @@ -842,10 +842,10 @@ true to indicate readiness, false if otherwise .PP .PP -Definition at line 330 of file modules.cpp. +Definition at line 257 of file modules.cpp. .PP .nf -330 { return true; }; +257 { return true; }; .fi .PP .SS "void Module::OnCleanup (int target_type, void * item)\fC [virtual]\fP" @@ -863,10 +863,10 @@ This method is called once for every user and channel on the network, so that wh .PP .PP -Definition at line 380 of file modules.cpp. +Definition at line 307 of file modules.cpp. .PP .nf -380 { }; +307 { }; .fi .PP .SS "void Module::OnDecodeMetaData (int target_type, void * target, \fBstd::string\fP extname, \fBstd::string\fP extdata)\fC [virtual]\fP" @@ -888,10 +888,10 @@ Please see src/modules/m_swhois.cpp for a working example of how to use this met .PP .PP -Definition at line 365 of file modules.cpp. +Definition at line 292 of file modules.cpp. .PP .nf -365 { }; +292 { }; .fi .PP .SS "int Module::OnDelBan (\fBuserrec\fP * source, \fBchanrec\fP * channel, \fBstd::string\fP banmask)\fC [virtual]\fP" @@ -916,10 +916,10 @@ Return a non-zero value to 'eat' the mode change and prevent the ban from being .PP .PP -Definition at line 349 of file modules.cpp. +Definition at line 276 of file modules.cpp. .PP .nf -349 { return 0; }; +276 { return 0; }; .fi .PP .SS "void Module::OnDelELine (\fBuserrec\fP * source, \fBstd::string\fP hostmask)\fC [virtual]\fP" @@ -937,10 +937,10 @@ This method is triggered after the line is deleted. .PP .PP -Definition at line 379 of file modules.cpp. +Definition at line 306 of file modules.cpp. .PP .nf -379 { }; +306 { }; .fi .PP .SS "void Module::OnDelGLine (\fBuserrec\fP * source, \fBstd::string\fP hostmask)\fC [virtual]\fP" @@ -958,10 +958,10 @@ This method is triggered after the line is deleted. .PP .PP -Definition at line 375 of file modules.cpp. +Definition at line 302 of file modules.cpp. .PP .nf -375 { }; +302 { }; .fi .PP .SS "void Module::OnDelKLine (\fBuserrec\fP * source, \fBstd::string\fP hostmask)\fC [virtual]\fP" @@ -979,10 +979,10 @@ This method is triggered after the line is deleted. .PP .PP -Definition at line 377 of file modules.cpp. +Definition at line 304 of file modules.cpp. .PP .nf -377 { }; +304 { }; .fi .PP .SS "void Module::OnDelQLine (\fBuserrec\fP * source, \fBstd::string\fP nickmask)\fC [virtual]\fP" @@ -1000,10 +1000,10 @@ This method is triggered after the line is deleted. .PP .PP -Definition at line 378 of file modules.cpp. +Definition at line 305 of file modules.cpp. .PP .nf -378 { }; +305 { }; .fi .PP .SS "void Module::OnDelZLine (\fBuserrec\fP * source, \fBstd::string\fP ipmask)\fC [virtual]\fP" @@ -1021,10 +1021,10 @@ This method is triggered after the line is deleted. .PP .PP -Definition at line 376 of file modules.cpp. +Definition at line 303 of file modules.cpp. .PP .nf -376 { }; +303 { }; .fi .PP .SS "void Module::OnEvent (\fBEvent\fP * event)\fC [virtual]\fP" @@ -1040,10 +1040,10 @@ Please see the documentation of \fBEvent::Send()\fP for further information. The .PP .PP -Definition at line 343 of file modules.cpp. +Definition at line 270 of file modules.cpp. .PP .nf -343 { return; }; +270 { return; }; .fi .PP .SS "int Module::OnExtendedMode (\fBuserrec\fP * user, void * target, char modechar, int type, bool mode_on, \fBstring_list\fP & params)\fC [virtual]\fP" @@ -1069,10 +1069,10 @@ The type parameter is MT_SERVER, MT_CLIENT or MT_CHANNEL, dependent on where the .PP .PP -Definition at line 311 of file modules.cpp. +Definition at line 238 of file modules.cpp. .PP .nf -311 { return false; } +238 { return false; } .fi .PP .SS "void Module::OnGetServerDescription (\fBstd::string\fP servername, \fBstd::string\fP & description)\fC [virtual]\fP" @@ -1090,10 +1090,10 @@ You may change or define the description given in \fBstd::string\fP &description .PP .PP -Definition at line 359 of file modules.cpp. +Definition at line 286 of file modules.cpp. .PP .nf -359 { }; +286 { }; .fi .PP .SS "void Module::OnGlobalConnect (\fBuserrec\fP * user)\fC [virtual]\fP" @@ -1109,10 +1109,10 @@ This event is informational only. You should not change any user information in .PP .PP -Definition at line 347 of file modules.cpp. +Definition at line 274 of file modules.cpp. .PP .nf -347 { }; +274 { }; .fi .PP .SS "void Module::OnGlobalOper (\fBuserrec\fP * user)\fC [virtual]\fP" @@ -1128,10 +1128,10 @@ You cannot override this and prevent it from happening as it is already happened .PP .PP -Definition at line 346 of file modules.cpp. +Definition at line 273 of file modules.cpp. .PP .nf -346 { }; +273 { }; .fi .PP .SS "void Module::OnInfo (\fBuserrec\fP * user)\fC [virtual]\fP" @@ -1149,10 +1149,10 @@ The userrec will contain the information of the user who typed the command. Modu .PP .PP -Definition at line 315 of file modules.cpp. +Definition at line 242 of file modules.cpp. .PP .nf -315 { }; +242 { }; .fi .PP .SS "int Module::OnKill (\fBuserrec\fP * source, \fBuserrec\fP * dest, \fBstd::string\fP reason)\fC [virtual]\fP" @@ -1177,10 +1177,10 @@ If a client is killed by a server, e.g. a nickname collision or protocol error, .PP .PP -Definition at line 324 of file modules.cpp. +Definition at line 251 of file modules.cpp. .PP .nf -324 { return 0; }; +251 { return 0; }; .fi .PP .SS "void Module::OnLoadModule (\fBModule\fP * mod, \fBstd::string\fP name)\fC [virtual]\fP" @@ -1198,10 +1198,10 @@ mod will contain a pointer to the module, and string will contain its name, for .PP .PP -Definition at line 325 of file modules.cpp. +Definition at line 252 of file modules.cpp. .PP .nf -325 { }; +252 { }; .fi .PP .SS "int Module::OnLocalTopicChange (\fBuserrec\fP * user, \fBchanrec\fP * chan, \fBstd::string\fP topic)\fC [virtual]\fP" @@ -1223,10 +1223,10 @@ Return 1 to deny the topic change, or 0 to allow it. .PP .PP -Definition at line 342 of file modules.cpp. +Definition at line 269 of file modules.cpp. .PP .nf -342 { return 0; }; +269 { return 0; }; .fi .PP .SS "void Module::OnMode (\fBuserrec\fP * user, void * dest, int target_type, \fBstd::string\fP text)\fC [virtual]\fP" @@ -1248,10 +1248,10 @@ The text variable contains the remainder of the mode string after the target, e. .PP .PP -Definition at line 312 of file modules.cpp. +Definition at line 239 of file modules.cpp. .PP .nf -312 { }; +239 { }; .fi .PP .SS "void Module::OnOper (\fBuserrec\fP * user, \fBstd::string\fP opertype)\fC [virtual]\fP" @@ -1269,10 +1269,10 @@ The userrec will contain the oper mode 'o' as this function is called after any .PP .PP -Definition at line 314 of file modules.cpp. +Definition at line 241 of file modules.cpp. .PP .nf -314 { }; +241 { }; .fi .PP .SS "int Module::OnOperCompare (\fBstd::string\fP password, \fBstd::string\fP input)\fC [virtual]\fP" @@ -1295,10 +1295,10 @@ The password field (from the config file) is in 'password' and is to be compared .PP .PP -Definition at line 345 of file modules.cpp. +Definition at line 272 of file modules.cpp. .PP .nf -345 { return 0; }; +272 { return 0; }; .fi .PP .SS "void Module::OnPostLocalTopicChange (\fBuserrec\fP * user, \fBchanrec\fP * chan, \fBstd::string\fP topic)\fC [virtual]\fP" @@ -1318,10 +1318,10 @@ To block topic changes you must use OnLocalTopicChange instead. .PP .PP -Definition at line 358 of file modules.cpp. +Definition at line 285 of file modules.cpp. .PP .nf -358 { }; +285 { }; .fi .PP .SS "int Module::OnPreCommand (\fBstd::string\fP command, char ** parameters, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP" @@ -1348,10 +1348,10 @@ This event occurs for all registered commands, wether they are registered in the .PP .PP -Definition at line 329 of file modules.cpp. +Definition at line 256 of file modules.cpp. .PP .nf -329 { return 0; }; +256 { return 0; }; .fi .PP .SS "int Module::OnRawMode (\fBuserrec\fP * user, \fBchanrec\fP * chan, char mode, \fBstd::string\fP param, bool adding, int pcnt)\fC [virtual]\fP" @@ -1382,10 +1382,10 @@ Return 1 from this function to block the mode character from being processed ent .PP .PP -Definition at line 334 of file modules.cpp. +Definition at line 261 of file modules.cpp. .PP .nf -334 { return 0; }; +261 { return 0; }; .fi .PP .SS "void Module::OnRawSocketAccept (int fd, \fBstd::string\fP ip, int localport)\fC [virtual]\fP" @@ -1405,10 +1405,10 @@ This is intended for raw socket processing (e.g. modules which wrap the tcp conn .PP .PP -Definition at line 350 of file modules.cpp. +Definition at line 277 of file modules.cpp. .PP .nf -350 { }; +277 { }; .fi .PP .SS "void Module::OnRawSocketClose (int fd)\fC [virtual]\fP" @@ -1424,10 +1424,10 @@ When this event is called, shutdown() has not yet been called on the socket. .PP .PP -Definition at line 352 of file modules.cpp. +Definition at line 279 of file modules.cpp. .PP .nf -352 { }; +279 { }; .fi .PP .SS "int Module::OnRawSocketRead (int fd, char * buffer, unsigned int count, int & readresult)\fC [virtual]\fP" @@ -1454,10 +1454,10 @@ nonzero if the event was handled, in which case readresult must be valid on exit .PP .PP -Definition at line 353 of file modules.cpp. +Definition at line 280 of file modules.cpp. .PP .nf -353 { return 0; }; +280 { return 0; }; .fi .PP .SS "int Module::OnRawSocketWrite (int fd, char * buffer, int count)\fC [virtual]\fP" @@ -1482,10 +1482,10 @@ Number of characters actually written or 0 if you didn't handle the operation .PP .PP -Definition at line 351 of file modules.cpp. +Definition at line 278 of file modules.cpp. .PP .nf -351 { return 0; }; +278 { return 0; }; .fi .PP .SS "void Module::OnRehash (\fBstd::string\fP parameter)\fC [virtual]\fP" @@ -1501,10 +1501,10 @@ This method is called prior to a /REHASH or when a SIGHUP is received from the o .PP .PP -Definition at line 308 of file modules.cpp. +Definition at line 235 of file modules.cpp. .PP .nf -308 { } +235 { } .fi .PP .SS "void Module::OnRemoteKill (\fBuserrec\fP * source, \fBuserrec\fP * dest, \fBstd::string\fP reason)\fC [virtual]\fP" @@ -1522,10 +1522,10 @@ Called when an oper wants to disconnect a remote user via KILL. .PP .PP -Definition at line 356 of file modules.cpp. +Definition at line 283 of file modules.cpp. .PP .nf -356 { }; +283 { }; .fi .PP .SS "char * Module::OnRequest (\fBRequest\fP * request)\fC [virtual]\fP" @@ -1541,12 +1541,12 @@ Please see the documentation of \fBRequest::Send()\fP for further information. T .PP .PP -Definition at line 344 of file modules.cpp. +Definition at line 271 of file modules.cpp. .PP Referenced by Request::Send(). .PP .nf -344 { return NULL; }; +271 { return NULL; }; .fi .PP .SS "void Module::OnSendList (\fBuserrec\fP * user, \fBchanrec\fP * channel, char mode)\fC [virtual]\fP" @@ -1566,10 +1566,10 @@ For example, when a /MODE channel +b (without any other parameters) is called, i .PP .PP -Definition at line 328 of file modules.cpp. +Definition at line 255 of file modules.cpp. .PP .nf -328 { }; +255 { }; .fi .PP .SS "void Module::OnServerRaw (\fBstd::string\fP & raw, bool inbound, \fBuserrec\fP * user)\fC [virtual]\fP" @@ -1589,10 +1589,10 @@ This method is the lowest level of handler available to a module. It will be cal .PP .PP -Definition at line 309 of file modules.cpp. +Definition at line 236 of file modules.cpp. .PP .nf -309 { } +236 { } .fi .PP .SS "void Module::OnStats (char symbol)\fC [virtual]\fP" @@ -1606,10 +1606,10 @@ Called on all /STATS commands This method is triggered for all /STATS use, inclu .PP .PP -Definition at line 339 of file modules.cpp. +Definition at line 266 of file modules.cpp. .PP .nf -339 { }; +266 { }; .fi .PP .SS "void Module::OnSyncChannel (\fBchanrec\fP * chan, \fBModule\fP * proto, void * opaque)\fC [virtual]\fP" @@ -1631,18 +1631,18 @@ For a good example of how to use this function, please see src/modules/m_chanpro .PP .PP -Definition at line 361 of file modules.cpp. +Definition at line 288 of file modules.cpp. .PP .nf -361 { }; +288 { }; .fi .PP .SS "void Module::OnSyncChannelMetaData (\fBchanrec\fP * chan, \fBModule\fP * proto, void * opaque, \fBstd::string\fP extname)\fC [virtual]\fP" .PP -Definition at line 363 of file modules.cpp. +Definition at line 290 of file modules.cpp. .PP .nf -363 { }; +290 { }; .fi .PP .SS "void Module::OnSyncUser (\fBuserrec\fP * user, \fBModule\fP * proto, void * opaque)\fC [virtual]\fP" @@ -1662,18 +1662,18 @@ When this function is called, it will be called from the module which implements .PP .PP -Definition at line 360 of file modules.cpp. +Definition at line 287 of file modules.cpp. .PP .nf -360 { }; +287 { }; .fi .PP .SS "void Module::OnSyncUserMetaData (\fBuserrec\fP * user, \fBModule\fP * proto, void * opaque, \fBstd::string\fP extname)\fC [virtual]\fP" .PP -Definition at line 364 of file modules.cpp. +Definition at line 291 of file modules.cpp. .PP .nf -364 { }; +291 { }; .fi .PP .SS "void Module::OnUnloadModule (\fBModule\fP * mod, \fBstd::string\fP name)\fC [virtual]\fP" @@ -1691,10 +1691,10 @@ mod will contain a pointer to the module, and string will contain its name, for .PP .PP -Definition at line 326 of file modules.cpp. +Definition at line 253 of file modules.cpp. .PP .nf -326 { }; +253 { }; .fi .PP .SS "void Module::OnUserConnect (\fBuserrec\fP * user)\fC [virtual]\fP" @@ -1710,10 +1710,10 @@ The details of the connecting user are available to you in the parameter userrec .PP .PP -Definition at line 303 of file modules.cpp. +Definition at line 230 of file modules.cpp. .PP .nf -303 { } +230 { } .fi .PP .SS "void Module::OnUserDisconnect (\fBuserrec\fP * user)\fC [virtual]\fP" @@ -1729,10 +1729,10 @@ The details of the exiting user are available to you in the parameter userrec *u .PP .PP -Definition at line 305 of file modules.cpp. +Definition at line 232 of file modules.cpp. .PP .nf -305 { } +232 { } .fi .PP .SS "void Module::OnUserInvite (\fBuserrec\fP * source, \fBuserrec\fP * dest, \fBchanrec\fP * channel)\fC [virtual]\fP" @@ -1752,10 +1752,10 @@ You cannot prevent the invite from occuring using this function, to do that, use .PP .PP -Definition at line 357 of file modules.cpp. +Definition at line 284 of file modules.cpp. .PP .nf -357 { }; +284 { }; .fi .PP .SS "void Module::OnUserJoin (\fBuserrec\fP * user, \fBchanrec\fP * channel)\fC [virtual]\fP" @@ -1773,10 +1773,10 @@ The details of the joining user are available to you in the parameter userrec *u .PP .PP -Definition at line 306 of file modules.cpp. +Definition at line 233 of file modules.cpp. .PP .nf -306 { } +233 { } .fi .PP .SS "void Module::OnUserKick (\fBuserrec\fP * source, \fBuserrec\fP * user, \fBchanrec\fP * chan, \fBstd::string\fP reason)\fC [virtual]\fP" @@ -1798,10 +1798,10 @@ If this method is called, the kick is already underway and cannot be prevented, .PP .PP -Definition at line 333 of file modules.cpp. +Definition at line 260 of file modules.cpp. .PP .nf -333 { }; +260 { }; .fi .PP .SS "void Module::OnUserMessage (\fBuserrec\fP * user, void * dest, int target_type, \fBstd::string\fP text)\fC [virtual]\fP" @@ -1823,10 +1823,10 @@ The dest variable contains a userrec* if target_type is TYPE_USER and a chanrec* .PP .PP -Definition at line 354 of file modules.cpp. +Definition at line 281 of file modules.cpp. .PP .nf -354 { }; +281 { }; .fi .PP .SS "void Module::OnUserNotice (\fBuserrec\fP * user, void * dest, int target_type, \fBstd::string\fP text)\fC [virtual]\fP" @@ -1848,10 +1848,10 @@ The dest variable contains a userrec* if target_type is TYPE_USER and a chanrec* .PP .PP -Definition at line 355 of file modules.cpp. +Definition at line 282 of file modules.cpp. .PP .nf -355 { }; +282 { }; .fi .PP .SS "void Module::OnUserPart (\fBuserrec\fP * user, \fBchanrec\fP * channel)\fC [virtual]\fP" @@ -1869,10 +1869,10 @@ The details of the leaving user are available to you in the parameter userrec *u .PP .PP -Definition at line 307 of file modules.cpp. +Definition at line 234 of file modules.cpp. .PP .nf -307 { } +234 { } .fi .PP .SS "void Module::OnUserPostNick (\fBuserrec\fP * user, \fBstd::string\fP oldnick)\fC [virtual]\fP" @@ -1890,10 +1890,10 @@ This can be used to track users after nickchanges have been applied. Please note .PP .PP -Definition at line 321 of file modules.cpp. +Definition at line 248 of file modules.cpp. .PP .nf -321 { }; +248 { }; .fi .PP .SS "int Module::OnUserPreInvite (\fBuserrec\fP * source, \fBuserrec\fP * dest, \fBchanrec\fP * channel)\fC [virtual]\fP" @@ -1918,10 +1918,10 @@ Returning 1 from this function stops the process immediately, causing no output .PP .PP -Definition at line 317 of file modules.cpp. +Definition at line 244 of file modules.cpp. .PP .nf -317 { return 0; }; +244 { return 0; }; .fi .PP .SS "int Module::OnUserPreJoin (\fBuserrec\fP * user, \fBchanrec\fP * chan, const char * cname)\fC [virtual]\fP" @@ -1948,10 +1948,10 @@ If the user joins a NEW channel which does not exist yet, OnUserPreJoin will be .PP .PP -Definition at line 310 of file modules.cpp. +Definition at line 237 of file modules.cpp. .PP .nf -310 { return 0; } +237 { return 0; } .fi .PP .SS "int Module::OnUserPreKick (\fBuserrec\fP * source, \fBuserrec\fP * user, \fBchanrec\fP * chan, \fBstd::string\fP reason)\fC [virtual]\fP" @@ -1978,10 +1978,10 @@ Returning a value of 1 from this function stops the process immediately, causing .PP .PP -Definition at line 332 of file modules.cpp. +Definition at line 259 of file modules.cpp. .PP .nf -332 { return 0; }; +259 { return 0; }; .fi .PP .SS "int Module::OnUserPreMessage (\fBuserrec\fP * user, void * dest, int target_type, \fBstd::string\fP & text)\fC [virtual]\fP" @@ -2008,10 +2008,10 @@ Returning any nonzero value from this function stops the process immediately, ca .PP .PP -Definition at line 318 of file modules.cpp. +Definition at line 245 of file modules.cpp. .PP .nf -318 { return 0; }; +245 { return 0; }; .fi .PP .SS "int Module::OnUserPreNick (\fBuserrec\fP * user, \fBstd::string\fP newnick)\fC [virtual]\fP" @@ -2034,10 +2034,10 @@ This can be used to implement Q-lines etc. Please note that although you can see .PP .PP -Definition at line 320 of file modules.cpp. +Definition at line 247 of file modules.cpp. .PP .nf -320 { return 0; }; +247 { return 0; }; .fi .PP .SS "int Module::OnUserPreNotice (\fBuserrec\fP * user, void * dest, int target_type, \fBstd::string\fP & text)\fC [virtual]\fP" @@ -2064,10 +2064,10 @@ Returning any nonzero value from this function stops the process immediately, ca .PP .PP -Definition at line 319 of file modules.cpp. +Definition at line 246 of file modules.cpp. .PP .nf -319 { return 0; }; +246 { return 0; }; .fi .PP .SS "void Module::OnUserQuit (\fBuserrec\fP * user, \fBstd::string\fP message)\fC [virtual]\fP" @@ -2085,10 +2085,10 @@ The details of the exiting user are available to you in the parameter userrec *u .PP .PP -Definition at line 304 of file modules.cpp. +Definition at line 231 of file modules.cpp. .PP .nf -304 { } +231 { } .fi .PP .SS "void Module::OnUserRegister (\fBuserrec\fP * user)\fC [virtual]\fP" @@ -2104,10 +2104,10 @@ before the user is sent the MOTD etc). Modules can use this method if they are p .PP .PP -Definition at line 331 of file modules.cpp. +Definition at line 258 of file modules.cpp. .PP .nf -331 { }; +258 { }; .fi .PP .SS "void Module::OnWallops (\fBuserrec\fP * user, \fBstd::string\fP text)\fC [virtual]\fP" @@ -2123,10 +2123,10 @@ Called after every WALLOPS command. .PP .PP -Definition at line 367 of file modules.cpp. +Definition at line 294 of file modules.cpp. .PP .nf -367 { }; +294 { }; .fi .PP .SS "void Module::OnWhois (\fBuserrec\fP * source, \fBuserrec\fP * dest)\fC [virtual]\fP" @@ -2144,10 +2144,10 @@ The source parameter contains the details of the user who issued the WHOIS comma .PP .PP -Definition at line 316 of file modules.cpp. +Definition at line 243 of file modules.cpp. .PP .nf -316 { }; +243 { }; .fi .PP .SS "void Module::ProtoSendMetaData (void * opaque, int target_type, void * target, \fBstd::string\fP extname, \fBstd::string\fP extdata)\fC [virtual]\fP" @@ -2173,10 +2173,10 @@ More documentation to follow soon. Please see src/modules/m_swhois.cpp for examp .PP .PP -Definition at line 366 of file modules.cpp. +Definition at line 293 of file modules.cpp. .PP .nf -366 { }; +293 { }; .fi .PP .SS "void Module::ProtoSendMode (void * opaque, int target_type, void * target, \fBstd::string\fP modeline)\fC [virtual]\fP" @@ -2200,10 +2200,10 @@ More documentation to follow soon. Please see src/modules/m_chanprotect.cpp for .PP .PP -Definition at line 362 of file modules.cpp. +Definition at line 289 of file modules.cpp. .PP .nf -362 { }; +289 { }; .fi .PP diff --git a/docs/man/man3/ModuleFactory.3 b/docs/man/man3/ModuleFactory.3 index be471b88d..c1964f216 100644 --- a/docs/man/man3/ModuleFactory.3 +++ b/docs/man/man3/ModuleFactory.3 @@ -1,4 +1,4 @@ -.TH "ModuleFactory" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ModuleFactory" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -32,23 +32,23 @@ Instantiates classes inherited from \fBModule\fP This class creates a class inhe 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 1654 of file modules.h. +Definition at line 1669 of file modules.h. .SH "Constructor & Destructor Documentation" .PP .SS "ModuleFactory::ModuleFactory ()\fC [inline]\fP" .PP -Definition at line 1657 of file modules.h. +Definition at line 1672 of file modules.h. .PP .nf -1657 { } +1672 { } .fi .PP .SS "virtual ModuleFactory::~ModuleFactory ()\fC [inline, virtual]\fP" .PP -Definition at line 1658 of file modules.h. +Definition at line 1673 of file modules.h. .PP .nf -1658 { } +1673 { } .fi .PP .SH "Member Function Documentation" diff --git a/docs/man/man3/ModuleMessage.3 b/docs/man/man3/ModuleMessage.3 index 422325015..f066a685b 100644 --- a/docs/man/man3/ModuleMessage.3 +++ b/docs/man/man3/ModuleMessage.3 @@ -1,4 +1,4 @@ -.TH "ModuleMessage" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ModuleMessage" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/QLine.3 b/docs/man/man3/QLine.3 index 4859a543d..761a5e72e 100644 --- a/docs/man/man3/QLine.3 +++ b/docs/man/man3/QLine.3 @@ -1,4 +1,4 @@ -.TH "QLine" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "QLine" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -28,7 +28,7 @@ Inherits \fBXLine\fP. .PP QLine class. .PP -Definition at line 108 of file xline.h. +Definition at line 113 of file xline.h. .SH "Member Data Documentation" .PP .SS "bool \fBQLine::is_global\fP" @@ -37,14 +37,14 @@ Set if this is a global Z:line (e.g. .PP it came from another server) .PP -Definition at line 118 of file xline.h. +Definition at line 123 of file xline.h. .SS "char \fBQLine::nick\fP[64]" .PP Nickname to match against. .PP May contain wildcards. .PP -Definition at line 114 of file xline.h. +Definition at line 119 of file xline.h. .SH "Author" .PP diff --git a/docs/man/man3/Request.3 b/docs/man/man3/Request.3 index e77724e7a..ecaf1ef9a 100644 --- a/docs/man/man3/Request.3 +++ b/docs/man/man3/Request.3 @@ -1,4 +1,4 @@ -.TH "Request" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "Request" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -65,10 +65,10 @@ Definition at line 157 of file modules.h. .PP Create a new Request. .PP -Definition at line 246 of file modules.cpp. +Definition at line 173 of file modules.cpp. .PP .nf -246 : data(anydata), source(src), dest(dst) { }; +173 : data(anydata), source(src), dest(dst) { }; .fi .PP .SH "Member Function Documentation" @@ -77,42 +77,42 @@ Definition at line 246 of file modules.cpp. .PP Fetch the Request data. .PP -Definition at line 248 of file modules.cpp. +Definition at line 175 of file modules.cpp. .PP References data. .PP .nf -249 { -250 return this->data; -251 } +176 { +177 return this->data; +178 } .fi .PP .SS "\fBModule\fP * Request::GetDest ()" .PP Fetch the request destination (should be 'this' in the receiving module). .PP -Definition at line 258 of file modules.cpp. +Definition at line 185 of file modules.cpp. .PP References dest. .PP .nf -259 { -260 return this->dest; -261 } +186 { +187 return this->dest; +188 } .fi .PP .SS "\fBModule\fP * Request::GetSource ()" .PP Fetch the request source. .PP -Definition at line 253 of file modules.cpp. +Definition at line 180 of file modules.cpp. .PP References source. .PP .nf -254 { -255 return this->source; -256 } +181 { +182 return this->source; +183 } .fi .PP .SS "char * Request::Send ()\fC [virtual]\fP" @@ -123,21 +123,21 @@ Upon returning the result will be arbitary data returned by the module you sent .PP Implements \fBModuleMessage\fP. .PP -Definition at line 263 of file modules.cpp. +Definition at line 190 of file modules.cpp. .PP References dest, and Module::OnRequest(). .PP .nf -264 { -265 if (this->dest) -266 { -267 return dest->OnRequest(this); -268 } -269 else -270 { -271 return NULL; -272 } -273 } +191 { +192 if (this->dest) +193 { +194 return dest->OnRequest(this); +195 } +196 else +197 { +198 return NULL; +199 } +200 } .fi .PP .SH "Member Data Documentation" diff --git a/docs/man/man3/Server.3 b/docs/man/man3/Server.3 index f65da0bef..5ec1f020d 100644 --- a/docs/man/man3/Server.3 +++ b/docs/man/man3/Server.3 @@ -1,4 +1,4 @@ -.TH "Server" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "Server" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -252,7 +252,7 @@ Allows server output and query functions This class contains methods which allow All modules should instantiate at least one copy of this class, and use its member functions to perform their tasks. .PP -Definition at line 1081 of file modules.h. +Definition at line 1096 of file modules.h. .SH "Constructor & Destructor Documentation" .PP .SS "Server::Server ()" @@ -261,11 +261,11 @@ Default constructor. .PP Creates a Server object. .PP -Definition at line 386 of file modules.cpp. +Definition at line 313 of file modules.cpp. .PP .nf -387 { -388 } +314 { +315 } .fi .PP .SS "Server::~Server ()\fC [virtual]\fP" @@ -274,11 +274,11 @@ Default destructor. .PP Destroys a Server object. .PP -Definition at line 390 of file modules.cpp. +Definition at line 317 of file modules.cpp. .PP .nf -391 { -392 } +318 { +319 } .fi .PP .SH "Member Function Documentation" @@ -293,14 +293,14 @@ typedef void (handlerfunc) (char**, int, userrec*); ... void \fBhandle_kill(char .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'. The source parameter is used for resource tracking, and should contain the name of your module (with file extension) e.g. 'm_blarp.so'. If you place the wrong identifier here, you can cause crashes if your module is unloaded. .PP -Definition at line 487 of file modules.cpp. +Definition at line 414 of file modules.cpp. .PP References createcommand(). .PP .nf -488 { -489 createcommand(cmd,f,flags,minparams,source); -490 } +415 { +416 createcommand(cmd,f,flags,minparams,source); +417 } .fi .PP .SS "void Server::AddELine (long duration, \fBstd::string\fP source, \fBstd::string\fP reason, \fBstd::string\fP hostmask)\fC [virtual]\fP" @@ -309,14 +309,14 @@ Adds a E-line The E-line is enforced as soon as it is added. .PP The duration must be in seconds, however you can use the \fBServer::CalcDuration\fP method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. .PP -Definition at line 731 of file modules.cpp. +Definition at line 658 of file modules.cpp. .PP References add_eline(). .PP .nf -732 { -733 add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); -734 } +659 { +660 add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); +661 } .fi .PP .SS "bool Server::AddExtendedListMode (char modechar)\fC [virtual]\fP" @@ -335,17 +335,17 @@ This call is used to implement modes like +q and +a. The characteristics of thes .PP It is down to the module handling the mode to maintain state and determine what 'items' (e.g. users, or a banlist) have the mode set on them, and process the modes at the correct times, e.g. during access checks on channels, etc. When the extended mode is triggered the OnExtendedMode method will be triggered as above. Note that the target you are given will be a channel, if for example your mode is set 'on a user' (in for example +a) you must use Server::Find to locate the user the mode is operating on. Your mode handler may return 1 to handle the mode AND tell the core to display the mode change, e.g. '+aaa one two three' in the case of the mode for 'two', or it may return -1 to 'eat' the mode change, so the above example would become '+aa one three' after processing. .PP -Definition at line 655 of file modules.cpp. +Definition at line 582 of file modules.cpp. .PP References DoAddExtendedMode(), ModeMakeList(), and MT_CHANNEL. .PP .nf -656 { -657 bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1); -658 if (res) -659 ModeMakeList(modechar); -660 return res; -661 } +583 { +584 bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1); +585 if (res) +586 ModeMakeList(modechar); +587 return res; +588 } .fi .PP .SS "bool Server::AddExtendedMode (char modechar, int type, bool requires_oper, int params_when_on, int params_when_off)\fC [virtual]\fP" @@ -354,37 +354,37 @@ Adds an extended mode letter which is parsed by a module. .PP 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. .PP -Definition at line 627 of file modules.cpp. +Definition at line 554 of file modules.cpp. .PP References DEBUG, DoAddExtendedMode(), MT_CLIENT, and MT_SERVER. .PP .nf -628 { -629 if (((modechar >= 'A') && (modechar <= 'Z')) || ((modechar >= 'a') && (modechar <= 'z'))) -630 { -631 if (type == MT_SERVER) -632 { -633 log(DEBUG,'*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion'); -634 return false; -635 } -636 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT)) -637 { -638 log(DEBUG,'*** API ERROR *** Parameters on MT_CLIENT modes are not supported'); -639 return false; -640 } -641 if ((params_when_on>1) || (params_when_off>1)) -642 { -643 log(DEBUG,'*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported'); -644 return false; -645 } -646 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off); -647 } -648 else -649 { -650 log(DEBUG,'*** API ERROR *** Muppet modechar detected.'); -651 } -652 return false; -653 } +555 { +556 if (((modechar >= 'A') && (modechar <= 'Z')) || ((modechar >= 'a') && (modechar <= 'z'))) +557 { +558 if (type == MT_SERVER) +559 { +560 log(DEBUG,'*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion'); +561 return false; +562 } +563 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT)) +564 { +565 log(DEBUG,'*** API ERROR *** Parameters on MT_CLIENT modes are not supported'); +566 return false; +567 } +568 if ((params_when_on>1) || (params_when_off>1)) +569 { +570 log(DEBUG,'*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported'); +571 return false; +572 } +573 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off); +574 } +575 else +576 { +577 log(DEBUG,'*** API ERROR *** Muppet modechar detected.'); +578 } +579 return false; +580 } .fi .PP .SS "void Server::AddGLine (long duration, \fBstd::string\fP source, \fBstd::string\fP reason, \fBstd::string\fP hostmask)\fC [virtual]\fP" @@ -393,14 +393,14 @@ Adds a G-line The G-line is propogated to all of the servers in the mesh and enf .PP The duration must be in seconds, however you can use the \fBServer::CalcDuration\fP method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. .PP -Definition at line 711 of file modules.cpp. +Definition at line 638 of file modules.cpp. .PP References add_gline(). .PP .nf -712 { -713 add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); -714 } +639 { +640 add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); +641 } .fi .PP .SS "void Server::AddKLine (long duration, \fBstd::string\fP source, \fBstd::string\fP reason, \fBstd::string\fP hostmask)\fC [virtual]\fP" @@ -409,14 +409,14 @@ Adds a K-line The K-line is enforced as soon as it is added. .PP The duration must be in seconds, however you can use the \fBServer::CalcDuration\fP method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. .PP -Definition at line 726 of file modules.cpp. +Definition at line 653 of file modules.cpp. .PP References add_kline(). .PP .nf -727 { -728 add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); -729 } +654 { +655 add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); +656 } .fi .PP .SS "void Server::AddQLine (long duration, \fBstd::string\fP source, \fBstd::string\fP reason, \fBstd::string\fP nickname)\fC [virtual]\fP" @@ -425,28 +425,28 @@ Adds a Q-line The Q-line is propogated to all of the servers in the mesh and enf .PP The duration must be in seconds, however you can use the \fBServer::CalcDuration\fP method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. .PP -Definition at line 716 of file modules.cpp. +Definition at line 643 of file modules.cpp. .PP References add_qline(). .PP .nf -717 { -718 add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str()); -719 } +644 { +645 add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str()); +646 } .fi .PP .SS "void Server::AddSocket (\fBInspSocket\fP * sock)\fC [virtual]\fP" .PP Adds a class derived from \fBInspSocket\fP to the server's socket engine. .PP -Definition at line 394 of file modules.cpp. +Definition at line 321 of file modules.cpp. .PP References module_sockets. .PP .nf -395 { -396 module_sockets.push_back(sock); -397 } +322 { +323 module_sockets.push_back(sock); +324 } .fi .PP .SS "void Server::AddZLine (long duration, \fBstd::string\fP source, \fBstd::string\fP reason, \fBstd::string\fP ipaddr)\fC [virtual]\fP" @@ -455,14 +455,14 @@ Adds a Z-line The Z-line is propogated to all of the servers in the mesh and enf .PP The duration must be in seconds, however you can use the \fBServer::CalcDuration\fP method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. .PP -Definition at line 721 of file modules.cpp. +Definition at line 648 of file modules.cpp. .PP References add_zline(). .PP .nf -722 { -723 add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str()); -724 } +649 { +650 add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str()); +651 } .fi .PP .SS "long Server::CalcDuration (\fBstd::string\fP duration)\fC [virtual]\fP" @@ -471,14 +471,14 @@ Calculates a duration This method will take a string containing a formatted dura .PP '1w2d') and return its value as a total number of seconds. This is the same function used internally by /GLINE etc to set the ban times. .PP -Definition at line 761 of file modules.cpp. +Definition at line 688 of file modules.cpp. .PP References duration(). .PP .nf -762 { -763 return duration(delta.c_str()); -764 } +689 { +690 return duration(delta.c_str()); +691 } .fi .PP .SS "void Server::CallCommandHandler (\fBstd::string\fP commandname, char ** parameters, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP" @@ -489,12 +489,12 @@ You can use this function to trigger other commands in the ircd, such as PRIVMSG .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. .PP -Definition at line 472 of file modules.cpp. +Definition at line 399 of file modules.cpp. .PP .nf -473 { -474 call_handler(commandname.c_str(),parameters,pcnt,user); -475 } +400 { +401 call_handler(commandname.c_str(),parameters,pcnt,user); +402 } .fi .PP .SS "void Server::ChangeGECOS (\fBuserrec\fP * user, \fBstd::string\fP gecos)\fC [virtual]\fP" @@ -503,14 +503,14 @@ Change GECOS (fullname) of a user. .PP 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. .PP -Definition at line 570 of file modules.cpp. +Definition at line 497 of file modules.cpp. .PP References ChangeName(). .PP .nf -571 { -572 ChangeName(user,gecos.c_str()); -573 } +498 { +499 ChangeName(user,gecos.c_str()); +500 } .fi .PP .SS "void Server::ChangeHost (\fBuserrec\fP * user, \fBstd::string\fP host)\fC [virtual]\fP" @@ -519,14 +519,14 @@ Change displayed hostname of a user. .PP 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. .PP -Definition at line 565 of file modules.cpp. +Definition at line 492 of file modules.cpp. .PP References ChangeDisplayedHost(). .PP .nf -566 { -567 ChangeDisplayedHost(user,host.c_str()); -568 } +493 { +494 ChangeDisplayedHost(user,host.c_str()); +495 } .fi .PP .SS "void Server::ChangeUserNick (\fBuserrec\fP * user, \fBstd::string\fP nickname)\fC [virtual]\fP" @@ -535,12 +535,12 @@ Forces a user nickchange. .PP 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. .PP -Definition at line 457 of file modules.cpp. +Definition at line 384 of file modules.cpp. .PP .nf -458 { -459 force_nickchange(user,nickname.c_str()); -460 } +385 { +386 force_nickchange(user,nickname.c_str()); +387 } .fi .PP .SS "\fBstd::string\fP Server::ChanMode (\fBuserrec\fP * User, \fBchanrec\fP * Chan)\fC [virtual]\fP" @@ -549,14 +549,14 @@ Attempts to look up a user's privilages on a channel. .PP This function will return a string containing either @, %, +, or an empty string, representing the user's privilages upon the channel you specify. .PP -Definition at line 595 of file modules.cpp. +Definition at line 522 of file modules.cpp. .PP References cmode(). .PP .nf -596 { -597 return cmode(User,Chan); -598 } +523 { +524 return cmode(User,Chan); +525 } .fi .PP .SS "bool Server::CommonChannels (\fBuserrec\fP * u1, \fBuserrec\fP * u2)\fC [virtual]\fP" @@ -565,14 +565,14 @@ Returns true if two users share a common channel. .PP This method is used internally by the NICK and QUIT commands, and the \fBServer::SendCommon\fP method. .PP -Definition at line 543 of file modules.cpp. +Definition at line 470 of file modules.cpp. .PP References common_channels(). .PP .nf -544 { -545 return (common_channels(u1,u2) != 0); -546 } +471 { +472 return (common_channels(u1,u2) != 0); +473 } .fi .PP .SS "int Server::CountUsers (\fBchanrec\fP * c)\fC [virtual]\fP" @@ -581,103 +581,103 @@ Returns a count of the number of users on a channel. .PP This will NEVER be 0, as if the chanrec exists, it will have at least one user in the channel. .PP -Definition at line 663 of file modules.cpp. +Definition at line 590 of file modules.cpp. .PP .nf -664 { -665 return usercount(c); -666 } +591 { +592 return usercount(c); +593 } .fi .PP .SS "bool Server::DelELine (\fBstd::string\fP hostmask)\fC [virtual]\fP" .PP Deletes a local E-Line. .PP -Definition at line 756 of file modules.cpp. +Definition at line 683 of file modules.cpp. .PP References del_eline(). .PP .nf -757 { -758 return del_eline(hostmask.c_str()); -759 } +684 { +685 return del_eline(hostmask.c_str()); +686 } .fi .PP .SS "bool Server::DelGLine (\fBstd::string\fP hostmask)\fC [virtual]\fP" .PP Deletes a G-Line from all servers on the mesh. .PP -Definition at line 736 of file modules.cpp. +Definition at line 663 of file modules.cpp. .PP References del_gline(). .PP .nf -737 { -738 return del_gline(hostmask.c_str()); -739 } +664 { +665 return del_gline(hostmask.c_str()); +666 } .fi .PP .SS "bool Server::DelKLine (\fBstd::string\fP hostmask)\fC [virtual]\fP" .PP Deletes a local K-Line. .PP -Definition at line 751 of file modules.cpp. +Definition at line 678 of file modules.cpp. .PP References del_kline(). .PP .nf -752 { -753 return del_kline(hostmask.c_str()); -754 } +679 { +680 return del_kline(hostmask.c_str()); +681 } .fi .PP .SS "bool Server::DelQLine (\fBstd::string\fP nickname)\fC [virtual]\fP" .PP Deletes a Q-Line from all servers on the mesh. .PP -Definition at line 741 of file modules.cpp. +Definition at line 668 of file modules.cpp. .PP References del_qline(). .PP .nf -742 { -743 return del_qline(nickname.c_str()); -744 } +669 { +670 return del_qline(nickname.c_str()); +671 } .fi .PP .SS "void Server::DelSocket (\fBInspSocket\fP * sock)\fC [virtual]\fP" .PP Deletes a class derived from \fBInspSocket\fP from the server's socket engine. .PP -Definition at line 405 of file modules.cpp. +Definition at line 332 of file modules.cpp. .PP References module_sockets. .PP .nf -406 { -407 for (std::vector<InspSocket*>::iterator a = module_sockets.begin(); a < module_sockets.end(); a++) -408 { -409 if (*a == sock) -410 { -411 module_sockets.erase(a); -412 return; -413 } -414 } -415 } +333 { +334 for (std::vector<InspSocket*>::iterator a = module_sockets.begin(); a < module_sockets.end(); a++) +335 { +336 if (*a == sock) +337 { +338 module_sockets.erase(a); +339 return; +340 } +341 } +342 } .fi .PP .SS "bool Server::DelZLine (\fBstd::string\fP ipaddr)\fC [virtual]\fP" .PP Deletes a Z-Line from all servers on the mesh. .PP -Definition at line 746 of file modules.cpp. +Definition at line 673 of file modules.cpp. .PP References del_zline(). .PP .nf -747 { -748 return del_zline(ipaddr.c_str()); -749 } +674 { +675 return del_zline(ipaddr.c_str()); +676 } .fi .PP .SS "\fBchanrec\fP * Server::FindChannel (\fBstd::string\fP channel)\fC [virtual]\fP" @@ -686,12 +686,12 @@ Attempts to look up a channel and return a pointer to it. .PP This function will return NULL if the channel does not exist. .PP -Definition at line 590 of file modules.cpp. +Definition at line 517 of file modules.cpp. .PP .nf -591 { -592 return FindChan(channel.c_str()); -593 } +518 { +519 return FindChan(channel.c_str()); +520 } .fi .PP .SS "\fBuserrec\fP * Server::FindDescriptor (int socket)\fC [virtual]\fP" @@ -700,12 +700,12 @@ Attempts to look up a nick using the file descriptor associated with that nick. .PP This function will return NULL if the file descriptor is not associated with a valid user. .PP -Definition at line 585 of file modules.cpp. +Definition at line 512 of file modules.cpp. .PP .nf -586 { -587 return (socket < 65536 ? fd_ref_table[socket] : NULL); -588 } +513 { +514 return (socket < 65536 ? fd_ref_table[socket] : NULL); +515 } .fi .PP .SS "\fBModule\fP * Server::FindModule (\fBstd::string\fP name)\fC [virtual]\fP" @@ -714,21 +714,21 @@ This function finds a module by name. .PP You must provide the filename of the module. If the module cannot be found (is not loaded) the function will return NULL. .PP -Definition at line 795 of file modules.cpp. +Definition at line 722 of file modules.cpp. .PP -References MODCOUNT, module_names, and modules. +References MODCOUNT, ServerConfig::module_names, and modules. .PP .nf -796 { -797 for (int i = 0; i <= MODCOUNT; i++) -798 { -799 if (module_names[i] == name) -800 { -801 return modules[i]; -802 } -803 } -804 return NULL; -805 } +723 { +724 for (int i = 0; i <= MODCOUNT; i++) +725 { +726 if (Config->module_names[i] == name) +727 { +728 return modules[i]; +729 } +730 } +731 return NULL; +732 } .fi .PP .SS "\fBuserrec\fP * Server::FindNick (\fBstd::string\fP nick)\fC [virtual]\fP" @@ -737,12 +737,12 @@ Attempts to look up a nick and return a pointer to it. .PP This function will return NULL if the nick does not exist. .PP -Definition at line 580 of file modules.cpp. +Definition at line 507 of file modules.cpp. .PP .nf -581 { -582 return Find(nick); -583 } +508 { +509 return Find(nick); +510 } .fi .PP .SS "\fBAdmin\fP Server::GetAdmin ()\fC [virtual]\fP" @@ -751,48 +751,48 @@ Returns the information of the server as returned by the /ADMIN command. .PP 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. .PP -Definition at line 620 of file modules.cpp. +Definition at line 547 of file modules.cpp. .PP .nf -621 { -622 return Admin(getadminname(),getadminemail(),getadminnick()); -623 } +548 { +549 return Admin(getadminname(),getadminemail(),getadminnick()); +550 } .fi .PP .SS "\fBstd::string\fP Server::GetNetworkName ()\fC [virtual]\fP" .PP Returns the network name, global to all linked servers. .PP -Definition at line 610 of file modules.cpp. +Definition at line 537 of file modules.cpp. .PP .nf -611 { -612 return getnetworkname(); -613 } +538 { +539 return getnetworkname(); +540 } .fi .PP .SS "\fBstd::string\fP Server::GetServerDescription ()\fC [virtual]\fP" .PP Returns the server description string of the local server. .PP -Definition at line 615 of file modules.cpp. +Definition at line 542 of file modules.cpp. .PP .nf -616 { -617 return getserverdesc(); -618 } +543 { +544 return getserverdesc(); +545 } .fi .PP .SS "\fBstd::string\fP Server::GetServerName ()\fC [virtual]\fP" .PP Returns the server name of the server where the module is loaded. .PP -Definition at line 605 of file modules.cpp. +Definition at line 532 of file modules.cpp. .PP .nf -606 { -607 return getservername(); -608 } +533 { +534 return getservername(); +535 } .fi .PP .SS "\fBchanuserlist\fP Server::GetUsers (\fBchanrec\fP * chan)\fC [virtual]\fP" @@ -801,22 +801,22 @@ Fetches the userlist of a channel. .PP This function must be here and not a member of userrec or chanrec due to include constraints. .PP -Definition at line 445 of file modules.cpp. +Definition at line 372 of file modules.cpp. .PP -References chanrec::GetUsers(), and list. +References chanrec::GetUsers(). .PP .nf -446 { -447 chanuserlist userl; -448 userl.clear(); -449 std::vector<char*> *list = chan->GetUsers(); -450 for (std::vector<char*>::iterator i = list->begin(); i != list->end(); i++) -451 { -452 char* o = *i; -453 userl.push_back((userrec*)o); -454 } -455 return userl; -456 } +373 { +374 chanuserlist userl; +375 userl.clear(); +376 std::vector<char*> *list = chan->GetUsers(); +377 for (std::vector<char*>::iterator i = list->begin(); i != list->end(); i++) +378 { +379 char* o = *i; +380 userl.push_back((userrec*)o); +381 } +382 return userl; +383 } .fi .PP .SS "bool Server::IsNick (\fBstd::string\fP nick)\fC [virtual]\fP" @@ -825,14 +825,14 @@ Returns true if a nick is valid. .PP Nicks for unregistered connections will return false. .PP -Definition at line 575 of file modules.cpp. +Definition at line 502 of file modules.cpp. .PP References isnick(). .PP .nf -576 { -577 return (isnick(nick.c_str()) != 0); -578 } +503 { +504 return (isnick(nick.c_str()) != 0); +505 } .fi .PP .SS "bool Server::IsOnChannel (\fBuserrec\fP * User, \fBchanrec\fP * Chan)\fC [virtual]\fP" @@ -841,14 +841,14 @@ Checks if a user is on a channel. .PP This function will return true or false to indicate if user 'User' is on channel 'Chan'. .PP -Definition at line 600 of file modules.cpp. +Definition at line 527 of file modules.cpp. .PP References has_channel(). .PP .nf -601 { -602 return has_channel(User,Chan); -603 } +528 { +529 return has_channel(User,Chan); +530 } .fi .PP .SS "bool Server::IsUlined (\fBstd::string\fP server)\fC [virtual]\fP" @@ -857,60 +857,60 @@ Returns true if the servername you give is ulined. .PP 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. .PP -Definition at line 467 of file modules.cpp. +Definition at line 394 of file modules.cpp. .PP References is_uline(). .PP .nf -468 { -469 return is_uline(server.c_str()); -470 } +395 { +396 return is_uline(server.c_str()); +397 } .fi .PP .SS "bool Server::IsValidMask (\fBstd::string\fP mask)\fC [virtual]\fP" .PP Returns true if a nick!ident string is correctly formatted, false if otherwise. .PP -Definition at line 766 of file modules.cpp. +Definition at line 693 of file modules.cpp. .PP .nf -767 { -768 const char* dest = mask.c_str(); -769 if (strchr(dest,'!')==0) -770 return false; -771 if (strchr(dest,'@')==0) -772 return false; -773 for (unsigned int i = 0; i < strlen(dest); i++) -774 if (dest[i] < 32) -775 return false; -776 for (unsigned int i = 0; i < strlen(dest); i++) -777 if (dest[i] > 126) -778 return false; -779 unsigned int c = 0; -780 for (unsigned int i = 0; i < strlen(dest); i++) -781 if (dest[i] == '!') -782 c++; -783 if (c>1) -784 return false; -785 c = 0; -786 for (unsigned int i = 0; i < strlen(dest); i++) -787 if (dest[i] == '@') -788 c++; -789 if (c>1) -790 return false; -791 -792 return true; -793 } +694 { +695 const char* dest = mask.c_str(); +696 if (strchr(dest,'!')==0) +697 return false; +698 if (strchr(dest,'@')==0) +699 return false; +700 for (unsigned int i = 0; i < strlen(dest); i++) +701 if (dest[i] < 32) +702 return false; +703 for (unsigned int i = 0; i < strlen(dest); i++) +704 if (dest[i] > 126) +705 return false; +706 unsigned int c = 0; +707 for (unsigned int i = 0; i < strlen(dest); i++) +708 if (dest[i] == '!') +709 c++; +710 if (c>1) +711 return false; +712 c = 0; +713 for (unsigned int i = 0; i < strlen(dest); i++) +714 if (dest[i] == '@') +715 c++; +716 if (c>1) +717 return false; +718 +719 return true; +720 } .fi .PP .SS "bool Server::IsValidModuleCommand (\fBstd::string\fP commandname, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP" .PP -Definition at line 477 of file modules.cpp. +Definition at line 404 of file modules.cpp. .PP .nf -478 { -479 return is_valid_cmd(commandname.c_str(), pcnt, user); -480 } +405 { +406 return is_valid_cmd(commandname.c_str(), pcnt, user); +407 } .fi .PP .SS "\fBchanrec\fP * Server::JoinUserToChannel (\fBuserrec\fP * user, \fBstd::string\fP cname, \fBstd::string\fP key)\fC [virtual]\fP" @@ -919,12 +919,12 @@ Forces a user to join a channel. .PP 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. .PP -Definition at line 435 of file modules.cpp. +Definition at line 362 of file modules.cpp. .PP .nf -436 { -437 return add_channel(user,cname.c_str(),key.c_str(),false); -438 } +363 { +364 return add_channel(user,cname.c_str(),key.c_str(),false); +365 } .fi .PP .SS "void Server::Log (int level, \fBstd::string\fP s)\fC [virtual]\fP" @@ -933,12 +933,12 @@ Writes a log string. .PP 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. .PP -Definition at line 482 of file modules.cpp. +Definition at line 409 of file modules.cpp. .PP .nf -483 { -484 log(level,'%s',s.c_str()); -485 } +410 { +411 log(level,'%s',s.c_str()); +412 } .fi .PP .SS "bool Server::MatchText (\fBstd::string\fP sliteral, \fBstd::string\fP spattern)\fC [virtual]\fP" @@ -947,15 +947,15 @@ Matches text against a glob pattern. .PP 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. .PP -Definition at line 422 of file modules.cpp. +Definition at line 349 of file modules.cpp. .PP .nf -423 { -424 char literal[MAXBUF],pattern[MAXBUF]; -425 strlcpy(literal,sliteral.c_str(),MAXBUF); -426 strlcpy(pattern,spattern.c_str(),MAXBUF); -427 return match(literal,pattern); -428 } +350 { +351 char literal[MAXBUF],pattern[MAXBUF]; +352 strlcpy(literal,sliteral.c_str(),MAXBUF); +353 strlcpy(pattern,spattern.c_str(),MAXBUF); +354 return match(literal,pattern); +355 } .fi .PP .SS "\fBchanrec\fP * Server::PartUserFromChannel (\fBuserrec\fP * user, \fBstd::string\fP cname, \fBstd::string\fP reason)\fC [virtual]\fP" @@ -964,12 +964,12 @@ Forces a user to part a channel. .PP 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. .PP -Definition at line 440 of file modules.cpp. +Definition at line 367 of file modules.cpp. .PP .nf -441 { -442 return del_channel(user,cname.c_str(),reason.c_str(),false); -443 } +368 { +369 return del_channel(user,cname.c_str(),reason.c_str(),false); +370 } .fi .PP .SS "bool Server::PseudoToUser (\fBuserrec\fP * alive, \fBuserrec\fP * zombie, \fBstd::string\fP message)\fC [virtual]\fP" @@ -978,39 +978,39 @@ This user takes one user, and switches their file descriptor with another user, .PP The user in 'alive' is booted off the server with the given message. The user referred to by 'zombie' should have previously been locked with Server::ZombifyUser, otherwise stale sockets and file descriptor leaks can occur. After this call, the pointer to alive will be invalid, and the pointer to zombie will be equivalent in effect to the old pointer to alive. .PP -Definition at line 681 of file modules.cpp. +Definition at line 608 of file modules.cpp. .PP -References ucrec::channel, userrec::chans, userrec::ClearBuffer(), connection::fd, FD_MAGIC_NUMBER, connection::host, userrec::ident, chanrec::name, userrec::nick, chanrec::setby, chanrec::topic, and chanrec::topicset. +References userrec::chans, userrec::ClearBuffer(), connection::fd, FD_MAGIC_NUMBER, connection::host, userrec::ident, chanrec::name, userrec::nick, chanrec::setby, chanrec::topic, and chanrec::topicset. .PP .nf -682 { -683 zombie->fd = alive->fd; -684 alive->fd = FD_MAGIC_NUMBER; -685 alive->ClearBuffer(); -686 Write(zombie->fd,':%s!%s@%s NICK %s',alive->nick,alive->ident,alive->host,zombie->nick); -687 kill_link(alive,message.c_str()); -688 fd_ref_table[zombie->fd] = zombie; -689 for (int i = 0; i != MAXCHANS; i++) -690 { -691 if (zombie->chans[i].channel != NULL) -692 { -693 if (zombie->chans[i].channel->name) -694 { -695 chanrec* Ptr = zombie->chans[i].channel; -696 WriteFrom(zombie->fd,zombie,'JOIN %s',Ptr->name); -697 if (Ptr->topicset) -698 { -699 WriteServ(zombie->fd,'332 %s %s :%s', zombie->nick, Ptr->name, Ptr->topic); -700 WriteServ(zombie->fd,'333 %s %s %s %d', zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset); -701 } -702 userlist(zombie,Ptr); -703 WriteServ(zombie->fd,'366 %s %s :End of /NAMES list.', zombie->nick, Ptr->name); -704 -705 } -706 } -707 } -708 return true; -709 } +609 { +610 zombie->fd = alive->fd; +611 alive->fd = FD_MAGIC_NUMBER; +612 alive->ClearBuffer(); +613 Write(zombie->fd,':%s!%s@%s NICK %s',alive->nick,alive->ident,alive->host,zombie->nick); +614 kill_link(alive,message.c_str()); +615 fd_ref_table[zombie->fd] = zombie; +616 for (unsigned int i = 0; i < zombie->chans.size(); i++) +617 { +618 if (zombie->chans[i].channel != NULL) +619 { +620 if (zombie->chans[i].channel->name) +621 { +622 chanrec* Ptr = zombie->chans[i].channel; +623 WriteFrom(zombie->fd,zombie,'JOIN %s',Ptr->name); +624 if (Ptr->topicset) +625 { +626 WriteServ(zombie->fd,'332 %s %s :%s', zombie->nick, Ptr->name, Ptr->topic); +627 WriteServ(zombie->fd,'333 %s %s %s %d', zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset); +628 } +629 userlist(zombie,Ptr); +630 WriteServ(zombie->fd,'366 %s %s :End of /NAMES list.', zombie->nick, Ptr->name); +631 +632 } +633 } +634 } +635 return true; +636 } .fi .PP .SS "void Server::QuitUser (\fBuserrec\fP * user, \fBstd::string\fP reason)\fC [virtual]\fP" @@ -1023,23 +1023,25 @@ 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. .PP -Definition at line 462 of file modules.cpp. +Definition at line 389 of file modules.cpp. .PP .nf -463 { -464 kill_link(user,reason.c_str()); -465 } +390 { +391 kill_link(user,reason.c_str()); +392 } .fi .PP .SS "void Server::RehashServer ()\fC [virtual]\fP" .PP -Definition at line 399 of file modules.cpp. +Definition at line 326 of file modules.cpp. +.PP +References ServerConfig::Read(). .PP .nf -400 { -401 WriteOpers('*** Rehashing config file'); -402 ReadConfig(false,NULL); -403 } +327 { +328 WriteOpers('*** Rehashing config file'); +329 Config->Read(false,NULL); +330 } .fi .PP .SS "void Server::Send (int Socket, \fBstd::string\fP s)\fC [virtual]\fP" @@ -1048,12 +1050,12 @@ Sends a line of text down a TCP/IP socket. .PP This method writes a line of text to an established socket, cutting it to 510 characters plus a carriage return and linefeed if required. .PP -Definition at line 497 of file modules.cpp. +Definition at line 424 of file modules.cpp. .PP .nf -498 { -499 Write(Socket,'%s',s.c_str()); -500 } +425 { +426 Write(Socket,'%s',s.c_str()); +427 } .fi .PP .SS "void Server::SendChannel (\fBuserrec\fP * User, \fBchanrec\fP * Channel, \fBstd::string\fP s, bool IncludeSender)\fC [virtual]\fP" @@ -1062,19 +1064,19 @@ Sends text from a user to a channel (mulicast). .PP 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). .PP -Definition at line 531 of file modules.cpp. +Definition at line 458 of file modules.cpp. .PP .nf -532 { -533 if (IncludeSender) -534 { -535 WriteChannel(Channel,User,'%s',s.c_str()); -536 } -537 else -538 { -539 ChanExceptSender(Channel,User,'%s',s.c_str()); -540 } -541 } +459 { +460 if (IncludeSender) +461 { +462 WriteChannel(Channel,User,'%s',s.c_str()); +463 } +464 else +465 { +466 ChanExceptSender(Channel,User,'%s',s.c_str()); +467 } +468 } .fi .PP .SS "void Server::SendChannelServerNotice (\fBstd::string\fP ServName, \fBchanrec\fP * Channel, \fBstd::string\fP text)\fC [virtual]\fP" @@ -1083,12 +1085,12 @@ Writes text to a channel, but from a server, including all. .PP This can be used to send server notices to a group of users. .PP -Definition at line 526 of file modules.cpp. +Definition at line 453 of file modules.cpp. .PP .nf -527 { -528 WriteChannelWithServ((char*)ServName.c_str(), Channel, '%s', text.c_str()); -529 } +454 { +455 WriteChannelWithServ((char*)ServName.c_str(), Channel, '%s', text.c_str()); +456 } .fi .PP .SS "void Server::SendCommon (\fBuserrec\fP * User, \fBstd::string\fP text, bool IncludeSender)\fC [virtual]\fP" @@ -1097,19 +1099,19 @@ Sends text from a user to one or more channels (mulicast). .PP 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. .PP -Definition at line 548 of file modules.cpp. +Definition at line 475 of file modules.cpp. .PP .nf -549 { -550 if (IncludeSender) -551 { -552 WriteCommon(User,'%s',text.c_str()); -553 } -554 else -555 { -556 WriteCommonExcept(User,'%s',text.c_str()); -557 } -558 } +476 { +477 if (IncludeSender) +478 { +479 WriteCommon(User,'%s',text.c_str()); +480 } +481 else +482 { +483 WriteCommonExcept(User,'%s',text.c_str()); +484 } +485 } .fi .PP .SS "void Server::SendFrom (int Socket, \fBuserrec\fP * User, \fBstd::string\fP s)\fC [virtual]\fP" @@ -1118,12 +1120,12 @@ Sends text from a user to a socket. .PP 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) .PP -Definition at line 507 of file modules.cpp. +Definition at line 434 of file modules.cpp. .PP .nf -508 { -509 WriteFrom(Socket,User,'%s',s.c_str()); -510 } +435 { +436 WriteFrom(Socket,User,'%s',s.c_str()); +437 } .fi .PP .SS "void Server::SendMode (char ** parameters, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP" @@ -1146,14 +1148,14 @@ 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! .PP -Definition at line 492 of file modules.cpp. +Definition at line 419 of file modules.cpp. .PP References server_mode(). .PP .nf -493 { -494 server_mode(parameters,pcnt,user); -495 } +420 { +421 server_mode(parameters,pcnt,user); +422 } .fi .PP .SS "void Server::SendOpers (\fBstd::string\fP s)\fC [virtual]\fP" @@ -1162,12 +1164,12 @@ Sends text to all opers. .PP This method sends a server notice to all opers with the usermode +s. .PP -Definition at line 417 of file modules.cpp. +Definition at line 344 of file modules.cpp. .PP .nf -418 { -419 WriteOpers('%s',s.c_str()); -420 } +345 { +346 WriteOpers('%s',s.c_str()); +347 } .fi .PP .SS "void Server::SendServ (int Socket, \fBstd::string\fP s)\fC [virtual]\fP" @@ -1176,12 +1178,12 @@ Sends text from the server to a socket. .PP This method writes a line of text to an established socket, with the servername prepended as used by numerics (see RFC 1459) .PP -Definition at line 502 of file modules.cpp. +Definition at line 429 of file modules.cpp. .PP .nf -503 { -504 WriteServ(Socket,'%s',s.c_str()); -505 } +430 { +431 WriteServ(Socket,'%s',s.c_str()); +432 } .fi .PP .SS "void Server::SendTo (\fBuserrec\fP * Source, \fBuserrec\fP * Dest, \fBstd::string\fP s)\fC [virtual]\fP" @@ -1198,23 +1200,23 @@ The format will become: .PP Which is useful for numerics and server notices to single users, etc. .PP -Definition at line 512 of file modules.cpp. +Definition at line 439 of file modules.cpp. .PP References connection::fd. .PP .nf -513 { -514 if (!Source) -515 { -516 // if source is NULL, then the message originates from the local server -517 Write(Dest->fd,':%s %s',this->GetServerName().c_str(),s.c_str()); -518 } -519 else -520 { -521 // otherwise it comes from the user specified -522 WriteTo(Source,Dest,'%s',s.c_str()); -523 } -524 } +440 { +441 if (!Source) +442 { +443 // if source is NULL, then the message originates from the local server +444 Write(Dest->fd,':%s %s',this->GetServerName().c_str(),s.c_str()); +445 } +446 else +447 { +448 // otherwise it comes from the user specified +449 WriteTo(Source,Dest,'%s',s.c_str()); +450 } +451 } .fi .PP .SS "void Server::SendToModeMask (\fBstd::string\fP modes, int flags, \fBstd::string\fP text)\fC [virtual]\fP" @@ -1227,12 +1229,12 @@ 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. .PP -Definition at line 430 of file modules.cpp. +Definition at line 357 of file modules.cpp. .PP .nf -431 { -432 WriteMode(modes.c_str(),flags,'%s',text.c_str()); -433 } +358 { +359 WriteMode(modes.c_str(),flags,'%s',text.c_str()); +360 } .fi .PP .SS "void Server::SendWallops (\fBuserrec\fP * User, \fBstd::string\fP text)\fC [virtual]\fP" @@ -1241,12 +1243,12 @@ Sends a WALLOPS message. .PP This method writes a WALLOPS message to all users with the +w flag, originating from the specified user. .PP -Definition at line 560 of file modules.cpp. +Definition at line 487 of file modules.cpp. .PP .nf -561 { -562 WriteWallOps(User,false,'%s',text.c_str()); -563 } +488 { +489 WriteWallOps(User,false,'%s',text.c_str()); +490 } .fi .PP .SS "bool Server::UserToPseudo (\fBuserrec\fP * user, \fBstd::string\fP message)\fC [virtual]\fP" @@ -1255,21 +1257,21 @@ Remove a user's connection to the irc server, but leave their client in existenc .PP When you call this function, the user's file descriptor will be replaced with the value of FD_MAGIC_NUMBER and their old file descriptor will be closed. This idle client will remain until it is restored with a valid file descriptor, or is removed from IRC by an operator After this call, the pointer to user will be invalid. .PP -Definition at line 669 of file modules.cpp. +Definition at line 596 of file modules.cpp. .PP References userrec::ClearBuffer(), SocketEngine::DelFd(), connection::fd, FD_MAGIC_NUMBER, connection::host, and userrec::ident. .PP .nf -670 { -671 unsigned int old_fd = user->fd; -672 user->fd = FD_MAGIC_NUMBER; -673 user->ClearBuffer(); -674 Write(old_fd,'ERROR :Closing link (%s@%s) [%s]',user->ident,user->host,message.c_str()); -675 SE->DelFd(old_fd); -676 shutdown(old_fd,2); -677 close(old_fd); -678 return true; -679 } +597 { +598 unsigned int old_fd = user->fd; +599 user->fd = FD_MAGIC_NUMBER; +600 user->ClearBuffer(); +601 Write(old_fd,'ERROR :Closing link (%s@%s) [%s]',user->ident,user->host,message.c_str()); +602 SE->DelFd(old_fd); +603 shutdown(old_fd,2); +604 close(old_fd); +605 return true; +606 } .fi .PP diff --git a/docs/man/man3/ServerConfig.3 b/docs/man/man3/ServerConfig.3 new file mode 100644 index 000000000..9f5733197 --- /dev/null +++ b/docs/man/man3/ServerConfig.3 @@ -0,0 +1,325 @@ +.TH "ServerConfig" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +ServerConfig \- +.SH SYNOPSIS +.br +.PP +\fC#include <inspircd_io.h>\fP +.PP +Inherits \fBclassbase\fP. +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "\fBServerConfig\fP ()" +.br +.ti -1c +.RI "void \fBClearStack\fP ()" +.br +.ti -1c +.RI "void \fBRead\fP (bool bail, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "bool \fBLoadConf\fP (const char *filename, std::stringstream *target, std::stringstream *errorstream)" +.br +.ti -1c +.RI "int \fBConfValue\fP (char *tag, char *var, int index, char *result, std::stringstream *config)" +.br +.ti -1c +.RI "int \fBReadConf\fP (std::stringstream *\fBconfig_f\fP, const char *tag, const char *var, int index, char *result)" +.br +.ti -1c +.RI "int \fBConfValueEnum\fP (char *tag, std::stringstream *config)" +.br +.ti -1c +.RI "int \fBEnumConf\fP (std::stringstream *\fBconfig_f\fP, const char *tag)" +.br +.ti -1c +.RI "int \fBEnumValues\fP (std::stringstream *config, const char *tag, int index)" +.br +.in -1c +.SS "Public Attributes" + +.in +1c +.ti -1c +.RI "char \fBServerName\fP [MAXBUF]" +.br +.ti -1c +.RI "char \fBNetwork\fP [MAXBUF]" +.br +.ti -1c +.RI "char \fBServerDesc\fP [MAXBUF]" +.br +.ti -1c +.RI "char \fBAdminName\fP [MAXBUF]" +.br +.ti -1c +.RI "char \fBAdminEmail\fP [MAXBUF]" +.br +.ti -1c +.RI "char \fBAdminNick\fP [MAXBUF]" +.br +.ti -1c +.RI "char \fBdiepass\fP [MAXBUF]" +.br +.ti -1c +.RI "char \fBrestartpass\fP [MAXBUF]" +.br +.ti -1c +.RI "char \fBmotd\fP [MAXBUF]" +.br +.ti -1c +.RI "char \fBrules\fP [MAXBUF]" +.br +.ti -1c +.RI "char \fBPrefixQuit\fP [MAXBUF]" +.br +.ti -1c +.RI "char \fBDieValue\fP [MAXBUF]" +.br +.ti -1c +.RI "char \fBDNSServer\fP [MAXBUF]" +.br +.ti -1c +.RI "char \fBDisabledCommands\fP [MAXBUF]" +.br +.ti -1c +.RI "char \fBModPath\fP [1024]" +.br +.ti -1c +.RI "char \fBMyExecutable\fP [1024]" +.br +.ti -1c +.RI "FILE * \fBlog_file\fP" +.br +.ti -1c +.RI "bool \fBnofork\fP" +.br +.ti -1c +.RI "bool \fBunlimitcore\fP" +.br +.ti -1c +.RI "bool \fBAllowHalfop\fP" +.br +.ti -1c +.RI "int \fBdns_timeout\fP" +.br +.ti -1c +.RI "int \fBNetBufferSize\fP" +.br +.ti -1c +.RI "int \fBMaxConn\fP" +.br +.ti -1c +.RI "unsigned int \fBSoftLimit\fP" +.br +.ti -1c +.RI "int \fBMaxWhoResults\fP" +.br +.ti -1c +.RI "int \fBdebugging\fP" +.br +.ti -1c +.RI "int \fBLogLevel\fP" +.br +.ti -1c +.RI "int \fBDieDelay\fP" +.br +.ti -1c +.RI "char \fBaddrs\fP [MAXBUF][255]" +.br +.ti -1c +.RI "\fBfile_cache\fP \fBMOTD\fP" +.br +.ti -1c +.RI "\fBfile_cache\fP \fBRULES\fP" +.br +.ti -1c +.RI "char \fBPID\fP [1024]" +.br +.ti -1c +.RI "std::stringstream \fBconfig_f\fP" +.br +.ti -1c +.RI "\fBClassVector\fP \fBClasses\fP" +.br +.ti -1c +.RI "std::vector< \fBstd::string\fP > \fBmodule_names\fP" +.br +.in -1c +.SS "Private Member Functions" + +.in +1c +.ti -1c +.RI "int \fBfgets_safe\fP (char *buffer, size_t maxsize, FILE *&file)" +.br +.ti -1c +.RI "\fBstd::string\fP \fBConfProcess\fP (char *buffer, long linenumber, std::stringstream *errorstream, bool &error, \fBstd::string\fP filename)" +.br +.in -1c +.SS "Private Attributes" + +.in +1c +.ti -1c +.RI "std::vector< \fBstd::string\fP > \fBinclude_stack\fP" +.br +.in -1c +.SH "Detailed Description" +.PP +Definition at line 34 of file inspircd_io.h. +.SH "Constructor & Destructor Documentation" +.PP +.SS "ServerConfig::ServerConfig ()" +.PP +.SH "Member Function Documentation" +.PP +.SS "void ServerConfig::ClearStack ()" +.PP +Referenced by ConfigReader::ConfigReader(). +.SS "\fBstd::string\fP ServerConfig::ConfProcess (char * buffer, long linenumber, std::stringstream * errorstream, bool & error, \fBstd::string\fP filename)\fC [private]\fP" +.PP +.SS "int ServerConfig::ConfValue (char * tag, char * var, int index, char * result, std::stringstream * config)" +.PP +Referenced by userrec::HasPermission(). +.SS "int ServerConfig::ConfValueEnum (char * tag, std::stringstream * config)" +.PP +.SS "int ServerConfig::EnumConf (std::stringstream * config_f, const char * tag)" +.PP +Referenced by ConfigReader::Enumerate(). +.SS "int ServerConfig::EnumValues (std::stringstream * config, const char * tag, int index)" +.PP +Referenced by ConfigReader::EnumerateValues(). +.SS "int ServerConfig::fgets_safe (char * buffer, size_t maxsize, FILE *& file)\fC [private]\fP" +.PP +.SS "bool ServerConfig::LoadConf (const char * filename, std::stringstream * target, std::stringstream * errorstream)" +.PP +Referenced by ConfigReader::ConfigReader(). +.SS "void ServerConfig::Read (bool bail, \fBuserrec\fP * user)" +.PP +Referenced by Server::RehashServer(). +.SS "int ServerConfig::ReadConf (std::stringstream * config_f, const char * tag, const char * var, int index, char * result)" +.PP +Referenced by ConfigReader::ReadFlag(), ConfigReader::ReadInteger(), and ConfigReader::ReadValue(). +.SH "Member Data Documentation" +.PP +.SS "char \fBServerConfig::addrs\fP[MAXBUF][255]" +.PP +Definition at line 70 of file inspircd_io.h. +.SS "char \fBServerConfig::AdminEmail\fP[MAXBUF]" +.PP +Definition at line 46 of file inspircd_io.h. +.SS "char \fBServerConfig::AdminName\fP[MAXBUF]" +.PP +Definition at line 45 of file inspircd_io.h. +.SS "char \fBServerConfig::AdminNick\fP[MAXBUF]" +.PP +Definition at line 47 of file inspircd_io.h. +.SS "bool \fBServerConfig::AllowHalfop\fP" +.PP +Definition at line 61 of file inspircd_io.h. +.SS "\fBClassVector\fP \fBServerConfig::Classes\fP" +.PP +Definition at line 75 of file inspircd_io.h. +.SS "std::stringstream \fBServerConfig::config_f\fP" +.PP +Definition at line 74 of file inspircd_io.h. +.PP +Referenced by userrec::HasPermission(). +.SS "int \fBServerConfig::debugging\fP" +.PP +Definition at line 67 of file inspircd_io.h. +.SS "int \fBServerConfig::DieDelay\fP" +.PP +Definition at line 69 of file inspircd_io.h. +.SS "char \fBServerConfig::diepass\fP[MAXBUF]" +.PP +Definition at line 48 of file inspircd_io.h. +.SS "char \fBServerConfig::DieValue\fP[MAXBUF]" +.PP +Definition at line 53 of file inspircd_io.h. +.SS "char \fBServerConfig::DisabledCommands\fP[MAXBUF]" +.PP +Definition at line 55 of file inspircd_io.h. +.SS "int \fBServerConfig::dns_timeout\fP" +.PP +Definition at line 62 of file inspircd_io.h. +.SS "char \fBServerConfig::DNSServer\fP[MAXBUF]" +.PP +Definition at line 54 of file inspircd_io.h. +.SS "std::vector<\fBstd::string\fP> \fBServerConfig::include_stack\fP\fC [private]\fP" +.PP +Definition at line 37 of file inspircd_io.h. +.SS "FILE* \fBServerConfig::log_file\fP" +.PP +Definition at line 58 of file inspircd_io.h. +.SS "int \fBServerConfig::LogLevel\fP" +.PP +Definition at line 68 of file inspircd_io.h. +.SS "int \fBServerConfig::MaxConn\fP" +.PP +Definition at line 64 of file inspircd_io.h. +.SS "int \fBServerConfig::MaxWhoResults\fP" +.PP +Definition at line 66 of file inspircd_io.h. +.SS "char \fBServerConfig::ModPath\fP[1024]" +.PP +Definition at line 56 of file inspircd_io.h. +.SS "std::vector<\fBstd::string\fP> \fBServerConfig::module_names\fP" +.PP +Definition at line 76 of file inspircd_io.h. +.PP +Referenced by Server::FindModule(). +.SS "\fBfile_cache\fP \fBServerConfig::MOTD\fP" +.PP +Definition at line 71 of file inspircd_io.h. +.SS "char \fBServerConfig::motd\fP[MAXBUF]" +.PP +Definition at line 50 of file inspircd_io.h. +.SS "char \fBServerConfig::MyExecutable\fP[1024]" +.PP +Definition at line 57 of file inspircd_io.h. +.SS "int \fBServerConfig::NetBufferSize\fP" +.PP +Definition at line 63 of file inspircd_io.h. +.SS "char \fBServerConfig::Network\fP[MAXBUF]" +.PP +Definition at line 43 of file inspircd_io.h. +.SS "bool \fBServerConfig::nofork\fP" +.PP +Definition at line 59 of file inspircd_io.h. +.SS "char \fBServerConfig::PID\fP[1024]" +.PP +Definition at line 73 of file inspircd_io.h. +.SS "char \fBServerConfig::PrefixQuit\fP[MAXBUF]" +.PP +Definition at line 52 of file inspircd_io.h. +.SS "char \fBServerConfig::restartpass\fP[MAXBUF]" +.PP +Definition at line 49 of file inspircd_io.h. +.SS "\fBfile_cache\fP \fBServerConfig::RULES\fP" +.PP +Definition at line 72 of file inspircd_io.h. +.SS "char \fBServerConfig::rules\fP[MAXBUF]" +.PP +Definition at line 51 of file inspircd_io.h. +.SS "char \fBServerConfig::ServerDesc\fP[MAXBUF]" +.PP +Definition at line 44 of file inspircd_io.h. +.SS "char \fBServerConfig::ServerName\fP[MAXBUF]" +.PP +Definition at line 42 of file inspircd_io.h. +.PP +Referenced by userrec::userrec(). +.SS "unsigned int \fBServerConfig::SoftLimit\fP" +.PP +Definition at line 65 of file inspircd_io.h. +.SS "bool \fBServerConfig::unlimitcore\fP" +.PP +Definition at line 60 of file inspircd_io.h. + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/man3/SocketEngine.3 b/docs/man/man3/SocketEngine.3 index 232d8f8cd..07daeff47 100644 --- a/docs/man/man3/SocketEngine.3 +++ b/docs/man/man3/SocketEngine.3 @@ -1,4 +1,4 @@ -.TH "SocketEngine" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "SocketEngine" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -192,7 +192,7 @@ Referenced by InspSocket::Poll(), and Server::UserToPseudo(). 120 } 121 #ifdef USE_KQUEUE 122 struct kevent ke; -123 EV_SET(&ke, fd, ref[fd] && X_READBIT ? EVFILT_READ : EVFILT_WRITE, EV_DELETE, 0, 0, NULL); +123 EV_SET(&ke, fd, ref[fd] & X_READBIT ? EVFILT_READ : EVFILT_WRITE, EV_DELETE, 0, 0, NULL); 124 int i = kevent(EngineHandle, &ke, 1, 0, 0, NULL); 125 if (i == -1) 126 { @@ -220,21 +220,21 @@ Referenced by InspSocket::Poll(), and Server::UserToPseudo(). .PP Returns the socket engines name This returns the name of the engine for use in /VERSION responses. .PP -Definition at line 196 of file socketengine.cpp. +Definition at line 193 of file socketengine.cpp. .PP .nf -197 { -198 #ifdef USE_SELECT -199 return 'select'; +194 { +195 #ifdef USE_SELECT +196 return 'select'; +197 #endif +198 #ifdef USE_KQUEUE +199 return 'kqueue'; 200 #endif -201 #ifdef USE_KQUEUE -202 return 'kqueue'; +201 #ifdef USE_EPOLL +202 return 'epoll'; 203 #endif -204 #ifdef USE_EPOLL -205 return 'epoll'; -206 #endif -207 return 'misconfigured'; -208 } +204 return 'misconfigured'; +205 } .fi .PP .SS "char SocketEngine::GetType (int fd)" @@ -264,7 +264,7 @@ Please note that this doesnt wait long, only a couple of milliseconds. It return .PP Definition at line 146 of file socketengine.cpp. .PP -References DEBUG, EngineHandle, fds, ke_list, ref, ts, and X_READBIT. +References EngineHandle, fds, ke_list, ref, ts, and X_READBIT. .PP .nf 147 { @@ -294,27 +294,24 @@ References DEBUG, EngineHandle, fds, ke_list, ref, ts, and X_READBIT. 171 for (unsigned int a = 0; a < fds.size(); a++) 172 { 173 if ((FD_ISSET (fds[a], &rfdset)) || (FD_ISSET (fds[a], &wfdset))) -174 { -175 log(DEBUG,'...Adding active %d',fds[a]); -176 fdlist.push_back(fds[a]); -177 } -178 } -179 } -180 #endif -181 #ifdef USE_KQUEUE -182 ts.tv_nsec = 10000L; -183 ts.tv_sec = 0; -184 int i = kevent(EngineHandle, NULL, 0, &ke_list[0], 65535, &ts); -185 for (int j = 0; j < i; j++) -186 fdlist.push_back(ke_list[j].ident); -187 #endif -188 #ifdef USE_EPOLL -189 int i = epoll_wait(EngineHandle, events, 65535, 100); -190 for (int j = 0; j < i; j++) -191 fdlist.push_back(events[j].data.fd); -192 #endif -193 return true; -194 } +174 fdlist.push_back(fds[a]); +175 } +176 } +177 #endif +178 #ifdef USE_KQUEUE +179 ts.tv_nsec = 10000L; +180 ts.tv_sec = 0; +181 int i = kevent(EngineHandle, NULL, 0, &ke_list[0], 65535, &ts); +182 for (int j = 0; j < i; j++) +183 fdlist.push_back(ke_list[j].ident); +184 #endif +185 #ifdef USE_EPOLL +186 int i = epoll_wait(EngineHandle, events, 65535, 100); +187 for (int j = 0; j < i; j++) +188 fdlist.push_back(events[j].data.fd); +189 #endif +190 return true; +191 } .fi .PP .SH "Member Data Documentation" diff --git a/docs/man/man3/Version.3 b/docs/man/man3/Version.3 index 049c18e95..5cc2a2b77 100644 --- a/docs/man/man3/Version.3 +++ b/docs/man/man3/Version.3 @@ -1,4 +1,4 @@ -.TH "Version" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "Version" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -49,10 +49,10 @@ Definition at line 113 of file modules.h. .PP .SS "Version::Version (int major, int minor, int revision, int build, int flags)" .PP -Definition at line 240 of file modules.cpp. +Definition at line 167 of file modules.cpp. .PP .nf -240 : Major(major), Minor(minor), Revision(revision), Build(build), Flags(flags) { }; +167 : Major(major), Minor(minor), Revision(revision), Build(build), Flags(flags) { }; .fi .PP .SH "Member Data Documentation" diff --git a/docs/man/man3/WhoWasUser.3 b/docs/man/man3/WhoWasUser.3 index 49e8e61ea..77a8d08e4 100644 --- a/docs/man/man3/WhoWasUser.3 +++ b/docs/man/man3/WhoWasUser.3 @@ -1,4 +1,4 @@ -.TH "WhoWasUser" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "WhoWasUser" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/XLine.3 b/docs/man/man3/XLine.3 index 0c98f6fb8..8eed9ef38 100644 --- a/docs/man/man3/XLine.3 +++ b/docs/man/man3/XLine.3 @@ -1,4 +1,4 @@ -.TH "XLine" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "XLine" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -42,36 +42,36 @@ Inherited by \fBELine\fP, \fBGLine\fP, \fBKLine\fP, \fBQLine\fP, and \fBZLine\fP .PP XLine is the base class for ban lines such as G lines and K lines. .PP -Definition at line 34 of file xline.h. +Definition at line 39 of file xline.h. .SH "Member Data Documentation" .PP .SS "long \fBXLine::duration\fP" .PP The duration of the ban, or 0 if permenant. .PP -Definition at line 44 of file xline.h. +Definition at line 49 of file xline.h. .SS "long \fBXLine::n_matches\fP" .PP Number of times the core matches the ban, for statistics. .PP -Definition at line 56 of file xline.h. +Definition at line 61 of file xline.h. .SS "char \fBXLine::reason\fP[MAXBUF]" .PP Reason for the ban. .PP -Definition at line 52 of file xline.h. +Definition at line 57 of file xline.h. .SS "time_t \fBXLine::set_time\fP" .PP The time the line was added. .PP -Definition at line 40 of file xline.h. +Definition at line 45 of file xline.h. .SS "char \fBXLine::source\fP[256]" .PP Source of the ban. .PP This can be a servername or an oper nickname .PP -Definition at line 48 of file xline.h. +Definition at line 53 of file xline.h. .SH "Author" .PP diff --git a/docs/man/man3/ZLine.3 b/docs/man/man3/ZLine.3 index c52b909bd..0bd28d854 100644 --- a/docs/man/man3/ZLine.3 +++ b/docs/man/man3/ZLine.3 @@ -1,4 +1,4 @@ -.TH "ZLine" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ZLine" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -28,21 +28,21 @@ Inherits \fBXLine\fP. .PP ZLine class. .PP -Definition at line 93 of file xline.h. +Definition at line 98 of file xline.h. .SH "Member Data Documentation" .PP .SS "char \fBZLine::ipaddr\fP[40]" .PP IP Address (xx.yy.zz.aa) to match against May contain wildcards. .PP -Definition at line 99 of file xline.h. +Definition at line 104 of file xline.h. .SS "bool \fBZLine::is_global\fP" .PP Set if this is a global Z:line (e.g. .PP it came from another server) .PP -Definition at line 103 of file xline.h. +Definition at line 108 of file xline.h. .SH "Author" .PP diff --git a/docs/man/man3/_home_.3 b/docs/man/man3/_home_.3 index eaef28c19..854a16ffe 100644 --- a/docs/man/man3/_home_.3 +++ b/docs/man/man3/_home_.3 @@ -1,4 +1,4 @@ -.TH "/home/ Directory Reference" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "/home/ Directory Reference" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/_home_brain_.3 b/docs/man/man3/_home_brain_.3 index 51ba923b1..8d5e2c76e 100644 --- a/docs/man/man3/_home_brain_.3 +++ b/docs/man/man3/_home_brain_.3 @@ -1,4 +1,4 @@ -.TH "/home/brain/ Directory Reference" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "/home/brain/ Directory Reference" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/_home_brain_inspircd-cvs_.3 b/docs/man/man3/_home_brain_inspircd-cvs_.3 index a70c8e255..2c61b2388 100644 --- a/docs/man/man3/_home_brain_inspircd-cvs_.3 +++ b/docs/man/man3/_home_brain_inspircd-cvs_.3 @@ -1,4 +1,4 @@ -.TH "/home/brain/inspircd-cvs/ Directory Reference" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "/home/brain/inspircd-cvs/ Directory Reference" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/_home_brain_inspircd-cvs_inspircd_.3 b/docs/man/man3/_home_brain_inspircd-cvs_inspircd_.3 index 19a4103cb..e1366b44a 100644 --- a/docs/man/man3/_home_brain_inspircd-cvs_inspircd_.3 +++ b/docs/man/man3/_home_brain_inspircd-cvs_inspircd_.3 @@ -1,4 +1,4 @@ -.TH "/home/brain/inspircd-cvs/inspircd/ Directory Reference" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "/home/brain/inspircd-cvs/inspircd/ Directory Reference" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/_home_brain_inspircd-cvs_inspircd_include_.3 b/docs/man/man3/_home_brain_inspircd-cvs_inspircd_include_.3 index 750f41485..3f59aa590 100644 --- a/docs/man/man3/_home_brain_inspircd-cvs_inspircd_include_.3 +++ b/docs/man/man3/_home_brain_inspircd-cvs_inspircd_include_.3 @@ -1,4 +1,4 @@ -.TH "/home/brain/inspircd-cvs/inspircd/include/ Directory Reference" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "/home/brain/inspircd-cvs/inspircd/include/ Directory Reference" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -28,6 +28,9 @@ .RI "file \fBhashcomp.h\fP" .br .ti -1c +.RI "file \fBinspircd_io.h\fP" +.br +.ti -1c .RI "file \fBmessage.h\fP" .br .ti -1c @@ -43,6 +46,12 @@ .RI "file \fBsocketengine.h\fP" .br .ti -1c +.RI "file \fBtypedefs.h\fP" +.br +.ti -1c +.RI "file \fBuserprocess.h\fP" +.br +.ti -1c .RI "file \fBusers.h\fP" .br .ti -1c diff --git a/docs/man/man3/_home_brain_inspircd-cvs_inspircd_src_.3 b/docs/man/man3/_home_brain_inspircd-cvs_inspircd_src_.3 index c79335d94..846f10c4e 100644 --- a/docs/man/man3/_home_brain_inspircd-cvs_inspircd_src_.3 +++ b/docs/man/man3/_home_brain_inspircd-cvs_inspircd_src_.3 @@ -1,4 +1,4 @@ -.TH "/home/brain/inspircd-cvs/inspircd/src/ Directory Reference" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "/home/brain/inspircd-cvs/inspircd/src/ Directory Reference" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/base.h.3 b/docs/man/man3/base.h.3 index b455c26f7..1fbc395b3 100644 --- a/docs/man/man3/base.h.3 +++ b/docs/man/man3/base.h.3 @@ -1,4 +1,4 @@ -.TH "base.h" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "base.h" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/channels.cpp.3 b/docs/man/man3/channels.cpp.3 index 710a729f5..429b0ccdd 100644 --- a/docs/man/man3/channels.cpp.3 +++ b/docs/man/man3/channels.cpp.3 @@ -1,4 +1,4 @@ -.TH "channels.cpp" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "channels.cpp" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -77,6 +77,9 @@ channels.cpp \- .in +1c .ti -1c +.RI "\fBServerConfig\fP * \fBConfig\fP" +.br +.ti -1c .RI "int \fBMODCOUNT\fP = -1" .br .ti -1c @@ -86,90 +89,24 @@ channels.cpp \- .RI "std::vector< \fBircd_module\fP * > \fBfactory\fP" .br .ti -1c -.RI "int \fBLogLevel\fP" -.br -.ti -1c -.RI "char \fBServerName\fP [MAXBUF]" -.br -.ti -1c -.RI "char \fBNetwork\fP [MAXBUF]" -.br -.ti -1c -.RI "char \fBServerDesc\fP [MAXBUF]" -.br -.ti -1c -.RI "char \fBAdminName\fP [MAXBUF]" -.br -.ti -1c -.RI "char \fBAdminEmail\fP [MAXBUF]" -.br -.ti -1c -.RI "char \fBAdminNick\fP [MAXBUF]" -.br -.ti -1c -.RI "char \fBdiepass\fP [MAXBUF]" -.br -.ti -1c -.RI "char \fBrestartpass\fP [MAXBUF]" -.br -.ti -1c -.RI "char \fBmotd\fP [MAXBUF]" -.br -.ti -1c -.RI "char \fBrules\fP [MAXBUF]" -.br -.ti -1c -.RI "char \fBlist\fP [MAXBUF]" -.br -.ti -1c -.RI "char \fBPrefixQuit\fP [MAXBUF]" -.br -.ti -1c -.RI "char \fBDieValue\fP [MAXBUF]" -.br -.ti -1c -.RI "int \fBdebugging\fP" -.br -.ti -1c .RI "int \fBWHOWAS_STALE\fP" .br .ti -1c .RI "int \fBWHOWAS_MAX\fP" .br .ti -1c -.RI "int \fBDieDelay\fP" -.br -.ti -1c .RI "time_t \fBstartup_time\fP" .br .ti -1c -.RI "int \fBNetBufferSize\fP" -.br -.ti -1c -.RI "int \fBMaxWhoResults\fP" -.br -.ti -1c -.RI "time_t \fBnb_start\fP" -.br -.ti -1c .RI "std::vector< \fBstd::string\fP > \fBmodule_names\fP" .br .ti -1c .RI "int \fBboundPortCount\fP" .br .ti -1c -.RI "int \fBportCount\fP" -.br -.ti -1c -.RI "int \fBports\fP [MAXSOCKS]" -.br -.ti -1c .RI "std::stringstream \fBconfig_f\fP" .br .ti -1c -.RI "FILE * \fBlog_file\fP" -.br -.ti -1c .RI "time_t \fBTIME\fP" .br .ti -1c @@ -183,76 +120,29 @@ channels.cpp \- Definition at line 53 of file channels.cpp. .SH "Variable Documentation" .PP -.SS "char \fBAdminEmail\fP[MAXBUF]" -.PP -.SS "char \fBAdminName\fP[MAXBUF]" -.PP -.SS "char \fBAdminNick\fP[MAXBUF]" -.PP .SS "int \fBboundPortCount\fP" .PP +.SS "\fBServerConfig\fP* \fBConfig\fP" +.PP .SS "std::stringstream \fBconfig_f\fP" .PP -Referenced by userrec::HasPermission(). .SS "std::vector<\fBModeParameter\fP> \fBcustom_mode_params\fP" .PP -Definition at line 99 of file channels.cpp. +Definition at line 71 of file channels.cpp. .PP Referenced by chanrec::GetModeParameter(), and chanrec::SetCustomModeParam(). -.SS "int \fBdebugging\fP" -.PP -.SS "int \fBDieDelay\fP" -.PP -.SS "char \fBdiepass\fP[MAXBUF]" -.PP -.SS "char \fBDieValue\fP[MAXBUF]" -.PP .SS "std::vector<\fBircd_module\fP*> factory" .PP -.SS "char \fBlist\fP[MAXBUF]" -.PP -Referenced by Server::GetUsers(). -.SS "FILE* \fBlog_file\fP" -.PP -.SS "int \fBLogLevel\fP" -.PP -.SS "int \fBMaxWhoResults\fP" -.PP -Definition at line 81 of file channels.cpp. .SS "int \fBMODCOUNT\fP = -1" .PP -Definition at line 1005 of file modules.cpp. +Definition at line 933 of file modules.cpp. .PP Referenced by Server::FindModule(). .SS "std::vector<\fBstd::string\fP> \fBmodule_names\fP" .PP -Referenced by Server::FindModule(). .SS "std::vector<\fBModule\fP*> modules" .PP Referenced by Server::FindModule(). -.SS "char \fBmotd\fP[MAXBUF]" -.PP -.SS "time_t \fBnb_start\fP" -.PP -.SS "int \fBNetBufferSize\fP" -.PP -.SS "char \fBNetwork\fP[MAXBUF]" -.PP -.SS "int \fBportCount\fP" -.PP -.SS "int \fBports\fP[MAXSOCKS]" -.PP -.SS "char \fBPrefixQuit\fP[MAXBUF]" -.PP -.SS "char \fBrestartpass\fP[MAXBUF]" -.PP -.SS "char \fBrules\fP[MAXBUF]" -.PP -.SS "char \fBServerDesc\fP[MAXBUF]" -.PP -.SS "char \fBServerName\fP[MAXBUF]" -.PP -Referenced by userrec::userrec(). .SS "time_t \fBstartup_time\fP" .PP .SS "time_t \fBTIME\fP" diff --git a/docs/man/man3/channels.h.3 b/docs/man/man3/channels.h.3 index 8665d0189..f1fb458f0 100644 --- a/docs/man/man3/channels.h.3 +++ b/docs/man/man3/channels.h.3 @@ -1,4 +1,4 @@ -.TH "channels.h" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "channels.h" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/chanrec.3 b/docs/man/man3/chanrec.3 index c02b05305..3a6a2b8d3 100644 --- a/docs/man/man3/chanrec.3 +++ b/docs/man/man3/chanrec.3 @@ -1,4 +1,4 @@ -.TH "chanrec" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "chanrec" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -116,21 +116,21 @@ Definition at line 101 of file channels.h. .PP Creates a channel record and initialises it with default values. .PP -Definition at line 101 of file channels.cpp. +Definition at line 73 of file channels.cpp. .PP References binarymodes, created, custom_modes, internal_userlist, key, limit, name, setby, topic, and topicset. .PP .nf -102 { -103 strcpy(name,''); -104 strcpy(custom_modes,''); -105 strcpy(topic,''); -106 strcpy(setby,''); -107 strcpy(key,''); -108 created = topicset = limit = 0; -109 binarymodes = 0; -110 internal_userlist.clear(); -111 } +74 { +75 strcpy(name,''); +76 strcpy(custom_modes,''); +77 strcpy(topic,''); +78 strcpy(setby,''); +79 strcpy(key,''); +80 created = topicset = limit = 0; +81 binarymodes = 0; +82 internal_userlist.clear(); +83 } .fi .PP .SS "virtual chanrec::~chanrec ()\fC [inline, virtual]\fP" @@ -154,15 +154,15 @@ Add a user pointer to the internal reference list. .PP The data inserted into the reference list is a table as it is an arbitary pointer compared to other users by its memory address, as this is a very fast 32 or 64 bit integer comparison. .PP -Definition at line 194 of file channels.cpp. +Definition at line 166 of file channels.cpp. .PP References DEBUG, and internal_userlist. .PP .nf -195 { -196 internal_userlist.push_back(castuser); -197 log(DEBUG,'Added casted user to channel's internal list'); -198 } +167 { +168 internal_userlist.push_back(castuser); +169 log(DEBUG,'Added casted user to channel's internal list'); +170 } .fi .PP .SS "void chanrec::DelUser (char * castuser)" @@ -176,23 +176,23 @@ Delete a user pointer to the internal reference list. .PP The data removed from the reference list is a table as it is an arbitary pointer compared to other users by its memory address, as this is a very fast 32 or 64 bit integer comparison. .PP -Definition at line 200 of file channels.cpp. +Definition at line 172 of file channels.cpp. .PP References DEBUG, internal_userlist, and name. .PP .nf -201 { -202 for (std::vector<char*>::iterator a = internal_userlist.begin(); a < internal_userlist.end(); a++) -203 { -204 if (*a == castuser) -205 { -206 log(DEBUG,'Removed casted user from channel's internal list'); -207 internal_userlist.erase(a); -208 return; -209 } -210 } -211 log(DEBUG,'BUG BUG BUG! Attempt to remove an uncasted user from the internal list of %s!',name); -212 } +173 { +174 for (std::vector<char*>::iterator a = internal_userlist.begin(); a < internal_userlist.end(); a++) +175 { +176 if (*a == castuser) +177 { +178 log(DEBUG,'Removed casted user from channel's internal list'); +179 internal_userlist.erase(a); +180 return; +181 } +182 } +183 log(DEBUG,'BUG BUG BUG! Attempt to remove an uncasted user from the internal list of %s!',name); +184 } .fi .PP .SS "\fBstd::string\fP chanrec::GetModeParameter (char mode)" @@ -213,24 +213,24 @@ The parameter for this mode is returned, or an empty string .PP .PP -Definition at line 174 of file channels.cpp. +Definition at line 146 of file channels.cpp. .PP References custom_mode_params. .PP .nf -175 { -176 if (custom_mode_params.size()) -177 { -178 for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++) -179 { -180 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel))) -181 { -182 return i->parameter; -183 } -184 } -185 } -186 return ''; -187 } +147 { +148 if (custom_mode_params.size()) +149 { +150 for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++) +151 { +152 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel))) +153 { +154 return i->parameter; +155 } +156 } +157 } +158 return ''; +159 } .fi .PP .SS "long chanrec::GetUserCounter ()" @@ -244,12 +244,12 @@ The number of users on this channel .PP .PP -Definition at line 189 of file channels.cpp. +Definition at line 161 of file channels.cpp. .PP .nf -190 { -191 return (this->internal_userlist.size()); -192 } +162 { +163 return (this->internal_userlist.size()); +164 } .fi .PP .SS "std::vector< char * > * chanrec::GetUsers ()" @@ -265,16 +265,16 @@ This function returns a vector of userrec pointers, each of which has been caste .PP .PP -Definition at line 214 of file channels.cpp. +Definition at line 186 of file channels.cpp. .PP References internal_userlist. .PP Referenced by Server::GetUsers(). .PP .nf -215 { -216 return &internal_userlist; -217 } +187 { +188 return &internal_userlist; +189 } .fi .PP .SS "bool chanrec::IsCustomModeSet (char mode)" @@ -293,12 +293,12 @@ True if the custom mode is set, false if otherwise .PP .PP -Definition at line 169 of file channels.cpp. +Definition at line 141 of file channels.cpp. .PP .nf -170 { -171 return (strchr(this->custom_modes,mode)); -172 } +142 { +143 return (strchr(this->custom_modes,mode)); +144 } .fi .PP .SS "void chanrec::SetCustomMode (char mode, bool mode_on)" @@ -314,33 +314,33 @@ Sets or unsets a custom mode in the channels info. .PP .PP -Definition at line 113 of file channels.cpp. +Definition at line 85 of file channels.cpp. .PP References custom_modes, DEBUG, and SetCustomModeParam(). .PP .nf -114 { -115 if (mode_on) { -116 static char m[3]; -117 m[0] = mode; -118 m[1] = '\0'; -119 if (!strchr(this->custom_modes,mode)) -120 { -121 strlcat(custom_modes,m,MAXMODES); -122 } -123 log(DEBUG,'Custom mode %c set',mode); -124 } -125 else { -126 -127 std::string a = this->custom_modes; -128 int pos = a.find(mode); -129 a.erase(pos,1); -130 strncpy(this->custom_modes,a.c_str(),MAXMODES); -131 -132 log(DEBUG,'Custom mode %c removed: modelist='%s'',mode,this->custom_modes); -133 this->SetCustomModeParam(mode,'',false); -134 } -135 } +86 { +87 if (mode_on) { +88 static char m[3]; +89 m[0] = mode; +90 m[1] = '\0'; +91 if (!strchr(this->custom_modes,mode)) +92 { +93 strlcat(custom_modes,m,MAXMODES); +94 } +95 log(DEBUG,'Custom mode %c set',mode); +96 } +97 else { +98 +99 std::string a = this->custom_modes; +100 int pos = a.find(mode); +101 a.erase(pos,1); +102 strncpy(this->custom_modes,a.c_str(),MAXMODES); +103 +104 log(DEBUG,'Custom mode %c removed: modelist='%s'',mode,this->custom_modes); +105 this->SetCustomModeParam(mode,'',false); +106 } +107 } .fi .PP .SS "void chanrec::SetCustomModeParam (char mode, char * parameter, bool mode_on)" @@ -358,42 +358,42 @@ Sets or unsets the parameters for a custom mode in a channels info. .PP .PP -Definition at line 138 of file channels.cpp. +Definition at line 110 of file channels.cpp. .PP References ModeParameter::channel, custom_mode_params, DEBUG, ModeParameter::mode, and ModeParameter::parameter. .PP Referenced by SetCustomMode(). .PP .nf -139 { -140 -141 log(DEBUG,'SetCustomModeParam called'); -142 ModeParameter M; -143 M.mode = mode; -144 strlcpy(M.channel,this->name,CHANMAX); -145 strlcpy(M.parameter,parameter,MAXBUF); -146 if (mode_on) -147 { -148 log(DEBUG,'Custom mode parameter %c %s added',mode,parameter); -149 custom_mode_params.push_back(M); -150 } -151 else -152 { -153 if (custom_mode_params.size()) -154 { -155 for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++) -156 { -157 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel))) -158 { -159 log(DEBUG,'Custom mode parameter %c %s removed',mode,parameter); -160 custom_mode_params.erase(i); -161 return; -162 } -163 } -164 } -165 log(DEBUG,'*** BUG *** Attempt to remove non-existent mode parameter!'); -166 } -167 } +111 { +112 +113 log(DEBUG,'SetCustomModeParam called'); +114 ModeParameter M; +115 M.mode = mode; +116 strlcpy(M.channel,this->name,CHANMAX); +117 strlcpy(M.parameter,parameter,MAXBUF); +118 if (mode_on) +119 { +120 log(DEBUG,'Custom mode parameter %c %s added',mode,parameter); +121 custom_mode_params.push_back(M); +122 } +123 else +124 { +125 if (custom_mode_params.size()) +126 { +127 for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++) +128 { +129 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel))) +130 { +131 log(DEBUG,'Custom mode parameter %c %s removed',mode,parameter); +132 custom_mode_params.erase(i); +133 return; +134 } +135 } +136 } +137 log(DEBUG,'*** BUG *** Attempt to remove non-existent mode parameter!'); +138 } +139 } .fi .PP .SH "Member Data Documentation" diff --git a/docs/man/man3/classbase.3 b/docs/man/man3/classbase.3 index 88d263294..3982b20ac 100644 --- a/docs/man/man3/classbase.3 +++ b/docs/man/man3/classbase.3 @@ -1,4 +1,4 @@ -.TH "classbase" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "classbase" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -10,7 +10,7 @@ classbase \- The base class for all inspircd classes. .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, \fBModuleMessage\fP, \fBServer\fP, \fBucrec\fP, \fBVersion\fP, and \fBXLine\fP. +Inherited by \fBAdmin\fP, \fBConfigReader\fP, \fBConnectClass\fP, \fBExtensible\fP, \fBExtMode\fP, \fBFileReader\fP, \fBHostItem\fP, \fBInvited\fP, \fBModeParameter\fP, \fBModule\fP, \fBModuleFactory\fP, \fBModuleMessage\fP, \fBServer\fP, \fBServerConfig\fP, \fBucrec\fP, \fBVersion\fP, and \fBXLine\fP. .PP .SS "Public Member Functions" diff --git a/docs/man/man3/command_t.3 b/docs/man/man3/command_t.3 index a7338bde8..d9c551c30 100644 --- a/docs/man/man3/command_t.3 +++ b/docs/man/man3/command_t.3 @@ -1,4 +1,4 @@ -.TH "command_t" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "command_t" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/commands.h.3 b/docs/man/man3/commands.h.3 index 6655b2170..338196308 100644 --- a/docs/man/man3/commands.h.3 +++ b/docs/man/man3/commands.h.3 @@ -1,4 +1,4 @@ -.TH "commands.h" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "commands.h" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/connection.3 b/docs/man/man3/connection.3 index 36aaf10c6..46175dd7f 100644 --- a/docs/man/man3/connection.3 +++ b/docs/man/man3/connection.3 @@ -1,4 +1,4 @@ -.TH "connection" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "connection" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/connection.h.3 b/docs/man/man3/connection.h.3 index c53c68eb5..9cd67bf20 100644 --- a/docs/man/man3/connection.h.3 +++ b/docs/man/man3/connection.h.3 @@ -1,4 +1,4 @@ -.TH "connection.h" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "connection.h" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ctables.h.3 b/docs/man/man3/ctables.h.3 index 6af542e0a..f1b2cc9be 100644 --- a/docs/man/man3/ctables.h.3 +++ b/docs/man/man3/ctables.h.3 @@ -1,4 +1,4 @@ -.TH "ctables.h" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ctables.h" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/dns.h.3 b/docs/man/man3/dns.h.3 index e17b454c1..b22f0409c 100644 --- a/docs/man/man3/dns.h.3 +++ b/docs/man/man3/dns.h.3 @@ -1,4 +1,4 @@ -.TH "dns.h" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "dns.h" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/dns_ip4list.3 b/docs/man/man3/dns_ip4list.3 index 2d199c572..61d591237 100644 --- a/docs/man/man3/dns_ip4list.3 +++ b/docs/man/man3/dns_ip4list.3 @@ -1,4 +1,4 @@ -.TH "dns_ip4list" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "dns_ip4list" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/hashcomp.h.3 b/docs/man/man3/hashcomp.h.3 index 935f03185..751489424 100644 --- a/docs/man/man3/hashcomp.h.3 +++ b/docs/man/man3/hashcomp.h.3 @@ -1,4 +1,4 @@ -.TH "hashcomp.h" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "hashcomp.h" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/inspircd_io.h.3 b/docs/man/man3/inspircd_io.h.3 new file mode 100644 index 000000000..b832da93e --- /dev/null +++ b/docs/man/man3/inspircd_io.h.3 @@ -0,0 +1,110 @@ +.TH "inspircd_io.h" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +inspircd_io.h \- +.SH SYNOPSIS +.br +.PP +\fC#include <sstream>\fP +.br +\fC#include <string>\fP +.br +\fC#include <vector>\fP +.br +\fC#include 'inspircd.h'\fP +.br +\fC#include 'globals.h'\fP +.br + +.SS "Classes" + +.in +1c +.ti -1c +.RI "class \fBServerConfig\fP" +.br +.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 +.in -1c +.SS "Functions" + +.in +1c +.ti -1c +.RI "void \fBExit\fP (int)" +.br +.ti -1c +.RI "void \fBStart\fP (void)" +.br +.ti -1c +.RI "int \fBDaemonSeed\fP (void)" +.br +.ti -1c +.RI "bool \fBFileExists\fP (const char *file)" +.br +.ti -1c +.RI "int \fBOpenTCPSocket\fP (void)" +.br +.ti -1c +.RI "int \fBBindSocket\fP (int sockfd, struct sockaddr_in client, struct sockaddr_in server, int port, char *addr)" +.br +.ti -1c +.RI "void \fBWritePID\fP (\fBstd::string\fP filename)" +.br +.in -1c +.SH "Define Documentation" +.PP +.SS "#define DEBUG 10" +.PP +Definition at line 28 of file inspircd_io.h. +.PP +Referenced by Server::AddExtendedMode(), SocketEngine::AddFd(), chanrec::AddUser(), SocketEngine::DelFd(), chanrec::DelUser(), InspSocket::InspSocket(), InspSocket::Read(), userrec::RemoveInvite(), chanrec::SetCustomMode(), chanrec::SetCustomModeParam(), InspSocket::SetState(), userrec::SetWriteError(), SocketEngine::SocketEngine(), and SocketEngine::~SocketEngine(). +.SS "#define DEFAULT 30" +.PP +Definition at line 30 of file inspircd_io.h. +.SS "#define NONE 50" +.PP +Definition at line 32 of file inspircd_io.h. +.SS "#define SPARSE 40" +.PP +Definition at line 31 of file inspircd_io.h. +.SS "#define VERBOSE 20" +.PP +Definition at line 29 of file inspircd_io.h. +.SH "Function Documentation" +.PP +.SS "int BindSocket (int sockfd, struct sockaddr_in client, struct sockaddr_in server, int port, char * addr)" +.PP +Referenced by InspSocket::InspSocket(). +.SS "int DaemonSeed (void)" +.PP +.SS "void Exit (int)" +.PP +.SS "bool FileExists (const char * file)" +.PP +.SS "int OpenTCPSocket (void)" +.PP +Referenced by InspSocket::InspSocket(). +.SS "void Start (void)" +.PP +.SS "void WritePID (\fBstd::string\fP filename)" +.PP +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/man3/irc.3 b/docs/man/man3/irc.3 index 0e751fd80..71dc962ae 100644 --- a/docs/man/man3/irc.3 +++ b/docs/man/man3/irc.3 @@ -1,4 +1,4 @@ -.TH "irc" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "irc" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/irc_InAddr_HashComp.3 b/docs/man/man3/irc_InAddr_HashComp.3 index 3ae4dda7f..e06813d73 100644 --- a/docs/man/man3/irc_InAddr_HashComp.3 +++ b/docs/man/man3/irc_InAddr_HashComp.3 @@ -1,4 +1,4 @@ -.TH "irc::InAddr_HashComp" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "irc::InAddr_HashComp" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/irc_StrHashComp.3 b/docs/man/man3/irc_StrHashComp.3 index f5f557969..25f8918f9 100644 --- a/docs/man/man3/irc_StrHashComp.3 +++ b/docs/man/man3/irc_StrHashComp.3 @@ -1,4 +1,4 @@ -.TH "irc::StrHashComp" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "irc::StrHashComp" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/irc_irc_char_traits.3 b/docs/man/man3/irc_irc_char_traits.3 index b67ec6d03..5001fb780 100644 --- a/docs/man/man3/irc_irc_char_traits.3 +++ b/docs/man/man3/irc_irc_char_traits.3 @@ -1,4 +1,4 @@ -.TH "irc::irc_char_traits" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "irc::irc_char_traits" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/message.h.3 b/docs/man/man3/message.h.3 index 75ecb0ac3..719defbf5 100644 --- a/docs/man/man3/message.h.3 +++ b/docs/man/man3/message.h.3 @@ -1,4 +1,4 @@ -.TH "message.h" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "message.h" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -75,7 +75,7 @@ message.h \- .RI "void \fBTidyBan\fP (char *ban)" .br .ti -1c -.RI "char * \fBchlist\fP (\fBuserrec\fP *user, \fBuserrec\fP *source)" +.RI "\fBstd::string\fP \fBchlist\fP (\fBuserrec\fP *user, \fBuserrec\fP *source)" .br .ti -1c .RI "void \fBsend_network_quit\fP (const char *nick, const char *reason)" @@ -93,7 +93,7 @@ Referenced by Server::ChangeHost(). .SS "void ChangeName (\fBuserrec\fP * user, const char * gecos)" .PP Referenced by Server::ChangeGECOS(). -.SS "char* chlist (\fBuserrec\fP * user, \fBuserrec\fP * source)" +.SS "\fBstd::string\fP chlist (\fBuserrec\fP * user, \fBuserrec\fP * source)" .PP .SS "void chop (char * str)" .PP diff --git a/docs/man/man3/mode.h.3 b/docs/man/man3/mode.h.3 index 02d665158..19df0b06d 100644 --- a/docs/man/man3/mode.h.3 +++ b/docs/man/man3/mode.h.3 @@ -1,4 +1,4 @@ -.TH "mode.h" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "mode.h" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/modules.cpp.3 b/docs/man/man3/modules.cpp.3 index 0abe14ea7..2b4dae325 100644 --- a/docs/man/man3/modules.cpp.3 +++ b/docs/man/man3/modules.cpp.3 @@ -1,4 +1,4 @@ -.TH "modules.cpp" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "modules.cpp" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -62,39 +62,9 @@ modules.cpp \- .br \fC#include 'socketengine.h'\fP .br - -.SS "Classes" - -.in +1c -.ti -1c -.RI "class \fBExtMode\fP" +\fC#include 'typedefs.h'\fP .br -.in -1c -.SS "Typedefs" -.in +1c -.ti -1c -.RI "typedef nspace::hash_map< \fBstd::string\fP, \fBuserrec\fP *, nspace::hash< \fBstring\fP >, \fBirc::StrHashComp\fP > \fBuser_hash\fP" -.br -.ti -1c -.RI "typedef nspace::hash_map< \fBstd::string\fP, \fBchanrec\fP *, nspace::hash< \fBstring\fP >, \fBirc::StrHashComp\fP > \fBchan_hash\fP" -.br -.ti -1c -.RI "typedef nspace::hash_map< in_addr, \fBstring\fP *, nspace::hash< in_addr >, \fBirc::InAddr_HashComp\fP > \fBaddress_cache\fP" -.br -.ti -1c -.RI "typedef nspace::hash_map< \fBstd::string\fP, \fBWhoWasUser\fP *, nspace::hash< \fBstring\fP >, \fBirc::StrHashComp\fP > \fBwhowas_hash\fP" -.br -.ti -1c -.RI "typedef std::deque< \fBcommand_t\fP > \fBcommand_table\fP" -.br -.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 @@ -133,6 +103,9 @@ modules.cpp \- .RI "\fBSocketEngine\fP * \fBSE\fP" .br .ti -1c +.RI "\fBServerConfig\fP * \fBConfig\fP" +.br +.ti -1c .RI "int \fBMODCOUNT\fP = -1" .br .ti -1c @@ -142,84 +115,21 @@ modules.cpp \- .RI "std::vector< \fBircd_module\fP * > \fBfactory\fP" .br .ti -1c -.RI "std::vector< \fBstd::string\fP > \fBinclude_stack\fP" -.br -.ti -1c .RI "std::vector< \fBInspSocket\fP * > \fBmodule_sockets\fP" .br .ti -1c .RI "time_t \fBTIME\fP" .br .ti -1c -.RI "int \fBLogLevel\fP" -.br -.ti -1c -.RI "char \fBServerName\fP [MAXBUF]" -.br -.ti -1c -.RI "char \fBNetwork\fP [MAXBUF]" -.br -.ti -1c -.RI "char \fBServerDesc\fP [MAXBUF]" -.br -.ti -1c -.RI "char \fBAdminName\fP [MAXBUF]" -.br -.ti -1c -.RI "char \fBAdminEmail\fP [MAXBUF]" -.br -.ti -1c -.RI "char \fBAdminNick\fP [MAXBUF]" -.br -.ti -1c -.RI "char \fBdiepass\fP [MAXBUF]" -.br -.ti -1c -.RI "char \fBrestartpass\fP [MAXBUF]" -.br -.ti -1c -.RI "char \fBmotd\fP [MAXBUF]" -.br -.ti -1c -.RI "char \fBrules\fP [MAXBUF]" -.br -.ti -1c -.RI "char \fBlist\fP [MAXBUF]" -.br -.ti -1c -.RI "char \fBPrefixQuit\fP [MAXBUF]" -.br -.ti -1c -.RI "char \fBDieValue\fP [MAXBUF]" -.br -.ti -1c -.RI "int \fBdebugging\fP" -.br -.ti -1c .RI "int \fBWHOWAS_STALE\fP" .br .ti -1c .RI "int \fBWHOWAS_MAX\fP" .br .ti -1c -.RI "int \fBDieDelay\fP" -.br -.ti -1c .RI "time_t \fBstartup_time\fP" .br .ti -1c -.RI "int \fBNetBufferSize\fP" -.br -.ti -1c -.RI "int \fBMaxWhoResults\fP" -.br -.ti -1c -.RI "time_t \fBnb_start\fP" -.br -.ti -1c -.RI "std::vector< \fBstd::string\fP > \fBmodule_names\fP" -.br -.ti -1c .RI "int \fBboundPortCount\fP" .br .ti -1c @@ -229,12 +139,6 @@ modules.cpp \- .RI "int \fBports\fP [MAXSOCKS]" .br .ti -1c -.RI "std::stringstream \fBconfig_f\fP" -.br -.ti -1c -.RI "FILE * \fBlog_file\fP" -.br -.ti -1c .RI "\fBuserrec\fP * \fBfd_ref_table\fP [65536]" .br .ti -1c @@ -250,192 +154,157 @@ modules.cpp \- .RI "\fBcommand_table\fP \fBcmdlist\fP" .br .ti -1c -.RI "\fBfile_cache\fP \fBMOTD\fP" -.br -.ti -1c -.RI "\fBfile_cache\fP \fBRULES\fP" -.br -.ti -1c .RI "\fBaddress_cache\fP \fBIP\fP" .br .ti -1c .RI "\fBExtModeList\fP \fBEMode\fP" .br .in -1c -.SH "Typedef Documentation" -.PP -.SS "typedef nspace::hash_map<in_addr,\fBstring\fP*, nspace::hash<in_addr>, \fBirc::InAddr_HashComp\fP> \fBaddress_cache\fP" -.PP -Definition at line 117 of file modules.cpp. -.SS "typedef nspace::hash_map<\fBstd::string\fP, \fBchanrec\fP*, nspace::hash<\fBstring\fP>, \fBirc::StrHashComp\fP> \fBchan_hash\fP" -.PP -Definition at line 116 of file modules.cpp. -.SS "typedef std::deque<\fBcommand_t\fP> \fBcommand_table\fP" -.PP -Definition at line 119 of file modules.cpp. -.SS "typedef std::vector<\fBExtMode\fP> \fBExtModeList\fP" -.PP -Definition at line 145 of file modules.cpp. -.SS "typedef ExtModeList::iterator \fBExtModeListIter\fP" -.PP -Definition at line 146 of file modules.cpp. -.SS "typedef nspace::hash_map<\fBstd::string\fP, \fBuserrec\fP*, nspace::hash<\fBstring\fP>, \fBirc::StrHashComp\fP> \fBuser_hash\fP" -.PP -Definition at line 115 of file modules.cpp. -.SS "typedef nspace::hash_map<\fBstd::string\fP, \fBWhoWasUser\fP*, nspace::hash<\fBstring\fP>, \fBirc::StrHashComp\fP> \fBwhowas_hash\fP" -.PP -Definition at line 118 of file modules.cpp. .SH "Function Documentation" .PP .SS "bool DoAddExtendedMode (char modechar, int type, bool requires_oper, int params_on, int params_off)" .PP -Definition at line 215 of file modules.cpp. +Definition at line 142 of file modules.cpp. .PP References EMode, and ModeDefined(). .PP Referenced by Server::AddExtendedListMode(), and Server::AddExtendedMode(). .PP .nf -216 { -217 if (ModeDefined(modechar,type)) { -218 return false; -219 } -220 EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off)); -221 return true; -222 } +143 { +144 if (ModeDefined(modechar,type)) { +145 return false; +146 } +147 EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off)); +148 return true; +149 } .fi .PP .SS "std::vector<\fBircd_module\fP*> factory (255)" .PP .SS "bool ModeDefined (char modechar, int type)" .PP -Definition at line 152 of file modules.cpp. +Definition at line 79 of file modules.cpp. .PP References EMode. .PP Referenced by DoAddExtendedMode(). .PP .nf -153 { -154 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -155 { -156 if ((i->modechar == modechar) && (i->type == type)) -157 { -158 return true; -159 } -160 } -161 return false; -162 } +80 { +81 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +82 { +83 if ((i->modechar == modechar) && (i->type == type)) +84 { +85 return true; +86 } +87 } +88 return false; +89 } .fi .PP .SS "int ModeDefinedOff (char modechar, int type)" .PP -Definition at line 202 of file modules.cpp. +Definition at line 129 of file modules.cpp. .PP References EMode. .PP .nf -203 { -204 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -205 { -206 if ((i->modechar == modechar) && (i->type == type)) -207 { -208 return i->params_when_off; -209 } -210 } -211 return 0; -212 } +130 { +131 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +132 { +133 if ((i->modechar == modechar) && (i->type == type)) +134 { +135 return i->params_when_off; +136 } +137 } +138 return 0; +139 } .fi .PP .SS "int ModeDefinedOn (char modechar, int type)" .PP -Definition at line 189 of file modules.cpp. +Definition at line 116 of file modules.cpp. .PP References EMode. .PP .nf -190 { -191 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -192 { -193 if ((i->modechar == modechar) && (i->type == type)) -194 { -195 return i->params_when_on; -196 } -197 } -198 return 0; -199 } +117 { +118 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +119 { +120 if ((i->modechar == modechar) && (i->type == type)) +121 { +122 return i->params_when_on; +123 } +124 } +125 return 0; +126 } .fi .PP .SS "bool ModeDefinedOper (char modechar, int type)" .PP -Definition at line 176 of file modules.cpp. +Definition at line 103 of file modules.cpp. .PP References EMode. .PP .nf -177 { -178 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -179 { -180 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true)) -181 { -182 return true; -183 } -184 } -185 return false; -186 } +104 { +105 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +106 { +107 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true)) +108 { +109 return true; +110 } +111 } +112 return false; +113 } .fi .PP .SS "bool ModeIsListMode (char modechar, int type)" .PP -Definition at line 164 of file modules.cpp. +Definition at line 91 of file modules.cpp. .PP References EMode. .PP .nf -165 { -166 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -167 { -168 if ((i->modechar == modechar) && (i->type == type) && (i->list == true)) -169 { -170 return true; -171 } -172 } -173 return false; -174 } +92 { +93 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +94 { +95 if ((i->modechar == modechar) && (i->type == type) && (i->list == true)) +96 { +97 return true; +98 } +99 } +100 return false; +101 } .fi .PP .SS "void ModeMakeList (char modechar)" .PP -Definition at line 225 of file modules.cpp. +Definition at line 152 of file modules.cpp. .PP References EMode, and MT_CHANNEL. .PP Referenced by Server::AddExtendedListMode(). .PP .nf -226 { -227 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -228 { -229 if ((i->modechar == modechar) && (i->type == MT_CHANNEL)) -230 { -231 i->list = true; -232 return; -233 } -234 } -235 return; -236 } +153 { +154 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +155 { +156 if ((i->modechar == modechar) && (i->type == MT_CHANNEL)) +157 { +158 i->list = true; +159 return; +160 } +161 } +162 return; +163 } .fi .PP .SS "std::vector<\fBModule\fP*> modules (255)" .PP .SH "Variable Documentation" .PP -.SS "char \fBAdminEmail\fP[MAXBUF]" -.PP -.SS "char \fBAdminName\fP[MAXBUF]" -.PP -.SS "char \fBAdminNick\fP[MAXBUF]" -.PP .SS "int \fBboundPortCount\fP" .PP .SS "\fBchan_hash\fP \fBchanlist\fP" @@ -444,77 +313,33 @@ Referenced by Server::AddExtendedListMode(). .PP .SS "\fBcommand_table\fP \fBcmdlist\fP" .PP -.SS "std::stringstream \fBconfig_f\fP" -.PP -.SS "int \fBdebugging\fP" -.PP -.SS "int \fBDieDelay\fP" -.PP -.SS "char \fBdiepass\fP[MAXBUF]" -.PP -.SS "char \fBDieValue\fP[MAXBUF]" +.SS "\fBServerConfig\fP* \fBConfig\fP" .PP .SS "\fBExtModeList\fP \fBEMode\fP" .PP -Definition at line 149 of file modules.cpp. +Definition at line 76 of file modules.cpp. .PP Referenced by DoAddExtendedMode(), ModeDefined(), ModeDefinedOff(), ModeDefinedOn(), ModeDefinedOper(), ModeIsListMode(), and ModeMakeList(). .SS "std::vector<\fBircd_module\fP*> factory" .PP .SS "\fBuserrec\fP* \fBfd_ref_table\fP[65536]" .PP -.SS "std::vector<\fBstd::string\fP> \fBinclude_stack\fP" -.PP -Referenced by ConfigReader::ConfigReader(). .SS "\fBaddress_cache\fP \fBIP\fP" .PP -.SS "char \fBlist\fP[MAXBUF]" -.PP -.SS "FILE* \fBlog_file\fP" -.PP -.SS "int \fBLogLevel\fP" -.PP -.SS "int \fBMaxWhoResults\fP" -.PP -Definition at line 81 of file channels.cpp. .SS "int \fBMODCOUNT\fP = -1" .PP -Definition at line 1005 of file modules.cpp. -.SS "std::vector<\fBstd::string\fP> \fBmodule_names\fP" -.PP +Definition at line 933 of file modules.cpp. .SS "std::vector<\fBInspSocket\fP*> \fBmodule_sockets\fP" .PP Referenced by Server::AddSocket(), and Server::DelSocket(). .SS "std::vector<\fBModule\fP*> modules" .PP -.SS "\fBfile_cache\fP \fBMOTD\fP" -.PP -.SS "char \fBmotd\fP[MAXBUF]" -.PP -.SS "time_t \fBnb_start\fP" -.PP -.SS "int \fBNetBufferSize\fP" -.PP -.SS "char \fBNetwork\fP[MAXBUF]" -.PP .SS "int \fBportCount\fP" .PP .SS "int \fBports\fP[MAXSOCKS]" .PP -.SS "char \fBPrefixQuit\fP[MAXBUF]" -.PP -.SS "char \fBrestartpass\fP[MAXBUF]" -.PP -.SS "\fBfile_cache\fP \fBRULES\fP" -.PP -.SS "char \fBrules\fP[MAXBUF]" -.PP .SS "\fBSocketEngine\fP* \fBSE\fP" .PP -.SS "char \fBServerDesc\fP[MAXBUF]" -.PP -.SS "char \fBServerName\fP[MAXBUF]" -.PP .SS "time_t \fBstartup_time\fP" .PP .SS "time_t \fBTIME\fP" diff --git a/docs/man/man3/modules.h.3 b/docs/man/man3/modules.h.3 index 3c43187ac..b65b4ac89 100644 --- a/docs/man/man3/modules.h.3 +++ b/docs/man/man3/modules.h.3 @@ -1,4 +1,4 @@ -.TH "modules.h" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "modules.h" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -45,6 +45,10 @@ modules.h \- .br .RI "\fIThe Event class is a unicast message directed at all modules. \fP" .ti -1c +.RI "class \fBExtMode\fP" +.br +.RI "\fIHolds an extended mode's details. \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" @@ -238,22 +242,22 @@ Referenced by Module::OnAccessCheck(). Definition at line 38 of file modules.h. .SS "#define CONF_FILE_NOT_FOUND 0x000200" .PP -Definition at line 1501 of file modules.h. +Definition at line 1516 of file modules.h. .PP Referenced by ConfigReader::ConfigReader(). .SS "#define CONF_NOT_A_NUMBER 0x000010" .PP -Definition at line 1498 of file modules.h. +Definition at line 1513 of file modules.h. .PP Referenced by ConfigReader::ReadInteger(). .SS "#define CONF_NOT_UNSIGNED 0x000080" .PP -Definition at line 1499 of file modules.h. +Definition at line 1514 of file modules.h. .PP Referenced by ConfigReader::ReadInteger(). .SS "#define CONF_VALUE_NOT_FOUND 0x000100" .PP -Definition at line 1500 of file modules.h. +Definition at line 1515 of file modules.h. .PP Referenced by ConfigReader::ReadFlag(), ConfigReader::ReadInteger(), and ConfigReader::ReadValue(). .SS "#define DEBUG 10" @@ -261,8 +265,6 @@ Referenced by ConfigReader::ReadFlag(), ConfigReader::ReadInteger(), and ConfigR log levels .PP Definition at line 23 of file modules.h. -.PP -Referenced by Server::AddExtendedMode(), SocketEngine::AddFd(), chanrec::AddUser(), SocketEngine::DelFd(), chanrec::DelUser(), InspSocket::InspSocket(), InspSocket::Read(), userrec::ReadData(), userrec::RemoveInvite(), chanrec::SetCustomMode(), chanrec::SetCustomModeParam(), InspSocket::SetState(), userrec::SetWriteError(), SocketEngine::SocketEngine(), SocketEngine::Wait(), and SocketEngine::~SocketEngine(). .SS "#define DEFAULT 30" .PP Definition at line 25 of file modules.h. @@ -349,7 +351,7 @@ Low level definition of a \fBFileReader\fP classes file cache area. Definition at line 65 of file modules.h. .SS "typedef DLLFactory<\fBModuleFactory\fP> \fBircd_module\fP" .PP -Definition at line 1667 of file modules.h. +Definition at line 1682 of file modules.h. .SS "typedef \fBfile_cache\fP \fBstring_list\fP" .PP Definition at line 70 of file modules.h. diff --git a/docs/man/man3/nspace.3 b/docs/man/man3/nspace.3 index 504564def..5ec9865ba 100644 --- a/docs/man/man3/nspace.3 +++ b/docs/man/man3/nspace.3 @@ -1,4 +1,4 @@ -.TH "nspace" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "nspace" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/nspace_hash_ in_addr _.3 b/docs/man/man3/nspace_hash_ in_addr _.3 index 9cf95474a..a8485cd17 100644 --- a/docs/man/man3/nspace_hash_ in_addr _.3 +++ b/docs/man/man3/nspace_hash_ in_addr _.3 @@ -1,4 +1,4 @@ -.TH "nspace::hash< in_addr >" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "nspace::hash< in_addr >" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/nspace_hash_ string _.3 b/docs/man/man3/nspace_hash_ string _.3 index 325a269ce..a71325c4d 100644 --- a/docs/man/man3/nspace_hash_ string _.3 +++ b/docs/man/man3/nspace_hash_ string _.3 @@ -1,4 +1,4 @@ -.TH "nspace::hash< string >" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "nspace::hash< string >" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/socket.cpp.3 b/docs/man/man3/socket.cpp.3 index a71385032..b483fd050 100644 --- a/docs/man/man3/socket.cpp.3 +++ b/docs/man/man3/socket.cpp.3 @@ -1,4 +1,4 @@ -.TH "socket.cpp" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "socket.cpp" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -54,9 +54,6 @@ socket.cpp \- .RI "\fBSocketEngine\fP * \fBSE\fP" .br .ti -1c -.RI "FILE * \fBlog_file\fP" -.br -.ti -1c .RI "int \fBboundPortCount\fP" .br .ti -1c @@ -66,27 +63,21 @@ socket.cpp \- .RI "time_t \fBTIME\fP" .br .ti -1c -.RI "bool \fBunlimitcore\fP" -.br -.ti -1c -.RI "int \fBMaxConn\fP" +.RI "\fBInspSocket\fP * \fBsocket_ref\fP [65535]" .br .in -1c .SH "Variable Documentation" .PP .SS "int \fBboundPortCount\fP" .PP -.SS "FILE* \fBlog_file\fP" -.PP -.SS "int \fBMaxConn\fP" -.PP .SS "int \fBopenSockfd\fP[MAXSOCKS]" .PP .SS "\fBSocketEngine\fP* \fBSE\fP" .PP -.SS "time_t \fBTIME\fP" +.SS "\fBInspSocket\fP* \fBsocket_ref\fP[65535]" .PP -.SS "bool \fBunlimitcore\fP" +Definition at line 46 of file socket.cpp. +.SS "time_t \fBTIME\fP" .PP .SH "Author" .PP diff --git a/docs/man/man3/socket.h.3 b/docs/man/man3/socket.h.3 index 3810efe1d..5efbc0311 100644 --- a/docs/man/man3/socket.h.3 +++ b/docs/man/man3/socket.h.3 @@ -1,4 +1,4 @@ -.TH "socket.h" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "socket.h" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/socketengine.cpp.3 b/docs/man/man3/socketengine.cpp.3 index 3a6ac0550..b864541ba 100644 --- a/docs/man/man3/socketengine.cpp.3 +++ b/docs/man/man3/socketengine.cpp.3 @@ -1,4 +1,4 @@ -.TH "socketengine.cpp" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "socketengine.cpp" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/socketengine.h.3 b/docs/man/man3/socketengine.h.3 index 7be4a00e5..54d35e323 100644 --- a/docs/man/man3/socketengine.h.3 +++ b/docs/man/man3/socketengine.h.3 @@ -1,4 +1,4 @@ -.TH "socketengine.h" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "socketengine.h" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/std.3 b/docs/man/man3/std.3 index 8d5eaebc2..2f27c8b5a 100644 --- a/docs/man/man3/std.3 +++ b/docs/man/man3/std.3 @@ -1,4 +1,4 @@ -.TH "std" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "std" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/std_char_traits.3 b/docs/man/man3/std_char_traits.3 index 89807e969..c875bc7d9 100644 --- a/docs/man/man3/std_char_traits.3 +++ b/docs/man/man3/std_char_traits.3 @@ -1,4 +1,4 @@ -.TH "std::char_traits" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "std::char_traits" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/typedefs.h.3 b/docs/man/man3/typedefs.h.3 new file mode 100644 index 000000000..e919dd1f0 --- /dev/null +++ b/docs/man/man3/typedefs.h.3 @@ -0,0 +1,88 @@ +.TH "typedefs.h" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +typedefs.h \- +.SH SYNOPSIS +.br +.PP +\fC#include 'users.h'\fP +.br +\fC#include 'channels.h'\fP +.br +\fC#include 'hashcomp.h'\fP +.br +\fC#include 'inspstring.h'\fP +.br +\fC#include 'ctables.h'\fP +.br +\fC#include 'inspircd.h'\fP +.br +\fC#include 'modules.h'\fP +.br +\fC#include 'globals.h'\fP +.br +\fC#include 'inspircd_config.h'\fP +.br +\fC#include <string>\fP +.br +\fC#include <ext/hash_map>\fP +.br + +.SS "Typedefs" + +.in +1c +.ti -1c +.RI "typedef nspace::hash_map< \fBstd::string\fP, \fBuserrec\fP *, nspace::hash< \fBstring\fP >, \fBirc::StrHashComp\fP > \fBuser_hash\fP" +.br +.ti -1c +.RI "typedef nspace::hash_map< \fBstd::string\fP, \fBchanrec\fP *, nspace::hash< \fBstring\fP >, \fBirc::StrHashComp\fP > \fBchan_hash\fP" +.br +.ti -1c +.RI "typedef nspace::hash_map< in_addr, \fBstring\fP *, nspace::hash< in_addr >, \fBirc::InAddr_HashComp\fP > \fBaddress_cache\fP" +.br +.ti -1c +.RI "typedef nspace::hash_map< \fBstd::string\fP, \fBWhoWasUser\fP *, nspace::hash< \fBstring\fP >, \fBirc::StrHashComp\fP > \fBwhowas_hash\fP" +.br +.ti -1c +.RI "typedef std::deque< \fBcommand_t\fP > \fBcommand_table\fP" +.br +.ti -1c +.RI "typedef std::vector< \fBstd::string\fP > \fBservernamelist\fP" +.br +.ti -1c +.RI "typedef std::vector< \fBExtMode\fP > \fBExtModeList\fP" +.br +.ti -1c +.RI "typedef ExtModeList::iterator \fBExtModeListIter\fP" +.br +.in -1c +.SH "Typedef Documentation" +.PP +.SS "typedef nspace::hash_map<in_addr,\fBstring\fP*, nspace::hash<in_addr>, \fBirc::InAddr_HashComp\fP> \fBaddress_cache\fP" +.PP +Definition at line 22 of file typedefs.h. +.SS "typedef nspace::hash_map<\fBstd::string\fP, \fBchanrec\fP*, nspace::hash<\fBstring\fP>, \fBirc::StrHashComp\fP> \fBchan_hash\fP" +.PP +Definition at line 21 of file typedefs.h. +.SS "typedef std::deque<\fBcommand_t\fP> \fBcommand_table\fP" +.PP +Definition at line 24 of file typedefs.h. +.SS "typedef std::vector<\fBExtMode\fP> \fBExtModeList\fP" +.PP +Definition at line 26 of file typedefs.h. +.SS "typedef ExtModeList::iterator \fBExtModeListIter\fP" +.PP +Definition at line 27 of file typedefs.h. +.SS "typedef std::vector<\fBstd::string\fP> \fBservernamelist\fP" +.PP +Definition at line 25 of file typedefs.h. +.SS "typedef nspace::hash_map<\fBstd::string\fP, \fBuserrec\fP*, nspace::hash<\fBstring\fP>, \fBirc::StrHashComp\fP> \fBuser_hash\fP" +.PP +Definition at line 20 of file typedefs.h. +.SS "typedef nspace::hash_map<\fBstd::string\fP, \fBWhoWasUser\fP*, nspace::hash<\fBstring\fP>, \fBirc::StrHashComp\fP> \fBwhowas_hash\fP" +.PP +Definition at line 23 of file typedefs.h. +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/man3/ucrec.3 b/docs/man/man3/ucrec.3 index 5e07b9214..2b88bcc46 100644 --- a/docs/man/man3/ucrec.3 +++ b/docs/man/man3/ucrec.3 @@ -1,4 +1,4 @@ -.TH "ucrec" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ucrec" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -68,8 +68,6 @@ Points to the channel record where the given modes apply. If the record is not in use, this value will be NULL. .PP Definition at line 252 of file channels.h. -.PP -Referenced by Server::PseudoToUser(), and userrec::userrec(). .SS "char \fBucrec::uc_modes\fP" .PP Contains a bitmask of the UCMODE_OP . @@ -77,8 +75,6 @@ Contains a bitmask of the UCMODE_OP . .. UCMODE_FOUNDER values. If this value is zero, the user has no privilages upon the channel. .PP Definition at line 247 of file channels.h. -.PP -Referenced by userrec::userrec(). .SH "Author" .PP diff --git a/docs/man/man3/userprocess.h.3 b/docs/man/man3/userprocess.h.3 new file mode 100644 index 000000000..92541398d --- /dev/null +++ b/docs/man/man3/userprocess.h.3 @@ -0,0 +1,50 @@ +.TH "userprocess.h" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +userprocess.h \- +.SH SYNOPSIS +.br +.PP +\fC#include 'users.h'\fP +.br + +.SS "Functions" + +.in +1c +.ti -1c +.RI "void \fBCheckDie\fP ()" +.br +.ti -1c +.RI "void \fBLoadAllModules\fP ()" +.br +.ti -1c +.RI "void \fBCheckRoot\fP ()" +.br +.ti -1c +.RI "void \fBOpenLog\fP (char **argv, int argc)" +.br +.ti -1c +.RI "bool \fBDoBackgroundUserStuff\fP (time_t \fBTIME\fP)" +.br +.ti -1c +.RI "void \fBProcessUser\fP (\fBuserrec\fP *cu)" +.br +.in -1c +.SH "Function Documentation" +.PP +.SS "void CheckDie ()" +.PP +.SS "void CheckRoot ()" +.PP +.SS "bool DoBackgroundUserStuff (time_t TIME)" +.PP +.SS "void LoadAllModules ()" +.PP +.SS "void OpenLog (char ** argv, int argc)" +.PP +.SS "void ProcessUser (\fBuserrec\fP * cu)" +.PP +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/man3/userrec.3 b/docs/man/man3/userrec.3 index 8fc0aa420..6d88cb3d5 100644 --- a/docs/man/man3/userrec.3 +++ b/docs/man/man3/userrec.3 @@ -1,4 +1,4 @@ -.TH "userrec" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "userrec" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -114,7 +114,7 @@ Inherits \fBconnection\fP. .br .RI "\fIThe user's mode string. \fP" .ti -1c -.RI "\fBucrec\fP \fBchans\fP [MAXCHANS]" +.RI "std::vector< \fBucrec\fP > \fBchans\fP" .br .ti -1c .RI "char * \fBserver\fP" @@ -197,48 +197,44 @@ Definition at line 111 of file users.h. .PP .SS "userrec::userrec ()" .PP -Definition at line 38 of file users.cpp. +Definition at line 36 of file users.cpp. .PP -References awaymsg, connection::bytes_in, connection::bytes_out, ucrec::channel, chans, connection::cmds_in, connection::cmds_out, dhost, dns_done, connection::fd, flood, fullname, connection::haspassed, connection::host, ident, connection::idle_lastmsg, invites, connection::ip, connection::lastping, lines_in, modes, nick, connection::nping, oper, connection::port, recvq, connection::registered, reset_due, sendq, server, ServerName, connection::signon, TIME, timeout, and ucrec::uc_modes. +References awaymsg, connection::bytes_in, connection::bytes_out, chans, connection::cmds_in, connection::cmds_out, dhost, dns_done, connection::fd, flood, fullname, connection::haspassed, connection::host, ident, connection::idle_lastmsg, invites, connection::ip, connection::lastping, lines_in, modes, nick, connection::nping, oper, connection::port, recvq, connection::registered, reset_due, sendq, server, ServerConfig::ServerName, connection::signon, TIME, and timeout. .PP .nf -39 { -40 // the PROPER way to do it, AVOID bzero at *ALL* costs -41 strcpy(nick,''); -42 strcpy(ip,'127.0.0.1'); -43 timeout = 0; -44 strcpy(ident,''); -45 strcpy(host,''); -46 strcpy(dhost,''); -47 strcpy(fullname,''); -48 strcpy(modes,''); -49 server = (char*)FindServerNamePtr(ServerName); -50 strcpy(awaymsg,''); -51 strcpy(oper,''); -52 reset_due = TIME; -53 lines_in = 0; -54 fd = lastping = signon = idle_lastmsg = nping = registered = 0; -55 flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0; -56 haspassed = false; -57 dns_done = false; -58 recvq = ''; -59 sendq = ''; -60 for (int i = 0; i < MAXCHANS; i++) -61 { -62 this->chans[i].channel = NULL; -63 this->chans[i].uc_modes = 0; -64 } -65 invites.clear(); -66 } +37 { +38 // the PROPER way to do it, AVOID bzero at *ALL* costs +39 strcpy(nick,''); +40 strcpy(ip,'127.0.0.1'); +41 timeout = 0; +42 strcpy(ident,''); +43 strcpy(host,''); +44 strcpy(dhost,''); +45 strcpy(fullname,''); +46 strcpy(modes,''); +47 server = (char*)FindServerNamePtr(Config->ServerName); +48 strcpy(awaymsg,''); +49 strcpy(oper,''); +50 reset_due = TIME; +51 lines_in = 0; +52 fd = lastping = signon = idle_lastmsg = nping = registered = 0; +53 flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0; +54 haspassed = false; +55 dns_done = false; +56 recvq = ''; +57 sendq = ''; +58 chans.clear(); +59 invites.clear(); +60 } .fi .PP .SS "userrec::~userrec ()\fC [virtual]\fP" .PP -Definition at line 68 of file users.cpp. +Definition at line 62 of file users.cpp. .PP .nf -69 { -70 } +63 { +64 } .fi .PP .SH "Member Function Documentation" @@ -249,35 +245,35 @@ This method adds data to the buffer of the user. .PP The buffer can grow to any size within limits of the available memory, managed by the size of a \fBstd::string\fP, however if any individual line in the buffer grows over 600 bytes in length (which is 88 chars over the RFC-specified limit per line) then the method will return false and the text will not be inserted. .PP -Definition at line 205 of file users.cpp. +Definition at line 198 of file users.cpp. .PP References recvq, recvqmax, and SetWriteError(). .PP .nf -206 { -207 std::string b = ''; -208 for (unsigned int i = 0; i < a.length(); i++) -209 if ((a[i] != '\r') && (a[i] != '\0') && (a[i] != 7)) -210 b = b + a[i]; -211 std::stringstream stream(recvq); -212 stream << b; -213 recvq = stream.str(); -214 unsigned int i = 0; -215 // count the size of the first line in the buffer. -216 while (i < recvq.length()) -217 { -218 if (recvq[i++] == '\n') -219 break; -220 } -221 if (recvq.length() > (unsigned)this->recvqmax) -222 { -223 this->SetWriteError('RecvQ exceeded'); -224 WriteOpers('*** User %s RecvQ of %d exceeds connect class maximum of %d',this->nick,recvq.length(),this->recvqmax); -225 } -226 // return false if we've had more than 600 characters WITHOUT -227 // a carriage return (this is BAD, drop the socket) -228 return (i < 600); -229 } +199 { +200 std::string b = ''; +201 for (unsigned int i = 0; i < a.length(); i++) +202 if ((a[i] != '\r') && (a[i] != '\0') && (a[i] != 7)) +203 b = b + a[i]; +204 std::stringstream stream(recvq); +205 stream << b; +206 recvq = stream.str(); +207 unsigned int i = 0; +208 // count the size of the first line in the buffer. +209 while (i < recvq.length()) +210 { +211 if (recvq[i++] == '\n') +212 break; +213 } +214 if (recvq.length() > (unsigned)this->recvqmax) +215 { +216 this->SetWriteError('RecvQ exceeded'); +217 WriteOpers('*** User %s RecvQ of %d exceeds connect class maximum of %d',this->nick,recvq.length(),this->recvqmax); +218 } +219 // return false if we've had more than 600 characters WITHOUT +220 // a carriage return (this is BAD, drop the socket) +221 return (i < 600); +222 } .fi .PP .SS "void userrec::AddWriteBuf (\fBstd::string\fP data)" @@ -286,24 +282,24 @@ Adds to the user's write buffer. .PP You may add any amount of text up to this users sendq value, if you exceed the sendq value, \fBSetWriteError()\fP will be called to set the users error string to 'SendQ exceeded', and further buffer adds will be dropped. .PP -Definition at line 261 of file users.cpp. +Definition at line 254 of file users.cpp. .PP References sendq, sendqmax, and SetWriteError(). .PP .nf -262 { -263 if (this->GetWriteError() != '') -264 return; -265 if (sendq.length() + data.length() > (unsigned)this->sendqmax) -266 { -267 WriteOpers('*** User %s SendQ of %d exceeds connect class maximum of %d',this->nick,sendq.length() + data.length(),this->sendqmax); -268 this->SetWriteError('SendQ exceeded'); -269 return; -270 } -271 std::stringstream stream; -272 stream << sendq << data; -273 sendq = stream.str(); -274 } +255 { +256 if (this->GetWriteError() != '') +257 return; +258 if (sendq.length() + data.length() > (unsigned)this->sendqmax) +259 { +260 WriteOpers('*** User %s SendQ of %d exceeds connect class maximum of %d',this->nick,sendq.length() + data.length(),this->sendqmax); +261 this->SetWriteError('SendQ exceeded'); +262 return; +263 } +264 std::stringstream stream; +265 stream << sendq << data; +266 sendq = stream.str(); +267 } .fi .PP .SS "bool userrec::BufferIsReady ()" @@ -312,46 +308,46 @@ This method returns true if the buffer contains at least one carriage return cha .PP one complete line may be read) .PP -Definition at line 231 of file users.cpp. +Definition at line 224 of file users.cpp. .PP References recvq. .PP .nf -232 { -233 for (unsigned int i = 0; i < recvq.length(); i++) -234 if (recvq[i] == '\n') -235 return true; -236 return false; -237 } +225 { +226 for (unsigned int i = 0; i < recvq.length(); i++) +227 if (recvq[i] == '\n') +228 return true; +229 return false; +230 } .fi .PP .SS "void userrec::ClearBuffer ()" .PP This function clears the entire buffer by setting it to an empty string. .PP -Definition at line 239 of file users.cpp. +Definition at line 232 of file users.cpp. .PP References recvq. .PP Referenced by Server::PseudoToUser(), and Server::UserToPseudo(). .PP .nf -240 { -241 recvq = ''; -242 } +233 { +234 recvq = ''; +235 } .fi .PP .SS "void userrec::CloseSocket ()" .PP Shuts down and closes the user's socket. .PP -Definition at line 72 of file users.cpp. +Definition at line 66 of file users.cpp. .PP .nf -73 { -74 shutdown(this->fd,2); -75 close(this->fd); -76 } +67 { +68 shutdown(this->fd,2); +69 close(this->fd); +70 } .fi .PP .SS "void userrec::FlushWriteBuf ()" @@ -360,31 +356,31 @@ Flushes as much of the user's buffer to the file descriptor as possible. .PP This function may not always flush the entire buffer, rather instead as much of it as it possibly can. If the send() call fails to send the entire buffer, the buffer position is advanced forwards and the rest of the data sent at the next call to this method. .PP -Definition at line 277 of file users.cpp. +Definition at line 270 of file users.cpp. .PP References connection::bytes_out, connection::cmds_out, sendq, and SetWriteError(). .PP .nf -278 { -279 if (sendq.length()) -280 { -281 char* tb = (char*)this->sendq.c_str(); -282 int n_sent = write(this->fd,tb,this->sendq.length()); -283 if (n_sent == -1) -284 { -285 this->SetWriteError(strerror(errno)); -286 } -287 else -288 { -289 // advance the queue -290 tb += n_sent; -291 this->sendq = tb; -292 // update the user's stats counters -293 this->bytes_out += n_sent; -294 this->cmds_out++; -295 } -296 } -297 } +271 { +272 if (sendq.length()) +273 { +274 char* tb = (char*)this->sendq.c_str(); +275 int n_sent = write(this->fd,tb,this->sendq.length()); +276 if (n_sent == -1) +277 { +278 this->SetWriteError(strerror(errno)); +279 } +280 else +281 { +282 // advance the queue +283 tb += n_sent; +284 this->sendq = tb; +285 // update the user's stats counters +286 this->bytes_out += n_sent; +287 this->cmds_out++; +288 } +289 } +290 } .fi .PP .SS "\fBstd::string\fP userrec::GetBuffer ()" @@ -393,42 +389,42 @@ This method returns the first available string at the tail end of the buffer and .PP This means it is a one way operation in a similar way to strtok(), and multiple calls return multiple lines if they are available. The results of this function if there are no lines to be read are unknown, always use \fBBufferIsReady()\fP to check if it is ok to read the buffer before calling \fBGetBuffer()\fP. .PP -Definition at line 244 of file users.cpp. +Definition at line 237 of file users.cpp. .PP References recvq. .PP .nf -245 { -246 if (recvq == '') -247 return ''; -248 char* line = (char*)recvq.c_str(); -249 std::string ret = ''; -250 while ((*line != '\n') && (strlen(line))) -251 { -252 ret = ret + *line; -253 line++; -254 } -255 if ((*line == '\n') || (*line == '\r')) -256 line++; -257 recvq = line; -258 return ret; -259 } +238 { +239 if (recvq == '') +240 return ''; +241 char* line = (char*)recvq.c_str(); +242 std::string ret = ''; +243 while ((*line != '\n') && (strlen(line))) +244 { +245 ret = ret + *line; +246 line++; +247 } +248 if ((*line == '\n') || (*line == '\r')) +249 line++; +250 recvq = line; +251 return ret; +252 } .fi .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. .PP -Definition at line 78 of file users.cpp. +Definition at line 72 of file users.cpp. .PP References dhost, ident, and nick. .PP .nf -79 { -80 static char result[MAXBUF]; -81 snprintf(result,MAXBUF,'%s!%s@%s',nick,ident,dhost); -82 return result; -83 } +73 { +74 static char result[MAXBUF]; +75 snprintf(result,MAXBUF,'%s!%s@%s',nick,ident,dhost); +76 return result; +77 } .fi .PP .SS "char * userrec::GetFullRealHost ()\fC [virtual]\fP" @@ -437,44 +433,44 @@ Returns the full real host of the user This member function returns the hostname .PP 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. .PP -Definition at line 96 of file users.cpp. +Definition at line 89 of file users.cpp. .PP References connection::host, ident, and nick. .PP .nf -97 { -98 static char fresult[MAXBUF]; -99 snprintf(fresult,MAXBUF,'%s!%s@%s',nick,ident,host); -100 return fresult; -101 } +90 { +91 static char fresult[MAXBUF]; +92 snprintf(fresult,MAXBUF,'%s!%s@%s',nick,ident,host); +93 return fresult; +94 } .fi .PP .SS "\fBInvitedList\fP * userrec::GetInviteList ()" .PP Returns the list of channels this user has been invited to but has not yet joined. .PP -Definition at line 117 of file users.cpp. +Definition at line 110 of file users.cpp. .PP References invites. .PP .nf -118 { -119 return &invites; -120 } +111 { +112 return &invites; +113 } .fi .PP .SS "\fBstd::string\fP userrec::GetWriteError ()" .PP Returns the write error which last occured on this connection or an empty string if none occured. .PP -Definition at line 307 of file users.cpp. +Definition at line 300 of file users.cpp. .PP References WriteError. .PP .nf -308 { -309 return this->WriteError; -310 } +301 { +302 return this->WriteError; +303 } .fi .PP .SS "bool userrec::HasPermission (char * command)" @@ -483,120 +479,117 @@ Returns true or false for if a user can execute a privilaged oper command. .PP This is done by looking up their oper type from \fBuserrec::oper\fP, then referencing this to their oper classes and checking the commands they can execute. .PP -Definition at line 151 of file users.cpp. +Definition at line 144 of file users.cpp. .PP -References config_f, and is_uline(). +References ServerConfig::config_f, ServerConfig::ConfValue(), and is_uline(). .PP .nf -152 { -153 char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF]; -154 char* mycmd; -155 char* savept; -156 char* savept2; -157 -158 // users on u-lined servers can completely bypass -159 // all permissions based checks. -160 // -161 // of course, if this is sent to a remote server and this -162 // server is not ulined there, then that other server -163 // silently drops the command. -164 if (is_uline(this->server)) -165 return true; -166 -167 // are they even an oper at all? -168 if (strchr(this->modes,'o')) -169 { -170 for (int j =0; j < ConfValueEnum('type',&config_f); j++) -171 { -172 ConfValue('type','name',j,TypeName,&config_f); -173 if (!strcmp(TypeName,this->oper)) -174 { -175 ConfValue('type','classes',j,Classes,&config_f); -176 char* myclass = strtok_r(Classes,' ',&savept); -177 while (myclass) -178 { -179 for (int k =0; k < ConfValueEnum('class',&config_f); k++) -180 { -181 ConfValue('class','name',k,ClassName,&config_f); -182 if (!strcmp(ClassName,myclass)) -183 { -184 ConfValue('class','commands',k,CommandList,&config_f); -185 mycmd = strtok_r(CommandList,' ',&savept2); -186 while (mycmd) -187 { -188 if ((!strcasecmp(mycmd,command)) || (*mycmd == '*')) -189 { -190 return true; -191 } -192 mycmd = strtok_r(NULL,' ',&savept2); -193 } -194 } -195 } -196 myclass = strtok_r(NULL,' ',&savept); -197 } -198 } -199 } -200 } -201 return false; -202 } +145 { +146 char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF]; +147 char* mycmd; +148 char* savept; +149 char* savept2; +150 +151 // users on u-lined servers can completely bypass +152 // all permissions based checks. +153 // +154 // of course, if this is sent to a remote server and this +155 // server is not ulined there, then that other server +156 // silently drops the command. +157 if (is_uline(this->server)) +158 return true; +159 +160 // are they even an oper at all? +161 if (strchr(this->modes,'o')) +162 { +163 for (int j =0; j < Config->ConfValueEnum('type',&Config->config_f); j++) +164 { +165 Config->ConfValue('type','name',j,TypeName,&Config->config_f); +166 if (!strcmp(TypeName,this->oper)) +167 { +168 Config->ConfValue('type','classes',j,Classes,&Config->config_f); +169 char* myclass = strtok_r(Classes,' ',&savept); +170 while (myclass) +171 { +172 for (int k =0; k < Config->ConfValueEnum('class',&Config->config_f); k++) +173 { +174 Config->ConfValue('class','name',k,ClassName,&Config->config_f); +175 if (!strcmp(ClassName,myclass)) +176 { +177 Config->ConfValue('class','commands',k,CommandList,&Config->config_f); +178 mycmd = strtok_r(CommandList,' ',&savept2); +179 while (mycmd) +180 { +181 if ((!strcasecmp(mycmd,command)) || (*mycmd == '*')) +182 { +183 return true; +184 } +185 mycmd = strtok_r(NULL,' ',&savept2); +186 } +187 } +188 } +189 myclass = strtok_r(NULL,' ',&savept); +190 } +191 } +192 } +193 } +194 return false; +195 } .fi .PP .SS "void userrec::InviteTo (char * channel)\fC [virtual]\fP" .PP Adds a channel to a users invite list (invites them to a channel). .PP -Definition at line 122 of file users.cpp. +Definition at line 115 of file users.cpp. .PP References Invited::channel, and invites. .PP .nf -123 { -124 Invited i; -125 strlcpy(i.channel,channel,CHANMAX); -126 invites.push_back(i); -127 } +116 { +117 Invited i; +118 strlcpy(i.channel,channel,CHANMAX); +119 invites.push_back(i); +120 } .fi .PP .SS "bool userrec::IsInvited (char * channel)\fC [virtual]\fP" .PP Returns true if a user is invited to a channel. .PP -Definition at line 103 of file users.cpp. +Definition at line 96 of file users.cpp. .PP References invites. .PP .nf -104 { -105 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) -106 { -107 if (i->channel) { -108 if (!strcasecmp(i->channel,channel)) -109 { -110 return true; -111 } -112 } -113 } -114 return false; -115 } +97 { +98 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) +99 { +100 if (i->channel) { +101 if (!strcasecmp(i->channel,channel)) +102 { +103 return true; +104 } +105 } +106 } +107 return false; +108 } .fi .PP .SS "int userrec::ReadData (void * buffer, size_t size)" .PP Calls read() to read some data for this user using their fd. .PP -Definition at line 85 of file users.cpp. -.PP -References DEBUG. +Definition at line 79 of file users.cpp. .PP .nf -86 { -87 if (this->fd > -1) -88 { -89 log(DEBUG,'userrec::ReadData on fd %d',this->fd); -90 return read(this->fd, buffer, size); -91 } -92 else return 0; -93 } +80 { +81 if (this->fd > -1) +82 { +83 return read(this->fd, buffer, size); +84 } +85 else return 0; +86 } .fi .PP .SS "void userrec::RemoveInvite (char * channel)\fC [virtual]\fP" @@ -605,31 +598,31 @@ Removes a channel from a users invite list. .PP This member function is called on successfully joining an invite only channel to which the user has previously been invited, to clear the invitation. .PP -Definition at line 129 of file users.cpp. +Definition at line 122 of file users.cpp. .PP References DEBUG, and invites. .PP .nf -130 { -131 log(DEBUG,'Removing invites'); -132 if (channel) -133 { -134 if (invites.size()) -135 { -136 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) -137 { -138 if (i->channel) -139 { -140 if (!strcasecmp(i->channel,channel)) -141 { -142 invites.erase(i); -143 return; -144 } -145 } -146 } -147 } -148 } -149 } +123 { +124 log(DEBUG,'Removing invites'); +125 if (channel) +126 { +127 if (invites.size()) +128 { +129 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) +130 { +131 if (i->channel) +132 { +133 if (!strcasecmp(i->channel,channel)) +134 { +135 invites.erase(i); +136 return; +137 } +138 } +139 } +140 } +141 } +142 } .fi .PP .SS "void userrec::SetWriteError (\fBstd::string\fP error)" @@ -638,19 +631,19 @@ Sets the write error for a connection. .PP This is done because the actual disconnect of a client may occur at an inopportune time such as half way through /LIST output. The WriteErrors of clients are checked at a more ideal time (in the mainloop) and errored clients purged. .PP -Definition at line 299 of file users.cpp. +Definition at line 292 of file users.cpp. .PP References DEBUG, and WriteError. .PP Referenced by AddBuffer(), AddWriteBuf(), and FlushWriteBuf(). .PP .nf -300 { -301 log(DEBUG,'Setting error string for %s to '%s'',this->nick,error.c_str()); -302 // don't try to set the error twice, its already set take the first string. -303 if (this->WriteError == '') -304 this->WriteError = error; -305 } +293 { +294 log(DEBUG,'Setting error string for %s to '%s'',this->nick,error.c_str()); +295 // don't try to set the error twice, its already set take the first string. +296 if (this->WriteError == '') +297 this->WriteError = error; +298 } .fi .PP .SH "Member Data Documentation" @@ -664,7 +657,7 @@ If this string is empty, the user is not marked as away. Definition at line 158 of file users.h. .PP Referenced by userrec(). -.SS "\fBucrec\fP \fBuserrec::chans\fP[MAXCHANS]" +.SS "std::vector<\fBucrec\fP> \fBuserrec::chans\fP" .PP Definition at line 149 of file users.h. .PP diff --git a/docs/man/man3/users.cpp.3 b/docs/man/man3/users.cpp.3 index 520931d6d..9b4705a63 100644 --- a/docs/man/man3/users.cpp.3 +++ b/docs/man/man3/users.cpp.3 @@ -1,4 +1,4 @@ -.TH "users.cpp" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "users.cpp" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -29,10 +29,7 @@ users.cpp \- .in +1c .ti -1c -.RI "std::stringstream \fBconfig_f\fP" -.br -.ti -1c -.RI "char \fBServerName\fP [MAXBUF]" +.RI "\fBServerConfig\fP * \fBConfig\fP" .br .ti -1c .RI "time_t \fBTIME\fP" @@ -40,9 +37,7 @@ users.cpp \- .in -1c .SH "Variable Documentation" .PP -.SS "std::stringstream \fBconfig_f\fP" -.PP -.SS "char \fBServerName\fP[MAXBUF]" +.SS "\fBServerConfig\fP* \fBConfig\fP" .PP .SS "time_t \fBTIME\fP" .PP diff --git a/docs/man/man3/users.h.3 b/docs/man/man3/users.h.3 index f8eb8ac82..03ced5bd9 100644 --- a/docs/man/man3/users.h.3 +++ b/docs/man/man3/users.h.3 @@ -1,4 +1,4 @@ -.TH "users.h" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "users.h" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/xline.h.3 b/docs/man/man3/xline.h.3 index 1ee046631..1e12b1309 100644 --- a/docs/man/man3/xline.h.3 +++ b/docs/man/man3/xline.h.3 @@ -1,4 +1,4 @@ -.TH "xline.h" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "xline.h" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -105,7 +105,7 @@ xline.h \- .RI "void \fBexpire_lines\fP ()" .br .ti -1c -.RI "void \fBapply_lines\fP ()" +.RI "void \fBapply_lines\fP (const int What)" .br .ti -1c .RI "void \fBstats_k\fP (\fBuserrec\fP *user)" @@ -141,6 +141,25 @@ xline.h \- .RI "bool \fBqline_make_global\fP (const char *nickname)" .br .in -1c +.SS "Variables" + +.in +1c +.ti -1c +.RI "const int \fBAPPLY_GLINES\fP = 1" +.br +.ti -1c +.RI "const int \fBAPPLY_KLINES\fP = 2" +.br +.ti -1c +.RI "const int \fBAPPLY_QLINES\fP = 4" +.br +.ti -1c +.RI "const int \fBAPPLY_ZLINES\fP = 8" +.br +.ti -1c +.RI "const int \fBAPPLY_ALL\fP = \fBAPPLY_GLINES\fP | \fBAPPLY_KLINES\fP | \fBAPPLY_QLINES\fP | \fBAPPLY_ZLINES\fP" +.br +.in -1c .SH "Function Documentation" .PP .SS "void add_eline (long duration, const char * source, const char * reason, const char * hostmask)" @@ -158,7 +177,7 @@ Referenced by Server::AddQLine(). .SS "void add_zline (long duration, const char * source, const char * reason, const char * ipaddr)" .PP Referenced by Server::AddZLine(). -.SS "void apply_lines ()" +.SS "void apply_lines (const int What)" .PP .SS "bool del_eline (const char * hostmask)" .PP @@ -211,6 +230,23 @@ Referenced by Server::DelZLine(). .PP .SS "void zline_set_creation_time (char * ip, time_t create_time)" .PP +.SH "Variable Documentation" +.PP +.SS "const int \fBAPPLY_ALL\fP = \fBAPPLY_GLINES\fP | \fBAPPLY_KLINES\fP | \fBAPPLY_QLINES\fP | \fBAPPLY_ZLINES\fP" +.PP +Definition at line 35 of file xline.h. +.SS "const int \fBAPPLY_GLINES\fP = 1" +.PP +Definition at line 31 of file xline.h. +.SS "const int \fBAPPLY_KLINES\fP = 2" +.PP +Definition at line 32 of file xline.h. +.SS "const int \fBAPPLY_QLINES\fP = 4" +.PP +Definition at line 33 of file xline.h. +.SS "const int \fBAPPLY_ZLINES\fP = 8" +.PP +Definition at line 34 of file xline.h. .SH "Author" .PP Generated automatically by Doxygen for InspIRCd from the source code. |