summaryrefslogtreecommitdiff
path: root/docs/man
diff options
context:
space:
mode:
Diffstat (limited to 'docs/man')
-rw-r--r--docs/man/man3/Admin.314
-rw-r--r--docs/man/man3/BanItem.32
-rw-r--r--docs/man/man3/BoolSet.32
-rw-r--r--docs/man/man3/ConfigReader.3278
-rw-r--r--docs/man/man3/ConnectClass.344
-rw-r--r--docs/man/man3/CullItem.32
-rw-r--r--docs/man/man3/CullList.32
-rw-r--r--docs/man/man3/DNS.32
-rw-r--r--docs/man/man3/ELine.32
-rw-r--r--docs/man/man3/Event.348
-rw-r--r--docs/man/man3/ExemptItem.32
-rw-r--r--docs/man/man3/ExtMode.320
-rw-r--r--docs/man/man3/Extensible.34
-rw-r--r--docs/man/man3/FileReader.384
-rw-r--r--docs/man/man3/GLine.32
-rw-r--r--docs/man/man3/HostItem.32
-rw-r--r--docs/man/man3/InspIRCd.345
-rw-r--r--docs/man/man3/InspSocket.3494
-rw-r--r--docs/man/man3/InviteItem.32
-rw-r--r--docs/man/man3/Invited.310
-rw-r--r--docs/man/man3/KLine.32
-rw-r--r--docs/man/man3/ModeParameter.32
-rw-r--r--docs/man/man3/Module.3326
-rw-r--r--docs/man/man3/ModuleFactory.312
-rw-r--r--docs/man/man3/ModuleMessage.38
-rw-r--r--docs/man/man3/QLine.32
-rw-r--r--docs/man/man3/Request.360
-rw-r--r--docs/man/man3/Server.3758
-rw-r--r--docs/man/man3/ServerConfig.3113
-rw-r--r--docs/man/man3/SocketEngine.36
-rw-r--r--docs/man/man3/Version.318
-rw-r--r--docs/man/man3/WhoWasUser.332
-rw-r--r--docs/man/man3/XLine.32
-rw-r--r--docs/man/man3/ZLine.32
-rw-r--r--docs/man/man3/_home_.32
-rw-r--r--docs/man/man3/_home_brain_.32
-rw-r--r--docs/man/man3/_home_brain_inspircd-cvs_.32
-rw-r--r--docs/man/man3/_home_brain_inspircd-cvs_inspircd_.32
-rw-r--r--docs/man/man3/_home_brain_inspircd-cvs_inspircd_include_.35
-rw-r--r--docs/man/man3/_home_brain_inspircd-cvs_inspircd_src_.32
-rw-r--r--docs/man/man3/aes.h.360
-rw-r--r--docs/man/man3/base.h.32
-rw-r--r--docs/man/man3/channels.cpp.3189
-rw-r--r--docs/man/man3/channels.h.3177
-rw-r--r--docs/man/man3/chanrec.3218
-rw-r--r--docs/man/man3/classbase.32
-rw-r--r--docs/man/man3/command_t.373
-rw-r--r--docs/man/man3/commands.h.3293
-rw-r--r--docs/man/man3/connection.318
-rw-r--r--docs/man/man3/connection.h.32
-rw-r--r--docs/man/man3/ctables.h.318
-rw-r--r--docs/man/man3/cull_list.h.32
-rw-r--r--docs/man/man3/dns.h.317
-rw-r--r--docs/man/man3/dns_ip4list.32
-rw-r--r--docs/man/man3/globals.h.312
-rw-r--r--docs/man/man3/hashcomp.h.32
-rw-r--r--docs/man/man3/inspircd.h.3161
-rw-r--r--docs/man/man3/inspircd_io.h.316
-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/message.h.32
-rw-r--r--docs/man/man3/mode.h.382
-rw-r--r--docs/man/man3/modules.cpp.3166
-rw-r--r--docs/man/man3/modules.h.3221
-rw-r--r--docs/man/man3/nspace.32
-rw-r--r--docs/man/man3/nspace_hash_ in_addr _.32
-rw-r--r--docs/man/man3/nspace_hash_ string _.32
-rw-r--r--docs/man/man3/serverstats.351
-rw-r--r--docs/man/man3/socket.cpp.320
-rw-r--r--docs/man/man3/socket.h.32
-rw-r--r--docs/man/man3/socketengine.cpp.32
-rw-r--r--docs/man/man3/socketengine.h.34
-rw-r--r--docs/man/man3/std.32
-rw-r--r--docs/man/man3/std_char_traits.32
-rw-r--r--docs/man/man3/typedefs.h.316
-rw-r--r--docs/man/man3/ucrec.36
-rw-r--r--docs/man/man3/userprocess.h.38
-rw-r--r--docs/man/man3/userrec.3574
-rw-r--r--docs/man/man3/users.cpp.3689
-rw-r--r--docs/man/man3/users.h.3622
-rw-r--r--docs/man/man3/xline.h.37
83 files changed, 3703 insertions, 2470 deletions
diff --git a/docs/man/man3/Admin.3 b/docs/man/man3/Admin.3
index 96c0513ca..b4593f0a1 100644
--- a/docs/man/man3/Admin.3
+++ b/docs/man/man3/Admin.3
@@ -1,4 +1,4 @@
-.TH "Admin" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "Admin" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -38,28 +38,28 @@ Holds /ADMIN data This class contains the admin details of the local server.
It is constructed by class \fBServer\fP, and has three read-only values, Name, Email and Nick that contain the specified values for the server where the module is running.
.PP
-Definition at line 125 of file modules.h.
+Definition at line 143 of file modules.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "Admin::Admin (\fBstd::string\fP name, \fBstd::string\fP email, \fBstd::string\fP nick)"
.PP
-Definition at line 163 of file modules.cpp.
+Definition at line 162 of file modules.cpp.
.PP
.nf
-163 : Name(name), Email(email), Nick(nick) { };
+162 : Name(name), Email(email), Nick(nick) { };
.fi
.PP
.SH "Member Data Documentation"
.PP
.SS "const \fBstd::string\fP \fBAdmin::Email\fP"
.PP
-Definition at line 128 of file modules.h.
+Definition at line 146 of file modules.h.
.SS "const \fBstd::string\fP \fBAdmin::Name\fP"
.PP
-Definition at line 128 of file modules.h.
+Definition at line 146 of file modules.h.
.SS "const \fBstd::string\fP \fBAdmin::Nick\fP"
.PP
-Definition at line 128 of file modules.h.
+Definition at line 146 of file modules.h.
.SH "Author"
.PP
diff --git a/docs/man/man3/BanItem.3 b/docs/man/man3/BanItem.3
index 4893370c0..4d8bcce3e 100644
--- a/docs/man/man3/BanItem.3
+++ b/docs/man/man3/BanItem.3
@@ -1,4 +1,4 @@
-.TH "BanItem" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "BanItem" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/BoolSet.3 b/docs/man/man3/BoolSet.3
index c45571390..dbfb454dd 100644
--- a/docs/man/man3/BoolSet.3
+++ b/docs/man/man3/BoolSet.3
@@ -1,4 +1,4 @@
-.TH "BoolSet" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "BoolSet" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/ConfigReader.3 b/docs/man/man3/ConfigReader.3
index 4b3f48a71..f3b765d89 100644
--- a/docs/man/man3/ConfigReader.3
+++ b/docs/man/man3/ConfigReader.3
@@ -1,4 +1,4 @@
-.TH "ConfigReader" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "ConfigReader" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -84,7 +84,7 @@ Allows reading of values from configuration files This class allows a module to
It may either be instantiated with one parameter or none. Constructing the class using one parameter allows you to specify a path to your own configuration file, otherwise, inspircd.conf is read.
.PP
-Definition at line 1532 of file modules.h.
+Definition at line 1550 of file modules.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "ConfigReader::ConfigReader ()"
@@ -93,19 +93,19 @@ Default constructor.
.PP
This constructor initialises the ConfigReader class to read the inspircd.conf file as specified when running ./configure.
.PP
-Definition at line 736 of file modules.cpp.
+Definition at line 735 of file modules.cpp.
.PP
References cache, ServerConfig::ClearStack(), CONF_FILE_NOT_FOUND, error, errorlog, ServerConfig::LoadConf(), and readerror.
.PP
.nf
-737 {
-738 Config->ClearStack();
-739 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
-740 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
-741 this->readerror = Config->LoadConf(CONFIG_FILE,this->cache,this->errorlog);
-742 if (!this->readerror)
-743 this->error = CONF_FILE_NOT_FOUND;
-744 }
+736 {
+737 Config->ClearStack();
+738 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
+739 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
+740 this->readerror = Config->LoadConf(CONFIG_FILE,this->cache,this->errorlog);
+741 if (!this->readerror)
+742 this->error = CONF_FILE_NOT_FOUND;
+743 }
.fi
.PP
.SS "ConfigReader::ConfigReader (\fBstd::string\fP filename)"
@@ -114,19 +114,19 @@ Overloaded constructor.
.PP
This constructor initialises the ConfigReader class to read a user-specified config file
.PP
-Definition at line 756 of file modules.cpp.
+Definition at line 755 of file modules.cpp.
.PP
References cache, ServerConfig::ClearStack(), CONF_FILE_NOT_FOUND, error, errorlog, ServerConfig::LoadConf(), and readerror.
.PP
.nf
-757 {
-758 Config->ClearStack();
-759 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
-760 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
-761 this->readerror = Config->LoadConf(filename.c_str(),this->cache,this->errorlog);
-762 if (!this->readerror)
-763 this->error = CONF_FILE_NOT_FOUND;
-764 };
+756 {
+757 Config->ClearStack();
+758 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
+759 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
+760 this->readerror = Config->LoadConf(filename.c_str(),this->cache,this->errorlog);
+761 if (!this->readerror)
+762 this->error = CONF_FILE_NOT_FOUND;
+763 };
.fi
.PP
.SS "ConfigReader::~ConfigReader ()"
@@ -135,17 +135,17 @@ Default destructor.
.PP
This method destroys the ConfigReader class.
.PP
-Definition at line 747 of file modules.cpp.
+Definition at line 746 of file modules.cpp.
.PP
References cache, and errorlog.
.PP
.nf
-748 {
-749 if (this->cache)
-750 delete this->cache;
-751 if (this->errorlog)
-752 delete this->errorlog;
-753 }
+747 {
+748 if (this->cache)
+749 delete this->cache;
+750 if (this->errorlog)
+751 delete this->errorlog;
+752 }
.fi
.PP
.SH "Member Function Documentation"
@@ -156,41 +156,41 @@ Dumps the list of errors in a config file to an output location.
.PP
If bail is true, then the program will abort. If bail is false and user points to a valid user record, the error report will be spooled to the given user by means of NOTICE. if bool is false AND user is false, the error report will be spooled to all opers by means of a NOTICE to all opers.
.PP
-Definition at line 835 of file modules.cpp.
+Definition at line 834 of file modules.cpp.
.PP
References errorlog, connection::fd, userrec::nick, WriteOpers(), and WriteServ().
.PP
.nf
-836 {
-837 if (bail)
-838 {
-839 printf('There were errors in your configuration:\n%s',errorlog->str().c_str());
-840 exit(0);
-841 }
-842 else
-843 {
-844 char dataline[1024];
-845 if (user)
-846 {
-847 WriteServ(user->fd,'NOTICE %s :There were errors in the configuration file:',user->nick);
-848 while (!errorlog->eof())
-849 {
-850 errorlog->getline(dataline,1024);
-851 WriteServ(user->fd,'NOTICE %s :%s',user->nick,dataline);
-852 }
-853 }
-854 else
-855 {
-856 WriteOpers('There were errors in the configuration file:',user->nick);
-857 while (!errorlog->eof())
-858 {
-859 errorlog->getline(dataline,1024);
-860 WriteOpers(dataline);
-861 }
-862 }
-863 return;
-864 }
-865 }
+835 {
+836 if (bail)
+837 {
+838 printf('There were errors in your configuration:\n%s',errorlog->str().c_str());
+839 exit(0);
+840 }
+841 else
+842 {
+843 char dataline[1024];
+844 if (user)
+845 {
+846 WriteServ(user->fd,'NOTICE %s :There were errors in the configuration file:',user->nick);
+847 while (!errorlog->eof())
+848 {
+849 errorlog->getline(dataline,1024);
+850 WriteServ(user->fd,'NOTICE %s :%s',user->nick,dataline);
+851 }
+852 }
+853 else
+854 {
+855 WriteOpers('There were errors in the configuration file:',user->nick);
+856 while (!errorlog->eof())
+857 {
+858 errorlog->getline(dataline,1024);
+859 WriteOpers(dataline);
+860 }
+861 }
+862 return;
+863 }
+864 }
.fi
.PP
.SS "int ConfigReader::Enumerate (\fBstd::string\fP tag)"
@@ -199,14 +199,14 @@ Counts the number of times a given tag appears in the config file.
.PP
This method counts the number of times a tag appears in a config file, for use where there are several tags of the same kind, e.g. with opers and connect types. It can be used with the index value of \fBConfigReader::ReadValue\fP to loop through all copies of a multiple instance tag.
.PP
-Definition at line 868 of file modules.cpp.
+Definition at line 867 of file modules.cpp.
.PP
References cache, and ServerConfig::EnumConf().
.PP
.nf
-869 {
-870 return Config->EnumConf(cache,tag.c_str());
-871 }
+868 {
+869 return Config->EnumConf(cache,tag.c_str());
+870 }
.fi
.PP
.SS "int ConfigReader::EnumerateValues (\fBstd::string\fP tag, int index)"
@@ -215,14 +215,14 @@ Returns the number of items within a tag.
.PP
For example if the tag was <test tag='blah' data='foo'> then this function would return 2. Spaces and newlines both qualify as valid seperators between values.
.PP
-Definition at line 873 of file modules.cpp.
+Definition at line 872 of file modules.cpp.
.PP
References cache, and ServerConfig::EnumValues().
.PP
.nf
-874 {
-875 return Config->EnumValues(cache, tag.c_str(), index);
-876 }
+873 {
+874 return Config->EnumValues(cache, tag.c_str(), index);
+875 }
.fi
.PP
.SS "long ConfigReader::GetError ()"
@@ -231,16 +231,16 @@ Returns the last error to occur.
.PP
Valid errors can be found by looking in \fBmodules.h\fP. Any nonzero value indicates an error condition. A call to \fBGetError()\fP resets the error flag back to 0.
.PP
-Definition at line 828 of file modules.cpp.
+Definition at line 827 of file modules.cpp.
.PP
References error.
.PP
.nf
-829 {
-830 long olderr = this->error;
-831 this->error = 0;
-832 return olderr;
-833 }
+828 {
+829 long olderr = this->error;
+830 this->error = 0;
+831 return olderr;
+832 }
.fi
.PP
.SS "bool ConfigReader::ReadFlag (\fBstd::string\fP tag, \fBstd::string\fP name, int index)"
@@ -249,26 +249,26 @@ Retrieves a boolean value from the config file.
.PP
This method retrieves a boolean value from the config file. Where multiple copies of the tag exist in the config file, index indicates which of the values to retrieve. The values '1', 'yes' and 'true' in the config file count as true to ReadFlag, and any other value counts as false.
.PP
-Definition at line 782 of file modules.cpp.
+Definition at line 781 of file modules.cpp.
.PP
References cache, CONF_VALUE_NOT_FOUND, error, and ServerConfig::ReadConf().
.PP
.nf
-783 {
-784 char val[MAXBUF];
-785 char t[MAXBUF];
-786 char n[MAXBUF];
-787 strlcpy(t,tag.c_str(),MAXBUF);
-788 strlcpy(n,name.c_str(),MAXBUF);
-789 int res = Config->ReadConf(cache,t,n,index,val);
-790 if (!res)
-791 {
-792 this->error = CONF_VALUE_NOT_FOUND;
-793 return false;
-794 }
-795 std::string s = val;
-796 return ((s == 'yes') || (s == 'YES') || (s == 'true') || (s == 'TRUE') || (s == '1'));
-797 }
+782 {
+783 char val[MAXBUF];
+784 char t[MAXBUF];
+785 char n[MAXBUF];
+786 strlcpy(t,tag.c_str(),MAXBUF);
+787 strlcpy(n,name.c_str(),MAXBUF);
+788 int res = Config->ReadConf(cache,t,n,index,val);
+789 if (!res)
+790 {
+791 this->error = CONF_VALUE_NOT_FOUND;
+792 return false;
+793 }
+794 std::string s = val;
+795 return ((s == 'yes') || (s == 'YES') || (s == 'true') || (s == 'TRUE') || (s == '1'));
+796 }
.fi
.PP
.SS "long ConfigReader::ReadInteger (\fBstd::string\fP tag, \fBstd::string\fP name, int index, bool needs_unsigned)"
@@ -277,38 +277,38 @@ Retrieves an integer value from the config file.
.PP
This method retrieves an integer value from the config file. Where multiple copies of the tag exist in the config file, index indicates which of the values to retrieve. Any invalid integer values in the tag will cause the objects error value to be set, and any call to \fBGetError()\fP will return CONF_INVALID_NUMBER to be returned. needs_unsigned is set if the number must be unsigned. If a signed number is placed into a tag which is specified unsigned, 0 will be returned and \fBGetError()\fP will return CONF_NOT_UNSIGNED
.PP
-Definition at line 799 of file modules.cpp.
+Definition at line 798 of file modules.cpp.
.PP
References cache, CONF_NOT_A_NUMBER, CONF_NOT_UNSIGNED, CONF_VALUE_NOT_FOUND, error, and ServerConfig::ReadConf().
.PP
.nf
-800 {
-801 char val[MAXBUF];
-802 char t[MAXBUF];
-803 char n[MAXBUF];
-804 strlcpy(t,tag.c_str(),MAXBUF);
-805 strlcpy(n,name.c_str(),MAXBUF);
-806 int res = Config->ReadConf(cache,t,n,index,val);
-807 if (!res)
-808 {
-809 this->error = CONF_VALUE_NOT_FOUND;
-810 return 0;
-811 }
-812 for (unsigned int i = 0; i < strlen(val); i++)
-813 {
-814 if (!isdigit(val[i]))
-815 {
-816 this->error = CONF_NOT_A_NUMBER;
-817 return 0;
-818 }
-819 }
-820 if ((needs_unsigned) && (atoi(val)<0))
-821 {
-822 this->error = CONF_NOT_UNSIGNED;
-823 return 0;
-824 }
-825 return atoi(val);
-826 }
+799 {
+800 char val[MAXBUF];
+801 char t[MAXBUF];
+802 char n[MAXBUF];
+803 strlcpy(t,tag.c_str(),MAXBUF);
+804 strlcpy(n,name.c_str(),MAXBUF);
+805 int res = Config->ReadConf(cache,t,n,index,val);
+806 if (!res)
+807 {
+808 this->error = CONF_VALUE_NOT_FOUND;
+809 return 0;
+810 }
+811 for (unsigned int i = 0; i < strlen(val); i++)
+812 {
+813 if (!isdigit(val[i]))
+814 {
+815 this->error = CONF_NOT_A_NUMBER;
+816 return 0;
+817 }
+818 }
+819 if ((needs_unsigned) && (atoi(val)<0))
+820 {
+821 this->error = CONF_NOT_UNSIGNED;
+822 return 0;
+823 }
+824 return atoi(val);
+825 }
.fi
.PP
.SS "\fBstd::string\fP ConfigReader::ReadValue (\fBstd::string\fP tag, \fBstd::string\fP name, int index)"
@@ -317,25 +317,25 @@ Retrieves a value from the config file.
.PP
This method retrieves a value from the config file. Where multiple copies of the tag exist in the config file, index indicates which of the values to retrieve.
.PP
-Definition at line 766 of file modules.cpp.
+Definition at line 765 of file modules.cpp.
.PP
References cache, CONF_VALUE_NOT_FOUND, error, and ServerConfig::ReadConf().
.PP
.nf
-767 {
-768 char val[MAXBUF];
-769 char t[MAXBUF];
-770 char n[MAXBUF];
-771 strlcpy(t,tag.c_str(),MAXBUF);
-772 strlcpy(n,name.c_str(),MAXBUF);
-773 int res = Config->ReadConf(cache,t,n,index,val);
-774 if (!res)
-775 {
-776 this->error = CONF_VALUE_NOT_FOUND;
-777 return '';
-778 }
-779 return val;
-780 }
+766 {
+767 char val[MAXBUF];
+768 char t[MAXBUF];
+769 char n[MAXBUF];
+770 strlcpy(t,tag.c_str(),MAXBUF);
+771 strlcpy(n,name.c_str(),MAXBUF);
+772 int res = Config->ReadConf(cache,t,n,index,val);
+773 if (!res)
+774 {
+775 this->error = CONF_VALUE_NOT_FOUND;
+776 return '';
+777 }
+778 return val;
+779 }
.fi
.PP
.SS "bool ConfigReader::Verify ()"
@@ -344,14 +344,14 @@ Returns true if a config file is valid.
.PP
This method is partially implemented and will only return false if the config file does not exist or could not be opened.
.PP
-Definition at line 878 of file modules.cpp.
+Definition at line 877 of file modules.cpp.
.PP
References readerror.
.PP
.nf
-879 {
-880 return this->readerror;
-881 }
+878 {
+879 return this->readerror;
+880 }
.fi
.PP
.SH "Member Data Documentation"
@@ -362,24 +362,24 @@ The contents of the configuration file This protected member should never be acc
.PP
It will contain a pointer to the configuration file data with unneeded data (such as comments) stripped from it.
.PP
-Definition at line 1540 of file modules.h.
+Definition at line 1558 of file modules.h.
.PP
Referenced by ConfigReader(), Enumerate(), EnumerateValues(), ReadFlag(), ReadInteger(), ReadValue(), and ~ConfigReader().
.SS "long \fBConfigReader::error\fP\fC [protected]\fP"
.PP
-Definition at line 1545 of file modules.h.
+Definition at line 1563 of file modules.h.
.PP
Referenced by ConfigReader(), GetError(), ReadFlag(), ReadInteger(), and ReadValue().
.SS "std::stringstream* \fBConfigReader::errorlog\fP\fC [protected]\fP"
.PP
-Definition at line 1541 of file modules.h.
+Definition at line 1559 of file modules.h.
.PP
Referenced by ConfigReader(), DumpErrors(), and ~ConfigReader().
.SS "bool \fBConfigReader::readerror\fP\fC [protected]\fP"
.PP
Used to store errors.
.PP
-Definition at line 1544 of file modules.h.
+Definition at line 1562 of file modules.h.
.PP
Referenced by ConfigReader(), and Verify().
diff --git a/docs/man/man3/ConnectClass.3 b/docs/man/man3/ConnectClass.3
index 25d462925..fc7128778 100644
--- a/docs/man/man3/ConnectClass.3
+++ b/docs/man/man3/ConnectClass.3
@@ -1,4 +1,4 @@
-.TH "ConnectClass" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "ConnectClass" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -63,26 +63,26 @@ Inherits \fBclassbase\fP.
.PP
Holds information relevent to <connect allow> and <connect deny> tags in the config file.
.PP
-Definition at line 48 of file users.h.
+Definition at line 52 of file users.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "ConnectClass::ConnectClass ()\fC [inline]\fP"
.PP
-Definition at line 82 of file users.h.
+Definition at line 86 of file users.h.
.PP
References flood, host, pass, pingtime, recvqmax, registration_timeout, sendqmax, and threshold.
.PP
.nf
-83 {
-84 registration_timeout = 0;
-85 flood = 0;
-86 pingtime = 0;
-87 threshold = 0;
-88 sendqmax = 0;
-89 recvqmax = 0;
-90 strlcpy(host,'',MAXBUF);
-91 strlcpy(pass,'',MAXBUF);
-92 }
+87 {
+88 registration_timeout = 0;
+89 flood = 0;
+90 pingtime = 0;
+91 threshold = 0;
+92 sendqmax = 0;
+93 recvqmax = 0;
+94 strlcpy(host,'',MAXBUF);
+95 strlcpy(pass,'',MAXBUF);
+96 }
.fi
.PP
.SH "Member Data Documentation"
@@ -91,63 +91,63 @@ References flood, host, pass, pingtime, recvqmax, registration_timeout, sendqmax
.PP
Number of lines in buffer before excess flood is triggered.
.PP
-Definition at line 59 of file users.h.
+Definition at line 63 of file users.h.
.PP
Referenced by ConnectClass().
.SS "char \fBConnectClass::host\fP[MAXBUF]"
.PP
Host mask for this line.
.PP
-Definition at line 62 of file users.h.
+Definition at line 66 of file users.h.
.PP
Referenced by ConnectClass().
.SS "char \fBConnectClass::pass\fP[MAXBUF]"
.PP
(Optional) Password for this line
.PP
-Definition at line 68 of file users.h.
+Definition at line 72 of file users.h.
.PP
Referenced by ConnectClass().
.SS "int \fBConnectClass::pingtime\fP"
.PP
Number of seconds between pings for this line.
.PP
-Definition at line 65 of file users.h.
+Definition at line 69 of file users.h.
.PP
Referenced by ConnectClass().
.SS "long \fBConnectClass::recvqmax\fP"
.PP
Maximum size of recvq for users in this class (bytes).
.PP
-Definition at line 80 of file users.h.
+Definition at line 84 of file users.h.
.PP
Referenced by ConnectClass().
.SS "int \fBConnectClass::registration_timeout\fP"
.PP
Max time to register the connection in seconds.
.PP
-Definition at line 56 of file users.h.
+Definition at line 60 of file users.h.
.PP
Referenced by ConnectClass().
.SS "long \fBConnectClass::sendqmax\fP"
.PP
Maximum size of sendq for users in this class (bytes).
.PP
-Definition at line 76 of file users.h.
+Definition at line 80 of file users.h.
.PP
Referenced by ConnectClass().
.SS "int \fBConnectClass::threshold\fP"
.PP
Threshold value for flood disconnect.
.PP
-Definition at line 72 of file users.h.
+Definition at line 76 of file users.h.
.PP
Referenced by ConnectClass().
.SS "char \fBConnectClass::type\fP"
.PP
Type of line, either CC_ALLOW or CC_DENY.
.PP
-Definition at line 53 of file users.h.
+Definition at line 57 of file users.h.
.SH "Author"
.PP
diff --git a/docs/man/man3/CullItem.3 b/docs/man/man3/CullItem.3
index 5a226c4c9..8877d91ac 100644
--- a/docs/man/man3/CullItem.3
+++ b/docs/man/man3/CullItem.3
@@ -1,4 +1,4 @@
-.TH "CullItem" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "CullItem" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/CullList.3 b/docs/man/man3/CullList.3
index 0d8444d53..88bba01ab 100644
--- a/docs/man/man3/CullList.3
+++ b/docs/man/man3/CullList.3
@@ -1,4 +1,4 @@
-.TH "CullList" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "CullList" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/DNS.3 b/docs/man/man3/DNS.3
index cd8856bc2..2b5c3617e 100644
--- a/docs/man/man3/DNS.3
+++ b/docs/man/man3/DNS.3
@@ -1,4 +1,4 @@
-.TH "DNS" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "DNS" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/ELine.3 b/docs/man/man3/ELine.3
index f16fee5ec..0453224ce 100644
--- a/docs/man/man3/ELine.3
+++ b/docs/man/man3/ELine.3
@@ -1,4 +1,4 @@
-.TH "ELine" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "ELine" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/Event.3 b/docs/man/man3/Event.3
index 42c9851da..7ce4188e5 100644
--- a/docs/man/man3/Event.3
+++ b/docs/man/man3/Event.3
@@ -1,4 +1,4 @@
-.TH "Event" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "Event" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -58,17 +58,17 @@ The Event class is a unicast message directed at all modules.
When the class is properly instantiated it may be sent to all modules using the \fBSend()\fP method, which will trigger the OnEvent method in all modules passing the object as its parameter.
.PP
-Definition at line 197 of file modules.h.
+Definition at line 215 of file modules.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "Event::Event (char * anydata, \fBModule\fP * src, \fBstd::string\fP eventid)"
.PP
Create a new Event.
.PP
-Definition at line 194 of file modules.cpp.
+Definition at line 193 of file modules.cpp.
.PP
.nf
-194 : data(anydata), source(src), id(eventid) { };
+193 : data(anydata), source(src), id(eventid) { };
.fi
.PP
.SH "Member Function Documentation"
@@ -77,14 +77,14 @@ Definition at line 194 of file modules.cpp.
.PP
Get the Event data.
.PP
-Definition at line 196 of file modules.cpp.
+Definition at line 195 of file modules.cpp.
.PP
References data.
.PP
.nf
-197 {
-198 return this->data;
-199 }
+196 {
+197 return this->data;
+198 }
.fi
.PP
.SS "\fBstd::string\fP Event::GetEventID ()"
@@ -93,28 +93,28 @@ Get the event ID.
.PP
Use this to determine the event type for safe casting of the data
.PP
-Definition at line 212 of file modules.cpp.
+Definition at line 211 of file modules.cpp.
.PP
References id.
.PP
.nf
-213 {
-214 return this->id;
-215 }
+212 {
+213 return this->id;
+214 }
.fi
.PP
.SS "\fBModule\fP * Event::GetSource ()"
.PP
Get the event Source.
.PP
-Definition at line 201 of file modules.cpp.
+Definition at line 200 of file modules.cpp.
.PP
References source.
.PP
.nf
-202 {
-203 return this->source;
-204 }
+201 {
+202 return this->source;
+203 }
.fi
.PP
.SS "char * Event::Send ()\fC [virtual]\fP"
@@ -125,15 +125,15 @@ The return result of an \fBEvent::Send()\fP will always be NULL as no replies ar
.PP
Implements \fBModuleMessage\fP.
.PP
-Definition at line 206 of file modules.cpp.
+Definition at line 205 of file modules.cpp.
.PP
References FOREACH_MOD.
.PP
.nf
-207 {
-208 FOREACH_MOD OnEvent(this);
-209 return NULL;
-210 }
+206 {
+207 FOREACH_MOD OnEvent(this);
+208 return NULL;
+209 }
.fi
.PP
.SH "Member Data Documentation"
@@ -142,7 +142,7 @@ References FOREACH_MOD.
.PP
This member holds a pointer to arbitary data set by the emitter of the message.
.PP
-Definition at line 202 of file modules.h.
+Definition at line 220 of file modules.h.
.PP
Referenced by GetData().
.SS "\fBstd::string\fP \fBEvent::id\fP\fC [protected]\fP"
@@ -151,14 +151,14 @@ The event identifier.
.PP
This is arbitary text which should be used to distinguish one type of event from another.
.PP
-Definition at line 211 of file modules.h.
+Definition at line 229 of file modules.h.
.PP
Referenced by GetEventID().
.SS "\fBModule\fP* \fBEvent::source\fP\fC [protected]\fP"
.PP
This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply.
.PP
-Definition at line 206 of file modules.h.
+Definition at line 224 of file modules.h.
.PP
Referenced by GetSource().
diff --git a/docs/man/man3/ExemptItem.3 b/docs/man/man3/ExemptItem.3
index edf2a56e1..861deec67 100644
--- a/docs/man/man3/ExemptItem.3
+++ b/docs/man/man3/ExemptItem.3
@@ -1,4 +1,4 @@
-.TH "ExemptItem" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "ExemptItem" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/ExtMode.3 b/docs/man/man3/ExtMode.3
index 688fdef6d..8d172b5da 100644
--- a/docs/man/man3/ExtMode.3
+++ b/docs/man/man3/ExtMode.3
@@ -1,4 +1,4 @@
-.TH "ExtMode" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "ExtMode" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -47,37 +47,37 @@ Holds an extended mode's details.
Used internally by \fBmodules.cpp\fP
.PP
-Definition at line 236 of file modules.h.
+Definition at line 254 of file modules.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "ExtMode::ExtMode (char mc, int ty, bool oper, int p_on, int p_off)\fC [inline]\fP"
.PP
-Definition at line 245 of file modules.h.
+Definition at line 263 of file modules.h.
.PP
.nf
-245 : modechar(mc), type(ty), needsoper(oper), params_when_on(p_on), params_when_off(p_off) { };
+263 : modechar(mc), type(ty), needsoper(oper), params_when_on(p_on), params_when_off(p_off) { };
.fi
.PP
.SH "Member Data Documentation"
.PP
.SS "bool \fBExtMode::list\fP"
.PP
-Definition at line 244 of file modules.h.
+Definition at line 262 of file modules.h.
.SS "char \fBExtMode::modechar\fP"
.PP
-Definition at line 239 of file modules.h.
+Definition at line 257 of file modules.h.
.SS "bool \fBExtMode::needsoper\fP"
.PP
-Definition at line 241 of file modules.h.
+Definition at line 259 of file modules.h.
.SS "int \fBExtMode::params_when_off\fP"
.PP
-Definition at line 243 of file modules.h.
+Definition at line 261 of file modules.h.
.SS "int \fBExtMode::params_when_on\fP"
.PP
-Definition at line 242 of file modules.h.
+Definition at line 260 of file modules.h.
.SS "int \fBExtMode::type\fP"
.PP
-Definition at line 240 of file modules.h.
+Definition at line 258 of file modules.h.
.SH "Author"
.PP
diff --git a/docs/man/man3/Extensible.3 b/docs/man/man3/Extensible.3
index ea99cdf6a..25be94035 100644
--- a/docs/man/man3/Extensible.3
+++ b/docs/man/man3/Extensible.3
@@ -1,4 +1,4 @@
-.TH "Extensible" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "Extensible" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -12,7 +12,7 @@ Extensible \- class Extensible is the parent class of many classes such as userr
.PP
Inherits \fBclassbase\fP.
.PP
-Inherited by \fBchanrec\fP, \fBcommand_t\fP, and \fBconnection\fP.
+Inherited by \fBchanrec\fP, and \fBconnection\fP.
.PP
.SS "Public Member Functions"
diff --git a/docs/man/man3/FileReader.3 b/docs/man/man3/FileReader.3
index 99afbea95..e161908a0 100644
--- a/docs/man/man3/FileReader.3
+++ b/docs/man/man3/FileReader.3
@@ -1,4 +1,4 @@
-.TH "FileReader" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "FileReader" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -57,7 +57,7 @@ Caches a text file into memory and can be used to retrieve lines from it.
This class contains methods for read-only manipulation of a text file in memory. Either use the constructor type with one parameter to load a file into memory at construction, or use the LoadFile method to load a file.
.PP
-Definition at line 1621 of file modules.h.
+Definition at line 1639 of file modules.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "FileReader::FileReader ()"
@@ -66,11 +66,11 @@ Default constructor.
.PP
This method does not load any file into memory, you must use the LoadFile method after constructing the class this way.
.PP
-Definition at line 891 of file modules.cpp.
+Definition at line 890 of file modules.cpp.
.PP
.nf
-892 {
-893 }
+891 {
+892 }
.fi
.PP
.SS "FileReader::FileReader (\fBstd::string\fP filename)"
@@ -79,16 +79,16 @@ Secondary constructor.
.PP
This method initialises the class with a file loaded into it ready for GetLine and and other methods to be called. If the file could not be loaded, \fBFileReader::FileSize\fP returns 0.
.PP
-Definition at line 884 of file modules.cpp.
+Definition at line 883 of file modules.cpp.
.PP
References fc, and readfile().
.PP
.nf
-885 {
-886 file_cache c;
-887 readfile(c,filename.c_str());
-888 this->fc = c;
-889 }
+884 {
+885 file_cache c;
+886 readfile(c,filename.c_str());
+887 this->fc = c;
+888 }
.fi
.PP
.SS "FileReader::~FileReader ()"
@@ -97,11 +97,11 @@ Default destructor.
.PP
This deletes the memory allocated to the file.
.PP
-Definition at line 903 of file modules.cpp.
+Definition at line 902 of file modules.cpp.
.PP
.nf
-904 {
-905 }
+903 {
+904 }
.fi
.PP
.SH "Member Function Documentation"
@@ -110,21 +110,21 @@ Definition at line 903 of file modules.cpp.
.PP
Returns true if the file exists This function will return false if the file could not be opened.
.PP
-Definition at line 907 of file modules.cpp.
+Definition at line 906 of file modules.cpp.
.PP
References fc.
.PP
.nf
-908 {
-909 if (fc.size() == 0)
-910 {
-911 return(false);
-912 }
-913 else
-914 {
-915 return(true);
-916 }
-917 }
+907 {
+908 if (fc.size() == 0)
+909 {
+910 return(false);
+911 }
+912 else
+913 {
+914 return(true);
+915 }
+916 }
.fi
.PP
.SS "int FileReader::FileSize ()"
@@ -133,14 +133,14 @@ Returns the size of the file in lines.
.PP
This method returns the number of lines in the read file. If it is 0, no lines have been read into memory, either because the file is empty or it does not exist, or cannot be opened due to permission problems.
.PP
-Definition at line 926 of file modules.cpp.
+Definition at line 925 of file modules.cpp.
.PP
References fc.
.PP
.nf
-927 {
-928 return fc.size();
-929 }
+926 {
+927 return fc.size();
+928 }
.fi
.PP
.SS "\fBstd::string\fP FileReader::GetLine (int x)"
@@ -149,16 +149,16 @@ Retrieve one line from the file.
.PP
This method retrieves one line from the text file. If an empty non-NULL string is returned, the index was out of bounds, or the line had no data on it.
.PP
-Definition at line 919 of file modules.cpp.
+Definition at line 918 of file modules.cpp.
.PP
References fc.
.PP
.nf
-920 {
-921 if ((x<0) || ((unsigned)x>fc.size()))
-922 return '';
-923 return fc[x];
-924 }
+919 {
+920 if ((x<0) || ((unsigned)x>fc.size()))
+921 return '';
+922 return fc[x];
+923 }
.fi
.PP
.SS "void FileReader::LoadFile (\fBstd::string\fP filename)"
@@ -167,23 +167,23 @@ Used to load a file.
.PP
This method loads a file into the class ready for GetLine and and other methods to be called. If the file could not be loaded, \fBFileReader::FileSize\fP returns 0.
.PP
-Definition at line 895 of file modules.cpp.
+Definition at line 894 of file modules.cpp.
.PP
References fc, and readfile().
.PP
.nf
-896 {
-897 file_cache c;
-898 readfile(c,filename.c_str());
-899 this->fc = c;
-900 }
+895 {
+896 file_cache c;
+897 readfile(c,filename.c_str());
+898 this->fc = c;
+899 }
.fi
.PP
.SH "Member Data Documentation"
.PP
.SS "\fBfile_cache\fP \fBFileReader::fc\fP\fC [private]\fP"
.PP
-Definition at line 1623 of file modules.h.
+Definition at line 1641 of file modules.h.
.PP
Referenced by Exists(), FileReader(), FileSize(), GetLine(), and LoadFile().
diff --git a/docs/man/man3/GLine.3 b/docs/man/man3/GLine.3
index 6ef1c742e..83c54ae8a 100644
--- a/docs/man/man3/GLine.3
+++ b/docs/man/man3/GLine.3
@@ -1,4 +1,4 @@
-.TH "GLine" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "GLine" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/HostItem.3 b/docs/man/man3/HostItem.3
index 79c256f86..48d8f6d15 100644
--- a/docs/man/man3/HostItem.3
+++ b/docs/man/man3/HostItem.3
@@ -1,4 +1,4 @@
-.TH "HostItem" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "HostItem" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/InspIRCd.3 b/docs/man/man3/InspIRCd.3
index 219e539b4..be447b95d 100644
--- a/docs/man/man3/InspIRCd.3
+++ b/docs/man/man3/InspIRCd.3
@@ -1,4 +1,4 @@
-.TH "InspIRCd" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "InspIRCd" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -12,6 +12,9 @@ InspIRCd \-
.in +1c
.ti -1c
+.RI "void \fBMakeLowerMap\fP ()"
+.br
+.ti -1c
.RI "\fBstd::string\fP \fBGetRevision\fP ()"
.br
.ti -1c
@@ -39,6 +42,18 @@ InspIRCd \-
.ti -1c
.RI "time_t \fBstartup_time\fP"
.br
+.ti -1c
+.RI "\fBModeParser\fP * \fBModeGrok\fP"
+.br
+.ti -1c
+.RI "CommandParser * \fBParser\fP"
+.br
+.ti -1c
+.RI "\fBSocketEngine\fP * \fBSE\fP"
+.br
+.ti -1c
+.RI "\fBserverstats\fP * \fBstats\fP"
+.br
.in -1c
.SS "Private Member Functions"
@@ -59,7 +74,7 @@ InspIRCd \-
.in -1c
.SH "Detailed Description"
.PP
-Definition at line 95 of file inspircd.h.
+Definition at line 99 of file inspircd.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "InspIRCd::InspIRCd (int argc, char ** argv)"
@@ -77,6 +92,8 @@ Definition at line 95 of file inspircd.h.
Referenced by Server::GetVersion().
.SS "bool InspIRCd::LoadModule (const char * filename)"
.PP
+.SS "void InspIRCd::MakeLowerMap ()"
+.PP
.SS "char* InspIRCd::ModuleError ()"
.PP
.SS "int InspIRCd::Run ()"
@@ -85,12 +102,32 @@ Referenced by Server::GetVersion().
.PP
.SH "Member Data Documentation"
.PP
+.SS "\fBModeParser\fP* \fBInspIRCd::ModeGrok\fP"
+.PP
+Definition at line 109 of file inspircd.h.
+.PP
+Referenced by Server::SendMode().
.SS "char \fBInspIRCd::MODERR\fP[MAXBUF]\fC [private]\fP"
.PP
-Definition at line 99 of file inspircd.h.
+Definition at line 103 of file inspircd.h.
+.SS "CommandParser* \fBInspIRCd::Parser\fP"
+.PP
+Definition at line 110 of file inspircd.h.
+.PP
+Referenced by Server::AddCommand(), Server::CallCommandHandler(), force_nickchange(), and Server::IsValidModuleCommand().
+.SS "\fBSocketEngine\fP* \fBInspIRCd::SE\fP"
+.PP
+Definition at line 111 of file inspircd.h.
+.PP
+Referenced by AddClient(), InspSocket::InspSocket(), kill_link(), kill_link_silent(), InspSocket::Poll(), and Server::UserToPseudo().
.SS "time_t \fBInspIRCd::startup_time\fP"
.PP
-Definition at line 104 of file inspircd.h.
+Definition at line 108 of file inspircd.h.
+.SS "\fBserverstats\fP* \fBInspIRCd::stats\fP"
+.PP
+Definition at line 112 of file inspircd.h.
+.PP
+Referenced by force_nickchange(), and FullConnectUser().
.SH "Author"
.PP
diff --git a/docs/man/man3/InspSocket.3 b/docs/man/man3/InspSocket.3
index d2e99e555..9ba5cbdfd 100644
--- a/docs/man/man3/InspSocket.3
+++ b/docs/man/man3/InspSocket.3
@@ -1,4 +1,4 @@
-.TH "InspSocket" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "InspSocket" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -94,6 +94,14 @@ InspSocket \- InspSocket is an extendable socket class which modules can use for
.br
.RI "\fIThe destructor may implicitly call \fBOnClose()\fP, and will close() and shutdown() the file descriptor used for this socket. \fP"
.in -1c
+.SS "Private Member Functions"
+
+.in +1c
+.ti -1c
+.RI "void \fBFlushWriteBuffer\fP ()"
+.br
+.RI "\fIFlushes the write buffer. \fP"
+.in -1c
.SS "Private Attributes"
.in +1c
@@ -130,10 +138,14 @@ InspSocket \- InspSocket is an extendable socket class which modules can use for
.br
.RI "\fIThis value is true if the socket has timed out. \fP"
.ti -1c
-.RI "char \fBibuf\fP [16384]"
+.RI "char \fBibuf\fP [65535]"
.br
.RI "\fISocket input buffer, used by read(). \fP"
.ti -1c
+.RI "\fBstd::string\fP \fBBuffer\fP"
+.br
+.RI "\fIThe output buffer for this socket. \fP"
+.ti -1c
.RI "\fBstd::string\fP \fBIP\fP"
.br
.RI "\fIThe IP address being connected to stored in string form for easy retrieval by accessors. \fP"
@@ -163,14 +175,14 @@ Definition at line 47 of file socket.h.
.PP
The default constructor does nothing and should not be used.
.PP
-Definition at line 48 of file socket.cpp.
+Definition at line 45 of file socket.cpp.
.PP
References I_DISCONNECTED, and state.
.PP
.nf
-49 {
-50 this->state = I_DISCONNECTED;
-51 }
+46 {
+47 this->state = I_DISCONNECTED;
+48 }
.fi
.PP
.SS "InspSocket::InspSocket (int newfd, char * ip)"
@@ -179,18 +191,18 @@ This constructor is used to associate an existing connecting with an InspSocket
.PP
The given file descriptor must be valid, and when initialized, the InspSocket will be set with the given IP address and placed in CONNECTED state.
.PP
-Definition at line 53 of file socket.cpp.
+Definition at line 50 of file socket.cpp.
.PP
-References SocketEngine::AddFd(), fd, I_CONNECTED, IP, state, and X_ESTAB_MODULE.
+References SocketEngine::AddFd(), fd, I_CONNECTED, IP, InspIRCd::SE, state, and X_ESTAB_MODULE.
.PP
.nf
-54 {
-55 this->fd = newfd;
-56 this->state = I_CONNECTED;
-57 this->IP = ip;
-58 SE->AddFd(this->fd,true,X_ESTAB_MODULE);
-59 socket_ref[this->fd] = this;
-60 }
+51 {
+52 this->fd = newfd;
+53 this->state = I_CONNECTED;
+54 this->IP = ip;
+55 ServerInstance->SE->AddFd(this->fd,true,X_ESTAB_MODULE);
+56 socket_ref[this->fd] = this;
+57 }
.fi
.PP
.SS "InspSocket::InspSocket (\fBstd::string\fP host, int port, bool listening, unsigned long maxtime)"
@@ -210,102 +222,102 @@ This constructor is used to create a new socket, either listening for connection
.PP
.PP
-Definition at line 62 of file socket.cpp.
+Definition at line 59 of file socket.cpp.
.PP
-References SocketEngine::AddFd(), addr, addy, BindSocket(), Close(), DEBUG, ERROR, fd, I_CONNECTING, I_ERR_BIND, I_ERR_CONNECT, I_ERR_SOCKET, I_ERROR, I_LISTENING, IP, log(), OnError(), OpenTCPSocket(), state, timeout, timeout_end, and X_ESTAB_MODULE.
+References SocketEngine::AddFd(), addr, addy, BindSocket(), Close(), DEBUG, ERROR, fd, I_CONNECTING, I_ERR_BIND, I_ERR_CONNECT, I_ERR_SOCKET, I_ERROR, I_LISTENING, IP, log(), OnError(), OpenTCPSocket(), InspIRCd::SE, state, timeout, timeout_end, and X_ESTAB_MODULE.
.PP
.nf
-63 {
-64 if (listening) {
-65 if ((this->fd = OpenTCPSocket()) == ERROR)
-66 {
-67 this->fd = -1;
-68 this->state = I_ERROR;
-69 this->OnError(I_ERR_SOCKET);
-70 log(DEBUG,'OpenTCPSocket() error');
-71 return;
-72 }
-73 else
-74 {
-75 if (BindSocket(this->fd,this->client,this->server,port,(char*)host.c_str()) == ERROR)
-76 {
-77 this->Close();
-78 this->fd = -1;
-79 this->state = I_ERROR;
-80 this->OnError(I_ERR_BIND);
-81 log(DEBUG,'BindSocket() error %s',strerror(errno));
-82 return;
-83 }
-84 else
-85 {
-86 this->state = I_LISTENING;
-87 SE->AddFd(this->fd,true,X_ESTAB_MODULE);
-88 socket_ref[this->fd] = this;
-89 log(DEBUG,'New socket now in I_LISTENING state');
-90 return;
-91 }
-92 }
-93 } else {
-94 char* ip;
-95 this->host = host;
-96 hostent* hoste = gethostbyname(host.c_str());
-97 if (!hoste) {
-98 ip = (char*)host.c_str();
-99 } else {
-100 struct in_addr* ia = (in_addr*)hoste->h_addr;
-101 ip = inet_ntoa(*ia);
-102 }
-103
-104 this->IP = ip;
-105
-106 timeout_end = time(NULL)+maxtime;
-107 timeout = false;
-108 if ((this->fd = socket(AF_INET, SOCK_STREAM, 0)) == -1)
-109 {
-110 this->state = I_ERROR;
-111 this->OnError(I_ERR_SOCKET);
-112 return;
-113 }
-114 this->port = port;
-115 inet_aton(ip,&addy);
-116 addr.sin_family = AF_INET;
-117 addr.sin_addr = addy;
-118 addr.sin_port = htons(this->port);
-119
-120 int flags;
-121 flags = fcntl(this->fd, F_GETFL, 0);
-122 fcntl(this->fd, F_SETFL, flags | O_NONBLOCK);
-123
-124 if(connect(this->fd, (sockaddr*)&this->addr,sizeof(this->addr)) == -1)
-125 {
-126 if (errno != EINPROGRESS)
-127 {
-128 this->Close();
-129 this->OnError(I_ERR_CONNECT);
-130 this->state = I_ERROR;
-131 return;
-132 }
-133 }
-134 this->state = I_CONNECTING;
-135 SE->AddFd(this->fd,false,X_ESTAB_MODULE);
-136 socket_ref[this->fd] = this;
-137 return;
-138 }
-139 }
+60 {
+61 if (listening) {
+62 if ((this->fd = OpenTCPSocket()) == ERROR)
+63 {
+64 this->fd = -1;
+65 this->state = I_ERROR;
+66 this->OnError(I_ERR_SOCKET);
+67 log(DEBUG,'OpenTCPSocket() error');
+68 return;
+69 }
+70 else
+71 {
+72 if (BindSocket(this->fd,this->client,this->server,port,(char*)host.c_str()) == ERROR)
+73 {
+74 this->Close();
+75 this->fd = -1;
+76 this->state = I_ERROR;
+77 this->OnError(I_ERR_BIND);
+78 log(DEBUG,'BindSocket() error %s',strerror(errno));
+79 return;
+80 }
+81 else
+82 {
+83 this->state = I_LISTENING;
+84 ServerInstance->SE->AddFd(this->fd,true,X_ESTAB_MODULE);
+85 socket_ref[this->fd] = this;
+86 log(DEBUG,'New socket now in I_LISTENING state');
+87 return;
+88 }
+89 }
+90 } else {
+91 char* ip;
+92 this->host = host;
+93 hostent* hoste = gethostbyname(host.c_str());
+94 if (!hoste) {
+95 ip = (char*)host.c_str();
+96 } else {
+97 struct in_addr* ia = (in_addr*)hoste->h_addr;
+98 ip = inet_ntoa(*ia);
+99 }
+100
+101 this->IP = ip;
+102
+103 timeout_end = time(NULL)+maxtime;
+104 timeout = false;
+105 if ((this->fd = socket(AF_INET, SOCK_STREAM, 0)) == -1)
+106 {
+107 this->state = I_ERROR;
+108 this->OnError(I_ERR_SOCKET);
+109 return;
+110 }
+111 this->port = port;
+112 inet_aton(ip,&addy);
+113 addr.sin_family = AF_INET;
+114 addr.sin_addr = addy;
+115 addr.sin_port = htons(this->port);
+116
+117 int flags;
+118 flags = fcntl(this->fd, F_GETFL, 0);
+119 fcntl(this->fd, F_SETFL, flags | O_NONBLOCK);
+120
+121 if(connect(this->fd, (sockaddr*)&this->addr,sizeof(this->addr)) == -1)
+122 {
+123 if (errno != EINPROGRESS)
+124 {
+125 this->Close();
+126 this->OnError(I_ERR_CONNECT);
+127 this->state = I_ERROR;
+128 return;
+129 }
+130 }
+131 this->state = I_CONNECTING;
+132 ServerInstance->SE->AddFd(this->fd,false,X_ESTAB_MODULE);
+133 socket_ref[this->fd] = this;
+134 return;
+135 }
+136 }
.fi
.PP
.SS "InspSocket::~InspSocket ()\fC [virtual]\fP"
.PP
The destructor may implicitly call \fBOnClose()\fP, and will close() and shutdown() the file descriptor used for this socket.
.PP
-Definition at line 272 of file socket.cpp.
+Definition at line 271 of file socket.cpp.
.PP
References Close().
.PP
.nf
-273 {
-274 this->Close();
-275 }
+272 {
+273 this->Close();
+274 }
.fi
.PP
.SH "Member Function Documentation"
@@ -314,65 +326,92 @@ References Close().
.PP
This method causes the socket to close, and may also be triggered by other methods such as OnTimeout and OnError.
.PP
-Definition at line 141 of file socket.cpp.
+Definition at line 138 of file socket.cpp.
.PP
References fd, and OnClose().
.PP
Referenced by InspSocket(), and ~InspSocket().
.PP
.nf
-142 {
-143 if (this->fd != -1)
-144 {
-145 this->OnClose();
-146 shutdown(this->fd,2);
-147 close(this->fd);
-148 socket_ref[this->fd] = NULL;
-149 this->fd = -1;
-150 }
-151 }
+139 {
+140 if (this->fd != -1)
+141 {
+142 this->OnClose();
+143 shutdown(this->fd,2);
+144 close(this->fd);
+145 socket_ref[this->fd] = NULL;
+146 this->fd = -1;
+147 }
+148 }
+.fi
+.PP
+.SS "void InspSocket::FlushWriteBuffer ()\fC [private]\fP"
+.PP
+Flushes the write buffer.
+.PP
+Definition at line 181 of file socket.cpp.
+.PP
+References Buffer.
+.PP
+Referenced by Timeout(), and Write().
+.PP
+.nf
+182 {
+183 int result = 0;
+184 if (this->Buffer.length())
+185 {
+186 result = send(this->fd,this->Buffer.c_str(),this->Buffer.length(),0);
+187 if (result > 0)
+188 {
+189 /* If we wrote some, advance the buffer forwards */
+190 char* n = (char*)this->Buffer.c_str();
+191 n += result;
+192 this->Buffer = n;
+193 }
+194 }
+195 }
.fi
.PP
.SS "int InspSocket::GetFd ()"
.PP
This method returns the socket's file descriptor as assigned by the operating system, or -1 if no descriptor has been assigned.
.PP
-Definition at line 259 of file socket.cpp.
+Definition at line 258 of file socket.cpp.
.PP
References fd.
.PP
.nf
-260 {
-261 return this->fd;
-262 }
+259 {
+260 return this->fd;
+261 }
.fi
.PP
.SS "\fBstd::string\fP InspSocket::GetIP ()"
.PP
Returns the IP address associated with this connection, or an empty string if no IP address exists.
.PP
-Definition at line 153 of file socket.cpp.
+Definition at line 150 of file socket.cpp.
.PP
References IP.
.PP
.nf
-154 {
-155 return this->IP;
-156 }
+151 {
+152 return this->IP;
+153 }
.fi
.PP
.SS "\fBInspSocketState\fP InspSocket::GetState ()"
.PP
Returns the current socket state.
.PP
-Definition at line 254 of file socket.cpp.
+Definition at line 253 of file socket.cpp.
.PP
References state.
.PP
.nf
-255 {
-256 return this->state;
-257 }
+254 {
+255 return this->state;
+256 }
.fi
.PP
.SS "void InspSocket::OnClose ()\fC [virtual]\fP"
@@ -381,12 +420,12 @@ Whenever close() is called, \fBOnClose()\fP will be called first.
.PP
Please note that this means OnClose will be called alongside \fBOnError()\fP, \fBOnTimeout()\fP, and \fBClose()\fP, and also when cancelling a listening socket by calling the destructor indirectly.
.PP
-Definition at line 270 of file socket.cpp.
+Definition at line 269 of file socket.cpp.
.PP
Referenced by Close().
.PP
.nf
-270 { return; }
+269 { return; }
.fi
.PP
.SS "bool InspSocket::OnConnected ()\fC [virtual]\fP"
@@ -400,12 +439,12 @@ false to abort the connection, true to continue
.PP
.PP
-Definition at line 264 of file socket.cpp.
+Definition at line 263 of file socket.cpp.
.PP
Referenced by Poll().
.PP
.nf
-264 { return true; }
+263 { return true; }
.fi
.PP
.SS "bool InspSocket::OnDataReady ()\fC [virtual]\fP"
@@ -421,22 +460,22 @@ false to close the socket
.PP
.PP
-Definition at line 268 of file socket.cpp.
+Definition at line 267 of file socket.cpp.
.PP
Referenced by Poll().
.PP
.nf
-268 { return true; }
+267 { return true; }
.fi
.PP
.SS "int InspSocket::OnDisconnect ()\fC [virtual]\fP"
.PP
When an established connection is terminated, the OnDisconnect method is triggered.
.PP
-Definition at line 266 of file socket.cpp.
+Definition at line 265 of file socket.cpp.
.PP
.nf
-266 { return 0; }
+265 { return 0; }
.fi
.PP
.SS "void InspSocket::OnError (\fBInspSocketError\fP e)\fC [virtual]\fP"
@@ -452,12 +491,12 @@ A closed socket in itself is not an error, however errors also generate close ev
.PP
.PP
-Definition at line 265 of file socket.cpp.
+Definition at line 264 of file socket.cpp.
.PP
Referenced by InspSocket(), and Timeout().
.PP
.nf
-265 { return; }
+264 { return; }
.fi
.PP
.SS "int InspSocket::OnIncomingConnection (int newfd, char * ip)\fC [virtual]\fP"
@@ -470,12 +509,12 @@ MySocket* newsocket = new MySocket(newfd,ip);
.PP
Once you have done this, you can then associate the new socket with the core using \fBServer::AddSocket()\fP.
.PP
-Definition at line 267 of file socket.cpp.
+Definition at line 266 of file socket.cpp.
.PP
Referenced by Poll().
.PP
.nf
-267 { return 0; }
+266 { return 0; }
.fi
.PP
.SS "void InspSocket::OnTimeout ()\fC [virtual]\fP"
@@ -484,12 +523,12 @@ When an outbound connection fails, and the attempt times out, you will receive t
.PP
The mthod will trigger once maxtime secons are reached (as given in the constructor) just before the socket's descriptor is closed.
.PP
-Definition at line 269 of file socket.cpp.
+Definition at line 268 of file socket.cpp.
.PP
Referenced by Timeout().
.PP
.nf
-269 { return; }
+268 { return; }
.fi
.PP
.SS "bool InspSocket::Poll ()"
@@ -498,64 +537,64 @@ Only the core should call this function.
.PP
When called, it is assumed the socket is ready to read data, and the method call routes the event to the various methods of InspSocket for you to handle. This can also cause the socket's state to change.
.PP
-Definition at line 217 of file socket.cpp.
+Definition at line 216 of file socket.cpp.
.PP
-References SocketEngine::AddFd(), client, SocketEngine::DelFd(), I_CONNECTED, I_CONNECTING, I_LISTENING, length, OnConnected(), OnDataReady(), OnIncomingConnection(), SetState(), and X_ESTAB_MODULE.
+References SocketEngine::AddFd(), client, SocketEngine::DelFd(), I_CONNECTED, I_CONNECTING, I_LISTENING, length, OnConnected(), OnDataReady(), OnIncomingConnection(), InspIRCd::SE, SetState(), and X_ESTAB_MODULE.
.PP
.nf
-218 {
-219 int incoming = -1;
-220
-221 switch (this->state)
-222 {
-223 case I_CONNECTING:
-224 this->SetState(I_CONNECTED);
-225 /* Our socket was in write-state, so delete it and re-add it
-226 * in read-state.
-227 */
-228 SE->DelFd(this->fd);
-229 SE->AddFd(this->fd,true,X_ESTAB_MODULE);
-230 return this->OnConnected();
-231 break;
-232 case I_LISTENING:
-233 length = sizeof (client);
-234 incoming = accept (this->fd, (sockaddr*)&client,&length);
-235 this->OnIncomingConnection(incoming,inet_ntoa(client.sin_addr));
-236 return true;
-237 break;
-238 case I_CONNECTED:
-239 return this->OnDataReady();
-240 break;
-241 default:
-242 break;
-243 }
-244
-245 return true;
-246 }
+217 {
+218 int incoming = -1;
+219
+220 switch (this->state)
+221 {
+222 case I_CONNECTING:
+223 this->SetState(I_CONNECTED);
+224 /* Our socket was in write-state, so delete it and re-add it
+225 * in read-state.
+226 */
+227 ServerInstance->SE->DelFd(this->fd);
+228 ServerInstance->SE->AddFd(this->fd,true,X_ESTAB_MODULE);
+229 return this->OnConnected();
+230 break;
+231 case I_LISTENING:
+232 length = sizeof (client);
+233 incoming = accept (this->fd, (sockaddr*)&client,&length);
+234 this->OnIncomingConnection(incoming,inet_ntoa(client.sin_addr));
+235 return true;
+236 break;
+237 case I_CONNECTED:
+238 return this->OnDataReady();
+239 break;
+240 default:
+241 break;
+242 }
+243
+244 return true;
+245 }
.fi
.PP
.SS "char * InspSocket::Read ()\fC [virtual]\fP"
.PP
Reads all pending bytes from the socket into a char* array which can be up to 16 kilobytes in length.
.PP
-Definition at line 158 of file socket.cpp.
+Definition at line 155 of file socket.cpp.
.PP
References DEBUG, ibuf, and log().
.PP
.nf
-159 {
-160 int n = recv(this->fd,this->ibuf,sizeof(this->ibuf),0);
-161 if (n > 0)
-162 {
-163 ibuf[n] = 0;
-164 return ibuf;
-165 }
-166 else
-167 {
-168 log(DEBUG,'EOF or error on socket');
-169 return NULL;
-170 }
-171 }
+156 {
+157 int n = recv(this->fd,this->ibuf,sizeof(this->ibuf),0);
+158 if (n > 0)
+159 {
+160 ibuf[n] = 0;
+161 return ibuf;
+162 }
+163 else
+164 {
+165 log(DEBUG,'EOF or error on socket');
+166 return NULL;
+167 }
+168 }
.fi
.PP
.SS "void InspSocket::SetState (\fBInspSocketState\fP s)"
@@ -564,17 +603,17 @@ Changes the socket's state.
.PP
The core uses this to change socket states, and you should not call it directly.
.PP
-Definition at line 248 of file socket.cpp.
+Definition at line 247 of file socket.cpp.
.PP
References DEBUG, log(), and state.
.PP
Referenced by Poll().
.PP
.nf
-249 {
-250 log(DEBUG,'Socket state change');
-251 this->state = s;
-252 }
+248 {
+249 log(DEBUG,'Socket state change');
+250 this->state = s;
+251 }
.fi
.PP
.SS "bool InspSocket::Timeout (time_t current)"
@@ -588,26 +627,28 @@ true if timed out, false if not timed out
.PP
.PP
-Definition at line 200 of file socket.cpp.
+Definition at line 197 of file socket.cpp.
.PP
-References I_CONNECTING, I_ERR_TIMEOUT, I_ERROR, OnError(), OnTimeout(), state, timeout, and timeout_end.
+References FlushWriteBuffer(), I_CONNECTING, I_ERR_TIMEOUT, I_ERROR, OnError(), OnTimeout(), state, timeout, and timeout_end.
.PP
.nf
-201 {
-202 if ((this->state == I_CONNECTING) && (current > timeout_end))
-203 {
-204 // for non-listening sockets, the timeout can occur
-205 // which causes termination of the connection after
-206 // the given number of seconds without a successful
-207 // connection.
-208 this->OnTimeout();
-209 this->OnError(I_ERR_TIMEOUT);
-210 timeout = true;
-211 this->state = I_ERROR;
-212 return true;
-213 }
-214 return false;
-215 }
+198 {
+199 if ((this->state == I_CONNECTING) && (current > timeout_end))
+200 {
+201 // for non-listening sockets, the timeout can occur
+202 // which causes termination of the connection after
+203 // the given number of seconds without a successful
+204 // connection.
+205 this->OnTimeout();
+206 this->OnError(I_ERR_TIMEOUT);
+207 timeout = true;
+208 this->state = I_ERROR;
+209 return true;
+210 }
+211 if (this->Buffer.length())
+212 this->FlushWriteBuffer();
+213 return false;
+214 }
.fi
.PP
.SS "int InspSocket::Write (\fBstd::string\fP data)\fC [virtual]\fP"
@@ -623,30 +664,16 @@ No carriage returns or linefeeds are appended to the string.
.PP
.PP
-Definition at line 177 of file socket.cpp.
+Definition at line 174 of file socket.cpp.
+.PP
+References Buffer, and FlushWriteBuffer().
.PP
.nf
-178 {
-179 char* d = (char*)data.c_str();
-180 unsigned int written = 0;
-181 int n = 0;
-182 int s = data.length();
-183 while ((written < data.length()) && (n >= 0))
-184 {
-185 n = send(this->fd,d,s,0);
-186 if (n > 0)
-187 {
-188 // If we didnt write everything, advance
-189 // the pointers so that when we retry
-190 // the next time around the loop, we try
-191 // to write what we failed to write before.
-192 written += n;
-193 s -= n;
-194 d += n;
-195 }
-196 }
-197 return written;
-198 }
+175 {
+176 this->Buffer = this->Buffer + data;
+177 this->FlushWriteBuffer();
+178 return data.length();
+179 }
.fi
.PP
.SH "Member Data Documentation"
@@ -665,11 +692,18 @@ The host being connected to, in in_addr form.
Definition at line 84 of file socket.h.
.PP
Referenced by InspSocket().
+.SS "\fBstd::string\fP \fBInspSocket::Buffer\fP\fC [private]\fP"
+.PP
+The output buffer for this socket.
+.PP
+Definition at line 111 of file socket.h.
+.PP
+Referenced by FlushWriteBuffer(), and Write().
.SS "sockaddr_in \fBInspSocket::client\fP\fC [private]\fP"
.PP
Client sockaddr structure used by accept().
.PP
-Definition at line 119 of file socket.h.
+Definition at line 124 of file socket.h.
.PP
Referenced by Poll().
.SS "int \fBInspSocket::fd\fP\fC [private]\fP"
@@ -684,11 +718,11 @@ Referenced by Close(), GetFd(), and InspSocket().
The hostname connected to.
.PP
Definition at line 59 of file socket.h.
-.SS "char \fBInspSocket::ibuf\fP[16384]\fC [private]\fP"
+.SS "char \fBInspSocket::ibuf\fP[65535]\fC [private]\fP"
.PP
Socket input buffer, used by read().
.PP
-The class which extends InspSocket is expected to implement an extendable buffer which can grow much larger than 16k, this buffer is just designed to be temporary storage. space.
+The class which extends InspSocket is expected to implement an extendable buffer which can grow much larger than 64k, this buffer is just designed to be temporary storage. space.
.PP
Definition at line 106 of file socket.h.
.PP
@@ -697,14 +731,14 @@ Referenced by Read().
.PP
The IP address being connected to stored in string form for easy retrieval by accessors.
.PP
-Definition at line 113 of file socket.h.
+Definition at line 118 of file socket.h.
.PP
Referenced by GetIP(), and InspSocket().
.SS "socklen_t \fBInspSocket::length\fP\fC [private]\fP"
.PP
Used by accept() to indicate the sizes of the sockaddr_in structures.
.PP
-Definition at line 131 of file socket.h.
+Definition at line 136 of file socket.h.
.PP
Referenced by Poll().
.SS "int \fBInspSocket::port\fP\fC [private]\fP"
@@ -716,7 +750,7 @@ Definition at line 65 of file socket.h.
.PP
\fBServer\fP sockaddr structure used by accept().
.PP
-Definition at line 125 of file socket.h.
+Definition at line 130 of file socket.h.
.SS "\fBInspSocketState\fP \fBInspSocket::state\fP\fC [private]\fP"
.PP
The state for this socket, either listening, connecting, connected or error.
diff --git a/docs/man/man3/InviteItem.3 b/docs/man/man3/InviteItem.3
index 213477029..f3b133566 100644
--- a/docs/man/man3/InviteItem.3
+++ b/docs/man/man3/InviteItem.3
@@ -1,4 +1,4 @@
-.TH "InviteItem" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "InviteItem" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/Invited.3 b/docs/man/man3/Invited.3
index 07e201794..dc4b773fd 100644
--- a/docs/man/man3/Invited.3
+++ b/docs/man/man3/Invited.3
@@ -1,4 +1,4 @@
-.TH "Invited" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "Invited" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -16,19 +16,19 @@ Inherits \fBclassbase\fP.
.in +1c
.ti -1c
-.RI "char \fBchannel\fP [CHANMAX]"
+.RI "\fBirc::string\fP \fBchannel\fP"
.br
.in -1c
.SH "Detailed Description"
.PP
Holds a channel name to which a user has been invited.
.PP
-Definition at line 39 of file users.h.
+Definition at line 43 of file users.h.
.SH "Member Data Documentation"
.PP
-.SS "char \fBInvited::channel\fP[CHANMAX]"
+.SS "\fBirc::string\fP \fBInvited::channel\fP"
.PP
-Definition at line 42 of file users.h.
+Definition at line 46 of file users.h.
.PP
Referenced by userrec::InviteTo().
diff --git a/docs/man/man3/KLine.3 b/docs/man/man3/KLine.3
index 195d3a860..213ee19d4 100644
--- a/docs/man/man3/KLine.3
+++ b/docs/man/man3/KLine.3
@@ -1,4 +1,4 @@
-.TH "KLine" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "KLine" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/ModeParameter.3 b/docs/man/man3/ModeParameter.3
index 93b0f4381..a1082ec7d 100644
--- a/docs/man/man3/ModeParameter.3
+++ b/docs/man/man3/ModeParameter.3
@@ -1,4 +1,4 @@
-.TH "ModeParameter" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "ModeParameter" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/Module.3 b/docs/man/man3/Module.3
index 3800b0172..6c9e4de9b 100644
--- a/docs/man/man3/Module.3
+++ b/docs/man/man3/Module.3
@@ -1,4 +1,4 @@
-.TH "Module" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "Module" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -340,7 +340,7 @@ Base class for all \fBInspIRCd\fP modules This class is the base class for \fBIn
All modules must inherit from this class, its methods will be called when irc server events occur. class inherited from module must be instantiated by the \fBModuleFactory\fP class (see relevent section) for the plugin to be initialised.
.PP
-Definition at line 254 of file modules.h.
+Definition at line 272 of file modules.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "Module::Module (\fBServer\fP * Me)"
@@ -354,20 +354,20 @@ Default constructor Creates a module class.
.PP
.PP
-Definition at line 220 of file modules.cpp.
+Definition at line 219 of file modules.cpp.
.PP
.nf
-220 { }
+219 { }
.fi
.PP
.SS "Module::~Module ()\fC [virtual]\fP"
.PP
Default destructor destroys a module class.
.PP
-Definition at line 221 of file modules.cpp.
+Definition at line 220 of file modules.cpp.
.PP
.nf
-221 { }
+220 { }
.fi
.PP
.SH "Member Function Documentation"
@@ -378,12 +378,12 @@ Returns the version number of a Module.
.PP
The method should return a \fBVersion\fP object with its version information assigned via \fBVersion::Version\fP
.PP
-Definition at line 232 of file modules.cpp.
+Definition at line 231 of file modules.cpp.
.PP
References VF_VENDOR.
.PP
.nf
-232 { return Version(1,0,0,0,VF_VENDOR); }
+231 { return Version(1,0,0,0,VF_VENDOR); }
.fi
.PP
.SS "void Module::On005Numeric (\fBstd::string\fP & output)\fC [virtual]\fP"
@@ -399,10 +399,10 @@ The module should modify the 005 numeric if needed to indicate its features.
.PP
.PP
-Definition at line 242 of file modules.cpp.
+Definition at line 241 of file modules.cpp.
.PP
.nf
-242 { };
+241 { };
.fi
.PP
.SS "int Module::OnAccessCheck (\fBuserrec\fP * source, \fBuserrec\fP * dest, \fBchanrec\fP * channel, int access_type)\fC [virtual]\fP"
@@ -446,12 +446,12 @@ This function is called before many functions which check a users status on a ch
.PP
.PP
-Definition at line 241 of file modules.cpp.
+Definition at line 240 of file modules.cpp.
.PP
References ACR_DEFAULT.
.PP
.nf
-241 { return ACR_DEFAULT; };
+240 { return ACR_DEFAULT; };
.fi
.PP
.SS "int Module::OnAddBan (\fBuserrec\fP * source, \fBchanrec\fP * channel, \fBstd::string\fP banmask)\fC [virtual]\fP"
@@ -476,10 +476,10 @@ Return a non-zero value to 'eat' the mode change and prevent the ban from being
.PP
.PP
-Definition at line 267 of file modules.cpp.
+Definition at line 266 of file modules.cpp.
.PP
.nf
-267 { return 0; };
+266 { return 0; };
.fi
.PP
.SS "void Module::OnAddELine (long duration, \fBuserrec\fP * source, \fBstd::string\fP reason, \fBstd::string\fP hostmask)\fC [virtual]\fP"
@@ -501,10 +501,10 @@ This method is triggered after the line is added.
.PP
.PP
-Definition at line 293 of file modules.cpp.
+Definition at line 292 of file modules.cpp.
.PP
.nf
-293 { };
+292 { };
.fi
.PP
.SS "void Module::OnAddGLine (long duration, \fBuserrec\fP * source, \fBstd::string\fP reason, \fBstd::string\fP hostmask)\fC [virtual]\fP"
@@ -526,10 +526,10 @@ This method is triggered after the line is added.
.PP
.PP
-Definition at line 289 of file modules.cpp.
+Definition at line 288 of file modules.cpp.
.PP
.nf
-289 { };
+288 { };
.fi
.PP
.SS "void Module::OnAddKLine (long duration, \fBuserrec\fP * source, \fBstd::string\fP reason, \fBstd::string\fP hostmask)\fC [virtual]\fP"
@@ -551,10 +551,10 @@ This method is triggered after the line is added.
.PP
.PP
-Definition at line 291 of file modules.cpp.
+Definition at line 290 of file modules.cpp.
.PP
.nf
-291 { };
+290 { };
.fi
.PP
.SS "void Module::OnAddQLine (long duration, \fBuserrec\fP * source, \fBstd::string\fP reason, \fBstd::string\fP nickmask)\fC [virtual]\fP"
@@ -576,10 +576,10 @@ This method is triggered after the line is added.
.PP
.PP
-Definition at line 292 of file modules.cpp.
+Definition at line 291 of file modules.cpp.
.PP
.nf
-292 { };
+291 { };
.fi
.PP
.SS "void Module::OnAddZLine (long duration, \fBuserrec\fP * source, \fBstd::string\fP reason, \fBstd::string\fP ipmask)\fC [virtual]\fP"
@@ -601,10 +601,10 @@ This method is triggered after the line is added.
.PP
.PP
-Definition at line 290 of file modules.cpp.
+Definition at line 289 of file modules.cpp.
.PP
.nf
-290 { };
+289 { };
.fi
.PP
.SS "void Module::OnBackgroundTimer (time_t curtime)\fC [virtual]\fP"
@@ -620,10 +620,10 @@ This timer can be used to control timed features. Its period is not accurate eno
.PP
.PP
-Definition at line 246 of file modules.cpp.
+Definition at line 245 of file modules.cpp.
.PP
.nf
-246 { };
+245 { };
.fi
.PP
.SS "void Module::OnChangeHost (\fBuserrec\fP * user, \fBstd::string\fP newhost)\fC [virtual]\fP"
@@ -641,10 +641,10 @@ This event triggers after the host has been set.
.PP
.PP
-Definition at line 287 of file modules.cpp.
+Definition at line 286 of file modules.cpp.
.PP
.nf
-287 { };
+286 { };
.fi
.PP
.SS "int Module::OnChangeLocalUserGECOS (\fBuserrec\fP * user, \fBstd::string\fP newhost)\fC [virtual]\fP"
@@ -667,10 +667,10 @@ return 1 to deny the name change, or 0 to allow it.
.PP
.PP
-Definition at line 260 of file modules.cpp.
+Definition at line 259 of file modules.cpp.
.PP
.nf
-260 { return 0; };
+259 { return 0; };
.fi
.PP
.SS "int Module::OnChangeLocalUserHost (\fBuserrec\fP * user, \fBstd::string\fP newhost)\fC [virtual]\fP"
@@ -693,10 +693,10 @@ Return 1 to deny the host change, or 0 to allow it.
.PP
.PP
-Definition at line 259 of file modules.cpp.
+Definition at line 258 of file modules.cpp.
.PP
.nf
-259 { return 0; };
+258 { return 0; };
.fi
.PP
.SS "void Module::OnChangeName (\fBuserrec\fP * user, \fBstd::string\fP gecos)\fC [virtual]\fP"
@@ -714,10 +714,10 @@ This event triggers after the name has been set.
.PP
.PP
-Definition at line 288 of file modules.cpp.
+Definition at line 287 of file modules.cpp.
.PP
.nf
-288 { };
+287 { };
.fi
.PP
.SS "int Module::OnCheckBan (\fBuserrec\fP * user, \fBchanrec\fP * chan)\fC [virtual]\fP"
@@ -740,10 +740,10 @@ This method will always be called for each join, wether or not the user actually
.PP
.PP
-Definition at line 257 of file modules.cpp.
+Definition at line 256 of file modules.cpp.
.PP
.nf
-257 { return 0; };
+256 { return 0; };
.fi
.PP
.SS "int Module::OnCheckInvite (\fBuserrec\fP * user, \fBchanrec\fP * chan)\fC [virtual]\fP"
@@ -766,10 +766,10 @@ This method will always be called for each join, wether or not the channel is ac
.PP
.PP
-Definition at line 254 of file modules.cpp.
+Definition at line 253 of file modules.cpp.
.PP
.nf
-254 { return 0; };
+253 { return 0; };
.fi
.PP
.SS "int Module::OnCheckKey (\fBuserrec\fP * user, \fBchanrec\fP * chan, \fBstd::string\fP keygiven)\fC [virtual]\fP"
@@ -792,10 +792,10 @@ This method will always be called for each join, wether or not the channel is ac
.PP
.PP
-Definition at line 255 of file modules.cpp.
+Definition at line 254 of file modules.cpp.
.PP
.nf
-255 { return 0; };
+254 { return 0; };
.fi
.PP
.SS "int Module::OnCheckLimit (\fBuserrec\fP * user, \fBchanrec\fP * chan)\fC [virtual]\fP"
@@ -818,10 +818,10 @@ This method will always be called for each join, wether or not the channel is ac
.PP
.PP
-Definition at line 256 of file modules.cpp.
+Definition at line 255 of file modules.cpp.
.PP
.nf
-256 { return 0; };
+255 { return 0; };
.fi
.PP
.SS "bool Module::OnCheckReady (\fBuserrec\fP * user)\fC [virtual]\fP"
@@ -842,10 +842,10 @@ true to indicate readiness, false if otherwise
.PP
.PP
-Definition at line 249 of file modules.cpp.
+Definition at line 248 of file modules.cpp.
.PP
.nf
-249 { return true; };
+248 { return true; };
.fi
.PP
.SS "void Module::OnCleanup (int target_type, void * item)\fC [virtual]\fP"
@@ -863,10 +863,10 @@ This method is called once for every user and channel on the network, so that wh
.PP
.PP
-Definition at line 299 of file modules.cpp.
+Definition at line 298 of file modules.cpp.
.PP
.nf
-299 { };
+298 { };
.fi
.PP
.SS "void Module::OnDecodeMetaData (int target_type, void * target, \fBstd::string\fP extname, \fBstd::string\fP extdata)\fC [virtual]\fP"
@@ -888,10 +888,10 @@ Please see src/modules/m_swhois.cpp for a working example of how to use this met
.PP
.PP
-Definition at line 284 of file modules.cpp.
+Definition at line 283 of file modules.cpp.
.PP
.nf
-284 { };
+283 { };
.fi
.PP
.SS "int Module::OnDelBan (\fBuserrec\fP * source, \fBchanrec\fP * channel, \fBstd::string\fP banmask)\fC [virtual]\fP"
@@ -916,10 +916,10 @@ Return a non-zero value to 'eat' the mode change and prevent the ban from being
.PP
.PP
-Definition at line 268 of file modules.cpp.
+Definition at line 267 of file modules.cpp.
.PP
.nf
-268 { return 0; };
+267 { return 0; };
.fi
.PP
.SS "void Module::OnDelELine (\fBuserrec\fP * source, \fBstd::string\fP hostmask)\fC [virtual]\fP"
@@ -937,10 +937,10 @@ This method is triggered after the line is deleted.
.PP
.PP
-Definition at line 298 of file modules.cpp.
+Definition at line 297 of file modules.cpp.
.PP
.nf
-298 { };
+297 { };
.fi
.PP
.SS "void Module::OnDelGLine (\fBuserrec\fP * source, \fBstd::string\fP hostmask)\fC [virtual]\fP"
@@ -958,10 +958,10 @@ This method is triggered after the line is deleted.
.PP
.PP
-Definition at line 294 of file modules.cpp.
+Definition at line 293 of file modules.cpp.
.PP
.nf
-294 { };
+293 { };
.fi
.PP
.SS "void Module::OnDelKLine (\fBuserrec\fP * source, \fBstd::string\fP hostmask)\fC [virtual]\fP"
@@ -979,10 +979,10 @@ This method is triggered after the line is deleted.
.PP
.PP
-Definition at line 296 of file modules.cpp.
+Definition at line 295 of file modules.cpp.
.PP
.nf
-296 { };
+295 { };
.fi
.PP
.SS "void Module::OnDelQLine (\fBuserrec\fP * source, \fBstd::string\fP nickmask)\fC [virtual]\fP"
@@ -1000,10 +1000,10 @@ This method is triggered after the line is deleted.
.PP
.PP
-Definition at line 297 of file modules.cpp.
+Definition at line 296 of file modules.cpp.
.PP
.nf
-297 { };
+296 { };
.fi
.PP
.SS "void Module::OnDelZLine (\fBuserrec\fP * source, \fBstd::string\fP ipmask)\fC [virtual]\fP"
@@ -1021,10 +1021,10 @@ This method is triggered after the line is deleted.
.PP
.PP
-Definition at line 295 of file modules.cpp.
+Definition at line 294 of file modules.cpp.
.PP
.nf
-295 { };
+294 { };
.fi
.PP
.SS "void Module::OnEvent (\fBEvent\fP * event)\fC [virtual]\fP"
@@ -1040,10 +1040,10 @@ Please see the documentation of \fBEvent::Send()\fP for further information. The
.PP
.PP
-Definition at line 262 of file modules.cpp.
+Definition at line 261 of file modules.cpp.
.PP
.nf
-262 { return; };
+261 { return; };
.fi
.PP
.SS "int Module::OnExtendedMode (\fBuserrec\fP * user, void * target, char modechar, int type, bool mode_on, \fBstring_list\fP & params)\fC [virtual]\fP"
@@ -1069,10 +1069,10 @@ The type parameter is MT_SERVER, MT_CLIENT or MT_CHANNEL, dependent on where the
.PP
.PP
-Definition at line 230 of file modules.cpp.
+Definition at line 229 of file modules.cpp.
.PP
.nf
-230 { return false; }
+229 { return false; }
.fi
.PP
.SS "void Module::OnGetServerDescription (\fBstd::string\fP servername, \fBstd::string\fP & description)\fC [virtual]\fP"
@@ -1090,10 +1090,10 @@ You may change or define the description given in \fBstd::string\fP &description
.PP
.PP
-Definition at line 278 of file modules.cpp.
+Definition at line 277 of file modules.cpp.
.PP
.nf
-278 { };
+277 { };
.fi
.PP
.SS "void Module::OnGlobalConnect (\fBuserrec\fP * user)\fC [virtual]\fP"
@@ -1109,10 +1109,10 @@ This event is informational only. You should not change any user information in
.PP
.PP
-Definition at line 266 of file modules.cpp.
+Definition at line 265 of file modules.cpp.
.PP
.nf
-266 { };
+265 { };
.fi
.PP
.SS "void Module::OnGlobalOper (\fBuserrec\fP * user)\fC [virtual]\fP"
@@ -1128,10 +1128,10 @@ You cannot override this and prevent it from happening as it is already happened
.PP
.PP
-Definition at line 265 of file modules.cpp.
+Definition at line 264 of file modules.cpp.
.PP
.nf
-265 { };
+264 { };
.fi
.PP
.SS "void Module::OnInfo (\fBuserrec\fP * user)\fC [virtual]\fP"
@@ -1149,10 +1149,10 @@ The userrec will contain the information of the user who typed the command. Modu
.PP
.PP
-Definition at line 234 of file modules.cpp.
+Definition at line 233 of file modules.cpp.
.PP
.nf
-234 { };
+233 { };
.fi
.PP
.SS "int Module::OnKill (\fBuserrec\fP * source, \fBuserrec\fP * dest, \fBstd::string\fP reason)\fC [virtual]\fP"
@@ -1177,10 +1177,10 @@ If a client is killed by a server, e.g. a nickname collision or protocol error,
.PP
.PP
-Definition at line 243 of file modules.cpp.
+Definition at line 242 of file modules.cpp.
.PP
.nf
-243 { return 0; };
+242 { return 0; };
.fi
.PP
.SS "void Module::OnLoadModule (\fBModule\fP * mod, \fBstd::string\fP name)\fC [virtual]\fP"
@@ -1198,10 +1198,10 @@ mod will contain a pointer to the module, and string will contain its name, for
.PP
.PP
-Definition at line 244 of file modules.cpp.
+Definition at line 243 of file modules.cpp.
.PP
.nf
-244 { };
+243 { };
.fi
.PP
.SS "int Module::OnLocalTopicChange (\fBuserrec\fP * user, \fBchanrec\fP * chan, \fBstd::string\fP topic)\fC [virtual]\fP"
@@ -1223,10 +1223,10 @@ Return 1 to deny the topic change, or 0 to allow it.
.PP
.PP
-Definition at line 261 of file modules.cpp.
+Definition at line 260 of file modules.cpp.
.PP
.nf
-261 { return 0; };
+260 { return 0; };
.fi
.PP
.SS "void Module::OnMode (\fBuserrec\fP * user, void * dest, int target_type, \fBstd::string\fP text)\fC [virtual]\fP"
@@ -1248,10 +1248,10 @@ The text variable contains the remainder of the mode string after the target, e.
.PP
.PP
-Definition at line 231 of file modules.cpp.
+Definition at line 230 of file modules.cpp.
.PP
.nf
-231 { };
+230 { };
.fi
.PP
.SS "void Module::OnOper (\fBuserrec\fP * user, \fBstd::string\fP opertype)\fC [virtual]\fP"
@@ -1269,10 +1269,10 @@ The userrec will contain the oper mode 'o' as this function is called after any
.PP
.PP
-Definition at line 233 of file modules.cpp.
+Definition at line 232 of file modules.cpp.
.PP
.nf
-233 { };
+232 { };
.fi
.PP
.SS "int Module::OnOperCompare (\fBstd::string\fP password, \fBstd::string\fP input)\fC [virtual]\fP"
@@ -1295,10 +1295,10 @@ The password field (from the config file) is in 'password' and is to be compared
.PP
.PP
-Definition at line 264 of file modules.cpp.
+Definition at line 263 of file modules.cpp.
.PP
.nf
-264 { return 0; };
+263 { return 0; };
.fi
.PP
.SS "void Module::OnPostLocalTopicChange (\fBuserrec\fP * user, \fBchanrec\fP * chan, \fBstd::string\fP topic)\fC [virtual]\fP"
@@ -1318,10 +1318,10 @@ To block topic changes you must use OnLocalTopicChange instead.
.PP
.PP
-Definition at line 277 of file modules.cpp.
+Definition at line 276 of file modules.cpp.
.PP
.nf
-277 { };
+276 { };
.fi
.PP
.SS "int Module::OnPreCommand (\fBstd::string\fP command, char ** parameters, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP"
@@ -1348,10 +1348,10 @@ This event occurs for all registered commands, wether they are registered in the
.PP
.PP
-Definition at line 248 of file modules.cpp.
+Definition at line 247 of file modules.cpp.
.PP
.nf
-248 { return 0; };
+247 { return 0; };
.fi
.PP
.SS "int Module::OnRawMode (\fBuserrec\fP * user, \fBchanrec\fP * chan, char mode, \fBstd::string\fP param, bool adding, int pcnt)\fC [virtual]\fP"
@@ -1382,10 +1382,10 @@ Return 1 from this function to block the mode character from being processed ent
.PP
.PP
-Definition at line 253 of file modules.cpp.
+Definition at line 252 of file modules.cpp.
.PP
.nf
-253 { return 0; };
+252 { return 0; };
.fi
.PP
.SS "void Module::OnRawSocketAccept (int fd, \fBstd::string\fP ip, int localport)\fC [virtual]\fP"
@@ -1405,10 +1405,10 @@ This is intended for raw socket processing (e.g. modules which wrap the tcp conn
.PP
.PP
-Definition at line 269 of file modules.cpp.
+Definition at line 268 of file modules.cpp.
.PP
.nf
-269 { };
+268 { };
.fi
.PP
.SS "void Module::OnRawSocketClose (int fd)\fC [virtual]\fP"
@@ -1424,10 +1424,12 @@ When this event is called, shutdown() has not yet been called on the socket.
.PP
.PP
-Definition at line 271 of file modules.cpp.
+Definition at line 270 of file modules.cpp.
+.PP
+Referenced by kill_link(), and kill_link_silent().
.PP
.nf
-271 { };
+270 { };
.fi
.PP
.SS "int Module::OnRawSocketRead (int fd, char * buffer, unsigned int count, int & readresult)\fC [virtual]\fP"
@@ -1454,10 +1456,10 @@ nonzero if the event was handled, in which case readresult must be valid on exit
.PP
.PP
-Definition at line 272 of file modules.cpp.
+Definition at line 271 of file modules.cpp.
.PP
.nf
-272 { return 0; };
+271 { return 0; };
.fi
.PP
.SS "int Module::OnRawSocketWrite (int fd, char * buffer, int count)\fC [virtual]\fP"
@@ -1482,10 +1484,10 @@ Number of characters actually written or 0 if you didn't handle the operation
.PP
.PP
-Definition at line 270 of file modules.cpp.
+Definition at line 269 of file modules.cpp.
.PP
.nf
-270 { return 0; };
+269 { return 0; };
.fi
.PP
.SS "void Module::OnRehash (\fBstd::string\fP parameter)\fC [virtual]\fP"
@@ -1501,10 +1503,10 @@ This method is called prior to a /REHASH or when a SIGHUP is received from the o
.PP
.PP
-Definition at line 227 of file modules.cpp.
+Definition at line 226 of file modules.cpp.
.PP
.nf
-227 { }
+226 { }
.fi
.PP
.SS "void Module::OnRemoteKill (\fBuserrec\fP * source, \fBuserrec\fP * dest, \fBstd::string\fP reason)\fC [virtual]\fP"
@@ -1522,10 +1524,10 @@ Called when an oper wants to disconnect a remote user via KILL.
.PP
.PP
-Definition at line 275 of file modules.cpp.
+Definition at line 274 of file modules.cpp.
.PP
.nf
-275 { };
+274 { };
.fi
.PP
.SS "char * Module::OnRequest (\fBRequest\fP * request)\fC [virtual]\fP"
@@ -1541,12 +1543,12 @@ Please see the documentation of \fBRequest::Send()\fP for further information. T
.PP
.PP
-Definition at line 263 of file modules.cpp.
+Definition at line 262 of file modules.cpp.
.PP
Referenced by Request::Send().
.PP
.nf
-263 { return NULL; };
+262 { return NULL; };
.fi
.PP
.SS "void Module::OnSendList (\fBuserrec\fP * user, \fBchanrec\fP * channel, char mode)\fC [virtual]\fP"
@@ -1566,10 +1568,10 @@ For example, when a /MODE channel +b (without any other parameters) is called, i
.PP
.PP
-Definition at line 247 of file modules.cpp.
+Definition at line 246 of file modules.cpp.
.PP
.nf
-247 { };
+246 { };
.fi
.PP
.SS "void Module::OnServerRaw (\fBstd::string\fP & raw, bool inbound, \fBuserrec\fP * user)\fC [virtual]\fP"
@@ -1589,10 +1591,10 @@ This method is the lowest level of handler available to a module. It will be cal
.PP
.PP
-Definition at line 228 of file modules.cpp.
+Definition at line 227 of file modules.cpp.
.PP
.nf
-228 { }
+227 { }
.fi
.PP
.SS "void Module::OnStats (char symbol)\fC [virtual]\fP"
@@ -1606,10 +1608,10 @@ Called on all /STATS commands This method is triggered for all /STATS use, inclu
.PP
.PP
-Definition at line 258 of file modules.cpp.
+Definition at line 257 of file modules.cpp.
.PP
.nf
-258 { };
+257 { };
.fi
.PP
.SS "void Module::OnSyncChannel (\fBchanrec\fP * chan, \fBModule\fP * proto, void * opaque)\fC [virtual]\fP"
@@ -1631,18 +1633,18 @@ For a good example of how to use this function, please see src/modules/m_chanpro
.PP
.PP
-Definition at line 280 of file modules.cpp.
+Definition at line 279 of file modules.cpp.
.PP
.nf
-280 { };
+279 { };
.fi
.PP
.SS "void Module::OnSyncChannelMetaData (\fBchanrec\fP * chan, \fBModule\fP * proto, void * opaque, \fBstd::string\fP extname)\fC [virtual]\fP"
.PP
-Definition at line 282 of file modules.cpp.
+Definition at line 281 of file modules.cpp.
.PP
.nf
-282 { };
+281 { };
.fi
.PP
.SS "void Module::OnSyncUser (\fBuserrec\fP * user, \fBModule\fP * proto, void * opaque)\fC [virtual]\fP"
@@ -1662,18 +1664,18 @@ When this function is called, it will be called from the module which implements
.PP
.PP
-Definition at line 279 of file modules.cpp.
+Definition at line 278 of file modules.cpp.
.PP
.nf
-279 { };
+278 { };
.fi
.PP
.SS "void Module::OnSyncUserMetaData (\fBuserrec\fP * user, \fBModule\fP * proto, void * opaque, \fBstd::string\fP extname)\fC [virtual]\fP"
.PP
-Definition at line 283 of file modules.cpp.
+Definition at line 282 of file modules.cpp.
.PP
.nf
-283 { };
+282 { };
.fi
.PP
.SS "void Module::OnUnloadModule (\fBModule\fP * mod, \fBstd::string\fP name)\fC [virtual]\fP"
@@ -1691,10 +1693,10 @@ mod will contain a pointer to the module, and string will contain its name, for
.PP
.PP
-Definition at line 245 of file modules.cpp.
+Definition at line 244 of file modules.cpp.
.PP
.nf
-245 { };
+244 { };
.fi
.PP
.SS "void Module::OnUserConnect (\fBuserrec\fP * user)\fC [virtual]\fP"
@@ -1710,10 +1712,10 @@ The details of the connecting user are available to you in the parameter userrec
.PP
.PP
-Definition at line 222 of file modules.cpp.
+Definition at line 221 of file modules.cpp.
.PP
.nf
-222 { }
+221 { }
.fi
.PP
.SS "void Module::OnUserDisconnect (\fBuserrec\fP * user)\fC [virtual]\fP"
@@ -1729,10 +1731,10 @@ The details of the exiting user are available to you in the parameter userrec *u
.PP
.PP
-Definition at line 224 of file modules.cpp.
+Definition at line 223 of file modules.cpp.
.PP
.nf
-224 { }
+223 { }
.fi
.PP
.SS "void Module::OnUserInvite (\fBuserrec\fP * source, \fBuserrec\fP * dest, \fBchanrec\fP * channel)\fC [virtual]\fP"
@@ -1752,10 +1754,10 @@ You cannot prevent the invite from occuring using this function, to do that, use
.PP
.PP
-Definition at line 276 of file modules.cpp.
+Definition at line 275 of file modules.cpp.
.PP
.nf
-276 { };
+275 { };
.fi
.PP
.SS "void Module::OnUserJoin (\fBuserrec\fP * user, \fBchanrec\fP * channel)\fC [virtual]\fP"
@@ -1773,10 +1775,10 @@ The details of the joining user are available to you in the parameter userrec *u
.PP
.PP
-Definition at line 225 of file modules.cpp.
+Definition at line 224 of file modules.cpp.
.PP
.nf
-225 { }
+224 { }
.fi
.PP
.SS "void Module::OnUserKick (\fBuserrec\fP * source, \fBuserrec\fP * user, \fBchanrec\fP * chan, \fBstd::string\fP reason)\fC [virtual]\fP"
@@ -1798,10 +1800,10 @@ If this method is called, the kick is already underway and cannot be prevented,
.PP
.PP
-Definition at line 252 of file modules.cpp.
+Definition at line 251 of file modules.cpp.
.PP
.nf
-252 { };
+251 { };
.fi
.PP
.SS "void Module::OnUserMessage (\fBuserrec\fP * user, void * dest, int target_type, \fBstd::string\fP text)\fC [virtual]\fP"
@@ -1823,10 +1825,10 @@ The dest variable contains a userrec* if target_type is TYPE_USER and a chanrec*
.PP
.PP
-Definition at line 273 of file modules.cpp.
+Definition at line 272 of file modules.cpp.
.PP
.nf
-273 { };
+272 { };
.fi
.PP
.SS "void Module::OnUserNotice (\fBuserrec\fP * user, void * dest, int target_type, \fBstd::string\fP text)\fC [virtual]\fP"
@@ -1848,10 +1850,10 @@ The dest variable contains a userrec* if target_type is TYPE_USER and a chanrec*
.PP
.PP
-Definition at line 274 of file modules.cpp.
+Definition at line 273 of file modules.cpp.
.PP
.nf
-274 { };
+273 { };
.fi
.PP
.SS "void Module::OnUserPart (\fBuserrec\fP * user, \fBchanrec\fP * channel)\fC [virtual]\fP"
@@ -1869,10 +1871,10 @@ The details of the leaving user are available to you in the parameter userrec *u
.PP
.PP
-Definition at line 226 of file modules.cpp.
+Definition at line 225 of file modules.cpp.
.PP
.nf
-226 { }
+225 { }
.fi
.PP
.SS "void Module::OnUserPostNick (\fBuserrec\fP * user, \fBstd::string\fP oldnick)\fC [virtual]\fP"
@@ -1890,10 +1892,10 @@ This can be used to track users after nickchanges have been applied. Please note
.PP
.PP
-Definition at line 240 of file modules.cpp.
+Definition at line 239 of file modules.cpp.
.PP
.nf
-240 { };
+239 { };
.fi
.PP
.SS "int Module::OnUserPreInvite (\fBuserrec\fP * source, \fBuserrec\fP * dest, \fBchanrec\fP * channel)\fC [virtual]\fP"
@@ -1918,10 +1920,10 @@ Returning 1 from this function stops the process immediately, causing no output
.PP
.PP
-Definition at line 236 of file modules.cpp.
+Definition at line 235 of file modules.cpp.
.PP
.nf
-236 { return 0; };
+235 { return 0; };
.fi
.PP
.SS "int Module::OnUserPreJoin (\fBuserrec\fP * user, \fBchanrec\fP * chan, const char * cname)\fC [virtual]\fP"
@@ -1948,10 +1950,10 @@ If the user joins a NEW channel which does not exist yet, OnUserPreJoin will be
.PP
.PP
-Definition at line 229 of file modules.cpp.
+Definition at line 228 of file modules.cpp.
.PP
.nf
-229 { return 0; }
+228 { return 0; }
.fi
.PP
.SS "int Module::OnUserPreKick (\fBuserrec\fP * source, \fBuserrec\fP * user, \fBchanrec\fP * chan, \fBstd::string\fP reason)\fC [virtual]\fP"
@@ -1978,10 +1980,10 @@ Returning a value of 1 from this function stops the process immediately, causing
.PP
.PP
-Definition at line 251 of file modules.cpp.
+Definition at line 250 of file modules.cpp.
.PP
.nf
-251 { return 0; };
+250 { return 0; };
.fi
.PP
.SS "int Module::OnUserPreMessage (\fBuserrec\fP * user, void * dest, int target_type, \fBstd::string\fP & text)\fC [virtual]\fP"
@@ -2008,10 +2010,10 @@ Returning any nonzero value from this function stops the process immediately, ca
.PP
.PP
-Definition at line 237 of file modules.cpp.
+Definition at line 236 of file modules.cpp.
.PP
.nf
-237 { return 0; };
+236 { return 0; };
.fi
.PP
.SS "int Module::OnUserPreNick (\fBuserrec\fP * user, \fBstd::string\fP newnick)\fC [virtual]\fP"
@@ -2034,10 +2036,10 @@ This can be used to implement Q-lines etc. Please note that although you can see
.PP
.PP
-Definition at line 239 of file modules.cpp.
+Definition at line 238 of file modules.cpp.
.PP
.nf
-239 { return 0; };
+238 { return 0; };
.fi
.PP
.SS "int Module::OnUserPreNotice (\fBuserrec\fP * user, void * dest, int target_type, \fBstd::string\fP & text)\fC [virtual]\fP"
@@ -2064,10 +2066,10 @@ Returning any nonzero value from this function stops the process immediately, ca
.PP
.PP
-Definition at line 238 of file modules.cpp.
+Definition at line 237 of file modules.cpp.
.PP
.nf
-238 { return 0; };
+237 { return 0; };
.fi
.PP
.SS "void Module::OnUserQuit (\fBuserrec\fP * user, \fBstd::string\fP message)\fC [virtual]\fP"
@@ -2085,10 +2087,10 @@ The details of the exiting user are available to you in the parameter userrec *u
.PP
.PP
-Definition at line 223 of file modules.cpp.
+Definition at line 222 of file modules.cpp.
.PP
.nf
-223 { }
+222 { }
.fi
.PP
.SS "void Module::OnUserRegister (\fBuserrec\fP * user)\fC [virtual]\fP"
@@ -2104,10 +2106,10 @@ before the user is sent the MOTD etc). Modules can use this method if they are p
.PP
.PP
-Definition at line 250 of file modules.cpp.
+Definition at line 249 of file modules.cpp.
.PP
.nf
-250 { };
+249 { };
.fi
.PP
.SS "void Module::OnWallops (\fBuserrec\fP * user, \fBstd::string\fP text)\fC [virtual]\fP"
@@ -2123,10 +2125,10 @@ Called after every WALLOPS command.
.PP
.PP
-Definition at line 286 of file modules.cpp.
+Definition at line 285 of file modules.cpp.
.PP
.nf
-286 { };
+285 { };
.fi
.PP
.SS "void Module::OnWhois (\fBuserrec\fP * source, \fBuserrec\fP * dest)\fC [virtual]\fP"
@@ -2144,10 +2146,10 @@ The source parameter contains the details of the user who issued the WHOIS comma
.PP
.PP
-Definition at line 235 of file modules.cpp.
+Definition at line 234 of file modules.cpp.
.PP
.nf
-235 { };
+234 { };
.fi
.PP
.SS "void Module::ProtoSendMetaData (void * opaque, int target_type, void * target, \fBstd::string\fP extname, \fBstd::string\fP extdata)\fC [virtual]\fP"
@@ -2173,10 +2175,10 @@ More documentation to follow soon. Please see src/modules/m_swhois.cpp for examp
.PP
.PP
-Definition at line 285 of file modules.cpp.
+Definition at line 284 of file modules.cpp.
.PP
.nf
-285 { };
+284 { };
.fi
.PP
.SS "void Module::ProtoSendMode (void * opaque, int target_type, void * target, \fBstd::string\fP modeline)\fC [virtual]\fP"
@@ -2200,10 +2202,10 @@ More documentation to follow soon. Please see src/modules/m_chanprotect.cpp for
.PP
.PP
-Definition at line 281 of file modules.cpp.
+Definition at line 280 of file modules.cpp.
.PP
.nf
-281 { };
+280 { };
.fi
.PP
diff --git a/docs/man/man3/ModuleFactory.3 b/docs/man/man3/ModuleFactory.3
index 290073277..5ace1c193 100644
--- a/docs/man/man3/ModuleFactory.3
+++ b/docs/man/man3/ModuleFactory.3
@@ -1,4 +1,4 @@
-.TH "ModuleFactory" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "ModuleFactory" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -32,23 +32,23 @@ Instantiates classes inherited from \fBModule\fP This class creates a class inhe
This is to allow for modules to create many different variants of \fBModule\fP, dependent on architecture, configuration, etc. In most cases, the simple class shown in the example module m_foobar.so will suffice for most modules.
.PP
-Definition at line 1676 of file modules.h.
+Definition at line 1694 of file modules.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "ModuleFactory::ModuleFactory ()\fC [inline]\fP"
.PP
-Definition at line 1679 of file modules.h.
+Definition at line 1697 of file modules.h.
.PP
.nf
-1679 { }
+1697 { }
.fi
.PP
.SS "virtual ModuleFactory::~ModuleFactory ()\fC [inline, virtual]\fP"
.PP
-Definition at line 1680 of file modules.h.
+Definition at line 1698 of file modules.h.
.PP
.nf
-1680 { }
+1698 { }
.fi
.PP
.SH "Member Function Documentation"
diff --git a/docs/man/man3/ModuleMessage.3 b/docs/man/man3/ModuleMessage.3
index ceb20c96d..9f0eeecfd 100644
--- a/docs/man/man3/ModuleMessage.3
+++ b/docs/man/man3/ModuleMessage.3
@@ -1,4 +1,4 @@
-.TH "ModuleMessage" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "ModuleMessage" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -29,15 +29,15 @@ Inherited by \fBEvent\fP, and \fBRequest\fP.
.PP
The ModuleMessage class is the base class of \fBRequest\fP and \fBEvent\fP This class is used to represent a basic data structure which is passed between modules for safe inter-module communications.
.PP
-Definition at line 143 of file modules.h.
+Definition at line 161 of file modules.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "virtual ModuleMessage::~ModuleMessage ()\fC [inline, virtual]\fP"
.PP
-Definition at line 149 of file modules.h.
+Definition at line 167 of file modules.h.
.PP
.nf
-149 {};
+167 {};
.fi
.PP
.SH "Member Function Documentation"
diff --git a/docs/man/man3/QLine.3 b/docs/man/man3/QLine.3
index a5fad88b9..61bd947ae 100644
--- a/docs/man/man3/QLine.3
+++ b/docs/man/man3/QLine.3
@@ -1,4 +1,4 @@
-.TH "QLine" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "QLine" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/Request.3 b/docs/man/man3/Request.3
index d910f5ab3..b504563a7 100644
--- a/docs/man/man3/Request.3
+++ b/docs/man/man3/Request.3
@@ -1,4 +1,4 @@
-.TH "Request" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "Request" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -58,17 +58,17 @@ The Request class is a unicast message directed at a given module.
When this class is properly instantiated it may be sent to a module using the \fBSend()\fP method, which will call the given module's OnRequest method with this class as its parameter.
.PP
-Definition at line 157 of file modules.h.
+Definition at line 175 of file modules.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "Request::Request (char * anydata, \fBModule\fP * src, \fBModule\fP * dst)"
.PP
Create a new Request.
.PP
-Definition at line 165 of file modules.cpp.
+Definition at line 164 of file modules.cpp.
.PP
.nf
-165 : data(anydata), source(src), dest(dst) { };
+164 : data(anydata), source(src), dest(dst) { };
.fi
.PP
.SH "Member Function Documentation"
@@ -77,42 +77,42 @@ Definition at line 165 of file modules.cpp.
.PP
Fetch the Request data.
.PP
-Definition at line 167 of file modules.cpp.
+Definition at line 166 of file modules.cpp.
.PP
References data.
.PP
.nf
-168 {
-169 return this->data;
-170 }
+167 {
+168 return this->data;
+169 }
.fi
.PP
.SS "\fBModule\fP * Request::GetDest ()"
.PP
Fetch the request destination (should be 'this' in the receiving module).
.PP
-Definition at line 177 of file modules.cpp.
+Definition at line 176 of file modules.cpp.
.PP
References dest.
.PP
.nf
-178 {
-179 return this->dest;
-180 }
+177 {
+178 return this->dest;
+179 }
.fi
.PP
.SS "\fBModule\fP * Request::GetSource ()"
.PP
Fetch the request source.
.PP
-Definition at line 172 of file modules.cpp.
+Definition at line 171 of file modules.cpp.
.PP
References source.
.PP
.nf
-173 {
-174 return this->source;
-175 }
+172 {
+173 return this->source;
+174 }
.fi
.PP
.SS "char * Request::Send ()\fC [virtual]\fP"
@@ -123,21 +123,21 @@ Upon returning the result will be arbitary data returned by the module you sent
.PP
Implements \fBModuleMessage\fP.
.PP
-Definition at line 182 of file modules.cpp.
+Definition at line 181 of file modules.cpp.
.PP
References dest, and Module::OnRequest().
.PP
.nf
-183 {
-184 if (this->dest)
-185 {
-186 return dest->OnRequest(this);
-187 }
-188 else
-189 {
-190 return NULL;
-191 }
-192 }
+182 {
+183 if (this->dest)
+184 {
+185 return dest->OnRequest(this);
+186 }
+187 else
+188 {
+189 return NULL;
+190 }
+191 }
.fi
.PP
.SH "Member Data Documentation"
@@ -146,21 +146,21 @@ References dest, and Module::OnRequest().
.PP
This member holds a pointer to arbitary data set by the emitter of the message.
.PP
-Definition at line 162 of file modules.h.
+Definition at line 180 of file modules.h.
.PP
Referenced by GetData().
.SS "\fBModule\fP* \fBRequest::dest\fP\fC [protected]\fP"
.PP
The single destination of the Request.
.PP
-Definition at line 169 of file modules.h.
+Definition at line 187 of file modules.h.
.PP
Referenced by GetDest(), and Send().
.SS "\fBModule\fP* \fBRequest::source\fP\fC [protected]\fP"
.PP
This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply.
.PP
-Definition at line 166 of file modules.h.
+Definition at line 184 of file modules.h.
.PP
Referenced by GetSource().
diff --git a/docs/man/man3/Server.3 b/docs/man/man3/Server.3
index 95aa8cd87..bc6962cac 100644
--- a/docs/man/man3/Server.3
+++ b/docs/man/man3/Server.3
@@ -1,4 +1,4 @@
-.TH "Server" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "Server" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -128,7 +128,7 @@ Inherits \fBclassbase\fP.
.br
.RI "\fIAdds an extended mode letter which is parsed by a module and handled in a list fashion. \fP"
.ti -1c
-.RI "virtual void \fBAddCommand\fP (char *cmd, \fBhandlerfunc\fP f, char flags, int minparams, char *source)"
+.RI "virtual void \fBAddCommand\fP (\fBcommand_t\fP *f)"
.br
.RI "\fIAdds a command to the command table. \fP"
.ti -1c
@@ -260,7 +260,7 @@ Allows server output and query functions This class contains methods which allow
All modules should instantiate at least one copy of this class, and use its member functions to perform their tasks.
.PP
-Definition at line 1096 of file modules.h.
+Definition at line 1114 of file modules.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "Server::Server ()"
@@ -269,11 +269,11 @@ Default constructor.
.PP
Creates a Server object.
.PP
-Definition at line 305 of file modules.cpp.
+Definition at line 304 of file modules.cpp.
.PP
.nf
-306 {
-307 }
+305 {
+306 }
.fi
.PP
.SS "Server::~Server ()\fC [virtual]\fP"
@@ -282,33 +282,33 @@ Default destructor.
.PP
Destroys a Server object.
.PP
-Definition at line 309 of file modules.cpp.
+Definition at line 308 of file modules.cpp.
.PP
.nf
-310 {
-311 }
+309 {
+310 }
.fi
.PP
.SH "Member Function Documentation"
.PP
-.SS "void Server::AddCommand (char * cmd, \fBhandlerfunc\fP f, char flags, int minparams, char * source)\fC [virtual]\fP"
+.SS "void Server::AddCommand (\fBcommand_t\fP * f)\fC [virtual]\fP"
.PP
Adds a command to the command table.
.PP
This allows modules to add extra commands into the command table. You must place a function within your module which is is of type handlerfunc:
.PP
-typedef void (handlerfunc) (char**, int, userrec*); ... void \fBhandle_kill(char **parameters, int pcnt, userrec *user)\fP
+typedef void (handlerfunc) (char**, int, userrec*); ... void handle_kill(char **parameters, int pcnt, userrec *user)
.PP
When the command is typed, the parameters will be placed into the parameters array (similar to argv) and the parameter count will be placed into pcnt (similar to argv). There will never be any less parameters than the 'minparams' value you specified when creating the command. The *user parameter is the class of the user which caused the command to trigger, who will always have the flag you specified in 'flags' when creating the initial command. For example to create an oper only command create the commands with flags='o'. The source parameter is used for resource tracking, and should contain the name of your module (with file extension) e.g. 'm_blarp.so'. If you place the wrong identifier here, you can cause crashes if your module is unloaded.
.PP
-Definition at line 416 of file modules.cpp.
+Definition at line 415 of file modules.cpp.
.PP
-References createcommand().
+References InspIRCd::Parser.
.PP
.nf
-417 {
-418 createcommand(cmd,f,flags,minparams,source);
-419 }
+416 {
+417 ServerInstance->Parser->CreateCommand(f);
+418 }
.fi
.PP
.SS "void Server::AddELine (long duration, \fBstd::string\fP source, \fBstd::string\fP reason, \fBstd::string\fP hostmask)\fC [virtual]\fP"
@@ -317,14 +317,14 @@ Adds a E-line The E-line is enforced as soon as it is added.
.PP
The duration must be in seconds, however you can use the \fBServer::CalcDuration\fP method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name.
.PP
-Definition at line 660 of file modules.cpp.
+Definition at line 659 of file modules.cpp.
.PP
References add_eline().
.PP
.nf
-661 {
-662 add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
-663 }
+660 {
+661 add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
+662 }
.fi
.PP
.SS "bool Server::AddExtendedListMode (char modechar)\fC [virtual]\fP"
@@ -343,17 +343,17 @@ This call is used to implement modes like +q and +a. The characteristics of thes
.PP
It is down to the module handling the mode to maintain state and determine what 'items' (e.g. users, or a banlist) have the mode set on them, and process the modes at the correct times, e.g. during access checks on channels, etc. When the extended mode is triggered the OnExtendedMode method will be triggered as above. Note that the target you are given will be a channel, if for example your mode is set 'on a user' (in for example +a) you must use \fBServer::Find\fP to locate the user the mode is operating on. Your mode handler may return 1 to handle the mode AND tell the core to display the mode change, e.g. '+aaa one two three' in the case of the mode for 'two', or it may return -1 to 'eat' the mode change, so the above example would become '+aa one three' after processing.
.PP
-Definition at line 584 of file modules.cpp.
+Definition at line 583 of file modules.cpp.
.PP
References DoAddExtendedMode(), ModeMakeList(), and MT_CHANNEL.
.PP
.nf
-585 {
-586 bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1);
-587 if (res)
-588 ModeMakeList(modechar);
-589 return res;
-590 }
+584 {
+585 bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1);
+586 if (res)
+587 ModeMakeList(modechar);
+588 return res;
+589 }
.fi
.PP
.SS "bool Server::AddExtendedMode (char modechar, int type, bool requires_oper, int params_when_on, int params_when_off)\fC [virtual]\fP"
@@ -362,37 +362,37 @@ Adds an extended mode letter which is parsed by a module.
.PP
This allows modules to add extra mode letters, e.g. +x for hostcloak. the 'type' parameter is either MT_CHANNEL, MT_CLIENT, or MT_SERVER, to indicate wether the mode is a channel mode, a client mode, or a server mode. requires_oper is used with MT_CLIENT type modes only to indicate the mode can only be set or unset by an oper. If this is used for MT_CHANNEL type modes it is ignored. params_when_on is the number of modes to expect when the mode is turned on (for type MT_CHANNEL only), e.g. with mode +k, this would have a value of 1. the params_when_off value has a similar value to params_when_on, except it indicates the number of parameters to expect when the mode is disabled. Modes which act in a similar way to channel mode +l (e.g. require a parameter to enable, but not to disable) should use this parameter. The function returns false if the mode is unavailable, and will not attempt to allocate another character, as this will confuse users. This also means that as only one module can claim a specific mode character, the core does not need to keep track of which modules own which modes, which speeds up operation of the server. In this version, a mode can have at most one parameter, attempting to use more parameters will have undefined effects.
.PP
-Definition at line 556 of file modules.cpp.
+Definition at line 555 of file modules.cpp.
.PP
References DEBUG, DoAddExtendedMode(), log(), MT_CLIENT, and MT_SERVER.
.PP
.nf
-557 {
-558 if (((modechar >= 'A') && (modechar <= 'Z')) || ((modechar >= 'a') && (modechar <= 'z')))
-559 {
-560 if (type == MT_SERVER)
-561 {
-562 log(DEBUG,'*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion');
-563 return false;
-564 }
-565 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT))
-566 {
-567 log(DEBUG,'*** API ERROR *** Parameters on MT_CLIENT modes are not supported');
-568 return false;
-569 }
-570 if ((params_when_on>1) || (params_when_off>1))
-571 {
-572 log(DEBUG,'*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported');
-573 return false;
-574 }
-575 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off);
-576 }
-577 else
-578 {
-579 log(DEBUG,'*** API ERROR *** Muppet modechar detected.');
-580 }
-581 return false;
-582 }
+556 {
+557 if (((modechar >= 'A') && (modechar <= 'Z')) || ((modechar >= 'a') && (modechar <= 'z')))
+558 {
+559 if (type == MT_SERVER)
+560 {
+561 log(DEBUG,'*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion');
+562 return false;
+563 }
+564 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT))
+565 {
+566 log(DEBUG,'*** API ERROR *** Parameters on MT_CLIENT modes are not supported');
+567 return false;
+568 }
+569 if ((params_when_on>1) || (params_when_off>1))
+570 {
+571 log(DEBUG,'*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported');
+572 return false;
+573 }
+574 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off);
+575 }
+576 else
+577 {
+578 log(DEBUG,'*** API ERROR *** Muppet modechar detected.');
+579 }
+580 return false;
+581 }
.fi
.PP
.SS "void Server::AddGLine (long duration, \fBstd::string\fP source, \fBstd::string\fP reason, \fBstd::string\fP hostmask)\fC [virtual]\fP"
@@ -401,14 +401,14 @@ Adds a G-line The G-line is propogated to all of the servers in the mesh and enf
.PP
The duration must be in seconds, however you can use the \fBServer::CalcDuration\fP method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name.
.PP
-Definition at line 640 of file modules.cpp.
+Definition at line 639 of file modules.cpp.
.PP
References add_gline().
.PP
.nf
-641 {
-642 add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
-643 }
+640 {
+641 add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
+642 }
.fi
.PP
.SS "void Server::AddKLine (long duration, \fBstd::string\fP source, \fBstd::string\fP reason, \fBstd::string\fP hostmask)\fC [virtual]\fP"
@@ -417,14 +417,14 @@ Adds a K-line The K-line is enforced as soon as it is added.
.PP
The duration must be in seconds, however you can use the \fBServer::CalcDuration\fP method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name.
.PP
-Definition at line 655 of file modules.cpp.
+Definition at line 654 of file modules.cpp.
.PP
References add_kline().
.PP
.nf
-656 {
-657 add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
-658 }
+655 {
+656 add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
+657 }
.fi
.PP
.SS "void Server::AddQLine (long duration, \fBstd::string\fP source, \fBstd::string\fP reason, \fBstd::string\fP nickname)\fC [virtual]\fP"
@@ -433,28 +433,28 @@ Adds a Q-line The Q-line is propogated to all of the servers in the mesh and enf
.PP
The duration must be in seconds, however you can use the \fBServer::CalcDuration\fP method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name.
.PP
-Definition at line 645 of file modules.cpp.
+Definition at line 644 of file modules.cpp.
.PP
References add_qline().
.PP
.nf
-646 {
-647 add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str());
-648 }
+645 {
+646 add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str());
+647 }
.fi
.PP
.SS "void Server::AddSocket (\fBInspSocket\fP * sock)\fC [virtual]\fP"
.PP
Adds a class derived from \fBInspSocket\fP to the server's socket engine.
.PP
-Definition at line 313 of file modules.cpp.
+Definition at line 312 of file modules.cpp.
.PP
References module_sockets.
.PP
.nf
-314 {
-315 module_sockets.push_back(sock);
-316 }
+313 {
+314 module_sockets.push_back(sock);
+315 }
.fi
.PP
.SS "void Server::AddZLine (long duration, \fBstd::string\fP source, \fBstd::string\fP reason, \fBstd::string\fP ipaddr)\fC [virtual]\fP"
@@ -463,14 +463,14 @@ Adds a Z-line The Z-line is propogated to all of the servers in the mesh and enf
.PP
The duration must be in seconds, however you can use the \fBServer::CalcDuration\fP method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name.
.PP
-Definition at line 650 of file modules.cpp.
+Definition at line 649 of file modules.cpp.
.PP
References add_zline().
.PP
.nf
-651 {
-652 add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str());
-653 }
+650 {
+651 add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str());
+652 }
.fi
.PP
.SS "long Server::CalcDuration (\fBstd::string\fP duration)\fC [virtual]\fP"
@@ -479,14 +479,14 @@ Calculates a duration This method will take a string containing a formatted dura
.PP
'1w2d') and return its value as a total number of seconds. This is the same function used internally by /GLINE etc to set the ban times.
.PP
-Definition at line 690 of file modules.cpp.
+Definition at line 689 of file modules.cpp.
.PP
References duration().
.PP
.nf
-691 {
-692 return duration(delta.c_str());
-693 }
+690 {
+691 return duration(delta.c_str());
+692 }
.fi
.PP
.SS "void Server::CallCommandHandler (\fBstd::string\fP commandname, char ** parameters, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP"
@@ -497,14 +497,14 @@ You can use this function to trigger other commands in the ircd, such as PRIVMSG
.br
) you may use them as callback identifiers. The first parameter to this method is the name of the command handler you wish to call, e.g. PRIVMSG. This will be a command handler previously registered by the core or wih \fBAddCommand()\fP. The second parameter is an array of parameters, and the third parameter is a count of parameters in the array. If you do not pass enough parameters to meet the minimum needed by the handler, the functiom will silently ignore it. The final parameter is the user executing the command handler, used for privilage checks, etc.
.PP
-Definition at line 401 of file modules.cpp.
+Definition at line 400 of file modules.cpp.
.PP
-References call_handler().
+References InspIRCd::Parser.
.PP
.nf
-402 {
-403 call_handler(commandname.c_str(),parameters,pcnt,user);
-404 }
+401 {
+402 ServerInstance->Parser->CallHandler(commandname,parameters,pcnt,user);
+403 }
.fi
.PP
.SS "void Server::ChangeGECOS (\fBuserrec\fP * user, \fBstd::string\fP gecos)\fC [virtual]\fP"
@@ -513,14 +513,14 @@ Change GECOS (fullname) of a user.
.PP
You should always call this method to change a user's GECOS rather than writing directly to the fullname member of userrec, as any change applied via this method will be propogated to any linked servers.
.PP
-Definition at line 499 of file modules.cpp.
+Definition at line 498 of file modules.cpp.
.PP
References ChangeName().
.PP
.nf
-500 {
-501 ChangeName(user,gecos.c_str());
-502 }
+499 {
+500 ChangeName(user,gecos.c_str());
+501 }
.fi
.PP
.SS "void Server::ChangeHost (\fBuserrec\fP * user, \fBstd::string\fP host)\fC [virtual]\fP"
@@ -529,14 +529,14 @@ Change displayed hostname of a user.
.PP
You should always call this method to change a user's host rather than writing directly to the dhost member of userrec, as any change applied via this method will be propogated to any linked servers.
.PP
-Definition at line 494 of file modules.cpp.
+Definition at line 493 of file modules.cpp.
.PP
References ChangeDisplayedHost().
.PP
.nf
-495 {
-496 ChangeDisplayedHost(user,host.c_str());
-497 }
+494 {
+495 ChangeDisplayedHost(user,host.c_str());
+496 }
.fi
.PP
.SS "void Server::ChangeUserNick (\fBuserrec\fP * user, \fBstd::string\fP nickname)\fC [virtual]\fP"
@@ -545,14 +545,14 @@ Forces a user nickchange.
.PP
This command works similarly to SVSNICK, and can be used to implement Q-lines etc. If you specify an invalid nickname, the nick change will be dropped and the target user will receive the error numeric for it.
.PP
-Definition at line 386 of file modules.cpp.
+Definition at line 385 of file modules.cpp.
.PP
References force_nickchange().
.PP
.nf
-387 {
-388 force_nickchange(user,nickname.c_str());
-389 }
+386 {
+387 force_nickchange(user,nickname.c_str());
+388 }
.fi
.PP
.SS "\fBstd::string\fP Server::ChanMode (\fBuserrec\fP * User, \fBchanrec\fP * Chan)\fC [virtual]\fP"
@@ -561,14 +561,14 @@ Attempts to look up a user's privilages on a channel.
.PP
This function will return a string containing either @, %, +, or an empty string, representing the user's privilages upon the channel you specify.
.PP
-Definition at line 524 of file modules.cpp.
+Definition at line 523 of file modules.cpp.
.PP
References cmode().
.PP
.nf
-525 {
-526 return cmode(User,Chan);
-527 }
+524 {
+525 return cmode(User,Chan);
+526 }
.fi
.PP
.SS "bool Server::CommonChannels (\fBuserrec\fP * u1, \fBuserrec\fP * u2)\fC [virtual]\fP"
@@ -577,14 +577,14 @@ Returns true if two users share a common channel.
.PP
This method is used internally by the NICK and QUIT commands, and the \fBServer::SendCommon\fP method.
.PP
-Definition at line 472 of file modules.cpp.
+Definition at line 471 of file modules.cpp.
.PP
References common_channels().
.PP
.nf
-473 {
-474 return (common_channels(u1,u2) != 0);
-475 }
+472 {
+473 return (common_channels(u1,u2) != 0);
+474 }
.fi
.PP
.SS "int Server::CountUsers (\fBchanrec\fP * c)\fC [virtual]\fP"
@@ -593,103 +593,103 @@ Returns a count of the number of users on a channel.
.PP
This will NEVER be 0, as if the chanrec exists, it will have at least one user in the channel.
.PP
-Definition at line 592 of file modules.cpp.
+Definition at line 591 of file modules.cpp.
.PP
.nf
-593 {
-594 return usercount(c);
-595 }
+592 {
+593 return usercount(c);
+594 }
.fi
.PP
.SS "bool Server::DelELine (\fBstd::string\fP hostmask)\fC [virtual]\fP"
.PP
Deletes a local E-Line.
.PP
-Definition at line 685 of file modules.cpp.
+Definition at line 684 of file modules.cpp.
.PP
References del_eline().
.PP
.nf
-686 {
-687 return del_eline(hostmask.c_str());
-688 }
+685 {
+686 return del_eline(hostmask.c_str());
+687 }
.fi
.PP
.SS "bool Server::DelGLine (\fBstd::string\fP hostmask)\fC [virtual]\fP"
.PP
Deletes a G-Line from all servers on the mesh.
.PP
-Definition at line 665 of file modules.cpp.
+Definition at line 664 of file modules.cpp.
.PP
References del_gline().
.PP
.nf
-666 {
-667 return del_gline(hostmask.c_str());
-668 }
+665 {
+666 return del_gline(hostmask.c_str());
+667 }
.fi
.PP
.SS "bool Server::DelKLine (\fBstd::string\fP hostmask)\fC [virtual]\fP"
.PP
Deletes a local K-Line.
.PP
-Definition at line 680 of file modules.cpp.
+Definition at line 679 of file modules.cpp.
.PP
References del_kline().
.PP
.nf
-681 {
-682 return del_kline(hostmask.c_str());
-683 }
+680 {
+681 return del_kline(hostmask.c_str());
+682 }
.fi
.PP
.SS "bool Server::DelQLine (\fBstd::string\fP nickname)\fC [virtual]\fP"
.PP
Deletes a Q-Line from all servers on the mesh.
.PP
-Definition at line 670 of file modules.cpp.
+Definition at line 669 of file modules.cpp.
.PP
References del_qline().
.PP
.nf
-671 {
-672 return del_qline(nickname.c_str());
-673 }
+670 {
+671 return del_qline(nickname.c_str());
+672 }
.fi
.PP
.SS "void Server::DelSocket (\fBInspSocket\fP * sock)\fC [virtual]\fP"
.PP
Deletes a class derived from \fBInspSocket\fP from the server's socket engine.
.PP
-Definition at line 334 of file modules.cpp.
+Definition at line 333 of file modules.cpp.
.PP
References module_sockets.
.PP
.nf
-335 {
-336 for (std::vector<InspSocket*>::iterator a = module_sockets.begin(); a < module_sockets.end(); a++)
-337 {
-338 if (*a == sock)
-339 {
-340 module_sockets.erase(a);
-341 return;
-342 }
-343 }
-344 }
+334 {
+335 for (std::vector<InspSocket*>::iterator a = module_sockets.begin(); a < module_sockets.end(); a++)
+336 {
+337 if (*a == sock)
+338 {
+339 module_sockets.erase(a);
+340 return;
+341 }
+342 }
+343 }
.fi
.PP
.SS "bool Server::DelZLine (\fBstd::string\fP ipaddr)\fC [virtual]\fP"
.PP
Deletes a Z-Line from all servers on the mesh.
.PP
-Definition at line 675 of file modules.cpp.
+Definition at line 674 of file modules.cpp.
.PP
References del_zline().
.PP
.nf
-676 {
-677 return del_zline(ipaddr.c_str());
-678 }
+675 {
+676 return del_zline(ipaddr.c_str());
+677 }
.fi
.PP
.SS "\fBchanrec\fP * Server::FindChannel (\fBstd::string\fP channel)\fC [virtual]\fP"
@@ -698,14 +698,14 @@ Attempts to look up a channel and return a pointer to it.
.PP
This function will return NULL if the channel does not exist.
.PP
-Definition at line 519 of file modules.cpp.
+Definition at line 518 of file modules.cpp.
.PP
References FindChan().
.PP
.nf
-520 {
-521 return FindChan(channel.c_str());
-522 }
+519 {
+520 return FindChan(channel.c_str());
+521 }
.fi
.PP
.SS "\fBuserrec\fP * Server::FindDescriptor (int socket)\fC [virtual]\fP"
@@ -714,12 +714,12 @@ Attempts to look up a nick using the file descriptor associated with that nick.
.PP
This function will return NULL if the file descriptor is not associated with a valid user.
.PP
-Definition at line 514 of file modules.cpp.
+Definition at line 513 of file modules.cpp.
.PP
.nf
-515 {
-516 return (socket < 65536 ? fd_ref_table[socket] : NULL);
-517 }
+514 {
+515 return (socket < 65536 ? fd_ref_table[socket] : NULL);
+516 }
.fi
.PP
.SS "\fBModule\fP * Server::FindModule (\fBstd::string\fP name)\fC [virtual]\fP"
@@ -728,21 +728,21 @@ This function finds a module by name.
.PP
You must provide the filename of the module. If the module cannot be found (is not loaded) the function will return NULL.
.PP
-Definition at line 724 of file modules.cpp.
+Definition at line 723 of file modules.cpp.
.PP
References MODCOUNT, ServerConfig::module_names, and modules.
.PP
.nf
-725 {
-726 for (int i = 0; i <= MODCOUNT; i++)
-727 {
-728 if (Config->module_names[i] == name)
-729 {
-730 return modules[i];
-731 }
-732 }
-733 return NULL;
-734 }
+724 {
+725 for (int i = 0; i <= MODCOUNT; i++)
+726 {
+727 if (Config->module_names[i] == name)
+728 {
+729 return modules[i];
+730 }
+731 }
+732 return NULL;
+733 }
.fi
.PP
.SS "\fBuserrec\fP * Server::FindNick (\fBstd::string\fP nick)\fC [virtual]\fP"
@@ -751,14 +751,14 @@ Attempts to look up a nick and return a pointer to it.
.PP
This function will return NULL if the nick does not exist.
.PP
-Definition at line 509 of file modules.cpp.
+Definition at line 508 of file modules.cpp.
.PP
References Find().
.PP
.nf
-510 {
-511 return Find(nick);
-512 }
+509 {
+510 return Find(nick);
+511 }
.fi
.PP
.SS "\fBAdmin\fP Server::GetAdmin ()\fC [virtual]\fP"
@@ -767,14 +767,14 @@ Returns the information of the server as returned by the /ADMIN command.
.PP
See the \fBAdmin\fP class for further information of the return value. The members \fBAdmin::Nick\fP, \fBAdmin::Email\fP and \fBAdmin::Name\fP contain the information for the server where the module is loaded.
.PP
-Definition at line 549 of file modules.cpp.
+Definition at line 548 of file modules.cpp.
.PP
References ServerConfig::AdminEmail, ServerConfig::AdminName, and ServerConfig::AdminNick.
.PP
.nf
-550 {
-551 return Admin(Config->AdminName,Config->AdminEmail,Config->AdminNick);
-552 }
+549 {
+550 return Admin(Config->AdminName,Config->AdminEmail,Config->AdminNick);
+551 }
.fi
.PP
.SS "\fBServerConfig\fP * Server::GetConfig ()"
@@ -783,54 +783,54 @@ Obtains a pointer to the server's \fBServerConfig\fP object.
.PP
The \fBServerConfig\fP object contains most of the configuration data of the IRC server, as read from the config file by the core.
.PP
-Definition at line 324 of file modules.cpp.
+Definition at line 323 of file modules.cpp.
.PP
.nf
-325 {
-326 return Config;
-327 }
+324 {
+325 return Config;
+326 }
.fi
.PP
.SS "\fBstd::string\fP Server::GetNetworkName ()\fC [virtual]\fP"
.PP
Returns the network name, global to all linked servers.
.PP
-Definition at line 539 of file modules.cpp.
+Definition at line 538 of file modules.cpp.
.PP
References ServerConfig::Network.
.PP
.nf
-540 {
-541 return Config->Network;
-542 }
+539 {
+540 return Config->Network;
+541 }
.fi
.PP
.SS "\fBstd::string\fP Server::GetServerDescription ()\fC [virtual]\fP"
.PP
Returns the server description string of the local server.
.PP
-Definition at line 544 of file modules.cpp.
+Definition at line 543 of file modules.cpp.
.PP
References ServerConfig::ServerDesc.
.PP
.nf
-545 {
-546 return Config->ServerDesc;
-547 }
+544 {
+545 return Config->ServerDesc;
+546 }
.fi
.PP
.SS "\fBstd::string\fP Server::GetServerName ()\fC [virtual]\fP"
.PP
Returns the server name of the server where the module is loaded.
.PP
-Definition at line 534 of file modules.cpp.
+Definition at line 533 of file modules.cpp.
.PP
References ServerConfig::ServerName.
.PP
.nf
-535 {
-536 return Config->ServerName;
-537 }
+534 {
+535 return Config->ServerName;
+536 }
.fi
.PP
.SS "\fBchanuserlist\fP Server::GetUsers (\fBchanrec\fP * chan)\fC [virtual]\fP"
@@ -839,36 +839,36 @@ Fetches the userlist of a channel.
.PP
This function must be here and not a member of userrec or chanrec due to include constraints.
.PP
-Definition at line 374 of file modules.cpp.
+Definition at line 373 of file modules.cpp.
.PP
References chanrec::GetUsers().
.PP
.nf
-375 {
-376 chanuserlist userl;
-377 userl.clear();
-378 std::vector<char*> *list = chan->GetUsers();
-379 for (std::vector<char*>::iterator i = list->begin(); i != list->end(); i++)
-380 {
-381 char* o = *i;
-382 userl.push_back((userrec*)o);
-383 }
-384 return userl;
-385 }
+374 {
+375 chanuserlist userl;
+376 userl.clear();
+377 std::vector<char*> *list = chan->GetUsers();
+378 for (std::vector<char*>::iterator i = list->begin(); i != list->end(); i++)
+379 {
+380 char* o = *i;
+381 userl.push_back((userrec*)o);
+382 }
+383 return userl;
+384 }
.fi
.PP
.SS "\fBstd::string\fP Server::GetVersion ()"
.PP
Returns the version string of this server.
.PP
-Definition at line 329 of file modules.cpp.
+Definition at line 328 of file modules.cpp.
.PP
References InspIRCd::GetVersionString().
.PP
.nf
-330 {
-331 return ServerInstance->GetVersionString();
-332 }
+329 {
+330 return ServerInstance->GetVersionString();
+331 }
.fi
.PP
.SS "bool Server::IsNick (\fBstd::string\fP nick)\fC [virtual]\fP"
@@ -877,14 +877,14 @@ Returns true if a nick is valid.
.PP
Nicks for unregistered connections will return false.
.PP
-Definition at line 504 of file modules.cpp.
+Definition at line 503 of file modules.cpp.
.PP
References isnick().
.PP
.nf
-505 {
-506 return (isnick(nick.c_str()) != 0);
-507 }
+504 {
+505 return (isnick(nick.c_str()) != 0);
+506 }
.fi
.PP
.SS "bool Server::IsOnChannel (\fBuserrec\fP * User, \fBchanrec\fP * Chan)\fC [virtual]\fP"
@@ -893,14 +893,14 @@ Checks if a user is on a channel.
.PP
This function will return true or false to indicate if user 'User' is on channel 'Chan'.
.PP
-Definition at line 529 of file modules.cpp.
+Definition at line 528 of file modules.cpp.
.PP
References has_channel().
.PP
.nf
-530 {
-531 return has_channel(User,Chan);
-532 }
+529 {
+530 return has_channel(User,Chan);
+531 }
.fi
.PP
.SS "bool Server::IsUlined (\fBstd::string\fP server)\fC [virtual]\fP"
@@ -909,62 +909,62 @@ Returns true if the servername you give is ulined.
.PP
ULined servers have extra privilages. They are allowed to change nicknames on remote servers, change modes of clients which are on remote servers and set modes of channels where there are no channel operators for that channel on the ulined server, amongst other things. Ulined server data is also broadcast across the mesh at all times as opposed to selectively messaged in the case of normal servers, as many ulined server types (such as services) do not support meshed links and must operate in this manner.
.PP
-Definition at line 396 of file modules.cpp.
+Definition at line 395 of file modules.cpp.
.PP
References is_uline().
.PP
.nf
-397 {
-398 return is_uline(server.c_str());
-399 }
+396 {
+397 return is_uline(server.c_str());
+398 }
.fi
.PP
.SS "bool Server::IsValidMask (\fBstd::string\fP mask)\fC [virtual]\fP"
.PP
Returns true if a nick!ident string is correctly formatted, false if otherwise.
.PP
-Definition at line 695 of file modules.cpp.
+Definition at line 694 of file modules.cpp.
.PP
.nf
-696 {
-697 const char* dest = mask.c_str();
-698 if (strchr(dest,'!')==0)
-699 return false;
-700 if (strchr(dest,'@')==0)
-701 return false;
-702 for (unsigned int i = 0; i < strlen(dest); i++)
-703 if (dest[i] < 32)
-704 return false;
-705 for (unsigned int i = 0; i < strlen(dest); i++)
-706 if (dest[i] > 126)
-707 return false;
-708 unsigned int c = 0;
-709 for (unsigned int i = 0; i < strlen(dest); i++)
-710 if (dest[i] == '!')
-711 c++;
-712 if (c>1)
-713 return false;
-714 c = 0;
-715 for (unsigned int i = 0; i < strlen(dest); i++)
-716 if (dest[i] == '@')
-717 c++;
-718 if (c>1)
-719 return false;
-720
-721 return true;
-722 }
+695 {
+696 const char* dest = mask.c_str();
+697 if (strchr(dest,'!')==0)
+698 return false;
+699 if (strchr(dest,'@')==0)
+700 return false;
+701 for (unsigned int i = 0; i < strlen(dest); i++)
+702 if (dest[i] < 32)
+703 return false;
+704 for (unsigned int i = 0; i < strlen(dest); i++)
+705 if (dest[i] > 126)
+706 return false;
+707 unsigned int c = 0;
+708 for (unsigned int i = 0; i < strlen(dest); i++)
+709 if (dest[i] == '!')
+710 c++;
+711 if (c>1)
+712 return false;
+713 c = 0;
+714 for (unsigned int i = 0; i < strlen(dest); i++)
+715 if (dest[i] == '@')
+716 c++;
+717 if (c>1)
+718 return false;
+719
+720 return true;
+721 }
.fi
.PP
.SS "bool Server::IsValidModuleCommand (\fBstd::string\fP commandname, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP"
.PP
-Definition at line 406 of file modules.cpp.
+Definition at line 405 of file modules.cpp.
.PP
-References is_valid_cmd().
+References InspIRCd::Parser.
.PP
.nf
-407 {
-408 return is_valid_cmd(commandname.c_str(), pcnt, user);
-409 }
+406 {
+407 return ServerInstance->Parser->IsValidCommand(commandname, pcnt, user);
+408 }
.fi
.PP
.SS "\fBchanrec\fP * Server::JoinUserToChannel (\fBuserrec\fP * user, \fBstd::string\fP cname, \fBstd::string\fP key)\fC [virtual]\fP"
@@ -973,14 +973,14 @@ Forces a user to join a channel.
.PP
This is similar to svsjoin and can be used to implement redirection, etc. On success, the return value is a valid pointer to a chanrec* of the channel the user was joined to. On failure, the result is NULL.
.PP
-Definition at line 364 of file modules.cpp.
+Definition at line 363 of file modules.cpp.
.PP
References add_channel().
.PP
.nf
-365 {
-366 return add_channel(user,cname.c_str(),key.c_str(),false);
-367 }
+364 {
+365 return add_channel(user,cname.c_str(),key.c_str(),false);
+366 }
.fi
.PP
.SS "void Server::Log (int level, \fBstd::string\fP s)\fC [virtual]\fP"
@@ -989,14 +989,14 @@ Writes a log string.
.PP
This method writes a line of text to the log. If the level given is lower than the level given in the configuration, this command has no effect.
.PP
-Definition at line 411 of file modules.cpp.
+Definition at line 410 of file modules.cpp.
.PP
References log().
.PP
.nf
-412 {
-413 log(level,'%s',s.c_str());
-414 }
+411 {
+412 log(level,'%s',s.c_str());
+413 }
.fi
.PP
.SS "bool Server::MatchText (\fBstd::string\fP sliteral, \fBstd::string\fP spattern)\fC [virtual]\fP"
@@ -1005,15 +1005,15 @@ Matches text against a glob pattern.
.PP
Uses the ircd's internal matching function to match string against a globbing pattern, e.g. *!*@*.com Returns true if the literal successfully matches the pattern, false if otherwise.
.PP
-Definition at line 351 of file modules.cpp.
+Definition at line 350 of file modules.cpp.
.PP
.nf
-352 {
-353 char literal[MAXBUF],pattern[MAXBUF];
-354 strlcpy(literal,sliteral.c_str(),MAXBUF);
-355 strlcpy(pattern,spattern.c_str(),MAXBUF);
-356 return match(literal,pattern);
-357 }
+351 {
+352 char literal[MAXBUF],pattern[MAXBUF];
+353 strlcpy(literal,sliteral.c_str(),MAXBUF);
+354 strlcpy(pattern,spattern.c_str(),MAXBUF);
+355 return match(literal,pattern);
+356 }
.fi
.PP
.SS "\fBchanrec\fP * Server::PartUserFromChannel (\fBuserrec\fP * user, \fBstd::string\fP cname, \fBstd::string\fP reason)\fC [virtual]\fP"
@@ -1022,14 +1022,14 @@ Forces a user to part a channel.
.PP
This is similar to svspart and can be used to implement redirection, etc. Although the return value of this function is a pointer to a channel record, the returned data is undefined and should not be read or written to. This behaviour may be changed in a future version.
.PP
-Definition at line 369 of file modules.cpp.
+Definition at line 368 of file modules.cpp.
.PP
References del_channel().
.PP
.nf
-370 {
-371 return del_channel(user,cname.c_str(),reason.c_str(),false);
-372 }
+369 {
+370 return del_channel(user,cname.c_str(),reason.c_str(),false);
+371 }
.fi
.PP
.SS "bool Server::PseudoToUser (\fBuserrec\fP * alive, \fBuserrec\fP * zombie, \fBstd::string\fP message)\fC [virtual]\fP"
@@ -1038,39 +1038,39 @@ This user takes one user, and switches their file descriptor with another user,
.PP
The user in 'alive' is booted off the server with the given message. The user referred to by 'zombie' should have previously been locked with Server::ZombifyUser, otherwise stale sockets and file descriptor leaks can occur. After this call, the pointer to alive will be invalid, and the pointer to zombie will be equivalent in effect to the old pointer to alive.
.PP
-Definition at line 610 of file modules.cpp.
+Definition at line 609 of file modules.cpp.
.PP
References userrec::chans, userrec::ClearBuffer(), connection::fd, FD_MAGIC_NUMBER, connection::host, userrec::ident, kill_link(), chanrec::name, userrec::nick, chanrec::setby, chanrec::topic, chanrec::topicset, Write(), WriteFrom(), and WriteServ().
.PP
.nf
-611 {
-612 zombie->fd = alive->fd;
-613 alive->fd = FD_MAGIC_NUMBER;
-614 alive->ClearBuffer();
-615 Write(zombie->fd,':%s!%s@%s NICK %s',alive->nick,alive->ident,alive->host,zombie->nick);
-616 kill_link(alive,message.c_str());
-617 fd_ref_table[zombie->fd] = zombie;
-618 for (unsigned int i = 0; i < zombie->chans.size(); i++)
-619 {
-620 if (zombie->chans[i].channel != NULL)
-621 {
-622 if (zombie->chans[i].channel->name)
-623 {
-624 chanrec* Ptr = zombie->chans[i].channel;
-625 WriteFrom(zombie->fd,zombie,'JOIN %s',Ptr->name);
-626 if (Ptr->topicset)
-627 {
-628 WriteServ(zombie->fd,'332 %s %s :%s', zombie->nick, Ptr->name, Ptr->topic);
-629 WriteServ(zombie->fd,'333 %s %s %s %d', zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset);
-630 }
-631 userlist(zombie,Ptr);
-632 WriteServ(zombie->fd,'366 %s %s :End of /NAMES list.', zombie->nick, Ptr->name);
-633
-634 }
-635 }
-636 }
-637 return true;
-638 }
+610 {
+611 zombie->fd = alive->fd;
+612 alive->fd = FD_MAGIC_NUMBER;
+613 alive->ClearBuffer();
+614 Write(zombie->fd,':%s!%s@%s NICK %s',alive->nick,alive->ident,alive->host,zombie->nick);
+615 kill_link(alive,message.c_str());
+616 fd_ref_table[zombie->fd] = zombie;
+617 for (unsigned int i = 0; i < zombie->chans.size(); i++)
+618 {
+619 if (zombie->chans[i].channel != NULL)
+620 {
+621 if (zombie->chans[i].channel->name)
+622 {
+623 chanrec* Ptr = zombie->chans[i].channel;
+624 WriteFrom(zombie->fd,zombie,'JOIN %s',Ptr->name);
+625 if (Ptr->topicset)
+626 {
+627 WriteServ(zombie->fd,'332 %s %s :%s', zombie->nick, Ptr->name, Ptr->topic);
+628 WriteServ(zombie->fd,'333 %s %s %s %d', zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset);
+629 }
+630 userlist(zombie,Ptr);
+631 WriteServ(zombie->fd,'366 %s %s :End of /NAMES list.', zombie->nick, Ptr->name);
+632
+633 }
+634 }
+635 }
+636 return true;
+637 }
.fi
.PP
.SS "void Server::QuitUser (\fBuserrec\fP * user, \fBstd::string\fP reason)\fC [virtual]\fP"
@@ -1083,27 +1083,27 @@ WARNING!
.PP
Once you call this function, userrec* user will immediately become INVALID. You MUST NOT write to, or read from this pointer after calling the QuitUser method UNDER ANY CIRCUMSTANCES! The best course of action after calling this method is to immediately bail from your handler.
.PP
-Definition at line 391 of file modules.cpp.
+Definition at line 390 of file modules.cpp.
.PP
References kill_link().
.PP
.nf
-392 {
-393 kill_link(user,reason.c_str());
-394 }
+391 {
+392 kill_link(user,reason.c_str());
+393 }
.fi
.PP
.SS "void Server::RehashServer ()\fC [virtual]\fP"
.PP
-Definition at line 318 of file modules.cpp.
+Definition at line 317 of file modules.cpp.
.PP
References ServerConfig::Read(), and WriteOpers().
.PP
.nf
-319 {
-320 WriteOpers('*** Rehashing config file');
-321 Config->Read(false,NULL);
-322 }
+318 {
+319 WriteOpers('*** Rehashing config file');
+320 Config->Read(false,NULL);
+321 }
.fi
.PP
.SS "void Server::Send (int Socket, \fBstd::string\fP s)\fC [virtual]\fP"
@@ -1112,14 +1112,14 @@ Sends a line of text down a TCP/IP socket.
.PP
This method writes a line of text to an established socket, cutting it to 510 characters plus a carriage return and linefeed if required.
.PP
-Definition at line 426 of file modules.cpp.
+Definition at line 425 of file modules.cpp.
.PP
References Write().
.PP
.nf
-427 {
-428 Write(Socket,'%s',s.c_str());
-429 }
+426 {
+427 Write(Socket,'%s',s.c_str());
+428 }
.fi
.PP
.SS "void Server::SendChannel (\fBuserrec\fP * User, \fBchanrec\fP * Channel, \fBstd::string\fP s, bool IncludeSender)\fC [virtual]\fP"
@@ -1128,21 +1128,21 @@ Sends text from a user to a channel (mulicast).
.PP
This method writes a line of text to a channel, with the given user's nick/ident /host combination prepended, as used in PRIVMSG etc commands (see RFC 1459). If the IncludeSender flag is set, then the text is also sent back to the user from which it originated, as seen in MODE (see RFC 1459).
.PP
-Definition at line 460 of file modules.cpp.
+Definition at line 459 of file modules.cpp.
.PP
References ChanExceptSender(), and WriteChannel().
.PP
.nf
-461 {
-462 if (IncludeSender)
-463 {
-464 WriteChannel(Channel,User,'%s',s.c_str());
-465 }
-466 else
-467 {
-468 ChanExceptSender(Channel,User,'%s',s.c_str());
-469 }
-470 }
+460 {
+461 if (IncludeSender)
+462 {
+463 WriteChannel(Channel,User,'%s',s.c_str());
+464 }
+465 else
+466 {
+467 ChanExceptSender(Channel,User,'%s',s.c_str());
+468 }
+469 }
.fi
.PP
.SS "void Server::SendChannelServerNotice (\fBstd::string\fP ServName, \fBchanrec\fP * Channel, \fBstd::string\fP text)\fC [virtual]\fP"
@@ -1151,12 +1151,12 @@ Writes text to a channel, but from a server, including all.
.PP
This can be used to send server notices to a group of users.
.PP
-Definition at line 455 of file modules.cpp.
+Definition at line 454 of file modules.cpp.
.PP
.nf
-456 {
-457 WriteChannelWithServ((char*)ServName.c_str(), Channel, '%s', text.c_str());
-458 }
+455 {
+456 WriteChannelWithServ((char*)ServName.c_str(), Channel, '%s', text.c_str());
+457 }
.fi
.PP
.SS "void Server::SendCommon (\fBuserrec\fP * User, \fBstd::string\fP text, bool IncludeSender)\fC [virtual]\fP"
@@ -1165,21 +1165,21 @@ Sends text from a user to one or more channels (mulicast).
.PP
This method writes a line of text to all users which share a common channel with a given user, with the user's nick/ident/host combination prepended, as used in PRIVMSG etc commands (see RFC 1459). If the IncludeSender flag is set, then the text is also sent back to the user from which it originated, as seen in NICK (see RFC 1459). Otherwise, it is only sent to the other recipients, as seen in QUIT.
.PP
-Definition at line 477 of file modules.cpp.
+Definition at line 476 of file modules.cpp.
.PP
References WriteCommon(), and WriteCommonExcept().
.PP
.nf
-478 {
-479 if (IncludeSender)
-480 {
-481 WriteCommon(User,'%s',text.c_str());
-482 }
-483 else
-484 {
-485 WriteCommonExcept(User,'%s',text.c_str());
-486 }
-487 }
+477 {
+478 if (IncludeSender)
+479 {
+480 WriteCommon(User,'%s',text.c_str());
+481 }
+482 else
+483 {
+484 WriteCommonExcept(User,'%s',text.c_str());
+485 }
+486 }
.fi
.PP
.SS "void Server::SendFrom (int Socket, \fBuserrec\fP * User, \fBstd::string\fP s)\fC [virtual]\fP"
@@ -1188,14 +1188,14 @@ Sends text from a user to a socket.
.PP
This method writes a line of text to an established socket, with the given user's nick/ident /host combination prepended, as used in PRIVSG etc commands (see RFC 1459)
.PP
-Definition at line 436 of file modules.cpp.
+Definition at line 435 of file modules.cpp.
.PP
References WriteFrom().
.PP
.nf
-437 {
-438 WriteFrom(Socket,User,'%s',s.c_str());
-439 }
+436 {
+437 WriteFrom(Socket,User,'%s',s.c_str());
+438 }
.fi
.PP
.SS "void Server::SendMode (char ** parameters, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP"
@@ -1218,14 +1218,14 @@ Srv->SendMode(modes,3,user);
.PP
The modes will originate from the server where the command was issued, however responses (e.g. numerics) will be sent to the user you provide as the third parameter. You must be sure to get the number of parameters correct in the pcnt parameter otherwise you could leave your server in an unstable state!
.PP
-Definition at line 421 of file modules.cpp.
+Definition at line 420 of file modules.cpp.
.PP
-References server_mode().
+References InspIRCd::ModeGrok, and ModeParser::ServerMode().
.PP
.nf
-422 {
-423 server_mode(parameters,pcnt,user);
-424 }
+421 {
+422 ServerInstance->ModeGrok->ServerMode(parameters,pcnt,user);
+423 }
.fi
.PP
.SS "void Server::SendOpers (\fBstd::string\fP s)\fC [virtual]\fP"
@@ -1234,14 +1234,14 @@ Sends text to all opers.
.PP
This method sends a server notice to all opers with the usermode +s.
.PP
-Definition at line 346 of file modules.cpp.
+Definition at line 345 of file modules.cpp.
.PP
References WriteOpers().
.PP
.nf
-347 {
-348 WriteOpers('%s',s.c_str());
-349 }
+346 {
+347 WriteOpers('%s',s.c_str());
+348 }
.fi
.PP
.SS "void Server::SendServ (int Socket, \fBstd::string\fP s)\fC [virtual]\fP"
@@ -1250,14 +1250,14 @@ Sends text from the server to a socket.
.PP
This method writes a line of text to an established socket, with the servername prepended as used by numerics (see RFC 1459)
.PP
-Definition at line 431 of file modules.cpp.
+Definition at line 430 of file modules.cpp.
.PP
References WriteServ().
.PP
.nf
-432 {
-433 WriteServ(Socket,'%s',s.c_str());
-434 }
+431 {
+432 WriteServ(Socket,'%s',s.c_str());
+433 }
.fi
.PP
.SS "void Server::SendTo (\fBuserrec\fP * Source, \fBuserrec\fP * Dest, \fBstd::string\fP s)\fC [virtual]\fP"
@@ -1274,23 +1274,23 @@ The format will become:
.PP
Which is useful for numerics and server notices to single users, etc.
.PP
-Definition at line 441 of file modules.cpp.
+Definition at line 440 of file modules.cpp.
.PP
References connection::fd, Write(), and WriteTo().
.PP
.nf
-442 {
-443 if (!Source)
-444 {
-445 // if source is NULL, then the message originates from the local server
-446 Write(Dest->fd,':%s %s',this->GetServerName().c_str(),s.c_str());
-447 }
-448 else
-449 {
-450 // otherwise it comes from the user specified
-451 WriteTo(Source,Dest,'%s',s.c_str());
-452 }
-453 }
+441 {
+442 if (!Source)
+443 {
+444 // if source is NULL, then the message originates from the local server
+445 Write(Dest->fd,':%s %s',this->GetServerName().c_str(),s.c_str());
+446 }
+447 else
+448 {
+449 // otherwise it comes from the user specified
+450 WriteTo(Source,Dest,'%s',s.c_str());
+451 }
+452 }
.fi
.PP
.SS "void Server::SendToModeMask (\fBstd::string\fP modes, int flags, \fBstd::string\fP text)\fC [virtual]\fP"
@@ -1303,12 +1303,12 @@ Serv->SendToModeMask('xi', WM_OR, 'm00');
.PP
Then the text 'm00' will be sent to all users with EITHER mode x or i. Conversely if you used WM_AND, the user must have both modes set to receive the message.
.PP
-Definition at line 359 of file modules.cpp.
+Definition at line 358 of file modules.cpp.
.PP
.nf
-360 {
-361 WriteMode(modes.c_str(),flags,'%s',text.c_str());
-362 }
+359 {
+360 WriteMode(modes.c_str(),flags,'%s',text.c_str());
+361 }
.fi
.PP
.SS "void Server::SendWallops (\fBuserrec\fP * User, \fBstd::string\fP text)\fC [virtual]\fP"
@@ -1317,14 +1317,14 @@ Sends a WALLOPS message.
.PP
This method writes a WALLOPS message to all users with the +w flag, originating from the specified user.
.PP
-Definition at line 489 of file modules.cpp.
+Definition at line 488 of file modules.cpp.
.PP
References WriteWallOps().
.PP
.nf
-490 {
-491 WriteWallOps(User,false,'%s',text.c_str());
-492 }
+489 {
+490 WriteWallOps(User,false,'%s',text.c_str());
+491 }
.fi
.PP
.SS "bool Server::UserToPseudo (\fBuserrec\fP * user, \fBstd::string\fP message)\fC [virtual]\fP"
@@ -1333,21 +1333,21 @@ Remove a user's connection to the irc server, but leave their client in existenc
.PP
When you call this function, the user's file descriptor will be replaced with the value of FD_MAGIC_NUMBER and their old file descriptor will be closed. This idle client will remain until it is restored with a valid file descriptor, or is removed from IRC by an operator After this call, the pointer to user will be invalid.
.PP
-Definition at line 598 of file modules.cpp.
+Definition at line 597 of file modules.cpp.
.PP
-References userrec::ClearBuffer(), SocketEngine::DelFd(), connection::fd, FD_MAGIC_NUMBER, connection::host, userrec::ident, and Write().
+References userrec::ClearBuffer(), SocketEngine::DelFd(), connection::fd, FD_MAGIC_NUMBER, connection::host, userrec::ident, InspIRCd::SE, and Write().
.PP
.nf
-599 {
-600 unsigned int old_fd = user->fd;
-601 user->fd = FD_MAGIC_NUMBER;
-602 user->ClearBuffer();
-603 Write(old_fd,'ERROR :Closing link (%s@%s) [%s]',user->ident,user->host,message.c_str());
-604 SE->DelFd(old_fd);
-605 shutdown(old_fd,2);
-606 close(old_fd);
-607 return true;
-608 }
+598 {
+599 unsigned int old_fd = user->fd;
+600 user->fd = FD_MAGIC_NUMBER;
+601 user->ClearBuffer();
+602 Write(old_fd,'ERROR :Closing link (%s@%s) [%s]',user->ident,user->host,message.c_str());
+603 ServerInstance->SE->DelFd(old_fd);
+604 shutdown(old_fd,2);
+605 close(old_fd);
+606 return true;
+607 }
.fi
.PP
diff --git a/docs/man/man3/ServerConfig.3 b/docs/man/man3/ServerConfig.3
index 445d8b097..e35314eae 100644
--- a/docs/man/man3/ServerConfig.3
+++ b/docs/man/man3/ServerConfig.3
@@ -1,4 +1,4 @@
-.TH "ServerConfig" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "ServerConfig" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -44,6 +44,15 @@ Inherits \fBclassbase\fP.
.ti -1c
.RI "int \fBEnumValues\fP (std::stringstream *config, const char *tag, int index)"
.br
+.ti -1c
+.RI "\fBModule\fP * \fBGetIOHook\fP (int port)"
+.br
+.ti -1c
+.RI "bool \fBAddIOHook\fP (int port, \fBModule\fP *iomod)"
+.br
+.ti -1c
+.RI "bool \fBDelIOHook\fP (int port)"
+.br
.in -1c
.SS "Public Attributes"
@@ -191,6 +200,10 @@ Inherits \fBclassbase\fP.
.RI "int \fBports\fP [255]"
.br
.RI "\fIA list of ports which the server is listening on. \fP"
+.ti -1c
+.RI "std::map< int, \fBModule\fP * > \fBIOHookModule\fP"
+.br
+.RI "\fIA list of ports claimed by IO Modules. \fP"
.in -1c
.SS "Private Member Functions"
@@ -218,13 +231,15 @@ This class holds the bulk of the runtime configuration for the ircd.
It allows for reading new config values, accessing configuration files, and storage of the configuration data needed to run the ircd, such as the servername, connect classes, /ADMIN data, MOTDs and filenames etc.
.PP
-Definition at line 39 of file inspircd_io.h.
+Definition at line 40 of file inspircd_io.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "ServerConfig::ServerConfig ()"
.PP
.SH "Member Function Documentation"
.PP
+.SS "bool ServerConfig::AddIOHook (int port, \fBModule\fP * iomod)"
+.PP
.SS "void ServerConfig::ClearStack ()"
.PP
Clears the include stack in preperation for a \fBRead()\fP call.
@@ -239,6 +254,8 @@ This private method processes one line of configutation, appending errors to err
Referenced by userrec::HasPermission().
.SS "int ServerConfig::ConfValueEnum (char * tag, std::stringstream * config)"
.PP
+.SS "bool ServerConfig::DelIOHook (int port)"
+.PP
.SS "int ServerConfig::EnumConf (std::stringstream * config_f, const char * tag)"
.PP
Referenced by ConfigReader::Enumerate().
@@ -250,6 +267,9 @@ Referenced by ConfigReader::EnumerateValues().
Used by the config file subsystem to safely read a C-style string without dependency upon any certain style of linefeed, e.g.
.PP
it can read both windows and UNIX style linefeeds transparently.
+.SS "\fBModule\fP* ServerConfig::GetIOHook (int port)"
+.PP
+Referenced by kill_link(), and kill_link_silent().
.SS "bool ServerConfig::LoadConf (const char * filename, std::stringstream * target, std::stringstream * errorstream)"
.PP
Referenced by ConfigReader::ConfigReader().
@@ -269,213 +289,224 @@ Referenced by ConfigReader::ReadFlag(), ConfigReader::ReadInteger(), and ConfigR
.PP
A list of IP addresses the server is listening on.
.PP
-Definition at line 216 of file inspircd_io.h.
+Definition at line 217 of file inspircd_io.h.
.SS "char \fBServerConfig::AdminEmail\fP[MAXBUF]"
.PP
Holds the email address of the admin, for output in the /ADMIN command.
.PP
-Definition at line 89 of file inspircd_io.h.
+Definition at line 90 of file inspircd_io.h.
.PP
Referenced by Server::GetAdmin().
.SS "char \fBServerConfig::AdminName\fP[MAXBUF]"
.PP
Holds the admin's name, for output in the /ADMIN command.
.PP
-Definition at line 84 of file inspircd_io.h.
+Definition at line 85 of file inspircd_io.h.
.PP
Referenced by Server::GetAdmin().
.SS "char \fBServerConfig::AdminNick\fP[MAXBUF]"
.PP
Holds the admin's nickname, for output in the /ADMIN command.
.PP
-Definition at line 94 of file inspircd_io.h.
+Definition at line 95 of file inspircd_io.h.
.PP
Referenced by Server::GetAdmin().
.SS "bool \fBServerConfig::AllowHalfop\fP"
.PP
If this value is true, halfops have been enabled in the configuration file.
.PP
-Definition at line 171 of file inspircd_io.h.
+Definition at line 172 of file inspircd_io.h.
.SS "\fBClassVector\fP \fBServerConfig::Classes\fP"
.PP
The connect classes in use by the IRC server.
.PP
-Definition at line 242 of file inspircd_io.h.
+Definition at line 243 of file inspircd_io.h.
+.PP
+Referenced by AddClient().
.SS "std::stringstream \fBServerConfig::config_f\fP"
.PP
The parsed configuration file as a stringstream.
.PP
You should pass this to any configuration methods of this class, and not access it directly. It is recommended that modules use \fBConfigReader\fP instead which provides a simpler abstraction of configuration files.
.PP
-Definition at line 238 of file inspircd_io.h.
+Definition at line 239 of file inspircd_io.h.
.PP
Referenced by userrec::HasPermission().
.SS "int \fBServerConfig::debugging\fP"
.PP
True if the DEBUG loglevel is selected.
.PP
-Definition at line 202 of file inspircd_io.h.
+Definition at line 203 of file inspircd_io.h.
.SS "int \fBServerConfig::DieDelay\fP"
.PP
How many seconds to wait before exiting the program when /DIE is correctly issued.
.PP
-Definition at line 211 of file inspircd_io.h.
+Definition at line 212 of file inspircd_io.h.
.SS "char \fBServerConfig::diepass\fP[MAXBUF]"
.PP
The admin-configured /DIE password.
.PP
-Definition at line 98 of file inspircd_io.h.
+Definition at line 99 of file inspircd_io.h.
.SS "char \fBServerConfig::DieValue\fP[MAXBUF]"
.PP
The last string found within a <die> tag, or an empty string.
.PP
-Definition at line 121 of file inspircd_io.h.
+Definition at line 122 of file inspircd_io.h.
.SS "char \fBServerConfig::DisabledCommands\fP[MAXBUF]"
.PP
This variable contains a space-seperated list of commands which are disabled by the administrator of the server for non-opers.
.PP
-Definition at line 131 of file inspircd_io.h.
+Definition at line 132 of file inspircd_io.h.
.SS "int \fBServerConfig::dns_timeout\fP"
.PP
The number of seconds the \fBDNS\fP subsystem will wait before timing out any request.
.PP
-Definition at line 176 of file inspircd_io.h.
+Definition at line 177 of file inspircd_io.h.
+.PP
+Referenced by AddClient().
.SS "char \fBServerConfig::DNSServer\fP[MAXBUF]"
.PP
The \fBDNS\fP server to use for \fBDNS\fP queries.
.PP
-Definition at line 125 of file inspircd_io.h.
+Definition at line 126 of file inspircd_io.h.
.SS "std::vector<\fBstd::string\fP> \fBServerConfig::include_stack\fP\fC [private]\fP"
.PP
This variable holds the names of all files included from the main one.
.PP
This is used to make sure that no files are recursively included.
.PP
-Definition at line 47 of file inspircd_io.h.
+Definition at line 48 of file inspircd_io.h.
+.SS "std::map<int,\fBModule\fP*> \fBServerConfig::IOHookModule\fP"
+.PP
+A list of ports claimed by IO Modules.
+.PP
+Definition at line 256 of file inspircd_io.h.
.SS "FILE* \fBServerConfig::log_file\fP"
.PP
The file handle of the logfile.
.PP
If this value is NULL, the log file is not open, probably due to a permissions error on startup (this should not happen in normal operation!).
.PP
-Definition at line 151 of file inspircd_io.h.
+Definition at line 152 of file inspircd_io.h.
.SS "int \fBServerConfig::LogLevel\fP"
.PP
The loglevel in use by the IRC server.
.PP
-Definition at line 206 of file inspircd_io.h.
+Definition at line 207 of file inspircd_io.h.
.SS "int \fBServerConfig::MaxConn\fP"
.PP
The value to be used for listen() backlogs as default.
.PP
-Definition at line 187 of file inspircd_io.h.
+Definition at line 188 of file inspircd_io.h.
.SS "int \fBServerConfig::MaxWhoResults\fP"
.PP
The maximum number of /WHO results allowed in any single /WHO command.
.PP
-Definition at line 198 of file inspircd_io.h.
+Definition at line 199 of file inspircd_io.h.
.SS "char \fBServerConfig::ModPath\fP[1024]"
.PP
The full path to the modules directory.
.PP
This is either set at compile time, or overridden in the configuration file via the <options> tag.
.PP
-Definition at line 138 of file inspircd_io.h.
+Definition at line 139 of file inspircd_io.h.
.SS "std::vector<\fBstd::string\fP> \fBServerConfig::module_names\fP"
.PP
A list of module names (names only, no paths) which are currently loaded by the server.
.PP
-Definition at line 247 of file inspircd_io.h.
+Definition at line 248 of file inspircd_io.h.
.PP
Referenced by Server::FindModule().
.SS "\fBfile_cache\fP \fBServerConfig::MOTD\fP"
.PP
The MOTD file, cached in a file_cache type.
.PP
-Definition at line 220 of file inspircd_io.h.
+Definition at line 221 of file inspircd_io.h.
.SS "char \fBServerConfig::motd\fP[MAXBUF]"
.PP
The pathname and filename of the message of the day file, as defined by the administrator.
.PP
-Definition at line 107 of file inspircd_io.h.
+Definition at line 108 of file inspircd_io.h.
.SS "char \fBServerConfig::MyExecutable\fP[1024]"
.PP
The full pathname to the executable, as given in argv[0] when the program starts.
.PP
-Definition at line 143 of file inspircd_io.h.
+Definition at line 144 of file inspircd_io.h.
.SS "int \fBServerConfig::NetBufferSize\fP"
.PP
The size of the read() buffer in the user handling code, used to read data into a user's recvQ.
.PP
-Definition at line 182 of file inspircd_io.h.
+Definition at line 183 of file inspircd_io.h.
.SS "char \fBServerConfig::Network\fP[MAXBUF]"
.PP
-Definition at line 74 of file inspircd_io.h.
+Definition at line 75 of file inspircd_io.h.
.PP
-Referenced by Server::GetNetworkName().
+Referenced by FullConnectUser(), and Server::GetNetworkName().
.SS "bool \fBServerConfig::nofork\fP"
.PP
If this value is true, the owner of the server specified -nofork on the command line, causing the daemon to stay in the foreground.
.PP
-Definition at line 158 of file inspircd_io.h.
+Definition at line 159 of file inspircd_io.h.
.SS "char \fBServerConfig::PID\fP[1024]"
.PP
The full pathname and filename of the PID file as defined in the configuration.
.PP
-Definition at line 229 of file inspircd_io.h.
+Definition at line 230 of file inspircd_io.h.
.SS "int \fBServerConfig::ports\fP[255]"
.PP
A list of ports which the server is listening on.
.PP
-Definition at line 251 of file inspircd_io.h.
+Definition at line 252 of file inspircd_io.h.
.SS "char \fBServerConfig::PrefixQuit\fP[MAXBUF]"
.PP
The quit prefix in use, or an empty string.
.PP
-Definition at line 116 of file inspircd_io.h.
+Definition at line 117 of file inspircd_io.h.
.SS "char \fBServerConfig::restartpass\fP[MAXBUF]"
.PP
The admin-configured /RESTART password.
.PP
-Definition at line 102 of file inspircd_io.h.
+Definition at line 103 of file inspircd_io.h.
.SS "\fBfile_cache\fP \fBServerConfig::RULES\fP"
.PP
The RULES file, cached in a file_cache type.
.PP
-Definition at line 224 of file inspircd_io.h.
+Definition at line 225 of file inspircd_io.h.
.SS "char \fBServerConfig::rules\fP[MAXBUF]"
.PP
The pathname and filename of the rules file, as defined by the administrator.
.PP
-Definition at line 112 of file inspircd_io.h.
+Definition at line 113 of file inspircd_io.h.
.SS "char \fBServerConfig::ServerDesc\fP[MAXBUF]"
.PP
Holds the description of the local server as defined by the administrator.
.PP
-Definition at line 79 of file inspircd_io.h.
+Definition at line 80 of file inspircd_io.h.
.PP
Referenced by Server::GetServerDescription().
.SS "char \fBServerConfig::ServerName\fP[MAXBUF]"
.PP
Holds the server name of the local server as defined by the administrator.
.PP
-Definition at line 68 of file inspircd_io.h.
+Definition at line 69 of file inspircd_io.h.
.PP
-Referenced by Server::GetServerName(), and userrec::userrec().
+Referenced by AddClient(), FullConnectUser(), Server::GetServerName(), and userrec::userrec().
.SS "unsigned int \fBServerConfig::SoftLimit\fP"
.PP
The soft limit value assigned to the irc server.
.PP
The IRC server will not allow more than this number of local users.
.PP
-Definition at line 193 of file inspircd_io.h.
+Definition at line 194 of file inspircd_io.h.
+.PP
+Referenced by AddClient().
.SS "bool \fBServerConfig::unlimitcore\fP"
.PP
If this value is true, the owner of the server has chosen to unlimit the coredump size to as large a value as his account settings will allow.
.PP
This is often used when debugging.
.PP
-Definition at line 166 of file inspircd_io.h.
+Definition at line 167 of file inspircd_io.h.
.SH "Author"
.PP
diff --git a/docs/man/man3/SocketEngine.3 b/docs/man/man3/SocketEngine.3
index e61149335..46b4f51ff 100644
--- a/docs/man/man3/SocketEngine.3
+++ b/docs/man/man3/SocketEngine.3
@@ -1,4 +1,4 @@
-.TH "SocketEngine" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "SocketEngine" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -121,7 +121,7 @@ Definition at line 65 of file socketengine.cpp.
.PP
References DEBUG, EngineHandle, fds, log(), ref, and X_READBIT.
.PP
-Referenced by InspSocket::InspSocket(), and InspSocket::Poll().
+Referenced by AddClient(), InspSocket::InspSocket(), and InspSocket::Poll().
.PP
.nf
66 {
@@ -170,7 +170,7 @@ Definition at line 103 of file socketengine.cpp.
.PP
References DEBUG, EngineHandle, fds, log(), ref, and X_READBIT.
.PP
-Referenced by InspSocket::Poll(), and Server::UserToPseudo().
+Referenced by kill_link(), kill_link_silent(), InspSocket::Poll(), and Server::UserToPseudo().
.PP
.nf
104 {
diff --git a/docs/man/man3/Version.3 b/docs/man/man3/Version.3
index 003e3723c..a20d493b0 100644
--- a/docs/man/man3/Version.3
+++ b/docs/man/man3/Version.3
@@ -1,4 +1,4 @@
-.TH "Version" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "Version" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -44,34 +44,34 @@ Holds a module's Version information The four members (set by the constructor on
A class of type Version is returned by the GetVersion method of the \fBModule\fP class.
.PP
-Definition at line 113 of file modules.h.
+Definition at line 131 of file modules.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "Version::Version (int major, int minor, int revision, int build, int flags)"
.PP
-Definition at line 159 of file modules.cpp.
+Definition at line 158 of file modules.cpp.
.PP
.nf
-159 : Major(major), Minor(minor), Revision(revision), Build(build), Flags(flags) { };
+158 : Major(major), Minor(minor), Revision(revision), Build(build), Flags(flags) { };
.fi
.PP
.SH "Member Data Documentation"
.PP
.SS "const int \fBVersion::Build\fP"
.PP
-Definition at line 116 of file modules.h.
+Definition at line 134 of file modules.h.
.SS "const int \fBVersion::Flags\fP"
.PP
-Definition at line 116 of file modules.h.
+Definition at line 134 of file modules.h.
.SS "const int \fBVersion::Major\fP"
.PP
-Definition at line 116 of file modules.h.
+Definition at line 134 of file modules.h.
.SS "const int \fBVersion::Minor\fP"
.PP
-Definition at line 116 of file modules.h.
+Definition at line 134 of file modules.h.
.SS "const int \fBVersion::Revision\fP"
.PP
-Definition at line 116 of file modules.h.
+Definition at line 134 of file modules.h.
.SH "Author"
.PP
diff --git a/docs/man/man3/WhoWasUser.3 b/docs/man/man3/WhoWasUser.3
index 094ed41ae..fb447c6eb 100644
--- a/docs/man/man3/WhoWasUser.3
+++ b/docs/man/man3/WhoWasUser.3
@@ -1,4 +1,4 @@
-.TH "WhoWasUser" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "WhoWasUser" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -39,30 +39,44 @@ WhoWasUser \- A lightweight userrec used by WHOWAS.
.PP
A lightweight userrec used by WHOWAS.
.PP
-Definition at line 332 of file users.h.
+Definition at line 336 of file users.h.
.SH "Member Data Documentation"
.PP
.SS "char \fBWhoWasUser::dhost\fP[160]"
.PP
-Definition at line 337 of file users.h.
+Definition at line 341 of file users.h.
+.PP
+Referenced by AddWhoWas().
.SS "char \fBWhoWasUser::fullname\fP[MAXGECOS+1]"
.PP
-Definition at line 339 of file users.h.
+Definition at line 343 of file users.h.
+.PP
+Referenced by AddWhoWas().
.SS "char \fBWhoWasUser::host\fP[160]"
.PP
-Definition at line 338 of file users.h.
+Definition at line 342 of file users.h.
+.PP
+Referenced by AddWhoWas().
.SS "char \fBWhoWasUser::ident\fP[IDENTMAX+1]"
.PP
-Definition at line 336 of file users.h.
+Definition at line 340 of file users.h.
+.PP
+Referenced by AddWhoWas().
.SS "char \fBWhoWasUser::nick\fP[NICKMAX]"
.PP
-Definition at line 335 of file users.h.
+Definition at line 339 of file users.h.
+.PP
+Referenced by AddWhoWas().
.SS "char \fBWhoWasUser::server\fP[256]"
.PP
-Definition at line 340 of file users.h.
+Definition at line 344 of file users.h.
+.PP
+Referenced by AddWhoWas().
.SS "time_t \fBWhoWasUser::signon\fP"
.PP
-Definition at line 341 of file users.h.
+Definition at line 345 of file users.h.
+.PP
+Referenced by AddWhoWas().
.SH "Author"
.PP
diff --git a/docs/man/man3/XLine.3 b/docs/man/man3/XLine.3
index 216576090..9141d13fd 100644
--- a/docs/man/man3/XLine.3
+++ b/docs/man/man3/XLine.3
@@ -1,4 +1,4 @@
-.TH "XLine" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "XLine" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/ZLine.3 b/docs/man/man3/ZLine.3
index 06d8663f6..a8435b5d7 100644
--- a/docs/man/man3/ZLine.3
+++ b/docs/man/man3/ZLine.3
@@ -1,4 +1,4 @@
-.TH "ZLine" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "ZLine" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/_home_.3 b/docs/man/man3/_home_.3
index 49efbaddf..4fc80ad81 100644
--- a/docs/man/man3/_home_.3
+++ b/docs/man/man3/_home_.3
@@ -1,4 +1,4 @@
-.TH "/home/ Directory Reference" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "/home/ Directory Reference" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/_home_brain_.3 b/docs/man/man3/_home_brain_.3
index babca30f7..29118884a 100644
--- a/docs/man/man3/_home_brain_.3
+++ b/docs/man/man3/_home_brain_.3
@@ -1,4 +1,4 @@
-.TH "/home/brain/ Directory Reference" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "/home/brain/ Directory Reference" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/_home_brain_inspircd-cvs_.3 b/docs/man/man3/_home_brain_inspircd-cvs_.3
index 1479abc84..1ee75654f 100644
--- a/docs/man/man3/_home_brain_inspircd-cvs_.3
+++ b/docs/man/man3/_home_brain_inspircd-cvs_.3
@@ -1,4 +1,4 @@
-.TH "/home/brain/inspircd-cvs/ Directory Reference" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "/home/brain/inspircd-cvs/ Directory Reference" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/_home_brain_inspircd-cvs_inspircd_.3 b/docs/man/man3/_home_brain_inspircd-cvs_inspircd_.3
index 0284e0651..43c5f6676 100644
--- a/docs/man/man3/_home_brain_inspircd-cvs_inspircd_.3
+++ b/docs/man/man3/_home_brain_inspircd-cvs_inspircd_.3
@@ -1,4 +1,4 @@
-.TH "/home/brain/inspircd-cvs/inspircd/ Directory Reference" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "/home/brain/inspircd-cvs/inspircd/ Directory Reference" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/_home_brain_inspircd-cvs_inspircd_include_.3 b/docs/man/man3/_home_brain_inspircd-cvs_inspircd_include_.3
index e10e04e57..b9dcc0d80 100644
--- a/docs/man/man3/_home_brain_inspircd-cvs_inspircd_include_.3
+++ b/docs/man/man3/_home_brain_inspircd-cvs_inspircd_include_.3
@@ -1,4 +1,4 @@
-.TH "/home/brain/inspircd-cvs/inspircd/include/ Directory Reference" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "/home/brain/inspircd-cvs/inspircd/include/ Directory Reference" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -7,6 +7,9 @@
.in +1c
.ti -1c
+.RI "file \fBaes.h\fP"
+.br
+.ti -1c
.RI "file \fBbase.h\fP"
.br
.ti -1c
diff --git a/docs/man/man3/_home_brain_inspircd-cvs_inspircd_src_.3 b/docs/man/man3/_home_brain_inspircd-cvs_inspircd_src_.3
index 9071df9e9..d3d18d775 100644
--- a/docs/man/man3/_home_brain_inspircd-cvs_inspircd_src_.3
+++ b/docs/man/man3/_home_brain_inspircd-cvs_inspircd_src_.3
@@ -1,4 +1,4 @@
-.TH "/home/brain/inspircd-cvs/inspircd/src/ Directory Reference" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "/home/brain/inspircd-cvs/inspircd/src/ Directory Reference" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/aes.h.3 b/docs/man/man3/aes.h.3
new file mode 100644
index 000000000..9d0352f33
--- /dev/null
+++ b/docs/man/man3/aes.h.3
@@ -0,0 +1,60 @@
+.TH "aes.h" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.ad l
+.nh
+.SH NAME
+aes.h \-
+.SH SYNOPSIS
+.br
+.PP
+\fC#include <cstring>\fP
+.br
+
+.SS "Classes"
+
+.in +1c
+.ti -1c
+.RI "class \fBAES\fP"
+.br
+.RI "\fIThe AES class is a utility class for use in modules and the core for encryption of data. \fP"
+.in -1c
+.SS "Functions"
+
+.in +1c
+.ti -1c
+.RI "void \fBto64frombits\fP (unsigned char *out, const unsigned char *in, int inlen)"
+.br
+.RI "\fIConvert from binary to base64. \fP"
+.ti -1c
+.RI "int \fBfrom64tobits\fP (char *out, const char *in, int maxlen)"
+.br
+.RI "\fIConvert from base64 to binary Output Input Size of output buffer. \fP"
+.in -1c
+.SH "Function Documentation"
+.PP
+.SS "int from64tobits (char * out, const char * in, int maxlen)"
+.PP
+Convert from base64 to binary Output Input Size of output buffer.
+.PP
+\fBReturns:\fP
+.RS 4
+Number of bytes actually converted
+.RE
+.PP
+
+.SS "void to64frombits (unsigned char * out, const unsigned char * in, int inlen)"
+.PP
+Convert from binary to base64.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIout\fP Output
+.br
+\fIin\fP Input
+.br
+\fIinlen\fP Number of bytes in input buffer
+.RE
+.PP
+
+.SH "Author"
+.PP
+Generated automatically by Doxygen for InspIRCd from the source code.
diff --git a/docs/man/man3/base.h.3 b/docs/man/man3/base.h.3
index 31b4deb84..e8445793c 100644
--- a/docs/man/man3/base.h.3
+++ b/docs/man/man3/base.h.3
@@ -1,4 +1,4 @@
-.TH "base.h" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "base.h" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/channels.cpp.3 b/docs/man/man3/channels.cpp.3
index 443276105..d9d19e355 100644
--- a/docs/man/man3/channels.cpp.3
+++ b/docs/man/man3/channels.cpp.3
@@ -1,4 +1,4 @@
-.TH "channels.cpp" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "channels.cpp" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -12,8 +12,6 @@ channels.cpp \-
.br
\fC#include 'inspircd_io.h'\fP
.br
-\fC#include 'inspircd_util.h'\fP
-.br
\fC#include <unistd.h>\fP
.br
\fC#include <sys/errno.h>\fP
@@ -128,107 +126,108 @@ channels.cpp \-
.PP
.SS "#define nspace std"
.PP
-Definition at line 55 of file channels.cpp.
+Definition at line 54 of file channels.cpp.
.SH "Function Documentation"
.PP
.SS "\fBchanrec\fP* add_channel (\fBuserrec\fP * user, const char * cn, const char * key, bool override)"
.PP
-Definition at line 195 of file channels.cpp.
+Definition at line 194 of file channels.cpp.
.PP
References chanrec::bans, chanrec::binarymodes, chanlist, userrec::chans, CM_INVITEONLY, CM_NOEXTERNAL, CM_TOPICLOCK, DEBUG, DEFAULT, connection::fd, FindChan(), ForceChan(), FOREACH_RESULT, userrec::GetFullHost(), has_channel(), userrec::IsInvited(), chanrec::key, chanrec::limit, log(), userrec::modes, chanrec::name, userrec::nick, userrec::RemoveInvite(), TIME, and WriteServ().
.PP
Referenced by Server::JoinUserToChannel().
.PP
.nf
-196 {
-197 if ((!user) || (!cn))
-198 {
-199 log(DEFAULT,'*** BUG *** add_channel was given an invalid parameter');
-200 return 0;
-201 }
-202
-203 int created = 0;
-204 char cname[MAXBUF];
-205 int MOD_RESULT = 0;
-206 strncpy(cname,cn,CHANMAX);
-207
-208 log(DEBUG,'add_channel: %s %s',user->nick,cname);
-209
-210 chanrec* Ptr = FindChan(cname);
-211
-212 if (!Ptr)
-213 {
-214 if (user->fd > -1)
-215 {
-216 MOD_RESULT = 0;
-217 FOREACH_RESULT(OnUserPreJoin(user,NULL,cname));
-218 if (MOD_RESULT == 1)
-219 return NULL;
-220 }
-221 /* create a new one */
-222 chanlist[cname] = new chanrec();
-223 strlcpy(chanlist[cname]->name, cname,CHANMAX);
-224 chanlist[cname]->binarymodes = CM_TOPICLOCK | CM_NOEXTERNAL;
-225 chanlist[cname]->created = TIME;
-226 strcpy(chanlist[cname]->topic, '');
-227 strncpy(chanlist[cname]->setby, user->nick,NICKMAX);
-228 chanlist[cname]->topicset = 0;
-229 Ptr = chanlist[cname];
-230 log(DEBUG,'add_channel: created: %s',cname);
-231 /* set created to 2 to indicate user
-232 * is the first in the channel
-233 * and should be given ops */
-234 created = 2;
-235 }
-236 else
-237 {
-238 /* Already on the channel */
-239 if (has_channel(user,Ptr))
-240 return NULL;
-241
-242 // remote users are allowed us to bypass channel modes
-243 // and bans (used by servers)
-244 if (user->fd > -1)
-245 {
-246 MOD_RESULT = 0;
-247 FOREACH_RESULT(OnUserPreJoin(user,Ptr,cname));
-248 if (MOD_RESULT == 1)
-249 {
-250 return NULL;
-251 }
-252 else
-253 {
-254 if (*Ptr->key)
-255 {
-256 MOD_RESULT = 0;
-257 FOREACH_RESULT(OnCheckKey(user, Ptr, key ? key : ''));
-258 if (!MOD_RESULT)
-259 {
-260 if (!key)
-261 {
-262 log(DEBUG,'add_channel: no key given in JOIN');
-263 WriteServ(user->fd,'475 %s %s :Cannot join channel (Requires key)',user->nick, Ptr->name);
-264 return NULL;
-265 }
-266 else
-267 {
-268 if (strcasecmp(key,Ptr->key))
-269 {
-270 log(DEBUG,'add_channel: bad key given in JOIN');
-271 WriteServ(user->fd,'475 %s %s :Cannot join channel (Incorrect key)',user->nick, Ptr->name);
-272 return NULL;
-273 }
-274 }
-275 }
-276 }
-277 if (Ptr->binarymodes & CM_INVITEONLY)
-278 {
-279 MOD_RESULT = 0;
+195 {
+196 if ((!user) || (!cn))
+197 {
+198 log(DEFAULT,'*** BUG *** add_channel was given an invalid parameter');
+199 return 0;
+200 }
+201
+202 int created = 0;
+203 char cname[MAXBUF];
+204 int MOD_RESULT = 0;
+205 strncpy(cname,cn,CHANMAX);
+206
+207 log(DEBUG,'add_channel: %s %s',user->nick,cname);
+208
+209 chanrec* Ptr = FindChan(cname);
+210
+211 if (!Ptr)
+212 {
+213 if (user->fd > -1)
+214 {
+215 MOD_RESULT = 0;
+216 FOREACH_RESULT(OnUserPreJoin(user,NULL,cname));
+217 if (MOD_RESULT == 1)
+218 return NULL;
+219 }
+220 /* create a new one */
+221 chanlist[cname] = new chanrec();
+222 strlcpy(chanlist[cname]->name, cname,CHANMAX);
+223 chanlist[cname]->binarymodes = CM_TOPICLOCK | CM_NOEXTERNAL;
+224 chanlist[cname]->created = TIME;
+225 strcpy(chanlist[cname]->topic, '');
+226 strncpy(chanlist[cname]->setby, user->nick,NICKMAX);
+227 chanlist[cname]->topicset = 0;
+228 Ptr = chanlist[cname];
+229 log(DEBUG,'add_channel: created: %s',cname);
+230 /* set created to 2 to indicate user
+231 * is the first in the channel
+232 * and should be given ops */
+233 created = 2;
+234 }
+235 else
+236 {
+237 /* Already on the channel */
+238 if (has_channel(user,Ptr))
+239 return NULL;
+240
+241 // remote users are allowed us to bypass channel modes
+242 // and bans (used by servers)
+243 if (user->fd > -1)
+244 {
+245 MOD_RESULT = 0;
+246 FOREACH_RESULT(OnUserPreJoin(user,Ptr,cname));
+247 if (MOD_RESULT == 1)
+248 {
+249 return NULL;
+250 }
+251 else
+252 {
+253 if (*Ptr->key)
+254 {
+255 MOD_RESULT = 0;
+256 FOREACH_RESULT(OnCheckKey(user, Ptr, key ? key : ''));
+257 if (!MOD_RESULT)
+258 {
+259 if (!key)
+260 {
+261 log(DEBUG,'add_channel: no key given in JOIN');
+262 WriteServ(user->fd,'475 %s %s :Cannot join channel (Requires key)',user->nick, Ptr->name);
+263 return NULL;
+264 }
+265 else
+266 {
+267 if (strcasecmp(key,Ptr->key))
+268 {
+269 log(DEBUG,'add_channel: bad key given in JOIN');
+270 WriteServ(user->fd,'475 %s %s :Cannot join channel (Incorrect key)',user->nick, Ptr->name);
+271 return NULL;
+272 }
+273 }
+274 }
+275 }
+276 if (Ptr->binarymodes & CM_INVITEONLY)
+277 {
+278 MOD_RESULT = 0;
+279 irc::string xname(Ptr->name);
280 FOREACH_RESULT(OnCheckInvite(user, Ptr));
281 if (!MOD_RESULT)
282 {
283 log(DEBUG,'add_channel: channel is +i');
-284 if (user->IsInvited(Ptr->name))
+284 if (user->IsInvited(xname))
285 {
286 /* user was invited to channel */
287 /* there may be an optional channel NOTICE here */
@@ -239,7 +238,7 @@ Referenced by Server::JoinUserToChannel().
292 return NULL;
293 }
294 }
-295 user->RemoveInvite(Ptr->name);
+295 user->RemoveInvite(xname);
296 }
297 if (Ptr->limit)
298 {
@@ -520,14 +519,14 @@ Referenced by add_channel(), del_channel(), and kick_channel().
.PP
.SS "std::vector<\fBModeParameter\fP> \fBcustom_mode_params\fP"
.PP
-Definition at line 70 of file channels.cpp.
+Definition at line 69 of file channels.cpp.
.PP
Referenced by chanrec::GetModeParameter(), and chanrec::SetCustomModeParam().
.SS "std::vector<\fBircd_module\fP*> factory"
.PP
.SS "int \fBMODCOUNT\fP = -1"
.PP
-Definition at line 935 of file modules.cpp.
+Definition at line 934 of file modules.cpp.
.PP
Referenced by Server::FindModule().
.SS "std::vector<\fBModule\fP*> modules"
@@ -535,11 +534,13 @@ Referenced by Server::FindModule().
Referenced by Server::FindModule().
.SS "time_t \fBTIME\fP"
.PP
-Referenced by add_channel(), and userrec::userrec().
+Referenced by add_channel(), AddClient(), AddWhoWas(), FullConnectUser(), and userrec::userrec().
.SS "int \fBWHOWAS_MAX\fP"
.PP
+Referenced by AddWhoWas().
.SS "int \fBWHOWAS_STALE\fP"
.PP
+Referenced by AddWhoWas().
.SH "Author"
.PP
Generated automatically by Doxygen for InspIRCd from the source code.
diff --git a/docs/man/man3/channels.h.3 b/docs/man/man3/channels.h.3
index f8f81e705..1686d1a89 100644
--- a/docs/man/man3/channels.h.3
+++ b/docs/man/man3/channels.h.3
@@ -1,4 +1,4 @@
-.TH "channels.h" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "channels.h" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -179,102 +179,103 @@ Definition at line 97 of file channels.h.
.PP
.SS "\fBchanrec\fP* add_channel (\fBuserrec\fP * user, const char * cn, const char * key, bool override)"
.PP
-Definition at line 195 of file channels.cpp.
+Definition at line 194 of file channels.cpp.
.PP
References chanrec::bans, chanrec::binarymodes, chanlist, userrec::chans, CM_INVITEONLY, CM_NOEXTERNAL, CM_TOPICLOCK, DEBUG, DEFAULT, connection::fd, FindChan(), ForceChan(), FOREACH_RESULT, userrec::GetFullHost(), has_channel(), userrec::IsInvited(), chanrec::key, chanrec::limit, log(), userrec::modes, chanrec::name, userrec::nick, userrec::RemoveInvite(), TIME, and WriteServ().
.PP
Referenced by Server::JoinUserToChannel().
.PP
.nf
-196 {
-197 if ((!user) || (!cn))
-198 {
-199 log(DEFAULT,'*** BUG *** add_channel was given an invalid parameter');
-200 return 0;
-201 }
-202
-203 int created = 0;
-204 char cname[MAXBUF];
-205 int MOD_RESULT = 0;
-206 strncpy(cname,cn,CHANMAX);
-207
-208 log(DEBUG,'add_channel: %s %s',user->nick,cname);
-209
-210 chanrec* Ptr = FindChan(cname);
-211
-212 if (!Ptr)
-213 {
-214 if (user->fd > -1)
-215 {
-216 MOD_RESULT = 0;
-217 FOREACH_RESULT(OnUserPreJoin(user,NULL,cname));
-218 if (MOD_RESULT == 1)
-219 return NULL;
-220 }
-221 /* create a new one */
-222 chanlist[cname] = new chanrec();
-223 strlcpy(chanlist[cname]->name, cname,CHANMAX);
-224 chanlist[cname]->binarymodes = CM_TOPICLOCK | CM_NOEXTERNAL;
-225 chanlist[cname]->created = TIME;
-226 strcpy(chanlist[cname]->topic, '');
-227 strncpy(chanlist[cname]->setby, user->nick,NICKMAX);
-228 chanlist[cname]->topicset = 0;
-229 Ptr = chanlist[cname];
-230 log(DEBUG,'add_channel: created: %s',cname);
-231 /* set created to 2 to indicate user
-232 * is the first in the channel
-233 * and should be given ops */
-234 created = 2;
-235 }
-236 else
-237 {
-238 /* Already on the channel */
-239 if (has_channel(user,Ptr))
-240 return NULL;
-241
-242 // remote users are allowed us to bypass channel modes
-243 // and bans (used by servers)
-244 if (user->fd > -1)
-245 {
-246 MOD_RESULT = 0;
-247 FOREACH_RESULT(OnUserPreJoin(user,Ptr,cname));
-248 if (MOD_RESULT == 1)
-249 {
-250 return NULL;
-251 }
-252 else
-253 {
-254 if (*Ptr->key)
-255 {
-256 MOD_RESULT = 0;
-257 FOREACH_RESULT(OnCheckKey(user, Ptr, key ? key : ''));
-258 if (!MOD_RESULT)
-259 {
-260 if (!key)
-261 {
-262 log(DEBUG,'add_channel: no key given in JOIN');
-263 WriteServ(user->fd,'475 %s %s :Cannot join channel (Requires key)',user->nick, Ptr->name);
-264 return NULL;
-265 }
-266 else
-267 {
-268 if (strcasecmp(key,Ptr->key))
-269 {
-270 log(DEBUG,'add_channel: bad key given in JOIN');
-271 WriteServ(user->fd,'475 %s %s :Cannot join channel (Incorrect key)',user->nick, Ptr->name);
-272 return NULL;
-273 }
-274 }
-275 }
-276 }
-277 if (Ptr->binarymodes & CM_INVITEONLY)
-278 {
-279 MOD_RESULT = 0;
+195 {
+196 if ((!user) || (!cn))
+197 {
+198 log(DEFAULT,'*** BUG *** add_channel was given an invalid parameter');
+199 return 0;
+200 }
+201
+202 int created = 0;
+203 char cname[MAXBUF];
+204 int MOD_RESULT = 0;
+205 strncpy(cname,cn,CHANMAX);
+206
+207 log(DEBUG,'add_channel: %s %s',user->nick,cname);
+208
+209 chanrec* Ptr = FindChan(cname);
+210
+211 if (!Ptr)
+212 {
+213 if (user->fd > -1)
+214 {
+215 MOD_RESULT = 0;
+216 FOREACH_RESULT(OnUserPreJoin(user,NULL,cname));
+217 if (MOD_RESULT == 1)
+218 return NULL;
+219 }
+220 /* create a new one */
+221 chanlist[cname] = new chanrec();
+222 strlcpy(chanlist[cname]->name, cname,CHANMAX);
+223 chanlist[cname]->binarymodes = CM_TOPICLOCK | CM_NOEXTERNAL;
+224 chanlist[cname]->created = TIME;
+225 strcpy(chanlist[cname]->topic, '');
+226 strncpy(chanlist[cname]->setby, user->nick,NICKMAX);
+227 chanlist[cname]->topicset = 0;
+228 Ptr = chanlist[cname];
+229 log(DEBUG,'add_channel: created: %s',cname);
+230 /* set created to 2 to indicate user
+231 * is the first in the channel
+232 * and should be given ops */
+233 created = 2;
+234 }
+235 else
+236 {
+237 /* Already on the channel */
+238 if (has_channel(user,Ptr))
+239 return NULL;
+240
+241 // remote users are allowed us to bypass channel modes
+242 // and bans (used by servers)
+243 if (user->fd > -1)
+244 {
+245 MOD_RESULT = 0;
+246 FOREACH_RESULT(OnUserPreJoin(user,Ptr,cname));
+247 if (MOD_RESULT == 1)
+248 {
+249 return NULL;
+250 }
+251 else
+252 {
+253 if (*Ptr->key)
+254 {
+255 MOD_RESULT = 0;
+256 FOREACH_RESULT(OnCheckKey(user, Ptr, key ? key : ''));
+257 if (!MOD_RESULT)
+258 {
+259 if (!key)
+260 {
+261 log(DEBUG,'add_channel: no key given in JOIN');
+262 WriteServ(user->fd,'475 %s %s :Cannot join channel (Requires key)',user->nick, Ptr->name);
+263 return NULL;
+264 }
+265 else
+266 {
+267 if (strcasecmp(key,Ptr->key))
+268 {
+269 log(DEBUG,'add_channel: bad key given in JOIN');
+270 WriteServ(user->fd,'475 %s %s :Cannot join channel (Incorrect key)',user->nick, Ptr->name);
+271 return NULL;
+272 }
+273 }
+274 }
+275 }
+276 if (Ptr->binarymodes & CM_INVITEONLY)
+277 {
+278 MOD_RESULT = 0;
+279 irc::string xname(Ptr->name);
280 FOREACH_RESULT(OnCheckInvite(user, Ptr));
281 if (!MOD_RESULT)
282 {
283 log(DEBUG,'add_channel: channel is +i');
-284 if (user->IsInvited(Ptr->name))
+284 if (user->IsInvited(xname))
285 {
286 /* user was invited to channel */
287 /* there may be an optional channel NOTICE here */
@@ -285,7 +286,7 @@ Referenced by Server::JoinUserToChannel().
292 return NULL;
293 }
294 }
-295 user->RemoveInvite(Ptr->name);
+295 user->RemoveInvite(xname);
296 }
297 if (Ptr->limit)
298 {
diff --git a/docs/man/man3/chanrec.3 b/docs/man/man3/chanrec.3
index fbd6260ec..83c154d23 100644
--- a/docs/man/man3/chanrec.3
+++ b/docs/man/man3/chanrec.3
@@ -1,4 +1,4 @@
-.TH "chanrec" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "chanrec" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -116,21 +116,21 @@ Definition at line 103 of file channels.h.
.PP
Creates a channel record and initialises it with default values.
.PP
-Definition at line 74 of file channels.cpp.
+Definition at line 73 of file channels.cpp.
.PP
References binarymodes, created, custom_modes, internal_userlist, key, limit, name, setby, topic, and topicset.
.PP
.nf
-75 {
-76 strcpy(name,'');
-77 strcpy(custom_modes,'');
-78 strcpy(topic,'');
-79 strcpy(setby,'');
-80 strcpy(key,'');
-81 created = topicset = limit = 0;
-82 binarymodes = 0;
-83 internal_userlist.clear();
-84 }
+74 {
+75 strcpy(name,'');
+76 strcpy(custom_modes,'');
+77 strcpy(topic,'');
+78 strcpy(setby,'');
+79 strcpy(key,'');
+80 created = topicset = limit = 0;
+81 binarymodes = 0;
+82 internal_userlist.clear();
+83 }
.fi
.PP
.SS "virtual chanrec::~chanrec ()\fC [inline, virtual]\fP"
@@ -154,17 +154,17 @@ Add a user pointer to the internal reference list.
.PP
The data inserted into the reference list is a table as it is an arbitary pointer compared to other users by its memory address, as this is a very fast 32 or 64 bit integer comparison.
.PP
-Definition at line 167 of file channels.cpp.
+Definition at line 166 of file channels.cpp.
.PP
References DEBUG, internal_userlist, and log().
.PP
Referenced by ForceChan().
.PP
.nf
-168 {
-169 internal_userlist.push_back(castuser);
-170 log(DEBUG,'Added casted user to channel's internal list');
-171 }
+167 {
+168 internal_userlist.push_back(castuser);
+169 log(DEBUG,'Added casted user to channel's internal list');
+170 }
.fi
.PP
.SS "void chanrec::DelUser (char * castuser)"
@@ -178,25 +178,25 @@ Delete a user pointer to the internal reference list.
.PP
The data removed from the reference list is a table as it is an arbitary pointer compared to other users by its memory address, as this is a very fast 32 or 64 bit integer comparison.
.PP
-Definition at line 173 of file channels.cpp.
+Definition at line 172 of file channels.cpp.
.PP
References DEBUG, internal_userlist, log(), and name.
.PP
Referenced by del_channel(), and kick_channel().
.PP
.nf
-174 {
-175 for (std::vector<char*>::iterator a = internal_userlist.begin(); a < internal_userlist.end(); a++)
-176 {
-177 if (*a == castuser)
-178 {
-179 log(DEBUG,'Removed casted user from channel's internal list');
-180 internal_userlist.erase(a);
-181 return;
-182 }
-183 }
-184 log(DEBUG,'BUG BUG BUG! Attempt to remove an uncasted user from the internal list of %s!',name);
-185 }
+173 {
+174 for (std::vector<char*>::iterator a = internal_userlist.begin(); a < internal_userlist.end(); a++)
+175 {
+176 if (*a == castuser)
+177 {
+178 log(DEBUG,'Removed casted user from channel's internal list');
+179 internal_userlist.erase(a);
+180 return;
+181 }
+182 }
+183 log(DEBUG,'BUG BUG BUG! Attempt to remove an uncasted user from the internal list of %s!',name);
+184 }
.fi
.PP
.SS "\fBstd::string\fP chanrec::GetModeParameter (char mode)"
@@ -217,24 +217,24 @@ The parameter for this mode is returned, or an empty string
.PP
.PP
-Definition at line 147 of file channels.cpp.
+Definition at line 146 of file channels.cpp.
.PP
References custom_mode_params.
.PP
.nf
-148 {
-149 if (custom_mode_params.size())
-150 {
-151 for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++)
-152 {
-153 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
-154 {
-155 return i->parameter;
-156 }
-157 }
-158 }
-159 return '';
-160 }
+147 {
+148 if (custom_mode_params.size())
+149 {
+150 for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++)
+151 {
+152 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
+153 {
+154 return i->parameter;
+155 }
+156 }
+157 }
+158 return '';
+159 }
.fi
.PP
.SS "long chanrec::GetUserCounter ()"
@@ -248,12 +248,12 @@ The number of users on this channel
.PP
.PP
-Definition at line 162 of file channels.cpp.
+Definition at line 161 of file channels.cpp.
.PP
.nf
-163 {
-164 return (this->internal_userlist.size());
-165 }
+162 {
+163 return (this->internal_userlist.size());
+164 }
.fi
.PP
.SS "std::vector< char * > * chanrec::GetUsers ()"
@@ -269,16 +269,16 @@ This function returns a vector of userrec pointers, each of which has been caste
.PP
.PP
-Definition at line 187 of file channels.cpp.
+Definition at line 186 of file channels.cpp.
.PP
References internal_userlist.
.PP
Referenced by Server::GetUsers().
.PP
.nf
-188 {
-189 return &internal_userlist;
-190 }
+187 {
+188 return &internal_userlist;
+189 }
.fi
.PP
.SS "bool chanrec::IsCustomModeSet (char mode)"
@@ -297,12 +297,12 @@ True if the custom mode is set, false if otherwise
.PP
.PP
-Definition at line 142 of file channels.cpp.
+Definition at line 141 of file channels.cpp.
.PP
.nf
-143 {
-144 return (strchr(this->custom_modes,mode));
-145 }
+142 {
+143 return (strchr(this->custom_modes,mode));
+144 }
.fi
.PP
.SS "void chanrec::SetCustomMode (char mode, bool mode_on)"
@@ -318,33 +318,33 @@ Sets or unsets a custom mode in the channels info.
.PP
.PP
-Definition at line 86 of file channels.cpp.
+Definition at line 85 of file channels.cpp.
.PP
References custom_modes, DEBUG, log(), and SetCustomModeParam().
.PP
.nf
-87 {
-88 if (mode_on) {
-89 static char m[3];
-90 m[0] = mode;
-91 m[1] = '\0';
-92 if (!strchr(this->custom_modes,mode))
-93 {
-94 strlcat(custom_modes,m,MAXMODES);
-95 }
-96 log(DEBUG,'Custom mode %c set',mode);
-97 }
-98 else {
-99
-100 std::string a = this->custom_modes;
-101 int pos = a.find(mode);
-102 a.erase(pos,1);
-103 strncpy(this->custom_modes,a.c_str(),MAXMODES);
-104
-105 log(DEBUG,'Custom mode %c removed: modelist='%s'',mode,this->custom_modes);
-106 this->SetCustomModeParam(mode,'',false);
-107 }
-108 }
+86 {
+87 if (mode_on) {
+88 static char m[3];
+89 m[0] = mode;
+90 m[1] = '\0';
+91 if (!strchr(this->custom_modes,mode))
+92 {
+93 strlcat(custom_modes,m,MAXMODES);
+94 }
+95 log(DEBUG,'Custom mode %c set',mode);
+96 }
+97 else {
+98
+99 std::string a = this->custom_modes;
+100 int pos = a.find(mode);
+101 a.erase(pos,1);
+102 strncpy(this->custom_modes,a.c_str(),MAXMODES);
+103
+104 log(DEBUG,'Custom mode %c removed: modelist='%s'',mode,this->custom_modes);
+105 this->SetCustomModeParam(mode,'',false);
+106 }
+107 }
.fi
.PP
.SS "void chanrec::SetCustomModeParam (char mode, char * parameter, bool mode_on)"
@@ -362,42 +362,42 @@ Sets or unsets the parameters for a custom mode in a channels info.
.PP
.PP
-Definition at line 111 of file channels.cpp.
+Definition at line 110 of file channels.cpp.
.PP
References ModeParameter::channel, custom_mode_params, DEBUG, log(), ModeParameter::mode, and ModeParameter::parameter.
.PP
Referenced by SetCustomMode().
.PP
.nf
-112 {
-113
-114 log(DEBUG,'SetCustomModeParam called');
-115 ModeParameter M;
-116 M.mode = mode;
-117 strlcpy(M.channel,this->name,CHANMAX);
-118 strlcpy(M.parameter,parameter,MAXBUF);
-119 if (mode_on)
-120 {
-121 log(DEBUG,'Custom mode parameter %c %s added',mode,parameter);
-122 custom_mode_params.push_back(M);
-123 }
-124 else
-125 {
-126 if (custom_mode_params.size())
-127 {
-128 for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++)
-129 {
-130 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
-131 {
-132 log(DEBUG,'Custom mode parameter %c %s removed',mode,parameter);
-133 custom_mode_params.erase(i);
-134 return;
-135 }
-136 }
-137 }
-138 log(DEBUG,'*** BUG *** Attempt to remove non-existent mode parameter!');
-139 }
-140 }
+111 {
+112
+113 log(DEBUG,'SetCustomModeParam called');
+114 ModeParameter M;
+115 M.mode = mode;
+116 strlcpy(M.channel,this->name,CHANMAX);
+117 strlcpy(M.parameter,parameter,MAXBUF);
+118 if (mode_on)
+119 {
+120 log(DEBUG,'Custom mode parameter %c %s added',mode,parameter);
+121 custom_mode_params.push_back(M);
+122 }
+123 else
+124 {
+125 if (custom_mode_params.size())
+126 {
+127 for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++)
+128 {
+129 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
+130 {
+131 log(DEBUG,'Custom mode parameter %c %s removed',mode,parameter);
+132 custom_mode_params.erase(i);
+133 return;
+134 }
+135 }
+136 }
+137 log(DEBUG,'*** BUG *** Attempt to remove non-existent mode parameter!');
+138 }
+139 }
.fi
.PP
.SH "Member Data Documentation"
diff --git a/docs/man/man3/classbase.3 b/docs/man/man3/classbase.3
index de085033f..53f4bb176 100644
--- a/docs/man/man3/classbase.3
+++ b/docs/man/man3/classbase.3
@@ -1,4 +1,4 @@
-.TH "classbase" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "classbase" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/command_t.3 b/docs/man/man3/command_t.3
index 1e49a2996..0e69a9a09 100644
--- a/docs/man/man3/command_t.3
+++ b/docs/man/man3/command_t.3
@@ -1,4 +1,4 @@
-.TH "command_t" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "command_t" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -10,19 +10,28 @@ command_t \- A structure that defines a command.
.PP
\fC#include <ctables.h>\fP
.PP
-Inherits \fBExtensible\fP.
+Inherited by \fBcmd_mode\fP.
.PP
-.SS "Public Attributes"
+.SS "Public Member Functions"
.in +1c
.ti -1c
-.RI "char \fBcommand\fP [MAXBUF]"
+.RI "\fBcommand_t\fP (\fBstd::string\fP cmd, char flags, int minpara)"
.br
-.RI "\fICommand name. \fP"
.ti -1c
-.RI "\fBhandlerfunc\fP * \fBhandler_function\fP"
+.RI "virtual void \fBHandle\fP (char **parameters, int pcnt, \fBuserrec\fP *user)=0"
+.br
+.ti -1c
+.RI "virtual \fB~command_t\fP ()"
+.br
+.in -1c
+.SS "Public Attributes"
+
+.in +1c
+.ti -1c
+.RI "\fBstd::string\fP \fBcommand\fP"
.br
-.RI "\fIHandler function as in typedef. \fP"
+.RI "\fICommand name. \fP"
.ti -1c
.RI "char \fBflags_needed\fP"
.br
@@ -40,7 +49,7 @@ Inherits \fBExtensible\fP.
.br
.RI "\fIused by /stats m \fP"
.ti -1c
-.RI "char \fBsource\fP [MAXBUF]"
+.RI "\fBstd::string\fP \fBsource\fP"
.br
.RI "\fIused for resource tracking between modules \fP"
.in -1c
@@ -48,44 +57,74 @@ Inherits \fBExtensible\fP.
.PP
A structure that defines a command.
.PP
-Definition at line 26 of file ctables.h.
+Definition at line 29 of file ctables.h.
+.SH "Constructor & Destructor Documentation"
+.PP
+.SS "command_t::command_t (\fBstd::string\fP cmd, char flags, int minpara)\fC [inline]\fP"
+.PP
+Definition at line 51 of file ctables.h.
+.PP
+References source, total_bytes, and use_count.
+.PP
+.nf
+51 : command(cmd), flags_needed(flags), min_params(minpara)
+52 {
+53 use_count = total_bytes = 0;
+54 source = '<core>';
+55 }
+.fi
+.PP
+.SS "virtual command_t::~command_t ()\fC [inline, virtual]\fP"
+.PP
+Definition at line 59 of file ctables.h.
+.PP
+.nf
+59 {}
+.fi
+.PP
+.SH "Member Function Documentation"
+.PP
+.SS "virtual void command_t::Handle (char ** parameters, int pcnt, \fBuserrec\fP * user)\fC [pure virtual]\fP"
+.PP
+Implemented in \fBcmd_mode\fP.
.SH "Member Data Documentation"
.PP
-.SS "char \fBcommand_t::command\fP[MAXBUF]"
+.SS "\fBstd::string\fP \fBcommand_t::command\fP"
.PP
Command name.
.PP
-Definition at line 31 of file ctables.h.
+Definition at line 34 of file ctables.h.
.SS "char \fBcommand_t::flags_needed\fP"
.PP
User flags needed to execute the command or 0.
.PP
Definition at line 37 of file ctables.h.
-.SS "\fBhandlerfunc\fP* \fBcommand_t::handler_function\fP"
-.PP
-Handler function as in typedef.
-.PP
-Definition at line 34 of file ctables.h.
.SS "int \fBcommand_t::min_params\fP"
.PP
Minimum number of parameters command takes.
.PP
Definition at line 40 of file ctables.h.
-.SS "char \fBcommand_t::source\fP[MAXBUF]"
+.SS "\fBstd::string\fP \fBcommand_t::source\fP"
.PP
used for resource tracking between modules
.PP
Definition at line 49 of file ctables.h.
+.PP
+Referenced by command_t().
.SS "long \fBcommand_t::total_bytes\fP"
.PP
used by /stats m
.PP
Definition at line 46 of file ctables.h.
+.PP
+Referenced by command_t().
.SS "long \fBcommand_t::use_count\fP"
.PP
used by /stats m
.PP
Definition at line 43 of file ctables.h.
+.PP
+Referenced by command_t().
.SH "Author"
.PP
diff --git a/docs/man/man3/commands.h.3 b/docs/man/man3/commands.h.3
index 4d4920f53..de75f72c1 100644
--- a/docs/man/man3/commands.h.3
+++ b/docs/man/man3/commands.h.3
@@ -1,4 +1,4 @@
-.TH "commands.h" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "commands.h" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -22,294 +22,159 @@ commands.h \-
.br
\fC#include 'channels.h'\fP
.br
-
-.SS "Functions"
-
-.in +1c
-.ti -1c
-.RI "void \fBhandle_join\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_admin.h'\fP
.br
-.RI "\fIThese are the handlers for user commands. \fP"
-.ti -1c
-.RI "void \fBhandle_part\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_away.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_kick\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_commands.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_die\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_connect.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_restart\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_die.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_kill\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_eline.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_summon\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_gline.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_users\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_info.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_pass\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_invite.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_invite\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_ison.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_topic\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_join.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_names\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_kick.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_privmsg\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_kill.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_notice\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_kline.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_info\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_links.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_time\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_list.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_whois\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_loadmodule.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_quit\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_lusers.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_who\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_map.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_wallops\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_modules.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_list\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_motd.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_rehash\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_names.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_lusers\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_nick.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_admin\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_notice.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_ping\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_oper.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_pong\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_part.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_motd\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_pass.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_rules\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_ping.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_user\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_pong.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_userhost\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_privmsg.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_ison\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_qline.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_away\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_quit.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_whowas\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_rehash.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_trace\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_restart.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_modules\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_rules.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_stats\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_server.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_connect\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_squit.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_squit\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_stats.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_links\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_summon.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_map\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_time.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_oper\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_topic.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_nick\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_trace.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_kline\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_unloadmodule.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_gline\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_user.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_zline\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_userhost.h'\fP
.br
-.ti -1c
-.RI "void \fBhandle_qline\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+\fC#include 'cmd_users.h'\fP
+.br
+\fC#include 'cmd_version.h'\fP
+.br
+\fC#include 'cmd_wallops.h'\fP
+.br
+\fC#include 'cmd_who.h'\fP
+.br
+\fC#include 'cmd_whois.h'\fP
.br
+\fC#include 'cmd_whowas.h'\fP
+.br
+\fC#include 'cmd_zline.h'\fP
+.br
+
+.SS "Functions"
+
+.in +1c
.ti -1c
-.RI "void \fBhandle_eline\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+.RI "char * \fBCleanFilename\fP (char *name)"
.br
.ti -1c
-.RI "void \fBhandle_server\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+.RI "bool \fBis_uline\fP (const char *server)"
.br
.ti -1c
-.RI "void \fBhandle_loadmodule\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+.RI "long \fBduration\fP (const char *str)"
.br
.ti -1c
-.RI "void \fBhandle_unloadmodule\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+.RI "void \fBdo_whois\fP (\fBuserrec\fP *user, \fBuserrec\fP *dest, unsigned long signon, unsigned long idle, char *nick)"
.br
.ti -1c
-.RI "void \fBhandle_commands\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+.RI "bool \fBhost_matches_everyone\fP (\fBstd::string\fP mask, \fBuserrec\fP *user)"
.br
.ti -1c
-.RI "bool \fBis_uline\fP (const char *server)"
+.RI "bool \fBip_matches_everyone\fP (\fBstd::string\fP ip, \fBuserrec\fP *user)"
.br
-.RI "\fIFunctions for u:lined servers. \fP"
.ti -1c
-.RI "long \fBduration\fP (const char *str)"
+.RI "bool \fBnick_matches_everyone\fP (\fBstd::string\fP nick, \fBuserrec\fP *user)"
.br
-.RI "\fIOther useful functions. \fP"
.ti -1c
-.RI "void \fBdo_whois\fP (\fBuserrec\fP *user, \fBuserrec\fP *dest, unsigned long signon, unsigned long idle, char *nick)"
+.RI "int \fBoperstrcmp\fP (char *data, char *input)"
.br
.in -1c
.SH "Function Documentation"
.PP
+.SS "char* CleanFilename (char * name)"
+.PP
.SS "void do_whois (\fBuserrec\fP * user, \fBuserrec\fP * dest, unsigned long signon, unsigned long idle, char * nick)"
.PP
.SS "long duration (const char * str)"
.PP
-Other useful functions.
-.PP
Referenced by Server::CalcDuration().
-.SS "void handle_admin (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_away (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_commands (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_connect (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_die (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_eline (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_gline (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_info (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_invite (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_ison (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_join (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-These are the handlers for user commands.
-.PP
-.SS "void handle_kick (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_kill (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_kline (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_links (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_list (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_loadmodule (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_lusers (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_map (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_modules (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_motd (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_names (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_nick (char ** parameters, int pcnt, \fBuserrec\fP * user)"
+.SS "bool host_matches_everyone (\fBstd::string\fP mask, \fBuserrec\fP * user)"
.PP
-.SS "void handle_notice (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_oper (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_part (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_pass (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_ping (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_pong (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_privmsg (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_qline (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_quit (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_rehash (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_restart (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_rules (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_server (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_squit (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_stats (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_summon (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_time (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_topic (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_trace (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_unloadmodule (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_user (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_userhost (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_users (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_wallops (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_who (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_whois (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_whowas (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void handle_zline (char ** parameters, int pcnt, \fBuserrec\fP * user)"
+.SS "bool ip_matches_everyone (\fBstd::string\fP ip, \fBuserrec\fP * user)"
.PP
.SS "bool is_uline (const char * server)"
.PP
-Functions for u:lined servers.
-.PP
Referenced by userrec::HasPermission(), Server::IsUlined(), and kick_channel().
+.SS "bool nick_matches_everyone (\fBstd::string\fP nick, \fBuserrec\fP * user)"
+.PP
+.SS "int operstrcmp (char * data, char * input)"
+.PP
.SH "Author"
.PP
Generated automatically by Doxygen for InspIRCd from the source code.
diff --git a/docs/man/man3/connection.3 b/docs/man/man3/connection.3
index 841c792f1..a133ab846 100644
--- a/docs/man/man3/connection.3
+++ b/docs/man/man3/connection.3
@@ -1,4 +1,4 @@
-.TH "connection" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "connection" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -139,14 +139,14 @@ File descriptor of the connection.
.PP
Definition at line 42 of file connection.h.
.PP
-Referenced by add_channel(), connection(), ConfigReader::DumpErrors(), kick_channel(), Server::PseudoToUser(), Server::SendTo(), userrec::userrec(), and Server::UserToPseudo().
+Referenced by add_channel(), connection(), ConfigReader::DumpErrors(), FullConnectUser(), kick_channel(), kill_link(), kill_link_silent(), Server::PseudoToUser(), Server::SendTo(), userrec::userrec(), and Server::UserToPseudo().
.SS "bool \fBconnection::haspassed\fP"
.PP
True if server/user has authenticated, false if otherwise.
.PP
Definition at line 70 of file connection.h.
.PP
-Referenced by userrec::userrec().
+Referenced by FullConnectUser(), and userrec::userrec().
.SS "char \fBconnection::host\fP[160]"
.PP
Hostname of connection.
@@ -155,21 +155,21 @@ Not used if this is a serverrec
.PP
Definition at line 46 of file connection.h.
.PP
-Referenced by userrec::GetFullRealHost(), Server::PseudoToUser(), userrec::userrec(), and Server::UserToPseudo().
+Referenced by AddWhoWas(), FullConnectUser(), userrec::GetFullRealHost(), kill_link(), kill_link_silent(), Server::PseudoToUser(), userrec::userrec(), and Server::UserToPseudo().
.SS "time_t \fBconnection::idle_lastmsg\fP"
.PP
Time that the connection last sent data, used to calculate idle time.
.PP
Definition at line 92 of file connection.h.
.PP
-Referenced by userrec::userrec().
+Referenced by FullConnectUser(), and userrec::userrec().
.SS "char \fBconnection::ip\fP[16]"
.PP
IP of connection.
.PP
Definition at line 50 of file connection.h.
.PP
-Referenced by userrec::userrec().
+Referenced by FullConnectUser(), and userrec::userrec().
.SS "time_t \fBconnection::lastping\fP"
.PP
Time the connection was last pinged.
@@ -192,21 +192,21 @@ For a serverrec this is the current listening port of the serverrec object.
.PP
Definition at line 76 of file connection.h.
.PP
-Referenced by userrec::userrec().
+Referenced by FullConnectUser(), kill_link(), kill_link_silent(), and userrec::userrec().
.SS "char \fBconnection::registered\fP"
.PP
Used by userrec to indicate the registration status of the connection.
.PP
Definition at line 80 of file connection.h.
.PP
-Referenced by userrec::userrec().
+Referenced by ConnectUser(), force_nickchange(), FullConnectUser(), kill_link(), kill_link_silent(), and userrec::userrec().
.SS "time_t \fBconnection::signon\fP"
.PP
Time the connection was created, set in the constructor.
.PP
Definition at line 88 of file connection.h.
.PP
-Referenced by userrec::userrec().
+Referenced by AddWhoWas(), and userrec::userrec().
.SH "Author"
.PP
diff --git a/docs/man/man3/connection.h.3 b/docs/man/man3/connection.h.3
index 7e78e8aab..cbbe6fa27 100644
--- a/docs/man/man3/connection.h.3
+++ b/docs/man/man3/connection.h.3
@@ -1,4 +1,4 @@
-.TH "connection.h" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "connection.h" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/ctables.h.3 b/docs/man/man3/ctables.h.3
index 72fbad97b..740c740c0 100644
--- a/docs/man/man3/ctables.h.3
+++ b/docs/man/man3/ctables.h.3
@@ -1,4 +1,4 @@
-.TH "ctables.h" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "ctables.h" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -8,9 +8,7 @@ ctables.h \-
.PP
\fC#include 'inspircd_config.h'\fP
.br
-\fC#include 'inspircd.h'\fP
-.br
-\fC#include 'base.h'\fP
+\fC#include <deque>\fP
.br
.SS "Classes"
@@ -21,6 +19,18 @@ ctables.h \-
.br
.RI "\fIA structure that defines a command. \fP"
.in -1c
+.SS "Typedefs"
+
+.in +1c
+.ti -1c
+.RI "typedef std::deque< \fBcommand_t\fP * > \fBcommand_table\fP"
+.br
+.in -1c
+.SH "Typedef Documentation"
+.PP
+.SS "typedef std::deque<\fBcommand_t\fP*> \fBcommand_table\fP"
+.PP
+Definition at line 62 of file ctables.h.
.SH "Author"
.PP
Generated automatically by Doxygen for InspIRCd from the source code.
diff --git a/docs/man/man3/cull_list.h.3 b/docs/man/man3/cull_list.h.3
index b6ded78a3..78b9f49a9 100644
--- a/docs/man/man3/cull_list.h.3
+++ b/docs/man/man3/cull_list.h.3
@@ -1,4 +1,4 @@
-.TH "cull_list.h" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "cull_list.h" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/dns.h.3 b/docs/man/man3/dns.h.3
index 03f36a822..df94d7ad2 100644
--- a/docs/man/man3/dns.h.3
+++ b/docs/man/man3/dns.h.3
@@ -1,4 +1,4 @@
-.TH "dns.h" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "dns.h" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -26,6 +26,21 @@ dns.h \-
.br
.RI "\fIThe DNS class allows fast nonblocking resolution of hostnames and ip addresses. \fP"
.in -1c
+.SS "Functions"
+
+.in +1c
+.ti -1c
+.RI "void * \fBdns_task\fP (void *arg)"
+.br
+.RI "\fIThis is the handler function for multi-threaded \fBDNS\fP. \fP"
+.in -1c
+.SH "Function Documentation"
+.PP
+.SS "void* dns_task (void * arg)"
+.PP
+This is the handler function for multi-threaded \fBDNS\fP.
+.PP
+It cannot be a class member as pthread will not let us create a thread whos handler function is a member of a class (ugh).
.SH "Author"
.PP
Generated automatically by Doxygen for InspIRCd from the source code.
diff --git a/docs/man/man3/dns_ip4list.3 b/docs/man/man3/dns_ip4list.3
index 9a31009aa..ddd834dd4 100644
--- a/docs/man/man3/dns_ip4list.3
+++ b/docs/man/man3/dns_ip4list.3
@@ -1,4 +1,4 @@
-.TH "dns_ip4list" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "dns_ip4list" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/globals.h.3 b/docs/man/man3/globals.h.3
index f60a9448d..6625e0c1a 100644
--- a/docs/man/man3/globals.h.3
+++ b/docs/man/man3/globals.h.3
@@ -1,4 +1,4 @@
-.TH "globals.h" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "globals.h" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -136,7 +136,7 @@ Referenced by add_channel(), del_channel(), and Server::FindChannel().
Referenced by Server::IsNick().
.SS "void log (int level, char * text, ...)"
.PP
-Referenced by add_channel(), Server::AddExtendedMode(), SocketEngine::AddFd(), chanrec::AddUser(), del_channel(), SocketEngine::DelFd(), chanrec::DelUser(), ForceChan(), InspSocket::InspSocket(), kick_channel(), Server::Log(), InspSocket::Read(), userrec::RemoveInvite(), chanrec::SetCustomMode(), chanrec::SetCustomModeParam(), InspSocket::SetState(), userrec::SetWriteError(), SocketEngine::SocketEngine(), and SocketEngine::~SocketEngine().
+Referenced by add_channel(), AddClient(), Server::AddExtendedMode(), SocketEngine::AddFd(), AddOper(), chanrec::AddUser(), AddWhoWas(), del_channel(), DeleteOper(), SocketEngine::DelFd(), chanrec::DelUser(), ForceChan(), FullConnectUser(), InspSocket::InspSocket(), kick_channel(), kill_link(), kill_link_silent(), Server::Log(), InspSocket::Read(), ReHashNick(), userrec::RemoveInvite(), chanrec::SetCustomMode(), chanrec::SetCustomModeParam(), InspSocket::SetState(), userrec::SetWriteError(), SocketEngine::SocketEngine(), and SocketEngine::~SocketEngine().
.SS "int ModeDefiend (char c, int i)"
.PP
.SS "void readfile (\fBfile_cache\fP & F, const char * fname)"
@@ -144,7 +144,7 @@ Referenced by add_channel(), Server::AddExtendedMode(), SocketEngine::AddFd(), c
Referenced by FileReader::FileReader(), and FileReader::LoadFile().
.SS "void Write (int sock, char * text, ...)"
.PP
-Referenced by Server::PseudoToUser(), Server::Send(), Server::SendTo(), and Server::UserToPseudo().
+Referenced by kill_link(), kill_link_silent(), Server::PseudoToUser(), Server::Send(), Server::SendTo(), and Server::UserToPseudo().
.SS "void WriteChannel (\fBchanrec\fP * Ptr, \fBuserrec\fP * user, char * text, ...)"
.PP
Referenced by del_channel(), ForceChan(), kick_channel(), and Server::SendChannel().
@@ -153,16 +153,16 @@ Referenced by del_channel(), ForceChan(), kick_channel(), and Server::SendChanne
Referenced by Server::SendCommon().
.SS "void WriteCommonExcept (\fBuserrec\fP * u, char * text, ...)"
.PP
-Referenced by Server::SendCommon().
+Referenced by kill_link(), kill_link_silent(), and Server::SendCommon().
.SS "void WriteFrom (int sock, \fBuserrec\fP * user, char * text, ...)"
.PP
Referenced by Server::PseudoToUser(), and Server::SendFrom().
.SS "void WriteOpers (char * text, ...)"
.PP
-Referenced by userrec::AddBuffer(), userrec::AddWriteBuf(), ConfigReader::DumpErrors(), Server::RehashServer(), and Server::SendOpers().
+Referenced by userrec::AddBuffer(), userrec::AddWriteBuf(), ConfigReader::DumpErrors(), FullConnectUser(), kill_link(), Server::RehashServer(), and Server::SendOpers().
.SS "void WriteServ (int sock, char * text, ...)"
.PP
-Referenced by add_channel(), ConfigReader::DumpErrors(), ForceChan(), kick_channel(), Server::PseudoToUser(), and Server::SendServ().
+Referenced by add_channel(), ConfigReader::DumpErrors(), ForceChan(), FullConnectUser(), kick_channel(), Server::PseudoToUser(), and Server::SendServ().
.SS "void WriteTo (\fBuserrec\fP * source, \fBuserrec\fP * dest, char * data, ...)"
.PP
Referenced by Server::SendTo().
diff --git a/docs/man/man3/hashcomp.h.3 b/docs/man/man3/hashcomp.h.3
index 21ba40560..cd2cfe35e 100644
--- a/docs/man/man3/hashcomp.h.3
+++ b/docs/man/man3/hashcomp.h.3
@@ -1,4 +1,4 @@
-.TH "hashcomp.h" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "hashcomp.h" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/inspircd.h.3 b/docs/man/man3/inspircd.h.3
index 32e2fdb01..545c22f41 100644
--- a/docs/man/man3/inspircd.h.3
+++ b/docs/man/man3/inspircd.h.3
@@ -1,4 +1,4 @@
-.TH "inspircd.h" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "inspircd.h" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -38,14 +38,18 @@ inspircd.h \-
.br
\fC#include 'inspircd_io.h'\fP
.br
-\fC#include 'inspircd_util.h'\fP
-.br
\fC#include 'users.h'\fP
.br
\fC#include 'channels.h'\fP
.br
\fC#include 'socket.h'\fP
.br
+\fC#include 'mode.h'\fP
+.br
+\fC#include 'socketengine.h'\fP
+.br
+\fC#include 'command_parse.h'\fP
+.br
.SS "Classes"
@@ -75,182 +79,43 @@ inspircd.h \-
.ti -1c
.RI "#define \fBMAXCOMMAND\fP 32"
.br
-.ti -1c
-.RI "#define \fBWM_AND\fP 1"
-.br
-.ti -1c
-.RI "#define \fBWM_OR\fP 2"
-.br
-.ti -1c
-.RI "#define \fBTYPE_USER\fP 1"
-.br
-.ti -1c
-.RI "#define \fBTYPE_CHANNEL\fP 2"
-.br
-.ti -1c
-.RI "#define \fBTYPE_SERVER\fP 3"
-.br
-.ti -1c
-.RI "#define \fBIS_LOCAL\fP(x) (x->fd > -1)"
-.br
-.ti -1c
-.RI "#define \fBIS_REMOTE\fP(x) (x->fd < 0)"
-.br
-.ti -1c
-.RI "#define \fBIS_MODULE_CREATED\fP(x) (x->fd == FD_MAGIC_NUMBER)"
-.br
-.in -1c
-.SS "Typedefs"
-
-.in +1c
-.ti -1c
-.RI "typedef void( \fBhandlerfunc\fP )(char **, int, \fBuserrec\fP *)"
-.br
.in -1c
.SS "Functions"
.in +1c
.ti -1c
-.RI "void \fBforce_nickchange\fP (\fBuserrec\fP *user, const char *newnick)"
-.br
-.ti -1c
-.RI "void \fBkill_link\fP (\fBuserrec\fP *user, const char *r)"
-.br
-.ti -1c
-.RI "void \fBkill_link_silent\fP (\fBuserrec\fP *user, const char *r)"
-.br
-.ti -1c
-.RI "void \fBcall_handler\fP (const char *commandname, char **parameters, int pcnt, \fBuserrec\fP *user)"
-.br
-.ti -1c
-.RI "bool \fBis_valid_cmd\fP (const char *commandname, int pcnt, \fBuserrec\fP *user)"
-.br
-.ti -1c
-.RI "int \fBloop_call\fP (\fBhandlerfunc\fP fn, char **parameters, int pcnt, \fBuserrec\fP *u, int start, int end, int joins)"
-.br
-.ti -1c
-.RI "void \fBAddWhoWas\fP (\fBuserrec\fP *u)"
-.br
-.ti -1c
-.RI "void \fBConnectUser\fP (\fBuserrec\fP *user)"
-.br
-.ti -1c
-.RI "\fBuserrec\fP * \fBReHashNick\fP (char *Old, char *New)"
-.br
-.ti -1c
-.RI "void \fBAddOper\fP (\fBuserrec\fP *user)"
-.br
-.ti -1c
-.RI "void \fBDeleteOper\fP (\fBuserrec\fP *user)"
-.br
-.ti -1c
-.RI "void \fBhandle_version\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
-.br
-.ti -1c
.RI "void \fBAddServerName\fP (\fBstd::string\fP servername)"
.br
.ti -1c
.RI "const char * \fBFindServerNamePtr\fP (\fBstd::string\fP servername)"
.br
-.ti -1c
-.RI "void * \fBdns_task\fP (void *arg)"
-.br
-.ti -1c
-.RI "void \fBprocess_buffer\fP (const char *cmdbuf, \fBuserrec\fP *user)"
-.br
-.ti -1c
-.RI "void \fBFullConnectUser\fP (\fBuserrec\fP *user)"
-.br
.in -1c
.SH "Define Documentation"
.PP
.SS "#define ERROR -1"
.PP
-Definition at line 49 of file inspircd.h.
+Definition at line 51 of file inspircd.h.
.PP
Referenced by InspSocket::InspSocket().
.SS "#define FALSE 0"
.PP
-Definition at line 51 of file inspircd.h.
-.SS "#define IS_LOCAL(x) (x->fd > -1)"
-.PP
-Definition at line 66 of file inspircd.h.
-.SS "#define IS_MODULE_CREATED(x) (x->fd == FD_MAGIC_NUMBER)"
-.PP
-Definition at line 68 of file inspircd.h.
-.SS "#define IS_REMOTE(x) (x->fd < 0)"
-.PP
-Definition at line 67 of file inspircd.h.
+Definition at line 53 of file inspircd.h.
.SS "#define MAXCOMMAND 32"
.PP
-Definition at line 53 of file inspircd.h.
+Definition at line 55 of file inspircd.h.
.SS "#define MAXSOCKS 64"
.PP
-Definition at line 52 of file inspircd.h.
+Definition at line 54 of file inspircd.h.
.SS "#define TRUE 1"
.PP
-Definition at line 50 of file inspircd.h.
-.SS "#define TYPE_CHANNEL 2"
-.PP
-Definition at line 63 of file inspircd.h.
-.SS "#define TYPE_SERVER 3"
-.PP
-Definition at line 64 of file inspircd.h.
-.SS "#define TYPE_USER 1"
-.PP
-Definition at line 62 of file inspircd.h.
-.SS "#define WM_AND 1"
-.PP
-Definition at line 57 of file inspircd.h.
-.SS "#define WM_OR 2"
-.PP
-Definition at line 58 of file inspircd.h.
-.SH "Typedef Documentation"
-.PP
-.SS "typedef void( \fBhandlerfunc\fP)(char **, int, \fBuserrec\fP *)"
-.PP
-Definition at line 70 of file inspircd.h.
+Definition at line 52 of file inspircd.h.
.SH "Function Documentation"
.PP
-.SS "void AddOper (\fBuserrec\fP * user)"
-.PP
.SS "void AddServerName (\fBstd::string\fP servername)"
.PP
-.SS "void AddWhoWas (\fBuserrec\fP * u)"
-.PP
-.SS "void call_handler (const char * commandname, char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-Referenced by Server::CallCommandHandler().
-.SS "void ConnectUser (\fBuserrec\fP * user)"
-.PP
-.SS "void DeleteOper (\fBuserrec\fP * user)"
-.PP
-.SS "void* dns_task (void * arg)"
-.PP
.SS "const char* FindServerNamePtr (\fBstd::string\fP servername)"
.PP
-Referenced by userrec::userrec().
-.SS "void force_nickchange (\fBuserrec\fP * user, const char * newnick)"
-.PP
-Referenced by Server::ChangeUserNick().
-.SS "void FullConnectUser (\fBuserrec\fP * user)"
-.PP
-.SS "void handle_version (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "bool is_valid_cmd (const char * commandname, int pcnt, \fBuserrec\fP * user)"
-.PP
-Referenced by Server::IsValidModuleCommand().
-.SS "void kill_link (\fBuserrec\fP * user, const char * r)"
-.PP
-Referenced by Server::PseudoToUser(), and Server::QuitUser().
-.SS "void kill_link_silent (\fBuserrec\fP * user, const char * r)"
-.PP
-.SS "int loop_call (\fBhandlerfunc\fP fn, char ** parameters, int pcnt, \fBuserrec\fP * u, int start, int end, int joins)"
-.PP
-.SS "void process_buffer (const char * cmdbuf, \fBuserrec\fP * user)"
-.PP
-.SS "\fBuserrec\fP* ReHashNick (char * Old, char * New)"
-.PP
+Referenced by AddClient(), and userrec::userrec().
.SH "Author"
.PP
Generated automatically by Doxygen for InspIRCd from the source code.
diff --git a/docs/man/man3/inspircd_io.h.3 b/docs/man/man3/inspircd_io.h.3
index 9ed14e7be..006d467e0 100644
--- a/docs/man/man3/inspircd_io.h.3
+++ b/docs/man/man3/inspircd_io.h.3
@@ -1,4 +1,4 @@
-.TH "inspircd_io.h" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "inspircd_io.h" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -16,6 +16,8 @@ inspircd_io.h \-
.br
\fC#include 'globals.h'\fP
.br
+\fC#include 'modules.h'\fP
+.br
.SS "Classes"
@@ -79,23 +81,23 @@ inspircd_io.h \-
.PP
Flags for use with \fBlog()\fP.
.PP
-Definition at line 28 of file inspircd_io.h.
+Definition at line 29 of file inspircd_io.h.
.PP
-Referenced by add_channel(), Server::AddExtendedMode(), SocketEngine::AddFd(), chanrec::AddUser(), del_channel(), SocketEngine::DelFd(), chanrec::DelUser(), ForceChan(), InspSocket::InspSocket(), kick_channel(), InspSocket::Read(), userrec::RemoveInvite(), chanrec::SetCustomMode(), chanrec::SetCustomModeParam(), InspSocket::SetState(), userrec::SetWriteError(), SocketEngine::SocketEngine(), and SocketEngine::~SocketEngine().
+Referenced by add_channel(), AddClient(), Server::AddExtendedMode(), SocketEngine::AddFd(), AddOper(), chanrec::AddUser(), AddWhoWas(), del_channel(), DeleteOper(), SocketEngine::DelFd(), chanrec::DelUser(), ForceChan(), FullConnectUser(), InspSocket::InspSocket(), kick_channel(), kill_link(), kill_link_silent(), InspSocket::Read(), ReHashNick(), userrec::RemoveInvite(), chanrec::SetCustomMode(), chanrec::SetCustomModeParam(), InspSocket::SetState(), userrec::SetWriteError(), SocketEngine::SocketEngine(), and SocketEngine::~SocketEngine().
.SS "#define DEFAULT 30"
.PP
-Definition at line 30 of file inspircd_io.h.
+Definition at line 31 of file inspircd_io.h.
.PP
Referenced by add_channel(), del_channel(), and kick_channel().
.SS "#define NONE 50"
.PP
-Definition at line 32 of file inspircd_io.h.
+Definition at line 33 of file inspircd_io.h.
.SS "#define SPARSE 40"
.PP
-Definition at line 31 of file inspircd_io.h.
+Definition at line 32 of file inspircd_io.h.
.SS "#define VERBOSE 20"
.PP
-Definition at line 29 of file inspircd_io.h.
+Definition at line 30 of file inspircd_io.h.
.SH "Function Documentation"
.PP
.SS "int BindPorts ()"
diff --git a/docs/man/man3/irc.3 b/docs/man/man3/irc.3
index 357498a3b..b7f85d31a 100644
--- a/docs/man/man3/irc.3
+++ b/docs/man/man3/irc.3
@@ -1,4 +1,4 @@
-.TH "irc" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "irc" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/irc_InAddr_HashComp.3 b/docs/man/man3/irc_InAddr_HashComp.3
index 2530f430d..ce9006fe9 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 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "irc::InAddr_HashComp" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/irc_StrHashComp.3 b/docs/man/man3/irc_StrHashComp.3
index c27aab162..765c1fd52 100644
--- a/docs/man/man3/irc_StrHashComp.3
+++ b/docs/man/man3/irc_StrHashComp.3
@@ -1,4 +1,4 @@
-.TH "irc::StrHashComp" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "irc::StrHashComp" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/irc_irc_char_traits.3 b/docs/man/man3/irc_irc_char_traits.3
index 4b94560db..bb9f4f6fd 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 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "irc::irc_char_traits" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/message.h.3 b/docs/man/man3/message.h.3
index ab4a63db8..a6f935c18 100644
--- a/docs/man/man3/message.h.3
+++ b/docs/man/man3/message.h.3
@@ -1,4 +1,4 @@
-.TH "message.h" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "message.h" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/mode.h.3 b/docs/man/man3/mode.h.3
index c00c3947e..e42b845a3 100644
--- a/docs/man/man3/mode.h.3
+++ b/docs/man/man3/mode.h.3
@@ -1,4 +1,4 @@
-.TH "mode.h" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "mode.h" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -22,89 +22,19 @@ mode.h \-
.br
\fC#include 'channels.h'\fP
.br
+\fC#include 'ctables.h'\fP
+.br
-.SS "Functions"
+.SS "Classes"
.in +1c
.ti -1c
-.RI "char * \fBgive_ops\fP (\fBuserrec\fP *user, char *dest, \fBchanrec\fP *chan, int status)"
-.br
-.ti -1c
-.RI "char * \fBgive_hops\fP (\fBuserrec\fP *user, char *dest, \fBchanrec\fP *chan, int status)"
-.br
-.ti -1c
-.RI "char * \fBgive_voice\fP (\fBuserrec\fP *user, char *dest, \fBchanrec\fP *chan, int status)"
-.br
-.ti -1c
-.RI "char * \fBtake_ops\fP (\fBuserrec\fP *user, char *dest, \fBchanrec\fP *chan, int status)"
-.br
-.ti -1c
-.RI "char * \fBtake_hops\fP (\fBuserrec\fP *user, char *dest, \fBchanrec\fP *chan, int status)"
-.br
-.ti -1c
-.RI "char * \fBtake_voice\fP (\fBuserrec\fP *user, char *dest, \fBchanrec\fP *chan, int status)"
+.RI "class \fBModeParser\fP"
.br
.ti -1c
-.RI "char * \fBadd_ban\fP (\fBuserrec\fP *user, char *dest, \fBchanrec\fP *chan, int status)"
-.br
-.ti -1c
-.RI "char * \fBtake_ban\fP (\fBuserrec\fP *user, char *dest, \fBchanrec\fP *chan, int status)"
-.br
-.ti -1c
-.RI "void \fBprocess_modes\fP (char **parameters, \fBuserrec\fP *user, \fBchanrec\fP *chan, int status, int pcnt, bool servermode, bool silent, bool local)"
-.br
-.ti -1c
-.RI "bool \fBallowed_umode\fP (char umode, char *sourcemodes, bool adding)"
-.br
-.ti -1c
-.RI "bool \fBprocess_module_umode\fP (char umode, \fBuserrec\fP *source, void *dest, bool adding)"
-.br
-.ti -1c
-.RI "void \fBhandle_mode\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
-.br
-.ti -1c
-.RI "void \fBserver_mode\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
-.br
-.ti -1c
-.RI "void \fBmerge_mode\fP (char **parameters, int pcnt)"
-.br
-.ti -1c
-.RI "void \fBmerge_mode2\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
+.RI "class \fBcmd_mode\fP"
.br
.in -1c
-.SH "Function Documentation"
-.PP
-.SS "char* add_ban (\fBuserrec\fP * user, char * dest, \fBchanrec\fP * chan, int status)"
-.PP
-.SS "bool allowed_umode (char umode, char * sourcemodes, bool adding)"
-.PP
-.SS "char* give_hops (\fBuserrec\fP * user, char * dest, \fBchanrec\fP * chan, int status)"
-.PP
-.SS "char* give_ops (\fBuserrec\fP * user, char * dest, \fBchanrec\fP * chan, int status)"
-.PP
-.SS "char* give_voice (\fBuserrec\fP * user, char * dest, \fBchanrec\fP * chan, int status)"
-.PP
-.SS "void handle_mode (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void merge_mode (char ** parameters, int pcnt)"
-.PP
-.SS "void merge_mode2 (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-.SS "void process_modes (char ** parameters, \fBuserrec\fP * user, \fBchanrec\fP * chan, int status, int pcnt, bool servermode, bool silent, bool local)"
-.PP
-.SS "bool process_module_umode (char umode, \fBuserrec\fP * source, void * dest, bool adding)"
-.PP
-.SS "void server_mode (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
-Referenced by Server::SendMode().
-.SS "char* take_ban (\fBuserrec\fP * user, char * dest, \fBchanrec\fP * chan, int status)"
-.PP
-.SS "char* take_hops (\fBuserrec\fP * user, char * dest, \fBchanrec\fP * chan, int status)"
-.PP
-.SS "char* take_ops (\fBuserrec\fP * user, char * dest, \fBchanrec\fP * chan, int status)"
-.PP
-.SS "char* take_voice (\fBuserrec\fP * user, char * dest, \fBchanrec\fP * chan, int status)"
-.PP
.SH "Author"
.PP
Generated automatically by Doxygen for InspIRCd from the source code.
diff --git a/docs/man/man3/modules.cpp.3 b/docs/man/man3/modules.cpp.3
index 6a58ebacd..8ec07b6cd 100644
--- a/docs/man/man3/modules.cpp.3
+++ b/docs/man/man3/modules.cpp.3
@@ -1,4 +1,4 @@
-.TH "modules.cpp" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "modules.cpp" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -12,8 +12,6 @@ modules.cpp \-
.br
\fC#include 'inspircd_io.h'\fP
.br
-\fC#include 'inspircd_util.h'\fP
-.br
\fC#include <unistd.h>\fP
.br
\fC#include <sys/errno.h>\fP
@@ -64,6 +62,8 @@ modules.cpp \-
.br
\fC#include 'typedefs.h'\fP
.br
+\fC#include 'command_parse.h'\fP
+.br
.SS "Functions"
@@ -100,9 +100,6 @@ modules.cpp \-
.in +1c
.ti -1c
-.RI "\fBSocketEngine\fP * \fBSE\fP"
-.br
-.ti -1c
.RI "\fBServerConfig\fP * \fBConfig\fP"
.br
.ti -1c
@@ -143,141 +140,141 @@ modules.cpp \-
.PP
.SS "bool DoAddExtendedMode (char modechar, int type, bool requires_oper, int params_on, int params_off)"
.PP
-Definition at line 134 of file modules.cpp.
+Definition at line 133 of file modules.cpp.
.PP
References EMode, and ModeDefined().
.PP
Referenced by Server::AddExtendedListMode(), and Server::AddExtendedMode().
.PP
.nf
-135 {
-136 if (ModeDefined(modechar,type)) {
-137 return false;
-138 }
-139 EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off));
-140 return true;
-141 }
+134 {
+135 if (ModeDefined(modechar,type)) {
+136 return false;
+137 }
+138 EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off));
+139 return true;
+140 }
.fi
.PP
.SS "std::vector<\fBircd_module\fP*> factory (255)"
.PP
.SS "bool ModeDefined (char modechar, int type)"
.PP
-Definition at line 71 of file modules.cpp.
+Definition at line 70 of file modules.cpp.
.PP
References EMode.
.PP
Referenced by DoAddExtendedMode().
.PP
.nf
-72 {
-73 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
-74 {
-75 if ((i->modechar == modechar) && (i->type == type))
-76 {
-77 return true;
-78 }
-79 }
-80 return false;
-81 }
+71 {
+72 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
+73 {
+74 if ((i->modechar == modechar) && (i->type == type))
+75 {
+76 return true;
+77 }
+78 }
+79 return false;
+80 }
.fi
.PP
.SS "int ModeDefinedOff (char modechar, int type)"
.PP
-Definition at line 121 of file modules.cpp.
+Definition at line 120 of file modules.cpp.
.PP
References EMode.
.PP
.nf
-122 {
-123 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
-124 {
-125 if ((i->modechar == modechar) && (i->type == type))
-126 {
-127 return i->params_when_off;
-128 }
-129 }
-130 return 0;
-131 }
+121 {
+122 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
+123 {
+124 if ((i->modechar == modechar) && (i->type == type))
+125 {
+126 return i->params_when_off;
+127 }
+128 }
+129 return 0;
+130 }
.fi
.PP
.SS "int ModeDefinedOn (char modechar, int type)"
.PP
-Definition at line 108 of file modules.cpp.
+Definition at line 107 of file modules.cpp.
.PP
References EMode.
.PP
.nf
-109 {
-110 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
-111 {
-112 if ((i->modechar == modechar) && (i->type == type))
-113 {
-114 return i->params_when_on;
-115 }
-116 }
-117 return 0;
-118 }
+108 {
+109 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
+110 {
+111 if ((i->modechar == modechar) && (i->type == type))
+112 {
+113 return i->params_when_on;
+114 }
+115 }
+116 return 0;
+117 }
.fi
.PP
.SS "bool ModeDefinedOper (char modechar, int type)"
.PP
-Definition at line 95 of file modules.cpp.
+Definition at line 94 of file modules.cpp.
.PP
References EMode.
.PP
.nf
-96 {
-97 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
-98 {
-99 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true))
-100 {
-101 return true;
-102 }
-103 }
-104 return false;
-105 }
+95 {
+96 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
+97 {
+98 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true))
+99 {
+100 return true;
+101 }
+102 }
+103 return false;
+104 }
.fi
.PP
.SS "bool ModeIsListMode (char modechar, int type)"
.PP
-Definition at line 83 of file modules.cpp.
+Definition at line 82 of file modules.cpp.
.PP
References EMode.
.PP
.nf
-84 {
-85 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
-86 {
-87 if ((i->modechar == modechar) && (i->type == type) && (i->list == true))
-88 {
-89 return true;
-90 }
-91 }
-92 return false;
-93 }
+83 {
+84 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
+85 {
+86 if ((i->modechar == modechar) && (i->type == type) && (i->list == true))
+87 {
+88 return true;
+89 }
+90 }
+91 return false;
+92 }
.fi
.PP
.SS "void ModeMakeList (char modechar)"
.PP
-Definition at line 144 of file modules.cpp.
+Definition at line 143 of file modules.cpp.
.PP
References EMode, and MT_CHANNEL.
.PP
Referenced by Server::AddExtendedListMode().
.PP
.nf
-145 {
-146 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
-147 {
-148 if ((i->modechar == modechar) && (i->type == MT_CHANNEL))
-149 {
-150 i->list = true;
-151 return;
-152 }
-153 }
-154 return;
-155 }
+144 {
+145 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
+146 {
+147 if ((i->modechar == modechar) && (i->type == MT_CHANNEL))
+148 {
+149 i->list = true;
+150 return;
+151 }
+152 }
+153 return;
+154 }
.fi
.PP
.SS "std::vector<\fBModule\fP*> modules (255)"
@@ -288,13 +285,14 @@ Referenced by Server::AddExtendedListMode().
.PP
.SS "\fBuser_hash\fP \fBclientlist\fP"
.PP
+Referenced by AddClient(), kill_link(), kill_link_silent(), and ReHashNick().
.SS "\fBcommand_table\fP \fBcmdlist\fP"
.PP
.SS "\fBServerConfig\fP* \fBConfig\fP"
.PP
.SS "\fBExtModeList\fP \fBEMode\fP"
.PP
-Definition at line 68 of file modules.cpp.
+Definition at line 67 of file modules.cpp.
.PP
Referenced by DoAddExtendedMode(), ModeDefined(), ModeDefinedOff(), ModeDefinedOn(), ModeDefinedOper(), ModeIsListMode(), and ModeMakeList().
.SS "std::vector<\fBircd_module\fP*> factory"
@@ -303,14 +301,12 @@ Referenced by DoAddExtendedMode(), ModeDefined(), ModeDefinedOff(), ModeDefinedO
.PP
.SS "int \fBMODCOUNT\fP = -1"
.PP
-Definition at line 935 of file modules.cpp.
+Definition at line 934 of file modules.cpp.
.SS "std::vector<\fBInspSocket\fP*> \fBmodule_sockets\fP"
.PP
Referenced by Server::AddSocket(), and Server::DelSocket().
.SS "std::vector<\fBModule\fP*> modules"
.PP
-.SS "\fBSocketEngine\fP* \fBSE\fP"
-.PP
.SS "\fBInspIRCd\fP* \fBServerInstance\fP"
.PP
.SS "time_t \fBTIME\fP"
diff --git a/docs/man/man3/modules.h.3 b/docs/man/man3/modules.h.3
index 481aeaa57..e326f26c4 100644
--- a/docs/man/man3/modules.h.3
+++ b/docs/man/man3/modules.h.3
@@ -1,4 +1,4 @@
-.TH "modules.h" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "modules.h" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -158,6 +158,30 @@ modules.h \-
.RI "#define \fBFD_MAGIC_NUMBER\fP -42"
.br
.ti -1c
+.RI "#define \fBIS_LOCAL\fP(x) (x->fd > -1)"
+.br
+.ti -1c
+.RI "#define \fBIS_REMOTE\fP(x) (x->fd < 0)"
+.br
+.ti -1c
+.RI "#define \fBIS_MODULE_CREATED\fP(x) (x->fd == FD_MAGIC_NUMBER)"
+.br
+.ti -1c
+.RI "#define \fBWM_AND\fP 1"
+.br
+.ti -1c
+.RI "#define \fBWM_OR\fP 2"
+.br
+.ti -1c
+.RI "#define \fBTYPE_USER\fP 1"
+.br
+.ti -1c
+.RI "#define \fBTYPE_CHANNEL\fP 2"
+.br
+.ti -1c
+.RI "#define \fBTYPE_SERVER\fP 3"
+.br
+.ti -1c
.RI "#define \fBCONF_NOT_A_NUMBER\fP 0x000010"
.br
.ti -1c
@@ -192,12 +216,6 @@ modules.h \-
.in +1c
.ti -1c
-.RI "void \fBcreatecommand\fP (char *cmd, \fBhandlerfunc\fP f, char flags, int minparams, char *source)"
-.br
-.ti -1c
-.RI "void \fBserver_mode\fP (char **parameters, int pcnt, \fBuserrec\fP *user)"
-.br
-.ti -1c
.RI "bool \fBModeDefined\fP (char c, int i)"
.br
.ti -1c
@@ -264,22 +282,22 @@ Definition at line 38 of file modules.h.
Referenced by kick_channel().
.SS "#define CONF_FILE_NOT_FOUND 0x000200"
.PP
-Definition at line 1523 of file modules.h.
+Definition at line 1541 of file modules.h.
.PP
Referenced by ConfigReader::ConfigReader().
.SS "#define CONF_NOT_A_NUMBER 0x000010"
.PP
-Definition at line 1520 of file modules.h.
+Definition at line 1538 of file modules.h.
.PP
Referenced by ConfigReader::ReadInteger().
.SS "#define CONF_NOT_UNSIGNED 0x000080"
.PP
-Definition at line 1521 of file modules.h.
+Definition at line 1539 of file modules.h.
.PP
Referenced by ConfigReader::ReadInteger().
.SS "#define CONF_VALUE_NOT_FOUND 0x000100"
.PP
-Definition at line 1522 of file modules.h.
+Definition at line 1540 of file modules.h.
.PP
Referenced by ConfigReader::ReadFlag(), ConfigReader::ReadInteger(), and ConfigReader::ReadValue().
.SS "#define DEBUG 10"
@@ -292,14 +310,14 @@ Definition at line 23 of file modules.h.
Definition at line 25 of file modules.h.
.SS "#define FD_MAGIC_NUMBER -42"
.PP
-Definition at line 101 of file modules.h.
+Definition at line 102 of file modules.h.
.PP
Referenced by Server::PseudoToUser(), and Server::UserToPseudo().
.SS "#define FOREACH_MOD for (int _i = 0; _i <= \fBMODCOUNT\fP; _i++) modules[_i]->"
.PP
-Definition at line 81 of file modules.h.
+Definition at line 82 of file modules.h.
.PP
-Referenced by del_channel(), ForceChan(), kick_channel(), and Event::Send().
+Referenced by del_channel(), ForceChan(), FullConnectUser(), kick_channel(), kill_link(), kill_link_silent(), and Event::Send().
.SS "#define FOREACH_RESULT(x)"
.PP
\fBValue:\fP
@@ -316,9 +334,18 @@ Referenced by del_channel(), ForceChan(), kick_channel(), and Event::Send().
}
.fi
.PP
-Definition at line 89 of file modules.h.
+Definition at line 90 of file modules.h.
+.PP
+Referenced by add_channel(), force_nickchange(), and kick_channel().
+.SS "#define IS_LOCAL(x) (x->fd > -1)"
+.PP
+Definition at line 106 of file modules.h.
+.SS "#define IS_MODULE_CREATED(x) (x->fd == FD_MAGIC_NUMBER)"
+.PP
+Definition at line 108 of file modules.h.
+.SS "#define IS_REMOTE(x) (x->fd < 0)"
.PP
-Referenced by add_channel(), and kick_channel().
+Definition at line 107 of file modules.h.
.SS "#define MT_CHANNEL 1"
.PP
Used with OnExtendedMode() method of modules.
@@ -342,6 +369,15 @@ Definition at line 27 of file modules.h.
.SS "#define SPARSE 40"
.PP
Definition at line 26 of file modules.h.
+.SS "#define TYPE_CHANNEL 2"
+.PP
+Definition at line 118 of file modules.h.
+.SS "#define TYPE_SERVER 3"
+.PP
+Definition at line 119 of file modules.h.
+.SS "#define TYPE_USER 1"
+.PP
+Definition at line 117 of file modules.h.
.SS "#define VERBOSE 20"
.PP
Definition at line 24 of file modules.h.
@@ -361,150 +397,151 @@ Definition at line 52 of file modules.h.
Definition at line 53 of file modules.h.
.PP
Referenced by Module::GetVersion().
+.SS "#define WM_AND 1"
+.PP
+Definition at line 112 of file modules.h.
+.SS "#define WM_OR 2"
+.PP
+Definition at line 113 of file modules.h.
.SH "Typedef Documentation"
.PP
.SS "typedef std::deque<\fBuserrec\fP*> \fBchanuserlist\fP"
.PP
Holds a list of users in a channel.
.PP
-Definition at line 74 of file modules.h.
+Definition at line 75 of file modules.h.
.SS "typedef std::deque<\fBstd::string\fP> \fBfile_cache\fP"
.PP
Low level definition of a \fBFileReader\fP classes file cache area.
.PP
-Definition at line 65 of file modules.h.
+Definition at line 66 of file modules.h.
.SS "typedef DLLFactory<\fBModuleFactory\fP> \fBircd_module\fP"
.PP
-Definition at line 1689 of file modules.h.
+Definition at line 1707 of file modules.h.
.SS "typedef \fBfile_cache\fP \fBstring_list\fP"
.PP
-Definition at line 70 of file modules.h.
+Definition at line 71 of file modules.h.
.SH "Function Documentation"
.PP
-.SS "void createcommand (char * cmd, \fBhandlerfunc\fP f, char flags, int minparams, char * source)"
-.PP
-Referenced by Server::AddCommand().
.SS "bool ModeDefined (char c, int i)"
.PP
-Definition at line 71 of file modules.cpp.
+Definition at line 70 of file modules.cpp.
.PP
References EMode.
.PP
Referenced by DoAddExtendedMode().
.PP
.nf
-72 {
-73 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
-74 {
-75 if ((i->modechar == modechar) && (i->type == type))
-76 {
-77 return true;
-78 }
-79 }
-80 return false;
-81 }
+71 {
+72 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
+73 {
+74 if ((i->modechar == modechar) && (i->type == type))
+75 {
+76 return true;
+77 }
+78 }
+79 return false;
+80 }
.fi
.PP
.SS "int ModeDefinedOff (char c, int i)"
.PP
-Definition at line 121 of file modules.cpp.
+Definition at line 120 of file modules.cpp.
.PP
References EMode.
.PP
.nf
-122 {
-123 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
-124 {
-125 if ((i->modechar == modechar) && (i->type == type))
-126 {
-127 return i->params_when_off;
-128 }
-129 }
-130 return 0;
-131 }
+121 {
+122 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
+123 {
+124 if ((i->modechar == modechar) && (i->type == type))
+125 {
+126 return i->params_when_off;
+127 }
+128 }
+129 return 0;
+130 }
.fi
.PP
.SS "int ModeDefinedOn (char c, int i)"
.PP
-Definition at line 108 of file modules.cpp.
+Definition at line 107 of file modules.cpp.
.PP
References EMode.
.PP
.nf
-109 {
-110 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
-111 {
-112 if ((i->modechar == modechar) && (i->type == type))
-113 {
-114 return i->params_when_on;
-115 }
-116 }
-117 return 0;
-118 }
+108 {
+109 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
+110 {
+111 if ((i->modechar == modechar) && (i->type == type))
+112 {
+113 return i->params_when_on;
+114 }
+115 }
+116 return 0;
+117 }
.fi
.PP
.SS "bool ModeDefinedOper (char c, int i)"
.PP
-Definition at line 95 of file modules.cpp.
+Definition at line 94 of file modules.cpp.
.PP
References EMode.
.PP
.nf
-96 {
-97 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
-98 {
-99 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true))
-100 {
-101 return true;
-102 }
-103 }
-104 return false;
-105 }
+95 {
+96 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
+97 {
+98 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true))
+99 {
+100 return true;
+101 }
+102 }
+103 return false;
+104 }
.fi
.PP
.SS "bool ModeIsListMode (char modechar, int type)"
.PP
-Definition at line 83 of file modules.cpp.
+Definition at line 82 of file modules.cpp.
.PP
References EMode.
.PP
.nf
-84 {
-85 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
-86 {
-87 if ((i->modechar == modechar) && (i->type == type) && (i->list == true))
-88 {
-89 return true;
-90 }
-91 }
-92 return false;
-93 }
+83 {
+84 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
+85 {
+86 if ((i->modechar == modechar) && (i->type == type) && (i->list == true))
+87 {
+88 return true;
+89 }
+90 }
+91 return false;
+92 }
.fi
.PP
.SS "void ModeMakeList (char modechar)"
.PP
-Definition at line 144 of file modules.cpp.
+Definition at line 143 of file modules.cpp.
.PP
References EMode, and MT_CHANNEL.
.PP
Referenced by Server::AddExtendedListMode().
.PP
.nf
-145 {
-146 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
-147 {
-148 if ((i->modechar == modechar) && (i->type == MT_CHANNEL))
-149 {
-150 i->list = true;
-151 return;
-152 }
-153 }
-154 return;
-155 }
+144 {
+145 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
+146 {
+147 if ((i->modechar == modechar) && (i->type == MT_CHANNEL))
+148 {
+149 i->list = true;
+150 return;
+151 }
+152 }
+153 return;
+154 }
.fi
.PP
-.SS "void server_mode (char ** parameters, int pcnt, \fBuserrec\fP * user)"
-.PP
.SH "Author"
.PP
Generated automatically by Doxygen for InspIRCd from the source code.
diff --git a/docs/man/man3/nspace.3 b/docs/man/man3/nspace.3
index 710faf6e3..6f94db022 100644
--- a/docs/man/man3/nspace.3
+++ b/docs/man/man3/nspace.3
@@ -1,4 +1,4 @@
-.TH "nspace" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "nspace" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/nspace_hash_ in_addr _.3 b/docs/man/man3/nspace_hash_ in_addr _.3
index 1957a8802..71b1b92a8 100644
--- a/docs/man/man3/nspace_hash_ in_addr _.3
+++ b/docs/man/man3/nspace_hash_ in_addr _.3
@@ -1,4 +1,4 @@
-.TH "nspace::hash< in_addr >" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "nspace::hash< in_addr >" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/nspace_hash_ string _.3 b/docs/man/man3/nspace_hash_ string _.3
index aba6882af..ea101e76b 100644
--- a/docs/man/man3/nspace_hash_ string _.3
+++ b/docs/man/man3/nspace_hash_ string _.3
@@ -1,4 +1,4 @@
-.TH "nspace::hash< string >" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "nspace::hash< string >" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/serverstats.3 b/docs/man/man3/serverstats.3
index c3448337f..9a3d5480c 100644
--- a/docs/man/man3/serverstats.3
+++ b/docs/man/man3/serverstats.3
@@ -1,4 +1,4 @@
-.TH "serverstats" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "serverstats" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -48,76 +48,85 @@ serverstats \-
.ti -1c
.RI "int \fBstatsRecv\fP"
.br
+.ti -1c
+.RI "int \fBBoundPortCount\fP"
+.br
.in -1c
.SH "Detailed Description"
.PP
-Definition at line 72 of file inspircd.h.
+Definition at line 74 of file inspircd.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "serverstats::serverstats ()\fC [inline]\fP"
.PP
-Definition at line 86 of file inspircd.h.
+Definition at line 89 of file inspircd.h.
.PP
-References statsAccept, statsCollisions, statsConnects, statsDns, statsDnsBad, statsDnsGood, statsRecv, statsRefused, statsSent, and statsUnknown.
+References BoundPortCount, statsAccept, statsCollisions, statsConnects, statsDns, statsDnsBad, statsDnsGood, statsRecv, statsRefused, statsSent, and statsUnknown.
.PP
.nf
-87 {
-88 statsAccept = statsRefused = statsUnknown = 0;
-89 statsCollisions = statsDns = statsDnsGood = 0;
-90 statsDnsBad = statsConnects = statsSent = statsRecv = 0;
-91 }
+90 {
+91 statsAccept = statsRefused = statsUnknown = 0;
+92 statsCollisions = statsDns = statsDnsGood = 0;
+93 statsDnsBad = statsConnects = statsSent = statsRecv = 0;
+94 BoundPortCount = 0;
+95 }
.fi
.PP
.SH "Member Data Documentation"
.PP
+.SS "int \fBserverstats::BoundPortCount\fP"
+.PP
+Definition at line 87 of file inspircd.h.
+.PP
+Referenced by serverstats().
.SS "int \fBserverstats::statsAccept\fP"
.PP
-Definition at line 75 of file inspircd.h.
+Definition at line 77 of file inspircd.h.
.PP
Referenced by serverstats().
.SS "int \fBserverstats::statsCollisions\fP"
.PP
-Definition at line 78 of file inspircd.h.
+Definition at line 80 of file inspircd.h.
.PP
-Referenced by serverstats().
+Referenced by force_nickchange(), and serverstats().
.SS "int \fBserverstats::statsConnects\fP"
.PP
-Definition at line 82 of file inspircd.h.
+Definition at line 84 of file inspircd.h.
.PP
-Referenced by serverstats().
+Referenced by FullConnectUser(), and serverstats().
.SS "int \fBserverstats::statsDns\fP"
.PP
-Definition at line 79 of file inspircd.h.
+Definition at line 81 of file inspircd.h.
.PP
Referenced by serverstats().
.SS "int \fBserverstats::statsDnsBad\fP"
.PP
-Definition at line 81 of file inspircd.h.
+Definition at line 83 of file inspircd.h.
.PP
Referenced by serverstats().
.SS "int \fBserverstats::statsDnsGood\fP"
.PP
-Definition at line 80 of file inspircd.h.
+Definition at line 82 of file inspircd.h.
.PP
Referenced by serverstats().
.SS "int \fBserverstats::statsRecv\fP"
.PP
-Definition at line 84 of file inspircd.h.
+Definition at line 86 of file inspircd.h.
.PP
Referenced by serverstats().
.SS "int \fBserverstats::statsRefused\fP"
.PP
-Definition at line 76 of file inspircd.h.
+Definition at line 78 of file inspircd.h.
.PP
Referenced by serverstats().
.SS "int \fBserverstats::statsSent\fP"
.PP
-Definition at line 83 of file inspircd.h.
+Definition at line 85 of file inspircd.h.
.PP
Referenced by serverstats().
.SS "int \fBserverstats::statsUnknown\fP"
.PP
-Definition at line 77 of file inspircd.h.
+Definition at line 79 of file inspircd.h.
.PP
Referenced by serverstats().
diff --git a/docs/man/man3/socket.cpp.3 b/docs/man/man3/socket.cpp.3
index 4960cafd7..9a9ca61d2 100644
--- a/docs/man/man3/socket.cpp.3
+++ b/docs/man/man3/socket.cpp.3
@@ -1,4 +1,4 @@
-.TH "socket.cpp" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "socket.cpp" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -38,8 +38,6 @@ socket.cpp \-
.br
\fC#include 'inspircd_io.h'\fP
.br
-\fC#include 'inspircd_util.h'\fP
-.br
\fC#include 'inspstring.h'\fP
.br
\fC#include 'helperfuncs.h'\fP
@@ -51,13 +49,7 @@ socket.cpp \-
.in +1c
.ti -1c
-.RI "\fBSocketEngine\fP * \fBSE\fP"
-.br
-.ti -1c
-.RI "int \fBboundPortCount\fP"
-.br
-.ti -1c
-.RI "int \fBopenSockfd\fP [MAXSOCKS]"
+.RI "\fBInspIRCd\fP * \fBServerInstance\fP"
.br
.ti -1c
.RI "time_t \fBTIME\fP"
@@ -68,15 +60,11 @@ socket.cpp \-
.in -1c
.SH "Variable Documentation"
.PP
-.SS "int \fBboundPortCount\fP"
-.PP
-.SS "int \fBopenSockfd\fP[MAXSOCKS]"
-.PP
-.SS "\fBSocketEngine\fP* \fBSE\fP"
+.SS "\fBInspIRCd\fP* \fBServerInstance\fP"
.PP
.SS "\fBInspSocket\fP* \fBsocket_ref\fP[65535]"
.PP
-Definition at line 46 of file socket.cpp.
+Definition at line 43 of file socket.cpp.
.SS "time_t \fBTIME\fP"
.PP
.SH "Author"
diff --git a/docs/man/man3/socket.h.3 b/docs/man/man3/socket.h.3
index 788e52df6..9e9c0dbf7 100644
--- a/docs/man/man3/socket.h.3
+++ b/docs/man/man3/socket.h.3
@@ -1,4 +1,4 @@
-.TH "socket.h" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "socket.h" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/socketengine.cpp.3 b/docs/man/man3/socketengine.cpp.3
index 9be381503..38cc4d5ea 100644
--- a/docs/man/man3/socketengine.cpp.3
+++ b/docs/man/man3/socketengine.cpp.3
@@ -1,4 +1,4 @@
-.TH "socketengine.cpp" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "socketengine.cpp" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/socketengine.h.3 b/docs/man/man3/socketengine.h.3
index 35bf728c1..835dcc8f3 100644
--- a/docs/man/man3/socketengine.h.3
+++ b/docs/man/man3/socketengine.h.3
@@ -1,4 +1,4 @@
-.TH "socketengine.h" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "socketengine.h" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -67,6 +67,8 @@ Referenced by SocketEngine::GetType().
.SS "const char \fBX_ESTAB_CLIENT\fP = 2"
.PP
Definition at line 43 of file socketengine.h.
+.PP
+Referenced by AddClient().
.SS "const char \fBX_ESTAB_DNS\fP = 4"
.PP
Definition at line 45 of file socketengine.h.
diff --git a/docs/man/man3/std.3 b/docs/man/man3/std.3
index a420bba50..55b862598 100644
--- a/docs/man/man3/std.3
+++ b/docs/man/man3/std.3
@@ -1,4 +1,4 @@
-.TH "std" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "std" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/std_char_traits.3 b/docs/man/man3/std_char_traits.3
index 599987085..42e503317 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 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "std::char_traits" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/docs/man/man3/typedefs.h.3 b/docs/man/man3/typedefs.h.3
index f2a9a31ea..859161214 100644
--- a/docs/man/man3/typedefs.h.3
+++ b/docs/man/man3/typedefs.h.3
@@ -1,4 +1,4 @@
-.TH "typedefs.h" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "typedefs.h" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -45,9 +45,6 @@ typedefs.h \-
.RI "typedef nspace::hash_map< \fBstd::string\fP, \fBWhoWasUser\fP *, nspace::hash< \fBstring\fP >, \fBirc::StrHashComp\fP > \fBwhowas_hash\fP"
.br
.ti -1c
-.RI "typedef std::deque< \fBcommand_t\fP > \fBcommand_table\fP"
-.br
-.ti -1c
.RI "typedef std::vector< \fBstd::string\fP > \fBservernamelist\fP"
.br
.ti -1c
@@ -68,21 +65,18 @@ Definition at line 22 of file typedefs.h.
.SS "typedef nspace::hash_map<\fBstd::string\fP, \fBchanrec\fP*, nspace::hash<\fBstring\fP>, \fBirc::StrHashComp\fP> \fBchan_hash\fP"
.PP
Definition at line 21 of file typedefs.h.
-.SS "typedef std::deque<\fBcommand_t\fP> \fBcommand_table\fP"
-.PP
-Definition at line 24 of file typedefs.h.
.SS "typedef std::vector<\fBExtMode\fP> \fBExtModeList\fP"
.PP
-Definition at line 26 of file typedefs.h.
+Definition at line 25 of file typedefs.h.
.SS "typedef ExtModeList::iterator \fBExtModeListIter\fP"
.PP
-Definition at line 27 of file typedefs.h.
+Definition at line 26 of file typedefs.h.
.SS "typedef std::deque<\fBstd::string\fP> \fBfile_cache\fP"
.PP
-Definition at line 28 of file typedefs.h.
+Definition at line 27 of file typedefs.h.
.SS "typedef std::vector<\fBstd::string\fP> \fBservernamelist\fP"
.PP
-Definition at line 25 of file typedefs.h.
+Definition at line 24 of file typedefs.h.
.SS "typedef nspace::hash_map<\fBstd::string\fP, \fBuserrec\fP*, nspace::hash<\fBstring\fP>, \fBirc::StrHashComp\fP> \fBuser_hash\fP"
.PP
Definition at line 20 of file typedefs.h.
diff --git a/docs/man/man3/ucrec.3 b/docs/man/man3/ucrec.3
index ba427060b..3f0226786 100644
--- a/docs/man/man3/ucrec.3
+++ b/docs/man/man3/ucrec.3
@@ -1,4 +1,4 @@
-.TH "ucrec" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "ucrec" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -69,7 +69,7 @@ If the record is not in use, this value will be NULL.
.PP
Definition at line 254 of file channels.h.
.PP
-Referenced by ForceChan().
+Referenced by AddClient(), and ForceChan().
.SS "char \fBucrec::uc_modes\fP"
.PP
Contains a bitmask of the UCMODE_OP .
@@ -78,7 +78,7 @@ Contains a bitmask of the UCMODE_OP .
.PP
Definition at line 249 of file channels.h.
.PP
-Referenced by ForceChan().
+Referenced by AddClient(), and ForceChan().
.SH "Author"
.PP
diff --git a/docs/man/man3/userprocess.h.3 b/docs/man/man3/userprocess.h.3
index 70e681727..8a1b46b91 100644
--- a/docs/man/man3/userprocess.h.3
+++ b/docs/man/man3/userprocess.h.3
@@ -1,4 +1,4 @@
-.TH "userprocess.h" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "userprocess.h" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -8,6 +8,8 @@ userprocess.h \-
.PP
\fC#include 'users.h'\fP
.br
+\fC#include 'inspircd.h'\fP
+.br
.SS "Functions"
@@ -16,7 +18,7 @@ userprocess.h \-
.RI "void \fBCheckDie\fP ()"
.br
.ti -1c
-.RI "void \fBLoadAllModules\fP ()"
+.RI "void \fBLoadAllModules\fP (\fBInspIRCd\fP *\fBServerInstance\fP)"
.br
.ti -1c
.RI "void \fBCheckRoot\fP ()"
@@ -39,7 +41,7 @@ userprocess.h \-
.PP
.SS "bool DoBackgroundUserStuff (time_t TIME)"
.PP
-.SS "void LoadAllModules ()"
+.SS "void LoadAllModules (\fBInspIRCd\fP * ServerInstance)"
.PP
.SS "void OpenLog (char ** argv, int argc)"
.PP
diff --git a/docs/man/man3/userrec.3 b/docs/man/man3/userrec.3
index 9c34db700..e0c938e5e 100644
--- a/docs/man/man3/userrec.3
+++ b/docs/man/man3/userrec.3
@@ -1,4 +1,4 @@
-.TH "userrec" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "userrec" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -27,19 +27,19 @@ Inherits \fBconnection\fP.
.br
.RI "\fIReturns the full real host of the user This member function returns the hostname of the user as seen by other users on the server, in nick!identhost form. \fP"
.ti -1c
-.RI "virtual bool \fBIsInvited\fP (char *channel)"
+.RI "virtual bool \fBIsInvited\fP (\fBirc::string\fP &channel)"
.br
.RI "\fIReturns true if a user is invited to a channel. \fP"
.ti -1c
-.RI "virtual void \fBInviteTo\fP (char *channel)"
+.RI "virtual void \fBInviteTo\fP (\fBirc::string\fP &channel)"
.br
.RI "\fIAdds a channel to a users invite list (invites them to a channel). \fP"
.ti -1c
-.RI "virtual void \fBRemoveInvite\fP (char *channel)"
+.RI "virtual void \fBRemoveInvite\fP (\fBirc::string\fP &channel)"
.br
.RI "\fIRemoves a channel from a users invite list. \fP"
.ti -1c
-.RI "bool \fBHasPermission\fP (char *command)"
+.RI "bool \fBHasPermission\fP (\fBstd::string\fP &command)"
.br
.RI "\fIReturns true or false for if a user can execute a privilaged oper command. \fP"
.ti -1c
@@ -192,49 +192,49 @@ Holds all information about a user This class stores all information about a use
Everything about a connection is stored here primarily, from the user's socket ID (file descriptor) through to the user's nickname and hostname. Use the Find method of the server class to locate a specific user by nickname.
.PP
-Definition at line 111 of file users.h.
+Definition at line 115 of file users.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "userrec::userrec ()"
.PP
-Definition at line 36 of file users.cpp.
+Definition at line 63 of file users.cpp.
.PP
References awaymsg, connection::bytes_in, connection::bytes_out, chans, connection::cmds_in, connection::cmds_out, dhost, dns_done, connection::fd, FindServerNamePtr(), flood, fullname, connection::haspassed, connection::host, ident, connection::idle_lastmsg, invites, connection::ip, connection::lastping, lines_in, modes, nick, connection::nping, oper, connection::port, recvq, connection::registered, reset_due, sendq, server, ServerConfig::ServerName, connection::signon, TIME, and timeout.
.PP
.nf
-37 {
-38 // the PROPER way to do it, AVOID bzero at *ALL* costs
-39 strcpy(nick,'');
-40 strcpy(ip,'127.0.0.1');
-41 timeout = 0;
-42 strcpy(ident,'');
-43 strcpy(host,'');
-44 strcpy(dhost,'');
-45 strcpy(fullname,'');
-46 strcpy(modes,'');
-47 server = (char*)FindServerNamePtr(Config->ServerName);
-48 strcpy(awaymsg,'');
-49 strcpy(oper,'');
-50 reset_due = TIME;
-51 lines_in = 0;
-52 fd = lastping = signon = idle_lastmsg = nping = registered = 0;
-53 flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0;
-54 haspassed = false;
-55 dns_done = false;
-56 recvq = '';
-57 sendq = '';
-58 chans.clear();
-59 invites.clear();
-60 }
+64 {
+65 // the PROPER way to do it, AVOID bzero at *ALL* costs
+66 strcpy(nick,'');
+67 strcpy(ip,'127.0.0.1');
+68 timeout = 0;
+69 strcpy(ident,'');
+70 strcpy(host,'');
+71 strcpy(dhost,'');
+72 strcpy(fullname,'');
+73 strcpy(modes,'');
+74 server = (char*)FindServerNamePtr(Config->ServerName);
+75 strcpy(awaymsg,'');
+76 strcpy(oper,'');
+77 reset_due = TIME;
+78 lines_in = 0;
+79 fd = lastping = signon = idle_lastmsg = nping = registered = 0;
+80 flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0;
+81 haspassed = false;
+82 dns_done = false;
+83 recvq = '';
+84 sendq = '';
+85 chans.clear();
+86 invites.clear();
+87 }
.fi
.PP
.SS "userrec::~userrec ()\fC [virtual]\fP"
.PP
-Definition at line 62 of file users.cpp.
+Definition at line 89 of file users.cpp.
.PP
.nf
-63 {
-64 }
+90 {
+91 }
.fi
.PP
.SH "Member Function Documentation"
@@ -245,35 +245,35 @@ This method adds data to the buffer of the user.
.PP
The buffer can grow to any size within limits of the available memory, managed by the size of a \fBstd::string\fP, however if any individual line in the buffer grows over 600 bytes in length (which is 88 chars over the RFC-specified limit per line) then the method will return false and the text will not be inserted.
.PP
-Definition at line 198 of file users.cpp.
+Definition at line 219 of file users.cpp.
.PP
References recvq, recvqmax, SetWriteError(), and WriteOpers().
.PP
.nf
-199 {
-200 std::string b = '';
-201 for (unsigned int i = 0; i < a.length(); i++)
-202 if ((a[i] != '\r') && (a[i] != '\0') && (a[i] != 7))
-203 b = b + a[i];
-204 std::stringstream stream(recvq);
-205 stream << b;
-206 recvq = stream.str();
-207 unsigned int i = 0;
-208 // count the size of the first line in the buffer.
-209 while (i < recvq.length())
-210 {
-211 if (recvq[i++] == '\n')
-212 break;
-213 }
-214 if (recvq.length() > (unsigned)this->recvqmax)
-215 {
-216 this->SetWriteError('RecvQ exceeded');
-217 WriteOpers('*** User %s RecvQ of %d exceeds connect class maximum of %d',this->nick,recvq.length(),this->recvqmax);
-218 }
-219 // return false if we've had more than 600 characters WITHOUT
-220 // a carriage return (this is BAD, drop the socket)
-221 return (i < 600);
-222 }
+220 {
+221 std::string b = '';
+222 for (unsigned int i = 0; i < a.length(); i++)
+223 if ((a[i] != '\r') && (a[i] != '\0') && (a[i] != 7))
+224 b = b + a[i];
+225 std::stringstream stream(recvq);
+226 stream << b;
+227 recvq = stream.str();
+228 unsigned int i = 0;
+229 // count the size of the first line in the buffer.
+230 while (i < recvq.length())
+231 {
+232 if (recvq[i++] == '\n')
+233 break;
+234 }
+235 if (recvq.length() > (unsigned)this->recvqmax)
+236 {
+237 this->SetWriteError('RecvQ exceeded');
+238 WriteOpers('*** User %s RecvQ of %d exceeds connect class maximum of %d',this->nick,recvq.length(),this->recvqmax);
+239 }
+240 // return false if we've had more than 600 characters WITHOUT
+241 // a carriage return (this is BAD, drop the socket)
+242 return (i < 600);
+243 }
.fi
.PP
.SS "void userrec::AddWriteBuf (\fBstd::string\fP data)"
@@ -282,24 +282,28 @@ Adds to the user's write buffer.
.PP
You may add any amount of text up to this users sendq value, if you exceed the sendq value, \fBSetWriteError()\fP will be called to set the users error string to 'SendQ exceeded', and further buffer adds will be dropped.
.PP
-Definition at line 254 of file users.cpp.
+Definition at line 275 of file users.cpp.
.PP
References sendq, sendqmax, SetWriteError(), and WriteOpers().
.PP
.nf
-255 {
-256 if (this->GetWriteError() != '')
-257 return;
-258 if (sendq.length() + data.length() > (unsigned)this->sendqmax)
-259 {
-260 WriteOpers('*** User %s SendQ of %d exceeds connect class maximum of %d',this->nick,sendq.length() + data.length(),this->sendqmax);
-261 this->SetWriteError('SendQ exceeded');
-262 return;
-263 }
-264 std::stringstream stream;
-265 stream << sendq << data;
-266 sendq = stream.str();
-267 }
+276 {
+277 if (this->GetWriteError() != '')
+278 return;
+279 if (sendq.length() + data.length() > (unsigned)this->sendqmax)
+280 {
+281 /* Fix by brain - Set the error text BEFORE calling writeopers, because
+282 * if we dont it'll recursively call here over and over again trying
+283 * to repeatedly add the text to the sendq!
+284 */
+285 this->SetWriteError('SendQ exceeded');
+286 WriteOpers('*** User %s SendQ of %d exceeds connect class maximum of %d',this->nick,sendq.length() + data.length(),this->sendqmax);
+287 return;
+288 }
+289 std::stringstream stream;
+290 stream << sendq << data;
+291 sendq = stream.str();
+292 }
.fi
.PP
.SS "bool userrec::BufferIsReady ()"
@@ -308,46 +312,48 @@ This method returns true if the buffer contains at least one carriage return cha
.PP
one complete line may be read)
.PP
-Definition at line 224 of file users.cpp.
+Definition at line 245 of file users.cpp.
.PP
References recvq.
.PP
.nf
-225 {
-226 for (unsigned int i = 0; i < recvq.length(); i++)
-227 if (recvq[i] == '\n')
-228 return true;
-229 return false;
-230 }
+246 {
+247 for (unsigned int i = 0; i < recvq.length(); i++)
+248 if (recvq[i] == '\n')
+249 return true;
+250 return false;
+251 }
.fi
.PP
.SS "void userrec::ClearBuffer ()"
.PP
This function clears the entire buffer by setting it to an empty string.
.PP
-Definition at line 232 of file users.cpp.
+Definition at line 253 of file users.cpp.
.PP
References recvq.
.PP
Referenced by Server::PseudoToUser(), and Server::UserToPseudo().
.PP
.nf
-233 {
-234 recvq = '';
-235 }
+254 {
+255 recvq = '';
+256 }
.fi
.PP
.SS "void userrec::CloseSocket ()"
.PP
Shuts down and closes the user's socket.
.PP
-Definition at line 66 of file users.cpp.
+Definition at line 93 of file users.cpp.
+.PP
+Referenced by kill_link(), and kill_link_silent().
.PP
.nf
-67 {
-68 shutdown(this->fd,2);
-69 close(this->fd);
-70 }
+94 {
+95 shutdown(this->fd,2);
+96 close(this->fd);
+97 }
.fi
.PP
.SS "void userrec::FlushWriteBuf ()"
@@ -356,31 +362,33 @@ Flushes as much of the user's buffer to the file descriptor as possible.
.PP
This function may not always flush the entire buffer, rather instead as much of it as it possibly can. If the send() call fails to send the entire buffer, the buffer position is advanced forwards and the rest of the data sent at the next call to this method.
.PP
-Definition at line 270 of file users.cpp.
+Definition at line 295 of file users.cpp.
.PP
References connection::bytes_out, connection::cmds_out, sendq, and SetWriteError().
.PP
+Referenced by kill_link(), and kill_link_silent().
+.PP
.nf
-271 {
-272 if (sendq.length())
-273 {
-274 char* tb = (char*)this->sendq.c_str();
-275 int n_sent = write(this->fd,tb,this->sendq.length());
-276 if (n_sent == -1)
-277 {
-278 this->SetWriteError(strerror(errno));
-279 }
-280 else
-281 {
-282 // advance the queue
-283 tb += n_sent;
-284 this->sendq = tb;
-285 // update the user's stats counters
-286 this->bytes_out += n_sent;
-287 this->cmds_out++;
-288 }
-289 }
-290 }
+296 {
+297 if (sendq.length())
+298 {
+299 char* tb = (char*)this->sendq.c_str();
+300 int n_sent = write(this->fd,tb,this->sendq.length());
+301 if (n_sent == -1)
+302 {
+303 this->SetWriteError(strerror(errno));
+304 }
+305 else
+306 {
+307 // advance the queue
+308 tb += n_sent;
+309 this->sendq = tb;
+310 // update the user's stats counters
+311 this->bytes_out += n_sent;
+312 this->cmds_out++;
+313 }
+314 }
+315 }
.fi
.PP
.SS "\fBstd::string\fP userrec::GetBuffer ()"
@@ -389,44 +397,44 @@ This method returns the first available string at the tail end of the buffer and
.PP
This means it is a one way operation in a similar way to strtok(), and multiple calls return multiple lines if they are available. The results of this function if there are no lines to be read are unknown, always use \fBBufferIsReady()\fP to check if it is ok to read the buffer before calling \fBGetBuffer()\fP.
.PP
-Definition at line 237 of file users.cpp.
+Definition at line 258 of file users.cpp.
.PP
References recvq.
.PP
.nf
-238 {
-239 if (recvq == '')
-240 return '';
-241 char* line = (char*)recvq.c_str();
-242 std::string ret = '';
-243 while ((*line != '\n') && (strlen(line)))
-244 {
-245 ret = ret + *line;
-246 line++;
-247 }
-248 if ((*line == '\n') || (*line == '\r'))
-249 line++;
-250 recvq = line;
-251 return ret;
-252 }
+259 {
+260 if (recvq == '')
+261 return '';
+262 char* line = (char*)recvq.c_str();
+263 std::string ret = '';
+264 while ((*line != '\n') && (strlen(line)))
+265 {
+266 ret = ret + *line;
+267 line++;
+268 }
+269 if ((*line == '\n') || (*line == '\r'))
+270 line++;
+271 recvq = line;
+272 return ret;
+273 }
.fi
.PP
.SS "char * userrec::GetFullHost ()\fC [virtual]\fP"
.PP
Returns the full displayed host of the user This member function returns the hostname of the user as seen by other users on the server, in nick!identhost form.
.PP
-Definition at line 72 of file users.cpp.
+Definition at line 99 of file users.cpp.
.PP
References dhost, ident, and nick.
.PP
Referenced by add_channel().
.PP
.nf
-73 {
-74 static char result[MAXBUF];
-75 snprintf(result,MAXBUF,'%s!%s@%s',nick,ident,dhost);
-76 return result;
-77 }
+100 {
+101 static char result[MAXBUF];
+102 snprintf(result,MAXBUF,'%s!%s@%s',nick,ident,dhost);
+103 return result;
+104 }
.fi
.PP
.SS "char * userrec::GetFullRealHost ()\fC [virtual]\fP"
@@ -435,200 +443,194 @@ Returns the full real host of the user This member function returns the hostname
.PP
If any form of hostname cloaking is in operation, e.g. through a module, then this method will ignore it and return the true hostname.
.PP
-Definition at line 89 of file users.cpp.
+Definition at line 116 of file users.cpp.
.PP
References connection::host, ident, and nick.
.PP
.nf
-90 {
-91 static char fresult[MAXBUF];
-92 snprintf(fresult,MAXBUF,'%s!%s@%s',nick,ident,host);
-93 return fresult;
-94 }
+117 {
+118 static char fresult[MAXBUF];
+119 snprintf(fresult,MAXBUF,'%s!%s@%s',nick,ident,host);
+120 return fresult;
+121 }
.fi
.PP
.SS "\fBInvitedList\fP * userrec::GetInviteList ()"
.PP
Returns the list of channels this user has been invited to but has not yet joined.
.PP
-Definition at line 110 of file users.cpp.
+Definition at line 136 of file users.cpp.
.PP
References invites.
.PP
.nf
-111 {
-112 return &invites;
-113 }
+137 {
+138 return &invites;
+139 }
.fi
.PP
.SS "\fBstd::string\fP userrec::GetWriteError ()"
.PP
Returns the write error which last occured on this connection or an empty string if none occured.
.PP
-Definition at line 300 of file users.cpp.
+Definition at line 325 of file users.cpp.
.PP
References WriteError.
.PP
.nf
-301 {
-302 return this->WriteError;
-303 }
+326 {
+327 return this->WriteError;
+328 }
.fi
.PP
-.SS "bool userrec::HasPermission (char * command)"
+.SS "bool userrec::HasPermission (\fBstd::string\fP & command)"
.PP
Returns true or false for if a user can execute a privilaged oper command.
.PP
This is done by looking up their oper type from \fBuserrec::oper\fP, then referencing this to their oper classes and checking the commands they can execute.
.PP
-Definition at line 144 of file users.cpp.
+Definition at line 165 of file users.cpp.
.PP
References ServerConfig::config_f, ServerConfig::ConfValue(), and is_uline().
.PP
.nf
-145 {
-146 char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF];
-147 char* mycmd;
-148 char* savept;
-149 char* savept2;
-150
-151 // users on u-lined servers can completely bypass
-152 // all permissions based checks.
-153 //
-154 // of course, if this is sent to a remote server and this
-155 // server is not ulined there, then that other server
-156 // silently drops the command.
-157 if (is_uline(this->server))
-158 return true;
-159
-160 // are they even an oper at all?
-161 if (strchr(this->modes,'o'))
-162 {
-163 for (int j =0; j < Config->ConfValueEnum('type',&Config->config_f); j++)
-164 {
-165 Config->ConfValue('type','name',j,TypeName,&Config->config_f);
-166 if (!strcmp(TypeName,this->oper))
-167 {
-168 Config->ConfValue('type','classes',j,Classes,&Config->config_f);
-169 char* myclass = strtok_r(Classes,' ',&savept);
-170 while (myclass)
-171 {
-172 for (int k =0; k < Config->ConfValueEnum('class',&Config->config_f); k++)
-173 {
-174 Config->ConfValue('class','name',k,ClassName,&Config->config_f);
-175 if (!strcmp(ClassName,myclass))
-176 {
-177 Config->ConfValue('class','commands',k,CommandList,&Config->config_f);
-178 mycmd = strtok_r(CommandList,' ',&savept2);
-179 while (mycmd)
-180 {
-181 if ((!strcasecmp(mycmd,command)) || (*mycmd == '*'))
-182 {
-183 return true;
-184 }
-185 mycmd = strtok_r(NULL,' ',&savept2);
-186 }
-187 }
-188 }
-189 myclass = strtok_r(NULL,' ',&savept);
-190 }
-191 }
-192 }
-193 }
-194 return false;
-195 }
+166 {
+167 char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF];
+168 char* mycmd;
+169 char* savept;
+170 char* savept2;
+171
+172 // users on u-lined servers can completely bypass
+173 // all permissions based checks.
+174 //
+175 // of course, if this is sent to a remote server and this
+176 // server is not ulined there, then that other server
+177 // silently drops the command.
+178 if (is_uline(this->server))
+179 return true;
+180
+181 // are they even an oper at all?
+182 if (strchr(this->modes,'o'))
+183 {
+184 for (int j =0; j < Config->ConfValueEnum('type',&Config->config_f); j++)
+185 {
+186 Config->ConfValue('type','name',j,TypeName,&Config->config_f);
+187 if (!strcmp(TypeName,this->oper))
+188 {
+189 Config->ConfValue('type','classes',j,Classes,&Config->config_f);
+190 char* myclass = strtok_r(Classes,' ',&savept);
+191 while (myclass)
+192 {
+193 for (int k =0; k < Config->ConfValueEnum('class',&Config->config_f); k++)
+194 {
+195 Config->ConfValue('class','name',k,ClassName,&Config->config_f);
+196 if (!strcmp(ClassName,myclass))
+197 {
+198 Config->ConfValue('class','commands',k,CommandList,&Config->config_f);
+199 mycmd = strtok_r(CommandList,' ',&savept2);
+200 while (mycmd)
+201 {
+202 if ((!strcasecmp(mycmd,command.c_str())) || (*mycmd == '*'))
+203 {
+204 return true;
+205 }
+206 mycmd = strtok_r(NULL,' ',&savept2);
+207 }
+208 }
+209 }
+210 myclass = strtok_r(NULL,' ',&savept);
+211 }
+212 }
+213 }
+214 }
+215 return false;
+216 }
.fi
.PP
-.SS "void userrec::InviteTo (char * channel)\fC [virtual]\fP"
+.SS "void userrec::InviteTo (\fBirc::string\fP & channel)\fC [virtual]\fP"
.PP
Adds a channel to a users invite list (invites them to a channel).
.PP
-Definition at line 115 of file users.cpp.
+Definition at line 141 of file users.cpp.
.PP
References Invited::channel, and invites.
.PP
.nf
-116 {
-117 Invited i;
-118 strlcpy(i.channel,channel,CHANMAX);
-119 invites.push_back(i);
-120 }
+142 {
+143 Invited i;
+144 i.channel = channel;
+145 invites.push_back(i);
+146 }
.fi
.PP
-.SS "bool userrec::IsInvited (char * channel)\fC [virtual]\fP"
+.SS "bool userrec::IsInvited (\fBirc::string\fP & channel)\fC [virtual]\fP"
.PP
Returns true if a user is invited to a channel.
.PP
-Definition at line 96 of file users.cpp.
+Definition at line 123 of file users.cpp.
.PP
References invites.
.PP
Referenced by add_channel().
.PP
.nf
-97 {
-98 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
-99 {
-100 if (i->channel) {
-101 if (!strcasecmp(i->channel,channel))
-102 {
-103 return true;
-104 }
-105 }
-106 }
-107 return false;
-108 }
+124 {
+125 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
+126 {
+127 irc::string compare = i->channel;
+128 if (compare == channel)
+129 {
+130 return true;
+131 }
+132 }
+133 return false;
+134 }
.fi
.PP
.SS "int userrec::ReadData (void * buffer, size_t size)"
.PP
Calls read() to read some data for this user using their fd.
.PP
-Definition at line 79 of file users.cpp.
+Definition at line 106 of file users.cpp.
.PP
.nf
-80 {
-81 if (this->fd > -1)
-82 {
-83 return read(this->fd, buffer, size);
-84 }
-85 else return 0;
-86 }
+107 {
+108 if (this->fd > -1)
+109 {
+110 return read(this->fd, buffer, size);
+111 }
+112 else return 0;
+113 }
.fi
.PP
-.SS "void userrec::RemoveInvite (char * channel)\fC [virtual]\fP"
+.SS "void userrec::RemoveInvite (\fBirc::string\fP & channel)\fC [virtual]\fP"
.PP
Removes a channel from a users invite list.
.PP
This member function is called on successfully joining an invite only channel to which the user has previously been invited, to clear the invitation.
.PP
-Definition at line 122 of file users.cpp.
+Definition at line 148 of file users.cpp.
.PP
References DEBUG, invites, and log().
.PP
Referenced by add_channel().
.PP
.nf
-123 {
-124 log(DEBUG,'Removing invites');
-125 if (channel)
-126 {
-127 if (invites.size())
-128 {
-129 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
-130 {
-131 if (i->channel)
-132 {
-133 if (!strcasecmp(i->channel,channel))
-134 {
-135 invites.erase(i);
-136 return;
-137 }
-138 }
-139 }
-140 }
-141 }
-142 }
+149 {
+150 log(DEBUG,'Removing invites');
+151 if (invites.size())
+152 {
+153 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
+154 {
+155 irc::string compare = i->channel;
+156 if (compare == channel)
+157 {
+158 invites.erase(i);
+159 return;
+160 }
+161 }
+162 }
+163 }
.fi
.PP
.SS "void userrec::SetWriteError (\fBstd::string\fP error)"
@@ -637,19 +639,19 @@ Sets the write error for a connection.
.PP
This is done because the actual disconnect of a client may occur at an inopportune time such as half way through /LIST output. The WriteErrors of clients are checked at a more ideal time (in the mainloop) and errored clients purged.
.PP
-Definition at line 292 of file users.cpp.
+Definition at line 317 of file users.cpp.
.PP
References DEBUG, log(), and WriteError.
.PP
Referenced by AddBuffer(), AddWriteBuf(), and FlushWriteBuf().
.PP
.nf
-293 {
-294 log(DEBUG,'Setting error string for %s to '%s'',this->nick,error.c_str());
-295 // don't try to set the error twice, its already set take the first string.
-296 if (this->WriteError == '')
-297 this->WriteError = error;
-298 }
+318 {
+319 log(DEBUG,'Setting error string for %s to '%s'',this->nick,error.c_str());
+320 // don't try to set the error twice, its already set take the first string.
+321 if (this->WriteError == '')
+322 this->WriteError = error;
+323 }
.fi
.PP
.SH "Member Data Documentation"
@@ -660,12 +662,12 @@ The user's away message.
.PP
If this string is empty, the user is not marked as away.
.PP
-Definition at line 158 of file users.h.
+Definition at line 162 of file users.h.
.PP
Referenced by userrec().
.SS "std::vector<\fBucrec\fP> \fBuserrec::chans\fP"
.PP
-Definition at line 149 of file users.h.
+Definition at line 153 of file users.h.
.PP
Referenced by add_channel(), del_channel(), kick_channel(), Server::PseudoToUser(), and userrec().
.SS "char \fBuserrec::dhost\fP[160]"
@@ -674,51 +676,51 @@ The host displayed to non-opers (used for cloaking etc).
.PP
This usually matches the value of \fBuserrec::host\fP.
.PP
-Definition at line 134 of file users.h.
+Definition at line 138 of file users.h.
.PP
-Referenced by GetFullHost(), and userrec().
+Referenced by AddWhoWas(), GetFullHost(), and userrec().
.SS "bool \fBuserrec::dns_done\fP"
.PP
True when \fBDNS\fP lookups are completed.
.PP
-Definition at line 181 of file users.h.
+Definition at line 185 of file users.h.
.PP
-Referenced by userrec().
+Referenced by ConnectUser(), and 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.
.PP
-Definition at line 164 of file users.h.
+Definition at line 168 of file users.h.
.PP
Referenced by userrec().
.SS "char \fBuserrec::fullname\fP[MAXGECOS+1]"
.PP
The users full name.
.PP
-Definition at line 138 of file users.h.
+Definition at line 142 of file users.h.
.PP
-Referenced by userrec().
+Referenced by AddWhoWas(), and userrec().
.SS "char \fBuserrec::ident\fP[IDENTMAX+2]"
.PP
The users ident reply.
.PP
Two characters are added to the user-defined limit to compensate for the tilde etc.
.PP
-Definition at line 129 of file users.h.
+Definition at line 133 of file users.h.
.PP
-Referenced by GetFullHost(), GetFullRealHost(), Server::PseudoToUser(), userrec(), and Server::UserToPseudo().
+Referenced by AddWhoWas(), FullConnectUser(), GetFullHost(), GetFullRealHost(), kill_link(), kill_link_silent(), Server::PseudoToUser(), userrec(), and Server::UserToPseudo().
.SS "\fBInvitedList\fP \fBuserrec::invites\fP\fC [private]\fP"
.PP
A list of channels the user has a pending invite to.
.PP
-Definition at line 117 of file users.h.
+Definition at line 121 of file users.h.
.PP
Referenced by GetInviteList(), InviteTo(), IsInvited(), RemoveInvite(), and userrec().
.SS "int \fBuserrec::lines_in\fP"
.PP
Flood counters.
.PP
-Definition at line 206 of file users.h.
+Definition at line 210 of file users.h.
.PP
Referenced by userrec().
.SS "char \fBuserrec::modes\fP[54]"
@@ -727,7 +729,7 @@ The user's mode string.
.PP
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.
.PP
-Definition at line 147 of file users.h.
+Definition at line 151 of file users.h.
.PP
Referenced by add_channel(), and userrec().
.SS "char \fBuserrec::nick\fP[NICKMAX]"
@@ -736,16 +738,16 @@ The users nickname.
.PP
An invalid nickname indicates an unregistered connection prior to the NICK command.
.PP
-Definition at line 124 of file users.h.
+Definition at line 128 of file users.h.
.PP
-Referenced by add_channel(), del_channel(), ConfigReader::DumpErrors(), GetFullHost(), GetFullRealHost(), kick_channel(), Server::PseudoToUser(), and userrec().
+Referenced by add_channel(), AddWhoWas(), del_channel(), ConfigReader::DumpErrors(), FullConnectUser(), GetFullHost(), GetFullRealHost(), kick_channel(), kill_link(), kill_link_silent(), Server::PseudoToUser(), and userrec().
.SS "char \fBuserrec::oper\fP[NICKMAX]"
.PP
The oper type they logged in as, if they are an oper.
.PP
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.
.PP
-Definition at line 177 of file users.h.
+Definition at line 181 of file users.h.
.PP
Referenced by userrec().
.SS "char \fBuserrec::password\fP[MAXBUF]"
@@ -754,31 +756,31 @@ Password specified by the user when they registered.
.PP
This is stored even if the <connect> block doesnt need a password, so that modules may check it.
.PP
-Definition at line 191 of file users.h.
+Definition at line 195 of file users.h.
.SS "unsigned int \fBuserrec::pingmax\fP"
.PP
Number of seconds between PINGs for this user (set from <connect:allow> tag.
.PP
-Definition at line 185 of file users.h.
+Definition at line 189 of file users.h.
.SS "\fBstd::string\fP \fBuserrec::recvq\fP"
.PP
User's receive queue.
.PP
Lines from the IRCd awaiting processing are stored here. Upgraded april 2005, old system a bit hairy.
.PP
-Definition at line 197 of file users.h.
+Definition at line 201 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.
.PP
-Definition at line 220 of file users.h.
+Definition at line 224 of file users.h.
.PP
Referenced by AddBuffer().
.SS "time_t \fBuserrec::reset_due\fP"
.PP
-Definition at line 207 of file users.h.
+Definition at line 211 of file users.h.
.PP
Referenced by userrec().
.SS "\fBstd::string\fP \fBuserrec::sendq\fP"
@@ -787,36 +789,36 @@ User's send queue.
.PP
Lines waiting to be sent are stored here until their buffer is flushed.
.PP
-Definition at line 202 of file users.h.
+Definition at line 206 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.
.PP
-Definition at line 216 of file users.h.
+Definition at line 220 of file users.h.
.PP
Referenced by AddWriteBuf().
.SS "char* \fBuserrec::server\fP"
.PP
The server the user is connected to.
.PP
-Definition at line 153 of file users.h.
+Definition at line 157 of file users.h.
.PP
-Referenced by kick_channel(), and userrec().
+Referenced by AddWhoWas(), kick_channel(), and userrec().
.SS "long \fBuserrec::threshold\fP"
.PP
-Definition at line 208 of file users.h.
+Definition at line 212 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.
.PP
-Definition at line 170 of file users.h.
+Definition at line 174 of file users.h.
.PP
Referenced by userrec().
.SS "\fBstd::string\fP \fBuserrec::WriteError\fP"
.PP
-Definition at line 212 of file users.h.
+Definition at line 216 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 05915282e..af36eb556 100644
--- a/docs/man/man3/users.cpp.3
+++ b/docs/man/man3/users.cpp.3
@@ -1,4 +1,4 @@
-.TH "users.cpp" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "users.cpp" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -24,23 +24,708 @@ users.cpp \-
.br
\fC#include 'helperfuncs.h'\fP
.br
+\fC#include 'typedefs.h'\fP
+.br
+\fC#include 'socketengine.h'\fP
+.br
+\fC#include 'hashcomp.h'\fP
+.br
+\fC#include 'message.h'\fP
+.br
+\fC#include 'wildcard.h'\fP
+.br
+\fC#include 'xline.h'\fP
+.br
+.SS "Functions"
+
+.in +1c
+.ti -1c
+.RI "template<typename T> \fBstring\fP \fBConvToStr\fP (const T &in)"
+.br
+.ti -1c
+.RI "void \fBAddOper\fP (\fBuserrec\fP *user)"
+.br
+.ti -1c
+.RI "void \fBDeleteOper\fP (\fBuserrec\fP *user)"
+.br
+.ti -1c
+.RI "void \fBkill_link\fP (\fBuserrec\fP *user, const char *r)"
+.br
+.ti -1c
+.RI "void \fBkill_link_silent\fP (\fBuserrec\fP *user, const char *r)"
+.br
+.ti -1c
+.RI "void \fBAddWhoWas\fP (\fBuserrec\fP *u)"
+.br
+.ti -1c
+.RI "void \fBAddClient\fP (int socket, char *host, int port, bool iscached, char *ip)"
+.br
+.ti -1c
+.RI "void \fBFullConnectUser\fP (\fBuserrec\fP *user)"
+.br
+.ti -1c
+.RI "void \fBConnectUser\fP (\fBuserrec\fP *user)"
+.br
+.ti -1c
+.RI "\fBuserrec\fP * \fBReHashNick\fP (char *Old, char *New)"
+.br
+.ti -1c
+.RI "void \fBforce_nickchange\fP (\fBuserrec\fP *user, const char *newnick)"
+.br
+.in -1c
.SS "Variables"
.in +1c
.ti -1c
-.RI "\fBServerConfig\fP * \fBConfig\fP"
+.RI "\fBInspIRCd\fP * \fBServerInstance\fP"
+.br
+.ti -1c
+.RI "int \fBWHOWAS_STALE\fP"
+.br
+.ti -1c
+.RI "int \fBWHOWAS_MAX\fP"
+.br
+.ti -1c
+.RI "std::vector< \fBModule\fP * > \fBmodules\fP"
+.br
+.ti -1c
+.RI "std::vector< \fBircd_module\fP * > \fBfactory\fP"
+.br
+.ti -1c
+.RI "std::vector< \fBInspSocket\fP * > \fBmodule_sockets\fP"
+.br
+.ti -1c
+.RI "int \fBMODCOUNT\fP"
+.br
+.ti -1c
+.RI "\fBInspSocket\fP * \fBsocket_ref\fP [65535]"
.br
.ti -1c
.RI "time_t \fBTIME\fP"
.br
+.ti -1c
+.RI "\fBuserrec\fP * \fBfd_ref_table\fP [65536]"
+.br
+.ti -1c
+.RI "\fBServerConfig\fP * \fBConfig\fP"
+.br
+.ti -1c
+.RI "\fBuser_hash\fP \fBclientlist\fP"
+.br
+.ti -1c
+.RI "\fBwhowas_hash\fP \fBwhowas\fP"
+.br
+.ti -1c
+.RI "std::vector< \fBuserrec\fP * > \fBlocal_users\fP"
+.br
+.ti -1c
+.RI "std::vector< \fBuserrec\fP * > \fBall_opers\fP"
+.br
.in -1c
+.SH "Function Documentation"
+.PP
+.SS "void AddClient (int socket, char * host, int port, bool iscached, char * ip)"
+.PP
+Definition at line 524 of file users.cpp.
+.PP
+References SocketEngine::AddFd(), CC_ALLOW, ucrec::channel, ServerConfig::Classes, clientlist, ConvToStr(), DEBUG, ServerConfig::dns_timeout, FindServerNamePtr(), kill_link(), local_users, log(), matches_exception(), matches_zline(), InspIRCd::SE, ServerConfig::ServerName, ServerConfig::SoftLimit, TIME, ucrec::uc_modes, and X_ESTAB_CLIENT.
+.PP
+.nf
+525 {
+526 string tempnick;
+527 char tn2[MAXBUF];
+528 user_hash::iterator iter;
+529
+530 tempnick = ConvToStr(socket) + '-unknown';
+531 sprintf(tn2,'%lu-unknown',(unsigned long)socket);
+532
+533 iter = clientlist.find(tempnick);
+534
+535 // fix by brain.
+536 // as these nicknames are 'RFC impossible', we can be sure nobody is going to be
+537 // using one as a registered connection. As theyre per fd, we can also safely assume
+538 // that we wont have collisions. Therefore, if the nick exists in the list, its only
+539 // used by a dead socket, erase the iterator so that the new client may reclaim it.
+540 // this was probably the cause of 'server ignores me when i hammer it with reconnects'
+541 // issue in earlier alphas/betas
+542 if (iter != clientlist.end())
+543 {
+544 userrec* goner = iter->second;
+545 delete goner;
+546 clientlist.erase(iter);
+547 }
+548
+549 /*
+550 * It is OK to access the value here this way since we know
+551 * it exists, we just created it above.
+552 *
+553 * At NO other time should you access a value in a map or a
+554 * hash_map this way.
+555 */
+556 clientlist[tempnick] = new userrec();
+557
+558 log(DEBUG,'AddClient: %lu %s %d %s',(unsigned long)socket,host,port,ip);
+559
+560 clientlist[tempnick]->fd = socket;
+561 strlcpy(clientlist[tempnick]->nick, tn2,NICKMAX);
+562 strlcpy(clientlist[tempnick]->host, host,160);
+563 strlcpy(clientlist[tempnick]->dhost, host,160);
+564 clientlist[tempnick]->server = (char*)FindServerNamePtr(Config->ServerName);
+565 strlcpy(clientlist[tempnick]->ident, 'unknown',IDENTMAX);
+566 clientlist[tempnick]->registered = 0;
+567 clientlist[tempnick]->signon = TIME + Config->dns_timeout;
+568 clientlist[tempnick]->lastping = 1;
+569 clientlist[tempnick]->port = port;
+570 strlcpy(clientlist[tempnick]->ip,ip,16);
+571
+572 // set the registration timeout for this user
+573 unsigned long class_regtimeout = 90;
+574 int class_flood = 0;
+575 long class_threshold = 5;
+576 long class_sqmax = 262144; // 256kb
+577 long class_rqmax = 4096; // 4k
+578
+579 for (ClassVector::iterator i = Config->Classes.begin(); i != Config->Classes.end(); i++)
+580 {
+581 if (match(clientlist[tempnick]->host,i->host) && (i->type == CC_ALLOW))
+582 {
+583 class_regtimeout = (unsigned long)i->registration_timeout;
+584 class_flood = i->flood;
+585 clientlist[tempnick]->pingmax = i->pingtime;
+586 class_threshold = i->threshold;
+587 class_sqmax = i->sendqmax;
+588 class_rqmax = i->recvqmax;
+589 break;
+590 }
+591 }
+592
+593 clientlist[tempnick]->nping = TIME+clientlist[tempnick]->pingmax + Config->dns_timeout;
+594 clientlist[tempnick]->timeout = TIME+class_regtimeout;
+595 clientlist[tempnick]->flood = class_flood;
+596 clientlist[tempnick]->threshold = class_threshold;
+597 clientlist[tempnick]->sendqmax = class_sqmax;
+598 clientlist[tempnick]->recvqmax = class_rqmax;
+599
+600 ucrec a;
+601 a.channel = NULL;
+602 a.uc_modes = 0;
+603 for (int i = 0; i < MAXCHANS; i++)
+604 clientlist[tempnick]->chans.push_back(a);
+605
+606 if (clientlist.size() > Config->SoftLimit)
+607 {
+608 kill_link(clientlist[tempnick],'No more connections allowed');
+609 return;
+610 }
+611
+612 if (clientlist.size() >= MAXCLIENTS)
+613 {
+614 kill_link(clientlist[tempnick],'No more connections allowed');
+615 return;
+616 }
+617
+618 // this is done as a safety check to keep the file descriptors within range of fd_ref_table.
+619 // its a pretty big but for the moment valid assumption:
+620 // file descriptors are handed out starting at 0, and are recycled as theyre freed.
+621 // therefore if there is ever an fd over 65535, 65536 clients must be connected to the
+622 // irc server at once (or the irc server otherwise initiating this many connections, files etc)
+623 // which for the time being is a physical impossibility (even the largest networks dont have more
+624 // than about 10,000 users on ONE server!)
+625 if ((unsigned)socket > 65534)
+626 {
+627 kill_link(clientlist[tempnick],'Server is full');
+628 return;
+629 }
+630 char* e = matches_exception(ip);
+631 if (!e)
+632 {
+633 char* r = matches_zline(ip);
+634 if (r)
+635 {
+636 char reason[MAXBUF];
+637 snprintf(reason,MAXBUF,'Z-Lined: %s',r);
+638 kill_link(clientlist[tempnick],reason);
+639 return;
+640 }
+641 }
+642 fd_ref_table[socket] = clientlist[tempnick];
+643 local_users.push_back(clientlist[tempnick]);
+644 ServerInstance->SE->AddFd(socket,true,X_ESTAB_CLIENT);
+645 }
+.fi
+.PP
+.SS "void AddOper (\fBuserrec\fP * user)"
+.PP
+Definition at line 330 of file users.cpp.
+.PP
+References all_opers, DEBUG, and log().
+.PP
+.nf
+331 {
+332 log(DEBUG,'Oper added to optimization list');
+333 all_opers.push_back(user);
+334 }
+.fi
+.PP
+.SS "void AddWhoWas (\fBuserrec\fP * u)"
+.PP
+Definition at line 471 of file users.cpp.
+.PP
+References DEBUG, WhoWasUser::dhost, userrec::dhost, WhoWasUser::fullname, userrec::fullname, WhoWasUser::host, connection::host, WhoWasUser::ident, userrec::ident, log(), userrec::nick, WhoWasUser::nick, WhoWasUser::server, userrec::server, WhoWasUser::signon, connection::signon, TIME, whowas, WHOWAS_MAX, and WHOWAS_STALE.
+.PP
+Referenced by kill_link().
+.PP
+.nf
+472 {
+473 whowas_hash::iterator iter = whowas.find(u->nick);
+474 WhoWasUser *a = new WhoWasUser();
+475 strlcpy(a->nick,u->nick,NICKMAX);
+476 strlcpy(a->ident,u->ident,IDENTMAX);
+477 strlcpy(a->dhost,u->dhost,160);
+478 strlcpy(a->host,u->host,160);
+479 strlcpy(a->fullname,u->fullname,MAXGECOS);
+480 strlcpy(a->server,u->server,256);
+481 a->signon = u->signon;
+482
+483 /* MAX_WHOWAS: max number of /WHOWAS items
+484 * WHOWAS_STALE: number of hours before a WHOWAS item is marked as stale and
+485 * can be replaced by a newer one
+486 */
+487
+488 if (iter == whowas.end())
+489 {
+490 if (whowas.size() >= (unsigned)WHOWAS_MAX)
+491 {
+492 for (whowas_hash::iterator i = whowas.begin(); i != whowas.end(); i++)
+493 {
+494 // 3600 seconds in an hour ;)
+495 if ((i->second->signon)<(TIME-(WHOWAS_STALE*3600)))
+496 {
+497 // delete the old one
+498 if (i->second) delete i->second;
+499 // replace with new one
+500 i->second = a;
+501 log(DEBUG,'added WHOWAS entry, purged an old record');
+502 return;
+503 }
+504 }
+505 // no space left and user doesnt exist. Don't leave ram in use!
+506 log(DEBUG,'Not able to update whowas (list at WHOWAS_MAX entries and trying to add new?), freeing excess ram');
+507 delete a;
+508 }
+509 else
+510 {
+511 log(DEBUG,'added fresh WHOWAS entry');
+512 whowas[a->nick] = a;
+513 }
+514 }
+515 else
+516 {
+517 log(DEBUG,'updated WHOWAS entry');
+518 if (iter->second) delete iter->second;
+519 iter->second = a;
+520 }
+521 }
+.fi
+.PP
+.SS "void ConnectUser (\fBuserrec\fP * user)"
+.PP
+Definition at line 731 of file users.cpp.
+.PP
+References userrec::dns_done, FullConnectUser(), and connection::registered.
+.PP
+.nf
+732 {
+733 // dns is already done, things are fast. no need to wait for dns to complete just pass them straight on
+734 if ((user->dns_done) && (user->registered >= 3) && (AllModulesReportReady(user)))
+735 {
+736 FullConnectUser(user);
+737 }
+738 }
+.fi
+.PP
+.SS "template<typename T> \fBstring\fP ConvToStr (const T & in)\fC [inline]\fP"
+.PP
+Definition at line 56 of file users.cpp.
+.PP
+Referenced by AddClient().
+.PP
+.nf
+57 {
+58 stringstream tmp;
+59 if (!(tmp << in)) return string();
+60 return tmp.str();
+61 }
+.fi
+.PP
+.SS "void DeleteOper (\fBuserrec\fP * user)"
+.PP
+Definition at line 336 of file users.cpp.
+.PP
+References all_opers, DEBUG, and log().
+.PP
+.nf
+337 {
+338 for (std::vector<userrec*>::iterator a = all_opers.begin(); a < all_opers.end(); a++)
+339 {
+340 if (*a == user)
+341 {
+342 log(DEBUG,'Oper removed from optimization list');
+343 all_opers.erase(a);
+344 return;
+345 }
+346 }
+347 }
+.fi
+.PP
+.SS "void force_nickchange (\fBuserrec\fP * user, const char * newnick)"
+.PP
+Definition at line 769 of file users.cpp.
+.PP
+References FOREACH_RESULT, kill_link(), matches_qline(), InspIRCd::Parser, connection::registered, InspIRCd::stats, and serverstats::statsCollisions.
+.PP
+Referenced by Server::ChangeUserNick().
+.PP
+.nf
+770 {
+771 char nick[MAXBUF];
+772 int MOD_RESULT = 0;
+773
+774 strcpy(nick,'');
+775
+776 FOREACH_RESULT(OnUserPreNick(user,newnick));
+777 if (MOD_RESULT) {
+778 ServerInstance->stats->statsCollisions++;
+779 kill_link(user,'Nickname collision');
+780 return;
+781 }
+782 if (matches_qline(newnick))
+783 {
+784 ServerInstance->stats->statsCollisions++;
+785 kill_link(user,'Nickname collision');
+786 return;
+787 }
+788
+789 if (user)
+790 {
+791 if (newnick)
+792 {
+793 strncpy(nick,newnick,MAXBUF);
+794 }
+795 if (user->registered == 7)
+796 {
+797 char* pars[1];
+798 pars[0] = nick;
+799 std::string cmd = 'NICK';
+800 ServerInstance->Parser->CallHandler(cmd,pars,1,user);
+801 }
+802 }
+803 }
+.fi
+.PP
+.SS "void FullConnectUser (\fBuserrec\fP * user)"
+.PP
+Definition at line 647 of file users.cpp.
+.PP
+References DEBUG, connection::fd, FOREACH_MOD, connection::haspassed, connection::host, userrec::ident, connection::idle_lastmsg, connection::ip, kill_link(), kill_link_silent(), log(), matches_exception(), matches_gline(), matches_kline(), ServerConfig::Network, userrec::nick, connection::port, connection::registered, ServerConfig::ServerName, InspIRCd::stats, serverstats::statsConnects, TIME, WriteOpers(), and WriteServ().
+.PP
+Referenced by ConnectUser().
+.PP
+.nf
+648 {
+649 ServerInstance->stats->statsConnects++;
+650 user->idle_lastmsg = TIME;
+651 log(DEBUG,'ConnectUser: %s',user->nick);
+652
+653 if ((strcmp(Passwd(user),'')) && (!user->haspassed))
+654 {
+655 kill_link(user,'Invalid password');
+656 return;
+657 }
+658 if (IsDenied(user))
+659 {
+660 kill_link(user,'Unauthorised connection');
+661 return;
+662 }
+663
+664 char match_against[MAXBUF];
+665 snprintf(match_against,MAXBUF,'%s@%s',user->ident,user->host);
+666 char* e = matches_exception(match_against);
+667 if (!e)
+668 {
+669 char* r = matches_gline(match_against);
+670 if (r)
+671 {
+672 char reason[MAXBUF];
+673 snprintf(reason,MAXBUF,'G-Lined: %s',r);
+674 kill_link_silent(user,reason);
+675 return;
+676 }
+677 r = matches_kline(user->host);
+678 if (r)
+679 {
+680 char reason[MAXBUF];
+681 snprintf(reason,MAXBUF,'K-Lined: %s',r);
+682 kill_link_silent(user,reason);
+683 return;
+684 }
+685 }
+686
+687
+688 WriteServ(user->fd,'NOTICE Auth :Welcome to \002%s\002!',Config->Network);
+689 WriteServ(user->fd,'001 %s :Welcome to the %s IRC Network %s!%s@%s',user->nick,Config->Network,user->nick,user->ident,user->host);
+690 WriteServ(user->fd,'002 %s :Your host is %s, running version %s',user->nick,Config->ServerName,VERSION);
+691 WriteServ(user->fd,'003 %s :This server was created %s %s',user->nick,__TIME__,__DATE__);
+692 WriteServ(user->fd,'004 %s %s %s iowghraAsORVSxNCWqBzvdHtGI lvhopsmntikrRcaqOALQbSeKVfHGCuzN',user->nick,Config->ServerName,VERSION);
+693 // the neatest way to construct the initial 005 numeric, considering the number of configure constants to go in it...
+694 std::stringstream v;
+695 v << 'WALLCHOPS MODES=13 CHANTYPES=# PREFIX=(ohv)@%+ MAP SAFELIST MAXCHANNELS=' << MAXCHANS;
+696 v << ' MAXBANS=60 NICKLEN=' << NICKMAX;
+697 v << ' TOPICLEN=' << MAXTOPIC << ' KICKLEN=' << MAXKICK << ' MAXTARGETS=20 AWAYLEN=' << MAXAWAY << ' CHANMODES=ohvb,k,l,psmnti NETWORK=';
+698 v << Config->Network;
+699 std::string data005 = v.str();
+700 FOREACH_MOD On005Numeric(data005);
+701 // anfl @ #ratbox, efnet reminded me that according to the RFC this cant contain more than 13 tokens per line...
+702 // so i'd better split it :)
+703 std::stringstream out(data005);
+704 std::string token = '';
+705 std::string line5 = '';
+706 int token_counter = 0;
+707 while (!out.eof())
+708 {
+709 out >> token;
+710 line5 = line5 + token + ' ';
+711 token_counter++;
+712 if ((token_counter >= 13) || (out.eof() == true))
+713 {
+714 WriteServ(user->fd,'005 %s %s:are supported by this server',user->nick,line5.c_str());
+715 line5 = '';
+716 token_counter = 0;
+717 }
+718 }
+719 ShowMOTD(user);
+720
+721 // fix 3 by brain, move registered = 7 below these so that spurious modes and host changes dont go out
+722 // onto the network and produce 'fake direction'
+723 FOREACH_MOD OnUserConnect(user);
+724 FOREACH_MOD OnGlobalConnect(user);
+725 user->registered = 7;
+726 WriteOpers('*** Client connecting on port %lu: %s!%s@%s [%s]',(unsigned long)user->port,user->nick,user->ident,user->host,user->ip);
+727 }
+.fi
+.PP
+.SS "void kill_link (\fBuserrec\fP * user, const char * r)"
+.PP
+Definition at line 349 of file users.cpp.
+.PP
+References AddWhoWas(), clientlist, userrec::CloseSocket(), DEBUG, SocketEngine::DelFd(), connection::fd, userrec::FlushWriteBuf(), FOREACH_MOD, ServerConfig::GetIOHook(), connection::host, userrec::ident, local_users, log(), userrec::nick, Module::OnRawSocketClose(), connection::port, connection::registered, InspIRCd::SE, Write(), WriteCommonExcept(), and WriteOpers().
+.PP
+Referenced by AddClient(), force_nickchange(), FullConnectUser(), Server::PseudoToUser(), and Server::QuitUser().
+.PP
+.nf
+350 {
+351 user_hash::iterator iter = clientlist.find(user->nick);
+352
+353 char reason[MAXBUF];
+354
+355 strncpy(reason,r,MAXBUF);
+356
+357 if (strlen(reason)>MAXQUIT)
+358 {
+359 reason[MAXQUIT-1] = '\0';
+360 }
+361
+362 log(DEBUG,'kill_link: %s '%s'',user->nick,reason);
+363 Write(user->fd,'ERROR :Closing link (%s@%s) [%s]',user->ident,user->host,reason);
+364 log(DEBUG,'closing fd %lu',(unsigned long)user->fd);
+365
+366 if (user->registered == 7) {
+367 FOREACH_MOD OnUserQuit(user,reason);
+368 WriteCommonExcept(user,'QUIT :%s',reason);
+369 }
+370
+371 user->FlushWriteBuf();
+372
+373 FOREACH_MOD OnUserDisconnect(user);
+374
+375 if (user->fd > -1)
+376 {
+377 if (Config->GetIOHook(user->port))
+378 {
+379 Config->GetIOHook(user->port)->OnRawSocketClose(user->fd);
+380 }
+381 ServerInstance->SE->DelFd(user->fd);
+382 user->CloseSocket();
+383 }
+384
+385 // this must come before the WriteOpers so that it doesnt try to fill their buffer with anything
+386 // if they were an oper with +s.
+387 if (user->registered == 7) {
+388 purge_empty_chans(user);
+389 // fix by brain: only show local quits because we only show local connects (it just makes SENSE)
+390 if (user->fd > -1)
+391 WriteOpers('*** Client exiting: %s!%s@%s [%s]',user->nick,user->ident,user->host,reason);
+392 AddWhoWas(user);
+393 }
+394
+395 if (iter != clientlist.end())
+396 {
+397 log(DEBUG,'deleting user hash value %lu',(unsigned long)user);
+398 if (user->fd > -1)
+399 {
+400 fd_ref_table[user->fd] = NULL;
+401 if (find(local_users.begin(),local_users.end(),user) != local_users.end())
+402 {
+403 local_users.erase(find(local_users.begin(),local_users.end(),user));
+404 log(DEBUG,'Delete local user');
+405 }
+406 }
+407 clientlist.erase(iter);
+408 }
+409 delete user;
+410 }
+.fi
+.PP
+.SS "void kill_link_silent (\fBuserrec\fP * user, const char * r)"
+.PP
+Definition at line 412 of file users.cpp.
+.PP
+References clientlist, userrec::CloseSocket(), DEBUG, SocketEngine::DelFd(), connection::fd, userrec::FlushWriteBuf(), FOREACH_MOD, ServerConfig::GetIOHook(), connection::host, userrec::ident, local_users, log(), userrec::nick, Module::OnRawSocketClose(), connection::port, connection::registered, InspIRCd::SE, Write(), and WriteCommonExcept().
+.PP
+Referenced by FullConnectUser().
+.PP
+.nf
+413 {
+414 user_hash::iterator iter = clientlist.find(user->nick);
+415
+416 char reason[MAXBUF];
+417
+418 strncpy(reason,r,MAXBUF);
+419
+420 if (strlen(reason)>MAXQUIT)
+421 {
+422 reason[MAXQUIT-1] = '\0';
+423 }
+424
+425 log(DEBUG,'kill_link: %s '%s'',user->nick,reason);
+426 Write(user->fd,'ERROR :Closing link (%s@%s) [%s]',user->ident,user->host,reason);
+427 log(DEBUG,'closing fd %lu',(unsigned long)user->fd);
+428
+429 user->FlushWriteBuf();
+430
+431 if (user->registered == 7) {
+432 FOREACH_MOD OnUserQuit(user,reason);
+433 WriteCommonExcept(user,'QUIT :%s',reason);
+434 }
+435
+436 FOREACH_MOD OnUserDisconnect(user);
+437
+438 if (user->fd > -1)
+439 {
+440 if (Config->GetIOHook(user->port))
+441 {
+442 Config->GetIOHook(user->port)->OnRawSocketClose(user->fd);
+443 }
+444 ServerInstance->SE->DelFd(user->fd);
+445 user->CloseSocket();
+446 }
+447
+448 if (user->registered == 7) {
+449 purge_empty_chans(user);
+450 }
+451
+452 if (iter != clientlist.end())
+453 {
+454 log(DEBUG,'deleting user hash value %lu',(unsigned long)user);
+455 if (user->fd > -1)
+456 {
+457 fd_ref_table[user->fd] = NULL;
+458 if (find(local_users.begin(),local_users.end(),user) != local_users.end())
+459 {
+460 log(DEBUG,'Delete local user');
+461 local_users.erase(find(local_users.begin(),local_users.end(),user));
+462 }
+463 }
+464 clientlist.erase(iter);
+465 }
+466 delete user;
+467 }
+.fi
+.PP
+.SS "\fBuserrec\fP* ReHashNick (char * Old, char * New)"
+.PP
+Definition at line 743 of file users.cpp.
+.PP
+References clientlist, DEBUG, and log().
+.PP
+.nf
+744 {
+745 //user_hash::iterator newnick;
+746 user_hash::iterator oldnick = clientlist.find(Old);
+747
+748 log(DEBUG,'ReHashNick: %s %s',Old,New);
+749
+750 if (!strcasecmp(Old,New))
+751 {
+752 log(DEBUG,'old nick is new nick, skipping');
+753 return oldnick->second;
+754 }
+755
+756 if (oldnick == clientlist.end()) return NULL; /* doesnt exist */
+757
+758 log(DEBUG,'ReHashNick: Found hashed nick %s',Old);
+759
+760 userrec* olduser = oldnick->second;
+761 clientlist[New] = olduser;
+762 clientlist.erase(oldnick);
+763
+764 log(DEBUG,'ReHashNick: Nick rehashed as %s',New);
+765
+766 return clientlist[New];
+767 }
+.fi
+.PP
.SH "Variable Documentation"
.PP
+.SS "std::vector<\fBuserrec\fP*> \fBall_opers\fP"
+.PP
+Definition at line 54 of file users.cpp.
+.PP
+Referenced by AddOper(), and DeleteOper().
+.SS "\fBuser_hash\fP \fBclientlist\fP"
+.PP
.SS "\fBServerConfig\fP* \fBConfig\fP"
.PP
+.SS "std::vector<\fBircd_module\fP*> factory"
+.PP
+.SS "\fBuserrec\fP* \fBfd_ref_table\fP[65536]"
+.PP
+.SS "std::vector<\fBuserrec\fP*> \fBlocal_users\fP"
+.PP
+Definition at line 52 of file users.cpp.
+.PP
+Referenced by AddClient(), kill_link(), and kill_link_silent().
+.SS "int \fBMODCOUNT\fP"
+.PP
+.SS "std::vector<\fBInspSocket\fP*> \fBmodule_sockets\fP"
+.PP
+.SS "std::vector<\fBModule\fP*> modules"
+.PP
+.SS "\fBInspIRCd\fP* \fBServerInstance\fP"
+.PP
+.SS "\fBInspSocket\fP* \fBsocket_ref\fP[65535]"
+.PP
+Definition at line 43 of file socket.cpp.
.SS "time_t \fBTIME\fP"
.PP
+.SS "\fBwhowas_hash\fP \fBwhowas\fP"
+.PP
+Referenced by AddWhoWas().
+.SS "int \fBWHOWAS_MAX\fP"
+.PP
+.SS "int \fBWHOWAS_STALE\fP"
+.PP
.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 895149d91..a1be9c463 100644
--- a/docs/man/man3/users.h.3
+++ b/docs/man/man3/users.h.3
@@ -1,4 +1,4 @@
-.TH "users.h" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "users.h" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -16,6 +16,8 @@ users.h \-
.br
\fC#include <string>\fP
.br
+\fC#include 'hashcomp.h'\fP
+.br
.SS "Classes"
@@ -71,40 +73,642 @@ users.h \-
.br
.RI "\fIHolds a complete list of all allow and deny tags from the configuration file (connection classes). \fP"
.in -1c
+.SS "Functions"
+
+.in +1c
+.ti -1c
+.RI "template<typename T> \fBstring\fP \fBConvToStr\fP (const T &in)"
+.br
+.ti -1c
+.RI "void \fBAddOper\fP (\fBuserrec\fP *user)"
+.br
+.ti -1c
+.RI "void \fBDeleteOper\fP (\fBuserrec\fP *user)"
+.br
+.ti -1c
+.RI "void \fBkill_link\fP (\fBuserrec\fP *user, const char *r)"
+.br
+.ti -1c
+.RI "void \fBkill_link_silent\fP (\fBuserrec\fP *user, const char *r)"
+.br
+.ti -1c
+.RI "void \fBAddWhoWas\fP (\fBuserrec\fP *u)"
+.br
+.ti -1c
+.RI "void \fBAddClient\fP (int socket, char *host, int port, bool iscached, char *ip)"
+.br
+.ti -1c
+.RI "void \fBFullConnectUser\fP (\fBuserrec\fP *user)"
+.br
+.ti -1c
+.RI "void \fBConnectUser\fP (\fBuserrec\fP *user)"
+.br
+.ti -1c
+.RI "\fBuserrec\fP * \fBReHashNick\fP (char *Old, char *New)"
+.br
+.ti -1c
+.RI "void \fBforce_nickchange\fP (\fBuserrec\fP *user, const char *newnick)"
+.br
+.in -1c
.SH "Define Documentation"
.PP
.SS "#define CC_ALLOW 0"
.PP
-Definition at line 34 of file users.h.
+Definition at line 36 of file users.h.
+.PP
+Referenced by AddClient().
.SS "#define CC_DENY 1"
.PP
-Definition at line 35 of file users.h.
+Definition at line 37 of file users.h.
.SS "#define STATUS_HOP 2"
.PP
-Definition at line 30 of file users.h.
+Definition at line 32 of file users.h.
.PP
Referenced by kick_channel().
.SS "#define STATUS_NORMAL 0"
.PP
-Definition at line 32 of file users.h.
+Definition at line 34 of file users.h.
.SS "#define STATUS_OP 4"
.PP
-Definition at line 29 of file users.h.
+Definition at line 31 of file users.h.
.SS "#define STATUS_VOICE 1"
.PP
-Definition at line 31 of file users.h.
+Definition at line 33 of file users.h.
.SH "Typedef Documentation"
.PP
.SS "typedef std::vector<\fBConnectClass\fP> \fBClassVector\fP"
.PP
Holds a complete list of all allow and deny tags from the configuration file (connection classes).
.PP
-Definition at line 103 of file users.h.
+Definition at line 107 of file users.h.
.SS "typedef std::vector<\fBInvited\fP> \fBInvitedList\fP"
.PP
Holds a complete list of all channels to which a user has been invited and has not yet joined.
.PP
-Definition at line 97 of file users.h.
+Definition at line 101 of file users.h.
+.SH "Function Documentation"
+.PP
+.SS "void AddClient (int socket, char * host, int port, bool iscached, char * ip)"
+.PP
+Definition at line 524 of file users.cpp.
+.PP
+References SocketEngine::AddFd(), CC_ALLOW, ucrec::channel, ServerConfig::Classes, clientlist, ConvToStr(), DEBUG, ServerConfig::dns_timeout, FindServerNamePtr(), kill_link(), local_users, log(), matches_exception(), matches_zline(), InspIRCd::SE, ServerConfig::ServerName, ServerConfig::SoftLimit, TIME, ucrec::uc_modes, and X_ESTAB_CLIENT.
+.PP
+.nf
+525 {
+526 string tempnick;
+527 char tn2[MAXBUF];
+528 user_hash::iterator iter;
+529
+530 tempnick = ConvToStr(socket) + '-unknown';
+531 sprintf(tn2,'%lu-unknown',(unsigned long)socket);
+532
+533 iter = clientlist.find(tempnick);
+534
+535 // fix by brain.
+536 // as these nicknames are 'RFC impossible', we can be sure nobody is going to be
+537 // using one as a registered connection. As theyre per fd, we can also safely assume
+538 // that we wont have collisions. Therefore, if the nick exists in the list, its only
+539 // used by a dead socket, erase the iterator so that the new client may reclaim it.
+540 // this was probably the cause of 'server ignores me when i hammer it with reconnects'
+541 // issue in earlier alphas/betas
+542 if (iter != clientlist.end())
+543 {
+544 userrec* goner = iter->second;
+545 delete goner;
+546 clientlist.erase(iter);
+547 }
+548
+549 /*
+550 * It is OK to access the value here this way since we know
+551 * it exists, we just created it above.
+552 *
+553 * At NO other time should you access a value in a map or a
+554 * hash_map this way.
+555 */
+556 clientlist[tempnick] = new userrec();
+557
+558 log(DEBUG,'AddClient: %lu %s %d %s',(unsigned long)socket,host,port,ip);
+559
+560 clientlist[tempnick]->fd = socket;
+561 strlcpy(clientlist[tempnick]->nick, tn2,NICKMAX);
+562 strlcpy(clientlist[tempnick]->host, host,160);
+563 strlcpy(clientlist[tempnick]->dhost, host,160);
+564 clientlist[tempnick]->server = (char*)FindServerNamePtr(Config->ServerName);
+565 strlcpy(clientlist[tempnick]->ident, 'unknown',IDENTMAX);
+566 clientlist[tempnick]->registered = 0;
+567 clientlist[tempnick]->signon = TIME + Config->dns_timeout;
+568 clientlist[tempnick]->lastping = 1;
+569 clientlist[tempnick]->port = port;
+570 strlcpy(clientlist[tempnick]->ip,ip,16);
+571
+572 // set the registration timeout for this user
+573 unsigned long class_regtimeout = 90;
+574 int class_flood = 0;
+575 long class_threshold = 5;
+576 long class_sqmax = 262144; // 256kb
+577 long class_rqmax = 4096; // 4k
+578
+579 for (ClassVector::iterator i = Config->Classes.begin(); i != Config->Classes.end(); i++)
+580 {
+581 if (match(clientlist[tempnick]->host,i->host) && (i->type == CC_ALLOW))
+582 {
+583 class_regtimeout = (unsigned long)i->registration_timeout;
+584 class_flood = i->flood;
+585 clientlist[tempnick]->pingmax = i->pingtime;
+586 class_threshold = i->threshold;
+587 class_sqmax = i->sendqmax;
+588 class_rqmax = i->recvqmax;
+589 break;
+590 }
+591 }
+592
+593 clientlist[tempnick]->nping = TIME+clientlist[tempnick]->pingmax + Config->dns_timeout;
+594 clientlist[tempnick]->timeout = TIME+class_regtimeout;
+595 clientlist[tempnick]->flood = class_flood;
+596 clientlist[tempnick]->threshold = class_threshold;
+597 clientlist[tempnick]->sendqmax = class_sqmax;
+598 clientlist[tempnick]->recvqmax = class_rqmax;
+599
+600 ucrec a;
+601 a.channel = NULL;
+602 a.uc_modes = 0;
+603 for (int i = 0; i < MAXCHANS; i++)
+604 clientlist[tempnick]->chans.push_back(a);
+605
+606 if (clientlist.size() > Config->SoftLimit)
+607 {
+608 kill_link(clientlist[tempnick],'No more connections allowed');
+609 return;
+610 }
+611
+612 if (clientlist.size() >= MAXCLIENTS)
+613 {
+614 kill_link(clientlist[tempnick],'No more connections allowed');
+615 return;
+616 }
+617
+618 // this is done as a safety check to keep the file descriptors within range of fd_ref_table.
+619 // its a pretty big but for the moment valid assumption:
+620 // file descriptors are handed out starting at 0, and are recycled as theyre freed.
+621 // therefore if there is ever an fd over 65535, 65536 clients must be connected to the
+622 // irc server at once (or the irc server otherwise initiating this many connections, files etc)
+623 // which for the time being is a physical impossibility (even the largest networks dont have more
+624 // than about 10,000 users on ONE server!)
+625 if ((unsigned)socket > 65534)
+626 {
+627 kill_link(clientlist[tempnick],'Server is full');
+628 return;
+629 }
+630 char* e = matches_exception(ip);
+631 if (!e)
+632 {
+633 char* r = matches_zline(ip);
+634 if (r)
+635 {
+636 char reason[MAXBUF];
+637 snprintf(reason,MAXBUF,'Z-Lined: %s',r);
+638 kill_link(clientlist[tempnick],reason);
+639 return;
+640 }
+641 }
+642 fd_ref_table[socket] = clientlist[tempnick];
+643 local_users.push_back(clientlist[tempnick]);
+644 ServerInstance->SE->AddFd(socket,true,X_ESTAB_CLIENT);
+645 }
+.fi
+.PP
+.SS "void AddOper (\fBuserrec\fP * user)"
+.PP
+Definition at line 330 of file users.cpp.
+.PP
+References all_opers, DEBUG, and log().
+.PP
+.nf
+331 {
+332 log(DEBUG,'Oper added to optimization list');
+333 all_opers.push_back(user);
+334 }
+.fi
+.PP
+.SS "void AddWhoWas (\fBuserrec\fP * u)"
+.PP
+Definition at line 471 of file users.cpp.
+.PP
+References DEBUG, userrec::dhost, WhoWasUser::dhost, userrec::fullname, WhoWasUser::fullname, connection::host, WhoWasUser::host, userrec::ident, WhoWasUser::ident, log(), WhoWasUser::nick, userrec::nick, userrec::server, WhoWasUser::server, connection::signon, WhoWasUser::signon, TIME, whowas, WHOWAS_MAX, and WHOWAS_STALE.
+.PP
+Referenced by kill_link().
+.PP
+.nf
+472 {
+473 whowas_hash::iterator iter = whowas.find(u->nick);
+474 WhoWasUser *a = new WhoWasUser();
+475 strlcpy(a->nick,u->nick,NICKMAX);
+476 strlcpy(a->ident,u->ident,IDENTMAX);
+477 strlcpy(a->dhost,u->dhost,160);
+478 strlcpy(a->host,u->host,160);
+479 strlcpy(a->fullname,u->fullname,MAXGECOS);
+480 strlcpy(a->server,u->server,256);
+481 a->signon = u->signon;
+482
+483 /* MAX_WHOWAS: max number of /WHOWAS items
+484 * WHOWAS_STALE: number of hours before a WHOWAS item is marked as stale and
+485 * can be replaced by a newer one
+486 */
+487
+488 if (iter == whowas.end())
+489 {
+490 if (whowas.size() >= (unsigned)WHOWAS_MAX)
+491 {
+492 for (whowas_hash::iterator i = whowas.begin(); i != whowas.end(); i++)
+493 {
+494 // 3600 seconds in an hour ;)
+495 if ((i->second->signon)<(TIME-(WHOWAS_STALE*3600)))
+496 {
+497 // delete the old one
+498 if (i->second) delete i->second;
+499 // replace with new one
+500 i->second = a;
+501 log(DEBUG,'added WHOWAS entry, purged an old record');
+502 return;
+503 }
+504 }
+505 // no space left and user doesnt exist. Don't leave ram in use!
+506 log(DEBUG,'Not able to update whowas (list at WHOWAS_MAX entries and trying to add new?), freeing excess ram');
+507 delete a;
+508 }
+509 else
+510 {
+511 log(DEBUG,'added fresh WHOWAS entry');
+512 whowas[a->nick] = a;
+513 }
+514 }
+515 else
+516 {
+517 log(DEBUG,'updated WHOWAS entry');
+518 if (iter->second) delete iter->second;
+519 iter->second = a;
+520 }
+521 }
+.fi
+.PP
+.SS "void ConnectUser (\fBuserrec\fP * user)"
+.PP
+Definition at line 731 of file users.cpp.
+.PP
+References userrec::dns_done, FullConnectUser(), and connection::registered.
+.PP
+.nf
+732 {
+733 // dns is already done, things are fast. no need to wait for dns to complete just pass them straight on
+734 if ((user->dns_done) && (user->registered >= 3) && (AllModulesReportReady(user)))
+735 {
+736 FullConnectUser(user);
+737 }
+738 }
+.fi
+.PP
+.SS "template<typename T> \fBstring\fP ConvToStr (const T & in)\fC [inline]\fP"
+.PP
+Definition at line 56 of file users.cpp.
+.PP
+Referenced by AddClient().
+.PP
+.nf
+57 {
+58 stringstream tmp;
+59 if (!(tmp << in)) return string();
+60 return tmp.str();
+61 }
+.fi
+.PP
+.SS "void DeleteOper (\fBuserrec\fP * user)"
+.PP
+Definition at line 336 of file users.cpp.
+.PP
+References all_opers, DEBUG, and log().
+.PP
+.nf
+337 {
+338 for (std::vector<userrec*>::iterator a = all_opers.begin(); a < all_opers.end(); a++)
+339 {
+340 if (*a == user)
+341 {
+342 log(DEBUG,'Oper removed from optimization list');
+343 all_opers.erase(a);
+344 return;
+345 }
+346 }
+347 }
+.fi
+.PP
+.SS "void force_nickchange (\fBuserrec\fP * user, const char * newnick)"
+.PP
+Definition at line 769 of file users.cpp.
+.PP
+References FOREACH_RESULT, kill_link(), matches_qline(), InspIRCd::Parser, connection::registered, InspIRCd::stats, and serverstats::statsCollisions.
+.PP
+Referenced by Server::ChangeUserNick().
+.PP
+.nf
+770 {
+771 char nick[MAXBUF];
+772 int MOD_RESULT = 0;
+773
+774 strcpy(nick,'');
+775
+776 FOREACH_RESULT(OnUserPreNick(user,newnick));
+777 if (MOD_RESULT) {
+778 ServerInstance->stats->statsCollisions++;
+779 kill_link(user,'Nickname collision');
+780 return;
+781 }
+782 if (matches_qline(newnick))
+783 {
+784 ServerInstance->stats->statsCollisions++;
+785 kill_link(user,'Nickname collision');
+786 return;
+787 }
+788
+789 if (user)
+790 {
+791 if (newnick)
+792 {
+793 strncpy(nick,newnick,MAXBUF);
+794 }
+795 if (user->registered == 7)
+796 {
+797 char* pars[1];
+798 pars[0] = nick;
+799 std::string cmd = 'NICK';
+800 ServerInstance->Parser->CallHandler(cmd,pars,1,user);
+801 }
+802 }
+803 }
+.fi
+.PP
+.SS "void FullConnectUser (\fBuserrec\fP * user)"
+.PP
+Definition at line 647 of file users.cpp.
+.PP
+References DEBUG, connection::fd, FOREACH_MOD, connection::haspassed, connection::host, userrec::ident, connection::idle_lastmsg, connection::ip, kill_link(), kill_link_silent(), log(), matches_exception(), matches_gline(), matches_kline(), ServerConfig::Network, userrec::nick, connection::port, connection::registered, ServerConfig::ServerName, InspIRCd::stats, serverstats::statsConnects, TIME, WriteOpers(), and WriteServ().
+.PP
+Referenced by ConnectUser().
+.PP
+.nf
+648 {
+649 ServerInstance->stats->statsConnects++;
+650 user->idle_lastmsg = TIME;
+651 log(DEBUG,'ConnectUser: %s',user->nick);
+652
+653 if ((strcmp(Passwd(user),'')) && (!user->haspassed))
+654 {
+655 kill_link(user,'Invalid password');
+656 return;
+657 }
+658 if (IsDenied(user))
+659 {
+660 kill_link(user,'Unauthorised connection');
+661 return;
+662 }
+663
+664 char match_against[MAXBUF];
+665 snprintf(match_against,MAXBUF,'%s@%s',user->ident,user->host);
+666 char* e = matches_exception(match_against);
+667 if (!e)
+668 {
+669 char* r = matches_gline(match_against);
+670 if (r)
+671 {
+672 char reason[MAXBUF];
+673 snprintf(reason,MAXBUF,'G-Lined: %s',r);
+674 kill_link_silent(user,reason);
+675 return;
+676 }
+677 r = matches_kline(user->host);
+678 if (r)
+679 {
+680 char reason[MAXBUF];
+681 snprintf(reason,MAXBUF,'K-Lined: %s',r);
+682 kill_link_silent(user,reason);
+683 return;
+684 }
+685 }
+686
+687
+688 WriteServ(user->fd,'NOTICE Auth :Welcome to \002%s\002!',Config->Network);
+689 WriteServ(user->fd,'001 %s :Welcome to the %s IRC Network %s!%s@%s',user->nick,Config->Network,user->nick,user->ident,user->host);
+690 WriteServ(user->fd,'002 %s :Your host is %s, running version %s',user->nick,Config->ServerName,VERSION);
+691 WriteServ(user->fd,'003 %s :This server was created %s %s',user->nick,__TIME__,__DATE__);
+692 WriteServ(user->fd,'004 %s %s %s iowghraAsORVSxNCWqBzvdHtGI lvhopsmntikrRcaqOALQbSeKVfHGCuzN',user->nick,Config->ServerName,VERSION);
+693 // the neatest way to construct the initial 005 numeric, considering the number of configure constants to go in it...
+694 std::stringstream v;
+695 v << 'WALLCHOPS MODES=13 CHANTYPES=# PREFIX=(ohv)@%+ MAP SAFELIST MAXCHANNELS=' << MAXCHANS;
+696 v << ' MAXBANS=60 NICKLEN=' << NICKMAX;
+697 v << ' TOPICLEN=' << MAXTOPIC << ' KICKLEN=' << MAXKICK << ' MAXTARGETS=20 AWAYLEN=' << MAXAWAY << ' CHANMODES=ohvb,k,l,psmnti NETWORK=';
+698 v << Config->Network;
+699 std::string data005 = v.str();
+700 FOREACH_MOD On005Numeric(data005);
+701 // anfl @ #ratbox, efnet reminded me that according to the RFC this cant contain more than 13 tokens per line...
+702 // so i'd better split it :)
+703 std::stringstream out(data005);
+704 std::string token = '';
+705 std::string line5 = '';
+706 int token_counter = 0;
+707 while (!out.eof())
+708 {
+709 out >> token;
+710 line5 = line5 + token + ' ';
+711 token_counter++;
+712 if ((token_counter >= 13) || (out.eof() == true))
+713 {
+714 WriteServ(user->fd,'005 %s %s:are supported by this server',user->nick,line5.c_str());
+715 line5 = '';
+716 token_counter = 0;
+717 }
+718 }
+719 ShowMOTD(user);
+720
+721 // fix 3 by brain, move registered = 7 below these so that spurious modes and host changes dont go out
+722 // onto the network and produce 'fake direction'
+723 FOREACH_MOD OnUserConnect(user);
+724 FOREACH_MOD OnGlobalConnect(user);
+725 user->registered = 7;
+726 WriteOpers('*** Client connecting on port %lu: %s!%s@%s [%s]',(unsigned long)user->port,user->nick,user->ident,user->host,user->ip);
+727 }
+.fi
+.PP
+.SS "void kill_link (\fBuserrec\fP * user, const char * r)"
+.PP
+Definition at line 349 of file users.cpp.
+.PP
+References AddWhoWas(), clientlist, userrec::CloseSocket(), DEBUG, SocketEngine::DelFd(), connection::fd, userrec::FlushWriteBuf(), FOREACH_MOD, ServerConfig::GetIOHook(), connection::host, userrec::ident, local_users, log(), userrec::nick, Module::OnRawSocketClose(), connection::port, connection::registered, InspIRCd::SE, Write(), WriteCommonExcept(), and WriteOpers().
+.PP
+Referenced by AddClient(), force_nickchange(), FullConnectUser(), Server::PseudoToUser(), and Server::QuitUser().
+.PP
+.nf
+350 {
+351 user_hash::iterator iter = clientlist.find(user->nick);
+352
+353 char reason[MAXBUF];
+354
+355 strncpy(reason,r,MAXBUF);
+356
+357 if (strlen(reason)>MAXQUIT)
+358 {
+359 reason[MAXQUIT-1] = '\0';
+360 }
+361
+362 log(DEBUG,'kill_link: %s '%s'',user->nick,reason);
+363 Write(user->fd,'ERROR :Closing link (%s@%s) [%s]',user->ident,user->host,reason);
+364 log(DEBUG,'closing fd %lu',(unsigned long)user->fd);
+365
+366 if (user->registered == 7) {
+367 FOREACH_MOD OnUserQuit(user,reason);
+368 WriteCommonExcept(user,'QUIT :%s',reason);
+369 }
+370
+371 user->FlushWriteBuf();
+372
+373 FOREACH_MOD OnUserDisconnect(user);
+374
+375 if (user->fd > -1)
+376 {
+377 if (Config->GetIOHook(user->port))
+378 {
+379 Config->GetIOHook(user->port)->OnRawSocketClose(user->fd);
+380 }
+381 ServerInstance->SE->DelFd(user->fd);
+382 user->CloseSocket();
+383 }
+384
+385 // this must come before the WriteOpers so that it doesnt try to fill their buffer with anything
+386 // if they were an oper with +s.
+387 if (user->registered == 7) {
+388 purge_empty_chans(user);
+389 // fix by brain: only show local quits because we only show local connects (it just makes SENSE)
+390 if (user->fd > -1)
+391 WriteOpers('*** Client exiting: %s!%s@%s [%s]',user->nick,user->ident,user->host,reason);
+392 AddWhoWas(user);
+393 }
+394
+395 if (iter != clientlist.end())
+396 {
+397 log(DEBUG,'deleting user hash value %lu',(unsigned long)user);
+398 if (user->fd > -1)
+399 {
+400 fd_ref_table[user->fd] = NULL;
+401 if (find(local_users.begin(),local_users.end(),user) != local_users.end())
+402 {
+403 local_users.erase(find(local_users.begin(),local_users.end(),user));
+404 log(DEBUG,'Delete local user');
+405 }
+406 }
+407 clientlist.erase(iter);
+408 }
+409 delete user;
+410 }
+.fi
+.PP
+.SS "void kill_link_silent (\fBuserrec\fP * user, const char * r)"
+.PP
+Definition at line 412 of file users.cpp.
+.PP
+References clientlist, userrec::CloseSocket(), DEBUG, SocketEngine::DelFd(), connection::fd, userrec::FlushWriteBuf(), FOREACH_MOD, ServerConfig::GetIOHook(), connection::host, userrec::ident, local_users, log(), userrec::nick, Module::OnRawSocketClose(), connection::port, connection::registered, InspIRCd::SE, Write(), and WriteCommonExcept().
+.PP
+Referenced by FullConnectUser().
+.PP
+.nf
+413 {
+414 user_hash::iterator iter = clientlist.find(user->nick);
+415
+416 char reason[MAXBUF];
+417
+418 strncpy(reason,r,MAXBUF);
+419
+420 if (strlen(reason)>MAXQUIT)
+421 {
+422 reason[MAXQUIT-1] = '\0';
+423 }
+424
+425 log(DEBUG,'kill_link: %s '%s'',user->nick,reason);
+426 Write(user->fd,'ERROR :Closing link (%s@%s) [%s]',user->ident,user->host,reason);
+427 log(DEBUG,'closing fd %lu',(unsigned long)user->fd);
+428
+429 user->FlushWriteBuf();
+430
+431 if (user->registered == 7) {
+432 FOREACH_MOD OnUserQuit(user,reason);
+433 WriteCommonExcept(user,'QUIT :%s',reason);
+434 }
+435
+436 FOREACH_MOD OnUserDisconnect(user);
+437
+438 if (user->fd > -1)
+439 {
+440 if (Config->GetIOHook(user->port))
+441 {
+442 Config->GetIOHook(user->port)->OnRawSocketClose(user->fd);
+443 }
+444 ServerInstance->SE->DelFd(user->fd);
+445 user->CloseSocket();
+446 }
+447
+448 if (user->registered == 7) {
+449 purge_empty_chans(user);
+450 }
+451
+452 if (iter != clientlist.end())
+453 {
+454 log(DEBUG,'deleting user hash value %lu',(unsigned long)user);
+455 if (user->fd > -1)
+456 {
+457 fd_ref_table[user->fd] = NULL;
+458 if (find(local_users.begin(),local_users.end(),user) != local_users.end())
+459 {
+460 log(DEBUG,'Delete local user');
+461 local_users.erase(find(local_users.begin(),local_users.end(),user));
+462 }
+463 }
+464 clientlist.erase(iter);
+465 }
+466 delete user;
+467 }
+.fi
+.PP
+.SS "\fBuserrec\fP* ReHashNick (char * Old, char * New)"
+.PP
+Definition at line 743 of file users.cpp.
+.PP
+References clientlist, DEBUG, and log().
+.PP
+.nf
+744 {
+745 //user_hash::iterator newnick;
+746 user_hash::iterator oldnick = clientlist.find(Old);
+747
+748 log(DEBUG,'ReHashNick: %s %s',Old,New);
+749
+750 if (!strcasecmp(Old,New))
+751 {
+752 log(DEBUG,'old nick is new nick, skipping');
+753 return oldnick->second;
+754 }
+755
+756 if (oldnick == clientlist.end()) return NULL; /* doesnt exist */
+757
+758 log(DEBUG,'ReHashNick: Found hashed nick %s',Old);
+759
+760 userrec* olduser = oldnick->second;
+761 clientlist[New] = olduser;
+762 clientlist.erase(oldnick);
+763
+764 log(DEBUG,'ReHashNick: Nick rehashed as %s',New);
+765
+766 return clientlist[New];
+767 }
+.fi
+.PP
.SH "Author"
.PP
Generated automatically by Doxygen for InspIRCd from the source code.
diff --git a/docs/man/man3/xline.h.3 b/docs/man/man3/xline.h.3
index bac860eff..feca7ea4a 100644
--- a/docs/man/man3/xline.h.3
+++ b/docs/man/man3/xline.h.3
@@ -1,4 +1,4 @@
-.TH "xline.h" 3 "15 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.TH "xline.h" 3 "19 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
.ad l
.nh
.SH NAME
@@ -202,14 +202,19 @@ Referenced by Server::DelZLine().
.PP
.SS "char* matches_exception (const char * host)"
.PP
+Referenced by AddClient(), and FullConnectUser().
.SS "char* matches_gline (const char * host)"
.PP
+Referenced by FullConnectUser().
.SS "char* matches_kline (const char * host)"
.PP
+Referenced by FullConnectUser().
.SS "char* matches_qline (const char * nick)"
.PP
+Referenced by force_nickchange().
.SS "char* matches_zline (const char * ipaddr)"
.PP
+Referenced by AddClient().
.SS "bool qline_make_global (const char * nickname)"
.PP
.SS "void qline_set_creation_time (char * nick, time_t create_time)"