summaryrefslogtreecommitdiff
path: root/docs/man
diff options
context:
space:
mode:
Diffstat (limited to 'docs/man')
-rw-r--r--docs/man/man3/Admin.32
-rw-r--r--docs/man/man3/BanItem.32
-rw-r--r--docs/man/man3/ConfigReader.3274
-rw-r--r--docs/man/man3/ConnectClass.32
-rw-r--r--docs/man/man3/DNS.316
-rw-r--r--docs/man/man3/ELine.32
-rw-r--r--docs/man/man3/Event.310
-rw-r--r--docs/man/man3/ExemptItem.32
-rw-r--r--docs/man/man3/ExtMode.32
-rw-r--r--docs/man/man3/Extensible.32
-rw-r--r--docs/man/man3/FileReader.384
-rw-r--r--docs/man/man3/GLine.32
-rw-r--r--docs/man/man3/HostItem.32
-rw-r--r--docs/man/man3/InAddr_HashComp.32
-rw-r--r--docs/man/man3/InviteItem.32
-rw-r--r--docs/man/man3/Invited.32
-rw-r--r--docs/man/man3/KLine.32
-rw-r--r--docs/man/man3/ModeParameter.32
-rw-r--r--docs/man/man3/Module.337
-rw-r--r--docs/man/man3/ModuleFactory.312
-rw-r--r--docs/man/man3/ModuleMessage.34
-rw-r--r--docs/man/man3/QLine.32
-rw-r--r--docs/man/man3/Request.310
-rw-r--r--docs/man/man3/Server.3720
-rw-r--r--docs/man/man3/StrHashComp.32
-rw-r--r--docs/man/man3/Version.32
-rw-r--r--docs/man/man3/XLine.32
-rw-r--r--docs/man/man3/ZLine.32
-rw-r--r--docs/man/man3/base.h.32
-rw-r--r--docs/man/man3/channels.cpp.34
-rw-r--r--docs/man/man3/channels.h.312
-rw-r--r--docs/man/man3/chanrec.3306
-rw-r--r--docs/man/man3/classbase.32
-rw-r--r--docs/man/man3/command_t.32
-rw-r--r--docs/man/man3/commands.h.32
-rw-r--r--docs/man/man3/connection.346
-rw-r--r--docs/man/man3/connection.h.316
-rw-r--r--docs/man/man3/ctables.h.32
-rw-r--r--docs/man/man3/dns.h.32
-rw-r--r--docs/man/man3/dns_ip4list.32
-rw-r--r--docs/man/man3/ircd_connector.355
-rw-r--r--docs/man/man3/message.h.32
-rw-r--r--docs/man/man3/mode.h.32
-rw-r--r--docs/man/man3/modules.cpp.34
-rw-r--r--docs/man/man3/modules.h.322
-rw-r--r--docs/man/man3/nspace.32
-rw-r--r--docs/man/man3/nspace_nspace_hash_ in_addr _.32
-rw-r--r--docs/man/man3/nspace_nspace_hash_ string _.32
-rw-r--r--docs/man/man3/serverrec.32
-rw-r--r--docs/man/man3/servers.cpp.32
-rw-r--r--docs/man/man3/servers.h.32
-rw-r--r--docs/man/man3/std.32
-rw-r--r--docs/man/man3/ucrec.316
-rw-r--r--docs/man/man3/userrec.3106
-rw-r--r--docs/man/man3/users.cpp.32
-rw-r--r--docs/man/man3/users.h.32
-rw-r--r--docs/man/man3/xline.h.32
57 files changed, 1007 insertions, 823 deletions
diff --git a/docs/man/man3/Admin.3 b/docs/man/man3/Admin.3
index bc5466d24..6e414dc78 100644
--- a/docs/man/man3/Admin.3
+++ b/docs/man/man3/Admin.3
@@ -1,4 +1,4 @@
-.TH "Admin" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "Admin" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/BanItem.3 b/docs/man/man3/BanItem.3
index d860624f0..5a7e51df0 100644
--- a/docs/man/man3/BanItem.3
+++ b/docs/man/man3/BanItem.3
@@ -1,4 +1,4 @@
-.TH "BanItem" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "BanItem" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/ConfigReader.3 b/docs/man/man3/ConfigReader.3
index 1b6478571..294eec961 100644
--- a/docs/man/man3/ConfigReader.3
+++ b/docs/man/man3/ConfigReader.3
@@ -1,4 +1,4 @@
-.TH "ConfigReader" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "ConfigReader" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -84,239 +84,239 @@ Allows reading of values from configuration files This class allows a module to
It may either be instantiated with one parameter or none. Constructing the class using one parameter allows you to specify a path to your own configuration file, otherwise, inspircd.conf is read.
.PP
-Definition at line 1072 of file modules.h.
+Definition at line 1097 of file modules.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "ConfigReader::ConfigReader ()"
.PP
-Default constructor. This constructor initialises the ConfigReader class to read the inspircd.conf file as specified when running ./configure.Definition at line 833 of file modules.cpp.
+Default constructor. This constructor initialises the ConfigReader class to read the inspircd.conf file as specified when running ./configure.Definition at line 835 of file modules.cpp.
.PP
References cache, CONF_FILE_NOT_FOUND, error, errorlog, and readerror.
.PP
.nf
-834 {
-835 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
-836 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
-837 this->readerror = LoadConf(CONFIG_FILE,this->cache,this->errorlog);
-838 if (!this->readerror)
-839 this->error = CONF_FILE_NOT_FOUND;
-840 }
+836 {
+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 }
.fi
.SS "ConfigReader::ConfigReader (std::string filename)"
.PP
-Overloaded constructor. This constructor initialises the ConfigReader class to read a user-specified config fileDefinition at line 852 of file modules.cpp.
+Overloaded constructor. This constructor initialises the ConfigReader class to read a user-specified config fileDefinition at line 854 of file modules.cpp.
.PP
References cache, CONF_FILE_NOT_FOUND, error, errorlog, and readerror.
.PP
.nf
-853 {
-854 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
-855 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
-856 this->readerror = LoadConf(filename.c_str(),this->cache,this->errorlog);
-857 if (!this->readerror)
-858 this->error = CONF_FILE_NOT_FOUND;
-859 };
+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 };
.fi
.SS "ConfigReader::~\fBConfigReader\fP ()"
.PP
-Default destructor. This method destroys the ConfigReader class.Definition at line 843 of file modules.cpp.
+Default destructor. This method destroys the ConfigReader class.Definition at line 845 of file modules.cpp.
.PP
References cache, and errorlog.
.PP
.nf
-844 {
-845 if (this->cache)
-846 delete this->cache;
-847 if (this->errorlog)
-848 delete this->errorlog;
-849 }
+846 {
+847 if (this->cache)
+848 delete this->cache;
+849 if (this->errorlog)
+850 delete this->errorlog;
+851 }
.fi
.SH "Member Function Documentation"
.PP
.SS "void ConfigReader::DumpErrors (bool bail, \fBuserrec\fP * user)"
.PP
-Dumps the list of errors in a config file to an output location. 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.Definition at line 930 of file modules.cpp.
+Dumps the list of errors in a config file to an output location. 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.Definition at line 932 of file modules.cpp.
.PP
References errorlog, connection::fd, and userrec::nick.
.PP
.nf
-931 {
-932 if (bail)
-933 {
-934 printf('There were errors in your configuration:\n%s',errorlog->str().c_str());
-935 exit(0);
-936 }
-937 else
-938 {
-939 char dataline[1024];
-940 if (user)
-941 {
-942 WriteServ(user->fd,'NOTICE %s :There were errors in the configuration file:',user->nick);
-943 while (!errorlog->eof())
-944 {
-945 errorlog->getline(dataline,1024);
-946 WriteServ(user->fd,'NOTICE %s :%s',user->nick,dataline);
-947 }
-948 }
-949 else
-950 {
-951 WriteOpers('There were errors in the configuration file:',user->nick);
-952 while (!errorlog->eof())
-953 {
-954 errorlog->getline(dataline,1024);
-955 WriteOpers(dataline);
-956 }
-957 }
-958 return;
-959 }
-960 }
+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 }
.fi
.SS "int ConfigReader::Enumerate (std::string tag)"
.PP
-Counts the number of times a given tag appears in the config file. This method counts the number of times a tag appears in a config file, for use where there are several tags of the same kind, e.g. with opers and connect types. It can be used with the index value of \fBConfigReader::ReadValue\fP to loop through all copies of a multiple instance tag.Definition at line 963 of file modules.cpp.
+Counts the number of times a given tag appears in the config file. This method counts the number of times a tag appears in a config file, for use where there are several tags of the same kind, e.g. with opers and connect types. It can be used with the index value of \fBConfigReader::ReadValue\fP to loop through all copies of a multiple instance tag.Definition at line 965 of file modules.cpp.
.PP
References cache.
.PP
.nf
-964 {
-965 return EnumConf(cache,tag.c_str());
-966 }
+966 {
+967 return EnumConf(cache,tag.c_str());
+968 }
.fi
.SS "int ConfigReader::EnumerateValues (std::string tag, int index)"
.PP
-Returns the number of items within a tag. For example if the tag was <test tag='blah' data='foo'> then this function would return 2. Spaces and newlines both qualify as valid seperators between values.Definition at line 968 of file modules.cpp.
+Returns the number of items within a tag. For example if the tag was <test tag='blah' data='foo'> then this function would return 2. Spaces and newlines both qualify as valid seperators between values.Definition at line 970 of file modules.cpp.
.PP
References cache.
.PP
.nf
-969 {
-970 return EnumValues(cache, tag.c_str(), index);
-971 }
+971 {
+972 return EnumValues(cache, tag.c_str(), index);
+973 }
.fi
.SS "long ConfigReader::GetError ()"
.PP
-Returns the last error to occur. 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.Definition at line 923 of file modules.cpp.
+Returns the last error to occur. 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.Definition at line 925 of file modules.cpp.
.PP
References error.
.PP
.nf
-924 {
-925 long olderr = this->error;
-926 this->error = 0;
-927 return olderr;
-928 }
+926 {
+927 long olderr = this->error;
+928 this->error = 0;
+929 return olderr;
+930 }
.fi
.SS "bool ConfigReader::ReadFlag (std::string tag, std::string name, int index)"
.PP
-Retrieves a boolean value from the config file. 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.Definition at line 877 of file modules.cpp.
+Retrieves a boolean value from the config file. 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.Definition at line 879 of file modules.cpp.
.PP
References cache, CONF_VALUE_NOT_FOUND, and error.
.PP
.nf
-878 {
-879 char val[MAXBUF];
-880 char t[MAXBUF];
-881 char n[MAXBUF];
-882 strlcpy(t,tag.c_str(),MAXBUF);
-883 strlcpy(n,name.c_str(),MAXBUF);
-884 int res = ReadConf(cache,t,n,index,val);
-885 if (!res)
-886 {
-887 this->error = CONF_VALUE_NOT_FOUND;
-888 return false;
-889 }
-890 std::string s = val;
-891 return ((s == 'yes') || (s == 'YES') || (s == 'true') || (s == 'TRUE') || (s == '1'));
-892 }
+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 }
.fi
.SS "long ConfigReader::ReadInteger (std::string tag, std::string name, int index, bool needs_unsigned)"
.PP
-Retrieves an integer value from the config file. 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_UNSIGNEDDefinition at line 894 of file modules.cpp.
+Retrieves an integer value from the config file. 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_UNSIGNEDDefinition at line 896 of file modules.cpp.
.PP
References cache, CONF_NOT_A_NUMBER, CONF_NOT_UNSIGNED, CONF_VALUE_NOT_FOUND, and error.
.PP
.nf
-895 {
-896 char val[MAXBUF];
-897 char t[MAXBUF];
-898 char n[MAXBUF];
-899 strlcpy(t,tag.c_str(),MAXBUF);
-900 strlcpy(n,name.c_str(),MAXBUF);
-901 int res = ReadConf(cache,t,n,index,val);
-902 if (!res)
-903 {
-904 this->error = CONF_VALUE_NOT_FOUND;
-905 return 0;
-906 }
-907 for (int i = 0; i < strlen(val); i++)
-908 {
-909 if (!isdigit(val[i]))
-910 {
-911 this->error = CONF_NOT_A_NUMBER;
-912 return 0;
-913 }
-914 }
-915 if ((needs_unsigned) && (atoi(val)<0))
-916 {
-917 this->error = CONF_NOT_UNSIGNED;
-918 return 0;
-919 }
-920 return atoi(val);
-921 }
+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 (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 }
.fi
.SS "std::string ConfigReader::ReadValue (std::string tag, std::string name, int index)"
.PP
-Retrieves a value from the config file. This method retrieves a value from the config file. Where multiple copies of the tag exist in the config file, index indicates which of the values to retrieve.Definition at line 861 of file modules.cpp.
+Retrieves a value from the config file. This method retrieves a value from the config file. Where multiple copies of the tag exist in the config file, index indicates which of the values to retrieve.Definition at line 863 of file modules.cpp.
.PP
References cache, CONF_VALUE_NOT_FOUND, and error.
.PP
.nf
-862 {
-863 char val[MAXBUF];
-864 char t[MAXBUF];
-865 char n[MAXBUF];
-866 strlcpy(t,tag.c_str(),MAXBUF);
-867 strlcpy(n,name.c_str(),MAXBUF);
-868 int res = ReadConf(cache,t,n,index,val);
-869 if (!res)
-870 {
-871 this->error = CONF_VALUE_NOT_FOUND;
-872 return '';
-873 }
-874 return std::string(val);
-875 }
+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 std::string(val);
+877 }
.fi
.SS "bool ConfigReader::Verify ()"
.PP
-Returns true if a config file is valid. This method is partially implemented and will only return false if the config file does not exist or could not be opened.Definition at line 973 of file modules.cpp.
+Returns true if a config file is valid. This method is partially implemented and will only return false if the config file does not exist or could not be opened.Definition at line 975 of file modules.cpp.
.PP
References readerror.
.PP
.nf
-974 {
-975 return this->readerror;
-976 }
+976 {
+977 return this->readerror;
+978 }
.fi
.SH "Member Data Documentation"
.PP
.SS "std::stringstream* \fBConfigReader::cache\fP\fC [protected]\fP"
.PP
-The contents of the configuration file This protected member should never be accessed by a module (and cannot be accessed unless the core is changed). It will contain a pointer to the configuration file data with unneeded data (such as comments) stripped from it.Definition at line 1080 of file modules.h.
+The contents of the configuration file This protected member should never be accessed by a module (and cannot be accessed unless the core is changed). It will contain a pointer to the configuration file data with unneeded data (such as comments) stripped from it.Definition at line 1105 of file modules.h.
.PP
Referenced by ConfigReader(), Enumerate(), EnumerateValues(), ReadFlag(), ReadInteger(), ReadValue(), and ~ConfigReader().
.SS "long \fBConfigReader::error\fP\fC [protected]\fP"
.PP
-Definition at line 1085 of file modules.h.
+Definition at line 1110 of file modules.h.
.PP
Referenced by ConfigReader(), GetError(), ReadFlag(), ReadInteger(), and ReadValue().
.SS "std::stringstream* \fBConfigReader::errorlog\fP\fC [protected]\fP"
.PP
-Definition at line 1081 of file modules.h.
+Definition at line 1106 of file modules.h.
.PP
Referenced by ConfigReader(), DumpErrors(), and ~ConfigReader().
.SS "bool \fBConfigReader::readerror\fP\fC [protected]\fP"
.PP
-Used to store errors. Definition at line 1084 of file modules.h.
+Used to store errors. Definition at line 1109 of file modules.h.
.PP
Referenced by ConfigReader(), and Verify().
diff --git a/docs/man/man3/ConnectClass.3 b/docs/man/man3/ConnectClass.3
index ed5ed3e81..563c7368c 100644
--- a/docs/man/man3/ConnectClass.3
+++ b/docs/man/man3/ConnectClass.3
@@ -1,4 +1,4 @@
-.TH "ConnectClass" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "ConnectClass" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/DNS.3 b/docs/man/man3/DNS.3
index 8c44aa268..8ca9f17b4 100644
--- a/docs/man/man3/DNS.3
+++ b/docs/man/man3/DNS.3
@@ -1,4 +1,4 @@
-.TH "DNS" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "DNS" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -99,16 +99,13 @@ DNS \- The DNS class allows fast nonblocking resolution of hostnames and ip addr
.in +1c
.ti -1c
-.RI "char * \fBresult\fP"
-.br
-.ti -1c
.RI "in_addr * \fBbinip\fP"
.br
.ti -1c
-.RI "int \fBt\fP"
+.RI "char * \fBresult\fP"
.br
.ti -1c
-.RI "int \fBi\fP"
+.RI "int \fBt\fP"
.br
.ti -1c
.RI "unsigned int \fBfd\fP"
@@ -183,16 +180,13 @@ This method will start the reverse lookup of an ip given in dotted decimal forma
.PP
.SS "in_addr* \fBDNS::binip\fP\fC [private]\fP"
.PP
-Definition at line 39 of file dns.h.
+Definition at line 38 of file dns.h.
.SS "unsigned int \fBDNS::fd\fP\fC [private]\fP"
.PP
Definition at line 42 of file dns.h.
-.SS "int \fBDNS::i\fP\fC [private]\fP"
-.PP
-Definition at line 40 of file dns.h.
.SS "char* \fBDNS::result\fP\fC [private]\fP"
.PP
-Definition at line 38 of file dns.h.
+Definition at line 39 of file dns.h.
.SS "int \fBDNS::t\fP\fC [private]\fP"
.PP
Definition at line 40 of file dns.h.
diff --git a/docs/man/man3/ELine.3 b/docs/man/man3/ELine.3
index e7d6c5374..dac7540a1 100644
--- a/docs/man/man3/ELine.3
+++ b/docs/man/man3/ELine.3
@@ -1,4 +1,4 @@
-.TH "ELine" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "ELine" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/Event.3 b/docs/man/man3/Event.3
index 7cb7e8109..40a9d4ea8 100644
--- a/docs/man/man3/Event.3
+++ b/docs/man/man3/Event.3
@@ -1,4 +1,4 @@
-.TH "Event" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "Event" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -58,7 +58,7 @@ The Event class is a unicast message directed at all modules.
When the class is properly instantiated it may be sent to all modules using the \fBSend()\fP method, which will trigger the OnEvent method in all modules passing the object as its parameter.
.PP
-Definition at line 191 of file modules.h.
+Definition at line 194 of file modules.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "Event::Event (char * anydata, \fBModule\fP * src, std::string eventid)"
@@ -121,17 +121,17 @@ References FOREACH_MOD.
.PP
.SS "char* \fBEvent::data\fP\fC [protected]\fP"
.PP
-This member holds a pointer to arbitary data set by the emitter of the message. Definition at line 196 of file modules.h.
+This member holds a pointer to arbitary data set by the emitter of the message. Definition at line 199 of file modules.h.
.PP
Referenced by GetData().
.SS "std::string \fBEvent::id\fP\fC [protected]\fP"
.PP
-The event identifier. This is arbitary text which should be used to distinguish one type of event from another. Definition at line 205 of file modules.h.
+The event identifier. This is arbitary text which should be used to distinguish one type of event from another. Definition at line 208 of file modules.h.
.PP
Referenced by GetEventID().
.SS "\fBModule\fP* \fBEvent::source\fP\fC [protected]\fP"
.PP
-This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply. Definition at line 200 of file modules.h.
+This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply. Definition at line 203 of file modules.h.
.PP
Referenced by GetSource().
diff --git a/docs/man/man3/ExemptItem.3 b/docs/man/man3/ExemptItem.3
index a95a85bdf..e8ca07eea 100644
--- a/docs/man/man3/ExemptItem.3
+++ b/docs/man/man3/ExemptItem.3
@@ -1,4 +1,4 @@
-.TH "ExemptItem" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "ExemptItem" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/ExtMode.3 b/docs/man/man3/ExtMode.3
index 8df2a5c5f..3c225024c 100644
--- a/docs/man/man3/ExtMode.3
+++ b/docs/man/man3/ExtMode.3
@@ -1,4 +1,4 @@
-.TH "ExtMode" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "ExtMode" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/Extensible.3 b/docs/man/man3/Extensible.3
index 94ffff5f8..cd2180659 100644
--- a/docs/man/man3/Extensible.3
+++ b/docs/man/man3/Extensible.3
@@ -1,4 +1,4 @@
-.TH "Extensible" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "Extensible" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/FileReader.3 b/docs/man/man3/FileReader.3
index 6bea2ee1e..a69617742 100644
--- a/docs/man/man3/FileReader.3
+++ b/docs/man/man3/FileReader.3
@@ -1,4 +1,4 @@
-.TH "FileReader" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "FileReader" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -57,100 +57,100 @@ Caches a text file into memory and can be used to retrieve lines from it.
This class contains methods for read-only manipulation of a text file in memory. Either use the constructor type with one parameter to load a file into memory at construction, or use the LoadFile method to load a file.
.PP
-Definition at line 1161 of file modules.h.
+Definition at line 1186 of file modules.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "FileReader::FileReader ()"
.PP
-Default constructor. This method does not load any file into memory, you must use the LoadFile method after constructing the class this way.Definition at line 986 of file modules.cpp.
+Default constructor. This method does not load any file into memory, you must use the LoadFile method after constructing the class this way.Definition at line 988 of file modules.cpp.
.PP
.nf
-987 {
-988 }
+989 {
+990 }
.fi
.SS "FileReader::FileReader (std::string filename)"
.PP
-Secondary constructor. This method initialises the class with a file loaded into it ready for GetLine and and other methods to be called. If the file could not be loaded, \fBFileReader::FileSize\fP returns 0.Definition at line 979 of file modules.cpp.
+Secondary constructor. This method initialises the class with a file loaded into it ready for GetLine and and other methods to be called. If the file could not be loaded, \fBFileReader::FileSize\fP returns 0.Definition at line 981 of file modules.cpp.
.PP
References fc, and file_cache.
.PP
.nf
-980 {
-981 file_cache c;
-982 readfile(c,filename.c_str());
-983 this->fc = c;
-984 }
+982 {
+983 file_cache c;
+984 readfile(c,filename.c_str());
+985 this->fc = c;
+986 }
.fi
.SS "FileReader::~\fBFileReader\fP ()"
.PP
-Default destructor. This deletes the memory allocated to the file.Definition at line 998 of file modules.cpp.
+Default destructor. This deletes the memory allocated to the file.Definition at line 1000 of file modules.cpp.
.PP
.nf
-999 {
-1000 }
+1001 {
+1002 }
.fi
.SH "Member Function Documentation"
.PP
.SS "bool FileReader::Exists ()"
.PP
-Returns true if the file exists This function will return false if the file could not be opened. Definition at line 1002 of file modules.cpp.
+Returns true if the file exists This function will return false if the file could not be opened. Definition at line 1004 of file modules.cpp.
.PP
References fc.
.PP
.nf
-1003 {
-1004 if (fc.size() == 0)
-1005 {
-1006 return(false);
-1007 }
-1008 else
-1009 {
-1010 return(true);
-1011 }
-1012 }
+1005 {
+1006 if (fc.size() == 0)
+1007 {
+1008 return(false);
+1009 }
+1010 else
+1011 {
+1012 return(true);
+1013 }
+1014 }
.fi
.SS "int FileReader::FileSize ()"
.PP
-Returns the size of the file in lines. This method returns the number of lines in the read file. If it is 0, no lines have been read into memory, either because the file is empty or it does not exist, or cannot be opened due to permission problems.Definition at line 1021 of file modules.cpp.
+Returns the size of the file in lines. This method returns the number of lines in the read file. If it is 0, no lines have been read into memory, either because the file is empty or it does not exist, or cannot be opened due to permission problems.Definition at line 1023 of file modules.cpp.
.PP
References fc.
.PP
.nf
-1022 {
-1023 return fc.size();
-1024 }
+1024 {
+1025 return fc.size();
+1026 }
.fi
.SS "std::string FileReader::GetLine (int x)"
.PP
-Retrieve one line from the file. This method retrieves one line from the text file. If an empty non-NULL string is returned, the index was out of bounds, or the line had no data on it.Definition at line 1014 of file modules.cpp.
+Retrieve one line from the file. This method retrieves one line from the text file. If an empty non-NULL string is returned, the index was out of bounds, or the line had no data on it.Definition at line 1016 of file modules.cpp.
.PP
References fc.
.PP
.nf
-1015 {
-1016 if ((x<0) || (x>fc.size()))
-1017 return '';
-1018 return fc[x];
-1019 }
+1017 {
+1018 if ((x<0) || (x>fc.size()))
+1019 return '';
+1020 return fc[x];
+1021 }
.fi
.SS "void FileReader::LoadFile (std::string filename)"
.PP
-Used to load a file. This method loads a file into the class ready for GetLine and and other methods to be called. If the file could not be loaded, \fBFileReader::FileSize\fP returns 0.Definition at line 990 of file modules.cpp.
+Used to load a file. This method loads a file into the class ready for GetLine and and other methods to be called. If the file could not be loaded, \fBFileReader::FileSize\fP returns 0.Definition at line 992 of file modules.cpp.
.PP
References fc, and file_cache.
.PP
.nf
-991 {
-992 file_cache c;
-993 readfile(c,filename.c_str());
-994 this->fc = c;
-995 }
+993 {
+994 file_cache c;
+995 readfile(c,filename.c_str());
+996 this->fc = c;
+997 }
.fi
.SH "Member Data Documentation"
.PP
.SS "\fBfile_cache\fP \fBFileReader::fc\fP\fC [private]\fP"
.PP
-Definition at line 1163 of file modules.h.
+Definition at line 1188 of file modules.h.
.PP
Referenced by Exists(), FileReader(), FileSize(), GetLine(), and LoadFile().
diff --git a/docs/man/man3/GLine.3 b/docs/man/man3/GLine.3
index 0c263effd..118afd97b 100644
--- a/docs/man/man3/GLine.3
+++ b/docs/man/man3/GLine.3
@@ -1,4 +1,4 @@
-.TH "GLine" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "GLine" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/HostItem.3 b/docs/man/man3/HostItem.3
index 1a74b43f1..cbb5e7b2d 100644
--- a/docs/man/man3/HostItem.3
+++ b/docs/man/man3/HostItem.3
@@ -1,4 +1,4 @@
-.TH "HostItem" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "HostItem" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/InAddr_HashComp.3 b/docs/man/man3/InAddr_HashComp.3
index a0b6759c0..ab6cd4563 100644
--- a/docs/man/man3/InAddr_HashComp.3
+++ b/docs/man/man3/InAddr_HashComp.3
@@ -1,4 +1,4 @@
-.TH "InAddr_HashComp" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "InAddr_HashComp" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/InviteItem.3 b/docs/man/man3/InviteItem.3
index 187472a3c..9ce27dd83 100644
--- a/docs/man/man3/InviteItem.3
+++ b/docs/man/man3/InviteItem.3
@@ -1,4 +1,4 @@
-.TH "InviteItem" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "InviteItem" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/Invited.3 b/docs/man/man3/Invited.3
index be48e1d72..b0268a92e 100644
--- a/docs/man/man3/Invited.3
+++ b/docs/man/man3/Invited.3
@@ -1,4 +1,4 @@
-.TH "Invited" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "Invited" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/KLine.3 b/docs/man/man3/KLine.3
index 42eb9f1dd..211bfefb1 100644
--- a/docs/man/man3/KLine.3
+++ b/docs/man/man3/KLine.3
@@ -1,4 +1,4 @@
-.TH "KLine" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "KLine" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/ModeParameter.3 b/docs/man/man3/ModeParameter.3
index 6e62ab564..41ce3695a 100644
--- a/docs/man/man3/ModeParameter.3
+++ b/docs/man/man3/ModeParameter.3
@@ -1,4 +1,4 @@
-.TH "ModeParameter" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "ModeParameter" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/Module.3 b/docs/man/man3/Module.3
index 9acfc10ce..486b10e2f 100644
--- a/docs/man/man3/Module.3
+++ b/docs/man/man3/Module.3
@@ -1,4 +1,4 @@
-.TH "Module" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "Module" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -203,6 +203,18 @@ Inherits \fBclassbase\fP.
.RI "virtual char * \fBOnRequest\fP (\fBRequest\fP *request)"
.br
.RI "\fICalled whenever a \fBRequest\fP class is sent to your module by another module. \fP"
+.ti -1c
+.RI "virtual int \fBOnOperCompare\fP (std::string password, std::string input)"
+.br
+.RI "\fICalled whenever an oper password is to be compared to what a user has input. \fP"
+.ti -1c
+.RI "virtual void \fBOnGlobalOper\fP (\fBuserrec\fP *user)"
+.br
+.RI "\fICalled whenever a user is given usermode +o, anywhere on the network. \fP"
+.ti -1c
+.RI "virtual void \fBOnGlobalConnect\fP (\fBuserrec\fP *user)"
+.br
+.RI "\fICalled whenever a user connects, anywhere on the network. \fP"
.in -1c
.SH "Detailed Description"
.PP
@@ -210,7 +222,7 @@ Base class for all InspIRCd modules This class is the base class for InspIRCd mo
All modules must inherit from this class, its methods will be called when irc server events occur. class inherited from module must be instantiated by the \fBModuleFactory\fP class (see relevent section) for the plugin to be initialised.
.PP
-Definition at line 233 of file modules.h.
+Definition at line 236 of file modules.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "Module::Module ()"
@@ -357,6 +369,20 @@ Called whenever an extended mode is to be processed. The type parameter is MT_SE
.nf
373 { return false; }
.fi
+.SS "void Module::OnGlobalConnect (\fBuserrec\fP * user)\fC [virtual]\fP"
+.PP
+Called whenever a user connects, anywhere on the network. This event is informational only. You should not change any user information in this event. To do so, use the OnUserConnect method to change the state of local users.Definition at line 410 of file modules.cpp.
+.PP
+.nf
+410 { };
+.fi
+.SS "void Module::OnGlobalOper (\fBuserrec\fP * user)\fC [virtual]\fP"
+.PP
+Called whenever a user is given usermode +o, anywhere on the network. You cannot override this and prevent it from happening as it is already happened and such a task must be performed by another server. You can however bounce modes by sending servermodes out to reverse mode changes.Definition at line 409 of file modules.cpp.
+.PP
+.nf
+409 { };
+.fi
.SS "void Module::OnInfo (\fBuserrec\fP * user)\fC [virtual]\fP"
.PP
Called whenever a user types /INFO. The userrec will contain the information of the user who typed the command. Modules may use this method to output their own credits in /INFO (which is the ircd's version of an about box). It is purposefully not possible to modify any info that has already been output, or halt the list. You must write a 371 numeric to the user, containing your info in the following format:
@@ -401,6 +427,13 @@ Called whenever a user opers locally. The userrec will contain the oper mode 'o'
.nf
375 { };
.fi
+.SS "int Module::OnOperCompare (std::string password, std::string input)\fC [virtual]\fP"
+.PP
+Called whenever an oper password is to be compared to what a user has input. The password field (from the config file) is in 'password' and is to be compared against 'input'. This method allows for encryption of oper passwords and much more besides. You should return a nonzero value if you want to allow the comparison or zero if you wish to do nothing.Definition at line 408 of file modules.cpp.
+.PP
+.nf
+408 { return 0; };
+.fi
.SS "void Module::OnPacketReceive (std::string & data, std::string serv)\fC [virtual]\fP"
.PP
Called after a packet is received from another irc server. This allows you to easily represent it in the correct ways to implement encryption, compression, digital signatures and anything else you may want to add. This should be regarded as a pre-processor and will be called immediately after the packet is received but before any other operations with the core of the ircd.Definition at line 369 of file modules.cpp.
diff --git a/docs/man/man3/ModuleFactory.3 b/docs/man/man3/ModuleFactory.3
index 44c837e10..5e8420840 100644
--- a/docs/man/man3/ModuleFactory.3
+++ b/docs/man/man3/ModuleFactory.3
@@ -1,4 +1,4 @@
-.TH "ModuleFactory" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "ModuleFactory" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -32,22 +32,22 @@ Instantiates classes inherited from \fBModule\fP This class creates a class inhe
This is to allow for modules to create many different variants of \fBModule\fP, dependent on architecture, configuration, etc. In most cases, the simple class shown in the example module m_foobar.so will suffice for most modules.
.PP
-Definition at line 1216 of file modules.h.
+Definition at line 1241 of file modules.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "ModuleFactory::ModuleFactory ()\fC [inline]\fP"
.PP
-Definition at line 1219 of file modules.h.
+Definition at line 1244 of file modules.h.
.PP
.nf
-1219 { }
+1244 { }
.fi
.SS "virtual ModuleFactory::~\fBModuleFactory\fP ()\fC [inline, virtual]\fP"
.PP
-Definition at line 1220 of file modules.h.
+Definition at line 1245 of file modules.h.
.PP
.nf
-1220 { }
+1245 { }
.fi
.SH "Member Function Documentation"
.PP
diff --git a/docs/man/man3/ModuleMessage.3 b/docs/man/man3/ModuleMessage.3
index faec8396b..3b04d034a 100644
--- a/docs/man/man3/ModuleMessage.3
+++ b/docs/man/man3/ModuleMessage.3
@@ -1,4 +1,4 @@
-.TH "ModuleMessage" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "ModuleMessage" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -24,7 +24,7 @@ Inherited by \fBEvent\fP, and \fBRequest\fP.
.in -1c
.SH "Detailed Description"
.PP
-The ModuleMessage class is the base class of \fBRequest\fP and \fBEvent\fP This class is used to represent a basic data structure which is passed between modules for safe inter-module communications. Definition at line 138 of file modules.h.
+The ModuleMessage class is the base class of \fBRequest\fP and \fBEvent\fP This class is used to represent a basic data structure which is passed between modules for safe inter-module communications. Definition at line 141 of file modules.h.
.SH "Member Function Documentation"
.PP
.SS "virtual char* ModuleMessage::Send ()\fC [pure virtual]\fP"
diff --git a/docs/man/man3/QLine.3 b/docs/man/man3/QLine.3
index 54c689494..a8a1adf0b 100644
--- a/docs/man/man3/QLine.3
+++ b/docs/man/man3/QLine.3
@@ -1,4 +1,4 @@
-.TH "QLine" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "QLine" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/Request.3 b/docs/man/man3/Request.3
index 523b76247..28a518bc5 100644
--- a/docs/man/man3/Request.3
+++ b/docs/man/man3/Request.3
@@ -1,4 +1,4 @@
-.TH "Request" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "Request" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -58,7 +58,7 @@ The Request class is a unicast message directed at a given module.
When this class is properly instantiated it may be sent to a module using the \fBSend()\fP method, which will call the given module's OnRequest method with this class as its parameter.
.PP
-Definition at line 151 of file modules.h.
+Definition at line 154 of file modules.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "Request::Request (char * anydata, \fBModule\fP * src, \fBModule\fP * dst)"
@@ -127,17 +127,17 @@ References dest, and Module::OnRequest().
.PP
.SS "char* \fBRequest::data\fP\fC [protected]\fP"
.PP
-This member holds a pointer to arbitary data set by the emitter of the message. Definition at line 156 of file modules.h.
+This member holds a pointer to arbitary data set by the emitter of the message. Definition at line 159 of file modules.h.
.PP
Referenced by GetData().
.SS "\fBModule\fP* \fBRequest::dest\fP\fC [protected]\fP"
.PP
-The single destination of the Request. Definition at line 163 of file modules.h.
+The single destination of the Request. Definition at line 166 of file modules.h.
.PP
Referenced by GetDest(), and Send().
.SS "\fBModule\fP* \fBRequest::source\fP\fC [protected]\fP"
.PP
-This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply. Definition at line 160 of file modules.h.
+This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply. Definition at line 163 of file modules.h.
.PP
Referenced by GetSource().
diff --git a/docs/man/man3/Server.3 b/docs/man/man3/Server.3
index 3749d4cd3..47253deec 100644
--- a/docs/man/man3/Server.3
+++ b/docs/man/man3/Server.3
@@ -1,4 +1,4 @@
-.TH "Server" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "Server" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -254,24 +254,24 @@ Allows server output and query functions This class contains methods which allow
All modules should instantiate at least one copy of this class, and use its member functions to perform their tasks.
.PP
-Definition at line 627 of file modules.h.
+Definition at line 652 of file modules.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "Server::Server ()"
.PP
-Default constructor. Creates a Server object.Definition at line 414 of file modules.cpp.
+Default constructor. Creates a Server object.Definition at line 416 of file modules.cpp.
.PP
.nf
-415 {
-416 }
+417 {
+418 }
.fi
.SS "Server::~\fBServer\fP ()\fC [virtual]\fP"
.PP
-Default destructor. Destroys a Server object.Definition at line 418 of file modules.cpp.
+Default destructor. Destroys a Server object.Definition at line 420 of file modules.cpp.
.PP
.nf
-419 {
-420 }
+421 {
+422 }
.fi
.SH "Member Function Documentation"
.PP
@@ -281,25 +281,25 @@ Adds a command to the command table. This allows modules to add extra commands i
.PP
typedef void (handlerfunc) (char**, int, userrec*); ... void \fBhandle_kill(char **parameters, int pcnt, userrec *user)\fP
.PP
-When the command is typed, the parameters will be placed into the parameters array (similar to argv) and the parameter count will be placed into pcnt (similar to argv). There will never be any less parameters than the 'minparams' value you specified when creating the command. The *user parameter is the class of the user which caused the command to trigger, who will always have the flag you specified in 'flags' when creating the initial command. For example to create an oper only command create the commands with flags='o'. 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.Definition at line 495 of file modules.cpp.
+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.Definition at line 497 of file modules.cpp.
.PP
References createcommand().
.PP
.nf
-496 {
-497 createcommand(cmd,f,flags,minparams,source);
-498 }
+498 {
+499 createcommand(cmd,f,flags,minparams,source);
+500 }
.fi
.SS "void Server::AddELine (long duration, std::string source, std::string reason, std::string hostmask)\fC [virtual]\fP"
.PP
-Adds a E-line The E-line is enforced as soon as it is added. 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. Definition at line 713 of file modules.cpp.
+Adds a E-line The E-line is enforced as soon as it is added. 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. Definition at line 715 of file modules.cpp.
.PP
References add_eline(), and duration().
.PP
.nf
-714 {
-715 add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
-716 }
+716 {
+717 add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
+718 }
.fi
.SS "bool Server::AddExtendedListMode (char modechar)\fC [virtual]\fP"
.PP
@@ -313,528 +313,528 @@ Adds an extended mode letter which is parsed by a module and handled in a list f
.PP
(4) The mode and its parameter are NOT stored in the channels modes structure
.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.Definition at line 640 of file modules.cpp.
+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.Definition at line 642 of file modules.cpp.
.PP
References DoAddExtendedMode(), ModeMakeList(), and MT_CHANNEL.
.PP
.nf
-641 {
-642 bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1);
-643 if (res)
-644 ModeMakeList(modechar);
-645 return res;
-646 }
+643 {
+644 bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1);
+645 if (res)
+646 ModeMakeList(modechar);
+647 return res;
+648 }
.fi
.SS "bool Server::AddExtendedMode (char modechar, int type, bool requires_oper, int params_when_on, int params_when_off)\fC [virtual]\fP"
.PP
-Adds an extended mode letter which is parsed by a module. This allows modules to add extra mode letters, e.g. +x for hostcloak. the 'type' parameter is either MT_CHANNEL, MT_CLIENT, or MT_SERVER, to indicate wether the mode is a channel mode, a client mode, or a server mode. requires_oper is used with MT_CLIENT type modes only to indicate the mode can only be set or unset by an oper. If this is used for MT_CHANNEL type modes it is ignored. params_when_on is the number of modes to expect when the mode is turned on (for type MT_CHANNEL only), e.g. with mode +k, this would have a value of 1. the params_when_off value has a similar value to params_when_on, except it indicates the number of parameters to expect when the mode is disabled. Modes which act in a similar way to channel mode +l (e.g. require a parameter to enable, but not to disable) should use this parameter. The function returns false if the mode is unavailable, and will not attempt to allocate another character, as this will confuse users. This also means that as only one module can claim a specific mode character, the core does not need to keep track of which modules own which modes, which speeds up operation of the server. In this version, a mode can have at most one parameter, attempting to use more parameters will have undefined effects.Definition at line 620 of file modules.cpp.
+Adds an extended mode letter which is parsed by a module. This allows modules to add extra mode letters, e.g. +x for hostcloak. the 'type' parameter is either MT_CHANNEL, MT_CLIENT, or MT_SERVER, to indicate wether the mode is a channel mode, a client mode, or a server mode. requires_oper is used with MT_CLIENT type modes only to indicate the mode can only be set or unset by an oper. If this is used for MT_CHANNEL type modes it is ignored. params_when_on is the number of modes to expect when the mode is turned on (for type MT_CHANNEL only), e.g. with mode +k, this would have a value of 1. the params_when_off value has a similar value to params_when_on, except it indicates the number of parameters to expect when the mode is disabled. Modes which act in a similar way to channel mode +l (e.g. require a parameter to enable, but not to disable) should use this parameter. The function returns false if the mode is unavailable, and will not attempt to allocate another character, as this will confuse users. This also means that as only one module can claim a specific mode character, the core does not need to keep track of which modules own which modes, which speeds up operation of the server. In this version, a mode can have at most one parameter, attempting to use more parameters will have undefined effects.Definition at line 622 of file modules.cpp.
.PP
References DEBUG, DoAddExtendedMode(), MT_CLIENT, and MT_SERVER.
.PP
.nf
-621 {
-622 if (type == MT_SERVER)
-623 {
-624 log(DEBUG,'*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion');
-625 return false;
-626 }
-627 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT))
-628 {
-629 log(DEBUG,'*** API ERROR *** Parameters on MT_CLIENT modes are not supported');
-630 return false;
-631 }
-632 if ((params_when_on>1) || (params_when_off>1))
-633 {
-634 log(DEBUG,'*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported');
-635 return false;
-636 }
-637 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off);
-638 }
+623 {
+624 if (type == MT_SERVER)
+625 {
+626 log(DEBUG,'*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion');
+627 return false;
+628 }
+629 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT))
+630 {
+631 log(DEBUG,'*** API ERROR *** Parameters on MT_CLIENT modes are not supported');
+632 return false;
+633 }
+634 if ((params_when_on>1) || (params_when_off>1))
+635 {
+636 log(DEBUG,'*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported');
+637 return false;
+638 }
+639 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off);
+640 }
.fi
.SS "void Server::AddGLine (long duration, std::string source, std::string reason, std::string hostmask)\fC [virtual]\fP"
.PP
-Adds a G-line The G-line is propogated to all of the servers in the mesh and enforced as soon as it is added. 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.Definition at line 693 of file modules.cpp.
+Adds a G-line The G-line is propogated to all of the servers in the mesh and enforced as soon as it is added. 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.Definition at line 695 of file modules.cpp.
.PP
References add_gline(), and duration().
.PP
.nf
-694 {
-695 add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
-696 }
+696 {
+697 add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
+698 }
.fi
.SS "void Server::AddKLine (long duration, std::string source, std::string reason, std::string hostmask)\fC [virtual]\fP"
.PP
-Adds a K-line The K-line is enforced as soon as it is added. 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. Definition at line 708 of file modules.cpp.
+Adds a K-line The K-line is enforced as soon as it is added. 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. Definition at line 710 of file modules.cpp.
.PP
References add_kline(), and duration().
.PP
.nf
-709 {
-710 add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
-711 }
+711 {
+712 add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
+713 }
.fi
.SS "void Server::AddQLine (long duration, std::string source, std::string reason, std::string nickname)\fC [virtual]\fP"
.PP
-Adds a Q-line The Q-line is propogated to all of the servers in the mesh and enforced as soon as it is added. 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. Definition at line 698 of file modules.cpp.
+Adds a Q-line The Q-line is propogated to all of the servers in the mesh and enforced as soon as it is added. 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. Definition at line 700 of file modules.cpp.
.PP
References add_qline(), and duration().
.PP
.nf
-699 {
-700 add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str());
-701 }
+701 {
+702 add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str());
+703 }
.fi
.SS "void Server::AddZLine (long duration, std::string source, std::string reason, std::string ipaddr)\fC [virtual]\fP"
.PP
-Adds a Z-line The Z-line is propogated to all of the servers in the mesh and enforced as soon as it is added. 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. Definition at line 703 of file modules.cpp.
+Adds a Z-line The Z-line is propogated to all of the servers in the mesh and enforced as soon as it is added. 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. Definition at line 705 of file modules.cpp.
.PP
References add_zline(), and duration().
.PP
.nf
-704 {
-705 add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str());
-706 }
+706 {
+707 add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str());
+708 }
.fi
.SS "long Server::CalcDuration (std::string duration)\fC [virtual]\fP"
.PP
-Calculates a duration This method will take a string containing a formatted duration (e.g. '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.Definition at line 743 of file modules.cpp.
+Calculates a duration This method will take a string containing a formatted duration (e.g. '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.Definition at line 745 of file modules.cpp.
.PP
References duration().
.PP
.nf
-744 {
-745 return duration(delta.c_str());
-746 }
+746 {
+747 return duration(delta.c_str());
+748 }
.fi
.SS "void Server::CallCommandHandler (std::string commandname, char ** parameters, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP"
.PP
Calls the handler for a command, either implemented by the core or by another module. You can use this function to trigger other commands in the ircd, such as PRIVMSG, JOIN, KICK etc, or even as a method of callback. By defining command names that are untypeable for users on irc (e.g. those which contain a or
.br
-) you may use them as callback identifiers. The first parameter to this method is the name of the command handler you wish to call, e.g. PRIVMSG. This will be a command handler previously registered by the core or wih \fBAddCommand()\fP. The second parameter is an array of parameters, and the third parameter is a count of parameters in the array. If you do not pass enough parameters to meet the minimum needed by the handler, the functiom will silently ignore it. The final parameter is the user executing the command handler, used for privilage checks, etc.Definition at line 485 of file modules.cpp.
+) you may use them as callback identifiers. The first parameter to this method is the name of the command handler you wish to call, e.g. PRIVMSG. This will be a command handler previously registered by the core or wih \fBAddCommand()\fP. The second parameter is an array of parameters, and the third parameter is a count of parameters in the array. If you do not pass enough parameters to meet the minimum needed by the handler, the functiom will silently ignore it. The final parameter is the user executing the command handler, used for privilage checks, etc.Definition at line 487 of file modules.cpp.
.PP
.nf
-486 {
-487 call_handler(commandname.c_str(),parameters,pcnt,user);
-488 }
+488 {
+489 call_handler(commandname.c_str(),parameters,pcnt,user);
+490 }
.fi
.SS "void Server::ChangeGECOS (\fBuserrec\fP * user, std::string gecos)\fC [virtual]\fP"
.PP
-Change GECOS (fullname) of a user. You should always call this method to change a user's GECOS rather than writing directly to the fullname member of userrec, as any change applied via this method will be propogated to any linked servers.Definition at line 573 of file modules.cpp.
+Change GECOS (fullname) of a user. You should always call this method to change a user's GECOS rather than writing directly to the fullname member of userrec, as any change applied via this method will be propogated to any linked servers.Definition at line 575 of file modules.cpp.
.PP
References ChangeName().
.PP
.nf
-574 {
-575 ChangeName(user,gecos.c_str());
-576 }
+576 {
+577 ChangeName(user,gecos.c_str());
+578 }
.fi
.SS "void Server::ChangeHost (\fBuserrec\fP * user, std::string host)\fC [virtual]\fP"
.PP
-Change displayed hostname of a user. You should always call this method to change a user's host rather than writing directly to the dhost member of userrec, as any change applied via this method will be propogated to any linked servers.Definition at line 568 of file modules.cpp.
+Change displayed hostname of a user. You should always call this method to change a user's host rather than writing directly to the dhost member of userrec, as any change applied via this method will be propogated to any linked servers.Definition at line 570 of file modules.cpp.
.PP
References ChangeDisplayedHost().
.PP
.nf
-569 {
-570 ChangeDisplayedHost(user,host.c_str());
-571 }
+571 {
+572 ChangeDisplayedHost(user,host.c_str());
+573 }
.fi
.SS "void Server::ChangeUserNick (\fBuserrec\fP * user, std::string nickname)\fC [virtual]\fP"
.PP
-Forces a user nickchange. This command works similarly to SVSNICK, and can be used to implement Q-lines etc. If you specify an invalid nickname, the nick change will be dropped and the target user will receive the error numeric for it.Definition at line 469 of file modules.cpp.
+Forces a user nickchange. This command works similarly to SVSNICK, and can be used to implement Q-lines etc. If you specify an invalid nickname, the nick change will be dropped and the target user will receive the error numeric for it.Definition at line 471 of file modules.cpp.
.PP
.nf
-470 {
-471 force_nickchange(user,nickname.c_str());
-472 }
+472 {
+473 force_nickchange(user,nickname.c_str());
+474 }
.fi
.SS "std::string Server::ChanMode (\fBuserrec\fP * User, \fBchanrec\fP * Chan)\fC [virtual]\fP"
.PP
-Attempts to look up a user's privilages on a channel. This function will return a string containing either @, , +, or an empty string, representing the user's privilages upon the channel you specify.Definition at line 593 of file modules.cpp.
+Attempts to look up a user's privilages on a channel. This function will return a string containing either @, , +, or an empty string, representing the user's privilages upon the channel you specify.Definition at line 595 of file modules.cpp.
.PP
References cmode().
.PP
.nf
-594 {
-595 return cmode(User,Chan);
-596 }
+596 {
+597 return cmode(User,Chan);
+598 }
.fi
.SS "bool Server::CommonChannels (\fBuserrec\fP * u1, \fBuserrec\fP * u2)\fC [virtual]\fP"
.PP
-Returns true if two users share a common channel. This method is used internally by the NICK and QUIT commands, and the \fBServer::SendCommon\fP method.Definition at line 546 of file modules.cpp.
+Returns true if two users share a common channel. This method is used internally by the NICK and QUIT commands, and the \fBServer::SendCommon\fP method.Definition at line 548 of file modules.cpp.
.PP
References common_channels().
.PP
.nf
-547 {
-548 return (common_channels(u1,u2) != 0);
-549 }
+549 {
+550 return (common_channels(u1,u2) != 0);
+551 }
.fi
.SS "int Server::CountUsers (\fBchanrec\fP * c)\fC [virtual]\fP"
.PP
-Returns a count of the number of users on a channel. This will NEVER be 0, as if the chanrec exists, it will have at least one user in the channel.Definition at line 648 of file modules.cpp.
+Returns a count of the number of users on a channel. This will NEVER be 0, as if the chanrec exists, it will have at least one user in the channel.Definition at line 650 of file modules.cpp.
.PP
.nf
-649 {
-650 return usercount(c);
-651 }
+651 {
+652 return usercount(c);
+653 }
.fi
.SS "bool Server::DelELine (std::string hostmask)\fC [virtual]\fP"
.PP
-Deletes a local E-Line. Definition at line 738 of file modules.cpp.
+Deletes a local E-Line. Definition at line 740 of file modules.cpp.
.PP
References del_eline().
.PP
.nf
-739 {
-740 del_eline(hostmask.c_str());
-741 }
+741 {
+742 del_eline(hostmask.c_str());
+743 }
.fi
.SS "bool Server::DelGLine (std::string hostmask)\fC [virtual]\fP"
.PP
-Deletes a G-Line from all servers on the mesh. Definition at line 718 of file modules.cpp.
+Deletes a G-Line from all servers on the mesh. Definition at line 720 of file modules.cpp.
.PP
References del_gline().
.PP
.nf
-719 {
-720 del_gline(hostmask.c_str());
-721 }
+721 {
+722 del_gline(hostmask.c_str());
+723 }
.fi
.SS "bool Server::DelKLine (std::string hostmask)\fC [virtual]\fP"
.PP
-Deletes a local K-Line. Definition at line 733 of file modules.cpp.
+Deletes a local K-Line. Definition at line 735 of file modules.cpp.
.PP
References del_kline().
.PP
.nf
-734 {
-735 del_kline(hostmask.c_str());
-736 }
+736 {
+737 del_kline(hostmask.c_str());
+738 }
.fi
.SS "bool Server::DelQLine (std::string nickname)\fC [virtual]\fP"
.PP
-Deletes a Q-Line from all servers on the mesh. Definition at line 723 of file modules.cpp.
+Deletes a Q-Line from all servers on the mesh. Definition at line 725 of file modules.cpp.
.PP
References del_qline().
.PP
.nf
-724 {
-725 del_qline(nickname.c_str());
-726 }
+726 {
+727 del_qline(nickname.c_str());
+728 }
.fi
.SS "bool Server::DelZLine (std::string ipaddr)\fC [virtual]\fP"
.PP
-Deletes a Z-Line from all servers on the mesh. Definition at line 728 of file modules.cpp.
+Deletes a Z-Line from all servers on the mesh. Definition at line 730 of file modules.cpp.
.PP
References del_zline().
.PP
.nf
-729 {
-730 del_zline(ipaddr.c_str());
-731 }
+731 {
+732 del_zline(ipaddr.c_str());
+733 }
.fi
.SS "\fBchanrec\fP * Server::FindChannel (std::string channel)\fC [virtual]\fP"
.PP
-Attempts to look up a channel and return a pointer to it. This function will return NULL if the channel does not exist.Definition at line 588 of file modules.cpp.
+Attempts to look up a channel and return a pointer to it. This function will return NULL if the channel does not exist.Definition at line 590 of file modules.cpp.
.PP
.nf
-589 {
-590 return FindChan(channel.c_str());
-591 }
+591 {
+592 return FindChan(channel.c_str());
+593 }
.fi
.SS "\fBModule\fP * Server::FindModule (std::string name)\fC [virtual]\fP"
.PP
-This function finds a module by name. You must provide the filename of the module. If the module cannot be found (is not loaded) the function will return NULL.Definition at line 821 of file modules.cpp.
+This function finds a module by name. You must provide the filename of the module. If the module cannot be found (is not loaded) the function will return NULL.Definition at line 823 of file modules.cpp.
.PP
References MODCOUNT, module_names, and modules.
.PP
.nf
-822 {
-823 for (int i = 0; i <= MODCOUNT; i++)
-824 {
-825 if (module_names[i] == name)
-826 {
-827 return modules[i];
-828 }
-829 }
-830 return NULL;
-831 }
+824 {
+825 for (int i = 0; i <= MODCOUNT; i++)
+826 {
+827 if (module_names[i] == name)
+828 {
+829 return modules[i];
+830 }
+831 }
+832 return NULL;
+833 }
.fi
.SS "\fBuserrec\fP * Server::FindNick (std::string nick)\fC [virtual]\fP"
.PP
-Attempts to look up a nick and return a pointer to it. This function will return NULL if the nick does not exist.Definition at line 583 of file modules.cpp.
+Attempts to look up a nick and return a pointer to it. This function will return NULL if the nick does not exist.Definition at line 585 of file modules.cpp.
.PP
.nf
-584 {
-585 return Find(nick);
-586 }
+586 {
+587 return Find(nick);
+588 }
.fi
.SS "\fBAdmin\fP Server::GetAdmin ()\fC [virtual]\fP"
.PP
-Returns the information of the server as returned by the /ADMIN command. See the \fBAdmin\fP class for further information of the return value. The members \fBAdmin::Nick\fP, \fBAdmin::Email\fP and \fBAdmin::Name\fP contain the information for the server where the module is loaded.Definition at line 613 of file modules.cpp.
+Returns the information of the server as returned by the /ADMIN command. See the \fBAdmin\fP class for further information of the return value. The members \fBAdmin::Nick\fP, \fBAdmin::Email\fP and \fBAdmin::Name\fP contain the information for the server where the module is loaded.Definition at line 615 of file modules.cpp.
.PP
.nf
-614 {
-615 return Admin(getadminname(),getadminemail(),getadminnick());
-616 }
+616 {
+617 return Admin(getadminname(),getadminemail(),getadminnick());
+618 }
.fi
.SS "std::string Server::GetNetworkName ()\fC [virtual]\fP"
.PP
-Returns the network name, global to all linked servers. Definition at line 608 of file modules.cpp.
+Returns the network name, global to all linked servers. Definition at line 610 of file modules.cpp.
.PP
.nf
-609 {
-610 return getnetworkname();
-611 }
+611 {
+612 return getnetworkname();
+613 }
.fi
.SS "std::string Server::GetServerName ()\fC [virtual]\fP"
.PP
-Returns the server name of the server where the module is loaded. Definition at line 603 of file modules.cpp.
+Returns the server name of the server where the module is loaded. Definition at line 605 of file modules.cpp.
.PP
.nf
-604 {
-605 return getservername();
-606 }
+606 {
+607 return getservername();
+608 }
.fi
.SS "\fBchanuserlist\fP Server::GetUsers (\fBchanrec\fP * chan)\fC [virtual]\fP"
.PP
-Fetches the userlist of a channel. This function must be here and not a member of userrec or chanrec due to include constraints.Definition at line 450 of file modules.cpp.
+Fetches the userlist of a channel. This function must be here and not a member of userrec or chanrec due to include constraints.Definition at line 452 of file modules.cpp.
.PP
References chanuserlist, clientlist, has_channel(), and isnick().
.PP
.nf
-451 {
-452 chanuserlist userl;
-453 userl.clear();
-454 for (user_hash::const_iterator i = clientlist.begin(); i != clientlist.end(); i++)
-455 {
-456 if (i->second)
-457 {
-458 if (has_channel(i->second,chan))
-459 {
-460 if (isnick(i->second->nick))
-461 {
-462 userl.push_back(i->second);
-463 }
-464 }
-465 }
-466 }
-467 return userl;
-468 }
+453 {
+454 chanuserlist userl;
+455 userl.clear();
+456 for (user_hash::const_iterator i = clientlist.begin(); i != clientlist.end(); i++)
+457 {
+458 if (i->second)
+459 {
+460 if (has_channel(i->second,chan))
+461 {
+462 if (isnick(i->second->nick))
+463 {
+464 userl.push_back(i->second);
+465 }
+466 }
+467 }
+468 }
+469 return userl;
+470 }
.fi
.SS "bool Server::IsNick (std::string nick)\fC [virtual]\fP"
.PP
-Returns true if a nick is valid. Nicks for unregistered connections will return false.Definition at line 578 of file modules.cpp.
+Returns true if a nick is valid. Nicks for unregistered connections will return false.Definition at line 580 of file modules.cpp.
.PP
References isnick().
.PP
.nf
-579 {
-580 return (isnick(nick.c_str()) != 0);
-581 }
+581 {
+582 return (isnick(nick.c_str()) != 0);
+583 }
.fi
.SS "bool Server::IsOnChannel (\fBuserrec\fP * User, \fBchanrec\fP * Chan)\fC [virtual]\fP"
.PP
-Checks if a user is on a channel. This function will return true or false to indicate if user 'User' is on channel 'Chan'.Definition at line 598 of file modules.cpp.
+Checks if a user is on a channel. This function will return true or false to indicate if user 'User' is on channel 'Chan'.Definition at line 600 of file modules.cpp.
.PP
References has_channel().
.PP
.nf
-599 {
-600 return has_channel(User,Chan);
-601 }
+601 {
+602 return has_channel(User,Chan);
+603 }
.fi
.SS "bool Server::IsUlined (std::string server)\fC [virtual]\fP"
.PP
-Returns true if the servername you give is ulined. ULined servers have extra privilages. They are allowed to change nicknames on remote servers, change modes of clients which are on remote servers and set modes of channels where there are no channel operators for that channel on the ulined server, amongst other things. Ulined server data is also broadcast across the mesh at all times as opposed to selectively messaged in the case of normal servers, as many ulined server types (such as services) do not support meshed links and must operate in this manner.Definition at line 480 of file modules.cpp.
+Returns true if the servername you give is ulined. ULined servers have extra privilages. They are allowed to change nicknames on remote servers, change modes of clients which are on remote servers and set modes of channels where there are no channel operators for that channel on the ulined server, amongst other things. Ulined server data is also broadcast across the mesh at all times as opposed to selectively messaged in the case of normal servers, as many ulined server types (such as services) do not support meshed links and must operate in this manner.Definition at line 482 of file modules.cpp.
.PP
References is_uline().
.PP
.nf
-481 {
-482 return is_uline(server.c_str());
-483 }
+483 {
+484 return is_uline(server.c_str());
+485 }
.fi
.SS "bool Server::IsValidMask (std::string mask)\fC [virtual]\fP"
.PP
-Returns true if a nick!ident string is correctly formatted, false if otherwise. Definition at line 748 of file modules.cpp.
+Returns true if a nick!ident string is correctly formatted, false if otherwise. Definition at line 750 of file modules.cpp.
.PP
.nf
-749 {
-750 const char* dest = mask.c_str();
-751 if (strchr(dest,'!')==0)
-752 return false;
-753 if (strchr(dest,'@')==0)
+751 {
+752 const char* dest = mask.c_str();
+753 if (strchr(dest,'!')==0)
754 return false;
-755 for (int i = 0; i < strlen(dest); i++)
-756 if (dest[i] < 32)
-757 return false;
-758 for (int i = 0; i < strlen(dest); i++)
-759 if (dest[i] > 126)
-760 return false;
-761 int c = 0;
-762 for (int i = 0; i < strlen(dest); i++)
-763 if (dest[i] == '!')
-764 c++;
-765 if (c>1)
-766 return false;
-767 c = 0;
-768 for (int i = 0; i < strlen(dest); i++)
-769 if (dest[i] == '@')
-770 c++;
-771 if (c>1)
-772 return false;
-773
-774 return true;
-775 }
+755 if (strchr(dest,'@')==0)
+756 return false;
+757 for (int i = 0; i < strlen(dest); i++)
+758 if (dest[i] < 32)
+759 return false;
+760 for (int i = 0; i < strlen(dest); i++)
+761 if (dest[i] > 126)
+762 return false;
+763 int c = 0;
+764 for (int i = 0; i < strlen(dest); i++)
+765 if (dest[i] == '!')
+766 c++;
+767 if (c>1)
+768 return false;
+769 c = 0;
+770 for (int i = 0; i < strlen(dest); i++)
+771 if (dest[i] == '@')
+772 c++;
+773 if (c>1)
+774 return false;
+775
+776 return true;
+777 }
.fi
.SS "\fBchanrec\fP * Server::JoinUserToChannel (\fBuserrec\fP * user, std::string cname, std::string key)\fC [virtual]\fP"
.PP
-Forces a user to join a channel. This is similar to svsjoin and can be used to implement redirection, etc. On success, the return value is a valid pointer to a chanrec* of the channel the user was joined to. On failure, the result is NULL.Definition at line 440 of file modules.cpp.
+Forces a user to join a channel. This is similar to svsjoin and can be used to implement redirection, etc. On success, the return value is a valid pointer to a chanrec* of the channel the user was joined to. On failure, the result is NULL.Definition at line 442 of file modules.cpp.
.PP
.nf
-441 {
-442 return add_channel(user,cname.c_str(),key.c_str(),true);
-443 }
+443 {
+444 return add_channel(user,cname.c_str(),key.c_str(),true);
+445 }
.fi
.SS "void Server::Log (int level, std::string s)\fC [virtual]\fP"
.PP
-Writes a log string. This method writes a line of text to the log. If the level given is lower than the level given in the configuration, this command has no effect.Definition at line 490 of file modules.cpp.
+Writes a log string. This method writes a line of text to the log. If the level given is lower than the level given in the configuration, this command has no effect.Definition at line 492 of file modules.cpp.
.PP
.nf
-491 {
-492 log(level,'%s',s.c_str());
-493 }
+493 {
+494 log(level,'%s',s.c_str());
+495 }
.fi
.SS "bool Server::MatchText (std::string sliteral, std::string spattern)\fC [virtual]\fP"
.PP
-Matches text against a glob pattern. Uses the ircd's internal matching function to match string against a globbing pattern, e.g. *!*@*.com Returns true if the literal successfully matches the pattern, false if otherwise.Definition at line 427 of file modules.cpp.
+Matches text against a glob pattern. Uses the ircd's internal matching function to match string against a globbing pattern, e.g. *!*@*.com Returns true if the literal successfully matches the pattern, false if otherwise.Definition at line 429 of file modules.cpp.
.PP
.nf
-428 {
-429 char literal[MAXBUF],pattern[MAXBUF];
-430 strlcpy(literal,sliteral.c_str(),MAXBUF);
-431 strlcpy(pattern,spattern.c_str(),MAXBUF);
-432 return match(literal,pattern);
-433 }
+430 {
+431 char literal[MAXBUF],pattern[MAXBUF];
+432 strlcpy(literal,sliteral.c_str(),MAXBUF);
+433 strlcpy(pattern,spattern.c_str(),MAXBUF);
+434 return match(literal,pattern);
+435 }
.fi
.SS "bool Server::MeshCheckChan (\fBchanrec\fP * c, std::string servername)\fC [virtual]\fP"
.PP
-This function is used to check if any users on channel c are on server servername. This is used internally by PRIVMSG etc. You should not need to use it.Definition at line 803 of file modules.cpp.
+This function is used to check if any users on channel c are on server servername. This is used internally by PRIVMSG etc. You should not need to use it.Definition at line 805 of file modules.cpp.
.PP
.nf
-804 {
-805 if (c)
-806 {
-807 return ChanAnyOnThisServer(c,(char*)servername.c_str());
-808 }
-809 else return false;
-810 }
+806 {
+807 if (c)
+808 {
+809 return ChanAnyOnThisServer(c,(char*)servername.c_str());
+810 }
+811 else return false;
+812 }
.fi
.SS "bool Server::MeshCheckCommon (\fBuserrec\fP * u, std::string servername)\fC [virtual]\fP"
.PP
-This function is used to check if user u has any channels in common with users on servername. This is used internally by \fBServer::MeshSendCommon\fP. You should very rarely need to use it.Definition at line 812 of file modules.cpp.
+This function is used to check if user u has any channels in common with users on servername. This is used internally by \fBServer::MeshSendCommon\fP. You should very rarely need to use it.Definition at line 814 of file modules.cpp.
.PP
.nf
-813 {
-814 if (u)
-815 {
-816 return CommonOnThisServer(u,(char*)servername.c_str());
-817 }
-818 else return false;
-819 }
+815 {
+816 if (u)
+817 {
+818 return CommonOnThisServer(u,(char*)servername.c_str());
+819 }
+820 else return false;
+821 }
.fi
.SS "void Server::MeshSendAll (std::string text)\fC [virtual]\fP"
.PP
-Sends a line of text to all connected servers. If a server is not directly reachable, the core deals with routing the message, and will also deal with failures transparently.Definition at line 777 of file modules.cpp.
+Sends a line of text to all connected servers. If a server is not directly reachable, the core deals with routing the message, and will also deal with failures transparently.Definition at line 779 of file modules.cpp.
.PP
.nf
-778 {
-779 NetSendToAll((char*)text.c_str());
-780 }
+780 {
+781 NetSendToAll((char*)text.c_str());
+782 }
.fi
.SS "void Server::MeshSendAllAlive (std::string text)\fC [virtual]\fP"
.PP
-This function is equivalent to Server::MeshSendToAll except it will only route to servers which are directly routable. Definition at line 788 of file modules.cpp.
+This function is equivalent to Server::MeshSendToAll except it will only route to servers which are directly routable. Definition at line 790 of file modules.cpp.
.PP
.nf
-789 {
-790 NetSendToAllAlive((char*)text.c_str());
-791 }
+791 {
+792 NetSendToAllAlive((char*)text.c_str());
+793 }
.fi
.SS "void Server::MeshSendAllExcept (std::string target, std::string text)\fC [virtual]\fP"
.PP
-This function sends to all servers EXCEPT the one you specify. You should usually use this function to send messages, specifying the SENDER of your message as 'target'. This will prevent message loops.Definition at line 798 of file modules.cpp.
+This function sends to all servers EXCEPT the one you specify. You should usually use this function to send messages, specifying the SENDER of your message as 'target'. This will prevent message loops.Definition at line 800 of file modules.cpp.
.PP
.nf
-799 {
-800 NetSendToAllExcept(target.c_str(),(char*)text.c_str());
-801 }
+801 {
+802 NetSendToAllExcept(target.c_str(),(char*)text.c_str());
+803 }
.fi
.SS "void Server::MeshSendCommon (\fBuserrec\fP * user, std::string text)\fC [virtual]\fP"
.PP
-This method sends a line of text to all servers who have users which share common channels with the user you provide. For example, if user A is on server A, and they are on channels #one and #two, and user B is on server B, and also on channel #one, but user C is on server C and on neither #one or #two, this function will cause the text to only be sent to server B. However, if server B is only reachable via C, it will route it to C (you do not have to worry about this routing, it is done transparently, but its good to know how things work!)Definition at line 782 of file modules.cpp.
+This method sends a line of text to all servers who have users which share common channels with the user you provide. For example, if user A is on server A, and they are on channels #one and #two, and user B is on server B, and also on channel #one, but user C is on server C and on neither #one or #two, this function will cause the text to only be sent to server B. However, if server B is only reachable via C, it will route it to C (you do not have to worry about this routing, it is done transparently, but its good to know how things work!)Definition at line 784 of file modules.cpp.
.PP
.nf
-783 {
-784 if (user)
-785 NetSendToCommon(user,(char*)text.c_str());
-786 }
+785 {
+786 if (user)
+787 NetSendToCommon(user,(char*)text.c_str());
+788 }
.fi
.SS "void Server::MeshSendUnicast (std::string destination, std::string text)\fC [virtual]\fP"
.PP
-This function sends a line of text directly to a server. If the server is not directly routable at this time, the server attempts to route text through the mesh.Definition at line 793 of file modules.cpp.
+This function sends a line of text directly to a server. If the server is not directly routable at this time, the server attempts to route text through the mesh.Definition at line 795 of file modules.cpp.
.PP
.nf
-794 {
-795 NetSendToOne((char*)destination.c_str(),(char*)text.c_str());
-796 }
+796 {
+797 NetSendToOne((char*)destination.c_str(),(char*)text.c_str());
+798 }
.fi
.SS "\fBchanrec\fP * Server::PartUserFromChannel (\fBuserrec\fP * user, std::string cname, std::string reason)\fC [virtual]\fP"
.PP
-Forces a user to part a channel. This is similar to svspart and can be used to implement redirection, etc. Although the return value of this function is a pointer to a channel record, the returned data is undefined and should not be read or written to. This behaviour may be changed in a future version.Definition at line 445 of file modules.cpp.
+Forces a user to part a channel. This is similar to svspart and can be used to implement redirection, etc. Although the return value of this function is a pointer to a channel record, the returned data is undefined and should not be read or written to. This behaviour may be changed in a future version.Definition at line 447 of file modules.cpp.
.PP
.nf
-446 {
-447 return del_channel(user,cname.c_str(),reason.c_str(),false);
-448 }
+448 {
+449 return del_channel(user,cname.c_str(),reason.c_str(),false);
+450 }
.fi
.SS "bool Server::PseudoToUser (\fBuserrec\fP * alive, \fBuserrec\fP * zombie, std::string message)\fC [virtual]\fP"
.PP
-This user takes one user, and switches their file descriptor with another user, so that one user 'becomes' the other. 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.Definition at line 663 of file modules.cpp.
+This user takes one user, and switches their file descriptor with another user, so that one user 'becomes' the other. 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.Definition at line 665 of file modules.cpp.
.PP
References ucrec::channel, userrec::chans, connection::fd, FD_MAGIC_NUMBER, connection::host, userrec::ident, chanrec::name, userrec::nick, chanrec::setby, chanrec::topic, and chanrec::topicset.
.PP
.nf
-664 {
-665 zombie->fd = alive->fd;
-666 alive->fd = FD_MAGIC_NUMBER;
-667 Write(zombie->fd,':%s!%s@%s NICK %s',alive->nick,alive->ident,alive->host,zombie->nick);
-668 kill_link(alive,message.c_str());
-669 for (int i = 0; i != MAXCHANS; i++)
-670 {
-671 if (zombie->chans[i].channel != NULL)
-672 {
-673 if (zombie->chans[i].channel->name)
-674 {
-675 chanrec* Ptr = zombie->chans[i].channel;
-676 WriteFrom(zombie->fd,zombie,'JOIN %s',Ptr->name);
-677 if (Ptr->topicset)
-678 {
-679 WriteServ(zombie->fd,'332 %s %s :%s', zombie->nick, Ptr->name, Ptr->topic);
-680 WriteServ(zombie->fd,'333 %s %s %s %d', zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset);
-681 }
-682 userlist(zombie,Ptr);
-683 WriteServ(zombie->fd,'366 %s %s :End of /NAMES list.', zombie->nick, Ptr->name);
-684 //WriteServ(zombie->fd,'324 %s %s +%s',zombie->nick, Ptr->name,chanmodes(Ptr));
-685 //WriteServ(zombie->fd,'329 %s %s %d', zombie->nick, Ptr->name, Ptr->created);
-686
-687 }
-688 }
-689 }
-690
-691 }
+666 {
+667 zombie->fd = alive->fd;
+668 alive->fd = FD_MAGIC_NUMBER;
+669 Write(zombie->fd,':%s!%s@%s NICK %s',alive->nick,alive->ident,alive->host,zombie->nick);
+670 kill_link(alive,message.c_str());
+671 for (int i = 0; i != MAXCHANS; i++)
+672 {
+673 if (zombie->chans[i].channel != NULL)
+674 {
+675 if (zombie->chans[i].channel->name)
+676 {
+677 chanrec* Ptr = zombie->chans[i].channel;
+678 WriteFrom(zombie->fd,zombie,'JOIN %s',Ptr->name);
+679 if (Ptr->topicset)
+680 {
+681 WriteServ(zombie->fd,'332 %s %s :%s', zombie->nick, Ptr->name, Ptr->topic);
+682 WriteServ(zombie->fd,'333 %s %s %s %d', zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset);
+683 }
+684 userlist(zombie,Ptr);
+685 WriteServ(zombie->fd,'366 %s %s :End of /NAMES list.', zombie->nick, Ptr->name);
+686 //WriteServ(zombie->fd,'324 %s %s +%s',zombie->nick, Ptr->name,chanmodes(Ptr));
+687 //WriteServ(zombie->fd,'329 %s %s %d', zombie->nick, Ptr->name, Ptr->created);
+688
+689 }
+690 }
+691 }
+692
+693 }
.fi
.SS "void Server::QuitUser (\fBuserrec\fP * user, std::string reason)\fC [virtual]\fP"
.PP
@@ -842,65 +842,65 @@ Forces a user to quit with the specified reason. To the user, it will appear as
.PP
WARNING!
.PP
-Once you call this function, userrec* user will immediately become INVALID. You MUST NOT write to, or read from this pointer after calling the QuitUser method UNDER ANY CIRCUMSTANCES! The best course of action after calling this method is to immediately bail from your handler.Definition at line 474 of file modules.cpp.
+Once you call this function, userrec* user will immediately become INVALID. You MUST NOT write to, or read from this pointer after calling the QuitUser method UNDER ANY CIRCUMSTANCES! The best course of action after calling this method is to immediately bail from your handler.Definition at line 476 of file modules.cpp.
.PP
References userrec::nick, and send_network_quit().
.PP
.nf
-475 {
-476 send_network_quit(user->nick,reason.c_str());
-477 kill_link(user,reason.c_str());
-478 }
+477 {
+478 send_network_quit(user->nick,reason.c_str());
+479 kill_link(user,reason.c_str());
+480 }
.fi
.SS "void Server::Send (int Socket, std::string s)\fC [virtual]\fP"
.PP
-Sends a line of text down a TCP/IP socket. This method writes a line of text to an established socket, cutting it to 510 characters plus a carriage return and linefeed if required.Definition at line 505 of file modules.cpp.
+Sends a line of text down a TCP/IP socket. This method writes a line of text to an established socket, cutting it to 510 characters plus a carriage return and linefeed if required.Definition at line 507 of file modules.cpp.
.PP
.nf
-506 {
-507 Write(Socket,'%s',s.c_str());
-508 }
+508 {
+509 Write(Socket,'%s',s.c_str());
+510 }
.fi
.SS "void Server::SendChannel (\fBuserrec\fP * User, \fBchanrec\fP * Channel, std::string s, bool IncludeSender)\fC [virtual]\fP"
.PP
-Sends text from a user to a channel (mulicast). This method writes a line of text to a channel, with the given user's nick/ident /host combination prepended, as used in PRIVMSG etc commands (see RFC 1459). If the IncludeSender flag is set, then the text is also sent back to the user from which it originated, as seen in MODE (see RFC 1459).Definition at line 534 of file modules.cpp.
+Sends text from a user to a channel (mulicast). This method writes a line of text to a channel, with the given user's nick/ident /host combination prepended, as used in PRIVMSG etc commands (see RFC 1459). If the IncludeSender flag is set, then the text is also sent back to the user from which it originated, as seen in MODE (see RFC 1459).Definition at line 536 of file modules.cpp.
.PP
.nf
-535 {
-536 if (IncludeSender)
-537 {
-538 WriteChannel(Channel,User,'%s',s.c_str());
-539 }
-540 else
-541 {
-542 ChanExceptSender(Channel,User,'%s',s.c_str());
-543 }
-544 }
+537 {
+538 if (IncludeSender)
+539 {
+540 WriteChannel(Channel,User,'%s',s.c_str());
+541 }
+542 else
+543 {
+544 ChanExceptSender(Channel,User,'%s',s.c_str());
+545 }
+546 }
.fi
.SS "void Server::SendCommon (\fBuserrec\fP * User, std::string text, bool IncludeSender)\fC [virtual]\fP"
.PP
-Sends text from a user to one or more channels (mulicast). This method writes a line of text to all users which share a common channel with a given user, with the user's nick/ident/host combination prepended, as used in PRIVMSG etc commands (see RFC 1459). If the IncludeSender flag is set, then the text is also sent back to the user from which it originated, as seen in NICK (see RFC 1459). Otherwise, it is only sent to the other recipients, as seen in QUIT.Definition at line 551 of file modules.cpp.
+Sends text from a user to one or more channels (mulicast). This method writes a line of text to all users which share a common channel with a given user, with the user's nick/ident/host combination prepended, as used in PRIVMSG etc commands (see RFC 1459). If the IncludeSender flag is set, then the text is also sent back to the user from which it originated, as seen in NICK (see RFC 1459). Otherwise, it is only sent to the other recipients, as seen in QUIT.Definition at line 553 of file modules.cpp.
.PP
.nf
-552 {
-553 if (IncludeSender)
-554 {
-555 WriteCommon(User,'%s',text.c_str());
-556 }
-557 else
-558 {
-559 WriteCommonExcept(User,'%s',text.c_str());
-560 }
-561 }
+554 {
+555 if (IncludeSender)
+556 {
+557 WriteCommon(User,'%s',text.c_str());
+558 }
+559 else
+560 {
+561 WriteCommonExcept(User,'%s',text.c_str());
+562 }
+563 }
.fi
.SS "void Server::SendFrom (int Socket, \fBuserrec\fP * User, std::string s)\fC [virtual]\fP"
.PP
-Sends text from a user to a socket. This method writes a line of text to an established socket, with the given user's nick/ident /host combination prepended, as used in PRIVSG etc commands (see RFC 1459)Definition at line 515 of file modules.cpp.
+Sends text from a user to a socket. This method writes a line of text to an established socket, with the given user's nick/ident /host combination prepended, as used in PRIVSG etc commands (see RFC 1459)Definition at line 517 of file modules.cpp.
.PP
.nf
-516 {
-517 WriteFrom(Socket,User,'%s',s.c_str());
-518 }
+518 {
+519 WriteFrom(Socket,User,'%s',s.c_str());
+520 }
.fi
.SS "void Server::SendMode (char ** parameters, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP"
.PP
@@ -918,32 +918,32 @@ modes[2] = user->nick;
.PP
Srv->SendMode(modes,3,user);
.PP
-The modes will originate from the server where the command was issued, however responses (e.g. numerics) will be sent to the user you provide as the third parameter. You must be sure to get the number of parameters correct in the pcnt parameter otherwise you could leave your server in an unstable state!Definition at line 500 of file modules.cpp.
+The modes will originate from the server where the command was issued, however responses (e.g. numerics) will be sent to the user you provide as the third parameter. You must be sure to get the number of parameters correct in the pcnt parameter otherwise you could leave your server in an unstable state!Definition at line 502 of file modules.cpp.
.PP
References server_mode().
.PP
.nf
-501 {
-502 server_mode(parameters,pcnt,user);
-503 }
+503 {
+504 server_mode(parameters,pcnt,user);
+505 }
.fi
.SS "void Server::SendOpers (std::string s)\fC [virtual]\fP"
.PP
-Sends text to all opers. This method sends a server notice to all opers with the usermode +s.Definition at line 422 of file modules.cpp.
+Sends text to all opers. This method sends a server notice to all opers with the usermode +s.Definition at line 424 of file modules.cpp.
.PP
.nf
-423 {
-424 WriteOpers('%s',s.c_str());
-425 }
+425 {
+426 WriteOpers('%s',s.c_str());
+427 }
.fi
.SS "void Server::SendServ (int Socket, std::string s)\fC [virtual]\fP"
.PP
-Sends text from the server to a socket. This method writes a line of text to an established socket, with the servername prepended as used by numerics (see RFC 1459)Definition at line 510 of file modules.cpp.
+Sends text from the server to a socket. This method writes a line of text to an established socket, with the servername prepended as used by numerics (see RFC 1459)Definition at line 512 of file modules.cpp.
.PP
.nf
-511 {
-512 WriteServ(Socket,'%s',s.c_str());
-513 }
+513 {
+514 WriteServ(Socket,'%s',s.c_str());
+515 }
.fi
.SS "void Server::SendTo (\fBuserrec\fP * Source, \fBuserrec\fP * Dest, std::string s)\fC [virtual]\fP"
.PP
@@ -955,23 +955,23 @@ The format will become:
.PP
:localserver TEXT
.PP
-Which is useful for numerics and server notices to single users, etc.Definition at line 520 of file modules.cpp.
+Which is useful for numerics and server notices to single users, etc.Definition at line 522 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 }
+523 {
+524 if (!Source)
+525 {
+526 // if source is NULL, then the message originates from the local server
+527 Write(Dest->fd,':%s %s',this->GetServerName().c_str(),s.c_str());
+528 }
+529 else
+530 {
+531 // otherwise it comes from the user specified
+532 WriteTo(Source,Dest,'%s',s.c_str());
+533 }
+534 }
.fi
.SS "void Server::SendToModeMask (std::string modes, int flags, std::string text)\fC [virtual]\fP"
.PP
@@ -979,36 +979,36 @@ Sends to all users matching a mode mask You must specify one or more usermodes a
.PP
Serv->SendToModeMask('xi', WM_OR, 'm00');
.PP
-Then the text 'm00' will be sent to all users with EITHER mode x or i. Conversely if you used WM_AND, the user must have both modes set to receive the message.Definition at line 435 of file modules.cpp.
+Then the text 'm00' will be sent to all users with EITHER mode x or i. Conversely if you used WM_AND, the user must have both modes set to receive the message.Definition at line 437 of file modules.cpp.
.PP
.nf
-436 {
-437 WriteMode(modes.c_str(),flags,'%s',text.c_str());
-438 }
+438 {
+439 WriteMode(modes.c_str(),flags,'%s',text.c_str());
+440 }
.fi
.SS "void Server::SendWallops (\fBuserrec\fP * User, std::string text)\fC [virtual]\fP"
.PP
-Sends a WALLOPS message. This method writes a WALLOPS message to all users with the +w flag, originating from the specified user.Definition at line 563 of file modules.cpp.
+Sends a WALLOPS message. This method writes a WALLOPS message to all users with the +w flag, originating from the specified user.Definition at line 565 of file modules.cpp.
.PP
.nf
-564 {
-565 WriteWallOps(User,false,'%s',text.c_str());
-566 }
+566 {
+567 WriteWallOps(User,false,'%s',text.c_str());
+568 }
.fi
.SS "bool Server::UserToPseudo (\fBuserrec\fP * user, std::string message)\fC [virtual]\fP"
.PP
-Remove a user's connection to the irc server, but leave their client in existence in the user hash. 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.Definition at line 654 of file modules.cpp.
+Remove a user's connection to the irc server, but leave their client in existence in the user hash. 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.Definition at line 656 of file modules.cpp.
.PP
References connection::fd, FD_MAGIC_NUMBER, connection::host, and userrec::ident.
.PP
.nf
-655 {
-656 unsigned int old_fd = user->fd;
-657 user->fd = FD_MAGIC_NUMBER;
-658 Write(old_fd,'ERROR :Closing link (%s@%s) [%s]',user->ident,user->host,message.c_str());
-659 close(old_fd);
-660 shutdown (old_fd,2);
-661 }
+657 {
+658 unsigned int old_fd = user->fd;
+659 user->fd = FD_MAGIC_NUMBER;
+660 Write(old_fd,'ERROR :Closing link (%s@%s) [%s]',user->ident,user->host,message.c_str());
+661 close(old_fd);
+662 shutdown (old_fd,2);
+663 }
.fi
diff --git a/docs/man/man3/StrHashComp.3 b/docs/man/man3/StrHashComp.3
index 1c6c04405..bcdf74124 100644
--- a/docs/man/man3/StrHashComp.3
+++ b/docs/man/man3/StrHashComp.3
@@ -1,4 +1,4 @@
-.TH "StrHashComp" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "StrHashComp" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/Version.3 b/docs/man/man3/Version.3
index 245c2b184..2c0ed2ead 100644
--- a/docs/man/man3/Version.3
+++ b/docs/man/man3/Version.3
@@ -1,4 +1,4 @@
-.TH "Version" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "Version" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/XLine.3 b/docs/man/man3/XLine.3
index cb8a54538..caad829bc 100644
--- a/docs/man/man3/XLine.3
+++ b/docs/man/man3/XLine.3
@@ -1,4 +1,4 @@
-.TH "XLine" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "XLine" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/ZLine.3 b/docs/man/man3/ZLine.3
index 3ce871a94..e350adf0e 100644
--- a/docs/man/man3/ZLine.3
+++ b/docs/man/man3/ZLine.3
@@ -1,4 +1,4 @@
-.TH "ZLine" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "ZLine" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/base.h.3 b/docs/man/man3/base.h.3
index 5d513596e..bceb6d795 100644
--- a/docs/man/man3/base.h.3
+++ b/docs/man/man3/base.h.3
@@ -1,4 +1,4 @@
-.TH "base.h" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "base.h" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/channels.cpp.3 b/docs/man/man3/channels.cpp.3
index cba651bbc..c1cbe6acb 100644
--- a/docs/man/man3/channels.cpp.3
+++ b/docs/man/man3/channels.cpp.3
@@ -1,4 +1,4 @@
-.TH "channels.cpp" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "channels.cpp" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -271,7 +271,7 @@ Definition at line 88 of file channels.cpp.
Definition at line 103 of file channels.cpp.
.SS "int \fBMODCOUNT\fP = -1"
.PP
-Definition at line 1030 of file modules.cpp.
+Definition at line 1032 of file modules.cpp.
.PP
Referenced by Server::FindModule().
.SS "std::vector<std::string> \fBmodule_names\fP"
diff --git a/docs/man/man3/channels.h.3 b/docs/man/man3/channels.h.3
index 028883c6d..5d6c7051e 100644
--- a/docs/man/man3/channels.h.3
+++ b/docs/man/man3/channels.h.3
@@ -1,4 +1,4 @@
-.TH "channels.h" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "channels.h" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -88,19 +88,19 @@ channels.h \-
.PP
.SS "#define UCMODE_FOUNDER 16"
.PP
-Definition at line 195 of file channels.h.
+Definition at line 250 of file channels.h.
.SS "#define UCMODE_HOP 4"
.PP
-Definition at line 193 of file channels.h.
+Definition at line 248 of file channels.h.
.SS "#define UCMODE_OP 1"
.PP
-Definition at line 191 of file channels.h.
+Definition at line 246 of file channels.h.
.SS "#define UCMODE_PROTECT 8"
.PP
-Definition at line 194 of file channels.h.
+Definition at line 249 of file channels.h.
.SS "#define UCMODE_VOICE 2"
.PP
-Definition at line 192 of file channels.h.
+Definition at line 247 of file channels.h.
.SH "Typedef Documentation"
.PP
.SS "typedef std::vector<\fBBanItem\fP> \fBBanList\fP"
diff --git a/docs/man/man3/chanrec.3 b/docs/man/man3/chanrec.3
index 5c9d0d9c4..80b5db18d 100644
--- a/docs/man/man3/chanrec.3
+++ b/docs/man/man3/chanrec.3
@@ -1,4 +1,4 @@
-.TH "chanrec" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "chanrec" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -32,6 +32,30 @@ Inherits \fBExtensible\fP.
.br
.RI "\fIReturns the parameter for a custom mode on a channel. \fP"
.ti -1c
+.RI "void \fBIncUserCounter\fP ()"
+.br
+.RI "\fIIncrement the channel 'user counter' The channel user counter is a reference counter which holds the number of users on the channel. \fP"
+.ti -1c
+.RI "void \fBDecUserCounter\fP ()"
+.br
+.RI "\fIDecrement the channel 'user counter' The channel user counter is a reference counter which holds the number of users on the channel. \fP"
+.ti -1c
+.RI "long \fBGetUserCounter\fP ()"
+.br
+.RI "\fIObtain the channel 'user counter' This returns the channel reference counter, which is initialized to 0 when the channel is created and incremented/decremented upon joins, parts quits and kicks. \fP"
+.ti -1c
+.RI "void \fBAddUser\fP (char *castuser)"
+.br
+.RI "\fIAdd a user pointer to the internal reference list The data inserted into the reference list is a table as it is an arbitary pointer compared to other users by its memory address, as this is a very fast 32 or 64 bit integer comparison. \fP"
+.ti -1c
+.RI "void \fBDelUser\fP (char *castuser)"
+.br
+.RI "\fIDelete a user pointer to the internal reference list The data removed from the reference list is a table as it is an arbitary pointer compared to other users by its memory address, as this is a very fast 32 or 64 bit integer comparison. \fP"
+.ti -1c
+.RI "std::vector< char * > * \fBGetUsers\fP ()"
+.br
+.RI "\fIObrain the internal reference list The internal reference list contains a list of userrec* cast to char*. \fP"
+.ti -1c
.RI "\fBchanrec\fP ()"
.br
.RI "\fICreates a channel record and initialises it with default values. \fP"
@@ -51,6 +75,14 @@ Inherits \fBExtensible\fP.
.br
.RI "\fICustom modes for the channel. \fP"
.ti -1c
+.RI "long \fBusers\fP"
+.br
+.RI "\fICount of users on the channel used for fast user counting. \fP"
+.ti -1c
+.RI "std::vector< char * > \fBinternal_userlist\fP"
+.br
+.RI "\fIUser list (casted to char*'s to stop forward declaration stuff) (chicken and egg scenario!). \fP"
+.ti -1c
.RI "char \fBtopic\fP [MAXBUF]"
.br
.RI "\fIChannel topic. \fP"
@@ -116,7 +148,7 @@ Definition at line 94 of file channels.h.
.PP
Creates a channel record and initialises it with default values. Definition at line 113 of file channels.cpp.
.PP
-References c_private, created, custom_modes, inviteonly, key, limit, moderated, name, noexternal, secret, setby, topic, topiclock, and topicset.
+References c_private, created, custom_modes, internal_userlist, inviteonly, key, limit, moderated, name, noexternal, secret, setby, topic, topiclock, topicset, and users.
.PP
.nf
114 {
@@ -125,134 +157,214 @@ References c_private, created, custom_modes, inviteonly, key, limit, moderated,
117 strcpy(topic,'');
118 strcpy(setby,'');
119 strcpy(key,'');
-120 created = topicset = limit = 0;
+120 created = topicset = limit = users = 0;
121 topiclock = noexternal = inviteonly = moderated = secret = c_private = false;
-122 }
+122 internal_userlist.clear();
+123 }
.fi
.SS "virtual chanrec::~\fBchanrec\fP ()\fC [inline, virtual]\fP"
.PP
-Definition at line 185 of file channels.h.
+Definition at line 240 of file channels.h.
.PP
.nf
-185 { /* stub */ }
+240 { /* stub */ }
.fi
.SH "Member Function Documentation"
.PP
+.SS "void chanrec::AddUser (char * castuser)"
+.PP
+Add a user pointer to the internal reference list The data inserted into the reference list is a table as it is an arbitary pointer compared to other users by its memory address, as this is a very fast 32 or 64 bit integer comparison. Definition at line 220 of file channels.cpp.
+.PP
+References DEBUG, and internal_userlist.
+.PP
+.nf
+221 {
+222 internal_userlist.push_back(castuser);
+223 log(DEBUG,'Added casted user to channel's internal list');
+224 }
+.fi
+.SS "void chanrec::DecUserCounter ()"
+.PP
+Decrement the channel 'user counter' The channel user counter is a reference counter which holds the number of users on the channel. If it decremented to 0 then the channel is removed from the system. Modules may alter the reference count to hold channels open which have no users and would normally be deleted once empty.Definition at line 208 of file channels.cpp.
+.PP
+References DEBUG, name, and users.
+.PP
+.nf
+209 {
+210 if (this->users > 0)
+211 this->users--;
+212 log(DEBUG,'Decremented channel user count for %s to %lu',name,(unsigned long)users);
+213 }
+.fi
+.SS "void chanrec::DelUser (char * castuser)"
+.PP
+Delete a user pointer to the internal reference list The data removed from the reference list is a table as it is an arbitary pointer compared to other users by its memory address, as this is a very fast 32 or 64 bit integer comparison. Definition at line 226 of file channels.cpp.
+.PP
+References DEBUG, internal_userlist, and name.
+.PP
+.nf
+227 {
+228 for (std::vector<char*>::iterator a = internal_userlist.begin(); a < internal_userlist.end(); a++)
+229 {
+230 if (*a == castuser)
+231 {
+232 log(DEBUG,'Removed casted user from channel's internal list');
+233 internal_userlist.erase(a);
+234 return;
+235 }
+236 }
+237 log(DEBUG,'BUG BUG BUG! Attempt to remove an uncasted user from the internal list of %s!',name);
+238 }
+.fi
.SS "std::string chanrec::GetModeParameter (char mode)"
.PP
-Returns the parameter for a custom mode on a channel. For example if '+L #foo' is set, and you pass this method 'L', it will return '#foo'. If the mode is not set on the channel, or the mode has no parameters associated with it, it will return an empty string.Definition at line 186 of file channels.cpp.
+Returns the parameter for a custom mode on a channel. For example if '+L #foo' is set, and you pass this method 'L', it will return '#foo'. If the mode is not set on the channel, or the mode has no parameters associated with it, it will return an empty string.Definition at line 187 of file channels.cpp.
.PP
References custom_mode_params.
.PP
.nf
-187 {
-188 if (custom_mode_params.size())
-189 {
-190 for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++)
-191 {
-192 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
-193 {
-194 return std::string(i->parameter);
-195 }
-196 }
-197 }
-198 return std::string('');
-199 }
+188 {
+189 if (custom_mode_params.size())
+190 {
+191 for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++)
+192 {
+193 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
+194 {
+195 return std::string(i->parameter);
+196 }
+197 }
+198 }
+199 return std::string('');
+200 }
+.fi
+.SS "long chanrec::GetUserCounter ()"
+.PP
+Obtain the channel 'user counter' This returns the channel reference counter, which is initialized to 0 when the channel is created and incremented/decremented upon joins, parts quits and kicks. Definition at line 215 of file channels.cpp.
+.PP
+References users.
+.PP
+.nf
+216 {
+217 return (this->users);
+218 }
+.fi
+.SS "std::vector< char * > * chanrec::GetUsers ()"
+.PP
+Obrain the internal reference list The internal reference list contains a list of userrec* cast to char*. These are used for rapid comparison to determine channel membership for PRIVMSG, NOTICE, QUIT, PART etc. The resulting pointer to the vector should be considered readonly and only modified via AddUser and DelUser.Definition at line 240 of file channels.cpp.
+.PP
+References internal_userlist.
+.PP
+.nf
+241 {
+242 return &internal_userlist;
+243 }
+.fi
+.SS "void chanrec::IncUserCounter ()"
+.PP
+Increment the channel 'user counter' The channel user counter is a reference counter which holds the number of users on the channel. If it decremented to 0 then the channel is removed from the system.Definition at line 202 of file channels.cpp.
+.PP
+References DEBUG, name, and users.
+.PP
+.nf
+203 {
+204 this->users++;
+205 log(DEBUG,'Incremented channel user count for %s to %lu',name,(unsigned long)users);
+206 }
.fi
.SS "bool chanrec::IsCustomModeSet (char mode)"
.PP
-Returns true if a custom mode is set on a channel. Definition at line 180 of file channels.cpp.
+Returns true if a custom mode is set on a channel. Definition at line 181 of file channels.cpp.
.PP
References DEBUG.
.PP
.nf
-181 {
-182 log(DEBUG,'Checking ISCustomModeSet: %c %s',mode,this->custom_modes);
-183 return (strchr(this->custom_modes,mode) != 0);
-184 }
+182 {
+183 log(DEBUG,'Checking ISCustomModeSet: %c %s',mode,this->custom_modes);
+184 return (strchr(this->custom_modes,mode) != 0);
+185 }
.fi
.SS "void chanrec::SetCustomMode (char mode, bool mode_on)"
.PP
-Sets or unsets a custom mode in the channels info. Definition at line 124 of file channels.cpp.
+Sets or unsets a custom mode in the channels info. Definition at line 125 of file channels.cpp.
.PP
References custom_modes, DEBUG, and SetCustomModeParam().
.PP
.nf
-125 {
-126 if (mode_on) {
-127 char m[3];
-128 m[0] = mode;
-129 m[1] = '\0';
-130 if (!strchr(this->custom_modes,mode))
-131 {
-132 strlcat(custom_modes,m,MAXMODES);
-133 }
-134 log(DEBUG,'Custom mode %c set',mode);
-135 }
-136 else {
-137
-138 std::string a = this->custom_modes;
-139 int pos = a.find(mode);
-140 a.erase(pos,1);
-141 strncpy(this->custom_modes,a.c_str(),MAXMODES);
-142
-143 log(DEBUG,'Custom mode %c removed: modelist='%s'',mode,this->custom_modes);
-144 this->SetCustomModeParam(mode,'',false);
-145 }
-146 }
+126 {
+127 if (mode_on) {
+128 char m[3];
+129 m[0] = mode;
+130 m[1] = '\0';
+131 if (!strchr(this->custom_modes,mode))
+132 {
+133 strlcat(custom_modes,m,MAXMODES);
+134 }
+135 log(DEBUG,'Custom mode %c set',mode);
+136 }
+137 else {
+138
+139 std::string a = this->custom_modes;
+140 int pos = a.find(mode);
+141 a.erase(pos,1);
+142 strncpy(this->custom_modes,a.c_str(),MAXMODES);
+143
+144 log(DEBUG,'Custom mode %c removed: modelist='%s'',mode,this->custom_modes);
+145 this->SetCustomModeParam(mode,'',false);
+146 }
+147 }
.fi
.SS "void chanrec::SetCustomModeParam (char mode, char * parameter, bool mode_on)"
.PP
-Sets or unsets the parameters for a custom mode in a channels info. Definition at line 149 of file channels.cpp.
+Sets or unsets the parameters for a custom mode in a channels info. Definition at line 150 of file channels.cpp.
.PP
References ModeParameter::channel, custom_mode_params, DEBUG, ModeParameter::mode, and ModeParameter::parameter.
.PP
Referenced by SetCustomMode().
.PP
.nf
-150 {
-151
-152 log(DEBUG,'SetCustomModeParam called');
-153 ModeParameter M;
-154 M.mode = mode;
-155 strlcpy(M.channel,this->name,CHANMAX);
-156 strlcpy(M.parameter,parameter,MAXBUF);
-157 if (mode_on)
-158 {
-159 log(DEBUG,'Custom mode parameter %c %s added',mode,parameter);
-160 custom_mode_params.push_back(M);
-161 }
-162 else
-163 {
-164 if (custom_mode_params.size())
-165 {
-166 for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++)
-167 {
-168 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
-169 {
-170 log(DEBUG,'Custom mode parameter %c %s removed',mode,parameter);
-171 custom_mode_params.erase(i);
-172 return;
-173 }
-174 }
-175 }
-176 log(DEBUG,'*** BUG *** Attempt to remove non-existent mode parameter!');
-177 }
-178 }
+151 {
+152
+153 log(DEBUG,'SetCustomModeParam called');
+154 ModeParameter M;
+155 M.mode = mode;
+156 strlcpy(M.channel,this->name,CHANMAX);
+157 strlcpy(M.parameter,parameter,MAXBUF);
+158 if (mode_on)
+159 {
+160 log(DEBUG,'Custom mode parameter %c %s added',mode,parameter);
+161 custom_mode_params.push_back(M);
+162 }
+163 else
+164 {
+165 if (custom_mode_params.size())
+166 {
+167 for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++)
+168 {
+169 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
+170 {
+171 log(DEBUG,'Custom mode parameter %c %s removed',mode,parameter);
+172 custom_mode_params.erase(i);
+173 return;
+174 }
+175 }
+176 }
+177 log(DEBUG,'*** BUG *** Attempt to remove non-existent mode parameter!');
+178 }
+179 }
.fi
.SH "Member Data Documentation"
.PP
.SS "\fBBanList\fP \fBchanrec::bans\fP"
.PP
-The list of all bans set on the channel. Definition at line 159 of file channels.h.
+The list of all bans set on the channel. Definition at line 168 of file channels.h.
.SS "short int \fBchanrec::c_private\fP"
.PP
-Nonzero if the mode +p is set. This value cannot be set at the same time as \fBchanrec::secret\fPDefinition at line 155 of file channels.h.
+Nonzero if the mode +p is set. This value cannot be set at the same time as \fBchanrec::secret\fPDefinition at line 164 of file channels.h.
.PP
Referenced by chanrec().
.SS "time_t \fBchanrec::created\fP"
.PP
-Creation time. Definition at line 111 of file channels.h.
+Creation time. Definition at line 120 of file channels.h.
.PP
Referenced by chanrec().
.SS "char \fBchanrec::custom_modes\fP[MAXMODES]"
@@ -260,61 +372,71 @@ Referenced by chanrec().
Custom modes for the channel. Plugins may use this field in any way they see fit.Definition at line 103 of file channels.h.
.PP
Referenced by chanrec(), and SetCustomMode().
+.SS "std::vector<char*> \fBchanrec::internal_userlist\fP"
+.PP
+User list (casted to char*'s to stop forward declaration stuff) (chicken and egg scenario!). Definition at line 112 of file channels.h.
+.PP
+Referenced by AddUser(), chanrec(), DelUser(), and GetUsers().
.SS "short int \fBchanrec::inviteonly\fP"
.PP
-Nonzero if the mode +i is set. Definition at line 141 of file channels.h.
+Nonzero if the mode +i is set. Definition at line 150 of file channels.h.
.PP
Referenced by chanrec().
.SS "char \fBchanrec::key\fP[32]"
.PP
-Contains the channel key. If this value is an empty string, there is no channel key in place.Definition at line 129 of file channels.h.
+Contains the channel key. If this value is an empty string, there is no channel key in place.Definition at line 138 of file channels.h.
.PP
Referenced by chanrec().
.SS "long \fBchanrec::limit\fP"
.PP
-Contains the channel user limit. If this value is zero, there is no limit in place.Definition at line 124 of file channels.h.
+Contains the channel user limit. If this value is zero, there is no limit in place.Definition at line 133 of file channels.h.
.PP
Referenced by chanrec().
.SS "short int \fBchanrec::moderated\fP"
.PP
-Nonzero if the mode +m is set. Definition at line 145 of file channels.h.
+Nonzero if the mode +m is set. Definition at line 154 of file channels.h.
.PP
Referenced by chanrec().
.SS "char \fBchanrec::name\fP[CHANMAX]"
.PP
The channels name. Definition at line 99 of file channels.h.
.PP
-Referenced by chanrec(), and Server::PseudoToUser().
+Referenced by chanrec(), DecUserCounter(), DelUser(), IncUserCounter(), and Server::PseudoToUser().
.SS "short int \fBchanrec::noexternal\fP"
.PP
-Nonzero if the mode +n is set. Definition at line 137 of file channels.h.
+Nonzero if the mode +n is set. Definition at line 146 of file channels.h.
.PP
Referenced by chanrec().
.SS "short int \fBchanrec::secret\fP"
.PP
-Nonzero if the mode +s is set. This value cannot be set at the same time as \fBchanrec::c_private\fPDefinition at line 150 of file channels.h.
+Nonzero if the mode +s is set. This value cannot be set at the same time as \fBchanrec::c_private\fPDefinition at line 159 of file channels.h.
.PP
Referenced by chanrec().
.SS "char \fBchanrec::setby\fP[NICKMAX]"
.PP
-The last user to set the topic. If this member is an empty string, no topic was ever set.Definition at line 119 of file channels.h.
+The last user to set the topic. If this member is an empty string, no topic was ever set.Definition at line 128 of file channels.h.
.PP
Referenced by chanrec(), and Server::PseudoToUser().
.SS "char \fBchanrec::topic\fP[MAXBUF]"
.PP
-Channel topic. If this is an empty string, no channel topic is set.Definition at line 108 of file channels.h.
+Channel topic. If this is an empty string, no channel topic is set.Definition at line 117 of file channels.h.
.PP
Referenced by chanrec(), and Server::PseudoToUser().
.SS "short int \fBchanrec::topiclock\fP"
.PP
-Nonzero if the mode +t is set. Definition at line 133 of file channels.h.
+Nonzero if the mode +t is set. Definition at line 142 of file channels.h.
.PP
Referenced by chanrec().
.SS "time_t \fBchanrec::topicset\fP"
.PP
-Time topic was set. If no topic was ever set, this will be equal to \fBchanrec::created\fPDefinition at line 115 of file channels.h.
+Time topic was set. If no topic was ever set, this will be equal to \fBchanrec::created\fPDefinition at line 124 of file channels.h.
.PP
Referenced by chanrec(), and Server::PseudoToUser().
+.SS "long \fBchanrec::users\fP"
+.PP
+Count of users on the channel used for fast user counting. Definition at line 107 of file channels.h.
+.PP
+Referenced by chanrec(), DecUserCounter(), GetUserCounter(), and IncUserCounter().
.SH "Author"
.PP
diff --git a/docs/man/man3/classbase.3 b/docs/man/man3/classbase.3
index a8299e1f5..aa5dbd61e 100644
--- a/docs/man/man3/classbase.3
+++ b/docs/man/man3/classbase.3
@@ -1,4 +1,4 @@
-.TH "classbase" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "classbase" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/command_t.3 b/docs/man/man3/command_t.3
index ba965234c..b826865e6 100644
--- a/docs/man/man3/command_t.3
+++ b/docs/man/man3/command_t.3
@@ -1,4 +1,4 @@
-.TH "command_t" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "command_t" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/commands.h.3 b/docs/man/man3/commands.h.3
index 27fa66676..7f72427e7 100644
--- a/docs/man/man3/commands.h.3
+++ b/docs/man/man3/commands.h.3
@@ -1,4 +1,4 @@
-.TH "commands.h" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "commands.h" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/connection.3 b/docs/man/man3/connection.3
index d1e4e7e63..ca2a69951 100644
--- a/docs/man/man3/connection.3
+++ b/docs/man/man3/connection.3
@@ -1,4 +1,4 @@
-.TH "connection" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "connection" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -30,7 +30,7 @@ Inherited by \fBserverrec\fP, and \fBuserrec\fP.
.br
.RI "\fIBegin an outbound link to another ircd at targethost. \fP"
.ti -1c
-.RI "bool \fBMeshCookie\fP (char *targethost, int \fBport\fP, long cookie, char *servername)"
+.RI "bool \fBMeshCookie\fP (char *targethost, int \fBport\fP, unsigned long cookie, char *servername)"
.br
.RI "\fIBegin an outbound mesh link to another ircd on a network you are already an authenticated member of. \fP"
.ti -1c
@@ -140,7 +140,7 @@ Inherited by \fBserverrec\fP, and \fBuserrec\fP.
.in -1c
.SH "Detailed Description"
.PP
-Please note: classes serverrec and userrec both inherit from class connection. Definition at line 166 of file connection.h.
+Please note: classes serverrec and userrec both inherit from class connection. Definition at line 178 of file connection.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "connection::connection ()"
@@ -163,7 +163,7 @@ Find the \fBircd_connector\fP oject related to a certain servername given in 'ho
.SS "long connection::GenKey ()"
.PP
This function is deprecated and may be removed in a later alpha/beta.
-.SS "bool connection::MeshCookie (char * targethost, int port, long cookie, char * servername)"
+.SS "bool connection::MeshCookie (char * targethost, int port, unsigned long cookie, char * servername)"
.PP
Begin an outbound mesh link to another ircd on a network you are already an authenticated member of.
.SS "bool connection::RecvPacket (std::deque< std::string > & messages, char * host)"
@@ -179,91 +179,91 @@ Terminate a link to 'targethost' by calling the \fBircd_connector::CloseConnecti
.PP
.SS "long \fBconnection::bytes_in\fP"
.PP
-Stats counter for bytes inbound. Definition at line 187 of file connection.h.
+Stats counter for bytes inbound. Definition at line 199 of file connection.h.
.PP
Referenced by userrec::userrec().
.SS "long \fBconnection::bytes_out\fP"
.PP
-Stats counter for bytes outbound. Definition at line 191 of file connection.h.
+Stats counter for bytes outbound. Definition at line 203 of file connection.h.
.PP
Referenced by userrec::userrec().
.SS "long \fBconnection::cmds_in\fP"
.PP
-Stats counter for commands inbound. Definition at line 195 of file connection.h.
+Stats counter for commands inbound. Definition at line 207 of file connection.h.
.PP
Referenced by userrec::userrec().
.SS "long \fBconnection::cmds_out\fP"
.PP
-Stats counter for commands outbound. Definition at line 199 of file connection.h.
+Stats counter for commands outbound. Definition at line 211 of file connection.h.
.PP
Referenced by userrec::userrec().
.SS "std::vector<\fBircd_connector\fP> \fBconnection::connectors\fP"
.PP
-With a serverrec, this is a list of all established server connections. With a userrec this is unused.Definition at line 246 of file connection.h.
+With a serverrec, this is a list of all established server connections. With a userrec this is unused.Definition at line 258 of file connection.h.
.SS "int \fBconnection::fd\fP"
.PP
-File descriptor of the connection. Definition at line 171 of file connection.h.
+File descriptor of the connection. Definition at line 183 of file connection.h.
.PP
Referenced by ConfigReader::DumpErrors(), Server::PseudoToUser(), Server::SendTo(), serverrec::serverrec(), userrec::userrec(), and Server::UserToPseudo().
.SS "bool \fBconnection::haspassed\fP"
.PP
-True if server/user has authenticated, false if otherwise. Definition at line 203 of file connection.h.
+True if server/user has authenticated, false if otherwise. Definition at line 215 of file connection.h.
.PP
Referenced by userrec::userrec().
.SS "char \fBconnection::host\fP[256]"
.PP
-Hostname of connection. Not used if this is a serverrecDefinition at line 175 of file connection.h.
+Hostname of connection. Not used if this is a serverrecDefinition at line 187 of file connection.h.
.PP
Referenced by userrec::GetFullRealHost(), Server::PseudoToUser(), userrec::userrec(), and Server::UserToPseudo().
.SS "time_t \fBconnection::idle_lastmsg\fP"
.PP
-Time that the connection last sent data, used to calculate idle time. Definition at line 229 of file connection.h.
+Time that the connection last sent data, used to calculate idle time. Definition at line 241 of file connection.h.
.PP
Referenced by userrec::userrec().
.SS "char \fBconnection::inbuf\fP[MAXBUF]"
.PP
-Inbuf of connection. Only used for userrecDefinition at line 183 of file connection.h.
+Inbuf of connection. Only used for userrecDefinition at line 195 of file connection.h.
.PP
Referenced by userrec::userrec().
.SS "char \fBconnection::internal_addr\fP[MAXBUF]"
.PP
-Unused, will be removed in a future alpha/beta. Definition at line 237 of file connection.h.
+Unused, will be removed in a future alpha/beta. Definition at line 249 of file connection.h.
.SS "int \fBconnection::internal_port\fP"
.PP
-Unused, will be removed in a future alpha/beta. Definition at line 241 of file connection.h.
+Unused, will be removed in a future alpha/beta. Definition at line 253 of file connection.h.
.SS "char \fBconnection::ip\fP[32]"
.PP
-IP of connection. Reserved for future use.Definition at line 179 of file connection.h.
+IP of connection. Reserved for future use.Definition at line 191 of file connection.h.
.PP
Referenced by userrec::userrec().
.SS "time_t \fBconnection::lastping\fP"
.PP
-Time the connection was last pinged. Definition at line 221 of file connection.h.
+Time the connection was last pinged. Definition at line 233 of file connection.h.
.PP
Referenced by serverrec::serverrec(), and userrec::userrec().
.SS "time_t \fBconnection::nping\fP"
.PP
-Used by PING checks with clients. Definition at line 233 of file connection.h.
+Used by PING checks with clients. Definition at line 245 of file connection.h.
.PP
Referenced by userrec::userrec().
.SS "int \fBconnection::port\fP"
.PP
-Port number For a userrec, this is the port they connected to the network on. For a serverrec this is the current listening port of the serverrec object.Definition at line 209 of file connection.h.
+Port number For a userrec, this is the port they connected to the network on. For a serverrec this is the current listening port of the serverrec object.Definition at line 221 of file connection.h.
.PP
Referenced by userrec::userrec().
.SS "int \fBconnection::registered\fP"
.PP
-Used by userrec to indicate the registration status of the connection. Definition at line 213 of file connection.h.
+Used by userrec to indicate the registration status of the connection. Definition at line 225 of file connection.h.
.PP
Referenced by userrec::userrec().
.SS "time_t \fBconnection::signon\fP"
.PP
-Time the connection was created, set in the constructor. Definition at line 225 of file connection.h.
+Time the connection was created, set in the constructor. Definition at line 237 of file connection.h.
.PP
Referenced by serverrec::serverrec(), and userrec::userrec().
.SS "short int \fBconnection::state\fP"
.PP
-Reserved for future use. Definition at line 217 of file connection.h.
+Reserved for future use. Definition at line 229 of file connection.h.
.SH "Author"
.PP
diff --git a/docs/man/man3/connection.h.3 b/docs/man/man3/connection.h.3
index e57b5cede..b0d6374fc 100644
--- a/docs/man/man3/connection.h.3
+++ b/docs/man/man3/connection.h.3
@@ -1,4 +1,4 @@
-.TH "connection.h" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "connection.h" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -32,6 +32,8 @@ connection.h \-
.br
\fC#include <deque>\fP
.br
+\fC#include <sstream>\fP
+.br
.SS "Compounds"
@@ -71,22 +73,22 @@ connection.h \-
.PP
.SS "#define STATE_CONNECTED 1"
.PP
-Definition at line 35 of file connection.h.
+Definition at line 36 of file connection.h.
.SS "#define STATE_DISCONNECTED 0"
.PP
-Definition at line 34 of file connection.h.
+Definition at line 35 of file connection.h.
.SS "#define STATE_NOAUTH_INBOUND 3"
.PP
-Definition at line 37 of file connection.h.
+Definition at line 38 of file connection.h.
.SS "#define STATE_NOAUTH_OUTBOUND 4"
.PP
-Definition at line 38 of file connection.h.
+Definition at line 39 of file connection.h.
.SS "#define STATE_SERVICES 5"
.PP
-Definition at line 39 of file connection.h.
+Definition at line 40 of file connection.h.
.SS "#define STATE_SYNC 2"
.PP
-Definition at line 36 of file connection.h.
+Definition at line 37 of file connection.h.
.SH "Author"
.PP
Generated automatically by Doxygen for InspIRCd from the source code.
diff --git a/docs/man/man3/ctables.h.3 b/docs/man/man3/ctables.h.3
index cf8d86cc3..6541dbb1a 100644
--- a/docs/man/man3/ctables.h.3
+++ b/docs/man/man3/ctables.h.3
@@ -1,4 +1,4 @@
-.TH "ctables.h" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "ctables.h" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/dns.h.3 b/docs/man/man3/dns.h.3
index 508f04cff..3b7155194 100644
--- a/docs/man/man3/dns.h.3
+++ b/docs/man/man3/dns.h.3
@@ -1,4 +1,4 @@
-.TH "dns.h" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "dns.h" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/dns_ip4list.3 b/docs/man/man3/dns_ip4list.3
index 756ce99df..f850d584a 100644
--- a/docs/man/man3/dns_ip4list.3
+++ b/docs/man/man3/dns_ip4list.3
@@ -1,4 +1,4 @@
-.TH "dns_ip4list" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "dns_ip4list" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/ircd_connector.3 b/docs/man/man3/ircd_connector.3
index 9a47718e0..5c9e3016b 100644
--- a/docs/man/man3/ircd_connector.3
+++ b/docs/man/man3/ircd_connector.3
@@ -1,4 +1,4 @@
-.TH "ircd_connector" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "ircd_connector" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -16,7 +16,7 @@ Inherits \fBExtensible\fP.
.in +1c
.ti -1c
-.RI "bool \fBMakeOutboundConnection\fP (char *\fBhost\fP, int \fBport\fP)"
+.RI "bool \fBMakeOutboundConnection\fP (char *newhost, int newport)"
.br
.RI "\fICreate an outbound connection to a listening socket. \fP"
.ti -1c
@@ -64,18 +64,34 @@ Inherits \fBExtensible\fP.
.br
.RI "\fISet the port used by this connection. \fP"
.ti -1c
-.RI "bool \fBSetHostAndPort\fP (char *\fBhost\fP, int \fBport\fP)"
+.RI "bool \fBSetHostAndPort\fP (char *newhost, int newport)"
.br
.RI "\fISet both the host and the port in one operation for this connection. \fP"
.ti -1c
.RI "void \fBCloseConnection\fP ()"
.br
.RI "\fIClose the connection by calling close() on its file descriptor This function call updates no other data. \fP"
+.ti -1c
+.RI "void \fBAddBuffer\fP (std::string a)"
+.br
+.ti -1c
+.RI "bool \fBBufferIsComplete\fP ()"
+.br
+.ti -1c
+.RI "void \fBClearBuffer\fP ()"
+.br
+.ti -1c
+.RI "std::string \fBGetBuffer\fP ()"
+.br
.in -1c
.SS "Public Attributes"
.in +1c
.ti -1c
+.RI "std::string \fBircdbuffer\fP"
+.br
+.RI "\fIIRCD Buffer for input characters, holds one line. \fP"
+.ti -1c
.RI "char \fBhost\fP [MAXBUF]"
.br
.RI "\fIWhen MakeOutboundConnection is called, these public members are filled with the details passed to the function, for future reference. \fP"
@@ -126,12 +142,20 @@ Each connection has one or more of these each represents ONE outbound connection
A listening socket that accepts server type connections is represented by one class serverrec. Class serverrec will instantiate several objects of type ircd_connector to represent each established connection, inbound or outbound. So, to determine all linked servers you must walk through all the serverrecs that the core defines, and in each one iterate through until you find connection(s) relating to the server you want information on. The core and module API provide functions for this.
.PP
-Definition at line 53 of file connection.h.
+Definition at line 54 of file connection.h.
.SH "Member Function Documentation"
.PP
+.SS "void ircd_connector::AddBuffer (std::string a)"
+.PP
+.SS "bool ircd_connector::BufferIsComplete ()"
+.PP
+.SS "void ircd_connector::ClearBuffer ()"
+.PP
.SS "void ircd_connector::CloseConnection ()"
.PP
Close the connection by calling close() on its file descriptor This function call updates no other data.
+.SS "std::string ircd_connector::GetBuffer ()"
+.PP
.SS "std::string ircd_connector::GetDescription ()"
.PP
Get the server description of this connection.
@@ -150,7 +174,7 @@ Get the port number being used for this connection If the connection is outbound
.SS "int ircd_connector::GetState ()"
.PP
Get the state flags for this connection.
-.SS "bool ircd_connector::MakeOutboundConnection (char * host, int port)"
+.SS "bool ircd_connector::MakeOutboundConnection (char * newhost, int newport)"
.PP
Create an outbound connection to a listening socket.
.SS "void ircd_connector::SetDescription (std::string desc)"
@@ -162,7 +186,7 @@ Set the file descriptor for this connection.
.SS "bool ircd_connector::SetHostAddress (char * host, int port)\fC [private]\fP"
.PP
PRIVATE function to set the host address and port to connect to.
-.SS "bool ircd_connector::SetHostAndPort (char * host, int port)"
+.SS "bool ircd_connector::SetHostAndPort (char * newhost, int newport)"
.PP
Set both the host and the port in one operation for this connection.
.SS "void ircd_connector::SetServerName (std::string serv)"
@@ -178,28 +202,31 @@ Set the state flags for this connection.
.PP
.SS "sockaddr_in \fBircd_connector::addr\fP\fC [private]\fP"
.PP
-Sockaddr of the outbound ip and port. Definition at line 58 of file connection.h.
+Sockaddr of the outbound ip and port. Definition at line 59 of file connection.h.
.SS "std::string \fBircd_connector::description\fP\fC [private]\fP"
.PP
-\fBServer\fP 'GECOS'. Definition at line 70 of file connection.h.
+\fBServer\fP 'GECOS'. Definition at line 71 of file connection.h.
.SS "int \fBircd_connector::fd\fP\fC [private]\fP"
.PP
-File descriptor of the connection. Definition at line 62 of file connection.h.
+File descriptor of the connection. Definition at line 63 of file connection.h.
.SS "char \fBircd_connector::host\fP[MAXBUF]"
.PP
-When MakeOutboundConnection is called, these public members are filled with the details passed to the function, for future reference. Definition at line 87 of file connection.h.
+When MakeOutboundConnection is called, these public members are filled with the details passed to the function, for future reference. Definition at line 94 of file connection.h.
+.SS "std::string \fBircd_connector::ircdbuffer\fP"
+.PP
+IRCD Buffer for input characters, holds one line. Definition at line 87 of file connection.h.
.SS "int \fBircd_connector::port\fP"
.PP
-When MakeOutboundConnection is called, these public members are filled with the details passed to the function, for future reference. Definition at line 93 of file connection.h.
+When MakeOutboundConnection is called, these public members are filled with the details passed to the function, for future reference. Definition at line 100 of file connection.h.
.SS "std::vector<std::string> \fBircd_connector::routes\fP"
.PP
-\fBServer\fP names of servers that this server is linked to So for A->B->C, if this was the record for B it would contain A and C whilever both servers are connected to B. Definition at line 99 of file connection.h.
+\fBServer\fP names of servers that this server is linked to So for A->B->C, if this was the record for B it would contain A and C whilever both servers are connected to B. Definition at line 106 of file connection.h.
.SS "std::string \fBircd_connector::servername\fP\fC [private]\fP"
.PP
-\fBServer\fP name. Definition at line 66 of file connection.h.
+\fBServer\fP name. Definition at line 67 of file connection.h.
.SS "int \fBircd_connector::state\fP\fC [private]\fP"
.PP
-State. STATE_NOAUTH_INBOUND, STATE_NOAUTH_OUTBOUND STATE_SYNC, STATE_DISCONNECTED, STATE_CONNECTEDDefinition at line 75 of file connection.h.
+State. STATE_NOAUTH_INBOUND, STATE_NOAUTH_OUTBOUND STATE_SYNC, STATE_DISCONNECTED, STATE_CONNECTEDDefinition at line 76 of file connection.h.
.SH "Author"
.PP
diff --git a/docs/man/man3/message.h.3 b/docs/man/man3/message.h.3
index 613102a3a..127926d3e 100644
--- a/docs/man/man3/message.h.3
+++ b/docs/man/man3/message.h.3
@@ -1,4 +1,4 @@
-.TH "message.h" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "message.h" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/mode.h.3 b/docs/man/man3/mode.h.3
index be2164f1b..e6a1628c1 100644
--- a/docs/man/man3/mode.h.3
+++ b/docs/man/man3/mode.h.3
@@ -1,4 +1,4 @@
-.TH "mode.h" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "mode.h" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/modules.cpp.3 b/docs/man/man3/modules.cpp.3
index b91ae0484..cde9a3b91 100644
--- a/docs/man/man3/modules.cpp.3
+++ b/docs/man/man3/modules.cpp.3
@@ -1,4 +1,4 @@
-.TH "modules.cpp" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "modules.cpp" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -533,7 +533,7 @@ Definition at line 91 of file modules.cpp.
Definition at line 106 of file modules.cpp.
.SS "int \fBMODCOUNT\fP = -1"
.PP
-Definition at line 1030 of file modules.cpp.
+Definition at line 1032 of file modules.cpp.
.SS "std::vector<std::string> \fBmodule_names\fP"
.PP
Definition at line 95 of file modules.cpp.
diff --git a/docs/man/man3/modules.h.3 b/docs/man/man3/modules.h.3
index d2fb56fd4..5b3be2f2a 100644
--- a/docs/man/man3/modules.h.3
+++ b/docs/man/man3/modules.h.3
@@ -1,4 +1,4 @@
-.TH "modules.h" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "modules.h" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -139,7 +139,7 @@ modules.h \-
.RI "#define \fBVF_COMMON\fP 8"
.br
.ti -1c
-.RI "#define \fBFOREACH_MOD\fP for (int i = 0; i <= \fBMODCOUNT\fP; i++) modules[i]->"
+.RI "#define \fBFOREACH_MOD\fP for (int _i = 0; _i <= \fBMODCOUNT\fP; _i++) modules[_i]->"
.br
.ti -1c
.RI "#define \fBFOREACH_RESULT\fP(x)"
@@ -230,29 +230,29 @@ Referenced by Module::OnAccessCheck().
Definition at line 38 of file modules.h.
.SS "#define CONF_FILE_NOT_FOUND 0x000200"
.PP
-Definition at line 1063 of file modules.h.
+Definition at line 1088 of file modules.h.
.PP
Referenced by ConfigReader::ConfigReader().
.SS "#define CONF_NOT_A_NUMBER 0x000010"
.PP
-Definition at line 1060 of file modules.h.
+Definition at line 1085 of file modules.h.
.PP
Referenced by ConfigReader::ReadInteger().
.SS "#define CONF_NOT_UNSIGNED 0x000080"
.PP
-Definition at line 1061 of file modules.h.
+Definition at line 1086 of file modules.h.
.PP
Referenced by ConfigReader::ReadInteger().
.SS "#define CONF_VALUE_NOT_FOUND 0x000100"
.PP
-Definition at line 1062 of file modules.h.
+Definition at line 1087 of file modules.h.
.PP
Referenced by ConfigReader::ReadFlag(), ConfigReader::ReadInteger(), and ConfigReader::ReadValue().
.SS "#define DEBUG 10"
.PP
Definition at line 23 of file modules.h.
.PP
-Referenced by Server::AddExtendedMode(), userrec::HasPermission(), chanrec::IsCustomModeSet(), ModeDefined(), ModeDefinedOper(), ModeIsListMode(), userrec::RemoveInvite(), chanrec::SetCustomMode(), and chanrec::SetCustomModeParam().
+Referenced by Server::AddExtendedMode(), chanrec::AddUser(), chanrec::DecUserCounter(), chanrec::DelUser(), userrec::HasPermission(), chanrec::IncUserCounter(), chanrec::IsCustomModeSet(), ModeDefined(), ModeDefinedOper(), ModeIsListMode(), userrec::RemoveInvite(), chanrec::SetCustomMode(), and chanrec::SetCustomModeParam().
.SS "#define DEFAULT 30"
.PP
Definition at line 25 of file modules.h.
@@ -261,7 +261,7 @@ Definition at line 25 of file modules.h.
Definition at line 99 of file modules.h.
.PP
Referenced by Server::PseudoToUser(), and Server::UserToPseudo().
-.SS "#define FOREACH_MOD for (int i = 0; i <= \fBMODCOUNT\fP; i++) modules[i]->"
+.SS "#define FOREACH_MOD for (int _i = 0; _i <= \fBMODCOUNT\fP; _i++) modules[_i]->"
.PP
Definition at line 79 of file modules.h.
.PP
@@ -270,8 +270,8 @@ Referenced by Event::Send().
.PP
\fBValue:\fP.nf
{ MOD_RESULT = 0; \
- for (int i = 0; i <= MODCOUNT; i++) { \
- int res = modules[i]->x ; \
+ for (int _i = 0; _i <= MODCOUNT; _i++) { \
+ int res = modules[_i]->x ; \
if (res != 0) { \
MOD_RESULT = res; \
break; \
@@ -333,7 +333,7 @@ Low level definition of a \fBFileReader\fP classes file cache area. Definition a
Referenced by FileReader::FileReader(), and FileReader::LoadFile().
.SS "typedef DLLFactory<\fBModuleFactory\fP> \fBircd_module\fP"
.PP
-Definition at line 1229 of file modules.h.
+Definition at line 1254 of file modules.h.
.SS "typedef \fBfile_cache\fP \fBstring_list\fP"
.PP
Definition at line 68 of file modules.h.
diff --git a/docs/man/man3/nspace.3 b/docs/man/man3/nspace.3
index 9ff36fa71..7cfff7689 100644
--- a/docs/man/man3/nspace.3
+++ b/docs/man/man3/nspace.3
@@ -1,4 +1,4 @@
-.TH "nspace" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "nspace" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/nspace_nspace_hash_ in_addr _.3 b/docs/man/man3/nspace_nspace_hash_ in_addr _.3
index 2c771436c..2f257e697 100644
--- a/docs/man/man3/nspace_nspace_hash_ in_addr _.3
+++ b/docs/man/man3/nspace_nspace_hash_ in_addr _.3
@@ -1,4 +1,4 @@
-.TH "nspace::nspace::hash< in_addr >" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "nspace::nspace::hash< in_addr >" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/nspace_nspace_hash_ string _.3 b/docs/man/man3/nspace_nspace_hash_ string _.3
index 2c89b3913..dce6079d6 100644
--- a/docs/man/man3/nspace_nspace_hash_ string _.3
+++ b/docs/man/man3/nspace_nspace_hash_ string _.3
@@ -1,4 +1,4 @@
-.TH "nspace::nspace::hash< string >" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "nspace::nspace::hash< string >" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/serverrec.3 b/docs/man/man3/serverrec.3
index 937637ec0..3517dc84d 100644
--- a/docs/man/man3/serverrec.3
+++ b/docs/man/man3/serverrec.3
@@ -1,4 +1,4 @@
-.TH "serverrec" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "serverrec" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/servers.cpp.3 b/docs/man/man3/servers.cpp.3
index 00ab9528d..ef1e28d83 100644
--- a/docs/man/man3/servers.cpp.3
+++ b/docs/man/man3/servers.cpp.3
@@ -1,4 +1,4 @@
-.TH "servers.cpp" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "servers.cpp" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/servers.h.3 b/docs/man/man3/servers.h.3
index 707489eb1..13cf46371 100644
--- a/docs/man/man3/servers.h.3
+++ b/docs/man/man3/servers.h.3
@@ -1,4 +1,4 @@
-.TH "servers.h" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "servers.h" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/std.3 b/docs/man/man3/std.3
index 37b3ebb26..107c01c59 100644
--- a/docs/man/man3/std.3
+++ b/docs/man/man3/std.3
@@ -1,4 +1,4 @@
-.TH "std" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "std" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/ucrec.3 b/docs/man/man3/ucrec.3
index 5b5cc3285..5f9098e25 100644
--- a/docs/man/man3/ucrec.3
+++ b/docs/man/man3/ucrec.3
@@ -1,4 +1,4 @@
-.TH "ucrec" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "ucrec" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -40,33 +40,33 @@ Holds a user's modes on a channel This class associates a users privilages with
The uc_modes member holds a bitmask of which privilages the user has on the channel, such as op, voice, etc.
.PP
-Definition at line 202 of file channels.h.
+Definition at line 257 of file channels.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "ucrec::ucrec ()\fC [inline]\fP"
.PP
-Definition at line 215 of file channels.h.
+Definition at line 270 of file channels.h.
.PP
.nf
-215 { /* stub */ }
+270 { /* stub */ }
.fi
.SS "virtual ucrec::~\fBucrec\fP ()\fC [inline, virtual]\fP"
.PP
-Definition at line 216 of file channels.h.
+Definition at line 271 of file channels.h.
.PP
.nf
-216 { /* stub */ }
+271 { /* stub */ }
.fi
.SH "Member Data Documentation"
.PP
.SS "\fBchanrec\fP* \fBucrec::channel\fP"
.PP
-Points to the channel record where the given modes apply. If the record is not in use, this value will be NULL.Definition at line 213 of file channels.h.
+Points to the channel record where the given modes apply. If the record is not in use, this value will be NULL.Definition at line 268 of file channels.h.
.PP
Referenced by Server::PseudoToUser(), and userrec::userrec().
.SS "long \fBucrec::uc_modes\fP"
.PP
-Contains a bitmask of the UCMODE_OP ... UCMODE_FOUNDER values. If this value is zero, the user has no privilages upon the channel.Definition at line 208 of file channels.h.
+Contains a bitmask of the UCMODE_OP ... UCMODE_FOUNDER values. If this value is zero, the user has no privilages upon the channel.Definition at line 263 of file channels.h.
.PP
Referenced by userrec::userrec().
diff --git a/docs/man/man3/userrec.3 b/docs/man/man3/userrec.3
index 83d323e83..2e78c5206 100644
--- a/docs/man/man3/userrec.3
+++ b/docs/man/man3/userrec.3
@@ -1,4 +1,4 @@
-.TH "userrec" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "userrec" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -104,6 +104,10 @@ Inherits \fBconnection\fP.
.RI "unsigned long \fBpingmax\fP"
.br
.RI "\fINumber of seconds between PINGs for this user (set from <connect:allow> tag. \fP"
+.ti -1c
+.RI "char \fBpassword\fP [MAXBUF]"
+.br
+.RI "\fIPassword specified by the user when they registered. \fP"
.in -1c
.SS "Private Attributes"
@@ -158,10 +162,10 @@ References awaymsg, connection::bytes_in, connection::bytes_out, ucrec::channel,
.fi
.SS "virtual userrec::~\fBuserrec\fP ()\fC [inline, virtual]\fP"
.PP
-Definition at line 172 of file users.h.
+Definition at line 178 of file users.h.
.PP
.nf
-172 { }
+178 { }
.fi
.SH "Member Function Documentation"
.PP
@@ -198,54 +202,53 @@ References config_f, and DEBUG.
.nf
115 {
116 char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF];
-117 char* myclass;
-118 char* mycmd;
-119 char* savept;
-120 char* savept2;
-121
-122 // are they even an oper at all?
-123 if (strchr(this->modes,'o'))
-124 {
-125 log(DEBUG,'*** HasPermission: %s is an oper',this->nick);
-126 for (int j =0; j < ConfValueEnum('type',&config_f); j++)
-127 {
-128 ConfValue('type','name',j,TypeName,&config_f);
-129 if (!strcmp(TypeName,this->oper))
-130 {
-131 log(DEBUG,'*** HasPermission: %s is an oper of type '%s'',this->nick,this->oper);
-132 ConfValue('type','classes',j,Classes,&config_f);
-133 char* myclass = strtok_r(Classes,' ',&savept);
-134 while (myclass)
-135 {
-136 log(DEBUG,'*** HasPermission: checking classtype '%s'',myclass);
-137 for (int k =0; k < ConfValueEnum('class',&config_f); k++)
-138 {
-139 ConfValue('class','name',k,ClassName,&config_f);
-140 if (!strcmp(ClassName,myclass))
-141 {
-142 ConfValue('class','commands',k,CommandList,&config_f);
-143 log(DEBUG,'*** HasPermission: found class named %s with commands: '%s'',ClassName,CommandList);
+117 char* mycmd;
+118 char* savept;
+119 char* savept2;
+120
+121 // are they even an oper at all?
+122 if (strchr(this->modes,'o'))
+123 {
+124 log(DEBUG,'*** HasPermission: %s is an oper',this->nick);
+125 for (int j =0; j < ConfValueEnum('type',&config_f); j++)
+126 {
+127 ConfValue('type','name',j,TypeName,&config_f);
+128 if (!strcmp(TypeName,this->oper))
+129 {
+130 log(DEBUG,'*** HasPermission: %s is an oper of type '%s'',this->nick,this->oper);
+131 ConfValue('type','classes',j,Classes,&config_f);
+132 char* myclass = strtok_r(Classes,' ',&savept);
+133 while (myclass)
+134 {
+135 log(DEBUG,'*** HasPermission: checking classtype '%s'',myclass);
+136 for (int k =0; k < ConfValueEnum('class',&config_f); k++)
+137 {
+138 ConfValue('class','name',k,ClassName,&config_f);
+139 if (!strcmp(ClassName,myclass))
+140 {
+141 ConfValue('class','commands',k,CommandList,&config_f);
+142 log(DEBUG,'*** HasPermission: found class named %s with commands: '%s'',ClassName,CommandList);
+143
144
-145
-146 mycmd = strtok_r(CommandList,' ',&savept2);
-147 while (mycmd)
-148 {
-149 if (!strcasecmp(mycmd,command))
-150 {
-151 log(DEBUG,'*** Command %s found, returning true',command);
-152 return true;
-153 }
-154 mycmd = strtok_r(NULL,' ',&savept2);
-155 }
-156 }
-157 }
-158 myclass = strtok_r(NULL,' ',&savept);
-159 }
-160 }
-161 }
-162 }
-163 return false;
-164 }
+145 mycmd = strtok_r(CommandList,' ',&savept2);
+146 while (mycmd)
+147 {
+148 if (!strcasecmp(mycmd,command))
+149 {
+150 log(DEBUG,'*** Command %s found, returning true',command);
+151 return true;
+152 }
+153 mycmd = strtok_r(NULL,' ',&savept2);
+154 }
+155 }
+156 }
+157 myclass = strtok_r(NULL,' ',&savept);
+158 }
+159 }
+160 }
+161 }
+162 return false;
+163 }
.fi
.SS "void userrec::InviteTo (char * channel)\fC [virtual]\fP"
.PP
@@ -365,6 +368,9 @@ Referenced by ConfigReader::DumpErrors(), GetFullHost(), GetFullRealHost(), Serv
The oper type they logged in as, if they are an oper. This is used to check permissions in operclasses, so that we can say 'yay' or 'nay' to any commands they issue. The value of this is the value of a valid 'type name=' tag.Definition at line 160 of file users.h.
.PP
Referenced by userrec().
+.SS "char \fBuserrec::password\fP[MAXBUF]"
+.PP
+Password specified by the user when they registered. This is stored even if the block doesnt need a password, so that modules may check it.Definition at line 174 of file users.h.
.SS "unsigned long \fBuserrec::pingmax\fP"
.PP
Number of seconds between PINGs for this user (set from <connect:allow> tag. Definition at line 168 of file users.h.
diff --git a/docs/man/man3/users.cpp.3 b/docs/man/man3/users.cpp.3
index 5b1969971..614228ad2 100644
--- a/docs/man/man3/users.cpp.3
+++ b/docs/man/man3/users.cpp.3
@@ -1,4 +1,4 @@
-.TH "users.cpp" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "users.cpp" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/users.h.3 b/docs/man/man3/users.h.3
index 6e3177d25..09eb0ae89 100644
--- a/docs/man/man3/users.h.3
+++ b/docs/man/man3/users.h.3
@@ -1,4 +1,4 @@
-.TH "users.h" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "users.h" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/xline.h.3 b/docs/man/man3/xline.h.3
index 3cbdff2e2..8a3263c2f 100644
--- a/docs/man/man3/xline.h.3
+++ b/docs/man/man3/xline.h.3
@@ -1,4 +1,4 @@
-.TH "xline.h" 3 "20 Apr 2005" "InspIRCd" \" -*- nroff -*-
+.TH "xline.h" 3 "26 Apr 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME