diff options
Diffstat (limited to 'docs/man')
71 files changed, 1633 insertions, 1133 deletions
diff --git a/docs/man/man3/Admin.3 b/docs/man/man3/Admin.3 index 907f3d788..f950ffbf8 100644 --- a/docs/man/man3/Admin.3 +++ b/docs/man/man3/Admin.3 @@ -1,4 +1,4 @@ -.TH "Admin" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "Admin" 3 "12 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 250 of file modules.cpp. +Definition at line 244 of file modules.cpp. .PP .nf -250 : Name(name), Email(email), Nick(nick) { }; +244 : 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 4ae2aa8a1..cbd5e52e0 100644 --- a/docs/man/man3/BanItem.3 +++ b/docs/man/man3/BanItem.3 @@ -1,4 +1,4 @@ -.TH "BanItem" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "BanItem" 3 "12 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 127f01c99..78ecd755f 100644 --- a/docs/man/man3/BoolSet.3 +++ b/docs/man/man3/BoolSet.3 @@ -1,4 +1,4 @@ -.TH "BoolSet" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "BoolSet" 3 "12 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 6edd9f6fa..bc4f7caa3 100644 --- a/docs/man/man3/ConfigReader.3 +++ b/docs/man/man3/ConfigReader.3 @@ -1,4 +1,4 @@ -.TH "ConfigReader" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ConfigReader" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -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 834 of file modules.cpp. +Definition at line 807 of file modules.cpp. .PP References cache, CONF_FILE_NOT_FOUND, error, errorlog, include_stack, and readerror. .PP .nf -835 { -836 include_stack.clear(); -837 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); -838 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out); -839 this->readerror = LoadConf(CONFIG_FILE,this->cache,this->errorlog); -840 if (!this->readerror) -841 this->error = CONF_FILE_NOT_FOUND; -842 } +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 } .fi .PP .SS "ConfigReader::ConfigReader (\fBstd::string\fP filename)" @@ -114,18 +114,18 @@ Overloaded constructor. .PP This constructor initialises the ConfigReader class to read a user-specified config file .PP -Definition at line 854 of file modules.cpp. +Definition at line 827 of file modules.cpp. .PP References cache, CONF_FILE_NOT_FOUND, error, errorlog, and readerror. .PP .nf -855 { -856 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); -857 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out); -858 this->readerror = LoadConf(filename.c_str(),this->cache,this->errorlog); -859 if (!this->readerror) -860 this->error = CONF_FILE_NOT_FOUND; -861 }; +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 }; .fi .PP .SS "ConfigReader::~ConfigReader ()" @@ -134,17 +134,17 @@ Default destructor. .PP This method destroys the ConfigReader class. .PP -Definition at line 845 of file modules.cpp. +Definition at line 818 of file modules.cpp. .PP References cache, and errorlog. .PP .nf -846 { -847 if (this->cache) -848 delete this->cache; -849 if (this->errorlog) -850 delete this->errorlog; -851 } +819 { +820 if (this->cache) +821 delete this->cache; +822 if (this->errorlog) +823 delete this->errorlog; +824 } .fi .PP .SH "Member Function Documentation" @@ -155,41 +155,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 932 of file modules.cpp. +Definition at line 905 of file modules.cpp. .PP References errorlog, connection::fd, and userrec::nick. .PP .nf -933 { -934 if (bail) -935 { -936 printf('There were errors in your configuration:\n%s',errorlog->str().c_str()); -937 exit(0); -938 } -939 else -940 { -941 char dataline[1024]; -942 if (user) -943 { -944 WriteServ(user->fd,'NOTICE %s :There were errors in the configuration file:',user->nick); -945 while (!errorlog->eof()) -946 { -947 errorlog->getline(dataline,1024); -948 WriteServ(user->fd,'NOTICE %s :%s',user->nick,dataline); -949 } -950 } -951 else -952 { -953 WriteOpers('There were errors in the configuration file:',user->nick); -954 while (!errorlog->eof()) -955 { -956 errorlog->getline(dataline,1024); -957 WriteOpers(dataline); -958 } -959 } -960 return; -961 } -962 } +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 } .fi .PP .SS "int ConfigReader::Enumerate (\fBstd::string\fP tag)" @@ -198,14 +198,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 965 of file modules.cpp. +Definition at line 938 of file modules.cpp. .PP References cache. .PP .nf -966 { -967 return EnumConf(cache,tag.c_str()); -968 } +939 { +940 return EnumConf(cache,tag.c_str()); +941 } .fi .PP .SS "int ConfigReader::EnumerateValues (\fBstd::string\fP tag, int index)" @@ -214,14 +214,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 970 of file modules.cpp. +Definition at line 943 of file modules.cpp. .PP References cache. .PP .nf -971 { -972 return EnumValues(cache, tag.c_str(), index); -973 } +944 { +945 return EnumValues(cache, tag.c_str(), index); +946 } .fi .PP .SS "long ConfigReader::GetError ()" @@ -230,16 +230,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 925 of file modules.cpp. +Definition at line 898 of file modules.cpp. .PP References error. .PP .nf -926 { -927 long olderr = this->error; -928 this->error = 0; -929 return olderr; -930 } +899 { +900 long olderr = this->error; +901 this->error = 0; +902 return olderr; +903 } .fi .PP .SS "bool ConfigReader::ReadFlag (\fBstd::string\fP tag, \fBstd::string\fP name, int index)" @@ -248,26 +248,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 879 of file modules.cpp. +Definition at line 852 of file modules.cpp. .PP References cache, CONF_VALUE_NOT_FOUND, and error. .PP .nf -880 { -881 char val[MAXBUF]; -882 char t[MAXBUF]; -883 char n[MAXBUF]; -884 strlcpy(t,tag.c_str(),MAXBUF); -885 strlcpy(n,name.c_str(),MAXBUF); -886 int res = ReadConf(cache,t,n,index,val); -887 if (!res) -888 { -889 this->error = CONF_VALUE_NOT_FOUND; -890 return false; -891 } -892 std::string s = val; -893 return ((s == 'yes') || (s == 'YES') || (s == 'true') || (s == 'TRUE') || (s == '1')); -894 } +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 } .fi .PP .SS "long ConfigReader::ReadInteger (\fBstd::string\fP tag, \fBstd::string\fP name, int index, bool needs_unsigned)" @@ -276,38 +276,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 896 of file modules.cpp. +Definition at line 869 of file modules.cpp. .PP References cache, CONF_NOT_A_NUMBER, CONF_NOT_UNSIGNED, CONF_VALUE_NOT_FOUND, and error. .PP .nf -897 { -898 char val[MAXBUF]; -899 char t[MAXBUF]; -900 char n[MAXBUF]; -901 strlcpy(t,tag.c_str(),MAXBUF); -902 strlcpy(n,name.c_str(),MAXBUF); -903 int res = ReadConf(cache,t,n,index,val); -904 if (!res) -905 { -906 this->error = CONF_VALUE_NOT_FOUND; -907 return 0; -908 } -909 for (unsigned int i = 0; i < strlen(val); i++) -910 { -911 if (!isdigit(val[i])) -912 { -913 this->error = CONF_NOT_A_NUMBER; -914 return 0; -915 } -916 } -917 if ((needs_unsigned) && (atoi(val)<0)) -918 { -919 this->error = CONF_NOT_UNSIGNED; -920 return 0; -921 } -922 return atoi(val); -923 } +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 } .fi .PP .SS "\fBstd::string\fP ConfigReader::ReadValue (\fBstd::string\fP tag, \fBstd::string\fP name, int index)" @@ -316,25 +316,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 863 of file modules.cpp. +Definition at line 836 of file modules.cpp. .PP References cache, CONF_VALUE_NOT_FOUND, and error. .PP .nf -864 { -865 char val[MAXBUF]; -866 char t[MAXBUF]; -867 char n[MAXBUF]; -868 strlcpy(t,tag.c_str(),MAXBUF); -869 strlcpy(n,name.c_str(),MAXBUF); -870 int res = ReadConf(cache,t,n,index,val); -871 if (!res) -872 { -873 this->error = CONF_VALUE_NOT_FOUND; -874 return ''; -875 } -876 return val; -877 } +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 } .fi .PP .SS "bool ConfigReader::Verify ()" @@ -343,14 +343,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 975 of file modules.cpp. +Definition at line 948 of file modules.cpp. .PP References readerror. .PP .nf -976 { -977 return this->readerror; -978 } +949 { +950 return this->readerror; +951 } .fi .PP .SH "Member Data Documentation" diff --git a/docs/man/man3/ConnectClass.3 b/docs/man/man3/ConnectClass.3 index 0d8ce0778..ae23d9973 100644 --- a/docs/man/man3/ConnectClass.3 +++ b/docs/man/man3/ConnectClass.3 @@ -1,4 +1,4 @@ -.TH "ConnectClass" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ConnectClass" 3 "12 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 95597b880..d88cb6f54 100644 --- a/docs/man/man3/DNS.3 +++ b/docs/man/man3/DNS.3 @@ -1,4 +1,4 @@ -.TH "DNS" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "DNS" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -38,6 +38,10 @@ DNS \- The DNS class allows fast nonblocking resolution of hostnames and ip addr .br .RI "\fIThis method will return true when the lookup is completed. \fP" .ti -1c +.RI "bool \fBHasResult\fP (int fd)" +.br +.RI "\fIThis method will return true if the lookup's fd matches the one provided. \fP" +.ti -1c .RI "\fBstd::string\fP \fBGetResult\fP ()" .br .RI "\fIThis method returns the result of your query as a string, depending upon wether you called \fBDNS::ReverseLookup()\fP or \fBDNS::ForwardLookup\fP. \fP" @@ -186,6 +190,10 @@ This method returns the result of your query as a string, depending upon wether .PP .SS "\fBstd::string\fP DNS::GetResultIP ()" .PP +.SS "bool DNS::HasResult (int fd)" +.PP +This method will return true if the lookup's fd matches the one provided. +.PP .SS "bool DNS::HasResult ()" .PP This method will return true when the lookup is completed. diff --git a/docs/man/man3/ELine.3 b/docs/man/man3/ELine.3 index 1b3b6c7a4..7152c62e3 100644 --- a/docs/man/man3/ELine.3 +++ b/docs/man/man3/ELine.3 @@ -1,4 +1,4 @@ -.TH "ELine" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ELine" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/Event.3 b/docs/man/man3/Event.3 index 0105be0ae..45e6444b8 100644 --- a/docs/man/man3/Event.3 +++ b/docs/man/man3/Event.3 @@ -1,4 +1,4 @@ -.TH "Event" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "Event" 3 "12 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 281 of file modules.cpp. +Definition at line 275 of file modules.cpp. .PP .nf -281 : data(anydata), source(src), id(eventid) { }; +275 : data(anydata), source(src), id(eventid) { }; .fi .PP .SH "Member Function Documentation" @@ -77,14 +77,14 @@ Definition at line 281 of file modules.cpp. .PP Get the Event data. .PP -Definition at line 283 of file modules.cpp. +Definition at line 277 of file modules.cpp. .PP References data. .PP .nf -284 { -285 return this->data; -286 } +278 { +279 return this->data; +280 } .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 299 of file modules.cpp. +Definition at line 293 of file modules.cpp. .PP References id. .PP .nf -300 { -301 return this->id; -302 } +294 { +295 return this->id; +296 } .fi .PP .SS "\fBModule\fP * Event::GetSource ()" .PP Get the event Source. .PP -Definition at line 288 of file modules.cpp. +Definition at line 282 of file modules.cpp. .PP References source. .PP .nf -289 { -290 return this->source; -291 } +283 { +284 return this->source; +285 } .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 293 of file modules.cpp. +Definition at line 287 of file modules.cpp. .PP References FOREACH_MOD. .PP .nf -294 { -295 FOREACH_MOD OnEvent(this); -296 return NULL; -297 } +288 { +289 FOREACH_MOD OnEvent(this); +290 return NULL; +291 } .fi .PP .SH "Member Data Documentation" diff --git a/docs/man/man3/ExemptItem.3 b/docs/man/man3/ExemptItem.3 index 17e67bdcf..75486b5a5 100644 --- a/docs/man/man3/ExemptItem.3 +++ b/docs/man/man3/ExemptItem.3 @@ -1,4 +1,4 @@ -.TH "ExemptItem" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ExemptItem" 3 "12 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 e63ace10d..367d3557d 100644 --- a/docs/man/man3/ExtMode.3 +++ b/docs/man/man3/ExtMode.3 @@ -1,4 +1,4 @@ -.TH "ExtMode" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ExtMode" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -39,37 +39,37 @@ Inherits \fBclassbase\fP. .in -1c .SH "Detailed Description" .PP -Definition at line 139 of file modules.cpp. +Definition at line 133 of file modules.cpp. .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 148 of file modules.cpp. +Definition at line 142 of file modules.cpp. .PP .nf -148 : modechar(mc), type(ty), needsoper(oper), params_when_on(p_on), params_when_off(p_off) { }; +142 : 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 147 of file modules.cpp. +Definition at line 141 of file modules.cpp. .SS "char \fBExtMode::modechar\fP" .PP -Definition at line 142 of file modules.cpp. +Definition at line 136 of file modules.cpp. .SS "bool \fBExtMode::needsoper\fP" .PP -Definition at line 144 of file modules.cpp. +Definition at line 138 of file modules.cpp. .SS "int \fBExtMode::params_when_off\fP" .PP -Definition at line 146 of file modules.cpp. +Definition at line 140 of file modules.cpp. .SS "int \fBExtMode::params_when_on\fP" .PP -Definition at line 145 of file modules.cpp. +Definition at line 139 of file modules.cpp. .SS "int \fBExtMode::type\fP" .PP -Definition at line 143 of file modules.cpp. +Definition at line 137 of file modules.cpp. .SH "Author" .PP diff --git a/docs/man/man3/Extensible.3 b/docs/man/man3/Extensible.3 index 6c291ce75..4cdb11d5d 100644 --- a/docs/man/man3/Extensible.3 +++ b/docs/man/man3/Extensible.3 @@ -1,4 +1,4 @@ -.TH "Extensible" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "Extensible" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/FileReader.3 b/docs/man/man3/FileReader.3 index 09067f8f8..bf779fb9e 100644 --- a/docs/man/man3/FileReader.3 +++ b/docs/man/man3/FileReader.3 @@ -1,4 +1,4 @@ -.TH "FileReader" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "FileReader" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -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 988 of file modules.cpp. +Definition at line 961 of file modules.cpp. .PP .nf -989 { -990 } +962 { +963 } .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 981 of file modules.cpp. +Definition at line 954 of file modules.cpp. .PP References fc. .PP .nf -982 { -983 file_cache c; -984 readfile(c,filename.c_str()); -985 this->fc = c; -986 } +955 { +956 file_cache c; +957 readfile(c,filename.c_str()); +958 this->fc = c; +959 } .fi .PP .SS "FileReader::~FileReader ()" @@ -97,11 +97,11 @@ Default destructor. .PP This deletes the memory allocated to the file. .PP -Definition at line 1000 of file modules.cpp. +Definition at line 973 of file modules.cpp. .PP .nf -1001 { -1002 } +974 { +975 } .fi .PP .SH "Member Function Documentation" @@ -110,21 +110,21 @@ Definition at line 1000 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 1004 of file modules.cpp. +Definition at line 977 of file modules.cpp. .PP References fc. .PP .nf -1005 { -1006 if (fc.size() == 0) -1007 { -1008 return(false); -1009 } -1010 else -1011 { -1012 return(true); -1013 } -1014 } +978 { +979 if (fc.size() == 0) +980 { +981 return(false); +982 } +983 else +984 { +985 return(true); +986 } +987 } .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 1023 of file modules.cpp. +Definition at line 996 of file modules.cpp. .PP References fc. .PP .nf -1024 { -1025 return fc.size(); -1026 } +997 { +998 return fc.size(); +999 } .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 1016 of file modules.cpp. +Definition at line 989 of file modules.cpp. .PP References fc. .PP .nf -1017 { -1018 if ((x<0) || ((unsigned)x>fc.size())) -1019 return ''; -1020 return fc[x]; -1021 } +990 { +991 if ((x<0) || ((unsigned)x>fc.size())) +992 return ''; +993 return fc[x]; +994 } .fi .PP .SS "void FileReader::LoadFile (\fBstd::string\fP filename)" @@ -167,16 +167,16 @@ 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 992 of file modules.cpp. +Definition at line 965 of file modules.cpp. .PP References fc. .PP .nf -993 { -994 file_cache c; -995 readfile(c,filename.c_str()); -996 this->fc = c; -997 } +966 { +967 file_cache c; +968 readfile(c,filename.c_str()); +969 this->fc = c; +970 } .fi .PP .SH "Member Data Documentation" diff --git a/docs/man/man3/GLine.3 b/docs/man/man3/GLine.3 index a4dae91d5..039de05ee 100644 --- a/docs/man/man3/GLine.3 +++ b/docs/man/man3/GLine.3 @@ -1,4 +1,4 @@ -.TH "GLine" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "GLine" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/HostItem.3 b/docs/man/man3/HostItem.3 index 873025613..9adfeb7d4 100644 --- a/docs/man/man3/HostItem.3 +++ b/docs/man/man3/HostItem.3 @@ -1,4 +1,4 @@ -.TH "HostItem" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "HostItem" 3 "12 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 1dc773958..9e08b1d3c 100644 --- a/docs/man/man3/InspSocket.3 +++ b/docs/man/man3/InspSocket.3 @@ -1,4 +1,4 @@ -.TH "InspSocket" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "InspSocket" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -60,6 +60,9 @@ InspSocket \- .RI "bool \fBPoll\fP ()" .br .ti -1c +.RI "int \fBGetFd\fP ()" +.br +.ti -1c .RI "virtual void \fBClose\fP ()" .br .ti -1c @@ -119,352 +122,367 @@ Definition at line 30 of file socket.h. .PP .SS "InspSocket::InspSocket ()" .PP -Definition at line 46 of file socket.cpp. +Definition at line 49 of file socket.cpp. .PP References I_DISCONNECTED, and state. .PP .nf -47 { -48 this->state = I_DISCONNECTED; -49 } +50 { +51 this->state = I_DISCONNECTED; +52 } .fi .PP .SS "InspSocket::InspSocket (int newfd, char * ip)" .PP -Definition at line 51 of file socket.cpp. +Definition at line 54 of file socket.cpp. .PP -References fd, I_CONNECTED, IP, and state. +References SocketEngine::AddFd(), fd, I_CONNECTED, IP, state, and X_ESTAB_MODULE. .PP .nf -52 { -53 this->fd = newfd; -54 this->state = I_CONNECTED; -55 this->IP = ip; -56 } +55 { +56 this->fd = newfd; +57 this->state = I_CONNECTED; +58 this->IP = ip; +59 SE->AddFd(this->fd,true,X_ESTAB_MODULE); +60 } .fi .PP .SS "InspSocket::InspSocket (\fBstd::string\fP host, int port, bool listening, unsigned long maxtime)" .PP -Definition at line 58 of file socket.cpp. +Definition at line 62 of file socket.cpp. .PP -References addr, addy, Close(), DEBUG, fd, I_CONNECTING, I_ERR_BIND, I_ERR_CONNECT, I_ERR_SOCKET, I_ERROR, I_LISTENING, IP, OnError(), state, timeout, and timeout_end. +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. .PP .nf -59 { -60 if (listening) { -61 if ((this->fd = OpenTCPSocket()) == ERROR) -62 { -63 this->fd = -1; -64 this->state = I_ERROR; -65 this->OnError(I_ERR_SOCKET); -66 log(DEBUG,'OpenTCPSocket() error'); -67 return; -68 } -69 else -70 { -71 if (BindSocket(this->fd,this->client,this->server,port,(char*)host.c_str()) == ERROR) -72 { -73 this->Close(); -74 this->fd = -1; -75 this->state = I_ERROR; -76 this->OnError(I_ERR_BIND); -77 log(DEBUG,'BindSocket() error %s',strerror(errno)); -78 return; -79 } -80 else -81 { -82 this->state = I_LISTENING; -83 log(DEBUG,'New socket now in I_LISTENING state'); -84 return; -85 } -86 } -87 } else { -88 char* ip; -89 this->host = host; -90 hostent* hoste = gethostbyname(host.c_str()); -91 if (!hoste) { -92 ip = (char*)host.c_str(); -93 } else { -94 struct in_addr* ia = (in_addr*)hoste->h_addr; -95 ip = inet_ntoa(*ia); -96 } -97 -98 this->IP = ip; -99 -100 timeout_end = time(NULL)+maxtime; -101 timeout = false; -102 if ((this->fd = socket(AF_INET, SOCK_STREAM, 0)) == -1) -103 { -104 this->state = I_ERROR; -105 this->OnError(I_ERR_SOCKET); -106 return; -107 } -108 this->port = port; -109 inet_aton(ip,&addy); -110 addr.sin_family = AF_INET; -111 addr.sin_addr = addy; -112 addr.sin_port = htons(this->port); -113 -114 int flags; -115 flags = fcntl(this->fd, F_GETFL, 0); -116 fcntl(this->fd, F_SETFL, flags | O_NONBLOCK); -117 -118 if(connect(this->fd, (sockaddr*)&this->addr,sizeof(this->addr)) == -1) -119 { -120 if (errno != EINPROGRESS) -121 { -122 this->Close(); -123 this->OnError(I_ERR_CONNECT); -124 this->state = I_ERROR; -125 return; -126 } -127 } -128 this->state = I_CONNECTING; -129 return; -130 } -131 } +63 { +64 if (listening) { +65 if ((this->fd = OpenTCPSocket()) == ERROR) +66 { +67 this->fd = -1; +68 this->state = I_ERROR; +69 this->OnError(I_ERR_SOCKET); +70 log(DEBUG,'OpenTCPSocket() error'); +71 return; +72 } +73 else +74 { +75 if (BindSocket(this->fd,this->client,this->server,port,(char*)host.c_str()) == ERROR) +76 { +77 this->Close(); +78 this->fd = -1; +79 this->state = I_ERROR; +80 this->OnError(I_ERR_BIND); +81 log(DEBUG,'BindSocket() error %s',strerror(errno)); +82 return; +83 } +84 else +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 } .fi .PP .SS "InspSocket::~InspSocket ()\fC [virtual]\fP" .PP -Definition at line 254 of file socket.cpp. +Definition at line 265 of file socket.cpp. .PP References Close(). .PP .nf -255 { -256 this->Close(); -257 } +266 { +267 this->Close(); +268 } .fi .PP .SH "Member Function Documentation" .PP .SS "void InspSocket::Close ()\fC [virtual]\fP" .PP -Definition at line 133 of file socket.cpp. +Definition at line 139 of file socket.cpp. .PP References fd, and OnClose(). .PP Referenced by InspSocket(), and ~InspSocket(). .PP .nf -134 { -135 if (this->fd != -1) -136 { -137 this->OnClose(); -138 shutdown(this->fd,2); -139 close(this->fd); -140 this->fd = -1; -141 } -142 } +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 } +.fi +.PP +.SS "int InspSocket::GetFd ()" +.PP +Definition at line 252 of file socket.cpp. +.PP +References fd. +.PP +.nf +253 { +254 return this->fd; +255 } .fi .PP .SS "\fBstd::string\fP InspSocket::GetIP ()" .PP -Definition at line 144 of file socket.cpp. +Definition at line 150 of file socket.cpp. .PP References IP. .PP .nf -145 { -146 return this->IP; -147 } +151 { +152 return this->IP; +153 } .fi .PP .SS "\fBInspSocketState\fP InspSocket::GetState ()" .PP -Definition at line 241 of file socket.cpp. +Definition at line 247 of file socket.cpp. .PP References state. .PP .nf -242 { -243 return this->state; -244 } +248 { +249 return this->state; +250 } .fi .PP .SS "void InspSocket::OnClose ()\fC [virtual]\fP" .PP -Definition at line 252 of file socket.cpp. +Definition at line 263 of file socket.cpp. .PP Referenced by Close(). .PP .nf -252 { return; } +263 { return; } .fi .PP .SS "bool InspSocket::OnConnected ()\fC [virtual]\fP" .PP -Definition at line 246 of file socket.cpp. +Definition at line 257 of file socket.cpp. .PP Referenced by Poll(). .PP .nf -246 { return true; } +257 { return true; } .fi .PP .SS "bool InspSocket::OnDataReady ()\fC [virtual]\fP" .PP -Definition at line 250 of file socket.cpp. +Definition at line 261 of file socket.cpp. .PP Referenced by Poll(). .PP .nf -250 { return true; } +261 { return true; } .fi .PP .SS "int InspSocket::OnDisconnect ()\fC [virtual]\fP" .PP -Definition at line 248 of file socket.cpp. +Definition at line 259 of file socket.cpp. .PP .nf -248 { return 0; } +259 { return 0; } .fi .PP .SS "void InspSocket::OnError (\fBInspSocketError\fP e)\fC [virtual]\fP" .PP -Definition at line 247 of file socket.cpp. +Definition at line 258 of file socket.cpp. .PP Referenced by InspSocket(), and Poll(). .PP .nf -247 { return; } +258 { return; } .fi .PP .SS "int InspSocket::OnIncomingConnection (int newfd, char * ip)\fC [virtual]\fP" .PP -Definition at line 249 of file socket.cpp. +Definition at line 260 of file socket.cpp. .PP Referenced by Poll(). .PP .nf -249 { return 0; } +260 { return 0; } .fi .PP .SS "void InspSocket::OnTimeout ()\fC [virtual]\fP" .PP -Definition at line 251 of file socket.cpp. +Definition at line 262 of file socket.cpp. .PP Referenced by Poll(). .PP .nf -251 { return; } +262 { return; } .fi .PP .SS "bool InspSocket::Poll ()" .PP -Definition at line 191 of file socket.cpp. +Definition at line 197 of file socket.cpp. .PP -References client, fd, I_CONNECTED, I_CONNECTING, I_ERR_TIMEOUT, I_ERROR, I_LISTENING, length, OnConnected(), OnDataReady(), OnError(), OnIncomingConnection(), OnTimeout(), polls, SetState(), state, timeout, and timeout_end. +References SocketEngine::AddFd(), client, SocketEngine::DelFd(), I_CONNECTED, I_CONNECTING, I_ERR_TIMEOUT, I_ERROR, I_LISTENING, length, OnConnected(), OnDataReady(), OnError(), OnIncomingConnection(), OnTimeout(), SetState(), state, timeout, timeout_end, and X_ESTAB_MODULE. .PP .nf -192 { -193 if ((time(NULL) > timeout_end) && (this->state == I_CONNECTING)) -194 { -195 // for non-listening sockets, the timeout can occur -196 // which causes termination of the connection after -197 // the given number of seconds without a successful -198 // connection. -199 this->OnTimeout(); -200 this->OnError(I_ERR_TIMEOUT); -201 timeout = true; -202 this->state = I_ERROR; -203 return false; -204 } -205 polls.fd = this->fd; -206 state == I_CONNECTING ? polls.events = POLLOUT : polls.events = POLLIN; -207 int ret = poll(&polls,1,1); -208 -209 if (ret > 0) -210 { -211 int incoming = -1; -212 -213 switch (this->state) -214 { -215 case I_CONNECTING: -216 this->SetState(I_CONNECTED); -217 return this->OnConnected(); -218 break; -219 case I_LISTENING: -220 length = sizeof (client); -221 incoming = accept (this->fd, (sockaddr*)&client,&length); -222 this->OnIncomingConnection(incoming,inet_ntoa(client.sin_addr)); -223 return true; -224 break; -225 case I_CONNECTED: -226 return this->OnDataReady(); -227 break; -228 default: -229 break; -230 } -231 } -232 return true; -233 } +198 { +199 if ((time(NULL) > timeout_end) && (this->state == I_CONNECTING)) +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 false; +210 } +211 +212 int incoming = -1; +213 +214 switch (this->state) +215 { +216 case I_CONNECTING: +217 this->SetState(I_CONNECTED); +218 /* Our socket was in write-state, so delete it and re-add it +219 * in read-state. +220 */ +221 SE->DelFd(this->fd); +222 SE->AddFd(this->fd,true,X_ESTAB_MODULE); +223 return this->OnConnected(); +224 break; +225 case I_LISTENING: +226 length = sizeof (client); +227 incoming = accept (this->fd, (sockaddr*)&client,&length); +228 this->OnIncomingConnection(incoming,inet_ntoa(client.sin_addr)); +229 return true; +230 break; +231 case I_CONNECTED: +232 return this->OnDataReady(); +233 break; +234 default: +235 break; +236 } +237 +238 return true; +239 } .fi .PP .SS "char * InspSocket::Read ()\fC [virtual]\fP" .PP -Definition at line 149 of file socket.cpp. +Definition at line 155 of file socket.cpp. .PP References DEBUG, and ibuf. .PP .nf -150 { -151 int n = recv(this->fd,this->ibuf,sizeof(this->ibuf),0); -152 if (n > 0) -153 { -154 ibuf[n] = 0; -155 return ibuf; -156 } -157 else -158 { -159 log(DEBUG,'EOF or error on socket'); -160 return NULL; -161 } -162 } +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 } .fi .PP .SS "void InspSocket::SetState (\fBInspSocketState\fP s)" .PP -Definition at line 235 of file socket.cpp. +Definition at line 241 of file socket.cpp. .PP References DEBUG, and state. .PP Referenced by Poll(). .PP .nf -236 { -237 log(DEBUG,'Socket state change'); -238 this->state = s; -239 } +242 { +243 log(DEBUG,'Socket state change'); +244 this->state = s; +245 } .fi .PP .SS "int InspSocket::Write (\fBstd::string\fP data)\fC [virtual]\fP" .PP -Definition at line 168 of file socket.cpp. +Definition at line 174 of file socket.cpp. .PP .nf -169 { -170 char* d = (char*)data.c_str(); -171 unsigned int written = 0; -172 int n = 0; -173 int s = data.length(); -174 while ((written < data.length()) && (n >= 0)) -175 { -176 n = send(this->fd,d,s,0); -177 if (n > 0) -178 { -179 // If we didnt write everything, advance -180 // the pointers so that when we retry -181 // the next time around the loop, we try -182 // to write what we failed to write before. -183 written += n; -184 s -= n; -185 d += n; -186 } -187 } -188 return written; -189 } +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 } .fi .PP .SH "Member Data Documentation" @@ -488,7 +506,7 @@ Referenced by Poll(). .PP Definition at line 33 of file socket.h. .PP -Referenced by Close(), InspSocket(), and Poll(). +Referenced by Close(), GetFd(), and InspSocket(). .SS "\fBstd::string\fP \fBInspSocket::host\fP\fC [private]\fP" .PP Definition at line 34 of file socket.h. @@ -510,8 +528,6 @@ Referenced by Poll(). .SS "pollfd \fBInspSocket::polls\fP\fC [private]\fP" .PP Definition at line 41 of file socket.h. -.PP -Referenced by Poll(). .SS "int \fBInspSocket::port\fP\fC [private]\fP" .PP Definition at line 35 of file socket.h. diff --git a/docs/man/man3/InviteItem.3 b/docs/man/man3/InviteItem.3 index 03bba1468..62fb66d89 100644 --- a/docs/man/man3/InviteItem.3 +++ b/docs/man/man3/InviteItem.3 @@ -1,4 +1,4 @@ -.TH "InviteItem" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "InviteItem" 3 "12 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 faf75bc02..0fbdee50c 100644 --- a/docs/man/man3/Invited.3 +++ b/docs/man/man3/Invited.3 @@ -1,4 +1,4 @@ -.TH "Invited" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "Invited" 3 "12 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 81341d10c..823119cc2 100644 --- a/docs/man/man3/KLine.3 +++ b/docs/man/man3/KLine.3 @@ -1,4 +1,4 @@ -.TH "KLine" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "KLine" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ModeParameter.3 b/docs/man/man3/ModeParameter.3 index a6388f4c3..4a9e1d33e 100644 --- a/docs/man/man3/ModeParameter.3 +++ b/docs/man/man3/ModeParameter.3 @@ -1,4 +1,4 @@ -.TH "ModeParameter" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ModeParameter" 3 "12 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 e5b842580..11af088cb 100644 --- a/docs/man/man3/Module.3 +++ b/docs/man/man3/Module.3 @@ -1,4 +1,4 @@ -.TH "Module" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "Module" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -354,20 +354,20 @@ Default constructor Creates a module class. .PP .PP -Definition at line 307 of file modules.cpp. +Definition at line 301 of file modules.cpp. .PP .nf -307 { } +301 { } .fi .PP .SS "Module::~Module ()\fC [virtual]\fP" .PP Default destructor destroys a module class. .PP -Definition at line 308 of file modules.cpp. +Definition at line 302 of file modules.cpp. .PP .nf -308 { } +302 { } .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 321 of file modules.cpp. +Definition at line 313 of file modules.cpp. .PP References VF_VENDOR. .PP .nf -321 { return Version(1,0,0,0,VF_VENDOR); } +313 { 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 331 of file modules.cpp. +Definition at line 323 of file modules.cpp. .PP .nf -331 { }; +323 { }; .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 330 of file modules.cpp. +Definition at line 322 of file modules.cpp. .PP References ACR_DEFAULT. .PP .nf -330 { return ACR_DEFAULT; }; +322 { 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 356 of file modules.cpp. +Definition at line 348 of file modules.cpp. .PP .nf -356 { return 0; }; +348 { 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 382 of file modules.cpp. +Definition at line 374 of file modules.cpp. .PP .nf -382 { }; +374 { }; .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 378 of file modules.cpp. +Definition at line 370 of file modules.cpp. .PP .nf -378 { }; +370 { }; .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 380 of file modules.cpp. +Definition at line 372 of file modules.cpp. .PP .nf -380 { }; +372 { }; .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 381 of file modules.cpp. +Definition at line 373 of file modules.cpp. .PP .nf -381 { }; +373 { }; .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 379 of file modules.cpp. +Definition at line 371 of file modules.cpp. .PP .nf -379 { }; +371 { }; .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 335 of file modules.cpp. +Definition at line 327 of file modules.cpp. .PP .nf -335 { }; +327 { }; .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 376 of file modules.cpp. +Definition at line 368 of file modules.cpp. .PP .nf -376 { }; +368 { }; .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 349 of file modules.cpp. +Definition at line 341 of file modules.cpp. .PP .nf -349 { return 0; }; +341 { 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 348 of file modules.cpp. +Definition at line 340 of file modules.cpp. .PP .nf -348 { return 0; }; +340 { 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 377 of file modules.cpp. +Definition at line 369 of file modules.cpp. .PP .nf -377 { }; +369 { }; .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 346 of file modules.cpp. +Definition at line 338 of file modules.cpp. .PP .nf -346 { return 0; }; +338 { 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 343 of file modules.cpp. +Definition at line 335 of file modules.cpp. .PP .nf -343 { return 0; }; +335 { 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 344 of file modules.cpp. +Definition at line 336 of file modules.cpp. .PP .nf -344 { return 0; }; +336 { 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 345 of file modules.cpp. +Definition at line 337 of file modules.cpp. .PP .nf -345 { return 0; }; +337 { 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 338 of file modules.cpp. +Definition at line 330 of file modules.cpp. .PP .nf -338 { return true; }; +330 { 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 388 of file modules.cpp. +Definition at line 380 of file modules.cpp. .PP .nf -388 { }; +380 { }; .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 373 of file modules.cpp. +Definition at line 365 of file modules.cpp. .PP .nf -373 { }; +365 { }; .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 357 of file modules.cpp. +Definition at line 349 of file modules.cpp. .PP .nf -357 { return 0; }; +349 { 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 387 of file modules.cpp. +Definition at line 379 of file modules.cpp. .PP .nf -387 { }; +379 { }; .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 383 of file modules.cpp. +Definition at line 375 of file modules.cpp. .PP .nf -383 { }; +375 { }; .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 385 of file modules.cpp. +Definition at line 377 of file modules.cpp. .PP .nf -385 { }; +377 { }; .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 386 of file modules.cpp. +Definition at line 378 of file modules.cpp. .PP .nf -386 { }; +378 { }; .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 384 of file modules.cpp. +Definition at line 376 of file modules.cpp. .PP .nf -384 { }; +376 { }; .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 351 of file modules.cpp. +Definition at line 343 of file modules.cpp. .PP .nf -351 { return; }; +343 { 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 319 of file modules.cpp. +Definition at line 311 of file modules.cpp. .PP .nf -319 { return false; } +311 { 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 367 of file modules.cpp. +Definition at line 359 of file modules.cpp. .PP .nf -367 { }; +359 { }; .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 355 of file modules.cpp. +Definition at line 347 of file modules.cpp. .PP .nf -355 { }; +347 { }; .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 354 of file modules.cpp. +Definition at line 346 of file modules.cpp. .PP .nf -354 { }; +346 { }; .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 323 of file modules.cpp. +Definition at line 315 of file modules.cpp. .PP .nf -323 { }; +315 { }; .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 332 of file modules.cpp. +Definition at line 324 of file modules.cpp. .PP .nf -332 { return 0; }; +324 { 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 333 of file modules.cpp. +Definition at line 325 of file modules.cpp. .PP .nf -333 { }; +325 { }; .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 350 of file modules.cpp. +Definition at line 342 of file modules.cpp. .PP .nf -350 { return 0; }; +342 { 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 320 of file modules.cpp. +Definition at line 312 of file modules.cpp. .PP .nf -320 { }; +312 { }; .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 322 of file modules.cpp. +Definition at line 314 of file modules.cpp. .PP .nf -322 { }; +314 { }; .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 353 of file modules.cpp. +Definition at line 345 of file modules.cpp. .PP .nf -353 { return 0; }; +345 { 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 366 of file modules.cpp. +Definition at line 358 of file modules.cpp. .PP .nf -366 { }; +358 { }; .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 337 of file modules.cpp. +Definition at line 329 of file modules.cpp. .PP .nf -337 { return 0; }; +329 { 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 342 of file modules.cpp. +Definition at line 334 of file modules.cpp. .PP .nf -342 { return 0; }; +334 { 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 358 of file modules.cpp. +Definition at line 350 of file modules.cpp. .PP .nf -358 { }; +350 { }; .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 360 of file modules.cpp. +Definition at line 352 of file modules.cpp. .PP .nf -360 { }; +352 { }; .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 361 of file modules.cpp. +Definition at line 353 of file modules.cpp. .PP .nf -361 { return 0; }; +353 { 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 359 of file modules.cpp. +Definition at line 351 of file modules.cpp. .PP .nf -359 { return 0; }; +351 { 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 316 of file modules.cpp. +Definition at line 308 of file modules.cpp. .PP .nf -316 { } +308 { } .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 364 of file modules.cpp. +Definition at line 356 of file modules.cpp. .PP .nf -364 { }; +356 { }; .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 352 of file modules.cpp. +Definition at line 344 of file modules.cpp. .PP Referenced by Request::Send(). .PP .nf -352 { return NULL; }; +344 { 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 336 of file modules.cpp. +Definition at line 328 of file modules.cpp. .PP .nf -336 { }; +328 { }; .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 317 of file modules.cpp. +Definition at line 309 of file modules.cpp. .PP .nf -317 { } +309 { } .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 347 of file modules.cpp. +Definition at line 339 of file modules.cpp. .PP .nf -347 { }; +339 { }; .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 369 of file modules.cpp. +Definition at line 361 of file modules.cpp. .PP .nf -369 { }; +361 { }; .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 371 of file modules.cpp. +Definition at line 363 of file modules.cpp. .PP .nf -371 { }; +363 { }; .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 368 of file modules.cpp. +Definition at line 360 of file modules.cpp. .PP .nf -368 { }; +360 { }; .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 372 of file modules.cpp. +Definition at line 364 of file modules.cpp. .PP .nf -372 { }; +364 { }; .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 334 of file modules.cpp. +Definition at line 326 of file modules.cpp. .PP .nf -334 { }; +326 { }; .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 309 of file modules.cpp. +Definition at line 303 of file modules.cpp. .PP .nf -309 { } +303 { } .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 311 of file modules.cpp. +Definition at line 305 of file modules.cpp. .PP .nf -311 { } +305 { } .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 365 of file modules.cpp. +Definition at line 357 of file modules.cpp. .PP .nf -365 { }; +357 { }; .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 312 of file modules.cpp. +Definition at line 306 of file modules.cpp. .PP .nf -312 { } +306 { } .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 341 of file modules.cpp. +Definition at line 333 of file modules.cpp. .PP .nf -341 { }; +333 { }; .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 362 of file modules.cpp. +Definition at line 354 of file modules.cpp. .PP .nf -362 { }; +354 { }; .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 363 of file modules.cpp. +Definition at line 355 of file modules.cpp. .PP .nf -363 { }; +355 { }; .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 313 of file modules.cpp. +Definition at line 307 of file modules.cpp. .PP .nf -313 { } +307 { } .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 329 of file modules.cpp. +Definition at line 321 of file modules.cpp. .PP .nf -329 { }; +321 { }; .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 325 of file modules.cpp. +Definition at line 317 of file modules.cpp. .PP .nf -325 { return 0; }; +317 { 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 318 of file modules.cpp. +Definition at line 310 of file modules.cpp. .PP .nf -318 { return 0; } +310 { 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 340 of file modules.cpp. +Definition at line 332 of file modules.cpp. .PP .nf -340 { return 0; }; +332 { 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 326 of file modules.cpp. +Definition at line 318 of file modules.cpp. .PP .nf -326 { return 0; }; +318 { 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 328 of file modules.cpp. +Definition at line 320 of file modules.cpp. .PP .nf -328 { return 0; }; +320 { 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 327 of file modules.cpp. +Definition at line 319 of file modules.cpp. .PP .nf -327 { return 0; }; +319 { 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 310 of file modules.cpp. +Definition at line 304 of file modules.cpp. .PP .nf -310 { } +304 { } .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 339 of file modules.cpp. +Definition at line 331 of file modules.cpp. .PP .nf -339 { }; +331 { }; .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 375 of file modules.cpp. +Definition at line 367 of file modules.cpp. .PP .nf -375 { }; +367 { }; .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 324 of file modules.cpp. +Definition at line 316 of file modules.cpp. .PP .nf -324 { }; +316 { }; .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 374 of file modules.cpp. +Definition at line 366 of file modules.cpp. .PP .nf -374 { }; +366 { }; .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 370 of file modules.cpp. +Definition at line 362 of file modules.cpp. .PP .nf -370 { }; +362 { }; .fi .PP diff --git a/docs/man/man3/ModuleFactory.3 b/docs/man/man3/ModuleFactory.3 index 07c23ad69..be471b88d 100644 --- a/docs/man/man3/ModuleFactory.3 +++ b/docs/man/man3/ModuleFactory.3 @@ -1,4 +1,4 @@ -.TH "ModuleFactory" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ModuleFactory" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ModuleMessage.3 b/docs/man/man3/ModuleMessage.3 index 88ca58ca7..422325015 100644 --- a/docs/man/man3/ModuleMessage.3 +++ b/docs/man/man3/ModuleMessage.3 @@ -1,4 +1,4 @@ -.TH "ModuleMessage" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ModuleMessage" 3 "12 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 f50afbdd4..4859a543d 100644 --- a/docs/man/man3/QLine.3 +++ b/docs/man/man3/QLine.3 @@ -1,4 +1,4 @@ -.TH "QLine" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "QLine" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/Request.3 b/docs/man/man3/Request.3 index bd8f3ab8f..e77724e7a 100644 --- a/docs/man/man3/Request.3 +++ b/docs/man/man3/Request.3 @@ -1,4 +1,4 @@ -.TH "Request" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "Request" 3 "12 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 252 of file modules.cpp. +Definition at line 246 of file modules.cpp. .PP .nf -252 : data(anydata), source(src), dest(dst) { }; +246 : data(anydata), source(src), dest(dst) { }; .fi .PP .SH "Member Function Documentation" @@ -77,42 +77,42 @@ Definition at line 252 of file modules.cpp. .PP Fetch the Request data. .PP -Definition at line 254 of file modules.cpp. +Definition at line 248 of file modules.cpp. .PP References data. .PP .nf -255 { -256 return this->data; -257 } +249 { +250 return this->data; +251 } .fi .PP .SS "\fBModule\fP * Request::GetDest ()" .PP Fetch the request destination (should be 'this' in the receiving module). .PP -Definition at line 264 of file modules.cpp. +Definition at line 258 of file modules.cpp. .PP References dest. .PP .nf -265 { -266 return this->dest; -267 } +259 { +260 return this->dest; +261 } .fi .PP .SS "\fBModule\fP * Request::GetSource ()" .PP Fetch the request source. .PP -Definition at line 259 of file modules.cpp. +Definition at line 253 of file modules.cpp. .PP References source. .PP .nf -260 { -261 return this->source; -262 } +254 { +255 return this->source; +256 } .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 269 of file modules.cpp. +Definition at line 263 of file modules.cpp. .PP References dest, and Module::OnRequest(). .PP .nf -270 { -271 if (this->dest) -272 { -273 return dest->OnRequest(this); -274 } -275 else -276 { -277 return NULL; -278 } -279 } +264 { +265 if (this->dest) +266 { +267 return dest->OnRequest(this); +268 } +269 else +270 { +271 return NULL; +272 } +273 } .fi .PP .SH "Member Data Documentation" diff --git a/docs/man/man3/Server.3 b/docs/man/man3/Server.3 index cca17c7e4..f65da0bef 100644 --- a/docs/man/man3/Server.3 +++ b/docs/man/man3/Server.3 @@ -1,4 +1,4 @@ -.TH "Server" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "Server" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -261,11 +261,11 @@ Default constructor. .PP Creates a Server object. .PP -Definition at line 394 of file modules.cpp. +Definition at line 386 of file modules.cpp. .PP .nf -395 { -396 } +387 { +388 } .fi .PP .SS "Server::~Server ()\fC [virtual]\fP" @@ -274,11 +274,11 @@ Default destructor. .PP Destroys a Server object. .PP -Definition at line 398 of file modules.cpp. +Definition at line 390 of file modules.cpp. .PP .nf -399 { -400 } +391 { +392 } .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 495 of file modules.cpp. +Definition at line 487 of file modules.cpp. .PP References createcommand(). .PP .nf -496 { -497 createcommand(cmd,f,flags,minparams,source); -498 } +488 { +489 createcommand(cmd,f,flags,minparams,source); +490 } .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 758 of file modules.cpp. +Definition at line 731 of file modules.cpp. .PP References add_eline(). .PP .nf -759 { -760 add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); -761 } +732 { +733 add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); +734 } .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 663 of file modules.cpp. +Definition at line 655 of file modules.cpp. .PP References DoAddExtendedMode(), ModeMakeList(), and MT_CHANNEL. .PP .nf -664 { -665 bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1); -666 if (res) -667 ModeMakeList(modechar); -668 return res; -669 } +656 { +657 bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1); +658 if (res) +659 ModeMakeList(modechar); +660 return res; +661 } .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 635 of file modules.cpp. +Definition at line 627 of file modules.cpp. .PP References DEBUG, DoAddExtendedMode(), MT_CLIENT, and MT_SERVER. .PP .nf -636 { -637 if (((modechar >= 'A') && (modechar <= 'Z')) || ((modechar >= 'a') && (modechar <= 'z'))) -638 { -639 if (type == MT_SERVER) -640 { -641 log(DEBUG,'*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion'); -642 return false; -643 } -644 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT)) -645 { -646 log(DEBUG,'*** API ERROR *** Parameters on MT_CLIENT modes are not supported'); -647 return false; -648 } -649 if ((params_when_on>1) || (params_when_off>1)) -650 { -651 log(DEBUG,'*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported'); -652 return false; -653 } -654 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off); -655 } -656 else -657 { -658 log(DEBUG,'*** API ERROR *** Muppet modechar detected.'); -659 } -660 return false; -661 } +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 } .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 738 of file modules.cpp. +Definition at line 711 of file modules.cpp. .PP References add_gline(). .PP .nf -739 { -740 add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); -741 } +712 { +713 add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); +714 } .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 753 of file modules.cpp. +Definition at line 726 of file modules.cpp. .PP References add_kline(). .PP .nf -754 { -755 add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); -756 } +727 { +728 add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); +729 } .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 743 of file modules.cpp. +Definition at line 716 of file modules.cpp. .PP References add_qline(). .PP .nf -744 { -745 add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str()); -746 } +717 { +718 add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str()); +719 } .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 402 of file modules.cpp. +Definition at line 394 of file modules.cpp. .PP References module_sockets. .PP .nf -403 { -404 module_sockets.push_back(sock); -405 } +395 { +396 module_sockets.push_back(sock); +397 } .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 748 of file modules.cpp. +Definition at line 721 of file modules.cpp. .PP References add_zline(). .PP .nf -749 { -750 add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str()); -751 } +722 { +723 add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str()); +724 } .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 788 of file modules.cpp. +Definition at line 761 of file modules.cpp. .PP References duration(). .PP .nf -789 { -790 return duration(delta.c_str()); -791 } +762 { +763 return duration(delta.c_str()); +764 } .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 480 of file modules.cpp. +Definition at line 472 of file modules.cpp. .PP .nf -481 { -482 call_handler(commandname.c_str(),parameters,pcnt,user); -483 } +473 { +474 call_handler(commandname.c_str(),parameters,pcnt,user); +475 } .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 578 of file modules.cpp. +Definition at line 570 of file modules.cpp. .PP References ChangeName(). .PP .nf -579 { -580 ChangeName(user,gecos.c_str()); -581 } +571 { +572 ChangeName(user,gecos.c_str()); +573 } .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 573 of file modules.cpp. +Definition at line 565 of file modules.cpp. .PP References ChangeDisplayedHost(). .PP .nf -574 { -575 ChangeDisplayedHost(user,host.c_str()); -576 } +566 { +567 ChangeDisplayedHost(user,host.c_str()); +568 } .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 465 of file modules.cpp. +Definition at line 457 of file modules.cpp. .PP .nf -466 { -467 force_nickchange(user,nickname.c_str()); -468 } +458 { +459 force_nickchange(user,nickname.c_str()); +460 } .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 603 of file modules.cpp. +Definition at line 595 of file modules.cpp. .PP References cmode(). .PP .nf -604 { -605 return cmode(User,Chan); -606 } +596 { +597 return cmode(User,Chan); +598 } .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 551 of file modules.cpp. +Definition at line 543 of file modules.cpp. .PP References common_channels(). .PP .nf -552 { -553 return (common_channels(u1,u2) != 0); -554 } +544 { +545 return (common_channels(u1,u2) != 0); +546 } .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 671 of file modules.cpp. +Definition at line 663 of file modules.cpp. .PP .nf -672 { -673 return usercount(c); -674 } +664 { +665 return usercount(c); +666 } .fi .PP .SS "bool Server::DelELine (\fBstd::string\fP hostmask)\fC [virtual]\fP" .PP Deletes a local E-Line. .PP -Definition at line 783 of file modules.cpp. +Definition at line 756 of file modules.cpp. .PP References del_eline(). .PP .nf -784 { -785 return del_eline(hostmask.c_str()); -786 } +757 { +758 return del_eline(hostmask.c_str()); +759 } .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 763 of file modules.cpp. +Definition at line 736 of file modules.cpp. .PP References del_gline(). .PP .nf -764 { -765 return del_gline(hostmask.c_str()); -766 } +737 { +738 return del_gline(hostmask.c_str()); +739 } .fi .PP .SS "bool Server::DelKLine (\fBstd::string\fP hostmask)\fC [virtual]\fP" .PP Deletes a local K-Line. .PP -Definition at line 778 of file modules.cpp. +Definition at line 751 of file modules.cpp. .PP References del_kline(). .PP .nf -779 { -780 return del_kline(hostmask.c_str()); -781 } +752 { +753 return del_kline(hostmask.c_str()); +754 } .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 768 of file modules.cpp. +Definition at line 741 of file modules.cpp. .PP References del_qline(). .PP .nf -769 { -770 return del_qline(nickname.c_str()); -771 } +742 { +743 return del_qline(nickname.c_str()); +744 } .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 413 of file modules.cpp. +Definition at line 405 of file modules.cpp. .PP References module_sockets. .PP .nf -414 { -415 for (std::vector<InspSocket*>::iterator a = module_sockets.begin(); a < module_sockets.end(); a++) -416 { -417 if (*a == sock) -418 { -419 module_sockets.erase(a); -420 return; -421 } -422 } -423 } +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 } .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 773 of file modules.cpp. +Definition at line 746 of file modules.cpp. .PP References del_zline(). .PP .nf -774 { -775 return del_zline(ipaddr.c_str()); -776 } +747 { +748 return del_zline(ipaddr.c_str()); +749 } .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 598 of file modules.cpp. +Definition at line 590 of file modules.cpp. .PP .nf -599 { -600 return FindChan(channel.c_str()); -601 } +591 { +592 return FindChan(channel.c_str()); +593 } .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 593 of file modules.cpp. +Definition at line 585 of file modules.cpp. .PP .nf -594 { -595 return (socket < 65536 ? fd_ref_table[socket] : NULL); -596 } +586 { +587 return (socket < 65536 ? fd_ref_table[socket] : NULL); +588 } .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 822 of file modules.cpp. +Definition at line 795 of file modules.cpp. .PP References MODCOUNT, module_names, and modules. .PP .nf -823 { -824 for (int i = 0; i <= MODCOUNT; i++) -825 { -826 if (module_names[i] == name) -827 { -828 return modules[i]; -829 } -830 } -831 return NULL; -832 } +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 } .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 588 of file modules.cpp. +Definition at line 580 of file modules.cpp. .PP .nf -589 { -590 return Find(nick); -591 } +581 { +582 return Find(nick); +583 } .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 628 of file modules.cpp. +Definition at line 620 of file modules.cpp. .PP .nf -629 { -630 return Admin(getadminname(),getadminemail(),getadminnick()); -631 } +621 { +622 return Admin(getadminname(),getadminemail(),getadminnick()); +623 } .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 618 of file modules.cpp. +Definition at line 610 of file modules.cpp. .PP .nf -619 { -620 return getnetworkname(); -621 } +611 { +612 return getnetworkname(); +613 } .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 623 of file modules.cpp. +Definition at line 615 of file modules.cpp. .PP .nf -624 { -625 return getserverdesc(); -626 } +616 { +617 return getserverdesc(); +618 } .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 613 of file modules.cpp. +Definition at line 605 of file modules.cpp. .PP .nf -614 { -615 return getservername(); -616 } +606 { +607 return getservername(); +608 } .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 453 of file modules.cpp. +Definition at line 445 of file modules.cpp. .PP References chanrec::GetUsers(), and list. .PP .nf -454 { -455 chanuserlist userl; -456 userl.clear(); -457 std::vector<char*> *list = chan->GetUsers(); -458 for (std::vector<char*>::iterator i = list->begin(); i != list->end(); i++) -459 { -460 char* o = *i; -461 userl.push_back((userrec*)o); -462 } -463 return userl; -464 } +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 } .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 583 of file modules.cpp. +Definition at line 575 of file modules.cpp. .PP References isnick(). .PP .nf -584 { -585 return (isnick(nick.c_str()) != 0); -586 } +576 { +577 return (isnick(nick.c_str()) != 0); +578 } .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 608 of file modules.cpp. +Definition at line 600 of file modules.cpp. .PP References has_channel(). .PP .nf -609 { -610 return has_channel(User,Chan); -611 } +601 { +602 return has_channel(User,Chan); +603 } .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 475 of file modules.cpp. +Definition at line 467 of file modules.cpp. .PP References is_uline(). .PP .nf -476 { -477 return is_uline(server.c_str()); -478 } +468 { +469 return is_uline(server.c_str()); +470 } .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 793 of file modules.cpp. +Definition at line 766 of file modules.cpp. .PP .nf -794 { -795 const char* dest = mask.c_str(); -796 if (strchr(dest,'!')==0) -797 return false; -798 if (strchr(dest,'@')==0) -799 return false; -800 for (unsigned int i = 0; i < strlen(dest); i++) -801 if (dest[i] < 32) -802 return false; -803 for (unsigned int i = 0; i < strlen(dest); i++) -804 if (dest[i] > 126) -805 return false; -806 unsigned int c = 0; -807 for (unsigned int i = 0; i < strlen(dest); i++) -808 if (dest[i] == '!') -809 c++; -810 if (c>1) -811 return false; -812 c = 0; -813 for (unsigned int i = 0; i < strlen(dest); i++) -814 if (dest[i] == '@') -815 c++; -816 if (c>1) -817 return false; -818 -819 return true; -820 } +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 } .fi .PP .SS "bool Server::IsValidModuleCommand (\fBstd::string\fP commandname, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP" .PP -Definition at line 485 of file modules.cpp. +Definition at line 477 of file modules.cpp. .PP .nf -486 { -487 return is_valid_cmd(commandname.c_str(), pcnt, user); -488 } +478 { +479 return is_valid_cmd(commandname.c_str(), pcnt, user); +480 } .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 443 of file modules.cpp. +Definition at line 435 of file modules.cpp. .PP .nf -444 { -445 return add_channel(user,cname.c_str(),key.c_str(),false); -446 } +436 { +437 return add_channel(user,cname.c_str(),key.c_str(),false); +438 } .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 490 of file modules.cpp. +Definition at line 482 of file modules.cpp. .PP .nf -491 { -492 log(level,'%s',s.c_str()); -493 } +483 { +484 log(level,'%s',s.c_str()); +485 } .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 430 of file modules.cpp. +Definition at line 422 of file modules.cpp. .PP .nf -431 { -432 char literal[MAXBUF],pattern[MAXBUF]; -433 strlcpy(literal,sliteral.c_str(),MAXBUF); -434 strlcpy(pattern,spattern.c_str(),MAXBUF); -435 return match(literal,pattern); -436 } +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 } .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 448 of file modules.cpp. +Definition at line 440 of file modules.cpp. .PP .nf -449 { -450 return del_channel(user,cname.c_str(),reason.c_str(),false); -451 } +441 { +442 return del_channel(user,cname.c_str(),reason.c_str(),false); +443 } .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 708 of file modules.cpp. +Definition at line 681 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. .PP .nf -709 { -710 zombie->fd = alive->fd; -711 alive->fd = FD_MAGIC_NUMBER; -712 alive->ClearBuffer(); -713 Write(zombie->fd,':%s!%s@%s NICK %s',alive->nick,alive->ident,alive->host,zombie->nick); -714 kill_link(alive,message.c_str()); -715 fd_ref_table[zombie->fd] = zombie; -716 for (int i = 0; i != MAXCHANS; i++) -717 { -718 if (zombie->chans[i].channel != NULL) -719 { -720 if (zombie->chans[i].channel->name) -721 { -722 chanrec* Ptr = zombie->chans[i].channel; -723 WriteFrom(zombie->fd,zombie,'JOIN %s',Ptr->name); -724 if (Ptr->topicset) -725 { -726 WriteServ(zombie->fd,'332 %s %s :%s', zombie->nick, Ptr->name, Ptr->topic); -727 WriteServ(zombie->fd,'333 %s %s %s %d', zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset); -728 } -729 userlist(zombie,Ptr); -730 WriteServ(zombie->fd,'366 %s %s :End of /NAMES list.', zombie->nick, Ptr->name); -731 -732 } -733 } -734 } -735 return true; -736 } +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 } .fi .PP .SS "void Server::QuitUser (\fBuserrec\fP * user, \fBstd::string\fP reason)\fC [virtual]\fP" @@ -1023,23 +1023,23 @@ 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 470 of file modules.cpp. +Definition at line 462 of file modules.cpp. .PP .nf -471 { -472 kill_link(user,reason.c_str()); -473 } +463 { +464 kill_link(user,reason.c_str()); +465 } .fi .PP .SS "void Server::RehashServer ()\fC [virtual]\fP" .PP -Definition at line 407 of file modules.cpp. +Definition at line 399 of file modules.cpp. .PP .nf -408 { -409 WriteOpers('*** Rehashing config file'); -410 ReadConfig(false,NULL); -411 } +400 { +401 WriteOpers('*** Rehashing config file'); +402 ReadConfig(false,NULL); +403 } .fi .PP .SS "void Server::Send (int Socket, \fBstd::string\fP s)\fC [virtual]\fP" @@ -1048,12 +1048,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 505 of file modules.cpp. +Definition at line 497 of file modules.cpp. .PP .nf -506 { -507 Write(Socket,'%s',s.c_str()); -508 } +498 { +499 Write(Socket,'%s',s.c_str()); +500 } .fi .PP .SS "void Server::SendChannel (\fBuserrec\fP * User, \fBchanrec\fP * Channel, \fBstd::string\fP s, bool IncludeSender)\fC [virtual]\fP" @@ -1062,19 +1062,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 539 of file modules.cpp. +Definition at line 531 of file modules.cpp. .PP .nf -540 { -541 if (IncludeSender) -542 { -543 WriteChannel(Channel,User,'%s',s.c_str()); -544 } -545 else -546 { -547 ChanExceptSender(Channel,User,'%s',s.c_str()); -548 } -549 } +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 } .fi .PP .SS "void Server::SendChannelServerNotice (\fBstd::string\fP ServName, \fBchanrec\fP * Channel, \fBstd::string\fP text)\fC [virtual]\fP" @@ -1083,12 +1083,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 534 of file modules.cpp. +Definition at line 526 of file modules.cpp. .PP .nf -535 { -536 WriteChannelWithServ((char*)ServName.c_str(), Channel, '%s', text.c_str()); -537 } +527 { +528 WriteChannelWithServ((char*)ServName.c_str(), Channel, '%s', text.c_str()); +529 } .fi .PP .SS "void Server::SendCommon (\fBuserrec\fP * User, \fBstd::string\fP text, bool IncludeSender)\fC [virtual]\fP" @@ -1097,19 +1097,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 556 of file modules.cpp. +Definition at line 548 of file modules.cpp. .PP .nf -557 { -558 if (IncludeSender) -559 { -560 WriteCommon(User,'%s',text.c_str()); -561 } -562 else -563 { -564 WriteCommonExcept(User,'%s',text.c_str()); -565 } -566 } +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 } .fi .PP .SS "void Server::SendFrom (int Socket, \fBuserrec\fP * User, \fBstd::string\fP s)\fC [virtual]\fP" @@ -1118,12 +1118,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 515 of file modules.cpp. +Definition at line 507 of file modules.cpp. .PP .nf -516 { -517 WriteFrom(Socket,User,'%s',s.c_str()); -518 } +508 { +509 WriteFrom(Socket,User,'%s',s.c_str()); +510 } .fi .PP .SS "void Server::SendMode (char ** parameters, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP" @@ -1146,14 +1146,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 500 of file modules.cpp. +Definition at line 492 of file modules.cpp. .PP References server_mode(). .PP .nf -501 { -502 server_mode(parameters,pcnt,user); -503 } +493 { +494 server_mode(parameters,pcnt,user); +495 } .fi .PP .SS "void Server::SendOpers (\fBstd::string\fP s)\fC [virtual]\fP" @@ -1162,12 +1162,12 @@ Sends text to all opers. .PP This method sends a server notice to all opers with the usermode +s. .PP -Definition at line 425 of file modules.cpp. +Definition at line 417 of file modules.cpp. .PP .nf -426 { -427 WriteOpers('%s',s.c_str()); -428 } +418 { +419 WriteOpers('%s',s.c_str()); +420 } .fi .PP .SS "void Server::SendServ (int Socket, \fBstd::string\fP s)\fC [virtual]\fP" @@ -1176,12 +1176,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 510 of file modules.cpp. +Definition at line 502 of file modules.cpp. .PP .nf -511 { -512 WriteServ(Socket,'%s',s.c_str()); -513 } +503 { +504 WriteServ(Socket,'%s',s.c_str()); +505 } .fi .PP .SS "void Server::SendTo (\fBuserrec\fP * Source, \fBuserrec\fP * Dest, \fBstd::string\fP s)\fC [virtual]\fP" @@ -1198,23 +1198,23 @@ The format will become: .PP Which is useful for numerics and server notices to single users, etc. .PP -Definition at line 520 of file modules.cpp. +Definition at line 512 of file modules.cpp. .PP References connection::fd. .PP .nf -521 { -522 if (!Source) -523 { -524 // if source is NULL, then the message originates from the local server -525 Write(Dest->fd,':%s %s',this->GetServerName().c_str(),s.c_str()); -526 } -527 else -528 { -529 // otherwise it comes from the user specified -530 WriteTo(Source,Dest,'%s',s.c_str()); -531 } -532 } +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 } .fi .PP .SS "void Server::SendToModeMask (\fBstd::string\fP modes, int flags, \fBstd::string\fP text)\fC [virtual]\fP" @@ -1227,12 +1227,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 438 of file modules.cpp. +Definition at line 430 of file modules.cpp. .PP .nf -439 { -440 WriteMode(modes.c_str(),flags,'%s',text.c_str()); -441 } +431 { +432 WriteMode(modes.c_str(),flags,'%s',text.c_str()); +433 } .fi .PP .SS "void Server::SendWallops (\fBuserrec\fP * User, \fBstd::string\fP text)\fC [virtual]\fP" @@ -1241,12 +1241,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 568 of file modules.cpp. +Definition at line 560 of file modules.cpp. .PP .nf -569 { -570 WriteWallOps(User,false,'%s',text.c_str()); -571 } +561 { +562 WriteWallOps(User,false,'%s',text.c_str()); +563 } .fi .PP .SS "bool Server::UserToPseudo (\fBuserrec\fP * user, \fBstd::string\fP message)\fC [virtual]\fP" @@ -1255,40 +1255,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 677 of file modules.cpp. +Definition at line 669 of file modules.cpp. .PP -References userrec::ClearBuffer(), DEBUG, connection::fd, FD_MAGIC_NUMBER, connection::host, and userrec::ident. +References userrec::ClearBuffer(), SocketEngine::DelFd(), connection::fd, FD_MAGIC_NUMBER, connection::host, and userrec::ident. .PP .nf -678 { -679 unsigned int old_fd = user->fd; -680 user->fd = FD_MAGIC_NUMBER; -681 user->ClearBuffer(); -682 Write(old_fd,'ERROR :Closing link (%s@%s) [%s]',user->ident,user->host,message.c_str()); -683 #ifdef USE_KQUEUE -684 struct kevent ke; -685 EV_SET(&ke, old_fd, EVFILT_READ, EV_DELETE, 0, 0, NULL); -686 int i = kevent(kq, &ke, 1, 0, 0, NULL); -687 if (i == -1) -688 { -689 log(DEBUG,'kqueue: Failed to remove user from queue!'); -690 } -691 #endif -692 #ifdef USE_EPOLL -693 struct epoll_event ev; -694 ev.events = EPOLLIN | EPOLLET; -695 ev.data.fd = old_fd; -696 int i = epoll_ctl(ep, EPOLL_CTL_DEL, old_fd, &ev); -697 if (i < 0) -698 { -699 log(DEBUG,'epoll: List deletion failure!'); -700 } -701 #endif -702 -703 shutdown(old_fd,2); -704 close(old_fd); -705 return true; -706 } +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 } .fi .PP diff --git a/docs/man/man3/SocketEngine.3 b/docs/man/man3/SocketEngine.3 new file mode 100644 index 000000000..299dff3f4 --- /dev/null +++ b/docs/man/man3/SocketEngine.3 @@ -0,0 +1,345 @@ +.TH "SocketEngine" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +SocketEngine \- The actual socketengine class presents the same interface on all operating systems, but its private members and internal behaviour should be treated as blackboxed, and vary from system to system and upon the config settings chosen by the server admin. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include <socketengine.h>\fP +.PP +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "\fBSocketEngine\fP ()" +.br +.RI "\fIConstructor The constructor transparently initializes the socket engine which the ircd is using. \fP" +.ti -1c +.RI "\fB~SocketEngine\fP ()" +.br +.RI "\fIDestructor The destructor transparently tidies up any resources used by the socket engine. \fP" +.ti -1c +.RI "bool \fBAddFd\fP (int fd, bool readable, char type)" +.br +.RI "\fIAdd a file descriptor to the engine Use AddFd to add a file descriptor to the engine and have the socket engine monitor it. \fP" +.ti -1c +.RI "char \fBGetType\fP (int fd)" +.br +.RI "\fIReturns the type value for this file descriptor This function masks off the X_READBIT value so that the type of the socket can be obtained. \fP" +.ti -1c +.RI "bool \fBDelFd\fP (int fd)" +.br +.RI "\fIDelete a file descriptor f rom the engine This function call deletes a file descriptor from the engine, returning true if it succeeded and false if it failed. \fP" +.ti -1c +.RI "bool \fBWait\fP (std::vector< int > &fdlist)" +.br +.RI "\fIWaits for an event. \fP" +.ti -1c +.RI "\fBstd::string\fP \fBGetName\fP ()" +.br +.RI "\fIReturns the socket engines name This returns the name of the engine for use in /VERSION responses. \fP" +.in -1c +.SS "Private Attributes" + +.in +1c +.ti -1c +.RI "std::vector< int > \fBfds\fP" +.br +.ti -1c +.RI "int \fBEngineHandle\fP" +.br +.ti -1c +.RI "kevent \fBke_list\fP [65535]" +.br +.ti -1c +.RI "timespec \fBts\fP" +.br +.in -1c +.SH "Detailed Description" +.PP +The actual socketengine class presents the same interface on all operating systems, but its private members and internal behaviour should be treated as blackboxed, and vary from system to system and upon the config settings chosen by the server admin. + +The current version supports select, epoll and kqueue. +.PP +Definition at line 66 of file socketengine.h. +.SH "Constructor & Destructor Documentation" +.PP +.SS "SocketEngine::SocketEngine ()" +.PP +Constructor The constructor transparently initializes the socket engine which the ircd is using. +.PP +Please note that if there is a catastrophic failure (for example, you try and enable epoll on a 2.4 linux kernel) then this function may bail back to the shell. +.PP +Definition at line 35 of file socketengine.cpp. +.PP +References DEBUG, and EngineHandle. +.PP +.nf +36 { +37 log(DEBUG,'SocketEngine::SocketEngine()'); +38 #ifdef USE_EPOLL +39 EngineHandle = epoll_create(65535); +40 #endif +41 #ifdef USE_KQUEUE +42 EngineHandle = kqueue(); +43 #endif +44 } +.fi +.PP +.SS "SocketEngine::~SocketEngine ()" +.PP +Destructor The destructor transparently tidies up any resources used by the socket engine. +.PP +Definition at line 46 of file socketengine.cpp. +.PP +References DEBUG, and EngineHandle. +.PP +.nf +47 { +48 log(DEBUG,'SocketEngine::~SocketEngine()'); +49 #ifdef USE_EPOLL +50 close(EngineHandle); +51 #endif +52 #ifdef USE_KQUEUE +53 close(EngineHandle); +54 #endif +55 } +.fi +.PP +.SH "Member Function Documentation" +.PP +.SS "bool SocketEngine::AddFd (int fd, bool readable, char type)" +.PP +Add a file descriptor to the engine Use AddFd to add a file descriptor to the engine and have the socket engine monitor it. +.PP +You must provide a type (see the consts in \fBsocketengine.h\fP) and a boolean flag to indicate wether to watch this fd for read or write events (there is currently no need for support of both). +.PP +Definition at line 65 of file socketengine.cpp. +.PP +References DEBUG, EngineHandle, fds, ref, and X_READBIT. +.PP +Referenced by InspSocket::InspSocket(), and InspSocket::Poll(). +.PP +.nf +66 { +67 if ((fd < 0) || (fd > 65535)) +68 return false; +69 this->fds.push_back(fd); +70 ref[fd] = type; +71 if (readable) +72 { +73 log(DEBUG,'Set readbit'); +74 ref[fd] |= X_READBIT; +75 } +76 log(DEBUG,'Add socket %d',fd); +77 #ifdef USE_EPOLL +78 struct epoll_event ev; +79 log(DEBUG,'epoll: Add socket to events, ep=%d socket=%d',EngineHandle,fd); +80 readable ? ev.events = EPOLLIN | EPOLLET : ev.events = EPOLLOUT | EPOLLET; +81 ev.data.fd = fd; +82 int i = epoll_ctl(EngineHandle, EPOLL_CTL_ADD, fd, &ev); +83 if (i < 0) +84 { +85 log(DEBUG,'epoll: List insertion failure!'); +86 return false; +87 } +88 #endif +89 #ifdef USE_KQUEUE +90 struct kevent ke; +91 log(DEBUG,'kqueue: Add socket to events, kq=%d socket=%d',EngineHandle,fd); +92 EV_SET(&ke, fd, readable ? EVFILT_READ : EVFILT_WRITE, EV_ADD, 0, 0, NULL); +93 int i = kevent(EngineHandle, &ke, 1, 0, 0, NULL); +94 if (i == -1) +95 { +96 log(DEBUG,'kqueue: List insertion failure!'); +97 return false; +98 } +99 #endif +100 return true; +101 } +.fi +.PP +.SS "bool SocketEngine::DelFd (int fd)" +.PP +Delete a file descriptor f rom the engine This function call deletes a file descriptor from the engine, returning true if it succeeded and false if it failed. +.PP +Definition at line 103 of file socketengine.cpp. +.PP +References DEBUG, EngineHandle, fds, ref, and X_READBIT. +.PP +Referenced by InspSocket::Poll(), and Server::UserToPseudo(). +.PP +.nf +104 { +105 log(DEBUG,'SocketEngine::DelFd(%d)',fd); +106 +107 if ((fd < 0) || (fd > 65535)) +108 return false; +109 +110 bool found = false; +111 for (std::vector<int>::iterator i = fds.begin(); i != fds.end(); i++) +112 { +113 if (*i == fd) +114 { +115 fds.erase(i); +116 log(DEBUG,'Deleted fd %d',fd); +117 found = true; +118 break; +119 } +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); +124 int i = kevent(EngineHandle, &ke, 1, 0, 0, NULL); +125 if (i == -1) +126 { +127 log(DEBUG,'kqueue: Failed to remove socket from queue!'); +128 return false; +129 } +130 #endif +131 #ifdef USE_EPOLL +132 struct epoll_event ev; +133 ref[fd] && X_READBIT ? ev.events = EPOLLIN | EPOLLET : ev.events = EPOLLOUT | EPOLLET; +134 ev.data.fd = fd; +135 int i = epoll_ctl(EngineHandle, EPOLL_CTL_DEL, fd, &ev); +136 if (i < 0) +137 { +138 log(DEBUG,'epoll: List deletion failure!'); +139 return false; +140 } +141 #endif +142 ref[fd] = 0; +143 return found; +144 } +.fi +.PP +.SS "\fBstd::string\fP SocketEngine::GetName ()" +.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. +.PP +.nf +197 { +198 #ifdef USE_SELECT +199 return 'select'; +200 #endif +201 #ifdef USE_KQUEUE +202 return 'kqueue'; +203 #endif +204 #ifdef USE_EPOLL +205 return 'epoll'; +206 #endif +207 return 'misconfigured'; +208 } +.fi +.PP +.SS "char SocketEngine::GetType (int fd)" +.PP +Returns the type value for this file descriptor This function masks off the X_READBIT value so that the type of the socket can be obtained. +.PP +The core uses this to decide where to dispatch the event to. Please note that some engines such as select() have an upper limit of 1024 descriptors which may be active at any one time, where others such as kqueue have no practical limits at all. +.PP +Definition at line 57 of file socketengine.cpp. +.PP +References ref, and X_EMPTY_SLOT. +.PP +.nf +58 { +59 if ((fd < 0) || (fd > 65535)) +60 return X_EMPTY_SLOT; +61 /* Mask off the top bit used for 'read/write' state */ +62 return (ref[fd] & ~0x80); +63 } +.fi +.PP +.SS "bool SocketEngine::Wait (std::vector< int > & fdlist)" +.PP +Waits for an event. +.PP +Please note that this doesnt wait long, only a couple of milliseconds. It returns a list of active file descriptors in the vector fdlist which the core may then act upon. +.PP +Definition at line 146 of file socketengine.cpp. +.PP +References DEBUG, EngineHandle, fds, ke_list, ref, ts, and X_READBIT. +.PP +.nf +147 { +148 fdlist.clear(); +149 #ifdef USE_SELECT +150 FD_ZERO(&wfdset); +151 FD_ZERO(&rfdset); +152 timeval tval; +153 int sresult; +154 for (unsigned int a = 0; a < fds.size(); a++) +155 { +156 if (ref[fds[a]] & X_READBIT) +157 { +158 FD_SET (fds[a], &rfdset); +159 } +160 else +161 { +162 FD_SET (fds[a], &wfdset); +163 } +164 +165 } +166 tval.tv_sec = 0; +167 tval.tv_usec = 1000L; +168 sresult = select(FD_SETSIZE, &rfdset, &wfdset, NULL, &tval); +169 if (sresult > 0) +170 { +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 = 1000L; +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, 1); +190 for (int j = 0; j < i; j++) +191 fdlist.push_back(events[j].data.fd); +192 #endif +193 return true; +194 } +.fi +.PP +.SH "Member Data Documentation" +.PP +.SS "int \fBSocketEngine::EngineHandle\fP\fC [private]\fP" +.PP +Definition at line 69 of file socketengine.h. +.PP +Referenced by AddFd(), DelFd(), SocketEngine(), Wait(), and ~SocketEngine(). +.SS "std::vector<int> \fBSocketEngine::fds\fP\fC [private]\fP" +.PP +Definition at line 68 of file socketengine.h. +.PP +Referenced by AddFd(), DelFd(), and Wait(). +.SS "struct kevent \fBSocketEngine::ke_list\fP[65535]\fC [private]\fP" +.PP +Definition at line 74 of file socketengine.h. +.PP +Referenced by Wait(). +.SS "struct timespec \fBSocketEngine::ts\fP\fC [private]\fP" +.PP +Definition at line 75 of file socketengine.h. +.PP +Referenced by Wait(). + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/man3/Version.3 b/docs/man/man3/Version.3 index 4cc7e69ab..049c18e95 100644 --- a/docs/man/man3/Version.3 +++ b/docs/man/man3/Version.3 @@ -1,4 +1,4 @@ -.TH "Version" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "Version" 3 "12 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 246 of file modules.cpp. +Definition at line 240 of file modules.cpp. .PP .nf -246 : Major(major), Minor(minor), Revision(revision), Build(build), Flags(flags) { }; +240 : 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 14441a78c..49e8e61ea 100644 --- a/docs/man/man3/WhoWasUser.3 +++ b/docs/man/man3/WhoWasUser.3 @@ -1,4 +1,4 @@ -.TH "WhoWasUser" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "WhoWasUser" 3 "12 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 531448d3d..0c98f6fb8 100644 --- a/docs/man/man3/XLine.3 +++ b/docs/man/man3/XLine.3 @@ -1,4 +1,4 @@ -.TH "XLine" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "XLine" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ZLine.3 b/docs/man/man3/ZLine.3 index 887f4b3f7..c52b909bd 100644 --- a/docs/man/man3/ZLine.3 +++ b/docs/man/man3/ZLine.3 @@ -1,4 +1,4 @@ -.TH "ZLine" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ZLine" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/_home_.3 b/docs/man/man3/_home_.3 index 4e407fde9..eaef28c19 100644 --- a/docs/man/man3/_home_.3 +++ b/docs/man/man3/_home_.3 @@ -1,4 +1,4 @@ -.TH "/home/ Directory Reference" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "/home/ Directory Reference" 3 "12 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 de4a2293e..51ba923b1 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 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "/home/brain/ Directory Reference" 3 "12 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 475459bfd..a70c8e255 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 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "/home/brain/inspircd-cvs/ Directory Reference" 3 "12 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 840161aaa..19a4103cb 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 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "/home/brain/inspircd-cvs/inspircd/ Directory Reference" 3 "12 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 3f8773d1f..750f41485 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 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "/home/brain/inspircd-cvs/inspircd/include/ Directory Reference" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -40,6 +40,9 @@ .RI "file \fBsocket.h\fP" .br .ti -1c +.RI "file \fBsocketengine.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 0a1c37a31..c79335d94 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 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "/home/brain/inspircd-cvs/inspircd/src/ Directory Reference" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -16,6 +16,9 @@ .RI "file \fBsocket.cpp\fP" .br .ti -1c +.RI "file \fBsocketengine.cpp\fP" +.br +.ti -1c .RI "file \fBusers.cpp\fP" .br .in -1c diff --git a/docs/man/man3/base.h.3 b/docs/man/man3/base.h.3 index 2ccad4081..b455c26f7 100644 --- a/docs/man/man3/base.h.3 +++ b/docs/man/man3/base.h.3 @@ -1,4 +1,4 @@ -.TH "base.h" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "base.h" 3 "12 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 43d39173b..710a729f5 100644 --- a/docs/man/man3/channels.cpp.3 +++ b/docs/man/man3/channels.cpp.3 @@ -1,4 +1,4 @@ -.TH "channels.cpp" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "channels.cpp" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -221,7 +221,7 @@ Referenced by Server::GetUsers(). Definition at line 81 of file channels.cpp. .SS "int \fBMODCOUNT\fP = -1" .PP -Definition at line 1032 of file modules.cpp. +Definition at line 1005 of file modules.cpp. .PP Referenced by Server::FindModule(). .SS "std::vector<\fBstd::string\fP> \fBmodule_names\fP" diff --git a/docs/man/man3/channels.h.3 b/docs/man/man3/channels.h.3 index 3ea8129b0..8665d0189 100644 --- a/docs/man/man3/channels.h.3 +++ b/docs/man/man3/channels.h.3 @@ -1,4 +1,4 @@ -.TH "channels.h" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "channels.h" 3 "12 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 35dc47ddf..f6e50a153 100644 --- a/docs/man/man3/chanrec.3 +++ b/docs/man/man3/chanrec.3 @@ -1,4 +1,4 @@ -.TH "chanrec" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "chanrec" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/classbase.3 b/docs/man/man3/classbase.3 index e8000432a..88d263294 100644 --- a/docs/man/man3/classbase.3 +++ b/docs/man/man3/classbase.3 @@ -1,4 +1,4 @@ -.TH "classbase" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "classbase" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/command_t.3 b/docs/man/man3/command_t.3 index 3856f66d6..a7338bde8 100644 --- a/docs/man/man3/command_t.3 +++ b/docs/man/man3/command_t.3 @@ -1,4 +1,4 @@ -.TH "command_t" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "command_t" 3 "12 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 643a4d95f..6655b2170 100644 --- a/docs/man/man3/commands.h.3 +++ b/docs/man/man3/commands.h.3 @@ -1,4 +1,4 @@ -.TH "commands.h" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "commands.h" 3 "12 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 ca56a0899..36aaf10c6 100644 --- a/docs/man/man3/connection.3 +++ b/docs/man/man3/connection.3 @@ -1,4 +1,4 @@ -.TH "connection" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "connection" 3 "12 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 9ddbe7517..c53c68eb5 100644 --- a/docs/man/man3/connection.h.3 +++ b/docs/man/man3/connection.h.3 @@ -1,4 +1,4 @@ -.TH "connection.h" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "connection.h" 3 "12 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 4579fc91f..6af542e0a 100644 --- a/docs/man/man3/ctables.h.3 +++ b/docs/man/man3/ctables.h.3 @@ -1,4 +1,4 @@ -.TH "ctables.h" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ctables.h" 3 "12 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 fd601d288..e17b454c1 100644 --- a/docs/man/man3/dns.h.3 +++ b/docs/man/man3/dns.h.3 @@ -1,4 +1,4 @@ -.TH "dns.h" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "dns.h" 3 "12 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 e857eff47..2d199c572 100644 --- a/docs/man/man3/dns_ip4list.3 +++ b/docs/man/man3/dns_ip4list.3 @@ -1,4 +1,4 @@ -.TH "dns_ip4list" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "dns_ip4list" 3 "12 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 fc7453492..935f03185 100644 --- a/docs/man/man3/hashcomp.h.3 +++ b/docs/man/man3/hashcomp.h.3 @@ -1,4 +1,4 @@ -.TH "hashcomp.h" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "hashcomp.h" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/irc.3 b/docs/man/man3/irc.3 index 192b4a0ea..0e751fd80 100644 --- a/docs/man/man3/irc.3 +++ b/docs/man/man3/irc.3 @@ -1,4 +1,4 @@ -.TH "irc" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "irc" 3 "12 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 e4d8d0720..3ae4dda7f 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 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "irc::InAddr_HashComp" 3 "12 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 dae5027b7..f5f557969 100644 --- a/docs/man/man3/irc_StrHashComp.3 +++ b/docs/man/man3/irc_StrHashComp.3 @@ -1,4 +1,4 @@ -.TH "irc::StrHashComp" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "irc::StrHashComp" 3 "12 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 118de0f30..b67ec6d03 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 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "irc::irc_char_traits" 3 "12 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 1fde59aac..75ecb0ac3 100644 --- a/docs/man/man3/message.h.3 +++ b/docs/man/man3/message.h.3 @@ -1,4 +1,4 @@ -.TH "message.h" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "message.h" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/mode.h.3 b/docs/man/man3/mode.h.3 index 15a7a3541..02d665158 100644 --- a/docs/man/man3/mode.h.3 +++ b/docs/man/man3/mode.h.3 @@ -1,4 +1,4 @@ -.TH "mode.h" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "mode.h" 3 "12 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 ea563e279..0abe14ea7 100644 --- a/docs/man/man3/modules.cpp.3 +++ b/docs/man/man3/modules.cpp.3 @@ -1,4 +1,4 @@ -.TH "modules.cpp" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "modules.cpp" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -60,6 +60,8 @@ modules.cpp \- .br \fC#include 'socket.h'\fP .br +\fC#include 'socketengine.h'\fP +.br .SS "Classes" @@ -128,6 +130,9 @@ modules.cpp \- .in +1c .ti -1c +.RI "\fBSocketEngine\fP * \fBSE\fP" +.br +.ti -1c .RI "int \fBMODCOUNT\fP = -1" .br .ti -1c @@ -261,164 +266,164 @@ modules.cpp \- .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 123 of file modules.cpp. +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 122 of file modules.cpp. +Definition at line 116 of file modules.cpp. .SS "typedef std::deque<\fBcommand_t\fP> \fBcommand_table\fP" .PP -Definition at line 125 of file modules.cpp. +Definition at line 119 of file modules.cpp. .SS "typedef std::vector<\fBExtMode\fP> \fBExtModeList\fP" .PP -Definition at line 151 of file modules.cpp. +Definition at line 145 of file modules.cpp. .SS "typedef ExtModeList::iterator \fBExtModeListIter\fP" .PP -Definition at line 152 of file modules.cpp. +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 121 of file modules.cpp. +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 124 of file modules.cpp. +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 221 of file modules.cpp. +Definition at line 215 of file modules.cpp. .PP References EMode, and ModeDefined(). .PP Referenced by Server::AddExtendedListMode(), and Server::AddExtendedMode(). .PP .nf -222 { -223 if (ModeDefined(modechar,type)) { -224 return false; -225 } -226 EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off)); -227 return true; -228 } +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 } .fi .PP .SS "std::vector<\fBircd_module\fP*> factory (255)" .PP .SS "bool ModeDefined (char modechar, int type)" .PP -Definition at line 158 of file modules.cpp. +Definition at line 152 of file modules.cpp. .PP References EMode. .PP Referenced by DoAddExtendedMode(). .PP .nf -159 { -160 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -161 { -162 if ((i->modechar == modechar) && (i->type == type)) -163 { -164 return true; -165 } -166 } -167 return false; -168 } +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 } .fi .PP .SS "int ModeDefinedOff (char modechar, int type)" .PP -Definition at line 208 of file modules.cpp. +Definition at line 202 of file modules.cpp. .PP References EMode. .PP .nf -209 { -210 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -211 { -212 if ((i->modechar == modechar) && (i->type == type)) -213 { -214 return i->params_when_off; -215 } -216 } -217 return 0; -218 } +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 } .fi .PP .SS "int ModeDefinedOn (char modechar, int type)" .PP -Definition at line 195 of file modules.cpp. +Definition at line 189 of file modules.cpp. .PP References EMode. .PP .nf -196 { -197 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -198 { -199 if ((i->modechar == modechar) && (i->type == type)) -200 { -201 return i->params_when_on; -202 } -203 } -204 return 0; -205 } +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 } .fi .PP .SS "bool ModeDefinedOper (char modechar, int type)" .PP -Definition at line 182 of file modules.cpp. +Definition at line 176 of file modules.cpp. .PP References EMode. .PP .nf -183 { -184 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -185 { -186 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true)) -187 { -188 return true; -189 } -190 } -191 return false; -192 } +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 } .fi .PP .SS "bool ModeIsListMode (char modechar, int type)" .PP -Definition at line 170 of file modules.cpp. +Definition at line 164 of file modules.cpp. .PP References EMode. .PP .nf -171 { -172 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -173 { -174 if ((i->modechar == modechar) && (i->type == type) && (i->list == true)) -175 { -176 return true; -177 } -178 } -179 return false; -180 } +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 } .fi .PP .SS "void ModeMakeList (char modechar)" .PP -Definition at line 231 of file modules.cpp. +Definition at line 225 of file modules.cpp. .PP References EMode, and MT_CHANNEL. .PP Referenced by Server::AddExtendedListMode(). .PP .nf -232 { -233 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -234 { -235 if ((i->modechar == modechar) && (i->type == MT_CHANNEL)) -236 { -237 i->list = true; -238 return; -239 } -240 } -241 return; -242 } +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 } .fi .PP .SS "std::vector<\fBModule\fP*> modules (255)" @@ -451,7 +456,7 @@ Referenced by Server::AddExtendedListMode(). .PP .SS "\fBExtModeList\fP \fBEMode\fP" .PP -Definition at line 155 of file modules.cpp. +Definition at line 149 of file modules.cpp. .PP Referenced by DoAddExtendedMode(), ModeDefined(), ModeDefinedOff(), ModeDefinedOn(), ModeDefinedOper(), ModeIsListMode(), and ModeMakeList(). .SS "std::vector<\fBircd_module\fP*> factory" @@ -474,7 +479,7 @@ Referenced by ConfigReader::ConfigReader(). Definition at line 81 of file channels.cpp. .SS "int \fBMODCOUNT\fP = -1" .PP -Definition at line 1032 of file modules.cpp. +Definition at line 1005 of file modules.cpp. .SS "std::vector<\fBstd::string\fP> \fBmodule_names\fP" .PP .SS "std::vector<\fBInspSocket\fP*> \fBmodule_sockets\fP" @@ -504,6 +509,8 @@ Referenced by Server::AddSocket(), and Server::DelSocket(). .PP .SS "char \fBrules\fP[MAXBUF]" .PP +.SS "\fBSocketEngine\fP* \fBSE\fP" +.PP .SS "char \fBServerDesc\fP[MAXBUF]" .PP .SS "char \fBServerName\fP[MAXBUF]" diff --git a/docs/man/man3/modules.h.3 b/docs/man/man3/modules.h.3 index c6eb1ac55..928941c19 100644 --- a/docs/man/man3/modules.h.3 +++ b/docs/man/man3/modules.h.3 @@ -1,4 +1,4 @@ -.TH "modules.h" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "modules.h" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -262,7 +262,7 @@ log levels .PP Definition at line 23 of file modules.h. .PP -Referenced by Server::AddExtendedMode(), chanrec::AddUser(), chanrec::DelUser(), InspSocket::InspSocket(), chanrec::IsCustomModeSet(), InspSocket::Read(), userrec::ReadData(), userrec::RemoveInvite(), chanrec::SetCustomMode(), chanrec::SetCustomModeParam(), InspSocket::SetState(), userrec::SetWriteError(), and Server::UserToPseudo(). +Referenced by Server::AddExtendedMode(), SocketEngine::AddFd(), chanrec::AddUser(), SocketEngine::DelFd(), chanrec::DelUser(), InspSocket::InspSocket(), chanrec::IsCustomModeSet(), 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. diff --git a/docs/man/man3/nspace.3 b/docs/man/man3/nspace.3 index 6459e68a2..504564def 100644 --- a/docs/man/man3/nspace.3 +++ b/docs/man/man3/nspace.3 @@ -1,4 +1,4 @@ -.TH "nspace" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "nspace" 3 "12 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 2058787ef..9cf95474a 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 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "nspace::hash< in_addr >" 3 "12 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 c9cd5e252..325a269ce 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 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "nspace::hash< string >" 3 "12 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 136a95e21..a71385032 100644 --- a/docs/man/man3/socket.cpp.3 +++ b/docs/man/man3/socket.cpp.3 @@ -1,4 +1,4 @@ -.TH "socket.cpp" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "socket.cpp" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -44,11 +44,16 @@ socket.cpp \- .br \fC#include 'helperfuncs.h'\fP .br +\fC#include 'socketengine.h'\fP +.br .SS "Variables" .in +1c .ti -1c +.RI "\fBSocketEngine\fP * \fBSE\fP" +.br +.ti -1c .RI "FILE * \fBlog_file\fP" .br .ti -1c @@ -77,6 +82,8 @@ socket.cpp \- .PP .SS "int \fBopenSockfd\fP[MAXSOCKS]" .PP +.SS "\fBSocketEngine\fP* \fBSE\fP" +.PP .SS "time_t \fBTIME\fP" .PP .SS "bool \fBunlimitcore\fP" diff --git a/docs/man/man3/socket.h.3 b/docs/man/man3/socket.h.3 index bdb68566b..89e2a1c07 100644 --- a/docs/man/man3/socket.h.3 +++ b/docs/man/man3/socket.h.3 @@ -1,4 +1,4 @@ -.TH "socket.h" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "socket.h" 3 "12 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 new file mode 100644 index 000000000..3a6ac0550 --- /dev/null +++ b/docs/man/man3/socketengine.cpp.3 @@ -0,0 +1,38 @@ +.TH "socketengine.cpp" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +socketengine.cpp \- +.SH SYNOPSIS +.br +.PP +\fC#include 'inspircd_config.h'\fP +.br +\fC#include 'globals.h'\fP +.br +\fC#include 'inspircd.h'\fP +.br +\fC#include <vector>\fP +.br +\fC#include <string>\fP +.br +\fC#include 'socketengine.h'\fP +.br + +.SS "Variables" + +.in +1c +.ti -1c +.RI "char \fBref\fP [65535]" +.br +.in -1c +.SH "Variable Documentation" +.PP +.SS "char \fBref\fP[65535]" +.PP +Definition at line 33 of file socketengine.cpp. +.PP +Referenced by SocketEngine::AddFd(), SocketEngine::DelFd(), SocketEngine::GetType(), and SocketEngine::Wait(). +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/man3/socketengine.h.3 b/docs/man/man3/socketengine.h.3 new file mode 100644 index 000000000..7be4a00e5 --- /dev/null +++ b/docs/man/man3/socketengine.h.3 @@ -0,0 +1,92 @@ +.TH "socketengine.h" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +socketengine.h \- +.SH SYNOPSIS +.br +.PP +\fC#include <vector>\fP +.br +\fC#include <string>\fP +.br +\fC#include 'inspircd_config.h'\fP +.br +\fC#include 'globals.h'\fP +.br +\fC#include 'inspircd.h'\fP +.br +\fC#include <sys/types.h>\fP +.br +\fC#include <sys/event.h>\fP +.br +\fC#include <sys/time.h>\fP +.br + +.SS "Classes" + +.in +1c +.ti -1c +.RI "class \fBSocketEngine\fP" +.br +.RI "\fIThe actual socketengine class presents the same interface on all operating systems, but its private members and internal behaviour should be treated as blackboxed, and vary from system to system and upon the config settings chosen by the server admin. \fP" +.in -1c +.SS "Variables" + +.in +1c +.ti -1c +.RI "const char \fBX_EMPTY_SLOT\fP = 0" +.br +.RI "\fIEach of these values represents a socket type in our reference table (the reference table itself is only accessible to \fBsocketengine.cpp\fP). \fP" +.ti -1c +.RI "const char \fBX_LISTEN\fP = 1" +.br +.ti -1c +.RI "const char \fBX_ESTAB_CLIENT\fP = 2" +.br +.ti -1c +.RI "const char \fBX_ESTAB_MODULE\fP = 3" +.br +.ti -1c +.RI "const char \fBX_ESTAB_DNS\fP = 4" +.br +.ti -1c +.RI "const char \fBX_READBIT\fP = 0x80" +.br +.RI "\fITo indicate that a socket is readable, we mask its top bit with this X_READBIT value. \fP" +.in -1c +.SH "Variable Documentation" +.PP +.SS "const char \fBX_EMPTY_SLOT\fP = 0" +.PP +Each of these values represents a socket type in our reference table (the reference table itself is only accessible to \fBsocketengine.cpp\fP). +.PP +Definition at line 41 of file socketengine.h. +.PP +Referenced by SocketEngine::GetType(). +.SS "const char \fBX_ESTAB_CLIENT\fP = 2" +.PP +Definition at line 43 of file socketengine.h. +.SS "const char \fBX_ESTAB_DNS\fP = 4" +.PP +Definition at line 45 of file socketengine.h. +.SS "const char \fBX_ESTAB_MODULE\fP = 3" +.PP +Definition at line 44 of file socketengine.h. +.PP +Referenced by InspSocket::InspSocket(), and InspSocket::Poll(). +.SS "const char \fBX_LISTEN\fP = 1" +.PP +Definition at line 42 of file socketengine.h. +.SS "const char \fBX_READBIT\fP = 0x80" +.PP +To indicate that a socket is readable, we mask its top bit with this X_READBIT value. +.PP +The socket engine can handle two types of socket, readable and writeable (error sockets are dealt with when read() and write() return negative or zero values). +.PP +Definition at line 55 of file socketengine.h. +.PP +Referenced by SocketEngine::AddFd(), SocketEngine::DelFd(), and SocketEngine::Wait(). +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/man3/std.3 b/docs/man/man3/std.3 index 03a3fe2ea..8d5eaebc2 100644 --- a/docs/man/man3/std.3 +++ b/docs/man/man3/std.3 @@ -1,4 +1,4 @@ -.TH "std" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "std" 3 "12 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 6dd1f9220..89807e969 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 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "std::char_traits" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ucrec.3 b/docs/man/man3/ucrec.3 index fdf24381c..5e07b9214 100644 --- a/docs/man/man3/ucrec.3 +++ b/docs/man/man3/ucrec.3 @@ -1,4 +1,4 @@ -.TH "ucrec" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ucrec" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/userrec.3 b/docs/man/man3/userrec.3 index 38c346b28..8fc0aa420 100644 --- a/docs/man/man3/userrec.3 +++ b/docs/man/man3/userrec.3 @@ -1,4 +1,4 @@ -.TH "userrec" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "userrec" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/users.cpp.3 b/docs/man/man3/users.cpp.3 index 392e603cc..520931d6d 100644 --- a/docs/man/man3/users.cpp.3 +++ b/docs/man/man3/users.cpp.3 @@ -1,4 +1,4 @@ -.TH "users.cpp" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "users.cpp" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/users.h.3 b/docs/man/man3/users.h.3 index ec37125ae..f8eb8ac82 100644 --- a/docs/man/man3/users.h.3 +++ b/docs/man/man3/users.h.3 @@ -1,4 +1,4 @@ -.TH "users.h" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "users.h" 3 "12 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 b2eaee5de..1ee046631 100644 --- a/docs/man/man3/xline.h.3 +++ b/docs/man/man3/xline.h.3 @@ -1,4 +1,4 @@ -.TH "xline.h" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "xline.h" 3 "12 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME |