summaryrefslogtreecommitdiff
path: root/docs/man/man3
diff options
context:
space:
mode:
Diffstat (limited to 'docs/man/man3')
-rw-r--r--docs/man/man3/Admin.36
-rw-r--r--docs/man/man3/BanItem.32
-rw-r--r--docs/man/man3/BoolSet.3138
-rw-r--r--docs/man/man3/ConfigReader.3267
-rw-r--r--docs/man/man3/ConnectClass.32
-rw-r--r--docs/man/man3/DNS.32
-rw-r--r--docs/man/man3/ELine.32
-rw-r--r--docs/man/man3/Event.340
-rw-r--r--docs/man/man3/ExemptItem.32
-rw-r--r--docs/man/man3/ExtMode.318
-rw-r--r--docs/man/man3/Extensible.32
-rw-r--r--docs/man/man3/FileReader.380
-rw-r--r--docs/man/man3/GLine.32
-rw-r--r--docs/man/man3/HostItem.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.3226
-rw-r--r--docs/man/man3/ModuleFactory.32
-rw-r--r--docs/man/man3/ModuleMessage.32
-rw-r--r--docs/man/man3/QLine.32
-rw-r--r--docs/man/man3/Request.352
-rw-r--r--docs/man/man3/Server.3784
-rw-r--r--docs/man/man3/Version.36
-rw-r--r--docs/man/man3/WhoWasUser.326
-rw-r--r--docs/man/man3/XLine.32
-rw-r--r--docs/man/man3/ZLine.32
-rw-r--r--docs/man/man3/base.h.324
-rw-r--r--docs/man/man3/channels.cpp.310
-rw-r--r--docs/man/man3/channels.h.32
-rw-r--r--docs/man/man3/chanrec.32
-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.32
-rw-r--r--docs/man/man3/connection.h.32
-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/hashcomp.h.32
-rw-r--r--docs/man/man3/irc.32
-rw-r--r--docs/man/man3/irc_InAddr_HashComp.32
-rw-r--r--docs/man/man3/irc_StrHashComp.32
-rw-r--r--docs/man/man3/irc_irc_char_traits.32
-rw-r--r--docs/man/man3/ircd_connector.34
-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.3264
-rw-r--r--docs/man/man3/modules.h.32
-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.3489
-rw-r--r--docs/man/man3/servers.cpp.374
-rw-r--r--docs/man/man3/servers.h.32
-rw-r--r--docs/man/man3/std.32
-rw-r--r--docs/man/man3/std_char_traits.32
-rw-r--r--docs/man/man3/ucrec.32
-rw-r--r--docs/man/man3/userrec.3546
-rw-r--r--docs/man/man3/users.cpp.310
-rw-r--r--docs/man/man3/users.h.32
-rw-r--r--docs/man/man3/xline.h.32
63 files changed, 1677 insertions, 1475 deletions
diff --git a/docs/man/man3/Admin.3 b/docs/man/man3/Admin.3
index 18bd6a944..be8818954 100644
--- a/docs/man/man3/Admin.3
+++ b/docs/man/man3/Admin.3
@@ -1,4 +1,4 @@
-.TH "Admin" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "Admin" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -43,10 +43,10 @@ Definition at line 123 of file modules.h.
.PP
.SS "Admin::Admin (std::string name, std::string email, std::string nick)"
.PP
-Definition at line 247 of file modules.cpp.
+Definition at line 249 of file modules.cpp.
.PP
.nf
-247 : Name(name), Email(email), Nick(nick) { };
+249 : Name(name), Email(email), Nick(nick) { };
.fi
.SH "Member Data Documentation"
.PP
diff --git a/docs/man/man3/BanItem.3 b/docs/man/man3/BanItem.3
index a2e234890..0fe2819cf 100644
--- a/docs/man/man3/BanItem.3
+++ b/docs/man/man3/BanItem.3
@@ -1,4 +1,4 @@
-.TH "BanItem" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "BanItem" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/BoolSet.3 b/docs/man/man3/BoolSet.3
new file mode 100644
index 000000000..5089a03bf
--- /dev/null
+++ b/docs/man/man3/BoolSet.3
@@ -0,0 +1,138 @@
+.TH "BoolSet" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
+.ad l
+.nh
+.SH NAME
+BoolSet \- BoolSet is a utility class designed to hold eight bools in a bitmask.
+
+.PP
+.SH SYNOPSIS
+.br
+.PP
+\fC#include <base.h>\fP
+.PP
+.SS "Public Member Functions"
+
+.in +1c
+.ti -1c
+.RI "\fBBoolSet\fP ()"
+.br
+.RI "\fIThe default constructor initializes the BoolSet to all values unset. \fP"
+.ti -1c
+.RI "\fBBoolSet\fP (char bitmask)"
+.br
+.RI "\fIThis constructor copies the default bitmask from a char. \fP"
+.ti -1c
+.RI "void \fBSet\fP (int number)"
+.br
+.RI "\fIThe Set method sets one bool in the set. \fP"
+.ti -1c
+.RI "bool \fBGet\fP (int number)"
+.br
+.RI "\fIThe Get method returns the value of one bool in the set. \fP"
+.ti -1c
+.RI "void \fBUnset\fP (int number)"
+.br
+.RI "\fIThe Unset method unsets one value in the set. \fP"
+.ti -1c
+.RI "void \fBInvert\fP (int number)"
+.br
+.RI "\fIThe Unset method inverts (flips) one value in the set. \fP"
+.ti -1c
+.RI "bool \fBoperator==\fP (\fBBoolSet\fP other)"
+.br
+.RI "\fICompare two BoolSets. \fP"
+.ti -1c
+.RI "\fBBoolSet\fP \fBoperator|\fP (\fBBoolSet\fP other)"
+.br
+.RI "\fIOR two BoolSets together. \fP"
+.ti -1c
+.RI "\fBBoolSet\fP \fBoperator &\fP (\fBBoolSet\fP other)"
+.br
+.RI "\fIAND two BoolSets together. \fP"
+.ti -1c
+.RI "bool \fBoperator=\fP (\fBBoolSet\fP other)"
+.br
+.RI "\fIAssign one BoolSet to another. \fP"
+.in -1c
+.SS "Private Attributes"
+
+.in +1c
+.ti -1c
+.RI "char \fBbits\fP"
+.br
+.in -1c
+.SH "Detailed Description"
+.PP
+BoolSet is a utility class designed to hold eight bools in a bitmask.
+
+Use \fBBoolSet::Set\fP and \fBBoolSet::Get\fP to set and get bools in the bitmask, and Unset and Invert for special operations upon them.
+.PP
+Definition at line 98 of file base.h.
+.SH "Constructor & Destructor Documentation"
+.PP
+.SS "BoolSet::BoolSet ()"
+.PP
+The default constructor initializes the BoolSet to all values unset.
+.SS "BoolSet::BoolSet (char bitmask)"
+.PP
+This constructor copies the default bitmask from a char.
+.SH "Member Function Documentation"
+.PP
+.SS "bool BoolSet::Get (int number)"
+.PP
+The Get method returns the value of one bool in the set. \fBParameters:\fP
+.RS 4
+\fInumber\fP The number of the item to retrieve. This must be between 0 and 7.
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+True if the item is set, false if it is unset.
+.RE
+.PP
+
+.SS "void BoolSet::Invert (int number)"
+.PP
+The Unset method inverts (flips) one value in the set. \fBParameters:\fP
+.RS 4
+\fInumber\fP The number of the item to invert. This must be between 0 and 7.
+.RE
+.PP
+
+.SS "\fBBoolSet\fP BoolSet::operator & (\fBBoolSet\fP other)"
+.PP
+AND two BoolSets together.
+.SS "bool BoolSet::operator= (\fBBoolSet\fP other)"
+.PP
+Assign one BoolSet to another.
+.SS "bool BoolSet::operator== (\fBBoolSet\fP other)"
+.PP
+Compare two BoolSets.
+.SS "\fBBoolSet\fP BoolSet::operator| (\fBBoolSet\fP other)"
+.PP
+OR two BoolSets together.
+.SS "void BoolSet::Set (int number)"
+.PP
+The Set method sets one bool in the set. \fBParameters:\fP
+.RS 4
+\fInumber\fP The number of the item to set. This must be between 0 and 7.
+.RE
+.PP
+
+.SS "void BoolSet::Unset (int number)"
+.PP
+The Unset method unsets one value in the set. \fBParameters:\fP
+.RS 4
+\fInumber\fP The number of the item to set. This must be between 0 and 7.
+.RE
+.PP
+
+.SH "Member Data Documentation"
+.PP
+.SS "char \fBBoolSet::bits\fP\fC [private]\fP"
+.PP
+Definition at line 100 of file base.h.
+
+.SH "Author"
+.PP
+Generated automatically by Doxygen for InspIRCd from the source code.
diff --git a/docs/man/man3/ConfigReader.3 b/docs/man/man3/ConfigReader.3
index 3d7241239..6e9a3bfed 100644
--- a/docs/man/man3/ConfigReader.3
+++ b/docs/man/man3/ConfigReader.3
@@ -1,4 +1,4 @@
-.TH "ConfigReader" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "ConfigReader" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -89,213 +89,214 @@ Definition at line 1150 of file modules.h.
.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 819 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 821 of file modules.cpp.
.PP
-References cache, CONF_FILE_NOT_FOUND, error, errorlog, and readerror.
+References cache, CONF_FILE_NOT_FOUND, error, errorlog, include_stack, and readerror.
.PP
.nf
-820 {
-821 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
-822 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
-823 this->readerror = LoadConf(CONFIG_FILE,this->cache,this->errorlog);
-824 if (!this->readerror)
-825 this->error = CONF_FILE_NOT_FOUND;
-826 }
+822 {
+823 include_stack.clear();
+824 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
+825 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
+826 this->readerror = LoadConf(CONFIG_FILE,this->cache,this->errorlog);
+827 if (!this->readerror)
+828 this->error = CONF_FILE_NOT_FOUND;
+829 }
.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 838 of file modules.cpp.
+Overloaded constructor. This constructor initialises the ConfigReader class to read a user-specified config fileDefinition at line 841 of file modules.cpp.
.PP
References cache, CONF_FILE_NOT_FOUND, error, errorlog, and readerror.
.PP
.nf
-839 {
-840 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
-841 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
-842 this->readerror = LoadConf(filename.c_str(),this->cache,this->errorlog);
-843 if (!this->readerror)
-844 this->error = CONF_FILE_NOT_FOUND;
-845 };
+842 {
+843 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
+844 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
+845 this->readerror = LoadConf(filename.c_str(),this->cache,this->errorlog);
+846 if (!this->readerror)
+847 this->error = CONF_FILE_NOT_FOUND;
+848 };
.fi
.SS "ConfigReader::~\fBConfigReader\fP ()"
.PP
-Default destructor. This method destroys the ConfigReader class.Definition at line 829 of file modules.cpp.
+Default destructor. This method destroys the ConfigReader class.Definition at line 832 of file modules.cpp.
.PP
References cache, and errorlog.
.PP
.nf
-830 {
-831 if (this->cache)
-832 delete this->cache;
-833 if (this->errorlog)
-834 delete this->errorlog;
-835 }
+833 {
+834 if (this->cache)
+835 delete this->cache;
+836 if (this->errorlog)
+837 delete this->errorlog;
+838 }
.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 916 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 919 of file modules.cpp.
.PP
References errorlog, connection::fd, and userrec::nick.
.PP
.nf
-917 {
-918 if (bail)
-919 {
-920 printf('There were errors in your configuration:\n%s',errorlog->str().c_str());
-921 exit(0);
-922 }
-923 else
-924 {
-925 char dataline[1024];
-926 if (user)
-927 {
-928 WriteServ(user->fd,'NOTICE %s :There were errors in the configuration file:',user->nick);
-929 while (!errorlog->eof())
-930 {
-931 errorlog->getline(dataline,1024);
-932 WriteServ(user->fd,'NOTICE %s :%s',user->nick,dataline);
-933 }
-934 }
-935 else
-936 {
-937 WriteOpers('There were errors in the configuration file:',user->nick);
-938 while (!errorlog->eof())
-939 {
-940 errorlog->getline(dataline,1024);
-941 WriteOpers(dataline);
-942 }
-943 }
-944 return;
-945 }
-946 }
+920 {
+921 if (bail)
+922 {
+923 printf('There were errors in your configuration:\n%s',errorlog->str().c_str());
+924 exit(0);
+925 }
+926 else
+927 {
+928 char dataline[1024];
+929 if (user)
+930 {
+931 WriteServ(user->fd,'NOTICE %s :There were errors in the configuration file:',user->nick);
+932 while (!errorlog->eof())
+933 {
+934 errorlog->getline(dataline,1024);
+935 WriteServ(user->fd,'NOTICE %s :%s',user->nick,dataline);
+936 }
+937 }
+938 else
+939 {
+940 WriteOpers('There were errors in the configuration file:',user->nick);
+941 while (!errorlog->eof())
+942 {
+943 errorlog->getline(dataline,1024);
+944 WriteOpers(dataline);
+945 }
+946 }
+947 return;
+948 }
+949 }
.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 949 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 952 of file modules.cpp.
.PP
References cache.
.PP
.nf
-950 {
-951 return EnumConf(cache,tag.c_str());
-952 }
+953 {
+954 return EnumConf(cache,tag.c_str());
+955 }
.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 954 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 957 of file modules.cpp.
.PP
References cache.
.PP
.nf
-955 {
-956 return EnumValues(cache, tag.c_str(), index);
-957 }
+958 {
+959 return EnumValues(cache, tag.c_str(), index);
+960 }
.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 909 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 912 of file modules.cpp.
.PP
References error.
.PP
.nf
-910 {
-911 long olderr = this->error;
-912 this->error = 0;
-913 return olderr;
-914 }
+913 {
+914 long olderr = this->error;
+915 this->error = 0;
+916 return olderr;
+917 }
.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 863 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 866 of file modules.cpp.
.PP
References cache, CONF_VALUE_NOT_FOUND, and error.
.PP
.nf
-864 {
-865 char val[MAXBUF];
-866 char t[MAXBUF];
-867 char n[MAXBUF];
-868 strlcpy(t,tag.c_str(),MAXBUF);
-869 strlcpy(n,name.c_str(),MAXBUF);
-870 int res = ReadConf(cache,t,n,index,val);
-871 if (!res)
-872 {
-873 this->error = CONF_VALUE_NOT_FOUND;
-874 return false;
-875 }
-876 std::string s = val;
-877 return ((s == 'yes') || (s == 'YES') || (s == 'true') || (s == 'TRUE') || (s == '1'));
-878 }
+867 {
+868 char val[MAXBUF];
+869 char t[MAXBUF];
+870 char n[MAXBUF];
+871 strlcpy(t,tag.c_str(),MAXBUF);
+872 strlcpy(n,name.c_str(),MAXBUF);
+873 int res = ReadConf(cache,t,n,index,val);
+874 if (!res)
+875 {
+876 this->error = CONF_VALUE_NOT_FOUND;
+877 return false;
+878 }
+879 std::string s = val;
+880 return ((s == 'yes') || (s == 'YES') || (s == 'true') || (s == 'TRUE') || (s == '1'));
+881 }
.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 880 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 883 of file modules.cpp.
.PP
References cache, CONF_NOT_A_NUMBER, CONF_NOT_UNSIGNED, CONF_VALUE_NOT_FOUND, and error.
.PP
.nf
-881 {
-882 char val[MAXBUF];
-883 char t[MAXBUF];
-884 char n[MAXBUF];
-885 strlcpy(t,tag.c_str(),MAXBUF);
-886 strlcpy(n,name.c_str(),MAXBUF);
-887 int res = ReadConf(cache,t,n,index,val);
-888 if (!res)
-889 {
-890 this->error = CONF_VALUE_NOT_FOUND;
-891 return 0;
-892 }
-893 for (int i = 0; i < strlen(val); i++)
-894 {
-895 if (!isdigit(val[i]))
-896 {
-897 this->error = CONF_NOT_A_NUMBER;
-898 return 0;
-899 }
-900 }
-901 if ((needs_unsigned) && (atoi(val)<0))
-902 {
-903 this->error = CONF_NOT_UNSIGNED;
-904 return 0;
-905 }
-906 return atoi(val);
-907 }
+884 {
+885 char val[MAXBUF];
+886 char t[MAXBUF];
+887 char n[MAXBUF];
+888 strlcpy(t,tag.c_str(),MAXBUF);
+889 strlcpy(n,name.c_str(),MAXBUF);
+890 int res = ReadConf(cache,t,n,index,val);
+891 if (!res)
+892 {
+893 this->error = CONF_VALUE_NOT_FOUND;
+894 return 0;
+895 }
+896 for (int i = 0; i < strlen(val); i++)
+897 {
+898 if (!isdigit(val[i]))
+899 {
+900 this->error = CONF_NOT_A_NUMBER;
+901 return 0;
+902 }
+903 }
+904 if ((needs_unsigned) && (atoi(val)<0))
+905 {
+906 this->error = CONF_NOT_UNSIGNED;
+907 return 0;
+908 }
+909 return atoi(val);
+910 }
.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 847 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 850 of file modules.cpp.
.PP
References cache, CONF_VALUE_NOT_FOUND, and error.
.PP
.nf
-848 {
-849 char val[MAXBUF];
-850 char t[MAXBUF];
-851 char n[MAXBUF];
-852 strlcpy(t,tag.c_str(),MAXBUF);
-853 strlcpy(n,name.c_str(),MAXBUF);
-854 int res = ReadConf(cache,t,n,index,val);
-855 if (!res)
-856 {
-857 this->error = CONF_VALUE_NOT_FOUND;
-858 return '';
-859 }
-860 return val;
-861 }
+851 {
+852 char val[MAXBUF];
+853 char t[MAXBUF];
+854 char n[MAXBUF];
+855 strlcpy(t,tag.c_str(),MAXBUF);
+856 strlcpy(n,name.c_str(),MAXBUF);
+857 int res = ReadConf(cache,t,n,index,val);
+858 if (!res)
+859 {
+860 this->error = CONF_VALUE_NOT_FOUND;
+861 return '';
+862 }
+863 return val;
+864 }
.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 959 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 962 of file modules.cpp.
.PP
References readerror.
.PP
.nf
-960 {
-961 return this->readerror;
-962 }
+963 {
+964 return this->readerror;
+965 }
.fi
.SH "Member Data Documentation"
.PP
diff --git a/docs/man/man3/ConnectClass.3 b/docs/man/man3/ConnectClass.3
index 6ac15ba75..93be4a4ae 100644
--- a/docs/man/man3/ConnectClass.3
+++ b/docs/man/man3/ConnectClass.3
@@ -1,4 +1,4 @@
-.TH "ConnectClass" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "ConnectClass" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/DNS.3 b/docs/man/man3/DNS.3
index 294c788b1..73f88fa81 100644
--- a/docs/man/man3/DNS.3
+++ b/docs/man/man3/DNS.3
@@ -1,4 +1,4 @@
-.TH "DNS" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "DNS" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/ELine.3 b/docs/man/man3/ELine.3
index df7d4f4a7..64bded438 100644
--- a/docs/man/man3/ELine.3
+++ b/docs/man/man3/ELine.3
@@ -1,4 +1,4 @@
-.TH "ELine" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "ELine" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/Event.3 b/docs/man/man3/Event.3
index d546cadcc..96754f611 100644
--- a/docs/man/man3/Event.3
+++ b/docs/man/man3/Event.3
@@ -1,4 +1,4 @@
-.TH "Event" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "Event" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -63,59 +63,59 @@ Definition at line 194 of file modules.h.
.PP
.SS "Event::Event (char * anydata, \fBModule\fP * src, std::string eventid)"
.PP
-Create a new Event. Definition at line 278 of file modules.cpp.
+Create a new Event. Definition at line 280 of file modules.cpp.
.PP
.nf
-278 : data(anydata), source(src), id(eventid) { };
+280 : data(anydata), source(src), id(eventid) { };
.fi
.SH "Member Function Documentation"
.PP
.SS "char * Event::GetData ()"
.PP
-Get the Event data. Definition at line 280 of file modules.cpp.
+Get the Event data. Definition at line 282 of file modules.cpp.
.PP
References data.
.PP
.nf
-281 {
-282 return this->data;
-283 }
+283 {
+284 return this->data;
+285 }
.fi
.SS "std::string Event::GetEventID ()"
.PP
-Get the event ID. Use this to determine the event type for safe casting of the data Definition at line 296 of file modules.cpp.
+Get the event ID. Use this to determine the event type for safe casting of the data Definition at line 298 of file modules.cpp.
.PP
References id.
.PP
.nf
-297 {
-298 return this->id;
-299 }
+299 {
+300 return this->id;
+301 }
.fi
.SS "\fBModule\fP * Event::GetSource ()"
.PP
-Get the event Source. Definition at line 285 of file modules.cpp.
+Get the event Source. Definition at line 287 of file modules.cpp.
.PP
References source.
.PP
.nf
-286 {
-287 return this->source;
-288 }
+288 {
+289 return this->source;
+290 }
.fi
.SS "char * Event::Send ()\fC [virtual]\fP"
.PP
Send the Event. The return result of an \fBEvent::Send()\fP will always be NULL as no replies are expected. Implements \fBModuleMessage\fP.
.PP
-Definition at line 290 of file modules.cpp.
+Definition at line 292 of file modules.cpp.
.PP
References FOREACH_MOD.
.PP
.nf
-291 {
-292 FOREACH_MOD OnEvent(this);
-293 return NULL;
-294 }
+293 {
+294 FOREACH_MOD OnEvent(this);
+295 return NULL;
+296 }
.fi
.SH "Member Data Documentation"
.PP
diff --git a/docs/man/man3/ExemptItem.3 b/docs/man/man3/ExemptItem.3
index 1f1827758..530a2a39b 100644
--- a/docs/man/man3/ExemptItem.3
+++ b/docs/man/man3/ExemptItem.3
@@ -1,4 +1,4 @@
-.TH "ExemptItem" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "ExemptItem" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/ExtMode.3 b/docs/man/man3/ExtMode.3
index d6135fc14..1c8a04730 100644
--- a/docs/man/man3/ExtMode.3
+++ b/docs/man/man3/ExtMode.3
@@ -1,4 +1,4 @@
-.TH "ExtMode" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "ExtMode" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -41,41 +41,41 @@ Inherits \fBclassbase\fP.
.PP
.SS "ExtMode::ExtMode (char mc, int ty, bool oper, int p_on, int p_off)\fC [inline]\fP"
.PP
-Definition at line 145 of file modules.cpp.
+Definition at line 147 of file modules.cpp.
.PP
References modechar, needsoper, params_when_off, params_when_on, and type.
.PP
.nf
-145 : modechar(mc), type(ty), needsoper(oper), params_when_on(p_on), params_when_off(p_off) { };
+147 : modechar(mc), type(ty), needsoper(oper), params_when_on(p_on), params_when_off(p_off) { };
.fi
.SH "Member Data Documentation"
.PP
.SS "bool \fBExtMode::list\fP"
.PP
-Definition at line 144 of file modules.cpp.
+Definition at line 146 of file modules.cpp.
.SS "char \fBExtMode::modechar\fP"
.PP
-Definition at line 139 of file modules.cpp.
+Definition at line 141 of file modules.cpp.
.PP
Referenced by ExtMode().
.SS "bool \fBExtMode::needsoper\fP"
.PP
-Definition at line 143 of file modules.cpp.
+Definition at line 145 of file modules.cpp.
.PP
Referenced by ExtMode().
.SS "int \fBExtMode::params_when_off\fP"
.PP
-Definition at line 142 of file modules.cpp.
+Definition at line 144 of file modules.cpp.
.PP
Referenced by ExtMode().
.SS "int \fBExtMode::params_when_on\fP"
.PP
-Definition at line 141 of file modules.cpp.
+Definition at line 143 of file modules.cpp.
.PP
Referenced by ExtMode().
.SS "int \fBExtMode::type\fP"
.PP
-Definition at line 140 of file modules.cpp.
+Definition at line 142 of file modules.cpp.
.PP
Referenced by ExtMode().
diff --git a/docs/man/man3/Extensible.3 b/docs/man/man3/Extensible.3
index 2018cd126..b5cdefdf4 100644
--- a/docs/man/man3/Extensible.3
+++ b/docs/man/man3/Extensible.3
@@ -1,4 +1,4 @@
-.TH "Extensible" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "Extensible" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/FileReader.3 b/docs/man/man3/FileReader.3
index cc8235c1a..cd9e613ef 100644
--- a/docs/man/man3/FileReader.3
+++ b/docs/man/man3/FileReader.3
@@ -1,4 +1,4 @@
-.TH "FileReader" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "FileReader" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -62,89 +62,89 @@ Definition at line 1239 of file modules.h.
.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 972 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 975 of file modules.cpp.
.PP
.nf
-973 {
-974 }
+976 {
+977 }
.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 965 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 968 of file modules.cpp.
.PP
References fc, and file_cache.
.PP
.nf
-966 {
-967 file_cache c;
-968 readfile(c,filename.c_str());
-969 this->fc = c;
-970 }
+969 {
+970 file_cache c;
+971 readfile(c,filename.c_str());
+972 this->fc = c;
+973 }
.fi
.SS "FileReader::~\fBFileReader\fP ()"
.PP
-Default destructor. This deletes the memory allocated to the file.Definition at line 984 of file modules.cpp.
+Default destructor. This deletes the memory allocated to the file.Definition at line 987 of file modules.cpp.
.PP
.nf
-985 {
-986 }
+988 {
+989 }
.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 988 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 991 of file modules.cpp.
.PP
References fc.
.PP
.nf
-989 {
-990 if (fc.size() == 0)
-991 {
-992 return(false);
-993 }
-994 else
-995 {
-996 return(true);
-997 }
-998 }
+992 {
+993 if (fc.size() == 0)
+994 {
+995 return(false);
+996 }
+997 else
+998 {
+999 return(true);
+1000 }
+1001 }
.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 1007 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 1010 of file modules.cpp.
.PP
References fc.
.PP
.nf
-1008 {
-1009 return fc.size();
-1010 }
+1011 {
+1012 return fc.size();
+1013 }
.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 1000 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 1003 of file modules.cpp.
.PP
References fc.
.PP
.nf
-1001 {
-1002 if ((x<0) || (x>fc.size()))
-1003 return '';
-1004 return fc[x];
-1005 }
+1004 {
+1005 if ((x<0) || (x>fc.size()))
+1006 return '';
+1007 return fc[x];
+1008 }
.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 976 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 979 of file modules.cpp.
.PP
References fc, and file_cache.
.PP
.nf
-977 {
-978 file_cache c;
-979 readfile(c,filename.c_str());
-980 this->fc = c;
-981 }
+980 {
+981 file_cache c;
+982 readfile(c,filename.c_str());
+983 this->fc = c;
+984 }
.fi
.SH "Member Data Documentation"
.PP
diff --git a/docs/man/man3/GLine.3 b/docs/man/man3/GLine.3
index 34bb1379c..790d62ae9 100644
--- a/docs/man/man3/GLine.3
+++ b/docs/man/man3/GLine.3
@@ -1,4 +1,4 @@
-.TH "GLine" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "GLine" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/HostItem.3 b/docs/man/man3/HostItem.3
index a63fe8ca3..41ad398a5 100644
--- a/docs/man/man3/HostItem.3
+++ b/docs/man/man3/HostItem.3
@@ -1,4 +1,4 @@
-.TH "HostItem" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "HostItem" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/InviteItem.3 b/docs/man/man3/InviteItem.3
index 43b4cb657..1f1b4b014 100644
--- a/docs/man/man3/InviteItem.3
+++ b/docs/man/man3/InviteItem.3
@@ -1,4 +1,4 @@
-.TH "InviteItem" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "InviteItem" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/Invited.3 b/docs/man/man3/Invited.3
index d5f91d73f..480652984 100644
--- a/docs/man/man3/Invited.3
+++ b/docs/man/man3/Invited.3
@@ -1,4 +1,4 @@
-.TH "Invited" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "Invited" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/KLine.3 b/docs/man/man3/KLine.3
index 53785dc8c..622641661 100644
--- a/docs/man/man3/KLine.3
+++ b/docs/man/man3/KLine.3
@@ -1,4 +1,4 @@
-.TH "KLine" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "KLine" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/ModeParameter.3 b/docs/man/man3/ModeParameter.3
index c690c33c5..75922cd20 100644
--- a/docs/man/man3/ModeParameter.3
+++ b/docs/man/man3/ModeParameter.3
@@ -1,4 +1,4 @@
-.TH "ModeParameter" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "ModeParameter" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/Module.3 b/docs/man/man3/Module.3
index 2169fd28b..9867a9454 100644
--- a/docs/man/man3/Module.3
+++ b/docs/man/man3/Module.3
@@ -1,4 +1,4 @@
-.TH "Module" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "Module" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -251,35 +251,35 @@ Definition at line 236 of file modules.h.
.PP
.SS "Module::Module ()"
.PP
-Default constructor creates a module class. Definition at line 303 of file modules.cpp.
+Default constructor creates a module class. Definition at line 305 of file modules.cpp.
.PP
.nf
-303 { }
+305 { }
.fi
.SS "Module::~\fBModule\fP ()\fC [virtual]\fP"
.PP
-Default destructor destroys a module class. Definition at line 304 of file modules.cpp.
+Default destructor destroys a module class. Definition at line 306 of file modules.cpp.
.PP
.nf
-304 { }
+306 { }
.fi
.SH "Member Function Documentation"
.PP
.SS "\fBVersion\fP Module::GetVersion ()\fC [virtual]\fP"
.PP
-Returns the version number of a Module. The method should return a \fBVersion\fP object with its version information assigned via \fBVersion::Version\fPDefinition at line 316 of file modules.cpp.
+Returns the version number of a Module. The method should return a \fBVersion\fP object with its version information assigned via \fBVersion::Version\fPDefinition at line 318 of file modules.cpp.
.PP
References VF_VENDOR.
.PP
.nf
-316 { return Version(1,0,0,0,VF_VENDOR); }
+318 { return Version(1,0,0,0,VF_VENDOR); }
.fi
.SS "void Module::On005Numeric (std::string & output)\fC [virtual]\fP"
.PP
-Called when a 005 numeric is about to be output. The module should modify the 005 numeric if needed to indicate its features.Definition at line 328 of file modules.cpp.
+Called when a 005 numeric is about to be output. The module should modify the 005 numeric if needed to indicate its features.Definition at line 330 of file modules.cpp.
.PP
.nf
-328 { };
+330 { };
.fi
.SS "int Module::OnAccessCheck (\fBuserrec\fP * source, \fBuserrec\fP * dest, \fBchanrec\fP * channel, int access_type)\fC [virtual]\fP"
.PP
@@ -307,312 +307,312 @@ Called before an action which requires a channel privilage check. This function
.br
.br
- Upon returning from your function you must return either ACR_DEFAULT, to indicate the module wishes to do nothing, or ACR_DENY where approprate to deny the action, and ACR_ALLOW where appropriate to allow the action. Please note that in the case of some access checks (such as AC_GENERAL_MODE) access may be denied 'upstream' causing other checks such as AC_DEOP to not be reached. Be very careful with use of the AC_GENERAL_MODE type, as it may inadvertently override the behaviour of other modules. When the access_type is AC_GENERAL_MODE, the destination of the mode will be NULL (as it has not yet been determined).Definition at line 325 of file modules.cpp.
+ Upon returning from your function you must return either ACR_DEFAULT, to indicate the module wishes to do nothing, or ACR_DENY where approprate to deny the action, and ACR_ALLOW where appropriate to allow the action. Please note that in the case of some access checks (such as AC_GENERAL_MODE) access may be denied 'upstream' causing other checks such as AC_DEOP to not be reached. Be very careful with use of the AC_GENERAL_MODE type, as it may inadvertently override the behaviour of other modules. When the access_type is AC_GENERAL_MODE, the destination of the mode will be NULL (as it has not yet been determined).Definition at line 327 of file modules.cpp.
.PP
References ACR_DEFAULT.
.PP
.nf
-325 { return ACR_DEFAULT; };
+327 { return ACR_DEFAULT; };
.fi
.SS "int Module::OnAddBan (\fBuserrec\fP * source, \fBchanrec\fP * channel, std::string banmask)\fC [virtual]\fP"
.PP
-Called whenever a ban is added to a channel's list. Return a non-zero value to 'eat' the mode change and prevent the ban from being added.Definition at line 353 of file modules.cpp.
+Called whenever a ban is added to a channel's list. Return a non-zero value to 'eat' the mode change and prevent the ban from being added.Definition at line 355 of file modules.cpp.
.PP
.nf
-353 { return 0; };
+355 { return 0; };
.fi
.SS "void Module::OnBackgroundTimer (time_t curtime)\fC [virtual]\fP"
.PP
-Called once every five seconds for background processing. This timer can be used to control timed features. Its period is not accurate enough to be used as a clock, but it is gauranteed to be called at least once in any five second period, directly from the main loop of the server.Definition at line 331 of file modules.cpp.
+Called once every five seconds for background processing. This timer can be used to control timed features. Its period is not accurate enough to be used as a clock, but it is gauranteed to be called at least once in any five second period, directly from the main loop of the server.Definition at line 333 of file modules.cpp.
.PP
.nf
-331 { };
+333 { };
.fi
.SS "int Module::OnChangeLocalUserGECOS (\fBuserrec\fP * user, std::string newhost)\fC [virtual]\fP"
.PP
-Called whenever a change of a local users GECOS (fullname field) is attempted. return 1 to deny the name change, or 0 to allow it.Definition at line 345 of file modules.cpp.
+Called whenever a change of a local users GECOS (fullname field) is attempted. return 1 to deny the name change, or 0 to allow it.Definition at line 347 of file modules.cpp.
.PP
.nf
-345 { return 0; };
+347 { return 0; };
.fi
.SS "int Module::OnChangeLocalUserHost (\fBuserrec\fP * user, std::string newhost)\fC [virtual]\fP"
.PP
-Called whenever a change of a local users displayed host is attempted. Return 1 to deny the host change, or 0 to allow it.Definition at line 344 of file modules.cpp.
+Called whenever a change of a local users displayed host is attempted. Return 1 to deny the host change, or 0 to allow it.Definition at line 346 of file modules.cpp.
.PP
.nf
-344 { return 0; };
+346 { return 0; };
.fi
.SS "\fBstring_list\fP Module::OnChannelSync (\fBchanrec\fP * chan)\fC [virtual]\fP"
.PP
-Called during a netburst to sync channel data. This is called during the netburst on a per-channel basis. You should use this call to up any special channel-related things which are implemented by your module, e.g. sending listmodes. You may return multiple commands in the string_list.Definition at line 327 of file modules.cpp.
+Called during a netburst to sync channel data. This is called during the netburst on a per-channel basis. You should use this call to up any special channel-related things which are implemented by your module, e.g. sending listmodes. You may return multiple commands in the string_list.Definition at line 329 of file modules.cpp.
.PP
References string_list.
.PP
.nf
-327 { string_list empty; return empty; }
+329 { string_list empty; return empty; }
.fi
.SS "int Module::OnCheckBan (\fBuserrec\fP * user, \fBchanrec\fP * chan)\fC [virtual]\fP"
.PP
-Called whenever a user joins a channel, to determine if banlist checks should go ahead or not. This method will always be called for each join, wether or not the user actually matches a channel ban, and determines the outcome of an if statement around the whole section of ban checking code. return 1 to explicitly allow the join to go ahead or 0 to ignore the event. Definition at line 342 of file modules.cpp.
+Called whenever a user joins a channel, to determine if banlist checks should go ahead or not. This method will always be called for each join, wether or not the user actually matches a channel ban, and determines the outcome of an if statement around the whole section of ban checking code. return 1 to explicitly allow the join to go ahead or 0 to ignore the event. Definition at line 344 of file modules.cpp.
.PP
.nf
-342 { return 0; };
+344 { return 0; };
.fi
.SS "int Module::OnCheckInvite (\fBuserrec\fP * user, \fBchanrec\fP * chan)\fC [virtual]\fP"
.PP
-Called whenever a user joins a channel, to determine if invite checks should go ahead or not. This method will always be called for each join, wether or not the channel is actually +i, and determines the outcome of an if statement around the whole section of invite checking code. return 1 to explicitly allow the join to go ahead or 0 to ignore the event.Definition at line 339 of file modules.cpp.
+Called whenever a user joins a channel, to determine if invite checks should go ahead or not. This method will always be called for each join, wether or not the channel is actually +i, and determines the outcome of an if statement around the whole section of invite checking code. return 1 to explicitly allow the join to go ahead or 0 to ignore the event.Definition at line 341 of file modules.cpp.
.PP
.nf
-339 { return 0; };
+341 { return 0; };
.fi
.SS "int Module::OnCheckKey (\fBuserrec\fP * user, \fBchanrec\fP * chan, std::string keygiven)\fC [virtual]\fP"
.PP
-Called whenever a user joins a channel, to determine if key checks should go ahead or not. This method will always be called for each join, wether or not the channel is actually +k, and determines the outcome of an if statement around the whole section of key checking code. if the user specified no key, the keygiven string will be a valid but empty value. return 1 to explicitly allow the join to go ahead or 0 to ignore the event. Definition at line 340 of file modules.cpp.
+Called whenever a user joins a channel, to determine if key checks should go ahead or not. This method will always be called for each join, wether or not the channel is actually +k, and determines the outcome of an if statement around the whole section of key checking code. if the user specified no key, the keygiven string will be a valid but empty value. return 1 to explicitly allow the join to go ahead or 0 to ignore the event. Definition at line 342 of file modules.cpp.
.PP
.nf
-340 { return 0; };
+342 { return 0; };
.fi
.SS "int Module::OnCheckLimit (\fBuserrec\fP * user, \fBchanrec\fP * chan)\fC [virtual]\fP"
.PP
-Called whenever a user joins a channel, to determine if channel limit checks should go ahead or not. This method will always be called for each join, wether or not the channel is actually +l, and determines the outcome of an if statement around the whole section of channel limit checking code. return 1 to explicitly allow the join to go ahead or 0 to ignore the event. Definition at line 341 of file modules.cpp.
+Called whenever a user joins a channel, to determine if channel limit checks should go ahead or not. This method will always be called for each join, wether or not the channel is actually +l, and determines the outcome of an if statement around the whole section of channel limit checking code. return 1 to explicitly allow the join to go ahead or 0 to ignore the event. Definition at line 343 of file modules.cpp.
.PP
.nf
-341 { return 0; };
+343 { return 0; };
.fi
.SS "bool Module::OnCheckReady (\fBuserrec\fP * user)\fC [virtual]\fP"
.PP
-Called to check if a user who is connecting can now be allowed to register If any modules return false for this function, the user is held in the waiting state until all modules return true. For example a module which implements ident lookups will continue to return false for a user until their ident lookup is completed. Note that the registration timeout for a user overrides these checks, if the registration timeout is reached, the user is disconnected even if modules report that the user is not ready to connect.Definition at line 334 of file modules.cpp.
+Called to check if a user who is connecting can now be allowed to register If any modules return false for this function, the user is held in the waiting state until all modules return true. For example a module which implements ident lookups will continue to return false for a user until their ident lookup is completed. Note that the registration timeout for a user overrides these checks, if the registration timeout is reached, the user is disconnected even if modules report that the user is not ready to connect.Definition at line 336 of file modules.cpp.
.PP
.nf
-334 { return true; };
+336 { return true; };
.fi
.SS "int Module::OnDelBan (\fBuserrec\fP * source, \fBchanrec\fP * channel, std::string banmask)\fC [virtual]\fP"
.PP
-Called whenever a ban is removed from a channel's list. Return a non-zero value to 'eat' the mode change and prevent the ban from being removed.Definition at line 354 of file modules.cpp.
+Called whenever a ban is removed from a channel's list. Return a non-zero value to 'eat' the mode change and prevent the ban from being removed.Definition at line 356 of file modules.cpp.
.PP
.nf
-354 { return 0; };
+356 { return 0; };
.fi
.SS "void Module::OnEvent (\fBEvent\fP * event)\fC [virtual]\fP"
.PP
-Called whenever an \fBEvent\fP class is sent to all module by another module. Please see the documentation of \fBEvent::Send()\fP for further information. The \fBEvent\fP sent can always be assumed to be non-NULL, you should *always* check the value of \fBEvent::GetEventID()\fP before doing anything to the event data, and you should *not* change the event data in any way!Definition at line 348 of file modules.cpp.
+Called whenever an \fBEvent\fP class is sent to all module by another module. Please see the documentation of \fBEvent::Send()\fP for further information. The \fBEvent\fP sent can always be assumed to be non-NULL, you should *always* check the value of \fBEvent::GetEventID()\fP before doing anything to the event data, and you should *not* change the event data in any way!Definition at line 350 of file modules.cpp.
.PP
.nf
-348 { return; };
+350 { return; };
.fi
.SS "int Module::OnExtendedMode (\fBuserrec\fP * user, void * target, char modechar, int type, bool mode_on, \fBstring_list\fP & params)\fC [virtual]\fP"
.PP
-Called whenever an extended mode is to be processed. The type parameter is MT_SERVER, MT_CLIENT or MT_CHANNEL, dependent on where the mode is being changed. mode_on is set when the mode is being set, in which case params contains a list of parameters for the mode as strings. If mode_on is false, the mode is being removed, and parameters may contain the parameters for the mode, dependent on wether they were defined when a mode handler was set up with \fBServer::AddExtendedMode\fP If the mode is a channel mode, target is a chanrec*, and if it is a user mode, target is a userrec*. You must cast this value yourself to make use of it.Definition at line 315 of file modules.cpp.
+Called whenever an extended mode is to be processed. The type parameter is MT_SERVER, MT_CLIENT or MT_CHANNEL, dependent on where the mode is being changed. mode_on is set when the mode is being set, in which case params contains a list of parameters for the mode as strings. If mode_on is false, the mode is being removed, and parameters may contain the parameters for the mode, dependent on wether they were defined when a mode handler was set up with \fBServer::AddExtendedMode\fP If the mode is a channel mode, target is a chanrec*, and if it is a user mode, target is a userrec*. You must cast this value yourself to make use of it.Definition at line 317 of file modules.cpp.
.PP
.nf
-315 { return false; }
+317 { 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 352 of file modules.cpp.
+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 354 of file modules.cpp.
.PP
.nf
-352 { };
+354 { };
.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 351 of file modules.cpp.
+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 353 of file modules.cpp.
.PP
.nf
-351 { };
+353 { };
.fi
.SS "void Module::OnInfo (\fBuserrec\fP * user)\fC [virtual]\fP"
.PP
Called whenever a user types /INFO. The userrec will contain the information of the user who typed the command. Modules may use this method to output their own credits in /INFO (which is the ircd's version of an about box). It is purposefully not possible to modify any info that has already been output, or halt the list. You must write a 371 numeric to the user, containing your info in the following format:
.PP
-<nick> :information hereDefinition at line 318 of file modules.cpp.
+<nick> :information hereDefinition at line 320 of file modules.cpp.
.PP
.nf
-318 { };
+320 { };
.fi
.SS "int Module::OnKill (\fBuserrec\fP * source, \fBuserrec\fP * dest, std::string reason)\fC [virtual]\fP"
.PP
-Called when a client is disconnected by KILL. If a client is killed by a server, e.g. a nickname collision or protocol error, source is NULL. Return 1 from this function to prevent the kill, and 0 from this function to allow it as normal. If you prevent the kill no output will be sent to the client, it is down to your module to generate this information. NOTE: It is NOT advisable to stop kills which originate from servers. If you do so youre risking race conditions, desyncs and worse!Definition at line 329 of file modules.cpp.
+Called when a client is disconnected by KILL. If a client is killed by a server, e.g. a nickname collision or protocol error, source is NULL. Return 1 from this function to prevent the kill, and 0 from this function to allow it as normal. If you prevent the kill no output will be sent to the client, it is down to your module to generate this information. NOTE: It is NOT advisable to stop kills which originate from servers. If you do so youre risking race conditions, desyncs and worse!Definition at line 331 of file modules.cpp.
.PP
.nf
-329 { return 0; };
+331 { return 0; };
.fi
.SS "void Module::OnLoadModule (\fBModule\fP * mod, std::string name)\fC [virtual]\fP"
.PP
-Called whenever a module is loaded. mod will contain a pointer to the module, and string will contain its name, for example m_widgets.so. This function is primary for dependency checking, your module may decide to enable some extra features if it sees that you have for example loaded 'm_killwidgets.so' with 'm_makewidgets.so'. It is highly recommended that modules do *NOT* bail if they cannot satisfy dependencies, but instead operate under reduced functionality, unless the dependency is absolutely neccessary (e.g. a module that extends the features of another module).Definition at line 330 of file modules.cpp.
+Called whenever a module is loaded. mod will contain a pointer to the module, and string will contain its name, for example m_widgets.so. This function is primary for dependency checking, your module may decide to enable some extra features if it sees that you have for example loaded 'm_killwidgets.so' with 'm_makewidgets.so'. It is highly recommended that modules do *NOT* bail if they cannot satisfy dependencies, but instead operate under reduced functionality, unless the dependency is absolutely neccessary (e.g. a module that extends the features of another module).Definition at line 332 of file modules.cpp.
.PP
.nf
-330 { };
+332 { };
.fi
.SS "int Module::OnLocalTopicChange (\fBuserrec\fP * user, \fBchanrec\fP * chan, std::string topic)\fC [virtual]\fP"
.PP
-Called whenever a topic is changed by a local user. Return 1 to deny the topic change, or 0 to allow it.Definition at line 346 of file modules.cpp.
+Called whenever a topic is changed by a local user. Return 1 to deny the topic change, or 0 to allow it.Definition at line 348 of file modules.cpp.
.PP
.nf
-346 { return 0; };
+348 { return 0; };
.fi
.SS "int Module::OnMeshToken (char token, \fBstring_list\fP params, \fBserverrec\fP * source, \fBserverrec\fP * reply, std::string tcp_host, std::string ipaddr, int port)\fC [virtual]\fP"
.PP
-Called whenever an unknown token is received in a server to server link. The token value is the unknown token -- please check that no other modules are using the token that you use. Returning 1 supresses the 'unknown token type' error which is usually sent to all opers with +s. The params list is a list of parameters, and if any parameters start with a colon (:) it is treated as the whole of the last parameter, identical to how RFC messages are handled. source is the sender of the message, and reply is what should be replied to for a unicast message. Note that there are not many messages in the mesh protocol which require unicast messaging. tcp_host is the server name as a string, ipaddr is its ip address in dotted decimal notation and port is the port number it is using.Definition at line 347 of file modules.cpp.
+Called whenever an unknown token is received in a server to server link. The token value is the unknown token -- please check that no other modules are using the token that you use. Returning 1 supresses the 'unknown token type' error which is usually sent to all opers with +s. The params list is a list of parameters, and if any parameters start with a colon (:) it is treated as the whole of the last parameter, identical to how RFC messages are handled. source is the sender of the message, and reply is what should be replied to for a unicast message. Note that there are not many messages in the mesh protocol which require unicast messaging. tcp_host is the server name as a string, ipaddr is its ip address in dotted decimal notation and port is the port number it is using.Definition at line 349 of file modules.cpp.
.PP
.nf
-347 { return 0; };
+349 { return 0; };
.fi
.SS "void Module::OnOper (\fBuserrec\fP * user)\fC [virtual]\fP"
.PP
-Called whenever a user opers locally. The userrec will contain the oper mode 'o' as this function is called after any modifications are made to the user's structure by the core.Definition at line 317 of file modules.cpp.
+Called whenever a user opers locally. The userrec will contain the oper mode 'o' as this function is called after any modifications are made to the user's structure by the core.Definition at line 319 of file modules.cpp.
.PP
.nf
-317 { };
+319 { };
.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 350 of file modules.cpp.
+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 352 of file modules.cpp.
.PP
.nf
-350 { return 0; };
+352 { 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 311 of file modules.cpp.
+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 313 of file modules.cpp.
.PP
.nf
-311 { }
+313 { }
.fi
.SS "void Module::OnPacketTransmit (std::string & data, std::string serv)\fC [virtual]\fP"
.PP
-Called before a packet is transmitted across the irc network between two irc servers. This allows you to easily represent it in the correct ways to implement encryption, compression, digital signatures and anything else you may want to add. This should be regarded as a pre-processor and will be called before ANY other operations within the ircd core program.Definition at line 310 of file modules.cpp.
+Called before a packet is transmitted across the irc network between two irc servers. This allows you to easily represent it in the correct ways to implement encryption, compression, digital signatures and anything else you may want to add. This should be regarded as a pre-processor and will be called before ANY other operations within the ircd core program.Definition at line 312 of file modules.cpp.
.PP
.nf
-310 { }
+312 { }
.fi
.SS "int Module::OnPreCommand (std::string command, char ** parameters, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP"
.PP
-Called whenever any command is about to be executed. This event occurs for all registered commands, wether they are registered in the core, or another module, but it will not occur for invalid commands (e.g. ones which do not exist within the command table). By returning 1 from this method you may prevent the command being executed. If you do this, no output is created by the core, and it is down to your module to produce any output neccessary. Note that unless you return 1, you should not destroy any structures (e.g. by using \fBServer::QuitUser\fP) otherwise when the command's handler function executes after your method returns, it will be passed an invalid pointer to the user object and crash!)Definition at line 333 of file modules.cpp.
+Called whenever any command is about to be executed. This event occurs for all registered commands, wether they are registered in the core, or another module, but it will not occur for invalid commands (e.g. ones which do not exist within the command table). By returning 1 from this method you may prevent the command being executed. If you do this, no output is created by the core, and it is down to your module to produce any output neccessary. Note that unless you return 1, you should not destroy any structures (e.g. by using \fBServer::QuitUser\fP) otherwise when the command's handler function executes after your method returns, it will be passed an invalid pointer to the user object and crash!)Definition at line 335 of file modules.cpp.
.PP
.nf
-333 { return 0; };
+335 { return 0; };
.fi
.SS "int Module::OnRawMode (\fBuserrec\fP * user, \fBchanrec\fP * chan, char mode, std::string param, bool adding, int pcnt)\fC [virtual]\fP"
.PP
-Called whenever a mode character is processed. Return 1 from this function to block the mode character from being processed entirely, so that you may perform your own code instead. Note that this method allows you to override modes defined by other modes, but this is NOT RECOMMENDED!Definition at line 338 of file modules.cpp.
+Called whenever a mode character is processed. Return 1 from this function to block the mode character from being processed entirely, so that you may perform your own code instead. Note that this method allows you to override modes defined by other modes, but this is NOT RECOMMENDED!Definition at line 340 of file modules.cpp.
.PP
.nf
-338 { return 0; };
+340 { return 0; };
.fi
.SS "void Module::OnRawSocketAccept (int fd, std::string ip, int localport)\fC [virtual]\fP"
.PP
-Called immediately after any connection is accepted. This is intended for raw socket processing (e.g. modules which wrap the tcp connection within another library) and provides no information relating to a user record as the connection has not been assigned yet. There are no return values from this call as all modules get an opportunity if required to process the connection.Definition at line 355 of file modules.cpp.
+Called immediately after any connection is accepted. This is intended for raw socket processing (e.g. modules which wrap the tcp connection within another library) and provides no information relating to a user record as the connection has not been assigned yet. There are no return values from this call as all modules get an opportunity if required to process the connection.Definition at line 357 of file modules.cpp.
.PP
.nf
-355 { };
+357 { };
.fi
.SS "void Module::OnRawSocketClose (int fd)\fC [virtual]\fP"
.PP
-Called immediately before any socket is closed. When this event is called, shutdown() has not yet been called on the socket.Definition at line 357 of file modules.cpp.
+Called immediately before any socket is closed. When this event is called, shutdown() has not yet been called on the socket.Definition at line 359 of file modules.cpp.
.PP
.nf
-357 { };
+359 { };
.fi
.SS "int Module::OnRawSocketRead (int fd, char * buffer, unsigned int count, int & readresult)\fC [virtual]\fP"
.PP
-Called immediately before any read() operation on a client socket in the core. This occurs AFTER the select() or poll() so there is always data waiting to be read when this event occurs. Your event should return 1 if it has handled the reading itself, which prevents the core just using read(). You should place any data read into buffer, up to but NOT GREATER THAN the value of count. The value of readresult must be identical to an actual result that might be returned from the read() system call, for example, number of bytes read upon success, 0 upon EOF or closed socket, and -1 for error. If your function returns a nonzero value, you MUST set readresult.Definition at line 358 of file modules.cpp.
+Called immediately before any read() operation on a client socket in the core. This occurs AFTER the select() or poll() so there is always data waiting to be read when this event occurs. Your event should return 1 if it has handled the reading itself, which prevents the core just using read(). You should place any data read into buffer, up to but NOT GREATER THAN the value of count. The value of readresult must be identical to an actual result that might be returned from the read() system call, for example, number of bytes read upon success, 0 upon EOF or closed socket, and -1 for error. If your function returns a nonzero value, you MUST set readresult.Definition at line 360 of file modules.cpp.
.PP
.nf
-358 { return 0; };
+360 { return 0; };
.fi
.SS "int Module::OnRawSocketWrite (int fd, char * buffer, int count)\fC [virtual]\fP"
.PP
-Called immediately before any write() operation on a user's socket in the core. Because this event is a low level event no user information is associated with it. It is intended for use by modules which may wrap connections within another API such as SSL for example. return a non-zero result if you have handled the write operation, in which case the core will not call write().Definition at line 356 of file modules.cpp.
+Called immediately before any write() operation on a user's socket in the core. Because this event is a low level event no user information is associated with it. It is intended for use by modules which may wrap connections within another API such as SSL for example. return a non-zero result if you have handled the write operation, in which case the core will not call write().Definition at line 358 of file modules.cpp.
.PP
.nf
-356 { return 0; };
+358 { return 0; };
.fi
.SS "void Module::OnRehash ()\fC [virtual]\fP"
.PP
-Called on rehash. This method is called prior to a /REHASH or when a SIGHUP is received from the operating system. You should use it to reload any files so that your module keeps in step with the rest of the application.Definition at line 312 of file modules.cpp.
+Called on rehash. This method is called prior to a /REHASH or when a SIGHUP is received from the operating system. You should use it to reload any files so that your module keeps in step with the rest of the application.Definition at line 314 of file modules.cpp.
.PP
.nf
-312 { }
+314 { }
.fi
.SS "char * Module::OnRequest (\fBRequest\fP * request)\fC [virtual]\fP"
.PP
-Called whenever a \fBRequest\fP class is sent to your module by another module. Please see the documentation of \fBRequest::Send()\fP for further information. The \fBRequest\fP sent can always be assumed to be non-NULL, you should not change the request object or its data. Your method may return arbitary data in the char* result which the requesting module may be able to use for pre-determined purposes (e.g. the results of an SQL query, etc).Definition at line 349 of file modules.cpp.
+Called whenever a \fBRequest\fP class is sent to your module by another module. Please see the documentation of \fBRequest::Send()\fP for further information. The \fBRequest\fP sent can always be assumed to be non-NULL, you should not change the request object or its data. Your method may return arbitary data in the char* result which the requesting module may be able to use for pre-determined purposes (e.g. the results of an SQL query, etc).Definition at line 351 of file modules.cpp.
.PP
Referenced by Request::Send().
.PP
.nf
-349 { return NULL; };
+351 { return NULL; };
.fi
.SS "void Module::OnSendList (\fBuserrec\fP * user, \fBchanrec\fP * channel, char mode)\fC [virtual]\fP"
.PP
-Called whenever a list is needed for a listmode. For example, when a /MODE #channel +b (without any other parameters) is called, if a module was handling +b this function would be called. The function can then output any lists it wishes to. Please note that all modules will see all mode characters to provide the ability to extend each other, so please only output a list if the mode character given matches the one(s) you want to handle.Definition at line 332 of file modules.cpp.
+Called whenever a list is needed for a listmode. For example, when a /MODE #channel +b (without any other parameters) is called, if a module was handling +b this function would be called. The function can then output any lists it wishes to. Please note that all modules will see all mode characters to provide the ability to extend each other, so please only output a list if the mode character given matches the one(s) you want to handle.Definition at line 334 of file modules.cpp.
.PP
.nf
-332 { };
+334 { };
.fi
.SS "void Module::OnServerRaw (std::string & raw, bool inbound, \fBuserrec\fP * user)\fC [virtual]\fP"
.PP
-Called when a raw command is transmitted or received. This method is the lowest level of handler available to a module. It will be called with raw data which is passing through a connected socket. If you wish, you may munge this data by changing the string parameter 'raw'. If you do this, after your function exits it will immediately be cut down to 510 characters plus a carriage return and linefeed. For INBOUND messages only (where inbound is set to true) the value of user will be the userrec of the connection sending the data. This is not possible for outbound data because the data may be being routed to multiple targets.Definition at line 313 of file modules.cpp.
+Called when a raw command is transmitted or received. This method is the lowest level of handler available to a module. It will be called with raw data which is passing through a connected socket. If you wish, you may munge this data by changing the string parameter 'raw'. If you do this, after your function exits it will immediately be cut down to 510 characters plus a carriage return and linefeed. For INBOUND messages only (where inbound is set to true) the value of user will be the userrec of the connection sending the data. This is not possible for outbound data because the data may be being routed to multiple targets.Definition at line 315 of file modules.cpp.
.PP
.nf
-313 { }
+315 { }
.fi
.SS "void Module::OnStats (char symbol)\fC [virtual]\fP"
.PP
-Called on all /STATS commands This method is triggered for all /STATS use, including stats symbols handled by the core. Definition at line 343 of file modules.cpp.
+Called on all /STATS commands This method is triggered for all /STATS use, including stats symbols handled by the core. Definition at line 345 of file modules.cpp.
.PP
.nf
-343 { };
+345 { };
.fi
.SS "void Module::OnUserConnect (\fBuserrec\fP * user)\fC [virtual]\fP"
.PP
-Called when a user connects. The details of the connecting user are available to you in the parameter userrec *userDefinition at line 305 of file modules.cpp.
+Called when a user connects. The details of the connecting user are available to you in the parameter userrec *userDefinition at line 307 of file modules.cpp.
.PP
.nf
-305 { }
+307 { }
.fi
.SS "void Module::OnUserDisconnect (\fBuserrec\fP * user)\fC [virtual]\fP"
.PP
-Called whenever a user's socket is closed. The details of the exiting user are available to you in the parameter userrec *user This event is called for all users, registered or not, as a cleanup method for modules which might assign resources to user, such as dns lookups, objects and sockets.Definition at line 307 of file modules.cpp.
+Called whenever a user's socket is closed. The details of the exiting user are available to you in the parameter userrec *user This event is called for all users, registered or not, as a cleanup method for modules which might assign resources to user, such as dns lookups, objects and sockets.Definition at line 309 of file modules.cpp.
.PP
.nf
-307 { }
+309 { }
.fi
.SS "void Module::OnUserJoin (\fBuserrec\fP * user, \fBchanrec\fP * channel)\fC [virtual]\fP"
.PP
-Called when a user joins a channel. The details of the joining user are available to you in the parameter userrec *user, and the details of the channel they have joined is available in the variable chanrec *channelDefinition at line 308 of file modules.cpp.
+Called when a user joins a channel. The details of the joining user are available to you in the parameter userrec *user, and the details of the channel they have joined is available in the variable chanrec *channelDefinition at line 310 of file modules.cpp.
.PP
.nf
-308 { }
+310 { }
.fi
.SS "void Module::OnUserKick (\fBuserrec\fP * source, \fBuserrec\fP * user, \fBchanrec\fP * chan, std::string reason)\fC [virtual]\fP"
.PP
-Called whenever a user is kicked. If this method is called, the kick is already underway and cannot be prevented, so to prevent a kick, please use \fBModule::OnUserPreKick\fP instead of this method.Definition at line 337 of file modules.cpp.
+Called whenever a user is kicked. If this method is called, the kick is already underway and cannot be prevented, so to prevent a kick, please use \fBModule::OnUserPreKick\fP instead of this method.Definition at line 339 of file modules.cpp.
.PP
.nf
-337 { };
+339 { };
.fi
.SS "void Module::OnUserPart (\fBuserrec\fP * user, \fBchanrec\fP * channel)\fC [virtual]\fP"
.PP
-Called when a user parts a channel. The details of the leaving user are available to you in the parameter userrec *user, and the details of the channel they have left is available in the variable chanrec *channelDefinition at line 309 of file modules.cpp.
+Called when a user parts a channel. The details of the leaving user are available to you in the parameter userrec *user, and the details of the channel they have left is available in the variable chanrec *channelDefinition at line 311 of file modules.cpp.
.PP
.nf
-309 { }
+311 { }
.fi
.SS "void Module::OnUserPostNick (\fBuserrec\fP * user, std::string oldnick)\fC [virtual]\fP"
.PP
-Called after any nickchange, local or remote. This can be used to track users after nickchanges have been applied. Please note that although you can see remote nickchanges through this function, you should NOT make any changes to the userrec if the user is a remote user as this may cause a desnyc. check user->server before taking any action (including returning nonzero from the method). Because this method is called after the nickchange is taken place, no return values are possible to indicate forbidding of the nick change. Use OnUserPreNick for this. Definition at line 324 of file modules.cpp.
+Called after any nickchange, local or remote. This can be used to track users after nickchanges have been applied. Please note that although you can see remote nickchanges through this function, you should NOT make any changes to the userrec if the user is a remote user as this may cause a desnyc. check user->server before taking any action (including returning nonzero from the method). Because this method is called after the nickchange is taken place, no return values are possible to indicate forbidding of the nick change. Use OnUserPreNick for this. Definition at line 326 of file modules.cpp.
.PP
.nf
-324 { };
+326 { };
.fi
.SS "int Module::OnUserPreInvite (\fBuserrec\fP * source, \fBuserrec\fP * dest, \fBchanrec\fP * channel)\fC [virtual]\fP"
.PP
-Called whenever a user is about to invite another user into a channel, before any processing is done. Returning 1 from this function stops the process immediately, causing no output to be sent to the user by the core. If you do this you must produce your own numerics, notices etc. This is useful for modules which may want to filter invites to channels.Definition at line 320 of file modules.cpp.
+Called whenever a user is about to invite another user into a channel, before any processing is done. Returning 1 from this function stops the process immediately, causing no output to be sent to the user by the core. If you do this you must produce your own numerics, notices etc. This is useful for modules which may want to filter invites to channels.Definition at line 322 of file modules.cpp.
.PP
.nf
-320 { return 0; };
+322 { return 0; };
.fi
.SS "int Module::OnUserPreJoin (\fBuserrec\fP * user, \fBchanrec\fP * chan, const char * cname)\fC [virtual]\fP"
.PP
@@ -620,68 +620,68 @@ Called whenever a user is about to join a channel, before any processing is done
.PP
IMPORTANT NOTE!
.PP
-If the user joins a NEW channel which does not exist yet, OnUserPreJoin will be called BEFORE the channel record is created. This will cause chanrec* chan to be NULL. There is very little you can do in form of processing on the actual channel record at this point, however the channel NAME will still be passed in char* cname, so that you could for example implement a channel blacklist or whitelist, etc.Definition at line 314 of file modules.cpp.
+If the user joins a NEW channel which does not exist yet, OnUserPreJoin will be called BEFORE the channel record is created. This will cause chanrec* chan to be NULL. There is very little you can do in form of processing on the actual channel record at this point, however the channel NAME will still be passed in char* cname, so that you could for example implement a channel blacklist or whitelist, etc.Definition at line 316 of file modules.cpp.
.PP
.nf
-314 { return 0; }
+316 { return 0; }
.fi
.SS "int Module::OnUserPreKick (\fBuserrec\fP * source, \fBuserrec\fP * user, \fBchanrec\fP * chan, std::string reason)\fC [virtual]\fP"
.PP
-Called whenever a user is about to be kicked. Returning a value of 1 from this function stops the process immediately, causing no output to be sent to the user by the core. If you do this you must produce your own numerics, notices etc. Definition at line 336 of file modules.cpp.
+Called whenever a user is about to be kicked. Returning a value of 1 from this function stops the process immediately, causing no output to be sent to the user by the core. If you do this you must produce your own numerics, notices etc. Definition at line 338 of file modules.cpp.
.PP
.nf
-336 { return 0; };
+338 { return 0; };
.fi
.SS "int Module::OnUserPreMessage (\fBuserrec\fP * user, void * dest, int target_type, std::string & text)\fC [virtual]\fP"
.PP
-Called whenever a user is about to PRIVMSG A user or a channel, before any processing is done. Returning any nonzero value from this function stops the process immediately, causing no output to be sent to the user by the core. If you do this you must produce your own numerics, notices etc. This is useful for modules which may want to filter or redirect messages. target_type can be one of TYPE_USER or TYPE_CHANNEL. If the target_type value is a user, you must cast dest to a userrec* otherwise you must cast it to a chanrec*, this is the details of where the message is destined to be sent.Definition at line 321 of file modules.cpp.
+Called whenever a user is about to PRIVMSG A user or a channel, before any processing is done. Returning any nonzero value from this function stops the process immediately, causing no output to be sent to the user by the core. If you do this you must produce your own numerics, notices etc. This is useful for modules which may want to filter or redirect messages. target_type can be one of TYPE_USER or TYPE_CHANNEL. If the target_type value is a user, you must cast dest to a userrec* otherwise you must cast it to a chanrec*, this is the details of where the message is destined to be sent.Definition at line 323 of file modules.cpp.
.PP
.nf
-321 { return 0; };
+323 { return 0; };
.fi
.SS "int Module::OnUserPreNick (\fBuserrec\fP * user, std::string newnick)\fC [virtual]\fP"
.PP
-Called before any nickchange, local or remote. This can be used to implement Q-lines etc. Please note that although you can see remote nickchanges through this function, you should NOT make any changes to the userrec if the user is a remote user as this may cause a desnyc. check user->server before taking any action (including returning nonzero from the method). If your method returns nonzero, the nickchange is silently forbidden, and it is down to your module to generate some meaninful output.Definition at line 323 of file modules.cpp.
+Called before any nickchange, local or remote. This can be used to implement Q-lines etc. Please note that although you can see remote nickchanges through this function, you should NOT make any changes to the userrec if the user is a remote user as this may cause a desnyc. check user->server before taking any action (including returning nonzero from the method). If your method returns nonzero, the nickchange is silently forbidden, and it is down to your module to generate some meaninful output.Definition at line 325 of file modules.cpp.
.PP
.nf
-323 { return 0; };
+325 { return 0; };
.fi
.SS "int Module::OnUserPreNotice (\fBuserrec\fP * user, void * dest, int target_type, std::string & text)\fC [virtual]\fP"
.PP
-Called whenever a user is about to NOTICE A user or a channel, before any processing is done. Returning any nonzero value from this function stops the process immediately, causing no output to be sent to the user by the core. If you do this you must produce your own numerics, notices etc. This is useful for modules which may want to filter or redirect messages. target_type can be one of TYPE_USER or TYPE_CHANNEL. If the target_type value is a user, you must cast dest to a userrec* otherwise you must cast it to a chanrec*, this is the details of where the message is destined to be sent. You may alter the message text as you wish before relinquishing control to the next module in the chain, and if no other modules block the text this altered form of the text will be sent out to the user and possibly to other servers.Definition at line 322 of file modules.cpp.
+Called whenever a user is about to NOTICE A user or a channel, before any processing is done. Returning any nonzero value from this function stops the process immediately, causing no output to be sent to the user by the core. If you do this you must produce your own numerics, notices etc. This is useful for modules which may want to filter or redirect messages. target_type can be one of TYPE_USER or TYPE_CHANNEL. If the target_type value is a user, you must cast dest to a userrec* otherwise you must cast it to a chanrec*, this is the details of where the message is destined to be sent. You may alter the message text as you wish before relinquishing control to the next module in the chain, and if no other modules block the text this altered form of the text will be sent out to the user and possibly to other servers.Definition at line 324 of file modules.cpp.
.PP
.nf
-322 { return 0; };
+324 { return 0; };
.fi
.SS "void Module::OnUserQuit (\fBuserrec\fP * user)\fC [virtual]\fP"
.PP
-Called when a user quits. The details of the exiting user are available to you in the parameter userrec *user This event is only called when the user is fully registered when they quit. To catch raw disconnections, use the OnUserDisconnect method.Definition at line 306 of file modules.cpp.
+Called when a user quits. The details of the exiting user are available to you in the parameter userrec *user This event is only called when the user is fully registered when they quit. To catch raw disconnections, use the OnUserDisconnect method.Definition at line 308 of file modules.cpp.
.PP
.nf
-306 { }
+308 { }
.fi
.SS "void Module::OnUserRegister (\fBuserrec\fP * user)\fC [virtual]\fP"
.PP
-Called whenever a user is about to register their connection (e.g. before the user is sent the MOTD etc). Modules can use this method if they are performing a function which must be done before the actual connection is completed (e.g. ident lookups, dnsbl lookups, etc). Note that you should NOT delete the user record here by causing a disconnection! Use OnUserConnect for that instead.Definition at line 335 of file modules.cpp.
+Called whenever a user is about to register their connection (e.g. before the user is sent the MOTD etc). Modules can use this method if they are performing a function which must be done before the actual connection is completed (e.g. ident lookups, dnsbl lookups, etc). Note that you should NOT delete the user record here by causing a disconnection! Use OnUserConnect for that instead.Definition at line 337 of file modules.cpp.
.PP
.nf
-335 { };
+337 { };
.fi
.SS "\fBstring_list\fP Module::OnUserSync (\fBuserrec\fP * user)\fC [virtual]\fP"
.PP
-Called during a netburst to sync user data. This is called during the netburst on a per-user basis. You should use this call to up any special user-related things which are implemented by your module, e.g. sending listmodes. You may return multiple commands in the string_list.Definition at line 326 of file modules.cpp.
+Called during a netburst to sync user data. This is called during the netburst on a per-user basis. You should use this call to up any special user-related things which are implemented by your module, e.g. sending listmodes. You may return multiple commands in the string_list.Definition at line 328 of file modules.cpp.
.PP
References string_list.
.PP
.nf
-326 { string_list empty; return empty; }
+328 { string_list empty; return empty; }
.fi
.SS "void Module::OnWhois (\fBuserrec\fP * source, \fBuserrec\fP * dest)\fC [virtual]\fP"
.PP
-Called whenever a /WHOIS is performed on a local user. The source parameter contains the details of the user who issued the WHOIS command, and the dest parameter contains the information of the user they are whoising.Definition at line 319 of file modules.cpp.
+Called whenever a /WHOIS is performed on a local user. The source parameter contains the details of the user who issued the WHOIS command, and the dest parameter contains the information of the user they are whoising.Definition at line 321 of file modules.cpp.
.PP
.nf
-319 { };
+321 { };
.fi
diff --git a/docs/man/man3/ModuleFactory.3 b/docs/man/man3/ModuleFactory.3
index 46e42232e..884c19c8e 100644
--- a/docs/man/man3/ModuleFactory.3
+++ b/docs/man/man3/ModuleFactory.3
@@ -1,4 +1,4 @@
-.TH "ModuleFactory" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "ModuleFactory" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/ModuleMessage.3 b/docs/man/man3/ModuleMessage.3
index fe20514cf..87999becd 100644
--- a/docs/man/man3/ModuleMessage.3
+++ b/docs/man/man3/ModuleMessage.3
@@ -1,4 +1,4 @@
-.TH "ModuleMessage" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "ModuleMessage" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/QLine.3 b/docs/man/man3/QLine.3
index af16527a4..e1e9ce90c 100644
--- a/docs/man/man3/QLine.3
+++ b/docs/man/man3/QLine.3
@@ -1,4 +1,4 @@
-.TH "QLine" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "QLine" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/Request.3 b/docs/man/man3/Request.3
index 84b7c3f8f..5d83d6961 100644
--- a/docs/man/man3/Request.3
+++ b/docs/man/man3/Request.3
@@ -1,4 +1,4 @@
-.TH "Request" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "Request" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -63,65 +63,65 @@ Definition at line 154 of file modules.h.
.PP
.SS "Request::Request (char * anydata, \fBModule\fP * src, \fBModule\fP * dst)"
.PP
-Create a new Request. Definition at line 249 of file modules.cpp.
+Create a new Request. Definition at line 251 of file modules.cpp.
.PP
.nf
-249 : data(anydata), source(src), dest(dst) { };
+251 : data(anydata), source(src), dest(dst) { };
.fi
.SH "Member Function Documentation"
.PP
.SS "char * Request::GetData ()"
.PP
-Fetch the Request data. Definition at line 251 of file modules.cpp.
+Fetch the Request data. Definition at line 253 of file modules.cpp.
.PP
References data.
.PP
.nf
-252 {
-253 return this->data;
-254 }
+254 {
+255 return this->data;
+256 }
.fi
.SS "\fBModule\fP * Request::GetDest ()"
.PP
-Fetch the request destination (should be 'this' in the receiving module). Definition at line 261 of file modules.cpp.
+Fetch the request destination (should be 'this' in the receiving module). Definition at line 263 of file modules.cpp.
.PP
References dest.
.PP
.nf
-262 {
-263 return this->dest;
-264 }
+264 {
+265 return this->dest;
+266 }
.fi
.SS "\fBModule\fP * Request::GetSource ()"
.PP
-Fetch the request source. Definition at line 256 of file modules.cpp.
+Fetch the request source. Definition at line 258 of file modules.cpp.
.PP
References source.
.PP
.nf
-257 {
-258 return this->source;
-259 }
+259 {
+260 return this->source;
+261 }
.fi
.SS "char * Request::Send ()\fC [virtual]\fP"
.PP
Send the Request. Upon returning the result will be arbitary data returned by the module you sent the request to. It is up to your module to know what this data is and how to deal with it. Implements \fBModuleMessage\fP.
.PP
-Definition at line 266 of file modules.cpp.
+Definition at line 268 of file modules.cpp.
.PP
References dest, and Module::OnRequest().
.PP
.nf
-267 {
-268 if (this->dest)
-269 {
-270 return dest->OnRequest(this);
-271 }
-272 else
-273 {
-274 return NULL;
-275 }
-276 }
+269 {
+270 if (this->dest)
+271 {
+272 return dest->OnRequest(this);
+273 }
+274 else
+275 {
+276 return NULL;
+277 }
+278 }
.fi
.SH "Member Data Documentation"
.PP
diff --git a/docs/man/man3/Server.3 b/docs/man/man3/Server.3
index db0f29ac6..f8e40edc4 100644
--- a/docs/man/man3/Server.3
+++ b/docs/man/man3/Server.3
@@ -1,4 +1,4 @@
-.TH "Server" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "Server" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -271,19 +271,19 @@ Definition at line 694 of file modules.h.
.PP
.SS "Server::Server ()"
.PP
-Default constructor. Creates a Server object.Definition at line 364 of file modules.cpp.
+Default constructor. Creates a Server object.Definition at line 366 of file modules.cpp.
.PP
.nf
-365 {
-366 }
+367 {
+368 }
.fi
.SS "Server::~\fBServer\fP ()\fC [virtual]\fP"
.PP
-Default destructor. Destroys a Server object.Definition at line 368 of file modules.cpp.
+Default destructor. Destroys a Server object.Definition at line 370 of file modules.cpp.
.PP
.nf
-369 {
-370 }
+371 {
+372 }
.fi
.SH "Member Function Documentation"
.PP
@@ -293,25 +293,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 437 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 439 of file modules.cpp.
.PP
References createcommand().
.PP
.nf
-438 {
-439 createcommand(cmd,f,flags,minparams,source);
-440 }
+440 {
+441 createcommand(cmd,f,flags,minparams,source);
+442 }
.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 699 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 701 of file modules.cpp.
.PP
References add_eline(), and duration().
.PP
.nf
-700 {
-701 add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
-702 }
+702 {
+703 add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
+704 }
.fi
.SS "bool Server::AddExtendedListMode (char modechar)\fC [virtual]\fP"
.PP
@@ -325,549 +325,549 @@ 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 605 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 607 of file modules.cpp.
.PP
References DoAddExtendedMode(), ModeMakeList(), and MT_CHANNEL.
.PP
.nf
-606 {
-607 bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1);
-608 if (res)
-609 ModeMakeList(modechar);
-610 return res;
-611 }
+608 {
+609 bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1);
+610 if (res)
+611 ModeMakeList(modechar);
+612 return res;
+613 }
.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 577 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 579 of file modules.cpp.
.PP
References DEBUG, DoAddExtendedMode(), MT_CLIENT, and MT_SERVER.
.PP
.nf
-578 {
-579 if (((modechar >= 'A') && (modechar <= 'Z')) || ((modechar >= 'a') && (modechar <= 'z')))
-580 {
-581 if (type == MT_SERVER)
-582 {
-583 log(DEBUG,'*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion');
-584 return false;
-585 }
-586 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT))
-587 {
-588 log(DEBUG,'*** API ERROR *** Parameters on MT_CLIENT modes are not supported');
-589 return false;
-590 }
-591 if ((params_when_on>1) || (params_when_off>1))
-592 {
-593 log(DEBUG,'*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported');
-594 return false;
-595 }
-596 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off);
-597 }
-598 else
-599 {
-600 log(DEBUG,'*** API ERROR *** Muppet modechar detected.');
-601 }
-602 return false;
-603 }
+580 {
+581 if (((modechar >= 'A') && (modechar <= 'Z')) || ((modechar >= 'a') && (modechar <= 'z')))
+582 {
+583 if (type == MT_SERVER)
+584 {
+585 log(DEBUG,'*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion');
+586 return false;
+587 }
+588 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT))
+589 {
+590 log(DEBUG,'*** API ERROR *** Parameters on MT_CLIENT modes are not supported');
+591 return false;
+592 }
+593 if ((params_when_on>1) || (params_when_off>1))
+594 {
+595 log(DEBUG,'*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported');
+596 return false;
+597 }
+598 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off);
+599 }
+600 else
+601 {
+602 log(DEBUG,'*** API ERROR *** Muppet modechar detected.');
+603 }
+604 return false;
+605 }
.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 679 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 681 of file modules.cpp.
.PP
References add_gline(), and duration().
.PP
.nf
-680 {
-681 add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
-682 }
+682 {
+683 add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
+684 }
.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 694 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 696 of file modules.cpp.
.PP
References add_kline(), and duration().
.PP
.nf
-695 {
-696 add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
-697 }
+697 {
+698 add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
+699 }
.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 684 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 686 of file modules.cpp.
.PP
References add_qline(), and duration().
.PP
.nf
-685 {
-686 add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str());
-687 }
+687 {
+688 add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str());
+689 }
.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 689 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 691 of file modules.cpp.
.PP
References add_zline(), and duration().
.PP
.nf
-690 {
-691 add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str());
-692 }
+692 {
+693 add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str());
+694 }
.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 729 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 731 of file modules.cpp.
.PP
References duration().
.PP
.nf
-730 {
-731 return duration(delta.c_str());
-732 }
+732 {
+733 return duration(delta.c_str());
+734 }
.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 427 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 429 of file modules.cpp.
.PP
.nf
-428 {
-429 call_handler(commandname.c_str(),parameters,pcnt,user);
-430 }
+430 {
+431 call_handler(commandname.c_str(),parameters,pcnt,user);
+432 }
.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 520 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 522 of file modules.cpp.
.PP
References ChangeName().
.PP
.nf
-521 {
-522 ChangeName(user,gecos.c_str());
-523 }
+523 {
+524 ChangeName(user,gecos.c_str());
+525 }
.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 515 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 517 of file modules.cpp.
.PP
References ChangeDisplayedHost().
.PP
.nf
-516 {
-517 ChangeDisplayedHost(user,host.c_str());
-518 }
+518 {
+519 ChangeDisplayedHost(user,host.c_str());
+520 }
.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 412 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 414 of file modules.cpp.
.PP
.nf
-413 {
-414 force_nickchange(user,nickname.c_str());
-415 }
+415 {
+416 force_nickchange(user,nickname.c_str());
+417 }
.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 545 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 547 of file modules.cpp.
.PP
References cmode().
.PP
.nf
-546 {
-547 return cmode(User,Chan);
-548 }
+548 {
+549 return cmode(User,Chan);
+550 }
.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 493 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 495 of file modules.cpp.
.PP
References common_channels().
.PP
.nf
-494 {
-495 return (common_channels(u1,u2) != 0);
-496 }
+496 {
+497 return (common_channels(u1,u2) != 0);
+498 }
.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 613 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 615 of file modules.cpp.
.PP
.nf
-614 {
-615 return usercount(c);
-616 }
+616 {
+617 return usercount(c);
+618 }
.fi
.SS "bool Server::DelELine (std::string hostmask)\fC [virtual]\fP"
.PP
-Deletes a local E-Line. Definition at line 724 of file modules.cpp.
+Deletes a local E-Line. Definition at line 726 of file modules.cpp.
.PP
References del_eline().
.PP
.nf
-725 {
-726 del_eline(hostmask.c_str());
-727 }
+727 {
+728 del_eline(hostmask.c_str());
+729 }
.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 704 of file modules.cpp.
+Deletes a G-Line from all servers on the mesh. Definition at line 706 of file modules.cpp.
.PP
References del_gline().
.PP
.nf
-705 {
-706 del_gline(hostmask.c_str());
-707 }
+707 {
+708 del_gline(hostmask.c_str());
+709 }
.fi
.SS "bool Server::DelKLine (std::string hostmask)\fC [virtual]\fP"
.PP
-Deletes a local K-Line. Definition at line 719 of file modules.cpp.
+Deletes a local K-Line. Definition at line 721 of file modules.cpp.
.PP
References del_kline().
.PP
.nf
-720 {
-721 del_kline(hostmask.c_str());
-722 }
+722 {
+723 del_kline(hostmask.c_str());
+724 }
.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 709 of file modules.cpp.
+Deletes a Q-Line from all servers on the mesh. Definition at line 711 of file modules.cpp.
.PP
References del_qline().
.PP
.nf
-710 {
-711 del_qline(nickname.c_str());
-712 }
+712 {
+713 del_qline(nickname.c_str());
+714 }
.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 714 of file modules.cpp.
+Deletes a Z-Line from all servers on the mesh. Definition at line 716 of file modules.cpp.
.PP
References del_zline().
.PP
.nf
-715 {
-716 del_zline(ipaddr.c_str());
-717 }
+717 {
+718 del_zline(ipaddr.c_str());
+719 }
.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 540 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 542 of file modules.cpp.
.PP
.nf
-541 {
-542 return FindChan(channel.c_str());
-543 }
+543 {
+544 return FindChan(channel.c_str());
+545 }
.fi
.SS "\fBuserrec\fP * Server::FindDescriptor (int socket)\fC [virtual]\fP"
.PP
-Attempts to look up a nick using the file descriptor associated with that nick. This function will return NULL if the file descriptor is not associated with a valid user.Definition at line 535 of file modules.cpp.
+Attempts to look up a nick using the file descriptor associated with that nick. This function will return NULL if the file descriptor is not associated with a valid user.Definition at line 537 of file modules.cpp.
.PP
References fd_ref_table.
.PP
.nf
-536 {
-537 return (socket < 65536 ? fd_ref_table[socket] : NULL);
-538 }
+538 {
+539 return (socket < 65536 ? fd_ref_table[socket] : NULL);
+540 }
.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 807 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 809 of file modules.cpp.
.PP
References MODCOUNT, module_names, and modules.
.PP
.nf
-808 {
-809 for (int i = 0; i <= MODCOUNT; i++)
-810 {
-811 if (module_names[i] == name)
-812 {
-813 return modules[i];
-814 }
-815 }
-816 return NULL;
-817 }
+810 {
+811 for (int i = 0; i <= MODCOUNT; i++)
+812 {
+813 if (module_names[i] == name)
+814 {
+815 return modules[i];
+816 }
+817 }
+818 return NULL;
+819 }
.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 530 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 532 of file modules.cpp.
.PP
.nf
-531 {
-532 return Find(nick);
-533 }
+533 {
+534 return Find(nick);
+535 }
.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 570 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 572 of file modules.cpp.
.PP
.nf
-571 {
-572 return Admin(getadminname(),getadminemail(),getadminnick());
-573 }
+573 {
+574 return Admin(getadminname(),getadminemail(),getadminnick());
+575 }
.fi
.SS "std::string Server::GetNetworkName ()\fC [virtual]\fP"
.PP
-Returns the network name, global to all linked servers. Definition at line 560 of file modules.cpp.
+Returns the network name, global to all linked servers. Definition at line 562 of file modules.cpp.
.PP
.nf
-561 {
-562 return getnetworkname();
-563 }
+563 {
+564 return getnetworkname();
+565 }
.fi
.SS "std::string Server::GetServerDescription ()\fC [virtual]\fP"
.PP
-Returns the server description string of the local server. Definition at line 565 of file modules.cpp.
+Returns the server description string of the local server. Definition at line 567 of file modules.cpp.
.PP
.nf
-566 {
-567 return getserverdesc();
-568 }
+568 {
+569 return getserverdesc();
+570 }
.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 555 of file modules.cpp.
+Returns the server name of the server where the module is loaded. Definition at line 557 of file modules.cpp.
.PP
.nf
-556 {
-557 return getservername();
-558 }
+558 {
+559 return getservername();
+560 }
.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 400 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 402 of file modules.cpp.
.PP
References chanuserlist, chanrec::GetUsers(), and list.
.PP
.nf
-401 {
-402 chanuserlist userl;
-403 userl.clear();
-404 std::vector<char*> *list = chan->GetUsers();
-405 for (std::vector<char*>::iterator i = list->begin(); i != list->end(); i++)
-406 {
-407 char* o = *i;
-408 userl.push_back((userrec*)o);
-409 }
-410 return userl;
-411 }
+403 {
+404 chanuserlist userl;
+405 userl.clear();
+406 std::vector<char*> *list = chan->GetUsers();
+407 for (std::vector<char*>::iterator i = list->begin(); i != list->end(); i++)
+408 {
+409 char* o = *i;
+410 userl.push_back((userrec*)o);
+411 }
+412 return userl;
+413 }
.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 525 of file modules.cpp.
+Returns true if a nick is valid. Nicks for unregistered connections will return false.Definition at line 527 of file modules.cpp.
.PP
References isnick().
.PP
.nf
-526 {
-527 return (isnick(nick.c_str()) != 0);
-528 }
+528 {
+529 return (isnick(nick.c_str()) != 0);
+530 }
.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 550 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 552 of file modules.cpp.
.PP
References has_channel().
.PP
.nf
-551 {
-552 return has_channel(User,Chan);
-553 }
+553 {
+554 return has_channel(User,Chan);
+555 }
.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 422 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 424 of file modules.cpp.
.PP
References is_uline().
.PP
.nf
-423 {
-424 return is_uline(server.c_str());
-425 }
+425 {
+426 return is_uline(server.c_str());
+427 }
.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 734 of file modules.cpp.
+Returns true if a nick!ident string is correctly formatted, false if otherwise. Definition at line 736 of file modules.cpp.
.PP
.nf
-735 {
-736 const char* dest = mask.c_str();
-737 if (strchr(dest,'!')==0)
-738 return false;
-739 if (strchr(dest,'@')==0)
+737 {
+738 const char* dest = mask.c_str();
+739 if (strchr(dest,'!')==0)
740 return false;
-741 for (int i = 0; i < strlen(dest); i++)
-742 if (dest[i] < 32)
-743 return false;
-744 for (int i = 0; i < strlen(dest); i++)
-745 if (dest[i] > 126)
-746 return false;
-747 int c = 0;
-748 for (int i = 0; i < strlen(dest); i++)
-749 if (dest[i] == '!')
-750 c++;
-751 if (c>1)
-752 return false;
-753 c = 0;
-754 for (int i = 0; i < strlen(dest); i++)
-755 if (dest[i] == '@')
-756 c++;
-757 if (c>1)
-758 return false;
-759
-760 return true;
-761 }
+741 if (strchr(dest,'@')==0)
+742 return false;
+743 for (int i = 0; i < strlen(dest); i++)
+744 if (dest[i] < 32)
+745 return false;
+746 for (int i = 0; i < strlen(dest); i++)
+747 if (dest[i] > 126)
+748 return false;
+749 int c = 0;
+750 for (int i = 0; i < strlen(dest); i++)
+751 if (dest[i] == '!')
+752 c++;
+753 if (c>1)
+754 return false;
+755 c = 0;
+756 for (int i = 0; i < strlen(dest); i++)
+757 if (dest[i] == '@')
+758 c++;
+759 if (c>1)
+760 return false;
+761
+762 return true;
+763 }
.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 390 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 392 of file modules.cpp.
.PP
.nf
-391 {
-392 return add_channel(user,cname.c_str(),key.c_str(),false);
-393 }
+393 {
+394 return add_channel(user,cname.c_str(),key.c_str(),false);
+395 }
.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 432 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 434 of file modules.cpp.
.PP
.nf
-433 {
-434 log(level,'%s',s.c_str());
-435 }
+435 {
+436 log(level,'%s',s.c_str());
+437 }
.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 377 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 379 of file modules.cpp.
.PP
.nf
-378 {
-379 char literal[MAXBUF],pattern[MAXBUF];
-380 strlcpy(literal,sliteral.c_str(),MAXBUF);
-381 strlcpy(pattern,spattern.c_str(),MAXBUF);
-382 return match(literal,pattern);
-383 }
+380 {
+381 char literal[MAXBUF],pattern[MAXBUF];
+382 strlcpy(literal,sliteral.c_str(),MAXBUF);
+383 strlcpy(pattern,spattern.c_str(),MAXBUF);
+384 return match(literal,pattern);
+385 }
.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 789 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 791 of file modules.cpp.
.PP
.nf
-790 {
-791 if (c)
-792 {
-793 return ChanAnyOnThisServer(c,(char*)servername.c_str());
-794 }
-795 else return false;
-796 }
+792 {
+793 if (c)
+794 {
+795 return ChanAnyOnThisServer(c,(char*)servername.c_str());
+796 }
+797 else return false;
+798 }
.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 798 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 800 of file modules.cpp.
.PP
.nf
-799 {
-800 if (u)
-801 {
-802 return CommonOnThisServer(u,(char*)servername.c_str());
-803 }
-804 else return false;
-805 }
+801 {
+802 if (u)
+803 {
+804 return CommonOnThisServer(u,(char*)servername.c_str());
+805 }
+806 else return false;
+807 }
.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 763 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 765 of file modules.cpp.
.PP
.nf
-764 {
-765 NetSendToAll((char*)text.c_str());
-766 }
+766 {
+767 NetSendToAll((char*)text.c_str());
+768 }
.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 774 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 776 of file modules.cpp.
.PP
.nf
-775 {
-776 NetSendToAllAlive((char*)text.c_str());
-777 }
+777 {
+778 NetSendToAllAlive((char*)text.c_str());
+779 }
.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 784 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 786 of file modules.cpp.
.PP
.nf
-785 {
-786 NetSendToAllExcept(target.c_str(),(char*)text.c_str());
-787 }
+787 {
+788 NetSendToAllExcept(target.c_str(),(char*)text.c_str());
+789 }
.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 768 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 770 of file modules.cpp.
.PP
.nf
-769 {
-770 if (user)
-771 NetSendToCommon(user,(char*)text.c_str());
-772 }
+771 {
+772 if (user)
+773 NetSendToCommon(user,(char*)text.c_str());
+774 }
.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 779 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 781 of file modules.cpp.
.PP
.nf
-780 {
-781 NetSendToOne((char*)destination.c_str(),(char*)text.c_str());
-782 }
+782 {
+783 NetSendToOne((char*)destination.c_str(),(char*)text.c_str());
+784 }
.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 395 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 397 of file modules.cpp.
.PP
.nf
-396 {
-397 return del_channel(user,cname.c_str(),reason.c_str(),false);
-398 }
+398 {
+399 return del_channel(user,cname.c_str(),reason.c_str(),false);
+400 }
.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 649 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 651 of file modules.cpp.
.PP
References ucrec::channel, userrec::chans, userrec::ClearBuffer(), connection::fd, FD_MAGIC_NUMBER, fd_ref_table, connection::host, userrec::ident, chanrec::name, userrec::nick, chanrec::setby, chanrec::topic, and chanrec::topicset.
.PP
.nf
-650 {
-651 zombie->fd = alive->fd;
-652 alive->fd = FD_MAGIC_NUMBER;
-653 alive->ClearBuffer();
-654 Write(zombie->fd,':%s!%s@%s NICK %s',alive->nick,alive->ident,alive->host,zombie->nick);
-655 kill_link(alive,message.c_str());
-656 fd_ref_table[zombie->fd] = zombie;
-657 for (int i = 0; i != MAXCHANS; i++)
-658 {
-659 if (zombie->chans[i].channel != NULL)
-660 {
-661 if (zombie->chans[i].channel->name)
-662 {
-663 chanrec* Ptr = zombie->chans[i].channel;
-664 WriteFrom(zombie->fd,zombie,'JOIN %s',Ptr->name);
-665 if (Ptr->topicset)
-666 {
-667 WriteServ(zombie->fd,'332 %s %s :%s', zombie->nick, Ptr->name, Ptr->topic);
-668 WriteServ(zombie->fd,'333 %s %s %s %d', zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset);
-669 }
-670 userlist(zombie,Ptr);
-671 WriteServ(zombie->fd,'366 %s %s :End of /NAMES list.', zombie->nick, Ptr->name);
-672
-673 }
-674 }
-675 }
-676
-677 }
+652 {
+653 zombie->fd = alive->fd;
+654 alive->fd = FD_MAGIC_NUMBER;
+655 alive->ClearBuffer();
+656 Write(zombie->fd,':%s!%s@%s NICK %s',alive->nick,alive->ident,alive->host,zombie->nick);
+657 kill_link(alive,message.c_str());
+658 fd_ref_table[zombie->fd] = zombie;
+659 for (int i = 0; i != MAXCHANS; i++)
+660 {
+661 if (zombie->chans[i].channel != NULL)
+662 {
+663 if (zombie->chans[i].channel->name)
+664 {
+665 chanrec* Ptr = zombie->chans[i].channel;
+666 WriteFrom(zombie->fd,zombie,'JOIN %s',Ptr->name);
+667 if (Ptr->topicset)
+668 {
+669 WriteServ(zombie->fd,'332 %s %s :%s', zombie->nick, Ptr->name, Ptr->topic);
+670 WriteServ(zombie->fd,'333 %s %s %s %d', zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset);
+671 }
+672 userlist(zombie,Ptr);
+673 WriteServ(zombie->fd,'366 %s %s :End of /NAMES list.', zombie->nick, Ptr->name);
+674
+675 }
+676 }
+677 }
+678
+679 }
.fi
.SS "void Server::QuitUser (\fBuserrec\fP * user, std::string reason)\fC [virtual]\fP"
.PP
@@ -875,71 +875,71 @@ 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 417 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 419 of file modules.cpp.
.PP
.nf
-418 {
-419 kill_link(user,reason.c_str());
-420 }
+420 {
+421 kill_link(user,reason.c_str());
+422 }
.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 447 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 449 of file modules.cpp.
.PP
.nf
-448 {
-449 Write(Socket,'%s',s.c_str());
-450 }
+450 {
+451 Write(Socket,'%s',s.c_str());
+452 }
.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 481 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 483 of file modules.cpp.
.PP
.nf
-482 {
-483 if (IncludeSender)
-484 {
-485 WriteChannel(Channel,User,'%s',s.c_str());
-486 }
-487 else
-488 {
-489 ChanExceptSender(Channel,User,'%s',s.c_str());
-490 }
-491 }
+484 {
+485 if (IncludeSender)
+486 {
+487 WriteChannel(Channel,User,'%s',s.c_str());
+488 }
+489 else
+490 {
+491 ChanExceptSender(Channel,User,'%s',s.c_str());
+492 }
+493 }
.fi
.SS "void Server::SendChannelServerNotice (std::string ServName, \fBchanrec\fP * Channel, std::string text)\fC [virtual]\fP"
.PP
-Writes text to a channel, but from a server, including all. This can be used to send server notices to a group of users.Definition at line 476 of file modules.cpp.
+Writes text to a channel, but from a server, including all. This can be used to send server notices to a group of users.Definition at line 478 of file modules.cpp.
.PP
.nf
-477 {
-478 WriteChannelWithServ((char*)ServName.c_str(), Channel, '%s', text.c_str());
-479 }
+479 {
+480 WriteChannelWithServ((char*)ServName.c_str(), Channel, '%s', text.c_str());
+481 }
.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 498 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 500 of file modules.cpp.
.PP
.nf
-499 {
-500 if (IncludeSender)
-501 {
-502 WriteCommon(User,'%s',text.c_str());
-503 }
-504 else
-505 {
-506 WriteCommonExcept(User,'%s',text.c_str());
-507 }
-508 }
+501 {
+502 if (IncludeSender)
+503 {
+504 WriteCommon(User,'%s',text.c_str());
+505 }
+506 else
+507 {
+508 WriteCommonExcept(User,'%s',text.c_str());
+509 }
+510 }
.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 457 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 459 of file modules.cpp.
.PP
.nf
-458 {
-459 WriteFrom(Socket,User,'%s',s.c_str());
-460 }
+460 {
+461 WriteFrom(Socket,User,'%s',s.c_str());
+462 }
.fi
.SS "void Server::SendMode (char ** parameters, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP"
.PP
@@ -957,32 +957,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 442 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 444 of file modules.cpp.
.PP
References server_mode().
.PP
.nf
-443 {
-444 server_mode(parameters,pcnt,user);
-445 }
+445 {
+446 server_mode(parameters,pcnt,user);
+447 }
.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 372 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 374 of file modules.cpp.
.PP
.nf
-373 {
-374 WriteOpers('%s',s.c_str());
-375 }
+375 {
+376 WriteOpers('%s',s.c_str());
+377 }
.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 452 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 454 of file modules.cpp.
.PP
.nf
-453 {
-454 WriteServ(Socket,'%s',s.c_str());
-455 }
+455 {
+456 WriteServ(Socket,'%s',s.c_str());
+457 }
.fi
.SS "void Server::SendTo (\fBuserrec\fP * Source, \fBuserrec\fP * Dest, std::string s)\fC [virtual]\fP"
.PP
@@ -994,23 +994,23 @@ The format will become:
.PP
:localserver TEXT
.PP
-Which is useful for numerics and server notices to single users, etc.Definition at line 462 of file modules.cpp.
+Which is useful for numerics and server notices to single users, etc.Definition at line 464 of file modules.cpp.
.PP
References connection::fd.
.PP
.nf
-463 {
-464 if (!Source)
-465 {
-466 // if source is NULL, then the message originates from the local server
-467 Write(Dest->fd,':%s %s',this->GetServerName().c_str(),s.c_str());
-468 }
-469 else
-470 {
-471 // otherwise it comes from the user specified
-472 WriteTo(Source,Dest,'%s',s.c_str());
-473 }
-474 }
+465 {
+466 if (!Source)
+467 {
+468 // if source is NULL, then the message originates from the local server
+469 Write(Dest->fd,':%s %s',this->GetServerName().c_str(),s.c_str());
+470 }
+471 else
+472 {
+473 // otherwise it comes from the user specified
+474 WriteTo(Source,Dest,'%s',s.c_str());
+475 }
+476 }
.fi
.SS "void Server::SendToModeMask (std::string modes, int flags, std::string text)\fC [virtual]\fP"
.PP
@@ -1018,57 +1018,57 @@ 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 385 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 387 of file modules.cpp.
.PP
.nf
-386 {
-387 WriteMode(modes.c_str(),flags,'%s',text.c_str());
-388 }
+388 {
+389 WriteMode(modes.c_str(),flags,'%s',text.c_str());
+390 }
.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 510 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 512 of file modules.cpp.
.PP
.nf
-511 {
-512 WriteWallOps(User,false,'%s',text.c_str());
-513 }
+513 {
+514 WriteWallOps(User,false,'%s',text.c_str());
+515 }
.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 619 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 621 of file modules.cpp.
.PP
References userrec::ClearBuffer(), DEBUG, connection::fd, FD_MAGIC_NUMBER, connection::host, and userrec::ident.
.PP
.nf
-620 {
-621 unsigned int old_fd = user->fd;
-622 user->fd = FD_MAGIC_NUMBER;
-623 user->ClearBuffer();
-624 Write(old_fd,'ERROR :Closing link (%s@%s) [%s]',user->ident,user->host,message.c_str());
-625 #ifdef USE_KQUEUE
-626 struct kevent ke;
-627 EV_SET(&ke, old_fd, EVFILT_READ, EV_DELETE, 0, 0, NULL);
-628 int i = kevent(kq, &ke, 1, 0, 0, NULL);
-629 if (i == -1)
-630 {
-631 log(DEBUG,'kqueue: Failed to remove user from queue!');
-632 }
-633 #endif
-634 #ifdef USE_EPOLL
-635 struct epoll_event ev;
-636 ev.events = EPOLLIN | EPOLLET;
-637 ev.data.fd = old_fd;
-638 int i = epoll_ctl(ep, EPOLL_CTL_DEL, old_fd, &ev);
-639 if (i < 0)
-640 {
-641 log(DEBUG,'epoll: List deletion failure!');
-642 }
-643 #endif
-644
-645 shutdown(old_fd,2);
-646 close(old_fd);
-647 }
+622 {
+623 unsigned int old_fd = user->fd;
+624 user->fd = FD_MAGIC_NUMBER;
+625 user->ClearBuffer();
+626 Write(old_fd,'ERROR :Closing link (%s@%s) [%s]',user->ident,user->host,message.c_str());
+627 #ifdef USE_KQUEUE
+628 struct kevent ke;
+629 EV_SET(&ke, old_fd, EVFILT_READ, EV_DELETE, 0, 0, NULL);
+630 int i = kevent(kq, &ke, 1, 0, 0, NULL);
+631 if (i == -1)
+632 {
+633 log(DEBUG,'kqueue: Failed to remove user from queue!');
+634 }
+635 #endif
+636 #ifdef USE_EPOLL
+637 struct epoll_event ev;
+638 ev.events = EPOLLIN | EPOLLET;
+639 ev.data.fd = old_fd;
+640 int i = epoll_ctl(ep, EPOLL_CTL_DEL, old_fd, &ev);
+641 if (i < 0)
+642 {
+643 log(DEBUG,'epoll: List deletion failure!');
+644 }
+645 #endif
+646
+647 shutdown(old_fd,2);
+648 close(old_fd);
+649 }
.fi
diff --git a/docs/man/man3/Version.3 b/docs/man/man3/Version.3
index 448ab5904..10c11bca4 100644
--- a/docs/man/man3/Version.3
+++ b/docs/man/man3/Version.3
@@ -1,4 +1,4 @@
-.TH "Version" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "Version" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -49,10 +49,10 @@ Definition at line 111 of file modules.h.
.PP
.SS "Version::Version (int major, int minor, int revision, int build, int flags)"
.PP
-Definition at line 243 of file modules.cpp.
+Definition at line 245 of file modules.cpp.
.PP
.nf
-243 : Major(major), Minor(minor), Revision(revision), Build(build), Flags(flags) { };
+245 : Major(major), Minor(minor), Revision(revision), Build(build), Flags(flags) { };
.fi
.SH "Member Data Documentation"
.PP
diff --git a/docs/man/man3/WhoWasUser.3 b/docs/man/man3/WhoWasUser.3
index acda325ea..9bccb5046 100644
--- a/docs/man/man3/WhoWasUser.3
+++ b/docs/man/man3/WhoWasUser.3
@@ -1,4 +1,4 @@
-.TH "WhoWasUser" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "WhoWasUser" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -17,7 +17,7 @@ WhoWasUser \- A lightweight userrec used by WHOWAS.
.RI "char \fBnick\fP [NICKMAX]"
.br
.ti -1c
-.RI "char \fBident\fP [16]"
+.RI "char \fBident\fP [IDENTMAX+1]"
.br
.ti -1c
.RI "char \fBdhost\fP [160]"
@@ -26,7 +26,7 @@ WhoWasUser \- A lightweight userrec used by WHOWAS.
.RI "char \fBhost\fP [160]"
.br
.ti -1c
-.RI "char \fBfullname\fP [128]"
+.RI "char \fBfullname\fP [MAXGECOS+1]"
.br
.ti -1c
.RI "char \fBserver\fP [256]"
@@ -37,30 +37,30 @@ WhoWasUser \- A lightweight userrec used by WHOWAS.
.in -1c
.SH "Detailed Description"
.PP
-A lightweight userrec used by WHOWAS. Definition at line 326 of file users.h.
+A lightweight userrec used by WHOWAS. Definition at line 325 of file users.h.
.SH "Member Data Documentation"
.PP
.SS "char \fBWhoWasUser::dhost\fP[160]"
.PP
-Definition at line 331 of file users.h.
-.SS "char \fBWhoWasUser::fullname\fP[128]"
+Definition at line 330 of file users.h.
+.SS "char \fBWhoWasUser::fullname\fP[MAXGECOS+1]"
.PP
-Definition at line 333 of file users.h.
+Definition at line 332 of file users.h.
.SS "char \fBWhoWasUser::host\fP[160]"
.PP
-Definition at line 332 of file users.h.
-.SS "char \fBWhoWasUser::ident\fP[16]"
+Definition at line 331 of file users.h.
+.SS "char \fBWhoWasUser::ident\fP[IDENTMAX+1]"
.PP
-Definition at line 330 of file users.h.
+Definition at line 329 of file users.h.
.SS "char \fBWhoWasUser::nick\fP[NICKMAX]"
.PP
-Definition at line 329 of file users.h.
+Definition at line 328 of file users.h.
.SS "char \fBWhoWasUser::server\fP[256]"
.PP
-Definition at line 334 of file users.h.
+Definition at line 333 of file users.h.
.SS "time_t \fBWhoWasUser::signon\fP"
.PP
-Definition at line 335 of file users.h.
+Definition at line 334 of file users.h.
.SH "Author"
.PP
diff --git a/docs/man/man3/XLine.3 b/docs/man/man3/XLine.3
index dfec61ad4..4b1aa3c68 100644
--- a/docs/man/man3/XLine.3
+++ b/docs/man/man3/XLine.3
@@ -1,4 +1,4 @@
-.TH "XLine" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "XLine" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/ZLine.3 b/docs/man/man3/ZLine.3
index 958a51291..f230f3d1f 100644
--- a/docs/man/man3/ZLine.3
+++ b/docs/man/man3/ZLine.3
@@ -1,4 +1,4 @@
-.TH "ZLine" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "ZLine" 3 "30 May 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 2451eaec9..c717153e6 100644
--- a/docs/man/man3/base.h.3
+++ b/docs/man/man3/base.h.3
@@ -1,4 +1,4 @@
-.TH "base.h" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "base.h" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -19,6 +19,10 @@ base.h \-
.in +1c
.ti -1c
+.RI "class \fBBoolSet\fP"
+.br
+.RI "\fIBoolSet is a utility class designed to hold eight bools in a bitmask. \fP"
+.ti -1c
.RI "class \fBclassbase\fP"
.br
.RI "\fIThe base class for all inspircd classes. \fP"
@@ -34,11 +38,29 @@ base.h \-
.RI "typedef void * \fBVoidPointer\fP"
.br
.in -1c
+.SS "Variables"
+
+.in +1c
+.ti -1c
+.RI "const int \fBbitfields\fP [] = {1,2,4,8,16,32,64,128}"
+.br
+.ti -1c
+.RI "const int \fBinverted_bitfields\fP [] = {~1,~2,~4,~8,~16,~32,~64,~128}"
+.br
+.in -1c
.SH "Typedef Documentation"
.PP
.SS "typedef void* \fBVoidPointer\fP"
.PP
Definition at line 25 of file base.h.
+.SH "Variable Documentation"
+.PP
+.SS "const int \fBbitfields\fP[] = {1,2,4,8,16,32,64,128}"
+.PP
+Definition at line 91 of file base.h.
+.SS "const int \fBinverted_bitfields\fP[] = {~1,~2,~4,~8,~16,~32,~64,~128}"
+.PP
+Definition at line 92 of file base.h.
.SH "Author"
.PP
Generated automatically by Doxygen for InspIRCd from the source code.
diff --git a/docs/man/man3/channels.cpp.3 b/docs/man/man3/channels.cpp.3
index ce1ab31a4..a9ef2ee12 100644
--- a/docs/man/man3/channels.cpp.3
+++ b/docs/man/man3/channels.cpp.3
@@ -1,4 +1,4 @@
-.TH "channels.cpp" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "channels.cpp" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -6,14 +6,14 @@ channels.cpp \-
.SH SYNOPSIS
.br
.PP
+\fC#include 'inspircd_config.h'\fP
+.br
\fC#include 'inspircd.h'\fP
.br
\fC#include 'inspircd_io.h'\fP
.br
\fC#include 'inspircd_util.h'\fP
.br
-\fC#include 'inspircd_config.h'\fP
-.br
\fC#include <unistd.h>\fP
.br
\fC#include <sys/errno.h>\fP
@@ -263,7 +263,7 @@ Definition at line 97 of file channels.cpp.
Referenced by IsRoutable().
.SS "int \fBMODCOUNT\fP = -1"
.PP
-Definition at line 1016 of file modules.cpp.
+Definition at line 1019 of file modules.cpp.
.PP
Referenced by Server::FindModule().
.SS "std::vector<std::string> \fBmodule_names\fP"
@@ -309,6 +309,8 @@ Definition at line 65 of file channels.cpp.
.SS "char \fBServerName\fP[MAXBUF]"
.PP
Definition at line 63 of file channels.cpp.
+.PP
+Referenced by userrec::userrec().
.SS "int \fBSERVERportCount\fP"
.PP
Definition at line 90 of file channels.cpp.
diff --git a/docs/man/man3/channels.h.3 b/docs/man/man3/channels.h.3
index 8ef439af1..84ded7a0d 100644
--- a/docs/man/man3/channels.h.3
+++ b/docs/man/man3/channels.h.3
@@ -1,4 +1,4 @@
-.TH "channels.h" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "channels.h" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/chanrec.3 b/docs/man/man3/chanrec.3
index 85a066e63..3f5401779 100644
--- a/docs/man/man3/chanrec.3
+++ b/docs/man/man3/chanrec.3
@@ -1,4 +1,4 @@
-.TH "chanrec" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "chanrec" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/classbase.3 b/docs/man/man3/classbase.3
index ef6d05980..2d962475b 100644
--- a/docs/man/man3/classbase.3
+++ b/docs/man/man3/classbase.3
@@ -1,4 +1,4 @@
-.TH "classbase" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "classbase" 3 "30 May 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 6ead6ef21..ccd08117f 100644
--- a/docs/man/man3/command_t.3
+++ b/docs/man/man3/command_t.3
@@ -1,4 +1,4 @@
-.TH "command_t" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "command_t" 3 "30 May 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 f39d57305..a129fa14e 100644
--- a/docs/man/man3/commands.h.3
+++ b/docs/man/man3/commands.h.3
@@ -1,4 +1,4 @@
-.TH "commands.h" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "commands.h" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/connection.3 b/docs/man/man3/connection.3
index ce6ea9e37..cce6dc268 100644
--- a/docs/man/man3/connection.3
+++ b/docs/man/man3/connection.3
@@ -1,4 +1,4 @@
-.TH "connection" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "connection" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/connection.h.3 b/docs/man/man3/connection.h.3
index bb39452b8..4e15d56f9 100644
--- a/docs/man/man3/connection.h.3
+++ b/docs/man/man3/connection.h.3
@@ -1,4 +1,4 @@
-.TH "connection.h" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "connection.h" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/ctables.h.3 b/docs/man/man3/ctables.h.3
index 82f623cc7..1abb82f4a 100644
--- a/docs/man/man3/ctables.h.3
+++ b/docs/man/man3/ctables.h.3
@@ -1,4 +1,4 @@
-.TH "ctables.h" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "ctables.h" 3 "30 May 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 89c841b4a..1dae58d82 100644
--- a/docs/man/man3/dns.h.3
+++ b/docs/man/man3/dns.h.3
@@ -1,4 +1,4 @@
-.TH "dns.h" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "dns.h" 3 "30 May 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 799018e42..b94b73779 100644
--- a/docs/man/man3/dns_ip4list.3
+++ b/docs/man/man3/dns_ip4list.3
@@ -1,4 +1,4 @@
-.TH "dns_ip4list" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "dns_ip4list" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/hashcomp.h.3 b/docs/man/man3/hashcomp.h.3
index 5736183a8..06d234d52 100644
--- a/docs/man/man3/hashcomp.h.3
+++ b/docs/man/man3/hashcomp.h.3
@@ -1,4 +1,4 @@
-.TH "hashcomp.h" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "hashcomp.h" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/irc.3 b/docs/man/man3/irc.3
index 1d972fbd5..56a91446e 100644
--- a/docs/man/man3/irc.3
+++ b/docs/man/man3/irc.3
@@ -1,4 +1,4 @@
-.TH "irc" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "irc" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/irc_InAddr_HashComp.3 b/docs/man/man3/irc_InAddr_HashComp.3
index 64b936da9..322fd7b74 100644
--- a/docs/man/man3/irc_InAddr_HashComp.3
+++ b/docs/man/man3/irc_InAddr_HashComp.3
@@ -1,4 +1,4 @@
-.TH "irc::InAddr_HashComp" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "irc::InAddr_HashComp" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/irc_StrHashComp.3 b/docs/man/man3/irc_StrHashComp.3
index b77547f8f..ecd16fef2 100644
--- a/docs/man/man3/irc_StrHashComp.3
+++ b/docs/man/man3/irc_StrHashComp.3
@@ -1,4 +1,4 @@
-.TH "irc::StrHashComp" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "irc::StrHashComp" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/irc_irc_char_traits.3 b/docs/man/man3/irc_irc_char_traits.3
index 403416ac6..f6b81a162 100644
--- a/docs/man/man3/irc_irc_char_traits.3
+++ b/docs/man/man3/irc_irc_char_traits.3
@@ -1,4 +1,4 @@
-.TH "irc::irc_char_traits" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "irc::irc_char_traits" 3 "30 May 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 6bd266f7b..7198b4947 100644
--- a/docs/man/man3/ircd_connector.3
+++ b/docs/man/man3/ircd_connector.3
@@ -1,4 +1,4 @@
-.TH "ircd_connector" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "ircd_connector" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -328,7 +328,7 @@ Get the state flags for this connection. \fBReturns:\fP
The state flags associated with this connection
.RE
.PP
-Referenced by IsRoutable(), and serverrec::SendPacket().
+Referenced by serverrec::SendPacket().
.SS "std::string ircd_connector::GetVersionString ()"
.PP
This method returns the version string of the remote server. If the server has no version string an empty string is returned.
diff --git a/docs/man/man3/message.h.3 b/docs/man/man3/message.h.3
index e5330d038..5fbf3852b 100644
--- a/docs/man/man3/message.h.3
+++ b/docs/man/man3/message.h.3
@@ -1,4 +1,4 @@
-.TH "message.h" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "message.h" 3 "30 May 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 58435b0aa..6095483d1 100644
--- a/docs/man/man3/mode.h.3
+++ b/docs/man/man3/mode.h.3
@@ -1,4 +1,4 @@
-.TH "mode.h" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "mode.h" 3 "30 May 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 c0861bcfb..3232cdf1a 100644
--- a/docs/man/man3/modules.cpp.3
+++ b/docs/man/man3/modules.cpp.3
@@ -1,4 +1,4 @@
-.TH "modules.cpp" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "modules.cpp" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -6,14 +6,14 @@ modules.cpp \-
.SH SYNOPSIS
.br
.PP
+\fC#include 'inspircd_config.h'\fP
+.br
\fC#include 'inspircd.h'\fP
.br
\fC#include 'inspircd_io.h'\fP
.br
\fC#include 'inspircd_util.h'\fP
.br
-\fC#include 'inspircd_config.h'\fP
-.br
\fC#include <unistd.h>\fP
.br
\fC#include <sys/errno.h>\fP
@@ -139,6 +139,9 @@ modules.cpp \-
.RI "std::vector< \fBircd_module\fP * > \fBfactory\fP"
.br
.ti -1c
+.RI "std::vector< std::string > \fBinclude_stack\fP"
+.br
+.ti -1c
.RI "time_t \fBTIME\fP"
.br
.ti -1c
@@ -269,160 +272,160 @@ modules.cpp \-
.PP
.SS "typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, \fBirc::InAddr_HashComp\fP> \fBaddress_cache\fP"
.PP
-Definition at line 120 of file modules.cpp.
+Definition at line 122 of file modules.cpp.
.SS "typedef nspace::hash_map<std::string, \fBchanrec\fP*, nspace::hash<string>, \fBirc::StrHashComp\fP> \fBchan_hash\fP"
.PP
-Definition at line 119 of file modules.cpp.
+Definition at line 121 of file modules.cpp.
.SS "typedef std::deque<\fBcommand_t\fP> \fBcommand_table\fP"
.PP
-Definition at line 122 of file modules.cpp.
+Definition at line 124 of file modules.cpp.
.SS "typedef std::vector<\fBExtMode\fP> \fBExtModeList\fP"
.PP
-Definition at line 148 of file modules.cpp.
+Definition at line 150 of file modules.cpp.
.SS "typedef ExtModeList::iterator \fBExtModeListIter\fP"
.PP
-Definition at line 149 of file modules.cpp.
+Definition at line 151 of file modules.cpp.
.PP
Referenced by ModeDefined(), ModeDefinedOff(), ModeDefinedOn(), ModeDefinedOper(), ModeIsListMode(), and ModeMakeList().
.SS "typedef nspace::hash_map<std::string, \fBuserrec\fP*, nspace::hash<string>, \fBirc::StrHashComp\fP> \fBuser_hash\fP"
.PP
-Definition at line 118 of file modules.cpp.
+Definition at line 120 of file modules.cpp.
.SS "typedef nspace::hash_map<std::string, \fBWhoWasUser\fP*, nspace::hash<string>, \fBirc::StrHashComp\fP> \fBwhowas_hash\fP"
.PP
-Definition at line 121 of file modules.cpp.
+Definition at line 123 of file modules.cpp.
.SH "Function Documentation"
.PP
.SS "bool DoAddExtendedMode (char modechar, int type, bool requires_oper, int params_on, int params_off)"
.PP
-Definition at line 218 of file modules.cpp.
+Definition at line 220 of file modules.cpp.
.PP
References EMode, and ModeDefined().
.PP
Referenced by Server::AddExtendedListMode(), and Server::AddExtendedMode().
.PP
.nf
-219 {
-220 if (ModeDefined(modechar,type)) {
-221 return false;
-222 }
-223 EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off));
-224 return true;
-225 }
+221 {
+222 if (ModeDefined(modechar,type)) {
+223 return false;
+224 }
+225 EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off));
+226 return true;
+227 }
.fi
.SS "std::vector<\fBircd_module\fP*> factory (255)"
.PP
.SS "bool ModeDefined (char modechar, int type)"
.PP
-Definition at line 155 of file modules.cpp.
+Definition at line 157 of file modules.cpp.
.PP
References EMode, and ExtModeListIter.
.PP
Referenced by DoAddExtendedMode().
.PP
.nf
-156 {
-157 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
-158 {
-159 if ((i->modechar == modechar) && (i->type == type))
-160 {
-161 return true;
-162 }
-163 }
-164 return false;
-165 }
+158 {
+159 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
+160 {
+161 if ((i->modechar == modechar) && (i->type == type))
+162 {
+163 return true;
+164 }
+165 }
+166 return false;
+167 }
.fi
.SS "int ModeDefinedOff (char modechar, int type)"
.PP
-Definition at line 205 of file modules.cpp.
+Definition at line 207 of file modules.cpp.
.PP
References EMode, and ExtModeListIter.
.PP
.nf
-206 {
-207 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
-208 {
-209 if ((i->modechar == modechar) && (i->type == type))
-210 {
-211 return i->params_when_off;
-212 }
-213 }
-214 return 0;
-215 }
+208 {
+209 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
+210 {
+211 if ((i->modechar == modechar) && (i->type == type))
+212 {
+213 return i->params_when_off;
+214 }
+215 }
+216 return 0;
+217 }
.fi
.SS "int ModeDefinedOn (char modechar, int type)"
.PP
-Definition at line 192 of file modules.cpp.
+Definition at line 194 of file modules.cpp.
.PP
References EMode, and ExtModeListIter.
.PP
.nf
-193 {
-194 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
-195 {
-196 if ((i->modechar == modechar) && (i->type == type))
-197 {
-198 return i->params_when_on;
-199 }
-200 }
-201 return 0;
-202 }
+195 {
+196 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
+197 {
+198 if ((i->modechar == modechar) && (i->type == type))
+199 {
+200 return i->params_when_on;
+201 }
+202 }
+203 return 0;
+204 }
.fi
.SS "bool ModeDefinedOper (char modechar, int type)"
.PP
-Definition at line 179 of file modules.cpp.
+Definition at line 181 of file modules.cpp.
.PP
References EMode, and ExtModeListIter.
.PP
.nf
-180 {
-181 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
-182 {
-183 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true))
-184 {
-185 return true;
-186 }
-187 }
-188 return false;
-189 }
+182 {
+183 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
+184 {
+185 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true))
+186 {
+187 return true;
+188 }
+189 }
+190 return false;
+191 }
.fi
.SS "bool ModeIsListMode (char modechar, int type)"
.PP
-Definition at line 167 of file modules.cpp.
+Definition at line 169 of file modules.cpp.
.PP
References EMode, and ExtModeListIter.
.PP
.nf
-168 {
-169 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
-170 {
-171 if ((i->modechar == modechar) && (i->type == type) && (i->list == true))
-172 {
-173 return true;
-174 }
-175 }
-176 return false;
-177 }
+170 {
+171 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
+172 {
+173 if ((i->modechar == modechar) && (i->type == type) && (i->list == true))
+174 {
+175 return true;
+176 }
+177 }
+178 return false;
+179 }
.fi
.SS "void ModeMakeList (char modechar)"
.PP
-Definition at line 228 of file modules.cpp.
+Definition at line 230 of file modules.cpp.
.PP
References EMode, ExtModeListIter, and MT_CHANNEL.
.PP
Referenced by Server::AddExtendedListMode().
.PP
.nf
-229 {
-230 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
-231 {
-232 if ((i->modechar == modechar) && (i->type == MT_CHANNEL))
-233 {
-234 i->list = true;
-235 return;
-236 }
-237 }
-238 return;
-239 }
+231 {
+232 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
+233 {
+234 if ((i->modechar == modechar) && (i->type == MT_CHANNEL))
+235 {
+236 i->list = true;
+237 return;
+238 }
+239 }
+240 return;
+241 }
.fi
.SS "std::vector<\fBModule\fP*> modules (255)"
.PP
@@ -430,49 +433,49 @@ Referenced by Server::AddExtendedListMode().
.PP
.SS "char \fBAdminEmail\fP[MAXBUF]"
.PP
-Definition at line 82 of file modules.cpp.
+Definition at line 84 of file modules.cpp.
.SS "char \fBAdminName\fP[MAXBUF]"
.PP
-Definition at line 81 of file modules.cpp.
+Definition at line 83 of file modules.cpp.
.SS "char \fBAdminNick\fP[MAXBUF]"
.PP
-Definition at line 83 of file modules.cpp.
+Definition at line 85 of file modules.cpp.
.SS "std::vector<long> \fBauth_cookies\fP"
.PP
-Definition at line 109 of file modules.cpp.
+Definition at line 111 of file modules.cpp.
.SS "int \fBboundPortCount\fP"
.PP
-Definition at line 103 of file modules.cpp.
+Definition at line 105 of file modules.cpp.
.SS "\fBchan_hash\fP \fBchanlist\fP"
.PP
-Definition at line 126 of file modules.cpp.
+Definition at line 128 of file modules.cpp.
.SS "\fBuser_hash\fP \fBclientlist\fP"
.PP
-Definition at line 125 of file modules.cpp.
+Definition at line 127 of file modules.cpp.
.SS "\fBcommand_table\fP \fBcmdlist\fP"
.PP
-Definition at line 128 of file modules.cpp.
+Definition at line 130 of file modules.cpp.
.SS "std::stringstream \fBconfig_f\fP"
.PP
-Definition at line 110 of file modules.cpp.
+Definition at line 112 of file modules.cpp.
.SS "int \fBdebugging\fP"
.PP
-Definition at line 92 of file modules.cpp.
+Definition at line 94 of file modules.cpp.
.SS "int \fBdefaultRoute\fP"
.PP
-Definition at line 107 of file modules.cpp.
+Definition at line 109 of file modules.cpp.
.SS "int \fBDieDelay\fP"
.PP
-Definition at line 95 of file modules.cpp.
+Definition at line 97 of file modules.cpp.
.SS "char \fBdiepass\fP[MAXBUF]"
.PP
-Definition at line 84 of file modules.cpp.
+Definition at line 86 of file modules.cpp.
.SS "char \fBDieValue\fP[MAXBUF]"
.PP
-Definition at line 90 of file modules.cpp.
+Definition at line 92 of file modules.cpp.
.SS "\fBExtModeList\fP \fBEMode\fP"
.PP
-Definition at line 152 of file modules.cpp.
+Definition at line 154 of file modules.cpp.
.PP
Referenced by DoAddExtendedMode(), ModeDefined(), ModeDefinedOff(), ModeDefinedOn(), ModeDefinedOper(), ModeIsListMode(), and ModeMakeList().
.SS "std::vector<\fBircd_module\fP*> factory"
@@ -480,93 +483,98 @@ Referenced by DoAddExtendedMode(), ModeDefined(), ModeDefinedOff(), ModeDefinedO
Definition at line 73 of file modules.cpp.
.SS "\fBuserrec\fP* \fBfd_ref_table\fP[65536]"
.PP
-Definition at line 116 of file modules.cpp.
+Definition at line 118 of file modules.cpp.
.PP
Referenced by Server::FindDescriptor(), and Server::PseudoToUser().
+.SS "std::vector<std::string> \fBinclude_stack\fP"
+.PP
+Definition at line 75 of file modules.cpp.
+.PP
+Referenced by ConfigReader::ConfigReader().
.SS "\fBaddress_cache\fP \fBIP\fP"
.PP
-Definition at line 131 of file modules.cpp.
+Definition at line 133 of file modules.cpp.
.SS "char \fBlist\fP[MAXBUF]"
.PP
-Definition at line 88 of file modules.cpp.
+Definition at line 90 of file modules.cpp.
.SS "FILE* \fBlog_file\fP"
.PP
-Definition at line 114 of file modules.cpp.
+Definition at line 116 of file modules.cpp.
.SS "int \fBLogLevel\fP"
.PP
-Definition at line 77 of file modules.cpp.
+Definition at line 79 of file modules.cpp.
.SS "int \fBMaxWhoResults\fP"
.PP
-Definition at line 98 of file modules.cpp.
+Definition at line 100 of file modules.cpp.
.SS "\fBserverrec\fP* \fBme\fP[32]"
.PP
-Definition at line 112 of file modules.cpp.
+Definition at line 114 of file modules.cpp.
.SS "int \fBMODCOUNT\fP = -1"
.PP
-Definition at line 1016 of file modules.cpp.
+Definition at line 1019 of file modules.cpp.
.SS "std::vector<std::string> \fBmodule_names\fP"
.PP
-Definition at line 101 of file modules.cpp.
+Definition at line 103 of file modules.cpp.
.SS "std::vector<\fBModule\fP*> modules"
.PP
Definition at line 72 of file modules.cpp.
.SS "\fBfile_cache\fP \fBMOTD\fP"
.PP
-Definition at line 129 of file modules.cpp.
+Definition at line 131 of file modules.cpp.
.SS "char \fBmotd\fP[MAXBUF]"
.PP
-Definition at line 86 of file modules.cpp.
+Definition at line 88 of file modules.cpp.
.SS "time_t \fBnb_start\fP"
.PP
-Definition at line 99 of file modules.cpp.
+Definition at line 101 of file modules.cpp.
.SS "int \fBNetBufferSize\fP"
.PP
-Definition at line 97 of file modules.cpp.
+Definition at line 99 of file modules.cpp.
.SS "char \fBNetwork\fP[MAXBUF]"
.PP
-Definition at line 79 of file modules.cpp.
+Definition at line 81 of file modules.cpp.
.SS "int \fBportCount\fP"
.PP
-Definition at line 104 of file modules.cpp.
+Definition at line 106 of file modules.cpp.
.SS "int \fBports\fP[MAXSOCKS]"
.PP
-Definition at line 106 of file modules.cpp.
+Definition at line 108 of file modules.cpp.
.SS "char \fBPrefixQuit\fP[MAXBUF]"
.PP
-Definition at line 89 of file modules.cpp.
+Definition at line 91 of file modules.cpp.
.SS "char \fBrestartpass\fP[MAXBUF]"
.PP
-Definition at line 85 of file modules.cpp.
+Definition at line 87 of file modules.cpp.
.SS "\fBfile_cache\fP \fBRULES\fP"
.PP
-Definition at line 130 of file modules.cpp.
+Definition at line 132 of file modules.cpp.
.SS "char \fBrules\fP[MAXBUF]"
.PP
-Definition at line 87 of file modules.cpp.
+Definition at line 89 of file modules.cpp.
.SS "char \fBServerDesc\fP[MAXBUF]"
.PP
-Definition at line 80 of file modules.cpp.
+Definition at line 82 of file modules.cpp.
.SS "char \fBServerName\fP[MAXBUF]"
.PP
-Definition at line 78 of file modules.cpp.
+Definition at line 80 of file modules.cpp.
.SS "int \fBSERVERportCount\fP"
.PP
-Definition at line 105 of file modules.cpp.
+Definition at line 107 of file modules.cpp.
.SS "time_t \fBstartup_time\fP"
.PP
-Definition at line 96 of file modules.cpp.
+Definition at line 98 of file modules.cpp.
.SS "time_t \fBTIME\fP"
.PP
-Definition at line 75 of file modules.cpp.
+Definition at line 77 of file modules.cpp.
.SS "\fBwhowas_hash\fP \fBwhowas\fP"
.PP
-Definition at line 127 of file modules.cpp.
+Definition at line 129 of file modules.cpp.
.SS "int \fBWHOWAS_MAX\fP"
.PP
-Definition at line 94 of file modules.cpp.
+Definition at line 96 of file modules.cpp.
.SS "int \fBWHOWAS_STALE\fP"
.PP
-Definition at line 93 of file modules.cpp.
+Definition at line 95 of file modules.cpp.
.SH "Author"
.PP
Generated automatically by Doxygen for InspIRCd from the source code.
diff --git a/docs/man/man3/modules.h.3 b/docs/man/man3/modules.h.3
index 25b175296..3d5c084f4 100644
--- a/docs/man/man3/modules.h.3
+++ b/docs/man/man3/modules.h.3
@@ -1,4 +1,4 @@
-.TH "modules.h" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "modules.h" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/nspace.3 b/docs/man/man3/nspace.3
index 372e1adfe..a70d80f53 100644
--- a/docs/man/man3/nspace.3
+++ b/docs/man/man3/nspace.3
@@ -1,4 +1,4 @@
-.TH "nspace" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "nspace" 3 "30 May 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 7b40764d7..5f909e73d 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 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "nspace::nspace::hash< in_addr >" 3 "30 May 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 b27f352d0..d152c53de 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 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "nspace::nspace::hash< string >" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/serverrec.3 b/docs/man/man3/serverrec.3
index 756987d57..428f509df 100644
--- a/docs/man/man3/serverrec.3
+++ b/docs/man/man3/serverrec.3
@@ -1,4 +1,4 @@
-.TH "serverrec" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "serverrec" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -317,7 +317,7 @@ Find the \fBircd_connector\fP oject related to a certain servername given in 'ho
.PP
References connectors.
.PP
-Referenced by BeginLink(), IsRoutable(), and SendPacket().
+Referenced by BeginLink(), and SendPacket().
.PP
.nf
243 {
@@ -333,61 +333,85 @@ Referenced by BeginLink(), IsRoutable(), and SendPacket().
.fi
.SS "void serverrec::FlushWriteBuffers ()"
.PP
-Flushes all data waiting to be written for all of this server's connections. Definition at line 284 of file servers.cpp.
+Flushes all data waiting to be written for all of this server's connections. Definition at line 274 of file servers.cpp.
.PP
References connectors, has_been_netsplit, IsRoutable(), STATE_DISCONNECTED, STATE_NOAUTH_INBOUND, STATE_NOAUTH_OUTBOUND, and TIME.
.PP
.nf
-285 {
-286 for (int i = 0; i < this->connectors.size(); i++)
-287 {
-288 // don't try and ping a NOAUTH_OUTBOUND state, its not authed yet!
-289 if ((this->connectors[i].GetState() == STATE_NOAUTH_OUTBOUND) && (TIME > this->connectors[i].age+30))
+275 {
+276 char buffer[MAXBUF];
+277 for (int i = 0; i < this->connectors.size(); i++)
+278 {
+279 // don't try and ping a NOAUTH_OUTBOUND state, its not authed yet!
+280 if ((this->connectors[i].GetState() == STATE_NOAUTH_OUTBOUND) && (TIME > this->connectors[i].age+30))
+281 {
+282 // however if we reach this timer its connected timed out :)
+283 WriteOpers('*** Connection to %s timed out',this->connectors[i].GetServerName().c_str());
+284 snprintf(buffer,MAXBUF,'& %s',this->connectors[i].GetServerName().c_str());
+285 NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer);
+286 DoSplit(this->connectors[i].GetServerName().c_str());
+287 return;
+288 }
+289 if ((this->connectors[i].GetState() == STATE_NOAUTH_INBOUND) && (TIME > this->connectors[i].age+30))
290 {
-291 // however if we reach this timer its connected timed out :)
-292 WriteOpers('*** Connection to %s timed out',this->connectors[i].GetServerName().c_str());
-293 DoSplit(this->connectors[i].GetServerName().c_str());
-294 return;
-295 }
-296 else if ((this->connectors[i].GetState() == STATE_NOAUTH_INBOUND) && (TIME > this->connectors[i].age+30))
-297 {
-298 WriteOpers('*** Connection from %s timed out',this->connectors[i].GetServerName().c_str());
-299 DoSplit(this->connectors[i].GetServerName().c_str());
-300 return;
-301 }
-302 else if (this->connectors[i].GetState() != STATE_DISCONNECTED)
-303 {
-304 if (!this->connectors[i].CheckPing())
-305 {
-306 WriteOpers('*** Lost single connection to %s: Ping timeout',this->connectors[i].GetServerName().c_str());
-307 this->connectors[i].CloseConnection();
-308 this->connectors[i].SetState(STATE_DISCONNECTED);
-309 if (!IsRoutable(this->connectors[i].GetServerName()))
-310 {
-311 WriteOpers('*** Server %s is no longer routable, disconnecting.',this->connectors[i].GetServerName().c_str());
-312 DoSplit(this->connectors[i].GetServerName().c_str());
-313 }
-314 has_been_netsplit = true;
-315 }
-316 }
-317 if (this->connectors[i].HasBufferedOutput())
-318 {
-319 if (!this->connectors[i].FlushWriteBuf())
-320 {
-321 // if we're here the write() caused an error, we cannot proceed
-322 WriteOpers('*** Lost single connection to %s, link inactive and retrying: %s',this->connectors[i].GetServerName().c_str(),this->connectors[i].GetWriteError().c_str());
-323 this->connectors[i].CloseConnection();
-324 this->connectors[i].SetState(STATE_DISCONNECTED);
-325 if (!IsRoutable(this->connectors[i].GetServerName()))
-326 {
-327 WriteOpers('*** Server %s is no longer routable, disconnecting.',this->connectors[i].GetServerName().c_str());
-328 DoSplit(this->connectors[i].GetServerName().c_str());
-329 }
-330 has_been_netsplit = true;
-331 }
-332 }
-333 }
-334 }
+291 WriteOpers('*** Connection from %s timed out',this->connectors[i].GetServerName().c_str());
+292 snprintf(buffer,MAXBUF,'& %s',this->connectors[i].GetServerName().c_str());
+293 NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer);
+294 DoSplit(this->connectors[i].GetServerName().c_str());
+295 return;
+296 }
+297 if (this->connectors[i].GetState() != STATE_DISCONNECTED)
+298 {
+299 if (!this->connectors[i].CheckPing())
+300 {
+301 WriteOpers('*** Lost single connection to %s: Ping timeout',this->connectors[i].GetServerName().c_str());
+302 this->connectors[i].CloseConnection();
+303 this->connectors[i].SetState(STATE_DISCONNECTED);
+304 if (!IsRoutable(this->connectors[i].GetServerName()))
+305 {
+306 WriteOpers('*** Server %s is no longer routable, disconnecting.',this->connectors[i].GetServerName().c_str());
+307 snprintf(buffer,MAXBUF,'& %s',this->connectors[i].GetServerName().c_str());
+308 NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer);
+309 DoSplit(this->connectors[i].GetServerName().c_str());
+310 }
+311 has_been_netsplit = true;
+312 }
+313 }
+314 if ((this->connectors[i].GetWriteError() !='') && (this->connectors[i].GetState() != STATE_DISCONNECTED))
+315 {
+316 // if we're here the write() caused an error, we cannot proceed
+317 WriteOpers('*** Lost single connection to %s, link inactive and retrying: %s',this->connectors[i].GetServerName().c_str(),this->connectors[i].GetWriteError().c_str());
+318 this->connectors[i].CloseConnection();
+319 this->connectors[i].SetState(STATE_DISCONNECTED);
+320 if (!IsRoutable(this->connectors[i].GetServerName()))
+321 {
+322 WriteOpers('*** Server %s is no longer routable, disconnecting.',this->connectors[i].GetServerName().c_str());
+323 snprintf(buffer,MAXBUF,'& %s',this->connectors[i].GetServerName().c_str());
+324 NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer);
+325 DoSplit(this->connectors[i].GetServerName().c_str());
+326 }
+327 has_been_netsplit = true;
+328 }
+329 if ((this->connectors[i].HasBufferedOutput()) && (this->connectors[i].GetState() != STATE_DISCONNECTED))
+330 {
+331 if (!this->connectors[i].FlushWriteBuf())
+332 {
+333 // if we're here the write() caused an error, we cannot proceed
+334 WriteOpers('*** Lost single connection to %s, link inactive and retrying: %s',this->connectors[i].GetServerName().c_str(),this->connectors[i].GetWriteError().c_str());
+335 this->connectors[i].CloseConnection();
+336 this->connectors[i].SetState(STATE_DISCONNECTED);
+337 if (!IsRoutable(this->connectors[i].GetServerName()))
+338 {
+339 WriteOpers('*** Server %s is no longer routable, disconnecting.',this->connectors[i].GetServerName().c_str());
+340 snprintf(buffer,MAXBUF,'& %s',this->connectors[i].GetServerName().c_str());
+341 NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer);
+342 DoSplit(this->connectors[i].GetServerName().c_str());
+343 }
+344 has_been_netsplit = true;
+345 }
+346 }
+347 }
+348 }
.fi
.SS "bool serverrec::MeshCookie (char * targethost, int port, unsigned long cookie, char * servername)"
.PP
@@ -427,191 +451,210 @@ References connectors, connection::fd, ircd_connector::MakeOutboundConnection(),
.fi
.SS "bool serverrec::RecvPacket (std::deque< std::string > & messages, char * host, std::deque< std::string > & sums)"
.PP
-Returns the next available packet and returns true if data is available. Writes the servername the data came from to 'host'. If no data is available this function returns false. This function will automatically close broken links and reroute pathways, generating split messages on the network. Definition at line 431 of file servers.cpp.
+Returns the next available packet and returns true if data is available. Writes the servername the data came from to 'host'. If no data is available this function returns false. This function will automatically close broken links and reroute pathways, generating split messages on the network. Definition at line 445 of file servers.cpp.
.PP
References already_have_sum(), connectors, DEBUG, has_been_netsplit, IsRoutable(), and STATE_DISCONNECTED.
.PP
.nf
-432 {
-433 char data[65536];
-434 memset(data, 0, 65536);
-435 for (int i = 0; i < this->connectors.size(); i++)
-436 {
-437 if (this->connectors[i].GetState() != STATE_DISCONNECTED)
-438 {
-439 // returns false if the packet could not be sent (e.g. target host down)
-440 int rcvsize = 0;
-441
-442 // check if theres any data on this socket
-443 // if not, continue onwards to the next.
-444 pollfd polls;
-445 polls.fd = this->connectors[i].GetDescriptor();
-446 polls.events = POLLIN;
-447 int ret = poll(&polls,1,1);
-448 if (ret <= 0) continue;
-449
-450 rcvsize = recv(this->connectors[i].GetDescriptor(),data,65000,0);
-451 data[rcvsize] = '\0';
-452 if (rcvsize == -1)
-453 {
-454 if (errno != EAGAIN)
-455 {
-456 log(DEBUG,'recv() failed for serverrec::RecvPacket(): %s',strerror(errno));
-457 log(DEBUG,'Disabling connector: %s',this->connectors[i].GetServerName().c_str());
-458 this->connectors[i].CloseConnection();
-459 this->connectors[i].SetState(STATE_DISCONNECTED);
-460 if (!IsRoutable(this->connectors[i].GetServerName()))
-461 {
-462 WriteOpers('*** Server %s is no longer routable, disconnecting.',this->connectors[i].GetServerName().c_str());
-463 DoSplit(this->connectors[i].GetServerName().c_str());
-464 }
-465 has_been_netsplit = true;
-466 }
-467 }
-468 int pushed = 0;
-469 if (rcvsize > 0)
-470 {
-471 if (!this->connectors[i].AddBuffer(data))
-472 {
-473 WriteOpers('*** Read buffer for %s exceeds maximum, closing connection!',this->connectors[i].GetServerName().c_str());
-474 this->connectors[i].CloseConnection();
-475 this->connectors[i].SetState(STATE_DISCONNECTED);
-476 if (!IsRoutable(this->connectors[i].GetServerName()))
-477 {
-478 WriteOpers('*** Server %s is no longer routable, disconnecting.',this->connectors[i].GetServerName().c_str());
-479 DoSplit(this->connectors[i].GetServerName().c_str());
-480 }
-481 has_been_netsplit = true;
-482 }
-483 if (this->connectors[i].BufferIsComplete())
+446 {
+447 char data[65536],buffer[MAXBUF];
+448 memset(data, 0, 65536);
+449 for (int i = 0; i < this->connectors.size(); i++)
+450 {
+451 if (this->connectors[i].GetState() != STATE_DISCONNECTED)
+452 {
+453 // returns false if the packet could not be sent (e.g. target host down)
+454 int rcvsize = 0;
+455
+456 // check if theres any data on this socket
+457 // if not, continue onwards to the next.
+458 pollfd polls;
+459 polls.fd = this->connectors[i].GetDescriptor();
+460 polls.events = POLLIN;
+461 int ret = poll(&polls,1,1);
+462 if (ret <= 0) continue;
+463
+464 rcvsize = recv(this->connectors[i].GetDescriptor(),data,65000,0);
+465 data[rcvsize] = '\0';
+466 if (rcvsize == 0)
+467 {
+468 log(DEBUG,'recv() failed for serverrec::RecvPacket(): EOF');
+469 log(DEBUG,'Disabling connector: %s',this->connectors[i].GetServerName().c_str());
+470 this->connectors[i].CloseConnection();
+471 this->connectors[i].SetState(STATE_DISCONNECTED);
+472 if (!IsRoutable(this->connectors[i].GetServerName()))
+473 {
+474 WriteOpers('*** Server %s is no longer routable, disconnecting (EOF)',this->connectors[i].GetServerName().c_str());
+475 snprintf(buffer,MAXBUF,'& %s',this->connectors[i].GetServerName().c_str());
+476 NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer);
+477 DoSplit(this->connectors[i].GetServerName().c_str());
+478 }
+479 has_been_netsplit = true;
+480 }
+481 if (rcvsize == -1)
+482 {
+483 if (errno != EAGAIN)
484 {
-485 this->connectors[i].ResetPing();
-486 while (this->connectors[i].BufferIsComplete())
-487 {
-488 std::string text = this->connectors[i].GetBuffer();
-489 if (text != '')
-490 {
-491 if ((text[0] == ':') && (text.find(' ') != std::string::npos))
-492 {
-493 std::string orig = text;
-494 log(DEBUG,'Original: %s',text.c_str());
-495 std::string sum = text.substr(1,text.find(' ')-1);
-496 text = text.substr(text.find(' ')+1,text.length());
-497 std::string possible_token = text.substr(1,text.find(' ')-1);
-498 if (possible_token.length() > 1)
-499 {
-500 sums.push_back('*');
-501 text = orig;
-502 log(DEBUG,'Non-mesh, non-tokenized string passed up the chain');
-503 }
-504 else
-505 {
-506 log(DEBUG,'Packet sum: '%s'',sum.c_str());
-507 if ((already_have_sum(sum)) && (sum != '*'))
-508 {
-509 // we don't accept dupes
-510 continue;
-511 }
-512 sums.push_back(sum.c_str());
-513 }
-514 }
-515 else sums.push_back('*');
-516 messages.push_back(text.c_str());
-517 strlcpy(recvhost,this->connectors[i].GetServerName().c_str(),160);
-518 log(DEBUG,'serverrec::RecvPacket() %d:%s->%s',pushed++,recvhost,text.c_str());
-519 }
-520 }
-521 return true;
-522 }
-523 }
-524 }
-525 }
-526 // nothing new yet -- message and host will be undefined
-527 return false;
-528 }
+485 log(DEBUG,'recv() failed for serverrec::RecvPacket(): %s',strerror(errno));
+486 log(DEBUG,'Disabling connector: %s',this->connectors[i].GetServerName().c_str());
+487 this->connectors[i].CloseConnection();
+488 this->connectors[i].SetState(STATE_DISCONNECTED);
+489 if (!IsRoutable(this->connectors[i].GetServerName()))
+490 {
+491 WriteOpers('*** Server %s is no longer routable, disconnecting.',this->connectors[i].GetServerName().c_str());
+492 snprintf(buffer,MAXBUF,'& %s',this->connectors[i].GetServerName().c_str());
+493 NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer);
+494 DoSplit(this->connectors[i].GetServerName().c_str());
+495 }
+496 has_been_netsplit = true;
+497 }
+498 }
+499 int pushed = 0;
+500 if (rcvsize > 0)
+501 {
+502 if (!this->connectors[i].AddBuffer(data))
+503 {
+504 WriteOpers('*** Read buffer for %s exceeds maximum, closing connection!',this->connectors[i].GetServerName().c_str());
+505 this->connectors[i].CloseConnection();
+506 this->connectors[i].SetState(STATE_DISCONNECTED);
+507 if (!IsRoutable(this->connectors[i].GetServerName()))
+508 {
+509 WriteOpers('*** Server %s is no longer routable, disconnecting.',this->connectors[i].GetServerName().c_str());
+510 snprintf(buffer,MAXBUF,'& %s',this->connectors[i].GetServerName().c_str());
+511 NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer);
+512 DoSplit(this->connectors[i].GetServerName().c_str());
+513 }
+514 has_been_netsplit = true;
+515 }
+516 if (this->connectors[i].BufferIsComplete())
+517 {
+518 this->connectors[i].ResetPing();
+519 while (this->connectors[i].BufferIsComplete())
+520 {
+521 std::string text = this->connectors[i].GetBuffer();
+522 if (text != '')
+523 {
+524 if ((text[0] == ':') && (text.find(' ') != std::string::npos))
+525 {
+526 std::string orig = text;
+527 log(DEBUG,'Original: %s',text.c_str());
+528 std::string sum = text.substr(1,text.find(' ')-1);
+529 text = text.substr(text.find(' ')+1,text.length());
+530 std::string possible_token = text.substr(1,text.find(' ')-1);
+531 if (possible_token.length() > 1)
+532 {
+533 sums.push_back('*');
+534 text = orig;
+535 log(DEBUG,'Non-mesh, non-tokenized string passed up the chain');
+536 }
+537 else
+538 {
+539 log(DEBUG,'Packet sum: '%s'',sum.c_str());
+540 if ((already_have_sum(sum)) && (sum != '*'))
+541 {
+542 // we don't accept dupes
+543 continue;
+544 }
+545 sums.push_back(sum.c_str());
+546 }
+547 }
+548 else sums.push_back('*');
+549 messages.push_back(text.c_str());
+550 strlcpy(recvhost,this->connectors[i].GetServerName().c_str(),160);
+551 log(DEBUG,'serverrec::RecvPacket() %d:%s->%s',pushed++,recvhost,text.c_str());
+552 }
+553 }
+554 return true;
+555 }
+556 }
+557 }
+558 }
+559 // nothing new yet -- message and host will be undefined
+560 return false;
+561 }
.fi
.SS "bool serverrec::SendPacket (char * message, const char * host)"
.PP
-Send a message to a server by name, if the server is unavailable directly route the packet via another server If the server still cannot be reached after attempting to route the message remotely, returns false. Definition at line 336 of file servers.cpp.
+Send a message to a server by name, if the server is unavailable directly route the packet via another server If the server still cannot be reached after attempting to route the message remotely, returns false. Definition at line 350 of file servers.cpp.
.PP
References ircd_connector::AddWriteBuf(), ircd_connector::CloseConnection(), connectors, DEBUG, FindHost(), ircd_connector::FlushWriteBuf(), ircd_connector::GetServerName(), ircd_connector::GetState(), ircd_connector::GetWriteError(), ircd_connector::SetState(), and STATE_DISCONNECTED.
.PP
Referenced by BeginLink(), and MeshCookie().
.PP
.nf
-337 {
-338 if ((!message) || (!sendhost))
-339 return true;
-340
-341 ircd_connector* cn = this->FindHost(sendhost);
-342
-343 if (!strchr(message,'\n'))
-344 {
-345 strlcat(message,'\n',MAXBUF);
-346 }
-347
-348 if (cn)
-349 {
-350 log(DEBUG,'main: serverrec::SendPacket() sent '%s' to %s',message,cn->GetServerName().c_str());
-351
-352 if (cn->GetState() == STATE_DISCONNECTED)
-353 {
-354 // fix: can only route one hop to avoid a loop
-355 if (strncmp(message,'R ',2))
-356 {
-357 log(DEBUG,'Not a double reroute');
-358 // this route is down, we must re-route the packet through an available point in the mesh.
-359 for (int k = 0; k < this->connectors.size(); k++)
-360 {
-361 log(DEBUG,'Check connector %d: %s',k,this->connectors[k].GetServerName().c_str());
-362 // search for another point in the mesh which can 'reach' where we want to go
-363 for (int m = 0; m < this->connectors[k].routes.size(); m++)
-364 {
-365 if (!strcasecmp(this->connectors[k].routes[m].c_str(),sendhost))
-366 {
-367 log(DEBUG,'Found alternative route for packet: %s',this->connectors[k].GetServerName().c_str());
-368 char buffer[MAXBUF];
-369 snprintf(buffer,MAXBUF,'R %s %s',sendhost,message);
-370 this->SendPacket(buffer,this->connectors[k].GetServerName().c_str());
-371 return true;
-372 }
-373 }
-374 }
-375 }
-376 char buffer[MAXBUF];
-377 snprintf(buffer,MAXBUF,'& %s',sendhost);
-378 WriteOpers('*** All connections to %s lost.',sendhost);
-379 NetSendToAllExcept(sendhost,buffer);
-380 DoSplit(sendhost);
-381 return false;
-382 }
-383
-384 // returns false if the packet could not be sent (e.g. target host down)
-385 if (!cn->AddWriteBuf(message))
-386 {
-387 // if we're here, there was an error pending, and the send cannot proceed
-388 log(DEBUG,'cn->AddWriteBuf() failed for serverrec::SendPacket(): %s',cn->GetWriteError().c_str());
-389 log(DEBUG,'Disabling connector: %s',cn->GetServerName().c_str());
-390 cn->CloseConnection();
-391 cn->SetState(STATE_DISCONNECTED);
-392 WriteOpers('*** Lost single connection to %s, link inactive and retrying: %s',cn->GetServerName().c_str(),cn->GetWriteError().c_str());
-393 // retry the packet along a new route so either arrival OR failure are gauranteed (bugfix)
-394 return this->SendPacket(message,sendhost);
-395 }
-396 if (!cn->FlushWriteBuf())
-397 {
-398 // if we're here the write() caused an error, we cannot proceed
-399 log(DEBUG,'cn->FlushWriteBuf() failed for serverrec::SendPacket(): %s',cn->GetWriteError().c_str());
-400 log(DEBUG,'Disabling connector: %s',cn->GetServerName().c_str());
-401 cn->CloseConnection();
-402 cn->SetState(STATE_DISCONNECTED);
-403 WriteOpers('*** Lost single connection to %s, link inactive and retrying: %s',cn->GetServerName().c_str(),cn->GetWriteError().c_str());
-404 // retry the packet along a new route so either arrival OR failure are gauranteed
-405 return this->SendPacket(message,sendhost);
-406 }
-407 return true;
-408 }
-409 }
+351 {
+352 if ((!message) || (!sendhost))
+353 return true;
+354
+355 ircd_connector* cn = this->FindHost(sendhost);
+356
+357 if (!strchr(message,'\n'))
+358 {
+359 strlcat(message,'\n',MAXBUF);
+360 }
+361
+362 if (cn)
+363 {
+364 log(DEBUG,'main: serverrec::SendPacket() sent '%s' to %s',message,cn->GetServerName().c_str());
+365
+366 if (cn->GetState() == STATE_DISCONNECTED)
+367 {
+368 // fix: can only route one hop to avoid a loop
+369 if (strncmp(message,'R ',2))
+370 {
+371 log(DEBUG,'Not a double reroute');
+372 // this route is down, we must re-route the packet through an available point in the mesh.
+373 for (int k = 0; k < this->connectors.size(); k++)
+374 {
+375 log(DEBUG,'Check connector %d: %s',k,this->connectors[k].GetServerName().c_str());
+376 // search for another point in the mesh which can 'reach' where we want to go
+377 for (int m = 0; m < this->connectors[k].routes.size(); m++)
+378 {
+379 if (!strcasecmp(this->connectors[k].routes[m].c_str(),sendhost))
+380 {
+381 log(DEBUG,'Found alternative route for packet: %s',this->connectors[k].GetServerName().c_str());
+382 char buffer[MAXBUF];
+383 snprintf(buffer,MAXBUF,'R %s %s',sendhost,message);
+384 this->SendPacket(buffer,this->connectors[k].GetServerName().c_str());
+385 return true;
+386 }
+387 }
+388 }
+389 }
+390 char buffer[MAXBUF];
+391 snprintf(buffer,MAXBUF,'& %s',sendhost);
+392 WriteOpers('*** All connections to %s lost.',sendhost);
+393 NetSendToAllExcept(sendhost,buffer);
+394 DoSplit(sendhost);
+395 return false;
+396 }
+397
+398 // returns false if the packet could not be sent (e.g. target host down)
+399 if (!cn->AddWriteBuf(message))
+400 {
+401 // if we're here, there was an error pending, and the send cannot proceed
+402 log(DEBUG,'cn->AddWriteBuf() failed for serverrec::SendPacket(): %s',cn->GetWriteError().c_str());
+403 log(DEBUG,'Disabling connector: %s',cn->GetServerName().c_str());
+404 cn->CloseConnection();
+405 cn->SetState(STATE_DISCONNECTED);
+406 WriteOpers('*** Lost single connection to %s, link inactive and retrying: %s',cn->GetServerName().c_str(),cn->GetWriteError().c_str());
+407 // retry the packet along a new route so either arrival OR failure are gauranteed (bugfix)
+408 return this->SendPacket(message,sendhost);
+409 }
+410 if (!cn->FlushWriteBuf())
+411 {
+412 // if we're here the write() caused an error, we cannot proceed
+413 log(DEBUG,'cn->FlushWriteBuf() failed for serverrec::SendPacket(): %s',cn->GetWriteError().c_str());
+414 log(DEBUG,'Disabling connector: %s',cn->GetServerName().c_str());
+415 cn->CloseConnection();
+416 cn->SetState(STATE_DISCONNECTED);
+417 WriteOpers('*** Lost single connection to %s, link inactive and retrying: %s',cn->GetServerName().c_str(),cn->GetWriteError().c_str());
+418 // retry the packet along a new route so either arrival OR failure are gauranteed
+419 return this->SendPacket(message,sendhost);
+420 }
+421 return true;
+422 }
+423 }
.fi
.SS "void serverrec::TerminateLink (char * targethost)"
.PP
diff --git a/docs/man/man3/servers.cpp.3 b/docs/man/man3/servers.cpp.3
index bedaea1c4..ff4d1a736 100644
--- a/docs/man/man3/servers.cpp.3
+++ b/docs/man/man3/servers.cpp.3
@@ -1,4 +1,4 @@
-.TH "servers.cpp" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "servers.cpp" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -74,63 +74,53 @@ servers.cpp \-
.PP
.SS "bool already_have_sum (std::string sum)"
.PP
-Definition at line 411 of file servers.cpp.
+Definition at line 425 of file servers.cpp.
.PP
References xsums.
.PP
Referenced by serverrec::RecvPacket().
.PP
.nf
-412 {
-413 for (int i = 0; i < xsums.size(); i++)
-414 {
-415 if (xsums[i] == sum)
-416 {
-417 return true;
-418 }
-419 }
-420 if (xsums.size() >= 128)
-421 {
-422 xsums.pop_front();
-423 }
-424 xsums.push_back(sum);
-425 return false;
-426 }
+426 {
+427 for (int i = 0; i < xsums.size(); i++)
+428 {
+429 if (xsums[i] == sum)
+430 {
+431 return true;
+432 }
+433 }
+434 if (xsums.size() >= 128)
+435 {
+436 xsums.pop_front();
+437 }
+438 xsums.push_back(sum);
+439 return false;
+440 }
.fi
.SS "bool IsRoutable (std::string servername)"
.PP
Definition at line 256 of file servers.cpp.
.PP
-References serverrec::connectors, serverrec::FindHost(), ircd_connector::GetState(), me, and STATE_DISCONNECTED.
+References serverrec::connectors, me, and STATE_DISCONNECTED.
.PP
Referenced by serverrec::FlushWriteBuffers(), and serverrec::RecvPacket().
.PP
.nf
257 {
-258 for (int x = 0; x < 32; x++) if (me[x])
-259 {
-260 ircd_connector* cn = me[x]->FindHost(servername.c_str());
-261 if (cn)
-262 {
-263 if (cn->GetState() == STATE_DISCONNECTED)
-264 {
-265 for (int k = 0; k < me[x]->connectors.size(); k++)
-266 {
-267 for (int m = 0; m < me[x]->connectors[k].routes.size(); m++)
-268 {
-269 if (!strcasecmp(me[x]->connectors[k].routes[m].c_str(),servername.c_str()))
-270 {
-271 return true;
-272 }
-273 }
-274 }
-275 return false;
-276 }
-277 else return true;
-278 }
-279 }
-280 return false;
-281 }
+258 int c = 0;
+259 for (int x = 0; x < 32; x++)
+260 if (me[x])
+261 {
+262 for (int i = 0; i < me[x]->connectors.size(); i++)
+263 {
+264 if ((me[x]->connectors[i].GetServerName() == servername) && (me[x]->connectors[i].GetState() != STATE_DISCONNECTED))
+265 {
+266 c++;
+267 }
+268 }
+269 }
+270 return (c != 0);
+271 }
.fi
.SH "Variable Documentation"
.PP
diff --git a/docs/man/man3/servers.h.3 b/docs/man/man3/servers.h.3
index 7a695dac2..44c07711f 100644
--- a/docs/man/man3/servers.h.3
+++ b/docs/man/man3/servers.h.3
@@ -1,4 +1,4 @@
-.TH "servers.h" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "servers.h" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/std.3 b/docs/man/man3/std.3
index 2f3412140..d7536d797 100644
--- a/docs/man/man3/std.3
+++ b/docs/man/man3/std.3
@@ -1,4 +1,4 @@
-.TH "std" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "std" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/std_char_traits.3 b/docs/man/man3/std_char_traits.3
index 055db1ba0..5d2b39799 100644
--- a/docs/man/man3/std_char_traits.3
+++ b/docs/man/man3/std_char_traits.3
@@ -1,4 +1,4 @@
-.TH "std::char_traits" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "std::char_traits" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/ucrec.3 b/docs/man/man3/ucrec.3
index 93895a59f..be2545aaa 100644
--- a/docs/man/man3/ucrec.3
+++ b/docs/man/man3/ucrec.3
@@ -1,4 +1,4 @@
-.TH "ucrec" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "ucrec" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/userrec.3 b/docs/man/man3/userrec.3
index 5baa46954..e5d14b57f 100644
--- a/docs/man/man3/userrec.3
+++ b/docs/man/man3/userrec.3
@@ -1,4 +1,4 @@
-.TH "userrec" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "userrec" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -98,7 +98,7 @@ Inherits \fBconnection\fP.
.br
.RI "\fIThe users nickname. \fP"
.ti -1c
-.RI "char \fBident\fP [16]"
+.RI "char \fBident\fP [IDENTMAX+2]"
.br
.RI "\fIThe users ident reply. \fP"
.ti -1c
@@ -106,29 +106,25 @@ Inherits \fBconnection\fP.
.br
.RI "\fIThe host displayed to non-opers (used for cloaking etc). \fP"
.ti -1c
-.RI "char \fBfullname\fP [128]"
+.RI "char \fBfullname\fP [MAXGECOS+1]"
.br
.RI "\fIThe users full name. \fP"
.ti -1c
-.RI "char \fBmodes\fP [MAXBUF]"
+.RI "char \fBmodes\fP [54]"
.br
.RI "\fIThe user's mode string. \fP"
.ti -1c
.RI "\fBucrec\fP \fBchans\fP [MAXCHANS]"
.br
.ti -1c
-.RI "char \fBserver\fP [256]"
+.RI "char * \fBserver\fP"
.br
.RI "\fIThe server the user is connected to. \fP"
.ti -1c
-.RI "char \fBawaymsg\fP [512]"
+.RI "char \fBawaymsg\fP [MAXAWAY+1]"
.br
.RI "\fIThe user's away message. \fP"
.ti -1c
-.RI "char \fBresult\fP [256]"
-.br
-.RI "\fIStores the result of the last GetFullHost or GetRealHost call. \fP"
-.ti -1c
.RI "int \fBflood\fP"
.br
.RI "\fINumber of lines the user can place into the buffer (up to the global NetBufferSize bytes) before they are disconnected for excess flood. \fP"
@@ -201,33 +197,32 @@ Definition at line 108 of file users.h.
.PP
.SS "userrec::userrec ()"
.PP
-Definition at line 31 of file users.cpp.
+Definition at line 32 of file users.cpp.
.PP
-References awaymsg, connection::bytes_in, connection::bytes_out, ucrec::channel, chans, connection::cmds_in, connection::cmds_out, dhost, dns_done, connection::fd, flood, fullname, connection::haspassed, connection::host, ident, connection::idle_lastmsg, invites, connection::ip, connection::lastping, lines_in, modes, nick, connection::nping, oper, connection::port, recvq, connection::registered, reset_due, result, sendq, server, connection::signon, TIME, timeout, and ucrec::uc_modes.
+References awaymsg, connection::bytes_in, connection::bytes_out, ucrec::channel, chans, connection::cmds_in, connection::cmds_out, dhost, dns_done, connection::fd, flood, fullname, connection::haspassed, connection::host, ident, connection::idle_lastmsg, invites, connection::ip, connection::lastping, lines_in, modes, nick, connection::nping, oper, connection::port, recvq, connection::registered, reset_due, sendq, server, ServerName, connection::signon, TIME, timeout, and ucrec::uc_modes.
.PP
.nf
-32 {
-33 // the PROPER way to do it, AVOID bzero at *ALL* costs
-34 strcpy(nick,'');
-35 strcpy(ip,'127.0.0.1');
-36 timeout = 0;
-37 strcpy(ident,'');
-38 strcpy(host,'');
-39 strcpy(dhost,'');
-40 strcpy(fullname,'');
-41 strcpy(modes,'');
-42 strcpy(server,'');
-43 strcpy(awaymsg,'');
-44 strcpy(oper,'');
-45 reset_due = TIME;
-46 lines_in = 0;
-47 fd = lastping = signon = idle_lastmsg = nping = registered = 0;
-48 flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0;
-49 haspassed = false;
-50 dns_done = false;
-51 recvq = '';
-52 sendq = '';
-53 strcpy(result,'');
+33 {
+34 // the PROPER way to do it, AVOID bzero at *ALL* costs
+35 strcpy(nick,'');
+36 strcpy(ip,'127.0.0.1');
+37 timeout = 0;
+38 strcpy(ident,'');
+39 strcpy(host,'');
+40 strcpy(dhost,'');
+41 strcpy(fullname,'');
+42 strcpy(modes,'');
+43 server = (char*)FindServerNamePtr(ServerName);
+44 strcpy(awaymsg,'');
+45 strcpy(oper,'');
+46 reset_due = TIME;
+47 lines_in = 0;
+48 fd = lastping = signon = idle_lastmsg = nping = registered = 0;
+49 flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0;
+50 haspassed = false;
+51 dns_done = false;
+52 recvq = '';
+53 sendq = '';
54 for (int i = 0; i < MAXCHANS; i++)
55 {
56 this->chans[i].channel = NULL;
@@ -238,92 +233,92 @@ References awaymsg, connection::bytes_in, connection::bytes_out, ucrec::channel,
.fi
.SS "virtual userrec::~\fBuserrec\fP ()\fC [inline, virtual]\fP"
.PP
-Definition at line 222 of file users.h.
+Definition at line 221 of file users.h.
.PP
.nf
-222 { }
+221 { }
.fi
.SH "Member Function Documentation"
.PP
.SS "bool userrec::AddBuffer (std::string a)"
.PP
-This method adds data to the buffer of the user. The buffer can grow to any size within limits of the available memory, managed by the size of a std::string, however if any individual line in the buffer grows over 600 bytes in length (which is 88 chars over the RFC-specified limit per line) then the method will return false and the text will not be inserted.Definition at line 190 of file users.cpp.
+This method adds data to the buffer of the user. The buffer can grow to any size within limits of the available memory, managed by the size of a std::string, however if any individual line in the buffer grows over 600 bytes in length (which is 88 chars over the RFC-specified limit per line) then the method will return false and the text will not be inserted.Definition at line 192 of file users.cpp.
.PP
References recvq, recvqmax, and SetWriteError().
.PP
.nf
-191 {
-192 std::string b = '';
-193 for (int i = 0; i < a.length(); i++)
-194 if ((a[i] != '\r') && (a[i] != '\0') && (a[i] != 7))
-195 b = b + a[i];
-196 std::stringstream stream(recvq);
-197 stream << b;
-198 recvq = stream.str();
-199 int i = 0;
-200 // count the size of the first line in the buffer.
-201 while (i < recvq.length())
-202 {
-203 if (recvq[i++] == '\n')
-204 break;
-205 }
-206 if (recvq.length() > this->recvqmax)
-207 {
-208 this->SetWriteError('RecvQ exceeded');
-209 WriteOpers('*** User %s RecvQ of %d exceeds connect class maximum of %d',this->nick,recvq.length(),this->recvqmax);
-210 }
-211 // return false if we've had more than 600 characters WITHOUT
-212 // a carriage return (this is BAD, drop the socket)
-213 return (i < 600);
-214 }
+193 {
+194 std::string b = '';
+195 for (int i = 0; i < a.length(); i++)
+196 if ((a[i] != '\r') && (a[i] != '\0') && (a[i] != 7))
+197 b = b + a[i];
+198 std::stringstream stream(recvq);
+199 stream << b;
+200 recvq = stream.str();
+201 int i = 0;
+202 // count the size of the first line in the buffer.
+203 while (i < recvq.length())
+204 {
+205 if (recvq[i++] == '\n')
+206 break;
+207 }
+208 if (recvq.length() > this->recvqmax)
+209 {
+210 this->SetWriteError('RecvQ exceeded');
+211 WriteOpers('*** User %s RecvQ of %d exceeds connect class maximum of %d',this->nick,recvq.length(),this->recvqmax);
+212 }
+213 // return false if we've had more than 600 characters WITHOUT
+214 // a carriage return (this is BAD, drop the socket)
+215 return (i < 600);
+216 }
.fi
.SS "void userrec::AddWriteBuf (std::string data)"
.PP
-Adds to the user's write buffer. You may add any amount of text up to this users sendq value, if you exceed the sendq value, \fBSetWriteError()\fP will be called to set the users error string to 'SendQ exceeded', and further buffer adds will be dropped.Definition at line 246 of file users.cpp.
+Adds to the user's write buffer. You may add any amount of text up to this users sendq value, if you exceed the sendq value, \fBSetWriteError()\fP will be called to set the users error string to 'SendQ exceeded', and further buffer adds will be dropped.Definition at line 248 of file users.cpp.
.PP
References GetWriteError(), sendq, sendqmax, and SetWriteError().
.PP
.nf
-247 {
-248 if (this->GetWriteError() != '')
-249 return;
-250 if (sendq.length() + data.length() > this->sendqmax)
-251 {
-252 WriteOpers('*** User %s SendQ of %d exceeds connect class maximum of %d',this->nick,sendq.length() + data.length(),this->sendqmax);
-253 this->SetWriteError('SendQ exceeded');
-254 return;
-255 }
-256 std::stringstream stream;
-257 stream << sendq << data;
-258 sendq = stream.str();
-259 }
+249 {
+250 if (this->GetWriteError() != '')
+251 return;
+252 if (sendq.length() + data.length() > this->sendqmax)
+253 {
+254 WriteOpers('*** User %s SendQ of %d exceeds connect class maximum of %d',this->nick,sendq.length() + data.length(),this->sendqmax);
+255 this->SetWriteError('SendQ exceeded');
+256 return;
+257 }
+258 std::stringstream stream;
+259 stream << sendq << data;
+260 sendq = stream.str();
+261 }
.fi
.SS "bool userrec::BufferIsReady ()"
.PP
-This method returns true if the buffer contains at least one carriage return character (e.g. one complete line may be read)Definition at line 216 of file users.cpp.
+This method returns true if the buffer contains at least one carriage return character (e.g. one complete line may be read)Definition at line 218 of file users.cpp.
.PP
References recvq.
.PP
.nf
-217 {
-218 for (int i = 0; i < recvq.length(); i++)
-219 if (recvq[i] == '\n')
-220 return true;
-221 return false;
-222 }
+219 {
+220 for (int i = 0; i < recvq.length(); i++)
+221 if (recvq[i] == '\n')
+222 return true;
+223 return false;
+224 }
.fi
.SS "void userrec::ClearBuffer ()"
.PP
-This function clears the entire buffer by setting it to an empty string. Definition at line 224 of file users.cpp.
+This function clears the entire buffer by setting it to an empty string. Definition at line 226 of file users.cpp.
.PP
References recvq.
.PP
Referenced by Server::PseudoToUser(), and Server::UserToPseudo().
.PP
.nf
-225 {
-226 recvq = '';
-227 }
+227 {
+228 recvq = '';
+229 }
.fi
.SS "void userrec::CloseSocket ()"
.PP
@@ -337,287 +332,289 @@ Shuts down and closes the user's socket. Definition at line 62 of file users.cpp
.fi
.SS "void userrec::FlushWriteBuf ()"
.PP
-Flushes as much of the user's buffer to the file descriptor as possible. This function may not always flush the entire buffer, rather instead as much of it as it possibly can. If the send() call fails to send the entire buffer, the buffer position is advanced forwards and the rest of the data sent at the next call to this method.Definition at line 262 of file users.cpp.
+Flushes as much of the user's buffer to the file descriptor as possible. This function may not always flush the entire buffer, rather instead as much of it as it possibly can. If the send() call fails to send the entire buffer, the buffer position is advanced forwards and the rest of the data sent at the next call to this method.Definition at line 264 of file users.cpp.
.PP
References connection::bytes_out, connection::cmds_out, sendq, and SetWriteError().
.PP
.nf
-263 {
-264 if (sendq.length())
-265 {
-266 char* tb = (char*)this->sendq.c_str();
-267 int n_sent = write(this->fd,tb,this->sendq.length());
-268 if (n_sent == -1)
-269 {
-270 this->SetWriteError(strerror(errno));
-271 }
-272 else
-273 {
-274 // advance the queue
-275 tb += n_sent;
-276 this->sendq = tb;
-277 // update the user's stats counters
-278 this->bytes_out += n_sent;
-279 this->cmds_out++;
-280 }
-281 }
-282 }
+265 {
+266 if (sendq.length())
+267 {
+268 char* tb = (char*)this->sendq.c_str();
+269 int n_sent = write(this->fd,tb,this->sendq.length());
+270 if (n_sent == -1)
+271 {
+272 this->SetWriteError(strerror(errno));
+273 }
+274 else
+275 {
+276 // advance the queue
+277 tb += n_sent;
+278 this->sendq = tb;
+279 // update the user's stats counters
+280 this->bytes_out += n_sent;
+281 this->cmds_out++;
+282 }
+283 }
+284 }
.fi
.SS "std::string userrec::GetBuffer ()"
.PP
-This method returns the first available string at the tail end of the buffer and advances the tail end of the buffer past the string. This means it is a one way operation in a similar way to strtok(), and multiple calls return multiple lines if they are available. The results of this function if there are no lines to be read are unknown, always use \fBBufferIsReady()\fP to check if it is ok to read the buffer before calling \fBGetBuffer()\fP.Definition at line 229 of file users.cpp.
+This method returns the first available string at the tail end of the buffer and advances the tail end of the buffer past the string. This means it is a one way operation in a similar way to strtok(), and multiple calls return multiple lines if they are available. The results of this function if there are no lines to be read are unknown, always use \fBBufferIsReady()\fP to check if it is ok to read the buffer before calling \fBGetBuffer()\fP.Definition at line 231 of file users.cpp.
.PP
References recvq.
.PP
.nf
-230 {
-231 if (recvq == '')
-232 return '';
-233 char* line = (char*)recvq.c_str();
-234 std::string ret = '';
-235 while ((*line != '\n') && (strlen(line)))
-236 {
-237 ret = ret + *line;
-238 line++;
-239 }
-240 if ((*line == '\n') || (*line == '\r'))
-241 line++;
-242 recvq = line;
-243 return ret;
-244 }
+232 {
+233 if (recvq == '')
+234 return '';
+235 char* line = (char*)recvq.c_str();
+236 std::string ret = '';
+237 while ((*line != '\n') && (strlen(line)))
+238 {
+239 ret = ret + *line;
+240 line++;
+241 }
+242 if ((*line == '\n') || (*line == '\r'))
+243 line++;
+244 recvq = line;
+245 return ret;
+246 }
.fi
.SS "char * userrec::GetFullHost ()\fC [virtual]\fP"
.PP
Returns the full displayed host of the user This member function returns the hostname of the user as seen by other users on the server, in nick!identhost form. Definition at line 68 of file users.cpp.
.PP
-References dhost, ident, nick, and result.
+References dhost, ident, and nick.
.PP
.nf
69 {
-70 snprintf(result,MAXBUF,'%s!%s@%s',nick,ident,dhost);
-71 return result;
-72 }
+70 static char result[MAXBUF];
+71 snprintf(result,MAXBUF,'%s!%s@%s',nick,ident,dhost);
+72 return result;
+73 }
.fi
.SS "char * userrec::GetFullRealHost ()\fC [virtual]\fP"
.PP
-Returns the full real host of the user This member function returns the hostname of the user as seen by other users on the server, in nick!identhost form. If any form of hostname cloaking is in operation, e.g. through a module, then this method will ignore it and return the true hostname.Definition at line 84 of file users.cpp.
+Returns the full real host of the user This member function returns the hostname of the user as seen by other users on the server, in nick!identhost form. If any form of hostname cloaking is in operation, e.g. through a module, then this method will ignore it and return the true hostname.Definition at line 85 of file users.cpp.
.PP
-References connection::host, ident, nick, and result.
+References connection::host, ident, and nick.
.PP
.nf
-85 {
-86 snprintf(result,MAXBUF,'%s!%s@%s',nick,ident,host);
-87 return result;
-88 }
+86 {
+87 static char fresult[MAXBUF];
+88 snprintf(fresult,MAXBUF,'%s!%s@%s',nick,ident,host);
+89 return fresult;
+90 }
.fi
.SS "\fBInvitedList\fP * userrec::GetInviteList ()"
.PP
-Returns the list of channels this user has been invited to but has not yet joined. Definition at line 104 of file users.cpp.
+Returns the list of channels this user has been invited to but has not yet joined. Definition at line 106 of file users.cpp.
.PP
References InvitedList, and invites.
.PP
.nf
-105 {
-106 return &invites;
-107 }
+107 {
+108 return &invites;
+109 }
.fi
.SS "std::string userrec::GetWriteError ()"
.PP
-Returns the write error which last occured on this connection or an empty string if none occured. Definition at line 292 of file users.cpp.
+Returns the write error which last occured on this connection or an empty string if none occured. Definition at line 294 of file users.cpp.
.PP
References WriteError.
.PP
Referenced by AddWriteBuf().
.PP
.nf
-293 {
-294 return this->WriteError;
-295 }
+295 {
+296 return this->WriteError;
+297 }
.fi
.SS "bool userrec::HasPermission (char * command)"
.PP
-Returns true or false for if a user can execute a privilaged oper command. This is done by looking up their oper type from \fBuserrec::oper\fP, then referencing this to their oper classes and checking the commands they can execute.Definition at line 138 of file users.cpp.
+Returns true or false for if a user can execute a privilaged oper command. This is done by looking up their oper type from \fBuserrec::oper\fP, then referencing this to their oper classes and checking the commands they can execute.Definition at line 140 of file users.cpp.
.PP
References config_f, and DEBUG.
.PP
.nf
-139 {
-140 char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF];
-141 char* mycmd;
-142 char* savept;
-143 char* savept2;
-144
-145 // are they even an oper at all?
-146 if (strchr(this->modes,'o'))
-147 {
-148 log(DEBUG,'*** HasPermission: %s is an oper',this->nick);
-149 for (int j =0; j < ConfValueEnum('type',&config_f); j++)
-150 {
-151 ConfValue('type','name',j,TypeName,&config_f);
-152 if (!strcmp(TypeName,this->oper))
-153 {
-154 log(DEBUG,'*** HasPermission: %s is an oper of type '%s'',this->nick,this->oper);
-155 ConfValue('type','classes',j,Classes,&config_f);
-156 char* myclass = strtok_r(Classes,' ',&savept);
-157 while (myclass)
-158 {
-159 log(DEBUG,'*** HasPermission: checking classtype '%s'',myclass);
-160 for (int k =0; k < ConfValueEnum('class',&config_f); k++)
-161 {
-162 ConfValue('class','name',k,ClassName,&config_f);
-163 if (!strcmp(ClassName,myclass))
-164 {
-165 ConfValue('class','commands',k,CommandList,&config_f);
-166 log(DEBUG,'*** HasPermission: found class named %s with commands: '%s'',ClassName,CommandList);
-167
-168
-169 mycmd = strtok_r(CommandList,' ',&savept2);
-170 while (mycmd)
-171 {
-172 if (!strcasecmp(mycmd,command))
-173 {
-174 log(DEBUG,'*** Command %s found, returning true',command);
-175 return true;
-176 }
-177 mycmd = strtok_r(NULL,' ',&savept2);
-178 }
-179 }
-180 }
-181 myclass = strtok_r(NULL,' ',&savept);
-182 }
-183 }
-184 }
-185 }
-186 return false;
-187 }
+141 {
+142 char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF];
+143 char* mycmd;
+144 char* savept;
+145 char* savept2;
+146
+147 // are they even an oper at all?
+148 if (strchr(this->modes,'o'))
+149 {
+150 log(DEBUG,'*** HasPermission: %s is an oper',this->nick);
+151 for (int j =0; j < ConfValueEnum('type',&config_f); j++)
+152 {
+153 ConfValue('type','name',j,TypeName,&config_f);
+154 if (!strcmp(TypeName,this->oper))
+155 {
+156 log(DEBUG,'*** HasPermission: %s is an oper of type '%s'',this->nick,this->oper);
+157 ConfValue('type','classes',j,Classes,&config_f);
+158 char* myclass = strtok_r(Classes,' ',&savept);
+159 while (myclass)
+160 {
+161 log(DEBUG,'*** HasPermission: checking classtype '%s'',myclass);
+162 for (int k =0; k < ConfValueEnum('class',&config_f); k++)
+163 {
+164 ConfValue('class','name',k,ClassName,&config_f);
+165 if (!strcmp(ClassName,myclass))
+166 {
+167 ConfValue('class','commands',k,CommandList,&config_f);
+168 log(DEBUG,'*** HasPermission: found class named %s with commands: '%s'',ClassName,CommandList);
+169
+170
+171 mycmd = strtok_r(CommandList,' ',&savept2);
+172 while (mycmd)
+173 {
+174 if (!strcasecmp(mycmd,command))
+175 {
+176 log(DEBUG,'*** Command %s found, returning true',command);
+177 return true;
+178 }
+179 mycmd = strtok_r(NULL,' ',&savept2);
+180 }
+181 }
+182 }
+183 myclass = strtok_r(NULL,' ',&savept);
+184 }
+185 }
+186 }
+187 }
+188 return false;
+189 }
.fi
.SS "void userrec::InviteTo (char * channel)\fC [virtual]\fP"
.PP
-Adds a channel to a users invite list (invites them to a channel). Definition at line 109 of file users.cpp.
+Adds a channel to a users invite list (invites them to a channel). Definition at line 111 of file users.cpp.
.PP
References Invited::channel, and invites.
.PP
.nf
-110 {
-111 Invited i;
-112 strlcpy(i.channel,channel,CHANMAX);
-113 invites.push_back(i);
-114 }
+112 {
+113 Invited i;
+114 strlcpy(i.channel,channel,CHANMAX);
+115 invites.push_back(i);
+116 }
.fi
.SS "bool userrec::IsInvited (char * channel)\fC [virtual]\fP"
.PP
-Returns true if a user is invited to a channel. Definition at line 90 of file users.cpp.
+Returns true if a user is invited to a channel. Definition at line 92 of file users.cpp.
.PP
References invites.
.PP
.nf
-91 {
-92 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
-93 {
-94 if (i->channel) {
-95 if (!strcasecmp(i->channel,channel))
-96 {
-97 return true;
-98 }
-99 }
-100 }
-101 return false;
-102 }
+93 {
+94 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
+95 {
+96 if (i->channel) {
+97 if (!strcasecmp(i->channel,channel))
+98 {
+99 return true;
+100 }
+101 }
+102 }
+103 return false;
+104 }
.fi
.SS "int userrec::ReadData (void * buffer, size_t size)"
.PP
-Calls read() to read some data for this user using their fd. Definition at line 74 of file users.cpp.
+Calls read() to read some data for this user using their fd. Definition at line 75 of file users.cpp.
.PP
References connection::fd.
.PP
.nf
-75 {
-76 if (this->fd > -1)
-77 {
-78 return read(this->fd, buffer, size);
-79 }
-80 else return 0;
-81 }
+76 {
+77 if (this->fd > -1)
+78 {
+79 return read(this->fd, buffer, size);
+80 }
+81 else return 0;
+82 }
.fi
.SS "void userrec::RemoveInvite (char * channel)\fC [virtual]\fP"
.PP
-Removes a channel from a users invite list. This member function is called on successfully joining an invite only channel to which the user has previously been invited, to clear the invitation.Definition at line 116 of file users.cpp.
+Removes a channel from a users invite list. This member function is called on successfully joining an invite only channel to which the user has previously been invited, to clear the invitation.Definition at line 118 of file users.cpp.
.PP
References DEBUG, and invites.
.PP
.nf
-117 {
-118 log(DEBUG,'Removing invites');
-119 if (channel)
-120 {
-121 if (invites.size())
-122 {
-123 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
-124 {
-125 if (i->channel)
-126 {
-127 if (!strcasecmp(i->channel,channel))
-128 {
-129 invites.erase(i);
-130 return;
-131 }
-132 }
-133 }
-134 }
-135 }
-136 }
+119 {
+120 log(DEBUG,'Removing invites');
+121 if (channel)
+122 {
+123 if (invites.size())
+124 {
+125 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
+126 {
+127 if (i->channel)
+128 {
+129 if (!strcasecmp(i->channel,channel))
+130 {
+131 invites.erase(i);
+132 return;
+133 }
+134 }
+135 }
+136 }
+137 }
+138 }
.fi
.SS "void userrec::SetWriteError (std::string error)"
.PP
-Sets the write error for a connection. This is done because the actual disconnect of a client may occur at an inopportune time such as half way through /LIST output. The WriteErrors of clients are checked at a more ideal time (in the mainloop) and errored clients purged.Definition at line 284 of file users.cpp.
+Sets the write error for a connection. This is done because the actual disconnect of a client may occur at an inopportune time such as half way through /LIST output. The WriteErrors of clients are checked at a more ideal time (in the mainloop) and errored clients purged.Definition at line 286 of file users.cpp.
.PP
References DEBUG, and WriteError.
.PP
Referenced by AddBuffer(), AddWriteBuf(), and FlushWriteBuf().
.PP
.nf
-285 {
-286 log(DEBUG,'Setting error string for %s to '%s'',this->nick,error.c_str());
-287 // don't try to set the error twice, its already set take the first string.
-288 if (this->WriteError == '')
-289 this->WriteError = error;
-290 }
+287 {
+288 log(DEBUG,'Setting error string for %s to '%s'',this->nick,error.c_str());
+289 // don't try to set the error twice, its already set take the first string.
+290 if (this->WriteError == '')
+291 this->WriteError = error;
+292 }
.fi
.SH "Member Data Documentation"
.PP
-.SS "char \fBuserrec::awaymsg\fP[512]"
+.SS "char \fBuserrec::awaymsg\fP[MAXAWAY+1]"
.PP
-The user's away message. If this string is empty, the user is not marked as away.Definition at line 151 of file users.h.
+The user's away message. If this string is empty, the user is not marked as away.Definition at line 155 of file users.h.
.PP
Referenced by userrec().
.SS "\fBucrec\fP \fBuserrec::chans\fP[MAXCHANS]"
.PP
-Definition at line 142 of file users.h.
+Definition at line 146 of file users.h.
.PP
Referenced by Server::PseudoToUser(), and userrec().
.SS "char \fBuserrec::dhost\fP[160]"
.PP
-The host displayed to non-opers (used for cloaking etc). This usually matches the value of \fBuserrec::host\fP.Definition at line 130 of file users.h.
+The host displayed to non-opers (used for cloaking etc). This usually matches the value of \fBuserrec::host\fP.Definition at line 131 of file users.h.
.PP
Referenced by GetFullHost(), and userrec().
.SS "bool \fBuserrec::dns_done\fP"
.PP
-True when \fBDNS\fP lookups are completed. Definition at line 179 of file users.h.
+True when \fBDNS\fP lookups are completed. Definition at line 178 of file users.h.
.PP
Referenced by userrec().
.SS "int \fBuserrec::flood\fP"
.PP
-Number of lines the user can place into the buffer (up to the global NetBufferSize bytes) before they are disconnected for excess flood. Definition at line 162 of file users.h.
+Number of lines the user can place into the buffer (up to the global NetBufferSize bytes) before they are disconnected for excess flood. Definition at line 161 of file users.h.
.PP
Referenced by userrec().
-.SS "char \fBuserrec::fullname\fP[128]"
+.SS "char \fBuserrec::fullname\fP[MAXGECOS+1]"
.PP
-The users full name. Definition at line 134 of file users.h.
+The users full name. Definition at line 135 of file users.h.
.PP
Referenced by userrec().
-.SS "char \fBuserrec::ident\fP[16]"
+.SS "char \fBuserrec::ident\fP[IDENTMAX+2]"
.PP
-The users ident reply. Definition at line 125 of file users.h.
+The users ident reply. Two characters are added to the user-defined limit to compensate for the tilde etc.Definition at line 126 of file users.h.
.PP
Referenced by GetFullHost(), GetFullRealHost(), Server::PseudoToUser(), userrec(), and Server::UserToPseudo().
.SS "\fBInvitedList\fP \fBuserrec::invites\fP\fC [private]\fP"
@@ -627,12 +624,12 @@ A list of channels the user has a pending invite to. Definition at line 114 of f
Referenced by GetInviteList(), InviteTo(), IsInvited(), RemoveInvite(), and userrec().
.SS "int \fBuserrec::lines_in\fP"
.PP
-Flood counters. Definition at line 204 of file users.h.
+Flood counters. Definition at line 203 of file users.h.
.PP
Referenced by userrec().
-.SS "char \fBuserrec::modes\fP[MAXBUF]"
+.SS "char \fBuserrec::modes\fP[54]"
.PP
-The user's mode string. This may contain any of the following RFC characters: o, w, s, i Your module may define other mode characters as it sees fit.Definition at line 140 of file users.h.
+The user's mode string. This may contain any of the following RFC characters: o, w, s, i Your module may define other mode characters as it sees fit. it is limited to length 54, as there can only be a maximum of 52 user modes (26 upper, 26 lower case) a null terminating char, and an optional + character.Definition at line 144 of file users.h.
.PP
Referenced by userrec().
.SS "char \fBuserrec::nick\fP[NICKMAX]"
@@ -642,61 +639,56 @@ The users nickname. An invalid nickname indicates an unregistered connection pri
Referenced by ConfigReader::DumpErrors(), GetFullHost(), GetFullRealHost(), Server::PseudoToUser(), and userrec().
.SS "char \fBuserrec::oper\fP[NICKMAX]"
.PP
-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 175 of file users.h.
+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 174 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 189 of file users.h.
+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 188 of file users.h.
.SS "unsigned int \fBuserrec::pingmax\fP"
.PP
-Number of seconds between PINGs for this user (set from <connect:allow> tag. Definition at line 183 of file users.h.
+Number of seconds between PINGs for this user (set from <connect:allow> tag. Definition at line 182 of file users.h.
.SS "std::string \fBuserrec::recvq\fP"
.PP
-User's receive queue. Lines from the IRCd awaiting processing are stored here. Upgraded april 2005, old system a bit hairy.Definition at line 195 of file users.h.
+User's receive queue. Lines from the IRCd awaiting processing are stored here. Upgraded april 2005, old system a bit hairy.Definition at line 194 of file users.h.
.PP
Referenced by AddBuffer(), BufferIsReady(), ClearBuffer(), GetBuffer(), and userrec().
.SS "long \fBuserrec::recvqmax\fP"
.PP
-Maximum size this user's recvq can become. Definition at line 218 of file users.h.
+Maximum size this user's recvq can become. Definition at line 217 of file users.h.
.PP
Referenced by AddBuffer().
.SS "time_t \fBuserrec::reset_due\fP"
.PP
-Definition at line 205 of file users.h.
+Definition at line 204 of file users.h.
.PP
Referenced by userrec().
-.SS "char \fBuserrec::result\fP[256]"
-.PP
-Stores the result of the last GetFullHost or GetRealHost call. You may use this to increase the speed of use of this class.Definition at line 156 of file users.h.
-.PP
-Referenced by GetFullHost(), GetFullRealHost(), and userrec().
.SS "std::string \fBuserrec::sendq\fP"
.PP
-User's send queue. Lines waiting to be sent are stored here until their buffer is flushed.Definition at line 200 of file users.h.
+User's send queue. Lines waiting to be sent are stored here until their buffer is flushed.Definition at line 199 of file users.h.
.PP
Referenced by AddWriteBuf(), FlushWriteBuf(), and userrec().
.SS "long \fBuserrec::sendqmax\fP"
.PP
-Maximum size this user's sendq can become. Definition at line 214 of file users.h.
+Maximum size this user's sendq can become. Definition at line 213 of file users.h.
.PP
Referenced by AddWriteBuf().
-.SS "char \fBuserrec::server\fP[256]"
+.SS "char* \fBuserrec::server\fP"
.PP
-The server the user is connected to. Definition at line 146 of file users.h.
+The server the user is connected to. Definition at line 150 of file users.h.
.PP
Referenced by userrec().
.SS "long \fBuserrec::threshold\fP"
.PP
-Definition at line 206 of file users.h.
+Definition at line 205 of file users.h.
.SS "unsigned int \fBuserrec::timeout\fP"
.PP
-Number of seconds this user is given to send USER/NICK If they do not send their details in this time limit they will be disconnected. Definition at line 168 of file users.h.
+Number of seconds this user is given to send USER/NICK If they do not send their details in this time limit they will be disconnected. Definition at line 167 of file users.h.
.PP
Referenced by userrec().
.SS "std::string \fBuserrec::WriteError\fP"
.PP
-Definition at line 210 of file users.h.
+Definition at line 209 of file users.h.
.PP
Referenced by GetWriteError(), and SetWriteError().
diff --git a/docs/man/man3/users.cpp.3 b/docs/man/man3/users.cpp.3
index 4afce53e5..c9dd9006a 100644
--- a/docs/man/man3/users.cpp.3
+++ b/docs/man/man3/users.cpp.3
@@ -1,4 +1,4 @@
-.TH "users.cpp" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "users.cpp" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -28,6 +28,9 @@ users.cpp \-
.RI "std::stringstream \fBconfig_f\fP"
.br
.ti -1c
+.RI "char \fBServerName\fP [MAXBUF]"
+.br
+.ti -1c
.RI "time_t \fBTIME\fP"
.br
.in -1c
@@ -36,9 +39,12 @@ users.cpp \-
.SS "std::stringstream \fBconfig_f\fP"
.PP
Definition at line 27 of file users.cpp.
+.SS "char \fBServerName\fP[MAXBUF]"
+.PP
+Definition at line 28 of file users.cpp.
.SS "time_t \fBTIME\fP"
.PP
-Definition at line 29 of file users.cpp.
+Definition at line 30 of file users.cpp.
.SH "Author"
.PP
Generated automatically by Doxygen for InspIRCd from the source code.
diff --git a/docs/man/man3/users.h.3 b/docs/man/man3/users.h.3
index 3edfe95da..f0872e8b1 100644
--- a/docs/man/man3/users.h.3
+++ b/docs/man/man3/users.h.3
@@ -1,4 +1,4 @@
-.TH "users.h" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "users.h" 3 "30 May 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 d7fe8de4d..3444201df 100644
--- a/docs/man/man3/xline.h.3
+++ b/docs/man/man3/xline.h.3
@@ -1,4 +1,4 @@
-.TH "xline.h" 3 "25 May 2005" "InspIRCd" \" -*- nroff -*-
+.TH "xline.h" 3 "30 May 2005" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME