summaryrefslogtreecommitdiff
path: root/docs/man
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-14 19:17:41 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-14 19:17:41 +0000
commita96514c284514116300794696f062c7fa6b1f79f (patch)
treeb7b26583dcf354313f74613e604bd9c5dbb52acb /docs/man
parentc4a345fe9903643a716ebf4c1df35fe28036bf4d (diff)
Added new docs for class InspIRCd and globals.h etc
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2451 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'docs/man')
-rw-r--r--docs/man/man3/Admin.34
-rw-r--r--docs/man/man3/BanItem.32
-rw-r--r--docs/man/man3/ConfigReader.3264
-rw-r--r--docs/man/man3/Event.338
-rw-r--r--docs/man/man3/ExemptItem.32
-rw-r--r--docs/man/man3/FileReader.382
-rw-r--r--docs/man/man3/HostItem.316
-rw-r--r--docs/man/man3/InspIRCd.371
-rw-r--r--docs/man/man3/InspSocket.36
-rw-r--r--docs/man/man3/InviteItem.32
-rw-r--r--docs/man/man3/ModeParameter.38
-rw-r--r--docs/man/man3/Module.3324
-rw-r--r--docs/man/man3/Request.350
-rw-r--r--docs/man/man3/Server.3786
-rw-r--r--docs/man/man3/ServerConfig.321
-rw-r--r--docs/man/man3/SocketEngine.38
-rw-r--r--docs/man/man3/Version.34
-rw-r--r--docs/man/man3/_home_brain_inspircd-cvs_inspircd_include_.36
-rw-r--r--docs/man/man3/channels.cpp.3432
-rw-r--r--docs/man/man3/channels.h.3384
-rw-r--r--docs/man/man3/chanrec.3272
-rw-r--r--docs/man/man3/command_t.34
-rw-r--r--docs/man/man3/commands.h.32
-rw-r--r--docs/man/man3/connection.32
-rw-r--r--docs/man/man3/globals.h.3174
-rw-r--r--docs/man/man3/inspircd.h.3271
-rw-r--r--docs/man/man3/inspircd_io.h.313
-rw-r--r--docs/man/man3/message.h.36
-rw-r--r--docs/man/man3/modules.cpp.3197
-rw-r--r--docs/man/man3/modules.h.3153
-rw-r--r--docs/man/man3/serverstats.3126
-rw-r--r--docs/man/man3/typedefs.h.36
-rw-r--r--docs/man/man3/ucrec.318
-rw-r--r--docs/man/man3/userrec.324
-rw-r--r--docs/man/man3/users.h.32
35 files changed, 2690 insertions, 1090 deletions
diff --git a/docs/man/man3/Admin.3 b/docs/man/man3/Admin.3
index 31a231609..b2148e15a 100644
--- a/docs/man/man3/Admin.3
+++ b/docs/man/man3/Admin.3
@@ -43,10 +43,10 @@ Definition at line 125 of file modules.h.
.PP
.SS "Admin::Admin (\fBstd::string\fP name, \fBstd::string\fP email, \fBstd::string\fP nick)"
.PP
-Definition at line 171 of file modules.cpp.
+Definition at line 163 of file modules.cpp.
.PP
.nf
-171 : Name(name), Email(email), Nick(nick) { };
+163 : Name(name), Email(email), Nick(nick) { };
.fi
.PP
.SH "Member Data Documentation"
diff --git a/docs/man/man3/BanItem.3 b/docs/man/man3/BanItem.3
index ae351b6a6..3b5a630f2 100644
--- a/docs/man/man3/BanItem.3
+++ b/docs/man/man3/BanItem.3
@@ -16,7 +16,7 @@ Inherits \fBHostItem\fP.
.PP
A subclass of \fBHostItem\fP designed to hold channel bans (+b).
.PP
-Definition at line 52 of file channels.h.
+Definition at line 54 of file channels.h.
.SH "Author"
.PP
diff --git a/docs/man/man3/ConfigReader.3 b/docs/man/man3/ConfigReader.3
index f0236bfe9..4812464bd 100644
--- a/docs/man/man3/ConfigReader.3
+++ b/docs/man/man3/ConfigReader.3
@@ -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 739 of file modules.cpp.
+Definition at line 731 of file modules.cpp.
.PP
References cache, ServerConfig::ClearStack(), CONF_FILE_NOT_FOUND, error, errorlog, ServerConfig::LoadConf(), and readerror.
.PP
.nf
-740 {
-741 Config->ClearStack();
-742 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
-743 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
-744 this->readerror = Config->LoadConf(CONFIG_FILE,this->cache,this->errorlog);
-745 if (!this->readerror)
-746 this->error = CONF_FILE_NOT_FOUND;
-747 }
+732 {
+733 Config->ClearStack();
+734 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
+735 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
+736 this->readerror = Config->LoadConf(CONFIG_FILE,this->cache,this->errorlog);
+737 if (!this->readerror)
+738 this->error = CONF_FILE_NOT_FOUND;
+739 }
.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 759 of file modules.cpp.
+Definition at line 751 of file modules.cpp.
.PP
References cache, ServerConfig::ClearStack(), CONF_FILE_NOT_FOUND, error, errorlog, ServerConfig::LoadConf(), and readerror.
.PP
.nf
-760 {
-761 Config->ClearStack();
-762 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
-763 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
-764 this->readerror = Config->LoadConf(filename.c_str(),this->cache,this->errorlog);
-765 if (!this->readerror)
-766 this->error = CONF_FILE_NOT_FOUND;
-767 };
+752 {
+753 Config->ClearStack();
+754 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
+755 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
+756 this->readerror = Config->LoadConf(filename.c_str(),this->cache,this->errorlog);
+757 if (!this->readerror)
+758 this->error = CONF_FILE_NOT_FOUND;
+759 };
.fi
.PP
.SS "ConfigReader::~ConfigReader ()"
@@ -135,17 +135,17 @@ Default destructor.
.PP
This method destroys the ConfigReader class.
.PP
-Definition at line 750 of file modules.cpp.
+Definition at line 742 of file modules.cpp.
.PP
References cache, and errorlog.
.PP
.nf
-751 {
-752 if (this->cache)
-753 delete this->cache;
-754 if (this->errorlog)
-755 delete this->errorlog;
-756 }
+743 {
+744 if (this->cache)
+745 delete this->cache;
+746 if (this->errorlog)
+747 delete this->errorlog;
+748 }
.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 838 of file modules.cpp.
+Definition at line 830 of file modules.cpp.
.PP
-References errorlog, connection::fd, and userrec::nick.
+References errorlog, connection::fd, userrec::nick, WriteOpers(), and WriteServ().
.PP
.nf
-839 {
-840 if (bail)
-841 {
-842 printf('There were errors in your configuration:\n%s',errorlog->str().c_str());
-843 exit(0);
-844 }
-845 else
-846 {
-847 char dataline[1024];
-848 if (user)
-849 {
-850 WriteServ(user->fd,'NOTICE %s :There were errors in the configuration file:',user->nick);
-851 while (!errorlog->eof())
-852 {
-853 errorlog->getline(dataline,1024);
-854 WriteServ(user->fd,'NOTICE %s :%s',user->nick,dataline);
-855 }
-856 }
-857 else
-858 {
-859 WriteOpers('There were errors in the configuration file:',user->nick);
-860 while (!errorlog->eof())
-861 {
-862 errorlog->getline(dataline,1024);
-863 WriteOpers(dataline);
-864 }
-865 }
-866 return;
-867 }
-868 }
+831 {
+832 if (bail)
+833 {
+834 printf('There were errors in your configuration:\n%s',errorlog->str().c_str());
+835 exit(0);
+836 }
+837 else
+838 {
+839 char dataline[1024];
+840 if (user)
+841 {
+842 WriteServ(user->fd,'NOTICE %s :There were errors in the configuration file:',user->nick);
+843 while (!errorlog->eof())
+844 {
+845 errorlog->getline(dataline,1024);
+846 WriteServ(user->fd,'NOTICE %s :%s',user->nick,dataline);
+847 }
+848 }
+849 else
+850 {
+851 WriteOpers('There were errors in the configuration file:',user->nick);
+852 while (!errorlog->eof())
+853 {
+854 errorlog->getline(dataline,1024);
+855 WriteOpers(dataline);
+856 }
+857 }
+858 return;
+859 }
+860 }
.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 871 of file modules.cpp.
+Definition at line 863 of file modules.cpp.
.PP
References cache, and ServerConfig::EnumConf().
.PP
.nf
-872 {
-873 return Config->EnumConf(cache,tag.c_str());
-874 }
+864 {
+865 return Config->EnumConf(cache,tag.c_str());
+866 }
.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 876 of file modules.cpp.
+Definition at line 868 of file modules.cpp.
.PP
References cache, and ServerConfig::EnumValues().
.PP
.nf
-877 {
-878 return Config->EnumValues(cache, tag.c_str(), index);
-879 }
+869 {
+870 return Config->EnumValues(cache, tag.c_str(), index);
+871 }
.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 831 of file modules.cpp.
+Definition at line 823 of file modules.cpp.
.PP
References error.
.PP
.nf
-832 {
-833 long olderr = this->error;
-834 this->error = 0;
-835 return olderr;
-836 }
+824 {
+825 long olderr = this->error;
+826 this->error = 0;
+827 return olderr;
+828 }
.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 785 of file modules.cpp.
+Definition at line 777 of file modules.cpp.
.PP
References cache, CONF_VALUE_NOT_FOUND, error, and ServerConfig::ReadConf().
.PP
.nf
-786 {
-787 char val[MAXBUF];
-788 char t[MAXBUF];
-789 char n[MAXBUF];
-790 strlcpy(t,tag.c_str(),MAXBUF);
-791 strlcpy(n,name.c_str(),MAXBUF);
-792 int res = Config->ReadConf(cache,t,n,index,val);
-793 if (!res)
-794 {
-795 this->error = CONF_VALUE_NOT_FOUND;
-796 return false;
-797 }
-798 std::string s = val;
-799 return ((s == 'yes') || (s == 'YES') || (s == 'true') || (s == 'TRUE') || (s == '1'));
-800 }
+778 {
+779 char val[MAXBUF];
+780 char t[MAXBUF];
+781 char n[MAXBUF];
+782 strlcpy(t,tag.c_str(),MAXBUF);
+783 strlcpy(n,name.c_str(),MAXBUF);
+784 int res = Config->ReadConf(cache,t,n,index,val);
+785 if (!res)
+786 {
+787 this->error = CONF_VALUE_NOT_FOUND;
+788 return false;
+789 }
+790 std::string s = val;
+791 return ((s == 'yes') || (s == 'YES') || (s == 'true') || (s == 'TRUE') || (s == '1'));
+792 }
.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 802 of file modules.cpp.
+Definition at line 794 of file modules.cpp.
.PP
References cache, CONF_NOT_A_NUMBER, CONF_NOT_UNSIGNED, CONF_VALUE_NOT_FOUND, error, and ServerConfig::ReadConf().
.PP
.nf
-803 {
-804 char val[MAXBUF];
-805 char t[MAXBUF];
-806 char n[MAXBUF];
-807 strlcpy(t,tag.c_str(),MAXBUF);
-808 strlcpy(n,name.c_str(),MAXBUF);
-809 int res = Config->ReadConf(cache,t,n,index,val);
-810 if (!res)
-811 {
-812 this->error = CONF_VALUE_NOT_FOUND;
-813 return 0;
+795 {
+796 char val[MAXBUF];
+797 char t[MAXBUF];
+798 char n[MAXBUF];
+799 strlcpy(t,tag.c_str(),MAXBUF);
+800 strlcpy(n,name.c_str(),MAXBUF);
+801 int res = Config->ReadConf(cache,t,n,index,val);
+802 if (!res)
+803 {
+804 this->error = CONF_VALUE_NOT_FOUND;
+805 return 0;
+806 }
+807 for (unsigned int i = 0; i < strlen(val); i++)
+808 {
+809 if (!isdigit(val[i]))
+810 {
+811 this->error = CONF_NOT_A_NUMBER;
+812 return 0;
+813 }
814 }
-815 for (unsigned int i = 0; i < strlen(val); i++)
+815 if ((needs_unsigned) && (atoi(val)<0))
816 {
-817 if (!isdigit(val[i]))
-818 {
-819 this->error = CONF_NOT_A_NUMBER;
-820 return 0;
-821 }
-822 }
-823 if ((needs_unsigned) && (atoi(val)<0))
-824 {
-825 this->error = CONF_NOT_UNSIGNED;
-826 return 0;
-827 }
-828 return atoi(val);
-829 }
+817 this->error = CONF_NOT_UNSIGNED;
+818 return 0;
+819 }
+820 return atoi(val);
+821 }
.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 769 of file modules.cpp.
+Definition at line 761 of file modules.cpp.
.PP
References cache, CONF_VALUE_NOT_FOUND, error, and ServerConfig::ReadConf().
.PP
.nf
-770 {
-771 char val[MAXBUF];
-772 char t[MAXBUF];
-773 char n[MAXBUF];
-774 strlcpy(t,tag.c_str(),MAXBUF);
-775 strlcpy(n,name.c_str(),MAXBUF);
-776 int res = Config->ReadConf(cache,t,n,index,val);
-777 if (!res)
-778 {
-779 this->error = CONF_VALUE_NOT_FOUND;
-780 return '';
-781 }
-782 return val;
-783 }
+762 {
+763 char val[MAXBUF];
+764 char t[MAXBUF];
+765 char n[MAXBUF];
+766 strlcpy(t,tag.c_str(),MAXBUF);
+767 strlcpy(n,name.c_str(),MAXBUF);
+768 int res = Config->ReadConf(cache,t,n,index,val);
+769 if (!res)
+770 {
+771 this->error = CONF_VALUE_NOT_FOUND;
+772 return '';
+773 }
+774 return val;
+775 }
.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 881 of file modules.cpp.
+Definition at line 873 of file modules.cpp.
.PP
References readerror.
.PP
.nf
-882 {
-883 return this->readerror;
-884 }
+874 {
+875 return this->readerror;
+876 }
.fi
.PP
.SH "Member Data Documentation"
diff --git a/docs/man/man3/Event.3 b/docs/man/man3/Event.3
index d47289f04..36017ae32 100644
--- a/docs/man/man3/Event.3
+++ b/docs/man/man3/Event.3
@@ -65,10 +65,10 @@ Definition at line 197 of file modules.h.
.PP
Create a new Event.
.PP
-Definition at line 202 of file modules.cpp.
+Definition at line 194 of file modules.cpp.
.PP
.nf
-202 : data(anydata), source(src), id(eventid) { };
+194 : data(anydata), source(src), id(eventid) { };
.fi
.PP
.SH "Member Function Documentation"
@@ -77,14 +77,14 @@ Definition at line 202 of file modules.cpp.
.PP
Get the Event data.
.PP
-Definition at line 204 of file modules.cpp.
+Definition at line 196 of file modules.cpp.
.PP
References data.
.PP
.nf
-205 {
-206 return this->data;
-207 }
+197 {
+198 return this->data;
+199 }
.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 220 of file modules.cpp.
+Definition at line 212 of file modules.cpp.
.PP
References id.
.PP
.nf
-221 {
-222 return this->id;
-223 }
+213 {
+214 return this->id;
+215 }
.fi
.PP
.SS "\fBModule\fP * Event::GetSource ()"
.PP
Get the event Source.
.PP
-Definition at line 209 of file modules.cpp.
+Definition at line 201 of file modules.cpp.
.PP
References source.
.PP
.nf
-210 {
-211 return this->source;
-212 }
+202 {
+203 return this->source;
+204 }
.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 214 of file modules.cpp.
+Definition at line 206 of file modules.cpp.
.PP
References FOREACH_MOD.
.PP
.nf
-215 {
-216 FOREACH_MOD OnEvent(this);
-217 return NULL;
-218 }
+207 {
+208 FOREACH_MOD OnEvent(this);
+209 return NULL;
+210 }
.fi
.PP
.SH "Member Data Documentation"
diff --git a/docs/man/man3/ExemptItem.3 b/docs/man/man3/ExemptItem.3
index 2420d3566..6ff6339ed 100644
--- a/docs/man/man3/ExemptItem.3
+++ b/docs/man/man3/ExemptItem.3
@@ -16,7 +16,7 @@ Inherits \fBHostItem\fP.
.PP
A subclass of \fBHostItem\fP designed to hold channel exempts (+e).
.PP
-Definition at line 60 of file channels.h.
+Definition at line 62 of file channels.h.
.SH "Author"
.PP
diff --git a/docs/man/man3/FileReader.3 b/docs/man/man3/FileReader.3
index f9688416d..ee136db97 100644
--- a/docs/man/man3/FileReader.3
+++ b/docs/man/man3/FileReader.3
@@ -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 894 of file modules.cpp.
+Definition at line 886 of file modules.cpp.
.PP
.nf
-895 {
-896 }
+887 {
+888 }
.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 887 of file modules.cpp.
+Definition at line 879 of file modules.cpp.
.PP
-References fc.
+References fc, and readfile().
.PP
.nf
-888 {
-889 file_cache c;
-890 readfile(c,filename.c_str());
-891 this->fc = c;
-892 }
+880 {
+881 file_cache c;
+882 readfile(c,filename.c_str());
+883 this->fc = c;
+884 }
.fi
.PP
.SS "FileReader::~FileReader ()"
@@ -97,11 +97,11 @@ Default destructor.
.PP
This deletes the memory allocated to the file.
.PP
-Definition at line 906 of file modules.cpp.
+Definition at line 898 of file modules.cpp.
.PP
.nf
-907 {
-908 }
+899 {
+900 }
.fi
.PP
.SH "Member Function Documentation"
@@ -110,21 +110,21 @@ Definition at line 906 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 910 of file modules.cpp.
+Definition at line 902 of file modules.cpp.
.PP
References fc.
.PP
.nf
-911 {
-912 if (fc.size() == 0)
-913 {
-914 return(false);
-915 }
-916 else
-917 {
-918 return(true);
-919 }
-920 }
+903 {
+904 if (fc.size() == 0)
+905 {
+906 return(false);
+907 }
+908 else
+909 {
+910 return(true);
+911 }
+912 }
.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 929 of file modules.cpp.
+Definition at line 921 of file modules.cpp.
.PP
References fc.
.PP
.nf
-930 {
-931 return fc.size();
-932 }
+922 {
+923 return fc.size();
+924 }
.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 922 of file modules.cpp.
+Definition at line 914 of file modules.cpp.
.PP
References fc.
.PP
.nf
-923 {
-924 if ((x<0) || ((unsigned)x>fc.size()))
-925 return '';
-926 return fc[x];
-927 }
+915 {
+916 if ((x<0) || ((unsigned)x>fc.size()))
+917 return '';
+918 return fc[x];
+919 }
.fi
.PP
.SS "void FileReader::LoadFile (\fBstd::string\fP filename)"
@@ -167,16 +167,16 @@ Used to load a file.
.PP
This method loads a file into the class ready for GetLine and and other methods to be called. If the file could not be loaded, \fBFileReader::FileSize\fP returns 0.
.PP
-Definition at line 898 of file modules.cpp.
+Definition at line 890 of file modules.cpp.
.PP
-References fc.
+References fc, and readfile().
.PP
.nf
-899 {
-900 file_cache c;
-901 readfile(c,filename.c_str());
-902 this->fc = c;
-903 }
+891 {
+892 file_cache c;
+893 readfile(c,filename.c_str());
+894 this->fc = c;
+895 }
.fi
.PP
.SH "Member Data Documentation"
diff --git a/docs/man/man3/HostItem.3 b/docs/man/man3/HostItem.3
index 0862d378e..2cd48e892 100644
--- a/docs/man/man3/HostItem.3
+++ b/docs/man/man3/HostItem.3
@@ -43,36 +43,36 @@ Holds an entry for a ban list, exemption list, or invite list.
This class contains a single element in a channel list, such as a banlist.
.PP
-Definition at line 36 of file channels.h.
+Definition at line 38 of file channels.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "HostItem::HostItem ()\fC [inline]\fP"
.PP
-Definition at line 43 of file channels.h.
+Definition at line 45 of file channels.h.
.PP
.nf
-43 { /* stub */ }
+45 { /* stub */ }
.fi
.PP
.SS "virtual HostItem::~HostItem ()\fC [inline, virtual]\fP"
.PP
-Definition at line 44 of file channels.h.
+Definition at line 46 of file channels.h.
.PP
.nf
-44 { /* stub */ }
+46 { /* stub */ }
.fi
.PP
.SH "Member Data Documentation"
.PP
.SS "char \fBHostItem::data\fP[MAXBUF]"
.PP
-Definition at line 41 of file channels.h.
+Definition at line 43 of file channels.h.
.SS "char \fBHostItem::set_by\fP[NICKMAX]"
.PP
-Definition at line 40 of file channels.h.
+Definition at line 42 of file channels.h.
.SS "time_t \fBHostItem::set_time\fP"
.PP
-Definition at line 39 of file channels.h.
+Definition at line 41 of file channels.h.
.SH "Author"
.PP
diff --git a/docs/man/man3/InspIRCd.3 b/docs/man/man3/InspIRCd.3
new file mode 100644
index 000000000..5e2a718f7
--- /dev/null
+++ b/docs/man/man3/InspIRCd.3
@@ -0,0 +1,71 @@
+.TH "InspIRCd" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.ad l
+.nh
+.SH NAME
+InspIRCd \-
+.SH SYNOPSIS
+.br
+.PP
+\fC#include <inspircd.h>\fP
+.PP
+.SS "Public Member Functions"
+
+.in +1c
+.ti -1c
+.RI "bool \fBLoadModule\fP (const char *filename)"
+.br
+.ti -1c
+.RI "bool \fBUnloadModule\fP (const char *filename)"
+.br
+.ti -1c
+.RI "\fBInspIRCd\fP (int argc, char **argv)"
+.br
+.ti -1c
+.RI "int \fBRun\fP ()"
+.br
+.in -1c
+.SS "Public Attributes"
+
+.in +1c
+.ti -1c
+.RI "time_t \fBstartup_time\fP"
+.br
+.in -1c
+.SS "Private Member Functions"
+
+.in +1c
+.ti -1c
+.RI "void \fBerase_factory\fP (int j)"
+.br
+.ti -1c
+.RI "void \fBerase_module\fP (int j)"
+.br
+.in -1c
+.SH "Detailed Description"
+.PP
+Definition at line 95 of file inspircd.h.
+.SH "Constructor & Destructor Documentation"
+.PP
+.SS "InspIRCd::InspIRCd (int argc, char ** argv)"
+.PP
+.SH "Member Function Documentation"
+.PP
+.SS "void InspIRCd::erase_factory (int j)\fC [private]\fP"
+.PP
+.SS "void InspIRCd::erase_module (int j)\fC [private]\fP"
+.PP
+.SS "bool InspIRCd::LoadModule (const char * filename)"
+.PP
+.SS "int InspIRCd::Run ()"
+.PP
+.SS "bool InspIRCd::UnloadModule (const char * filename)"
+.PP
+.SH "Member Data Documentation"
+.PP
+.SS "time_t \fBInspIRCd::startup_time\fP"
+.PP
+Definition at line 103 of file inspircd.h.
+
+.SH "Author"
+.PP
+Generated automatically by Doxygen for InspIRCd from the source code.
diff --git a/docs/man/man3/InspSocket.3 b/docs/man/man3/InspSocket.3
index fc39dc8e6..06bd1e1cf 100644
--- a/docs/man/man3/InspSocket.3
+++ b/docs/man/man3/InspSocket.3
@@ -212,7 +212,7 @@ This constructor is used to create a new socket, either listening for connection
.PP
Definition at line 62 of file socket.cpp.
.PP
-References SocketEngine::AddFd(), addr, addy, BindSocket(), Close(), DEBUG, fd, I_CONNECTING, I_ERR_BIND, I_ERR_CONNECT, I_ERR_SOCKET, I_ERROR, I_LISTENING, IP, OnError(), OpenTCPSocket(), state, timeout, timeout_end, and X_ESTAB_MODULE.
+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.
.PP
.nf
63 {
@@ -540,7 +540,7 @@ Reads all pending bytes from the socket into a char* array which can be up to 16
.PP
Definition at line 158 of file socket.cpp.
.PP
-References DEBUG, and ibuf.
+References DEBUG, ibuf, and log().
.PP
.nf
159 {
@@ -566,7 +566,7 @@ The core uses this to change socket states, and you should not call it directly.
.PP
Definition at line 248 of file socket.cpp.
.PP
-References DEBUG, and state.
+References DEBUG, log(), and state.
.PP
Referenced by Poll().
.PP
diff --git a/docs/man/man3/InviteItem.3 b/docs/man/man3/InviteItem.3
index 618052d99..03eeb6189 100644
--- a/docs/man/man3/InviteItem.3
+++ b/docs/man/man3/InviteItem.3
@@ -16,7 +16,7 @@ Inherits \fBHostItem\fP.
.PP
A subclass of \fBHostItem\fP designed to hold channel invites (+I).
.PP
-Definition at line 68 of file channels.h.
+Definition at line 70 of file channels.h.
.SH "Author"
.PP
diff --git a/docs/man/man3/ModeParameter.3 b/docs/man/man3/ModeParameter.3
index 75add436a..c1af78bc6 100644
--- a/docs/man/man3/ModeParameter.3
+++ b/docs/man/man3/ModeParameter.3
@@ -31,22 +31,22 @@ Holds a custom parameter to a module-defined channel mode e.g.
for +L this would hold the channel name.
.PP
-Definition at line 77 of file channels.h.
+Definition at line 79 of file channels.h.
.SH "Member Data Documentation"
.PP
.SS "char \fBModeParameter::channel\fP[CHANMAX]"
.PP
-Definition at line 82 of file channels.h.
+Definition at line 84 of file channels.h.
.PP
Referenced by chanrec::SetCustomModeParam().
.SS "char \fBModeParameter::mode\fP"
.PP
-Definition at line 80 of file channels.h.
+Definition at line 82 of file channels.h.
.PP
Referenced by chanrec::SetCustomModeParam().
.SS "char \fBModeParameter::parameter\fP[MAXBUF]"
.PP
-Definition at line 81 of file channels.h.
+Definition at line 83 of file channels.h.
.PP
Referenced by chanrec::SetCustomModeParam().
diff --git a/docs/man/man3/Module.3 b/docs/man/man3/Module.3
index 5dea65737..111e53012 100644
--- a/docs/man/man3/Module.3
+++ b/docs/man/man3/Module.3
@@ -2,7 +2,7 @@
.ad l
.nh
.SH NAME
-Module \- Base class for all InspIRCd modules This class is the base class for InspIRCd modules.
+Module \- Base class for all \fBInspIRCd\fP modules This class is the base class for \fBInspIRCd\fP modules.
.PP
.SH SYNOPSIS
@@ -336,7 +336,7 @@ Inherits \fBclassbase\fP.
.in -1c
.SH "Detailed Description"
.PP
-Base class for all InspIRCd modules This class is the base class for InspIRCd modules.
+Base class for all \fBInspIRCd\fP modules This class is the base class for \fBInspIRCd\fP modules.
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
@@ -354,20 +354,20 @@ Default constructor Creates a module class.
.PP
.PP
-Definition at line 228 of file modules.cpp.
+Definition at line 220 of file modules.cpp.
.PP
.nf
-228 { }
+220 { }
.fi
.PP
.SS "Module::~Module ()\fC [virtual]\fP"
.PP
Default destructor destroys a module class.
.PP
-Definition at line 229 of file modules.cpp.
+Definition at line 221 of file modules.cpp.
.PP
.nf
-229 { }
+221 { }
.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 240 of file modules.cpp.
+Definition at line 232 of file modules.cpp.
.PP
References VF_VENDOR.
.PP
.nf
-240 { return Version(1,0,0,0,VF_VENDOR); }
+232 { 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 250 of file modules.cpp.
+Definition at line 242 of file modules.cpp.
.PP
.nf
-250 { };
+242 { };
.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 249 of file modules.cpp.
+Definition at line 241 of file modules.cpp.
.PP
References ACR_DEFAULT.
.PP
.nf
-249 { return ACR_DEFAULT; };
+241 { 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 275 of file modules.cpp.
+Definition at line 267 of file modules.cpp.
.PP
.nf
-275 { return 0; };
+267 { 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 301 of file modules.cpp.
+Definition at line 293 of file modules.cpp.
.PP
.nf
-301 { };
+293 { };
.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 297 of file modules.cpp.
+Definition at line 289 of file modules.cpp.
.PP
.nf
-297 { };
+289 { };
.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 299 of file modules.cpp.
+Definition at line 291 of file modules.cpp.
.PP
.nf
-299 { };
+291 { };
.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 300 of file modules.cpp.
+Definition at line 292 of file modules.cpp.
.PP
.nf
-300 { };
+292 { };
.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 298 of file modules.cpp.
+Definition at line 290 of file modules.cpp.
.PP
.nf
-298 { };
+290 { };
.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 254 of file modules.cpp.
+Definition at line 246 of file modules.cpp.
.PP
.nf
-254 { };
+246 { };
.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 295 of file modules.cpp.
+Definition at line 287 of file modules.cpp.
.PP
.nf
-295 { };
+287 { };
.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 268 of file modules.cpp.
+Definition at line 260 of file modules.cpp.
.PP
.nf
-268 { return 0; };
+260 { 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 267 of file modules.cpp.
+Definition at line 259 of file modules.cpp.
.PP
.nf
-267 { return 0; };
+259 { 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 296 of file modules.cpp.
+Definition at line 288 of file modules.cpp.
.PP
.nf
-296 { };
+288 { };
.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 265 of file modules.cpp.
+Definition at line 257 of file modules.cpp.
.PP
.nf
-265 { return 0; };
+257 { 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 262 of file modules.cpp.
+Definition at line 254 of file modules.cpp.
.PP
.nf
-262 { return 0; };
+254 { 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 263 of file modules.cpp.
+Definition at line 255 of file modules.cpp.
.PP
.nf
-263 { return 0; };
+255 { 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 264 of file modules.cpp.
+Definition at line 256 of file modules.cpp.
.PP
.nf
-264 { return 0; };
+256 { 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 257 of file modules.cpp.
+Definition at line 249 of file modules.cpp.
.PP
.nf
-257 { return true; };
+249 { 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 307 of file modules.cpp.
+Definition at line 299 of file modules.cpp.
.PP
.nf
-307 { };
+299 { };
.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 292 of file modules.cpp.
+Definition at line 284 of file modules.cpp.
.PP
.nf
-292 { };
+284 { };
.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 276 of file modules.cpp.
+Definition at line 268 of file modules.cpp.
.PP
.nf
-276 { return 0; };
+268 { 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 306 of file modules.cpp.
+Definition at line 298 of file modules.cpp.
.PP
.nf
-306 { };
+298 { };
.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 302 of file modules.cpp.
+Definition at line 294 of file modules.cpp.
.PP
.nf
-302 { };
+294 { };
.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 304 of file modules.cpp.
+Definition at line 296 of file modules.cpp.
.PP
.nf
-304 { };
+296 { };
.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 305 of file modules.cpp.
+Definition at line 297 of file modules.cpp.
.PP
.nf
-305 { };
+297 { };
.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 303 of file modules.cpp.
+Definition at line 295 of file modules.cpp.
.PP
.nf
-303 { };
+295 { };
.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 270 of file modules.cpp.
+Definition at line 262 of file modules.cpp.
.PP
.nf
-270 { return; };
+262 { 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 238 of file modules.cpp.
+Definition at line 230 of file modules.cpp.
.PP
.nf
-238 { return false; }
+230 { 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 286 of file modules.cpp.
+Definition at line 278 of file modules.cpp.
.PP
.nf
-286 { };
+278 { };
.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 274 of file modules.cpp.
+Definition at line 266 of file modules.cpp.
.PP
.nf
-274 { };
+266 { };
.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 273 of file modules.cpp.
+Definition at line 265 of file modules.cpp.
.PP
.nf
-273 { };
+265 { };
.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 242 of file modules.cpp.
+Definition at line 234 of file modules.cpp.
.PP
.nf
-242 { };
+234 { };
.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 251 of file modules.cpp.
+Definition at line 243 of file modules.cpp.
.PP
.nf
-251 { return 0; };
+243 { 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 252 of file modules.cpp.
+Definition at line 244 of file modules.cpp.
.PP
.nf
-252 { };
+244 { };
.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 269 of file modules.cpp.
+Definition at line 261 of file modules.cpp.
.PP
.nf
-269 { return 0; };
+261 { 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 239 of file modules.cpp.
+Definition at line 231 of file modules.cpp.
.PP
.nf
-239 { };
+231 { };
.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 241 of file modules.cpp.
+Definition at line 233 of file modules.cpp.
.PP
.nf
-241 { };
+233 { };
.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 272 of file modules.cpp.
+Definition at line 264 of file modules.cpp.
.PP
.nf
-272 { return 0; };
+264 { 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 285 of file modules.cpp.
+Definition at line 277 of file modules.cpp.
.PP
.nf
-285 { };
+277 { };
.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 256 of file modules.cpp.
+Definition at line 248 of file modules.cpp.
.PP
.nf
-256 { return 0; };
+248 { 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 261 of file modules.cpp.
+Definition at line 253 of file modules.cpp.
.PP
.nf
-261 { return 0; };
+253 { 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 277 of file modules.cpp.
+Definition at line 269 of file modules.cpp.
.PP
.nf
-277 { };
+269 { };
.fi
.PP
.SS "void Module::OnRawSocketClose (int fd)\fC [virtual]\fP"
@@ -1424,10 +1424,10 @@ When this event is called, shutdown() has not yet been called on the socket.
.PP
.PP
-Definition at line 279 of file modules.cpp.
+Definition at line 271 of file modules.cpp.
.PP
.nf
-279 { };
+271 { };
.fi
.PP
.SS "int Module::OnRawSocketRead (int fd, char * buffer, unsigned int count, int & readresult)\fC [virtual]\fP"
@@ -1454,10 +1454,10 @@ nonzero if the event was handled, in which case readresult must be valid on exit
.PP
.PP
-Definition at line 280 of file modules.cpp.
+Definition at line 272 of file modules.cpp.
.PP
.nf
-280 { return 0; };
+272 { return 0; };
.fi
.PP
.SS "int Module::OnRawSocketWrite (int fd, char * buffer, int count)\fC [virtual]\fP"
@@ -1482,10 +1482,10 @@ Number of characters actually written or 0 if you didn't handle the operation
.PP
.PP
-Definition at line 278 of file modules.cpp.
+Definition at line 270 of file modules.cpp.
.PP
.nf
-278 { return 0; };
+270 { return 0; };
.fi
.PP
.SS "void Module::OnRehash (\fBstd::string\fP parameter)\fC [virtual]\fP"
@@ -1501,10 +1501,10 @@ This method is called prior to a /REHASH or when a SIGHUP is received from the o
.PP
.PP
-Definition at line 235 of file modules.cpp.
+Definition at line 227 of file modules.cpp.
.PP
.nf
-235 { }
+227 { }
.fi
.PP
.SS "void Module::OnRemoteKill (\fBuserrec\fP * source, \fBuserrec\fP * dest, \fBstd::string\fP reason)\fC [virtual]\fP"
@@ -1522,10 +1522,10 @@ Called when an oper wants to disconnect a remote user via KILL.
.PP
.PP
-Definition at line 283 of file modules.cpp.
+Definition at line 275 of file modules.cpp.
.PP
.nf
-283 { };
+275 { };
.fi
.PP
.SS "char * Module::OnRequest (\fBRequest\fP * request)\fC [virtual]\fP"
@@ -1541,12 +1541,12 @@ Please see the documentation of \fBRequest::Send()\fP for further information. T
.PP
.PP
-Definition at line 271 of file modules.cpp.
+Definition at line 263 of file modules.cpp.
.PP
Referenced by Request::Send().
.PP
.nf
-271 { return NULL; };
+263 { return NULL; };
.fi
.PP
.SS "void Module::OnSendList (\fBuserrec\fP * user, \fBchanrec\fP * channel, char mode)\fC [virtual]\fP"
@@ -1566,10 +1566,10 @@ For example, when a /MODE channel +b (without any other parameters) is called, i
.PP
.PP
-Definition at line 255 of file modules.cpp.
+Definition at line 247 of file modules.cpp.
.PP
.nf
-255 { };
+247 { };
.fi
.PP
.SS "void Module::OnServerRaw (\fBstd::string\fP & raw, bool inbound, \fBuserrec\fP * user)\fC [virtual]\fP"
@@ -1589,10 +1589,10 @@ This method is the lowest level of handler available to a module. It will be cal
.PP
.PP
-Definition at line 236 of file modules.cpp.
+Definition at line 228 of file modules.cpp.
.PP
.nf
-236 { }
+228 { }
.fi
.PP
.SS "void Module::OnStats (char symbol)\fC [virtual]\fP"
@@ -1606,10 +1606,10 @@ Called on all /STATS commands This method is triggered for all /STATS use, inclu
.PP
.PP
-Definition at line 266 of file modules.cpp.
+Definition at line 258 of file modules.cpp.
.PP
.nf
-266 { };
+258 { };
.fi
.PP
.SS "void Module::OnSyncChannel (\fBchanrec\fP * chan, \fBModule\fP * proto, void * opaque)\fC [virtual]\fP"
@@ -1631,18 +1631,18 @@ For a good example of how to use this function, please see src/modules/m_chanpro
.PP
.PP
-Definition at line 288 of file modules.cpp.
+Definition at line 280 of file modules.cpp.
.PP
.nf
-288 { };
+280 { };
.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 290 of file modules.cpp.
+Definition at line 282 of file modules.cpp.
.PP
.nf
-290 { };
+282 { };
.fi
.PP
.SS "void Module::OnSyncUser (\fBuserrec\fP * user, \fBModule\fP * proto, void * opaque)\fC [virtual]\fP"
@@ -1662,18 +1662,18 @@ When this function is called, it will be called from the module which implements
.PP
.PP
-Definition at line 287 of file modules.cpp.
+Definition at line 279 of file modules.cpp.
.PP
.nf
-287 { };
+279 { };
.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 291 of file modules.cpp.
+Definition at line 283 of file modules.cpp.
.PP
.nf
-291 { };
+283 { };
.fi
.PP
.SS "void Module::OnUnloadModule (\fBModule\fP * mod, \fBstd::string\fP name)\fC [virtual]\fP"
@@ -1691,10 +1691,10 @@ mod will contain a pointer to the module, and string will contain its name, for
.PP
.PP
-Definition at line 253 of file modules.cpp.
+Definition at line 245 of file modules.cpp.
.PP
.nf
-253 { };
+245 { };
.fi
.PP
.SS "void Module::OnUserConnect (\fBuserrec\fP * user)\fC [virtual]\fP"
@@ -1710,10 +1710,10 @@ The details of the connecting user are available to you in the parameter userrec
.PP
.PP
-Definition at line 230 of file modules.cpp.
+Definition at line 222 of file modules.cpp.
.PP
.nf
-230 { }
+222 { }
.fi
.PP
.SS "void Module::OnUserDisconnect (\fBuserrec\fP * user)\fC [virtual]\fP"
@@ -1729,10 +1729,10 @@ The details of the exiting user are available to you in the parameter userrec *u
.PP
.PP
-Definition at line 232 of file modules.cpp.
+Definition at line 224 of file modules.cpp.
.PP
.nf
-232 { }
+224 { }
.fi
.PP
.SS "void Module::OnUserInvite (\fBuserrec\fP * source, \fBuserrec\fP * dest, \fBchanrec\fP * channel)\fC [virtual]\fP"
@@ -1752,10 +1752,10 @@ You cannot prevent the invite from occuring using this function, to do that, use
.PP
.PP
-Definition at line 284 of file modules.cpp.
+Definition at line 276 of file modules.cpp.
.PP
.nf
-284 { };
+276 { };
.fi
.PP
.SS "void Module::OnUserJoin (\fBuserrec\fP * user, \fBchanrec\fP * channel)\fC [virtual]\fP"
@@ -1773,10 +1773,10 @@ The details of the joining user are available to you in the parameter userrec *u
.PP
.PP
-Definition at line 233 of file modules.cpp.
+Definition at line 225 of file modules.cpp.
.PP
.nf
-233 { }
+225 { }
.fi
.PP
.SS "void Module::OnUserKick (\fBuserrec\fP * source, \fBuserrec\fP * user, \fBchanrec\fP * chan, \fBstd::string\fP reason)\fC [virtual]\fP"
@@ -1798,10 +1798,10 @@ If this method is called, the kick is already underway and cannot be prevented,
.PP
.PP
-Definition at line 260 of file modules.cpp.
+Definition at line 252 of file modules.cpp.
.PP
.nf
-260 { };
+252 { };
.fi
.PP
.SS "void Module::OnUserMessage (\fBuserrec\fP * user, void * dest, int target_type, \fBstd::string\fP text)\fC [virtual]\fP"
@@ -1823,10 +1823,10 @@ The dest variable contains a userrec* if target_type is TYPE_USER and a chanrec*
.PP
.PP
-Definition at line 281 of file modules.cpp.
+Definition at line 273 of file modules.cpp.
.PP
.nf
-281 { };
+273 { };
.fi
.PP
.SS "void Module::OnUserNotice (\fBuserrec\fP * user, void * dest, int target_type, \fBstd::string\fP text)\fC [virtual]\fP"
@@ -1848,10 +1848,10 @@ The dest variable contains a userrec* if target_type is TYPE_USER and a chanrec*
.PP
.PP
-Definition at line 282 of file modules.cpp.
+Definition at line 274 of file modules.cpp.
.PP
.nf
-282 { };
+274 { };
.fi
.PP
.SS "void Module::OnUserPart (\fBuserrec\fP * user, \fBchanrec\fP * channel)\fC [virtual]\fP"
@@ -1869,10 +1869,10 @@ The details of the leaving user are available to you in the parameter userrec *u
.PP
.PP
-Definition at line 234 of file modules.cpp.
+Definition at line 226 of file modules.cpp.
.PP
.nf
-234 { }
+226 { }
.fi
.PP
.SS "void Module::OnUserPostNick (\fBuserrec\fP * user, \fBstd::string\fP oldnick)\fC [virtual]\fP"
@@ -1890,10 +1890,10 @@ This can be used to track users after nickchanges have been applied. Please note
.PP
.PP
-Definition at line 248 of file modules.cpp.
+Definition at line 240 of file modules.cpp.
.PP
.nf
-248 { };
+240 { };
.fi
.PP
.SS "int Module::OnUserPreInvite (\fBuserrec\fP * source, \fBuserrec\fP * dest, \fBchanrec\fP * channel)\fC [virtual]\fP"
@@ -1918,10 +1918,10 @@ Returning 1 from this function stops the process immediately, causing no output
.PP
.PP
-Definition at line 244 of file modules.cpp.
+Definition at line 236 of file modules.cpp.
.PP
.nf
-244 { return 0; };
+236 { return 0; };
.fi
.PP
.SS "int Module::OnUserPreJoin (\fBuserrec\fP * user, \fBchanrec\fP * chan, const char * cname)\fC [virtual]\fP"
@@ -1948,10 +1948,10 @@ If the user joins a NEW channel which does not exist yet, OnUserPreJoin will be
.PP
.PP
-Definition at line 237 of file modules.cpp.
+Definition at line 229 of file modules.cpp.
.PP
.nf
-237 { return 0; }
+229 { return 0; }
.fi
.PP
.SS "int Module::OnUserPreKick (\fBuserrec\fP * source, \fBuserrec\fP * user, \fBchanrec\fP * chan, \fBstd::string\fP reason)\fC [virtual]\fP"
@@ -1978,10 +1978,10 @@ Returning a value of 1 from this function stops the process immediately, causing
.PP
.PP
-Definition at line 259 of file modules.cpp.
+Definition at line 251 of file modules.cpp.
.PP
.nf
-259 { return 0; };
+251 { return 0; };
.fi
.PP
.SS "int Module::OnUserPreMessage (\fBuserrec\fP * user, void * dest, int target_type, \fBstd::string\fP & text)\fC [virtual]\fP"
@@ -2008,10 +2008,10 @@ Returning any nonzero value from this function stops the process immediately, ca
.PP
.PP
-Definition at line 245 of file modules.cpp.
+Definition at line 237 of file modules.cpp.
.PP
.nf
-245 { return 0; };
+237 { return 0; };
.fi
.PP
.SS "int Module::OnUserPreNick (\fBuserrec\fP * user, \fBstd::string\fP newnick)\fC [virtual]\fP"
@@ -2034,10 +2034,10 @@ This can be used to implement Q-lines etc. Please note that although you can see
.PP
.PP
-Definition at line 247 of file modules.cpp.
+Definition at line 239 of file modules.cpp.
.PP
.nf
-247 { return 0; };
+239 { return 0; };
.fi
.PP
.SS "int Module::OnUserPreNotice (\fBuserrec\fP * user, void * dest, int target_type, \fBstd::string\fP & text)\fC [virtual]\fP"
@@ -2064,10 +2064,10 @@ Returning any nonzero value from this function stops the process immediately, ca
.PP
.PP
-Definition at line 246 of file modules.cpp.
+Definition at line 238 of file modules.cpp.
.PP
.nf
-246 { return 0; };
+238 { return 0; };
.fi
.PP
.SS "void Module::OnUserQuit (\fBuserrec\fP * user, \fBstd::string\fP message)\fC [virtual]\fP"
@@ -2085,10 +2085,10 @@ The details of the exiting user are available to you in the parameter userrec *u
.PP
.PP
-Definition at line 231 of file modules.cpp.
+Definition at line 223 of file modules.cpp.
.PP
.nf
-231 { }
+223 { }
.fi
.PP
.SS "void Module::OnUserRegister (\fBuserrec\fP * user)\fC [virtual]\fP"
@@ -2104,10 +2104,10 @@ before the user is sent the MOTD etc). Modules can use this method if they are p
.PP
.PP
-Definition at line 258 of file modules.cpp.
+Definition at line 250 of file modules.cpp.
.PP
.nf
-258 { };
+250 { };
.fi
.PP
.SS "void Module::OnWallops (\fBuserrec\fP * user, \fBstd::string\fP text)\fC [virtual]\fP"
@@ -2123,10 +2123,10 @@ Called after every WALLOPS command.
.PP
.PP
-Definition at line 294 of file modules.cpp.
+Definition at line 286 of file modules.cpp.
.PP
.nf
-294 { };
+286 { };
.fi
.PP
.SS "void Module::OnWhois (\fBuserrec\fP * source, \fBuserrec\fP * dest)\fC [virtual]\fP"
@@ -2144,10 +2144,10 @@ The source parameter contains the details of the user who issued the WHOIS comma
.PP
.PP
-Definition at line 243 of file modules.cpp.
+Definition at line 235 of file modules.cpp.
.PP
.nf
-243 { };
+235 { };
.fi
.PP
.SS "void Module::ProtoSendMetaData (void * opaque, int target_type, void * target, \fBstd::string\fP extname, \fBstd::string\fP extdata)\fC [virtual]\fP"
@@ -2173,10 +2173,10 @@ More documentation to follow soon. Please see src/modules/m_swhois.cpp for examp
.PP
.PP
-Definition at line 293 of file modules.cpp.
+Definition at line 285 of file modules.cpp.
.PP
.nf
-293 { };
+285 { };
.fi
.PP
.SS "void Module::ProtoSendMode (void * opaque, int target_type, void * target, \fBstd::string\fP modeline)\fC [virtual]\fP"
@@ -2200,10 +2200,10 @@ More documentation to follow soon. Please see src/modules/m_chanprotect.cpp for
.PP
.PP
-Definition at line 289 of file modules.cpp.
+Definition at line 281 of file modules.cpp.
.PP
.nf
-289 { };
+281 { };
.fi
.PP
diff --git a/docs/man/man3/Request.3 b/docs/man/man3/Request.3
index ecaf1ef9a..e9353856c 100644
--- a/docs/man/man3/Request.3
+++ b/docs/man/man3/Request.3
@@ -65,10 +65,10 @@ Definition at line 157 of file modules.h.
.PP
Create a new Request.
.PP
-Definition at line 173 of file modules.cpp.
+Definition at line 165 of file modules.cpp.
.PP
.nf
-173 : data(anydata), source(src), dest(dst) { };
+165 : data(anydata), source(src), dest(dst) { };
.fi
.PP
.SH "Member Function Documentation"
@@ -77,42 +77,42 @@ Definition at line 173 of file modules.cpp.
.PP
Fetch the Request data.
.PP
-Definition at line 175 of file modules.cpp.
+Definition at line 167 of file modules.cpp.
.PP
References data.
.PP
.nf
-176 {
-177 return this->data;
-178 }
+168 {
+169 return this->data;
+170 }
.fi
.PP
.SS "\fBModule\fP * Request::GetDest ()"
.PP
Fetch the request destination (should be 'this' in the receiving module).
.PP
-Definition at line 185 of file modules.cpp.
+Definition at line 177 of file modules.cpp.
.PP
References dest.
.PP
.nf
-186 {
-187 return this->dest;
-188 }
+178 {
+179 return this->dest;
+180 }
.fi
.PP
.SS "\fBModule\fP * Request::GetSource ()"
.PP
Fetch the request source.
.PP
-Definition at line 180 of file modules.cpp.
+Definition at line 172 of file modules.cpp.
.PP
References source.
.PP
.nf
-181 {
-182 return this->source;
-183 }
+173 {
+174 return this->source;
+175 }
.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 190 of file modules.cpp.
+Definition at line 182 of file modules.cpp.
.PP
References dest, and Module::OnRequest().
.PP
.nf
-191 {
-192 if (this->dest)
-193 {
-194 return dest->OnRequest(this);
-195 }
-196 else
-197 {
-198 return NULL;
-199 }
-200 }
+183 {
+184 if (this->dest)
+185 {
+186 return dest->OnRequest(this);
+187 }
+188 else
+189 {
+190 return NULL;
+191 }
+192 }
.fi
.PP
.SH "Member Data Documentation"
diff --git a/docs/man/man3/Server.3 b/docs/man/man3/Server.3
index 0584cb751..415ab762b 100644
--- a/docs/man/man3/Server.3
+++ b/docs/man/man3/Server.3
@@ -124,7 +124,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, handlerfunc f, char flags, int minparams, char *source)"
+.RI "virtual void \fBAddCommand\fP (char *cmd, \fBhandlerfunc\fP f, char flags, int minparams, char *source)"
.br
.RI "\fIAdds a command to the command table. \fP"
.ti -1c
@@ -265,11 +265,11 @@ Default constructor.
.PP
Creates a Server object.
.PP
-Definition at line 313 of file modules.cpp.
+Definition at line 305 of file modules.cpp.
.PP
.nf
-314 {
-315 }
+306 {
+307 }
.fi
.PP
.SS "Server::~Server ()\fC [virtual]\fP"
@@ -278,16 +278,16 @@ Default destructor.
.PP
Destroys a Server object.
.PP
-Definition at line 317 of file modules.cpp.
+Definition at line 309 of file modules.cpp.
.PP
.nf
-318 {
-319 }
+310 {
+311 }
.fi
.PP
.SH "Member Function Documentation"
.PP
-.SS "void Server::AddCommand (char * cmd, handlerfunc f, char flags, int minparams, char * source)\fC [virtual]\fP"
+.SS "void Server::AddCommand (char * cmd, \fBhandlerfunc\fP f, char flags, int minparams, char * source)\fC [virtual]\fP"
.PP
Adds a command to the command table.
.PP
@@ -297,14 +297,14 @@ typedef void (handlerfunc) (char**, int, userrec*); ... void \fBhandle_kill(char
.PP
When the command is typed, the parameters will be placed into the parameters array (similar to argv) and the parameter count will be placed into pcnt (similar to argv). There will never be any less parameters than the 'minparams' value you specified when creating the command. The *user parameter is the class of the user which caused the command to trigger, who will always have the flag you specified in 'flags' when creating the initial command. For example to create an oper only command create the commands with flags='o'. The source parameter is used for resource tracking, and should contain the name of your module (with file extension) e.g. 'm_blarp.so'. If you place the wrong identifier here, you can cause crashes if your module is unloaded.
.PP
-Definition at line 419 of file modules.cpp.
+Definition at line 411 of file modules.cpp.
.PP
References createcommand().
.PP
.nf
-420 {
-421 createcommand(cmd,f,flags,minparams,source);
-422 }
+412 {
+413 createcommand(cmd,f,flags,minparams,source);
+414 }
.fi
.PP
.SS "void Server::AddELine (long duration, \fBstd::string\fP source, \fBstd::string\fP reason, \fBstd::string\fP hostmask)\fC [virtual]\fP"
@@ -313,14 +313,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 663 of file modules.cpp.
+Definition at line 655 of file modules.cpp.
.PP
References add_eline().
.PP
.nf
-664 {
-665 add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
-666 }
+656 {
+657 add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
+658 }
.fi
.PP
.SS "bool Server::AddExtendedListMode (char modechar)\fC [virtual]\fP"
@@ -337,19 +337,19 @@ This call is used to implement modes like +q and +a. The characteristics of thes
.PP
(4) The mode and its parameter are NOT stored in the channels modes structure
.PP
-It is down to the module handling the mode to maintain state and determine what 'items' (e.g. users, or a banlist) have the mode set on them, and process the modes at the correct times, e.g. during access checks on channels, etc. When the extended mode is triggered the OnExtendedMode method will be triggered as above. Note that the target you are given will be a channel, if for example your mode is set 'on a user' (in for example +a) you must use Server::Find to locate the user the mode is operating on. Your mode handler may return 1 to handle the mode AND tell the core to display the mode change, e.g. '+aaa one two three' in the case of the mode for 'two', or it may return -1 to 'eat' the mode change, so the above example would become '+aa one three' after processing.
+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 587 of file modules.cpp.
+Definition at line 579 of file modules.cpp.
.PP
References DoAddExtendedMode(), ModeMakeList(), and MT_CHANNEL.
.PP
.nf
-588 {
-589 bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1);
-590 if (res)
-591 ModeMakeList(modechar);
-592 return res;
-593 }
+580 {
+581 bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1);
+582 if (res)
+583 ModeMakeList(modechar);
+584 return res;
+585 }
.fi
.PP
.SS "bool Server::AddExtendedMode (char modechar, int type, bool requires_oper, int params_when_on, int params_when_off)\fC [virtual]\fP"
@@ -358,37 +358,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 559 of file modules.cpp.
+Definition at line 551 of file modules.cpp.
.PP
-References DEBUG, DoAddExtendedMode(), MT_CLIENT, and MT_SERVER.
+References DEBUG, DoAddExtendedMode(), log(), MT_CLIENT, and MT_SERVER.
.PP
.nf
-560 {
-561 if (((modechar >= 'A') && (modechar <= 'Z')) || ((modechar >= 'a') && (modechar <= 'z')))
-562 {
-563 if (type == MT_SERVER)
-564 {
-565 log(DEBUG,'*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion');
-566 return false;
-567 }
-568 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT))
-569 {
-570 log(DEBUG,'*** API ERROR *** Parameters on MT_CLIENT modes are not supported');
-571 return false;
-572 }
-573 if ((params_when_on>1) || (params_when_off>1))
-574 {
-575 log(DEBUG,'*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported');
-576 return false;
-577 }
-578 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off);
-579 }
-580 else
-581 {
-582 log(DEBUG,'*** API ERROR *** Muppet modechar detected.');
-583 }
-584 return false;
-585 }
+552 {
+553 if (((modechar >= 'A') && (modechar <= 'Z')) || ((modechar >= 'a') && (modechar <= 'z')))
+554 {
+555 if (type == MT_SERVER)
+556 {
+557 log(DEBUG,'*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion');
+558 return false;
+559 }
+560 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT))
+561 {
+562 log(DEBUG,'*** API ERROR *** Parameters on MT_CLIENT modes are not supported');
+563 return false;
+564 }
+565 if ((params_when_on>1) || (params_when_off>1))
+566 {
+567 log(DEBUG,'*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported');
+568 return false;
+569 }
+570 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off);
+571 }
+572 else
+573 {
+574 log(DEBUG,'*** API ERROR *** Muppet modechar detected.');
+575 }
+576 return false;
+577 }
.fi
.PP
.SS "void Server::AddGLine (long duration, \fBstd::string\fP source, \fBstd::string\fP reason, \fBstd::string\fP hostmask)\fC [virtual]\fP"
@@ -397,14 +397,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 643 of file modules.cpp.
+Definition at line 635 of file modules.cpp.
.PP
References add_gline().
.PP
.nf
-644 {
-645 add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
-646 }
+636 {
+637 add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
+638 }
.fi
.PP
.SS "void Server::AddKLine (long duration, \fBstd::string\fP source, \fBstd::string\fP reason, \fBstd::string\fP hostmask)\fC [virtual]\fP"
@@ -413,14 +413,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 658 of file modules.cpp.
+Definition at line 650 of file modules.cpp.
.PP
References add_kline().
.PP
.nf
-659 {
-660 add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
-661 }
+651 {
+652 add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
+653 }
.fi
.PP
.SS "void Server::AddQLine (long duration, \fBstd::string\fP source, \fBstd::string\fP reason, \fBstd::string\fP nickname)\fC [virtual]\fP"
@@ -429,28 +429,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 648 of file modules.cpp.
+Definition at line 640 of file modules.cpp.
.PP
References add_qline().
.PP
.nf
-649 {
-650 add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str());
-651 }
+641 {
+642 add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str());
+643 }
.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 321 of file modules.cpp.
+Definition at line 313 of file modules.cpp.
.PP
References module_sockets.
.PP
.nf
-322 {
-323 module_sockets.push_back(sock);
-324 }
+314 {
+315 module_sockets.push_back(sock);
+316 }
.fi
.PP
.SS "void Server::AddZLine (long duration, \fBstd::string\fP source, \fBstd::string\fP reason, \fBstd::string\fP ipaddr)\fC [virtual]\fP"
@@ -459,14 +459,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 653 of file modules.cpp.
+Definition at line 645 of file modules.cpp.
.PP
References add_zline().
.PP
.nf
-654 {
-655 add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str());
-656 }
+646 {
+647 add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str());
+648 }
.fi
.PP
.SS "long Server::CalcDuration (\fBstd::string\fP duration)\fC [virtual]\fP"
@@ -475,14 +475,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 693 of file modules.cpp.
+Definition at line 685 of file modules.cpp.
.PP
References duration().
.PP
.nf
-694 {
-695 return duration(delta.c_str());
-696 }
+686 {
+687 return duration(delta.c_str());
+688 }
.fi
.PP
.SS "void Server::CallCommandHandler (\fBstd::string\fP commandname, char ** parameters, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP"
@@ -493,12 +493,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 404 of file modules.cpp.
+Definition at line 396 of file modules.cpp.
+.PP
+References call_handler().
.PP
.nf
-405 {
-406 call_handler(commandname.c_str(),parameters,pcnt,user);
-407 }
+397 {
+398 call_handler(commandname.c_str(),parameters,pcnt,user);
+399 }
.fi
.PP
.SS "void Server::ChangeGECOS (\fBuserrec\fP * user, \fBstd::string\fP gecos)\fC [virtual]\fP"
@@ -507,14 +509,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 502 of file modules.cpp.
+Definition at line 494 of file modules.cpp.
.PP
References ChangeName().
.PP
.nf
-503 {
-504 ChangeName(user,gecos.c_str());
-505 }
+495 {
+496 ChangeName(user,gecos.c_str());
+497 }
.fi
.PP
.SS "void Server::ChangeHost (\fBuserrec\fP * user, \fBstd::string\fP host)\fC [virtual]\fP"
@@ -523,14 +525,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 497 of file modules.cpp.
+Definition at line 489 of file modules.cpp.
.PP
References ChangeDisplayedHost().
.PP
.nf
-498 {
-499 ChangeDisplayedHost(user,host.c_str());
-500 }
+490 {
+491 ChangeDisplayedHost(user,host.c_str());
+492 }
.fi
.PP
.SS "void Server::ChangeUserNick (\fBuserrec\fP * user, \fBstd::string\fP nickname)\fC [virtual]\fP"
@@ -539,12 +541,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 389 of file modules.cpp.
+Definition at line 381 of file modules.cpp.
+.PP
+References force_nickchange().
.PP
.nf
-390 {
-391 force_nickchange(user,nickname.c_str());
-392 }
+382 {
+383 force_nickchange(user,nickname.c_str());
+384 }
.fi
.PP
.SS "\fBstd::string\fP Server::ChanMode (\fBuserrec\fP * User, \fBchanrec\fP * Chan)\fC [virtual]\fP"
@@ -553,14 +557,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 527 of file modules.cpp.
+Definition at line 519 of file modules.cpp.
.PP
References cmode().
.PP
.nf
-528 {
-529 return cmode(User,Chan);
-530 }
+520 {
+521 return cmode(User,Chan);
+522 }
.fi
.PP
.SS "bool Server::CommonChannels (\fBuserrec\fP * u1, \fBuserrec\fP * u2)\fC [virtual]\fP"
@@ -569,14 +573,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 475 of file modules.cpp.
+Definition at line 467 of file modules.cpp.
.PP
References common_channels().
.PP
.nf
-476 {
-477 return (common_channels(u1,u2) != 0);
-478 }
+468 {
+469 return (common_channels(u1,u2) != 0);
+470 }
.fi
.PP
.SS "int Server::CountUsers (\fBchanrec\fP * c)\fC [virtual]\fP"
@@ -585,103 +589,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 595 of file modules.cpp.
+Definition at line 587 of file modules.cpp.
.PP
.nf
-596 {
-597 return usercount(c);
-598 }
+588 {
+589 return usercount(c);
+590 }
.fi
.PP
.SS "bool Server::DelELine (\fBstd::string\fP hostmask)\fC [virtual]\fP"
.PP
Deletes a local E-Line.
.PP
-Definition at line 688 of file modules.cpp.
+Definition at line 680 of file modules.cpp.
.PP
References del_eline().
.PP
.nf
-689 {
-690 return del_eline(hostmask.c_str());
-691 }
+681 {
+682 return del_eline(hostmask.c_str());
+683 }
.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 668 of file modules.cpp.
+Definition at line 660 of file modules.cpp.
.PP
References del_gline().
.PP
.nf
-669 {
-670 return del_gline(hostmask.c_str());
-671 }
+661 {
+662 return del_gline(hostmask.c_str());
+663 }
.fi
.PP
.SS "bool Server::DelKLine (\fBstd::string\fP hostmask)\fC [virtual]\fP"
.PP
Deletes a local K-Line.
.PP
-Definition at line 683 of file modules.cpp.
+Definition at line 675 of file modules.cpp.
.PP
References del_kline().
.PP
.nf
-684 {
-685 return del_kline(hostmask.c_str());
-686 }
+676 {
+677 return del_kline(hostmask.c_str());
+678 }
.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 673 of file modules.cpp.
+Definition at line 665 of file modules.cpp.
.PP
References del_qline().
.PP
.nf
-674 {
-675 return del_qline(nickname.c_str());
-676 }
+666 {
+667 return del_qline(nickname.c_str());
+668 }
.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 337 of file modules.cpp.
+Definition at line 329 of file modules.cpp.
.PP
References module_sockets.
.PP
.nf
-338 {
-339 for (std::vector<InspSocket*>::iterator a = module_sockets.begin(); a < module_sockets.end(); a++)
-340 {
-341 if (*a == sock)
-342 {
-343 module_sockets.erase(a);
-344 return;
-345 }
-346 }
-347 }
+330 {
+331 for (std::vector<InspSocket*>::iterator a = module_sockets.begin(); a < module_sockets.end(); a++)
+332 {
+333 if (*a == sock)
+334 {
+335 module_sockets.erase(a);
+336 return;
+337 }
+338 }
+339 }
.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 678 of file modules.cpp.
+Definition at line 670 of file modules.cpp.
.PP
References del_zline().
.PP
.nf
-679 {
-680 return del_zline(ipaddr.c_str());
-681 }
+671 {
+672 return del_zline(ipaddr.c_str());
+673 }
.fi
.PP
.SS "\fBchanrec\fP * Server::FindChannel (\fBstd::string\fP channel)\fC [virtual]\fP"
@@ -690,12 +694,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 522 of file modules.cpp.
+Definition at line 514 of file modules.cpp.
+.PP
+References FindChan().
.PP
.nf
-523 {
-524 return FindChan(channel.c_str());
-525 }
+515 {
+516 return FindChan(channel.c_str());
+517 }
.fi
.PP
.SS "\fBuserrec\fP * Server::FindDescriptor (int socket)\fC [virtual]\fP"
@@ -704,12 +710,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 517 of file modules.cpp.
+Definition at line 509 of file modules.cpp.
.PP
.nf
-518 {
-519 return (socket < 65536 ? fd_ref_table[socket] : NULL);
-520 }
+510 {
+511 return (socket < 65536 ? fd_ref_table[socket] : NULL);
+512 }
.fi
.PP
.SS "\fBModule\fP * Server::FindModule (\fBstd::string\fP name)\fC [virtual]\fP"
@@ -718,21 +724,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 727 of file modules.cpp.
+Definition at line 719 of file modules.cpp.
.PP
References MODCOUNT, ServerConfig::module_names, and modules.
.PP
.nf
-728 {
-729 for (int i = 0; i <= MODCOUNT; i++)
-730 {
-731 if (Config->module_names[i] == name)
-732 {
-733 return modules[i];
-734 }
-735 }
-736 return NULL;
-737 }
+720 {
+721 for (int i = 0; i <= MODCOUNT; i++)
+722 {
+723 if (Config->module_names[i] == name)
+724 {
+725 return modules[i];
+726 }
+727 }
+728 return NULL;
+729 }
.fi
.PP
.SS "\fBuserrec\fP * Server::FindNick (\fBstd::string\fP nick)\fC [virtual]\fP"
@@ -741,12 +747,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 512 of file modules.cpp.
+Definition at line 504 of file modules.cpp.
+.PP
+References Find().
.PP
.nf
-513 {
-514 return Find(nick);
-515 }
+505 {
+506 return Find(nick);
+507 }
.fi
.PP
.SS "\fBAdmin\fP Server::GetAdmin ()\fC [virtual]\fP"
@@ -755,12 +763,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 552 of file modules.cpp.
+Definition at line 544 of file modules.cpp.
+.PP
+References ServerConfig::AdminEmail, ServerConfig::AdminName, and ServerConfig::AdminNick.
.PP
.nf
-553 {
-554 return Admin(getadminname(),getadminemail(),getadminnick());
-555 }
+545 {
+546 return Admin(Config->AdminName,Config->AdminEmail,Config->AdminNick);
+547 }
.fi
.PP
.SS "\fBServerConfig\fP * Server::GetConfig ()"
@@ -769,48 +779,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 332 of file modules.cpp.
+Definition at line 324 of file modules.cpp.
.PP
.nf
-333 {
-334 return Config;
-335 }
+325 {
+326 return Config;
+327 }
.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 542 of file modules.cpp.
+Definition at line 534 of file modules.cpp.
+.PP
+References ServerConfig::Network.
.PP
.nf
-543 {
-544 return getnetworkname();
-545 }
+535 {
+536 return Config->Network;
+537 }
.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 547 of file modules.cpp.
+Definition at line 539 of file modules.cpp.
+.PP
+References ServerConfig::ServerDesc.
.PP
.nf
-548 {
-549 return getserverdesc();
-550 }
+540 {
+541 return Config->ServerDesc;
+542 }
.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 537 of file modules.cpp.
+Definition at line 529 of file modules.cpp.
+.PP
+References ServerConfig::ServerName.
.PP
.nf
-538 {
-539 return getservername();
-540 }
+530 {
+531 return Config->ServerName;
+532 }
.fi
.PP
.SS "\fBchanuserlist\fP Server::GetUsers (\fBchanrec\fP * chan)\fC [virtual]\fP"
@@ -819,22 +835,22 @@ Fetches the userlist of a channel.
.PP
This function must be here and not a member of userrec or chanrec due to include constraints.
.PP
-Definition at line 377 of file modules.cpp.
+Definition at line 369 of file modules.cpp.
.PP
References chanrec::GetUsers().
.PP
.nf
-378 {
-379 chanuserlist userl;
-380 userl.clear();
-381 std::vector<char*> *list = chan->GetUsers();
-382 for (std::vector<char*>::iterator i = list->begin(); i != list->end(); i++)
-383 {
-384 char* o = *i;
-385 userl.push_back((userrec*)o);
-386 }
-387 return userl;
-388 }
+370 {
+371 chanuserlist userl;
+372 userl.clear();
+373 std::vector<char*> *list = chan->GetUsers();
+374 for (std::vector<char*>::iterator i = list->begin(); i != list->end(); i++)
+375 {
+376 char* o = *i;
+377 userl.push_back((userrec*)o);
+378 }
+379 return userl;
+380 }
.fi
.PP
.SS "bool Server::IsNick (\fBstd::string\fP nick)\fC [virtual]\fP"
@@ -843,14 +859,14 @@ Returns true if a nick is valid.
.PP
Nicks for unregistered connections will return false.
.PP
-Definition at line 507 of file modules.cpp.
+Definition at line 499 of file modules.cpp.
.PP
References isnick().
.PP
.nf
-508 {
-509 return (isnick(nick.c_str()) != 0);
-510 }
+500 {
+501 return (isnick(nick.c_str()) != 0);
+502 }
.fi
.PP
.SS "bool Server::IsOnChannel (\fBuserrec\fP * User, \fBchanrec\fP * Chan)\fC [virtual]\fP"
@@ -859,14 +875,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 532 of file modules.cpp.
+Definition at line 524 of file modules.cpp.
.PP
References has_channel().
.PP
.nf
-533 {
-534 return has_channel(User,Chan);
-535 }
+525 {
+526 return has_channel(User,Chan);
+527 }
.fi
.PP
.SS "bool Server::IsUlined (\fBstd::string\fP server)\fC [virtual]\fP"
@@ -875,60 +891,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 399 of file modules.cpp.
+Definition at line 391 of file modules.cpp.
.PP
References is_uline().
.PP
.nf
-400 {
-401 return is_uline(server.c_str());
-402 }
+392 {
+393 return is_uline(server.c_str());
+394 }
.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 698 of file modules.cpp.
+Definition at line 690 of file modules.cpp.
.PP
.nf
-699 {
-700 const char* dest = mask.c_str();
-701 if (strchr(dest,'!')==0)
-702 return false;
-703 if (strchr(dest,'@')==0)
-704 return false;
-705 for (unsigned int i = 0; i < strlen(dest); i++)
-706 if (dest[i] < 32)
-707 return false;
-708 for (unsigned int i = 0; i < strlen(dest); i++)
-709 if (dest[i] > 126)
-710 return false;
-711 unsigned int c = 0;
-712 for (unsigned int i = 0; i < strlen(dest); i++)
-713 if (dest[i] == '!')
-714 c++;
-715 if (c>1)
-716 return false;
-717 c = 0;
-718 for (unsigned int i = 0; i < strlen(dest); i++)
-719 if (dest[i] == '@')
-720 c++;
-721 if (c>1)
-722 return false;
-723
-724 return true;
-725 }
+691 {
+692 const char* dest = mask.c_str();
+693 if (strchr(dest,'!')==0)
+694 return false;
+695 if (strchr(dest,'@')==0)
+696 return false;
+697 for (unsigned int i = 0; i < strlen(dest); i++)
+698 if (dest[i] < 32)
+699 return false;
+700 for (unsigned int i = 0; i < strlen(dest); i++)
+701 if (dest[i] > 126)
+702 return false;
+703 unsigned int c = 0;
+704 for (unsigned int i = 0; i < strlen(dest); i++)
+705 if (dest[i] == '!')
+706 c++;
+707 if (c>1)
+708 return false;
+709 c = 0;
+710 for (unsigned int i = 0; i < strlen(dest); i++)
+711 if (dest[i] == '@')
+712 c++;
+713 if (c>1)
+714 return false;
+715
+716 return true;
+717 }
.fi
.PP
.SS "bool Server::IsValidModuleCommand (\fBstd::string\fP commandname, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP"
.PP
-Definition at line 409 of file modules.cpp.
+Definition at line 401 of file modules.cpp.
+.PP
+References is_valid_cmd().
.PP
.nf
-410 {
-411 return is_valid_cmd(commandname.c_str(), pcnt, user);
-412 }
+402 {
+403 return is_valid_cmd(commandname.c_str(), pcnt, user);
+404 }
.fi
.PP
.SS "\fBchanrec\fP * Server::JoinUserToChannel (\fBuserrec\fP * user, \fBstd::string\fP cname, \fBstd::string\fP key)\fC [virtual]\fP"
@@ -937,12 +955,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 367 of file modules.cpp.
+Definition at line 359 of file modules.cpp.
+.PP
+References add_channel().
.PP
.nf
-368 {
-369 return add_channel(user,cname.c_str(),key.c_str(),false);
-370 }
+360 {
+361 return add_channel(user,cname.c_str(),key.c_str(),false);
+362 }
.fi
.PP
.SS "void Server::Log (int level, \fBstd::string\fP s)\fC [virtual]\fP"
@@ -951,12 +971,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 414 of file modules.cpp.
+Definition at line 406 of file modules.cpp.
+.PP
+References log().
.PP
.nf
-415 {
-416 log(level,'%s',s.c_str());
-417 }
+407 {
+408 log(level,'%s',s.c_str());
+409 }
.fi
.PP
.SS "bool Server::MatchText (\fBstd::string\fP sliteral, \fBstd::string\fP spattern)\fC [virtual]\fP"
@@ -965,15 +987,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 354 of file modules.cpp.
+Definition at line 346 of file modules.cpp.
.PP
.nf
-355 {
-356 char literal[MAXBUF],pattern[MAXBUF];
-357 strlcpy(literal,sliteral.c_str(),MAXBUF);
-358 strlcpy(pattern,spattern.c_str(),MAXBUF);
-359 return match(literal,pattern);
-360 }
+347 {
+348 char literal[MAXBUF],pattern[MAXBUF];
+349 strlcpy(literal,sliteral.c_str(),MAXBUF);
+350 strlcpy(pattern,spattern.c_str(),MAXBUF);
+351 return match(literal,pattern);
+352 }
.fi
.PP
.SS "\fBchanrec\fP * Server::PartUserFromChannel (\fBuserrec\fP * user, \fBstd::string\fP cname, \fBstd::string\fP reason)\fC [virtual]\fP"
@@ -982,12 +1004,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 372 of file modules.cpp.
+Definition at line 364 of file modules.cpp.
+.PP
+References del_channel().
.PP
.nf
-373 {
-374 return del_channel(user,cname.c_str(),reason.c_str(),false);
-375 }
+365 {
+366 return del_channel(user,cname.c_str(),reason.c_str(),false);
+367 }
.fi
.PP
.SS "bool Server::PseudoToUser (\fBuserrec\fP * alive, \fBuserrec\fP * zombie, \fBstd::string\fP message)\fC [virtual]\fP"
@@ -996,39 +1020,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 613 of file modules.cpp.
+Definition at line 605 of file modules.cpp.
.PP
-References userrec::chans, userrec::ClearBuffer(), connection::fd, FD_MAGIC_NUMBER, connection::host, userrec::ident, chanrec::name, userrec::nick, chanrec::setby, chanrec::topic, and chanrec::topicset.
+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
-614 {
-615 zombie->fd = alive->fd;
-616 alive->fd = FD_MAGIC_NUMBER;
-617 alive->ClearBuffer();
-618 Write(zombie->fd,':%s!%s@%s NICK %s',alive->nick,alive->ident,alive->host,zombie->nick);
-619 kill_link(alive,message.c_str());
-620 fd_ref_table[zombie->fd] = zombie;
-621 for (unsigned int i = 0; i < zombie->chans.size(); i++)
-622 {
-623 if (zombie->chans[i].channel != NULL)
-624 {
-625 if (zombie->chans[i].channel->name)
-626 {
-627 chanrec* Ptr = zombie->chans[i].channel;
-628 WriteFrom(zombie->fd,zombie,'JOIN %s',Ptr->name);
-629 if (Ptr->topicset)
-630 {
-631 WriteServ(zombie->fd,'332 %s %s :%s', zombie->nick, Ptr->name, Ptr->topic);
-632 WriteServ(zombie->fd,'333 %s %s %s %d', zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset);
-633 }
-634 userlist(zombie,Ptr);
-635 WriteServ(zombie->fd,'366 %s %s :End of /NAMES list.', zombie->nick, Ptr->name);
-636
-637 }
-638 }
-639 }
-640 return true;
-641 }
+606 {
+607 zombie->fd = alive->fd;
+608 alive->fd = FD_MAGIC_NUMBER;
+609 alive->ClearBuffer();
+610 Write(zombie->fd,':%s!%s@%s NICK %s',alive->nick,alive->ident,alive->host,zombie->nick);
+611 kill_link(alive,message.c_str());
+612 fd_ref_table[zombie->fd] = zombie;
+613 for (unsigned int i = 0; i < zombie->chans.size(); i++)
+614 {
+615 if (zombie->chans[i].channel != NULL)
+616 {
+617 if (zombie->chans[i].channel->name)
+618 {
+619 chanrec* Ptr = zombie->chans[i].channel;
+620 WriteFrom(zombie->fd,zombie,'JOIN %s',Ptr->name);
+621 if (Ptr->topicset)
+622 {
+623 WriteServ(zombie->fd,'332 %s %s :%s', zombie->nick, Ptr->name, Ptr->topic);
+624 WriteServ(zombie->fd,'333 %s %s %s %d', zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset);
+625 }
+626 userlist(zombie,Ptr);
+627 WriteServ(zombie->fd,'366 %s %s :End of /NAMES list.', zombie->nick, Ptr->name);
+628
+629 }
+630 }
+631 }
+632 return true;
+633 }
.fi
.PP
.SS "void Server::QuitUser (\fBuserrec\fP * user, \fBstd::string\fP reason)\fC [virtual]\fP"
@@ -1041,25 +1065,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 394 of file modules.cpp.
+Definition at line 386 of file modules.cpp.
+.PP
+References kill_link().
.PP
.nf
-395 {
-396 kill_link(user,reason.c_str());
-397 }
+387 {
+388 kill_link(user,reason.c_str());
+389 }
.fi
.PP
.SS "void Server::RehashServer ()\fC [virtual]\fP"
.PP
-Definition at line 326 of file modules.cpp.
+Definition at line 318 of file modules.cpp.
.PP
-References ServerConfig::Read().
+References ServerConfig::Read(), and WriteOpers().
.PP
.nf
-327 {
-328 WriteOpers('*** Rehashing config file');
-329 Config->Read(false,NULL);
-330 }
+319 {
+320 WriteOpers('*** Rehashing config file');
+321 Config->Read(false,NULL);
+322 }
.fi
.PP
.SS "void Server::Send (int Socket, \fBstd::string\fP s)\fC [virtual]\fP"
@@ -1068,12 +1094,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 429 of file modules.cpp.
+Definition at line 421 of file modules.cpp.
+.PP
+References Write().
.PP
.nf
-430 {
-431 Write(Socket,'%s',s.c_str());
-432 }
+422 {
+423 Write(Socket,'%s',s.c_str());
+424 }
.fi
.PP
.SS "void Server::SendChannel (\fBuserrec\fP * User, \fBchanrec\fP * Channel, \fBstd::string\fP s, bool IncludeSender)\fC [virtual]\fP"
@@ -1082,19 +1110,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 463 of file modules.cpp.
+Definition at line 455 of file modules.cpp.
+.PP
+References ChanExceptSender(), and WriteChannel().
.PP
.nf
-464 {
-465 if (IncludeSender)
-466 {
-467 WriteChannel(Channel,User,'%s',s.c_str());
-468 }
-469 else
-470 {
-471 ChanExceptSender(Channel,User,'%s',s.c_str());
-472 }
-473 }
+456 {
+457 if (IncludeSender)
+458 {
+459 WriteChannel(Channel,User,'%s',s.c_str());
+460 }
+461 else
+462 {
+463 ChanExceptSender(Channel,User,'%s',s.c_str());
+464 }
+465 }
.fi
.PP
.SS "void Server::SendChannelServerNotice (\fBstd::string\fP ServName, \fBchanrec\fP * Channel, \fBstd::string\fP text)\fC [virtual]\fP"
@@ -1103,12 +1133,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 458 of file modules.cpp.
+Definition at line 450 of file modules.cpp.
.PP
.nf
-459 {
-460 WriteChannelWithServ((char*)ServName.c_str(), Channel, '%s', text.c_str());
-461 }
+451 {
+452 WriteChannelWithServ((char*)ServName.c_str(), Channel, '%s', text.c_str());
+453 }
.fi
.PP
.SS "void Server::SendCommon (\fBuserrec\fP * User, \fBstd::string\fP text, bool IncludeSender)\fC [virtual]\fP"
@@ -1117,19 +1147,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 480 of file modules.cpp.
+Definition at line 472 of file modules.cpp.
+.PP
+References WriteCommon(), and WriteCommonExcept().
.PP
.nf
-481 {
-482 if (IncludeSender)
-483 {
-484 WriteCommon(User,'%s',text.c_str());
-485 }
-486 else
-487 {
-488 WriteCommonExcept(User,'%s',text.c_str());
-489 }
-490 }
+473 {
+474 if (IncludeSender)
+475 {
+476 WriteCommon(User,'%s',text.c_str());
+477 }
+478 else
+479 {
+480 WriteCommonExcept(User,'%s',text.c_str());
+481 }
+482 }
.fi
.PP
.SS "void Server::SendFrom (int Socket, \fBuserrec\fP * User, \fBstd::string\fP s)\fC [virtual]\fP"
@@ -1138,12 +1170,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 439 of file modules.cpp.
+Definition at line 431 of file modules.cpp.
+.PP
+References WriteFrom().
.PP
.nf
-440 {
-441 WriteFrom(Socket,User,'%s',s.c_str());
-442 }
+432 {
+433 WriteFrom(Socket,User,'%s',s.c_str());
+434 }
.fi
.PP
.SS "void Server::SendMode (char ** parameters, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP"
@@ -1166,14 +1200,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 424 of file modules.cpp.
+Definition at line 416 of file modules.cpp.
.PP
References server_mode().
.PP
.nf
-425 {
-426 server_mode(parameters,pcnt,user);
-427 }
+417 {
+418 server_mode(parameters,pcnt,user);
+419 }
.fi
.PP
.SS "void Server::SendOpers (\fBstd::string\fP s)\fC [virtual]\fP"
@@ -1182,12 +1216,14 @@ Sends text to all opers.
.PP
This method sends a server notice to all opers with the usermode +s.
.PP
-Definition at line 349 of file modules.cpp.
+Definition at line 341 of file modules.cpp.
+.PP
+References WriteOpers().
.PP
.nf
-350 {
-351 WriteOpers('%s',s.c_str());
-352 }
+342 {
+343 WriteOpers('%s',s.c_str());
+344 }
.fi
.PP
.SS "void Server::SendServ (int Socket, \fBstd::string\fP s)\fC [virtual]\fP"
@@ -1196,12 +1232,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 434 of file modules.cpp.
+Definition at line 426 of file modules.cpp.
+.PP
+References WriteServ().
.PP
.nf
-435 {
-436 WriteServ(Socket,'%s',s.c_str());
-437 }
+427 {
+428 WriteServ(Socket,'%s',s.c_str());
+429 }
.fi
.PP
.SS "void Server::SendTo (\fBuserrec\fP * Source, \fBuserrec\fP * Dest, \fBstd::string\fP s)\fC [virtual]\fP"
@@ -1218,23 +1256,23 @@ The format will become:
.PP
Which is useful for numerics and server notices to single users, etc.
.PP
-Definition at line 444 of file modules.cpp.
+Definition at line 436 of file modules.cpp.
.PP
-References connection::fd.
+References connection::fd, Write(), and WriteTo().
.PP
.nf
-445 {
-446 if (!Source)
-447 {
-448 // if source is NULL, then the message originates from the local server
-449 Write(Dest->fd,':%s %s',this->GetServerName().c_str(),s.c_str());
-450 }
-451 else
-452 {
-453 // otherwise it comes from the user specified
-454 WriteTo(Source,Dest,'%s',s.c_str());
-455 }
-456 }
+437 {
+438 if (!Source)
+439 {
+440 // if source is NULL, then the message originates from the local server
+441 Write(Dest->fd,':%s %s',this->GetServerName().c_str(),s.c_str());
+442 }
+443 else
+444 {
+445 // otherwise it comes from the user specified
+446 WriteTo(Source,Dest,'%s',s.c_str());
+447 }
+448 }
.fi
.PP
.SS "void Server::SendToModeMask (\fBstd::string\fP modes, int flags, \fBstd::string\fP text)\fC [virtual]\fP"
@@ -1247,12 +1285,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 362 of file modules.cpp.
+Definition at line 354 of file modules.cpp.
.PP
.nf
-363 {
-364 WriteMode(modes.c_str(),flags,'%s',text.c_str());
-365 }
+355 {
+356 WriteMode(modes.c_str(),flags,'%s',text.c_str());
+357 }
.fi
.PP
.SS "void Server::SendWallops (\fBuserrec\fP * User, \fBstd::string\fP text)\fC [virtual]\fP"
@@ -1261,12 +1299,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 492 of file modules.cpp.
+Definition at line 484 of file modules.cpp.
+.PP
+References WriteWallOps().
.PP
.nf
-493 {
-494 WriteWallOps(User,false,'%s',text.c_str());
-495 }
+485 {
+486 WriteWallOps(User,false,'%s',text.c_str());
+487 }
.fi
.PP
.SS "bool Server::UserToPseudo (\fBuserrec\fP * user, \fBstd::string\fP message)\fC [virtual]\fP"
@@ -1275,21 +1315,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 601 of file modules.cpp.
+Definition at line 593 of file modules.cpp.
.PP
-References userrec::ClearBuffer(), SocketEngine::DelFd(), connection::fd, FD_MAGIC_NUMBER, connection::host, and userrec::ident.
+References userrec::ClearBuffer(), SocketEngine::DelFd(), connection::fd, FD_MAGIC_NUMBER, connection::host, userrec::ident, and Write().
.PP
.nf
-602 {
-603 unsigned int old_fd = user->fd;
-604 user->fd = FD_MAGIC_NUMBER;
-605 user->ClearBuffer();
-606 Write(old_fd,'ERROR :Closing link (%s@%s) [%s]',user->ident,user->host,message.c_str());
-607 SE->DelFd(old_fd);
-608 shutdown(old_fd,2);
-609 close(old_fd);
-610 return true;
-611 }
+594 {
+595 unsigned int old_fd = user->fd;
+596 user->fd = FD_MAGIC_NUMBER;
+597 user->ClearBuffer();
+598 Write(old_fd,'ERROR :Closing link (%s@%s) [%s]',user->ident,user->host,message.c_str());
+599 SE->DelFd(old_fd);
+600 shutdown(old_fd,2);
+601 close(old_fd);
+602 return true;
+603 }
.fi
.PP
diff --git a/docs/man/man3/ServerConfig.3 b/docs/man/man3/ServerConfig.3
index 8a713cdc1..18db5e7a1 100644
--- a/docs/man/man3/ServerConfig.3
+++ b/docs/man/man3/ServerConfig.3
@@ -187,6 +187,10 @@ Inherits \fBclassbase\fP.
.RI "std::vector< \fBstd::string\fP > \fBmodule_names\fP"
.br
.RI "\fIA list of module names (names only, no paths) which are currently loaded by the server. \fP"
+.ti -1c
+.RI "int \fBports\fP [255]"
+.br
+.RI "\fIA list of ports which the server is listening on. \fP"
.in -1c
.SS "Private Member Functions"
@@ -271,16 +275,22 @@ Definition at line 216 of file inspircd_io.h.
Holds the email address of the admin, for output in the /ADMIN command.
.PP
Definition at line 89 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.
+.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.
+.PP
+Referenced by Server::GetAdmin().
.SS "bool \fBServerConfig::AllowHalfop\fP"
.PP
If this value is true, halfops have been enabled in the configuration file.
@@ -401,6 +411,8 @@ Definition at line 182 of file inspircd_io.h.
.SS "char \fBServerConfig::Network\fP[MAXBUF]"
.PP
Definition at line 74 of file inspircd_io.h.
+.PP
+Referenced by 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.
@@ -411,6 +423,11 @@ Definition at line 158 of file inspircd_io.h.
The full pathname and filename of the PID file as defined in the configuration.
.PP
Definition at line 229 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.
.SS "char \fBServerConfig::PrefixQuit\fP[MAXBUF]"
.PP
The quit prefix in use, or an empty string.
@@ -436,13 +453,15 @@ Definition at line 112 of file inspircd_io.h.
Holds the description of the local server as defined by the administrator.
.PP
Definition at line 79 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.
.PP
-Referenced by userrec::userrec().
+Referenced by Server::GetServerName(), and userrec::userrec().
.SS "unsigned int \fBServerConfig::SoftLimit\fP"
.PP
The soft limit value assigned to the irc server.
diff --git a/docs/man/man3/SocketEngine.3 b/docs/man/man3/SocketEngine.3
index 07daeff47..9a1a5ea58 100644
--- a/docs/man/man3/SocketEngine.3
+++ b/docs/man/man3/SocketEngine.3
@@ -75,7 +75,7 @@ Please note that if there is a catastrophic failure (for example, you try and en
.PP
Definition at line 35 of file socketengine.cpp.
.PP
-References DEBUG, and EngineHandle.
+References DEBUG, EngineHandle, and log().
.PP
.nf
36 {
@@ -95,7 +95,7 @@ Destructor The destructor transparently tidies up any resources used by the sock
.PP
Definition at line 46 of file socketengine.cpp.
.PP
-References DEBUG, and EngineHandle.
+References DEBUG, EngineHandle, and log().
.PP
.nf
47 {
@@ -119,7 +119,7 @@ You must provide a type (see the consts in \fBsocketengine.h\fP) and a boolean f
.PP
Definition at line 65 of file socketengine.cpp.
.PP
-References DEBUG, EngineHandle, fds, ref, and X_READBIT.
+References DEBUG, EngineHandle, fds, log(), ref, and X_READBIT.
.PP
Referenced by InspSocket::InspSocket(), and InspSocket::Poll().
.PP
@@ -168,7 +168,7 @@ Delete a file descriptor f rom the engine This function call deletes a file desc
.PP
Definition at line 103 of file socketengine.cpp.
.PP
-References DEBUG, EngineHandle, fds, ref, and X_READBIT.
+References DEBUG, EngineHandle, fds, log(), ref, and X_READBIT.
.PP
Referenced by InspSocket::Poll(), and Server::UserToPseudo().
.PP
diff --git a/docs/man/man3/Version.3 b/docs/man/man3/Version.3
index 5cc2a2b77..abb990e74 100644
--- a/docs/man/man3/Version.3
+++ b/docs/man/man3/Version.3
@@ -49,10 +49,10 @@ Definition at line 113 of file modules.h.
.PP
.SS "Version::Version (int major, int minor, int revision, int build, int flags)"
.PP
-Definition at line 167 of file modules.cpp.
+Definition at line 159 of file modules.cpp.
.PP
.nf
-167 : Major(major), Minor(minor), Revision(revision), Build(build), Flags(flags) { };
+159 : Major(major), Minor(minor), Revision(revision), Build(build), Flags(flags) { };
.fi
.PP
.SH "Member Data Documentation"
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 3f59aa590..75e0ef123 100644
--- a/docs/man/man3/_home_brain_inspircd-cvs_inspircd_include_.3
+++ b/docs/man/man3/_home_brain_inspircd-cvs_inspircd_include_.3
@@ -25,9 +25,15 @@
.RI "file \fBdns.h\fP"
.br
.ti -1c
+.RI "file \fBglobals.h\fP"
+.br
+.ti -1c
.RI "file \fBhashcomp.h\fP"
.br
.ti -1c
+.RI "file \fBinspircd.h\fP"
+.br
+.ti -1c
.RI "file \fBinspircd_io.h\fP"
.br
.ti -1c
diff --git a/docs/man/man3/channels.cpp.3 b/docs/man/man3/channels.cpp.3
index 0d5feb55c..25dc3b6bd 100644
--- a/docs/man/man3/channels.cpp.3
+++ b/docs/man/man3/channels.cpp.3
@@ -46,6 +46,8 @@ channels.cpp \-
.br
\fC#include 'dynamic.h'\fP
.br
+\fC#include 'commands.h'\fP
+.br
\fC#include 'wildcard.h'\fP
.br
\fC#include 'message.h'\fP
@@ -58,6 +60,8 @@ channels.cpp \-
.br
\fC#include 'helperfuncs.h'\fP
.br
+\fC#include 'typedefs.h'\fP
+.br
.SS "Namespaces"
@@ -73,43 +77,50 @@ channels.cpp \-
.RI "#define \fBnspace\fP std"
.br
.in -1c
-.SS "Variables"
+.SS "Functions"
.in +1c
.ti -1c
-.RI "\fBServerConfig\fP * \fBConfig\fP"
+.RI "\fBchanrec\fP * \fBForceChan\fP (\fBchanrec\fP *Ptr, \fBucrec\fP &a, \fBuserrec\fP *user, int created)"
.br
.ti -1c
-.RI "int \fBMODCOUNT\fP = -1"
+.RI "\fBchanrec\fP * \fBadd_channel\fP (\fBuserrec\fP *user, const char *cn, const char *key, bool override)"
.br
.ti -1c
-.RI "std::vector< \fBModule\fP * > \fBmodules\fP"
+.RI "\fBchanrec\fP * \fBdel_channel\fP (\fBuserrec\fP *user, const char *cname, const char *reason, bool local)"
.br
.ti -1c
-.RI "std::vector< \fBircd_module\fP * > \fBfactory\fP"
+.RI "void \fBkick_channel\fP (\fBuserrec\fP *src, \fBuserrec\fP *user, \fBchanrec\fP *Ptr, char *reason)"
.br
+.in -1c
+.SS "Variables"
+
+.in +1c
.ti -1c
-.RI "int \fBWHOWAS_STALE\fP"
+.RI "\fBServerConfig\fP * \fBConfig\fP"
.br
.ti -1c
-.RI "int \fBWHOWAS_MAX\fP"
+.RI "int \fBMODCOUNT\fP = -1"
.br
.ti -1c
-.RI "time_t \fBstartup_time\fP"
+.RI "std::vector< \fBModule\fP * > \fBmodules\fP"
.br
.ti -1c
-.RI "std::vector< \fBstd::string\fP > \fBmodule_names\fP"
+.RI "std::vector< \fBircd_module\fP * > \fBfactory\fP"
.br
.ti -1c
-.RI "int \fBboundPortCount\fP"
+.RI "int \fBWHOWAS_STALE\fP"
.br
.ti -1c
-.RI "std::stringstream \fBconfig_f\fP"
+.RI "int \fBWHOWAS_MAX\fP"
.br
.ti -1c
.RI "time_t \fBTIME\fP"
.br
.ti -1c
+.RI "\fBchan_hash\fP \fBchanlist\fP"
+.br
+.ti -1c
.RI "std::vector< \fBModeParameter\fP > \fBcustom_mode_params\fP"
.br
.in -1c
@@ -117,37 +128,414 @@ channels.cpp \-
.PP
.SS "#define nspace std"
.PP
-Definition at line 53 of file channels.cpp.
+Definition at line 55 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.
+.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;
+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))
+285 {
+286 /* user was invited to channel */
+287 /* there may be an optional channel NOTICE here */
+288 }
+289 else
+290 {
+291 WriteServ(user->fd,'473 %s %s :Cannot join channel (Invite only)',user->nick, Ptr->name);
+292 return NULL;
+293 }
+294 }
+295 user->RemoveInvite(Ptr->name);
+296 }
+297 if (Ptr->limit)
+298 {
+299 MOD_RESULT = 0;
+300 FOREACH_RESULT(OnCheckLimit(user, Ptr));
+301 if (!MOD_RESULT)
+302 {
+303 if (usercount(Ptr) >= Ptr->limit)
+304 {
+305 WriteServ(user->fd,'471 %s %s :Cannot join channel (Channel is full)',user->nick, Ptr->name);
+306 return NULL;
+307 }
+308 }
+309 }
+310 if (Ptr->bans.size())
+311 {
+312 log(DEBUG,'add_channel: about to walk banlist');
+313 MOD_RESULT = 0;
+314 FOREACH_RESULT(OnCheckBan(user, Ptr));
+315 if (!MOD_RESULT)
+316 {
+317 for (BanList::iterator i = Ptr->bans.begin(); i != Ptr->bans.end(); i++)
+318 {
+319 if (match(user->GetFullHost(),i->data))
+320 {
+321 WriteServ(user->fd,'474 %s %s :Cannot join channel (You're banned)',user->nick, Ptr->name);
+322 return NULL;
+323 }
+324 }
+325 }
+326 }
+327 }
+328 }
+329 else
+330 {
+331 log(DEBUG,'Overridden checks');
+332 }
+333 created = 1;
+334 }
+335
+336 log(DEBUG,'Passed channel checks');
+337
+338 for (unsigned int index =0; index < user->chans.size(); index++)
+339 {
+340 if (user->chans[index].channel == NULL)
+341 {
+342 return ForceChan(Ptr,user->chans[index],user,created);
+343 }
+344 }
+345 /* XXX: If the user is an oper here, we can just extend their user->chans vector by one
+346 * and put the channel in here. Same for remote users which are not bound by
+347 * the channel limits. Otherwise, nope, youre boned.
+348 */
+349 if (user->fd < 0)
+350 {
+351 ucrec a;
+352 chanrec* c = ForceChan(Ptr,a,user,created);
+353 user->chans.push_back(a);
+354 return c;
+355 }
+356 else if (strchr(user->modes,'o'))
+357 {
+358 /* Oper allows extension up to the OPERMAXCHANS value */
+359 if (user->chans.size() < OPERMAXCHANS)
+360 {
+361 ucrec a;
+362 chanrec* c = ForceChan(Ptr,a,user,created);
+363 user->chans.push_back(a);
+364 return c;
+365 }
+366 }
+367 log(DEBUG,'add_channel: user channel max exceeded: %s %s',user->nick,cname);
+368 WriteServ(user->fd,'405 %s %s :You are on too many channels',user->nick, cname);
+369 return NULL;
+370 }
+.fi
+.PP
+.SS "\fBchanrec\fP* del_channel (\fBuserrec\fP * user, const char * cname, const char * reason, bool local)"
+.PP
+Definition at line 401 of file channels.cpp.
+.PP
+References chanlist, userrec::chans, DEBUG, DEFAULT, chanrec::DelUser(), FindChan(), FOREACH_MOD, log(), chanrec::name, userrec::nick, and WriteChannel().
+.PP
+Referenced by Server::PartUserFromChannel().
+.PP
+.nf
+402 {
+403 if ((!user) || (!cname))
+404 {
+405 log(DEFAULT,'*** BUG *** del_channel was given an invalid parameter');
+406 return NULL;
+407 }
+408
+409 chanrec* Ptr = FindChan(cname);
+410
+411 if (!Ptr)
+412 return NULL;
+413
+414 FOREACH_MOD OnUserPart(user,Ptr);
+415 log(DEBUG,'del_channel: removing: %s %s',user->nick,Ptr->name);
+416
+417 for (unsigned int i =0; i < user->chans.size(); i++)
+418 {
+419 /* zap it from the channel list of the user */
+420 if (user->chans[i].channel == Ptr)
+421 {
+422 if (reason)
+423 {
+424 WriteChannel(Ptr,user,'PART %s :%s',Ptr->name, reason);
+425 }
+426 else
+427 {
+428 WriteChannel(Ptr,user,'PART :%s',Ptr->name);
+429 }
+430 user->chans[i].uc_modes = 0;
+431 user->chans[i].channel = NULL;
+432 log(DEBUG,'del_channel: unlinked: %s %s',user->nick,Ptr->name);
+433 break;
+434 }
+435 }
+436
+437 Ptr->DelUser((char*)user);
+438
+439 /* if there are no users left on the channel */
+440 if (!usercount(Ptr))
+441 {
+442 chan_hash::iterator iter = chanlist.find(Ptr->name);
+443
+444 log(DEBUG,'del_channel: destroying channel: %s',Ptr->name);
+445
+446 /* kill the record */
+447 if (iter != chanlist.end())
+448 {
+449 log(DEBUG,'del_channel: destroyed: %s',Ptr->name);
+450 delete Ptr;
+451 chanlist.erase(iter);
+452 }
+453 }
+454
+455 return NULL;
+456 }
+.fi
+.PP
+.SS "\fBchanrec\fP * ForceChan (\fBchanrec\fP * Ptr, \fBucrec\fP & a, \fBuserrec\fP * user, int created)"
+.PP
+Definition at line 372 of file channels.cpp.
+.PP
+References chanrec::AddUser(), ucrec::channel, DEBUG, FOREACH_MOD, log(), chanrec::name, chanrec::setby, chanrec::topic, chanrec::topicset, ucrec::uc_modes, UCMODE_OP, WriteChannel(), and WriteServ().
+.PP
+Referenced by add_channel().
+.PP
+.nf
+373 {
+374 if (created == 2)
+375 {
+376 /* first user in is given ops */
+377 a.uc_modes = UCMODE_OP;
+378 }
+379 else
+380 {
+381 a.uc_modes = 0;
+382 }
+383 a.channel = Ptr;
+384 Ptr->AddUser((char*)user);
+385 WriteChannel(Ptr,user,'JOIN :%s',Ptr->name);
+386 log(DEBUG,'Sent JOIN to client');
+387 if (Ptr->topicset)
+388 {
+389 WriteServ(user->fd,'332 %s %s :%s', user->nick, Ptr->name, Ptr->topic);
+390 WriteServ(user->fd,'333 %s %s %s %lu', user->nick, Ptr->name, Ptr->setby, (unsigned long)Ptr->topicset);
+391 }
+392 userlist(user,Ptr);
+393 WriteServ(user->fd,'366 %s %s :End of /NAMES list.', user->nick, Ptr->name);
+394 FOREACH_MOD OnUserJoin(user,Ptr);
+395 return Ptr;
+396 }
+.fi
+.PP
+.SS "void kick_channel (\fBuserrec\fP * src, \fBuserrec\fP * user, \fBchanrec\fP * Ptr, char * reason)"
+.PP
+Definition at line 459 of file channels.cpp.
+.PP
+References AC_KICK, ACR_DEFAULT, ACR_DENY, chanlist, userrec::chans, cstatus(), DEBUG, DEFAULT, chanrec::DelUser(), connection::fd, FOREACH_MOD, FOREACH_RESULT, has_channel(), is_uline(), log(), chanrec::name, userrec::nick, userrec::server, STATUS_HOP, WriteChannel(), and WriteServ().
+.PP
+.nf
+460 {
+461 if ((!src) || (!user) || (!Ptr) || (!reason))
+462 {
+463 log(DEFAULT,'*** BUG *** kick_channel was given an invalid parameter');
+464 return;
+465 }
+466
+467 if ((!Ptr) || (!user) || (!src))
+468 {
+469 return;
+470 }
+471
+472 log(DEBUG,'kick_channel: removing: %s %s %s',user->nick,Ptr->name,src->nick);
+473
+474 if (!has_channel(user,Ptr))
+475 {
+476 WriteServ(src->fd,'441 %s %s %s :They are not on that channel',src->nick, user->nick, Ptr->name);
+477 return;
+478 }
+479
+480 int MOD_RESULT = 0;
+481 FOREACH_RESULT(OnAccessCheck(src,user,Ptr,AC_KICK));
+482 if ((MOD_RESULT == ACR_DENY) && (!is_uline(src->server)))
+483 return;
+484
+485 if ((MOD_RESULT == ACR_DEFAULT) || (!is_uline(src->server)))
+486 {
+487 if ((cstatus(src,Ptr) < STATUS_HOP) || (cstatus(src,Ptr) < cstatus(user,Ptr)))
+488 {
+489 if (cstatus(src,Ptr) == STATUS_HOP)
+490 {
+491 WriteServ(src->fd,'482 %s %s :You must be a channel operator',src->nick, Ptr->name);
+492 }
+493 else
+494 {
+495 WriteServ(src->fd,'482 %s %s :You must be at least a half-operator to change modes on this channel',src->nick, Ptr->name);
+496 }
+497
+498 return;
+499 }
+500 }
+501
+502 if (!is_uline(src->server))
+503 {
+504 MOD_RESULT = 0;
+505 FOREACH_RESULT(OnUserPreKick(src,user,Ptr,reason));
+506 if (MOD_RESULT)
+507 return;
+508 }
+509
+510 FOREACH_MOD OnUserKick(src,user,Ptr,reason);
+511
+512 for (unsigned int i =0; i < user->chans.size(); i++)
+513 {
+514 /* zap it from the channel list of the user */
+515 if (user->chans[i].channel)
+516 if (!strcasecmp(user->chans[i].channel->name,Ptr->name))
+517 {
+518 WriteChannel(Ptr,src,'KICK %s %s :%s',Ptr->name, user->nick, reason);
+519 user->chans[i].uc_modes = 0;
+520 user->chans[i].channel = NULL;
+521 log(DEBUG,'del_channel: unlinked: %s %s',user->nick,Ptr->name);
+522 break;
+523 }
+524 }
+525
+526 Ptr->DelUser((char*)user);
+527
+528 /* if there are no users left on the channel */
+529 if (!usercount(Ptr))
+530 {
+531 chan_hash::iterator iter = chanlist.find(Ptr->name);
+532
+533 log(DEBUG,'del_channel: destroying channel: %s',Ptr->name);
+534
+535 /* kill the record */
+536 if (iter != chanlist.end())
+537 {
+538 log(DEBUG,'del_channel: destroyed: %s',Ptr->name);
+539 delete Ptr;
+540 chanlist.erase(iter);
+541 }
+542 }
+543 }
+.fi
+.PP
.SH "Variable Documentation"
.PP
-.SS "int \fBboundPortCount\fP"
+.SS "\fBchan_hash\fP \fBchanlist\fP"
.PP
+Referenced by add_channel(), del_channel(), and kick_channel().
.SS "\fBServerConfig\fP* \fBConfig\fP"
.PP
-.SS "std::stringstream \fBconfig_f\fP"
-.PP
.SS "std::vector<\fBModeParameter\fP> \fBcustom_mode_params\fP"
.PP
-Definition at line 71 of file channels.cpp.
+Definition at line 70 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 938 of file modules.cpp.
+Definition at line 930 of file modules.cpp.
.PP
Referenced by Server::FindModule().
-.SS "std::vector<\fBstd::string\fP> \fBmodule_names\fP"
-.PP
.SS "std::vector<\fBModule\fP*> modules"
.PP
Referenced by Server::FindModule().
-.SS "time_t \fBstartup_time\fP"
-.PP
.SS "time_t \fBTIME\fP"
.PP
-Referenced by userrec::userrec().
+Referenced by add_channel(), and userrec::userrec().
.SS "int \fBWHOWAS_MAX\fP"
.PP
.SS "int \fBWHOWAS_STALE\fP"
diff --git a/docs/man/man3/channels.h.3 b/docs/man/man3/channels.h.3
index f1fb458f0..d69ebe674 100644
--- a/docs/man/man3/channels.h.3
+++ b/docs/man/man3/channels.h.3
@@ -102,17 +102,34 @@ channels.h \-
.br
.RI "\fIHolds a complete invite list. \fP"
.in -1c
+.SS "Functions"
+
+.in +1c
+.ti -1c
+.RI "\fBchanrec\fP * \fBadd_channel\fP (\fBuserrec\fP *user, const char *cn, const char *key, bool override)"
+.br
+.ti -1c
+.RI "\fBchanrec\fP * \fBdel_channel\fP (\fBuserrec\fP *user, const char *cname, const char *reason, bool local)"
+.br
+.ti -1c
+.RI "void \fBkick_channel\fP (\fBuserrec\fP *src, \fBuserrec\fP *user, \fBchanrec\fP *Ptr, char *reason)"
+.br
+.in -1c
.SH "Define Documentation"
.PP
.SS "#define CM_INVITEONLY 4"
.PP
Definition at line 28 of file channels.h.
+.PP
+Referenced by add_channel().
.SS "#define CM_MODERATED 8"
.PP
Definition at line 29 of file channels.h.
.SS "#define CM_NOEXTERNAL 2"
.PP
Definition at line 27 of file channels.h.
+.PP
+Referenced by add_channel().
.SS "#define CM_PRIVATE 32"
.PP
Definition at line 31 of file channels.h.
@@ -122,38 +139,389 @@ Definition at line 30 of file channels.h.
.SS "#define CM_TOPICLOCK 1"
.PP
Definition at line 26 of file channels.h.
+.PP
+Referenced by add_channel().
.SS "#define UCMODE_FOUNDER 16"
.PP
-Definition at line 234 of file channels.h.
+Definition at line 236 of file channels.h.
.SS "#define UCMODE_HOP 4"
.PP
-Definition at line 232 of file channels.h.
+Definition at line 234 of file channels.h.
.SS "#define UCMODE_OP 1"
.PP
-Definition at line 230 of file channels.h.
+Definition at line 232 of file channels.h.
+.PP
+Referenced by ForceChan().
.SS "#define UCMODE_PROTECT 8"
.PP
-Definition at line 233 of file channels.h.
+Definition at line 235 of file channels.h.
.SS "#define UCMODE_VOICE 2"
.PP
-Definition at line 231 of file channels.h.
+Definition at line 233 of file channels.h.
.SH "Typedef Documentation"
.PP
.SS "typedef std::vector<\fBBanItem\fP> \fBBanList\fP"
.PP
Holds a complete ban list.
.PP
-Definition at line 87 of file channels.h.
+Definition at line 89 of file channels.h.
.SS "typedef std::vector<\fBExemptItem\fP> \fBExemptList\fP"
.PP
Holds a complete exempt list.
.PP
-Definition at line 91 of file channels.h.
+Definition at line 93 of file channels.h.
.SS "typedef std::vector<\fBInviteItem\fP> \fBInviteList\fP"
.PP
Holds a complete invite list.
.PP
-Definition at line 95 of file channels.h.
+Definition at line 97 of file channels.h.
+.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.
+.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;
+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))
+285 {
+286 /* user was invited to channel */
+287 /* there may be an optional channel NOTICE here */
+288 }
+289 else
+290 {
+291 WriteServ(user->fd,'473 %s %s :Cannot join channel (Invite only)',user->nick, Ptr->name);
+292 return NULL;
+293 }
+294 }
+295 user->RemoveInvite(Ptr->name);
+296 }
+297 if (Ptr->limit)
+298 {
+299 MOD_RESULT = 0;
+300 FOREACH_RESULT(OnCheckLimit(user, Ptr));
+301 if (!MOD_RESULT)
+302 {
+303 if (usercount(Ptr) >= Ptr->limit)
+304 {
+305 WriteServ(user->fd,'471 %s %s :Cannot join channel (Channel is full)',user->nick, Ptr->name);
+306 return NULL;
+307 }
+308 }
+309 }
+310 if (Ptr->bans.size())
+311 {
+312 log(DEBUG,'add_channel: about to walk banlist');
+313 MOD_RESULT = 0;
+314 FOREACH_RESULT(OnCheckBan(user, Ptr));
+315 if (!MOD_RESULT)
+316 {
+317 for (BanList::iterator i = Ptr->bans.begin(); i != Ptr->bans.end(); i++)
+318 {
+319 if (match(user->GetFullHost(),i->data))
+320 {
+321 WriteServ(user->fd,'474 %s %s :Cannot join channel (You're banned)',user->nick, Ptr->name);
+322 return NULL;
+323 }
+324 }
+325 }
+326 }
+327 }
+328 }
+329 else
+330 {
+331 log(DEBUG,'Overridden checks');
+332 }
+333 created = 1;
+334 }
+335
+336 log(DEBUG,'Passed channel checks');
+337
+338 for (unsigned int index =0; index < user->chans.size(); index++)
+339 {
+340 if (user->chans[index].channel == NULL)
+341 {
+342 return ForceChan(Ptr,user->chans[index],user,created);
+343 }
+344 }
+345 /* XXX: If the user is an oper here, we can just extend their user->chans vector by one
+346 * and put the channel in here. Same for remote users which are not bound by
+347 * the channel limits. Otherwise, nope, youre boned.
+348 */
+349 if (user->fd < 0)
+350 {
+351 ucrec a;
+352 chanrec* c = ForceChan(Ptr,a,user,created);
+353 user->chans.push_back(a);
+354 return c;
+355 }
+356 else if (strchr(user->modes,'o'))
+357 {
+358 /* Oper allows extension up to the OPERMAXCHANS value */
+359 if (user->chans.size() < OPERMAXCHANS)
+360 {
+361 ucrec a;
+362 chanrec* c = ForceChan(Ptr,a,user,created);
+363 user->chans.push_back(a);
+364 return c;
+365 }
+366 }
+367 log(DEBUG,'add_channel: user channel max exceeded: %s %s',user->nick,cname);
+368 WriteServ(user->fd,'405 %s %s :You are on too many channels',user->nick, cname);
+369 return NULL;
+370 }
+.fi
+.PP
+.SS "\fBchanrec\fP* del_channel (\fBuserrec\fP * user, const char * cname, const char * reason, bool local)"
+.PP
+Definition at line 401 of file channels.cpp.
+.PP
+References chanlist, userrec::chans, DEBUG, DEFAULT, chanrec::DelUser(), FindChan(), FOREACH_MOD, log(), chanrec::name, userrec::nick, and WriteChannel().
+.PP
+Referenced by Server::PartUserFromChannel().
+.PP
+.nf
+402 {
+403 if ((!user) || (!cname))
+404 {
+405 log(DEFAULT,'*** BUG *** del_channel was given an invalid parameter');
+406 return NULL;
+407 }
+408
+409 chanrec* Ptr = FindChan(cname);
+410
+411 if (!Ptr)
+412 return NULL;
+413
+414 FOREACH_MOD OnUserPart(user,Ptr);
+415 log(DEBUG,'del_channel: removing: %s %s',user->nick,Ptr->name);
+416
+417 for (unsigned int i =0; i < user->chans.size(); i++)
+418 {
+419 /* zap it from the channel list of the user */
+420 if (user->chans[i].channel == Ptr)
+421 {
+422 if (reason)
+423 {
+424 WriteChannel(Ptr,user,'PART %s :%s',Ptr->name, reason);
+425 }
+426 else
+427 {
+428 WriteChannel(Ptr,user,'PART :%s',Ptr->name);
+429 }
+430 user->chans[i].uc_modes = 0;
+431 user->chans[i].channel = NULL;
+432 log(DEBUG,'del_channel: unlinked: %s %s',user->nick,Ptr->name);
+433 break;
+434 }
+435 }
+436
+437 Ptr->DelUser((char*)user);
+438
+439 /* if there are no users left on the channel */
+440 if (!usercount(Ptr))
+441 {
+442 chan_hash::iterator iter = chanlist.find(Ptr->name);
+443
+444 log(DEBUG,'del_channel: destroying channel: %s',Ptr->name);
+445
+446 /* kill the record */
+447 if (iter != chanlist.end())
+448 {
+449 log(DEBUG,'del_channel: destroyed: %s',Ptr->name);
+450 delete Ptr;
+451 chanlist.erase(iter);
+452 }
+453 }
+454
+455 return NULL;
+456 }
+.fi
+.PP
+.SS "void kick_channel (\fBuserrec\fP * src, \fBuserrec\fP * user, \fBchanrec\fP * Ptr, char * reason)"
+.PP
+Definition at line 459 of file channels.cpp.
+.PP
+References AC_KICK, ACR_DEFAULT, ACR_DENY, chanlist, userrec::chans, cstatus(), DEBUG, DEFAULT, chanrec::DelUser(), connection::fd, FOREACH_MOD, FOREACH_RESULT, has_channel(), is_uline(), log(), chanrec::name, userrec::nick, userrec::server, STATUS_HOP, WriteChannel(), and WriteServ().
+.PP
+.nf
+460 {
+461 if ((!src) || (!user) || (!Ptr) || (!reason))
+462 {
+463 log(DEFAULT,'*** BUG *** kick_channel was given an invalid parameter');
+464 return;
+465 }
+466
+467 if ((!Ptr) || (!user) || (!src))
+468 {
+469 return;
+470 }
+471
+472 log(DEBUG,'kick_channel: removing: %s %s %s',user->nick,Ptr->name,src->nick);
+473
+474 if (!has_channel(user,Ptr))
+475 {
+476 WriteServ(src->fd,'441 %s %s %s :They are not on that channel',src->nick, user->nick, Ptr->name);
+477 return;
+478 }
+479
+480 int MOD_RESULT = 0;
+481 FOREACH_RESULT(OnAccessCheck(src,user,Ptr,AC_KICK));
+482 if ((MOD_RESULT == ACR_DENY) && (!is_uline(src->server)))
+483 return;
+484
+485 if ((MOD_RESULT == ACR_DEFAULT) || (!is_uline(src->server)))
+486 {
+487 if ((cstatus(src,Ptr) < STATUS_HOP) || (cstatus(src,Ptr) < cstatus(user,Ptr)))
+488 {
+489 if (cstatus(src,Ptr) == STATUS_HOP)
+490 {
+491 WriteServ(src->fd,'482 %s %s :You must be a channel operator',src->nick, Ptr->name);
+492 }
+493 else
+494 {
+495 WriteServ(src->fd,'482 %s %s :You must be at least a half-operator to change modes on this channel',src->nick, Ptr->name);
+496 }
+497
+498 return;
+499 }
+500 }
+501
+502 if (!is_uline(src->server))
+503 {
+504 MOD_RESULT = 0;
+505 FOREACH_RESULT(OnUserPreKick(src,user,Ptr,reason));
+506 if (MOD_RESULT)
+507 return;
+508 }
+509
+510 FOREACH_MOD OnUserKick(src,user,Ptr,reason);
+511
+512 for (unsigned int i =0; i < user->chans.size(); i++)
+513 {
+514 /* zap it from the channel list of the user */
+515 if (user->chans[i].channel)
+516 if (!strcasecmp(user->chans[i].channel->name,Ptr->name))
+517 {
+518 WriteChannel(Ptr,src,'KICK %s %s :%s',Ptr->name, user->nick, reason);
+519 user->chans[i].uc_modes = 0;
+520 user->chans[i].channel = NULL;
+521 log(DEBUG,'del_channel: unlinked: %s %s',user->nick,Ptr->name);
+522 break;
+523 }
+524 }
+525
+526 Ptr->DelUser((char*)user);
+527
+528 /* if there are no users left on the channel */
+529 if (!usercount(Ptr))
+530 {
+531 chan_hash::iterator iter = chanlist.find(Ptr->name);
+532
+533 log(DEBUG,'del_channel: destroying channel: %s',Ptr->name);
+534
+535 /* kill the record */
+536 if (iter != chanlist.end())
+537 {
+538 log(DEBUG,'del_channel: destroyed: %s',Ptr->name);
+539 delete Ptr;
+540 chanlist.erase(iter);
+541 }
+542 }
+543 }
+.fi
+.PP
.SH "Author"
.PP
Generated automatically by Doxygen for InspIRCd from the source code.
diff --git a/docs/man/man3/chanrec.3 b/docs/man/man3/chanrec.3
index 3a6a2b8d3..393b75457 100644
--- a/docs/man/man3/chanrec.3
+++ b/docs/man/man3/chanrec.3
@@ -109,36 +109,36 @@ Holds all relevent information for a channel.
This class represents a channel, and contains its name, modes, time created, topic, topic set time, etc, and an instance of the BanList type.
.PP
-Definition at line 101 of file channels.h.
+Definition at line 103 of file channels.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "chanrec::chanrec ()"
.PP
Creates a channel record and initialises it with default values.
.PP
-Definition at line 73 of file channels.cpp.
+Definition at line 74 of file channels.cpp.
.PP
References binarymodes, created, custom_modes, internal_userlist, key, limit, name, setby, topic, and topicset.
.PP
.nf
-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 }
+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 }
.fi
.PP
.SS "virtual chanrec::~chanrec ()\fC [inline, virtual]\fP"
.PP
-Definition at line 224 of file channels.h.
+Definition at line 226 of file channels.h.
.PP
.nf
-224 { /* stub */ }
+226 { /* stub */ }
.fi
.PP
.SH "Member Function Documentation"
@@ -154,15 +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 166 of file channels.cpp.
+Definition at line 167 of file channels.cpp.
.PP
-References DEBUG, and internal_userlist.
+References DEBUG, internal_userlist, and log().
+.PP
+Referenced by ForceChan().
.PP
.nf
-167 {
-168 internal_userlist.push_back(castuser);
-169 log(DEBUG,'Added casted user to channel's internal list');
-170 }
+168 {
+169 internal_userlist.push_back(castuser);
+170 log(DEBUG,'Added casted user to channel's internal list');
+171 }
.fi
.PP
.SS "void chanrec::DelUser (char * castuser)"
@@ -176,23 +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 172 of file channels.cpp.
+Definition at line 173 of file channels.cpp.
+.PP
+References DEBUG, internal_userlist, log(), and name.
.PP
-References DEBUG, internal_userlist, and name.
+Referenced by del_channel(), and kick_channel().
.PP
.nf
-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 }
+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 }
.fi
.PP
.SS "\fBstd::string\fP chanrec::GetModeParameter (char mode)"
@@ -213,24 +217,24 @@ The parameter for this mode is returned, or an empty string
.PP
.PP
-Definition at line 146 of file channels.cpp.
+Definition at line 147 of file channels.cpp.
.PP
References custom_mode_params.
.PP
.nf
-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 }
+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 }
.fi
.PP
.SS "long chanrec::GetUserCounter ()"
@@ -244,12 +248,12 @@ The number of users on this channel
.PP
.PP
-Definition at line 161 of file channels.cpp.
+Definition at line 162 of file channels.cpp.
.PP
.nf
-162 {
-163 return (this->internal_userlist.size());
-164 }
+163 {
+164 return (this->internal_userlist.size());
+165 }
.fi
.PP
.SS "std::vector< char * > * chanrec::GetUsers ()"
@@ -265,16 +269,16 @@ This function returns a vector of userrec pointers, each of which has been caste
.PP
.PP
-Definition at line 186 of file channels.cpp.
+Definition at line 187 of file channels.cpp.
.PP
References internal_userlist.
.PP
Referenced by Server::GetUsers().
.PP
.nf
-187 {
-188 return &internal_userlist;
-189 }
+188 {
+189 return &internal_userlist;
+190 }
.fi
.PP
.SS "bool chanrec::IsCustomModeSet (char mode)"
@@ -293,12 +297,12 @@ True if the custom mode is set, false if otherwise
.PP
.PP
-Definition at line 141 of file channels.cpp.
+Definition at line 142 of file channels.cpp.
.PP
.nf
-142 {
-143 return (strchr(this->custom_modes,mode));
-144 }
+143 {
+144 return (strchr(this->custom_modes,mode));
+145 }
.fi
.PP
.SS "void chanrec::SetCustomMode (char mode, bool mode_on)"
@@ -314,33 +318,33 @@ Sets or unsets a custom mode in the channels info.
.PP
.PP
-Definition at line 85 of file channels.cpp.
+Definition at line 86 of file channels.cpp.
.PP
-References custom_modes, DEBUG, and SetCustomModeParam().
+References custom_modes, DEBUG, log(), and SetCustomModeParam().
.PP
.nf
-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 }
+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 }
.fi
.PP
.SS "void chanrec::SetCustomModeParam (char mode, char * parameter, bool mode_on)"
@@ -358,42 +362,42 @@ Sets or unsets the parameters for a custom mode in a channels info.
.PP
.PP
-Definition at line 110 of file channels.cpp.
+Definition at line 111 of file channels.cpp.
.PP
-References ModeParameter::channel, custom_mode_params, DEBUG, ModeParameter::mode, and ModeParameter::parameter.
+References ModeParameter::channel, custom_mode_params, DEBUG, log(), ModeParameter::mode, and ModeParameter::parameter.
.PP
Referenced by SetCustomMode().
.PP
.nf
-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 }
+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 }
.fi
.PP
.SH "Member Data Documentation"
@@ -402,19 +406,21 @@ Referenced by SetCustomMode().
.PP
The list of all bans set on the channel.
.PP
-Definition at line 149 of file channels.h.
+Definition at line 151 of file channels.h.
+.PP
+Referenced by add_channel().
.SS "char \fBchanrec::binarymodes\fP"
.PP
Contains a bitmask of the CM_* builtin (RFC) binary mode symbols.
.PP
-Definition at line 145 of file channels.h.
+Definition at line 147 of file channels.h.
.PP
-Referenced by chanrec().
+Referenced by add_channel(), and chanrec().
.SS "time_t \fBchanrec::created\fP"
.PP
Creation time.
.PP
-Definition at line 123 of file channels.h.
+Definition at line 125 of file channels.h.
.PP
Referenced by chanrec().
.SS "char \fBchanrec::custom_modes\fP[MAXMODES]"
@@ -423,14 +429,14 @@ Custom modes for the channel.
.PP
Plugins may use this field in any way they see fit.
.PP
-Definition at line 110 of file channels.h.
+Definition at line 112 of file channels.h.
.PP
Referenced by chanrec(), and SetCustomMode().
.SS "std::vector<char*> \fBchanrec::internal_userlist\fP"
.PP
User list (casted to char*'s to stop forward declaration stuff) (chicken and egg scenario!).
.PP
-Definition at line 115 of file channels.h.
+Definition at line 117 of file channels.h.
.PP
Referenced by AddUser(), chanrec(), DelUser(), and GetUsers().
.SS "char \fBchanrec::key\fP[32]"
@@ -439,52 +445,52 @@ Contains the channel key.
.PP
If this value is an empty string, there is no channel key in place.
.PP
-Definition at line 141 of file channels.h.
+Definition at line 143 of file channels.h.
.PP
-Referenced by chanrec().
+Referenced by add_channel(), and chanrec().
.SS "short int \fBchanrec::limit\fP"
.PP
Contains the channel user limit.
.PP
If this value is zero, there is no limit in place.
.PP
-Definition at line 136 of file channels.h.
+Definition at line 138 of file channels.h.
.PP
-Referenced by chanrec().
+Referenced by add_channel(), and chanrec().
.SS "char \fBchanrec::name\fP[CHANMAX]"
.PP
The channels name.
.PP
-Definition at line 106 of file channels.h.
+Definition at line 108 of file channels.h.
.PP
-Referenced by chanrec(), DelUser(), and Server::PseudoToUser().
+Referenced by add_channel(), chanrec(), del_channel(), DelUser(), ForceChan(), kick_channel(), and Server::PseudoToUser().
.SS "char \fBchanrec::setby\fP[NICKMAX]"
.PP
The last user to set the topic.
.PP
If this member is an empty string, no topic was ever set.
.PP
-Definition at line 131 of file channels.h.
+Definition at line 133 of file channels.h.
.PP
-Referenced by chanrec(), and Server::PseudoToUser().
+Referenced by chanrec(), ForceChan(), and Server::PseudoToUser().
.SS "char \fBchanrec::topic\fP[MAXBUF]"
.PP
Channel topic.
.PP
If this is an empty string, no channel topic is set.
.PP
-Definition at line 120 of file channels.h.
+Definition at line 122 of file channels.h.
.PP
-Referenced by chanrec(), and Server::PseudoToUser().
+Referenced by chanrec(), ForceChan(), and Server::PseudoToUser().
.SS "time_t \fBchanrec::topicset\fP"
.PP
Time topic was set.
.PP
If no topic was ever set, this will be equal to \fBchanrec::created\fP
.PP
-Definition at line 127 of file channels.h.
+Definition at line 129 of file channels.h.
.PP
-Referenced by chanrec(), and Server::PseudoToUser().
+Referenced by chanrec(), ForceChan(), and Server::PseudoToUser().
.SH "Author"
.PP
diff --git a/docs/man/man3/command_t.3 b/docs/man/man3/command_t.3
index d9c551c30..37dbe8e76 100644
--- a/docs/man/man3/command_t.3
+++ b/docs/man/man3/command_t.3
@@ -20,7 +20,7 @@ Inherits \fBExtensible\fP.
.br
.RI "\fICommand name. \fP"
.ti -1c
-.RI "handlerfunc * \fBhandler_function\fP"
+.RI "\fBhandlerfunc\fP * \fBhandler_function\fP"
.br
.RI "\fIHandler function as in typedef. \fP"
.ti -1c
@@ -61,7 +61,7 @@ Definition at line 31 of file ctables.h.
User flags needed to execute the command or 0.
.PP
Definition at line 37 of file ctables.h.
-.SS "handlerfunc* \fBcommand_t::handler_function\fP"
+.SS "\fBhandlerfunc\fP* \fBcommand_t::handler_function\fP"
.PP
Handler function as in typedef.
.PP
diff --git a/docs/man/man3/commands.h.3 b/docs/man/man3/commands.h.3
index 338196308..27e6cf0a7 100644
--- a/docs/man/man3/commands.h.3
+++ b/docs/man/man3/commands.h.3
@@ -309,7 +309,7 @@ These are the handlers for user commands.
.PP
Functions for u:lined servers.
.PP
-Referenced by userrec::HasPermission(), and Server::IsUlined().
+Referenced by userrec::HasPermission(), Server::IsUlined(), and kick_channel().
.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 46175dd7f..c341c9284 100644
--- a/docs/man/man3/connection.3
+++ b/docs/man/man3/connection.3
@@ -139,7 +139,7 @@ File descriptor of the connection.
.PP
Definition at line 42 of file connection.h.
.PP
-Referenced by connection(), ConfigReader::DumpErrors(), Server::PseudoToUser(), Server::SendTo(), userrec::userrec(), and Server::UserToPseudo().
+Referenced by add_channel(), connection(), ConfigReader::DumpErrors(), kick_channel(), Server::PseudoToUser(), Server::SendTo(), userrec::userrec(), and Server::UserToPseudo().
.SS "bool \fBconnection::haspassed\fP"
.PP
True if server/user has authenticated, false if otherwise.
diff --git a/docs/man/man3/globals.h.3 b/docs/man/man3/globals.h.3
new file mode 100644
index 000000000..06d0d81f1
--- /dev/null
+++ b/docs/man/man3/globals.h.3
@@ -0,0 +1,174 @@
+.TH "globals.h" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.ad l
+.nh
+.SH NAME
+globals.h \-
+.SH SYNOPSIS
+.br
+.PP
+\fC#include <typeinfo>\fP
+.br
+\fC#include <iostream>\fP
+.br
+\fC#include <string>\fP
+.br
+\fC#include <deque>\fP
+.br
+\fC#include 'users.h'\fP
+.br
+\fC#include 'channels.h'\fP
+.br
+
+.SS "Typedefs"
+
+.in +1c
+.ti -1c
+.RI "typedef std::deque< \fBstd::string\fP > \fBfile_cache\fP"
+.br
+.in -1c
+.SS "Functions"
+
+.in +1c
+.ti -1c
+.RI "void \fBWriteOpers\fP (char *text,...)"
+.br
+.ti -1c
+.RI "void \fBlog\fP (int level, char *text,...)"
+.br
+.ti -1c
+.RI "void \fBWrite\fP (int sock, char *text,...)"
+.br
+.ti -1c
+.RI "void \fBWriteServ\fP (int sock, char *text,...)"
+.br
+.ti -1c
+.RI "void \fBWriteFrom\fP (int sock, \fBuserrec\fP *user, char *text,...)"
+.br
+.ti -1c
+.RI "void \fBWriteTo\fP (\fBuserrec\fP *source, \fBuserrec\fP *dest, char *data,...)"
+.br
+.ti -1c
+.RI "void \fBWriteChannel\fP (\fBchanrec\fP *Ptr, \fBuserrec\fP *user, char *text,...)"
+.br
+.ti -1c
+.RI "void \fBChanExceptSender\fP (\fBchanrec\fP *Ptr, \fBuserrec\fP *user, char *text,...)"
+.br
+.ti -1c
+.RI "int \fBcommon_channels\fP (\fBuserrec\fP *u, \fBuserrec\fP *u2)"
+.br
+.ti -1c
+.RI "void \fBWriteCommon\fP (\fBuserrec\fP *u, char *text,...)"
+.br
+.ti -1c
+.RI "void \fBWriteCommonExcept\fP (\fBuserrec\fP *u, char *text,...)"
+.br
+.ti -1c
+.RI "void \fBWriteWallOps\fP (\fBuserrec\fP *source, bool local_only, char *text,...)"
+.br
+.ti -1c
+.RI "int \fBisnick\fP (const char *n)"
+.br
+.ti -1c
+.RI "\fBuserrec\fP * \fBFind\fP (\fBstd::string\fP nick)"
+.br
+.ti -1c
+.RI "\fBchanrec\fP * \fBFindChan\fP (const char *chan)"
+.br
+.ti -1c
+.RI "char * \fBcmode\fP (\fBuserrec\fP *user, \fBchanrec\fP *chan)"
+.br
+.ti -1c
+.RI "\fBstd::string\fP \fBgetservername\fP ()"
+.br
+.ti -1c
+.RI "\fBstd::string\fP \fBgetnetworkname\fP ()"
+.br
+.ti -1c
+.RI "\fBstd::string\fP \fBgetadminname\fP ()"
+.br
+.ti -1c
+.RI "\fBstd::string\fP \fBgetadminemail\fP ()"
+.br
+.ti -1c
+.RI "\fBstd::string\fP \fBgetadminnick\fP ()"
+.br
+.ti -1c
+.RI "void \fBreadfile\fP (\fBfile_cache\fP &F, const char *fname)"
+.br
+.ti -1c
+.RI "int \fBModeDefiend\fP (char c, int i)"
+.br
+.in -1c
+.SH "Typedef Documentation"
+.PP
+.SS "typedef std::deque<\fBstd::string\fP> \fBfile_cache\fP"
+.PP
+Definition at line 29 of file globals.h.
+.SH "Function Documentation"
+.PP
+.SS "void ChanExceptSender (\fBchanrec\fP * Ptr, \fBuserrec\fP * user, char * text, ...)"
+.PP
+Referenced by Server::SendChannel().
+.SS "char* cmode (\fBuserrec\fP * user, \fBchanrec\fP * chan)"
+.PP
+Referenced by Server::ChanMode().
+.SS "int common_channels (\fBuserrec\fP * u, \fBuserrec\fP * u2)"
+.PP
+Referenced by Server::CommonChannels().
+.SS "\fBuserrec\fP* Find (\fBstd::string\fP nick)"
+.PP
+Referenced by Server::FindNick().
+.SS "\fBchanrec\fP* FindChan (const char * chan)"
+.PP
+Referenced by add_channel(), del_channel(), and Server::FindChannel().
+.SS "\fBstd::string\fP getadminemail ()"
+.PP
+.SS "\fBstd::string\fP getadminname ()"
+.PP
+.SS "\fBstd::string\fP getadminnick ()"
+.PP
+.SS "\fBstd::string\fP getnetworkname ()"
+.PP
+.SS "\fBstd::string\fP getservername ()"
+.PP
+.SS "int isnick (const char * n)"
+.PP
+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().
+.SS "int ModeDefiend (char c, int i)"
+.PP
+.SS "void readfile (\fBfile_cache\fP & F, const char * fname)"
+.PP
+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().
+.SS "void WriteChannel (\fBchanrec\fP * Ptr, \fBuserrec\fP * user, char * text, ...)"
+.PP
+Referenced by del_channel(), ForceChan(), kick_channel(), and Server::SendChannel().
+.SS "void WriteCommon (\fBuserrec\fP * u, char * text, ...)"
+.PP
+Referenced by Server::SendCommon().
+.SS "void WriteCommonExcept (\fBuserrec\fP * u, char * text, ...)"
+.PP
+Referenced by 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().
+.SS "void WriteServ (int sock, char * text, ...)"
+.PP
+Referenced by add_channel(), ConfigReader::DumpErrors(), ForceChan(), kick_channel(), Server::PseudoToUser(), and Server::SendServ().
+.SS "void WriteTo (\fBuserrec\fP * source, \fBuserrec\fP * dest, char * data, ...)"
+.PP
+Referenced by Server::SendTo().
+.SS "void WriteWallOps (\fBuserrec\fP * source, bool local_only, char * text, ...)"
+.PP
+Referenced by Server::SendWallops().
+.SH "Author"
+.PP
+Generated automatically by Doxygen for InspIRCd from the source code.
diff --git a/docs/man/man3/inspircd.h.3 b/docs/man/man3/inspircd.h.3
new file mode 100644
index 000000000..7ad3acf2c
--- /dev/null
+++ b/docs/man/man3/inspircd.h.3
@@ -0,0 +1,271 @@
+.TH "inspircd.h" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.ad l
+.nh
+.SH NAME
+inspircd.h \-
+.SH SYNOPSIS
+.br
+.PP
+\fC#include 'inspircd_config.h'\fP
+.br
+\fC#include <string>\fP
+.br
+\fC#include <stdio.h>\fP
+.br
+\fC#include <unistd.h>\fP
+.br
+\fC#include <signal.h>\fP
+.br
+\fC#include <time.h>\fP
+.br
+\fC#include <netdb.h>\fP
+.br
+\fC#include <string.h>\fP
+.br
+\fC#include <errno.h>\fP
+.br
+\fC#include <sys/types.h>\fP
+.br
+\fC#include <sys/socket.h>\fP
+.br
+\fC#include <sys/stat.h>\fP
+.br
+\fC#include <netinet/in.h>\fP
+.br
+\fC#include <arpa/inet.h>\fP
+.br
+\fC#include <deque>\fP
+.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
+
+.SS "Classes"
+
+.in +1c
+.ti -1c
+.RI "class \fBserverstats\fP"
+.br
+.ti -1c
+.RI "class \fBInspIRCd\fP"
+.br
+.in -1c
+.SS "Defines"
+
+.in +1c
+.ti -1c
+.RI "#define \fBERROR\fP -1"
+.br
+.ti -1c
+.RI "#define \fBTRUE\fP 1"
+.br
+.ti -1c
+.RI "#define \fBFALSE\fP 0"
+.br
+.ti -1c
+.RI "#define \fBMAXSOCKS\fP 64"
+.br
+.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 "\fBstd::string\fP \fBGetRevision\fP ()"
+.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 "char * \fBModuleError\fP ()"
+.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 "\fBstd::string\fP \fBGetVersionString\fP ()"
+.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.
+.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.
+.SS "#define MAXCOMMAND 32"
+.PP
+Definition at line 53 of file inspircd.h.
+.SS "#define MAXSOCKS 64"
+.PP
+Definition at line 52 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.
+.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 "\fBstd::string\fP GetRevision ()"
+.PP
+.SS "\fBstd::string\fP GetVersionString ()"
+.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 "char* ModuleError ()"
+.PP
+.SS "void process_buffer (const char * cmdbuf, \fBuserrec\fP * user)"
+.PP
+.SS "\fBuserrec\fP* ReHashNick (char * Old, char * New)"
+.PP
+.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 fa150ea79..623efdc4a 100644
--- a/docs/man/man3/inspircd_io.h.3
+++ b/docs/man/man3/inspircd_io.h.3
@@ -31,7 +31,7 @@ inspircd_io.h \-
.ti -1c
.RI "#define \fBDEBUG\fP 10"
.br
-.RI "\fIFlags for use with log(). \fP"
+.RI "\fIFlags for use with \fBlog()\fP. \fP"
.ti -1c
.RI "#define \fBVERBOSE\fP 20"
.br
@@ -69,19 +69,24 @@ inspircd_io.h \-
.ti -1c
.RI "void \fBWritePID\fP (\fBstd::string\fP filename)"
.br
+.ti -1c
+.RI "int \fBBindPorts\fP ()"
+.br
.in -1c
.SH "Define Documentation"
.PP
.SS "#define DEBUG 10"
.PP
-Flags for use with log().
+Flags for use with \fBlog()\fP.
.PP
Definition at line 28 of file inspircd_io.h.
.PP
-Referenced by Server::AddExtendedMode(), SocketEngine::AddFd(), chanrec::AddUser(), SocketEngine::DelFd(), chanrec::DelUser(), InspSocket::InspSocket(), InspSocket::Read(), userrec::RemoveInvite(), chanrec::SetCustomMode(), chanrec::SetCustomModeParam(), InspSocket::SetState(), userrec::SetWriteError(), SocketEngine::SocketEngine(), and SocketEngine::~SocketEngine().
+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().
.SS "#define DEFAULT 30"
.PP
Definition at line 30 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.
@@ -93,6 +98,8 @@ Definition at line 31 of file inspircd_io.h.
Definition at line 29 of file inspircd_io.h.
.SH "Function Documentation"
.PP
+.SS "int BindPorts ()"
+.PP
.SS "int BindSocket (int sockfd, struct sockaddr_in client, struct sockaddr_in server, int port, char * addr)"
.PP
Referenced by InspSocket::InspSocket().
diff --git a/docs/man/man3/message.h.3 b/docs/man/man3/message.h.3
index 719defbf5..f677c6554 100644
--- a/docs/man/man3/message.h.3
+++ b/docs/man/man3/message.h.3
@@ -101,22 +101,20 @@ Referenced by Server::ChangeGECOS().
.PP
.SS "char* cmode (\fBuserrec\fP * user, \fBchanrec\fP * chan)"
.PP
-Referenced by Server::ChanMode().
.SS "int common_channels (\fBuserrec\fP * u, \fBuserrec\fP * u2)"
.PP
-Referenced by Server::CommonChannels().
.SS "int cstatus (\fBuserrec\fP * user, \fBchanrec\fP * chan)"
.PP
+Referenced by kick_channel().
.SS "int has_channel (\fBuserrec\fP * u, \fBchanrec\fP * c)"
.PP
-Referenced by Server::IsOnChannel().
+Referenced by add_channel(), Server::IsOnChannel(), and kick_channel().
.SS "bool hasumode (\fBuserrec\fP * user, char mode)"
.PP
.SS "int isident (const char * n)"
.PP
.SS "int isnick (const char * n)"
.PP
-Referenced by Server::IsNick().
.SS "void NonBlocking (int s)"
.PP
.SS "void send_network_quit (const char * nick, const char * reason)"
diff --git a/docs/man/man3/modules.cpp.3 b/docs/man/man3/modules.cpp.3
index b8eec9add..0739843bf 100644
--- a/docs/man/man3/modules.cpp.3
+++ b/docs/man/man3/modules.cpp.3
@@ -106,6 +106,9 @@ modules.cpp \-
.RI "\fBServerConfig\fP * \fBConfig\fP"
.br
.ti -1c
+.RI "\fBInspIRCd\fP * \fBServerInstance\fP"
+.br
+.ti -1c
.RI "int \fBMODCOUNT\fP = -1"
.br
.ti -1c
@@ -121,24 +124,6 @@ modules.cpp \-
.RI "time_t \fBTIME\fP"
.br
.ti -1c
-.RI "int \fBWHOWAS_STALE\fP"
-.br
-.ti -1c
-.RI "int \fBWHOWAS_MAX\fP"
-.br
-.ti -1c
-.RI "time_t \fBstartup_time\fP"
-.br
-.ti -1c
-.RI "int \fBboundPortCount\fP"
-.br
-.ti -1c
-.RI "int \fBportCount\fP"
-.br
-.ti -1c
-.RI "int \fBports\fP [MAXSOCKS]"
-.br
-.ti -1c
.RI "\fBuserrec\fP * \fBfd_ref_table\fP [65536]"
.br
.ti -1c
@@ -148,15 +133,9 @@ modules.cpp \-
.RI "\fBchan_hash\fP \fBchanlist\fP"
.br
.ti -1c
-.RI "\fBwhowas_hash\fP \fBwhowas\fP"
-.br
-.ti -1c
.RI "\fBcommand_table\fP \fBcmdlist\fP"
.br
.ti -1c
-.RI "\fBaddress_cache\fP \fBIP\fP"
-.br
-.ti -1c
.RI "\fBExtModeList\fP \fBEMode\fP"
.br
.in -1c
@@ -164,149 +143,147 @@ modules.cpp \-
.PP
.SS "bool DoAddExtendedMode (char modechar, int type, bool requires_oper, int params_on, int params_off)"
.PP
-Definition at line 142 of file modules.cpp.
+Definition at line 134 of file modules.cpp.
.PP
References EMode, and ModeDefined().
.PP
Referenced by Server::AddExtendedListMode(), and Server::AddExtendedMode().
.PP
.nf
-143 {
-144 if (ModeDefined(modechar,type)) {
-145 return false;
-146 }
-147 EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off));
-148 return true;
-149 }
+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 }
.fi
.PP
.SS "std::vector<\fBircd_module\fP*> factory (255)"
.PP
.SS "bool ModeDefined (char modechar, int type)"
.PP
-Definition at line 79 of file modules.cpp.
+Definition at line 71 of file modules.cpp.
.PP
References EMode.
.PP
Referenced by DoAddExtendedMode().
.PP
.nf
-80 {
-81 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
-82 {
-83 if ((i->modechar == modechar) && (i->type == type))
-84 {
-85 return true;
-86 }
-87 }
-88 return false;
-89 }
+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 }
.fi
.PP
.SS "int ModeDefinedOff (char modechar, int type)"
.PP
-Definition at line 129 of file modules.cpp.
+Definition at line 121 of file modules.cpp.
.PP
References EMode.
.PP
.nf
-130 {
-131 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
-132 {
-133 if ((i->modechar == modechar) && (i->type == type))
-134 {
-135 return i->params_when_off;
-136 }
-137 }
-138 return 0;
-139 }
+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 }
.fi
.PP
.SS "int ModeDefinedOn (char modechar, int type)"
.PP
-Definition at line 116 of file modules.cpp.
+Definition at line 108 of file modules.cpp.
.PP
References EMode.
.PP
.nf
-117 {
-118 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
-119 {
-120 if ((i->modechar == modechar) && (i->type == type))
-121 {
-122 return i->params_when_on;
-123 }
-124 }
-125 return 0;
-126 }
+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 }
.fi
.PP
.SS "bool ModeDefinedOper (char modechar, int type)"
.PP
-Definition at line 103 of file modules.cpp.
+Definition at line 95 of file modules.cpp.
.PP
References EMode.
.PP
.nf
-104 {
-105 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
-106 {
-107 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true))
-108 {
-109 return true;
-110 }
-111 }
-112 return false;
-113 }
+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 }
.fi
.PP
.SS "bool ModeIsListMode (char modechar, int type)"
.PP
-Definition at line 91 of file modules.cpp.
+Definition at line 83 of file modules.cpp.
.PP
References EMode.
.PP
.nf
-92 {
-93 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
-94 {
-95 if ((i->modechar == modechar) && (i->type == type) && (i->list == true))
-96 {
-97 return true;
-98 }
-99 }
-100 return false;
-101 }
+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 }
.fi
.PP
.SS "void ModeMakeList (char modechar)"
.PP
-Definition at line 152 of file modules.cpp.
+Definition at line 144 of file modules.cpp.
.PP
References EMode, and MT_CHANNEL.
.PP
Referenced by Server::AddExtendedListMode().
.PP
.nf
-153 {
-154 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
-155 {
-156 if ((i->modechar == modechar) && (i->type == MT_CHANNEL))
-157 {
-158 i->list = true;
-159 return;
-160 }
-161 }
-162 return;
-163 }
+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 }
.fi
.PP
.SS "std::vector<\fBModule\fP*> modules (255)"
.PP
.SH "Variable Documentation"
.PP
-.SS "int \fBboundPortCount\fP"
-.PP
.SS "\fBchan_hash\fP \fBchanlist\fP"
.PP
.SS "\fBuser_hash\fP \fBclientlist\fP"
@@ -317,39 +294,27 @@ Referenced by Server::AddExtendedListMode().
.PP
.SS "\fBExtModeList\fP \fBEMode\fP"
.PP
-Definition at line 76 of file modules.cpp.
+Definition at line 68 of file modules.cpp.
.PP
Referenced by DoAddExtendedMode(), ModeDefined(), ModeDefinedOff(), ModeDefinedOn(), ModeDefinedOper(), ModeIsListMode(), and ModeMakeList().
.SS "std::vector<\fBircd_module\fP*> factory"
.PP
.SS "\fBuserrec\fP* \fBfd_ref_table\fP[65536]"
.PP
-.SS "\fBaddress_cache\fP \fBIP\fP"
-.PP
.SS "int \fBMODCOUNT\fP = -1"
.PP
-Definition at line 938 of file modules.cpp.
+Definition at line 930 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 "int \fBportCount\fP"
-.PP
-.SS "int \fBports\fP[MAXSOCKS]"
-.PP
.SS "\fBSocketEngine\fP* \fBSE\fP"
.PP
-.SS "time_t \fBstartup_time\fP"
+.SS "\fBInspIRCd\fP* \fBServerInstance\fP"
.PP
.SS "time_t \fBTIME\fP"
.PP
-.SS "\fBwhowas_hash\fP \fBwhowas\fP"
-.PP
-.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/modules.h.3 b/docs/man/man3/modules.h.3
index 28f7e5404..24fd4c360 100644
--- a/docs/man/man3/modules.h.3
+++ b/docs/man/man3/modules.h.3
@@ -51,7 +51,7 @@ modules.h \-
.ti -1c
.RI "class \fBModule\fP"
.br
-.RI "\fIBase class for all InspIRCd modules This class is the base class for InspIRCd modules. \fP"
+.RI "\fIBase class for all \fBInspIRCd\fP modules This class is the base class for \fBInspIRCd\fP modules. \fP"
.ti -1c
.RI "class \fBServer\fP"
.br
@@ -192,11 +192,29 @@ modules.h \-
.in +1c
.ti -1c
-.RI "void \fBcreatecommand\fP (char *cmd, handlerfunc f, char flags, int minparams, char *source)"
+.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
+.RI "bool \fBModeDefinedOper\fP (char c, int i)"
+.br
+.ti -1c
+.RI "int \fBModeDefinedOn\fP (char c, int i)"
+.br
+.ti -1c
+.RI "int \fBModeDefinedOff\fP (char c, int i)"
+.br
+.ti -1c
+.RI "void \fBModeMakeList\fP (char modechar)"
+.br
+.ti -1c
+.RI "bool \fBModeIsListMode\fP (char modechar, int type)"
+.br
.in -1c
.SH "Define Documentation"
.PP
@@ -221,6 +239,8 @@ Definition at line 47 of file modules.h.
.SS "#define AC_KICK 0"
.PP
Definition at line 40 of file modules.h.
+.PP
+Referenced by kick_channel().
.SS "#define AC_OP 2"
.PP
Definition at line 42 of file modules.h.
@@ -236,10 +256,12 @@ Used with OnAccessCheck() method of modules.
.PP
Definition at line 37 of file modules.h.
.PP
-Referenced by Module::OnAccessCheck().
+Referenced by kick_channel(), and Module::OnAccessCheck().
.SS "#define ACR_DENY 1"
.PP
Definition at line 38 of file modules.h.
+.PP
+Referenced by kick_channel().
.SS "#define CONF_FILE_NOT_FOUND 0x000200"
.PP
Definition at line 1520 of file modules.h.
@@ -277,7 +299,7 @@ Referenced by Server::PseudoToUser(), and Server::UserToPseudo().
.PP
Definition at line 81 of file modules.h.
.PP
-Referenced by Event::Send().
+Referenced by del_channel(), ForceChan(), kick_channel(), and Event::Send().
.SS "#define FOREACH_RESULT(x)"
.PP
\fBValue:\fP
@@ -295,6 +317,8 @@ Referenced by Event::Send().
.fi
.PP
Definition at line 89 of file modules.h.
+.PP
+Referenced by add_channel(), and kick_channel().
.SS "#define MT_CHANNEL 1"
.PP
Used with OnExtendedMode() method of modules.
@@ -357,9 +381,128 @@ Definition at line 1686 of file modules.h.
Definition at line 70 of file modules.h.
.SH "Function Documentation"
.PP
-.SS "void createcommand (char * cmd, handlerfunc f, char flags, int minparams, char * source)"
+.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.
+.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 }
+.fi
+.PP
+.SS "int ModeDefinedOff (char c, int i)"
+.PP
+Definition at line 121 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 }
+.fi
+.PP
+.SS "int ModeDefinedOn (char c, int i)"
+.PP
+Definition at line 108 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 }
+.fi
+.PP
+.SS "bool ModeDefinedOper (char c, int i)"
+.PP
+Definition at line 95 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 }
+.fi
+.PP
+.SS "bool ModeIsListMode (char modechar, int type)"
+.PP
+Definition at line 83 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 }
+.fi
+.PP
+.SS "void ModeMakeList (char modechar)"
+.PP
+Definition at line 144 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 }
+.fi
+.PP
.SS "void server_mode (char ** parameters, int pcnt, \fBuserrec\fP * user)"
.PP
.SH "Author"
diff --git a/docs/man/man3/serverstats.3 b/docs/man/man3/serverstats.3
new file mode 100644
index 000000000..18657e790
--- /dev/null
+++ b/docs/man/man3/serverstats.3
@@ -0,0 +1,126 @@
+.TH "serverstats" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*-
+.ad l
+.nh
+.SH NAME
+serverstats \-
+.SH SYNOPSIS
+.br
+.PP
+\fC#include <inspircd.h>\fP
+.PP
+.SS "Public Member Functions"
+
+.in +1c
+.ti -1c
+.RI "\fBserverstats\fP ()"
+.br
+.in -1c
+.SS "Public Attributes"
+
+.in +1c
+.ti -1c
+.RI "int \fBstatsAccept\fP"
+.br
+.ti -1c
+.RI "int \fBstatsRefused\fP"
+.br
+.ti -1c
+.RI "int \fBstatsUnknown\fP"
+.br
+.ti -1c
+.RI "int \fBstatsCollisions\fP"
+.br
+.ti -1c
+.RI "int \fBstatsDns\fP"
+.br
+.ti -1c
+.RI "int \fBstatsDnsGood\fP"
+.br
+.ti -1c
+.RI "int \fBstatsDnsBad\fP"
+.br
+.ti -1c
+.RI "int \fBstatsConnects\fP"
+.br
+.ti -1c
+.RI "int \fBstatsSent\fP"
+.br
+.ti -1c
+.RI "int \fBstatsRecv\fP"
+.br
+.in -1c
+.SH "Detailed Description"
+.PP
+Definition at line 72 of file inspircd.h.
+.SH "Constructor & Destructor Documentation"
+.PP
+.SS "serverstats::serverstats ()\fC [inline]\fP"
+.PP
+Definition at line 86 of file inspircd.h.
+.PP
+References 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 }
+.fi
+.PP
+.SH "Member Data Documentation"
+.PP
+.SS "int \fBserverstats::statsAccept\fP"
+.PP
+Definition at line 75 of file inspircd.h.
+.PP
+Referenced by serverstats().
+.SS "int \fBserverstats::statsCollisions\fP"
+.PP
+Definition at line 78 of file inspircd.h.
+.PP
+Referenced by serverstats().
+.SS "int \fBserverstats::statsConnects\fP"
+.PP
+Definition at line 82 of file inspircd.h.
+.PP
+Referenced by serverstats().
+.SS "int \fBserverstats::statsDns\fP"
+.PP
+Definition at line 79 of file inspircd.h.
+.PP
+Referenced by serverstats().
+.SS "int \fBserverstats::statsDnsBad\fP"
+.PP
+Definition at line 81 of file inspircd.h.
+.PP
+Referenced by serverstats().
+.SS "int \fBserverstats::statsDnsGood\fP"
+.PP
+Definition at line 80 of file inspircd.h.
+.PP
+Referenced by serverstats().
+.SS "int \fBserverstats::statsRecv\fP"
+.PP
+Definition at line 84 of file inspircd.h.
+.PP
+Referenced by serverstats().
+.SS "int \fBserverstats::statsRefused\fP"
+.PP
+Definition at line 76 of file inspircd.h.
+.PP
+Referenced by serverstats().
+.SS "int \fBserverstats::statsSent\fP"
+.PP
+Definition at line 83 of file inspircd.h.
+.PP
+Referenced by serverstats().
+.SS "int \fBserverstats::statsUnknown\fP"
+.PP
+Definition at line 77 of file inspircd.h.
+.PP
+Referenced by serverstats().
+
+.SH "Author"
+.PP
+Generated automatically by Doxygen for InspIRCd from the source code.
diff --git a/docs/man/man3/typedefs.h.3 b/docs/man/man3/typedefs.h.3
index e919dd1f0..d93fbb901 100644
--- a/docs/man/man3/typedefs.h.3
+++ b/docs/man/man3/typedefs.h.3
@@ -56,6 +56,9 @@ typedefs.h \-
.ti -1c
.RI "typedef ExtModeList::iterator \fBExtModeListIter\fP"
.br
+.ti -1c
+.RI "typedef std::deque< \fBstd::string\fP > \fBfile_cache\fP"
+.br
.in -1c
.SH "Typedef Documentation"
.PP
@@ -74,6 +77,9 @@ Definition at line 26 of file typedefs.h.
.SS "typedef ExtModeList::iterator \fBExtModeListIter\fP"
.PP
Definition at line 27 of file typedefs.h.
+.SS "typedef std::deque<\fBstd::string\fP> \fBfile_cache\fP"
+.PP
+Definition at line 28 of file typedefs.h.
.SS "typedef std::vector<\fBstd::string\fP> \fBservernamelist\fP"
.PP
Definition at line 25 of file typedefs.h.
diff --git a/docs/man/man3/ucrec.3 b/docs/man/man3/ucrec.3
index 2b88bcc46..764821843 100644
--- a/docs/man/man3/ucrec.3
+++ b/docs/man/man3/ucrec.3
@@ -40,23 +40,23 @@ Holds a user's modes on a channel This class associates a users privilages with
The uc_modes member holds a bitmask of which privilages the user has on the channel, such as op, voice, etc.
.PP
-Definition at line 241 of file channels.h.
+Definition at line 243 of file channels.h.
.SH "Constructor & Destructor Documentation"
.PP
.SS "ucrec::ucrec ()\fC [inline]\fP"
.PP
-Definition at line 254 of file channels.h.
+Definition at line 256 of file channels.h.
.PP
.nf
-254 { /* stub */ }
+256 { /* stub */ }
.fi
.PP
.SS "virtual ucrec::~ucrec ()\fC [inline, virtual]\fP"
.PP
-Definition at line 255 of file channels.h.
+Definition at line 257 of file channels.h.
.PP
.nf
-255 { /* stub */ }
+257 { /* stub */ }
.fi
.PP
.SH "Member Data Documentation"
@@ -67,14 +67,18 @@ Points to the channel record where the given modes apply.
.PP
If the record is not in use, this value will be NULL.
.PP
-Definition at line 252 of file channels.h.
+Definition at line 254 of file channels.h.
+.PP
+Referenced by ForceChan().
.SS "char \fBucrec::uc_modes\fP"
.PP
Contains a bitmask of the UCMODE_OP .
.PP
.. UCMODE_FOUNDER values. If this value is zero, the user has no privilages upon the channel.
.PP
-Definition at line 247 of file channels.h.
+Definition at line 249 of file channels.h.
+.PP
+Referenced by ForceChan().
.SH "Author"
.PP
diff --git a/docs/man/man3/userrec.3 b/docs/man/man3/userrec.3
index 6d88cb3d5..ce863107f 100644
--- a/docs/man/man3/userrec.3
+++ b/docs/man/man3/userrec.3
@@ -199,7 +199,7 @@ Definition at line 111 of file users.h.
.PP
Definition at line 36 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, 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.
+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 {
@@ -247,7 +247,7 @@ The buffer can grow to any size within limits of the available memory, managed b
.PP
Definition at line 198 of file users.cpp.
.PP
-References recvq, recvqmax, and SetWriteError().
+References recvq, recvqmax, SetWriteError(), and WriteOpers().
.PP
.nf
199 {
@@ -284,7 +284,7 @@ You may add any amount of text up to this users sendq value, if you exceed the s
.PP
Definition at line 254 of file users.cpp.
.PP
-References sendq, sendqmax, and SetWriteError().
+References sendq, sendqmax, SetWriteError(), and WriteOpers().
.PP
.nf
255 {
@@ -419,6 +419,8 @@ Definition at line 72 of file users.cpp.
.PP
References dhost, ident, and nick.
.PP
+Referenced by add_channel().
+.PP
.nf
73 {
74 static char result[MAXBUF];
@@ -561,6 +563,8 @@ Definition at line 96 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++)
@@ -600,7 +604,9 @@ This member function is called on successfully joining an invite only channel to
.PP
Definition at line 122 of file users.cpp.
.PP
-References DEBUG, and invites.
+References DEBUG, invites, and log().
+.PP
+Referenced by add_channel().
.PP
.nf
123 {
@@ -633,7 +639,7 @@ This is done because the actual disconnect of a client may occur at an inopportu
.PP
Definition at line 292 of file users.cpp.
.PP
-References DEBUG, and WriteError.
+References DEBUG, log(), and WriteError.
.PP
Referenced by AddBuffer(), AddWriteBuf(), and FlushWriteBuf().
.PP
@@ -661,7 +667,7 @@ Referenced by userrec().
.PP
Definition at line 149 of file users.h.
.PP
-Referenced by Server::PseudoToUser(), and userrec().
+Referenced by add_channel(), del_channel(), kick_channel(), Server::PseudoToUser(), and userrec().
.SS "char \fBuserrec::dhost\fP[160]"
.PP
The host displayed to non-opers (used for cloaking etc).
@@ -723,7 +729,7 @@ This may contain any of the following RFC characters: o, w, s, i Your module may
.PP
Definition at line 147 of file users.h.
.PP
-Referenced by userrec().
+Referenced by add_channel(), and userrec().
.SS "char \fBuserrec::nick\fP[NICKMAX]"
.PP
The users nickname.
@@ -732,7 +738,7 @@ An invalid nickname indicates an unregistered connection prior to the NICK comma
.PP
Definition at line 124 of file users.h.
.PP
-Referenced by ConfigReader::DumpErrors(), GetFullHost(), GetFullRealHost(), Server::PseudoToUser(), and userrec().
+Referenced by add_channel(), del_channel(), ConfigReader::DumpErrors(), GetFullHost(), GetFullRealHost(), kick_channel(), Server::PseudoToUser(), and userrec().
.SS "char \fBuserrec::oper\fP[NICKMAX]"
.PP
The oper type they logged in as, if they are an oper.
@@ -797,7 +803,7 @@ The server the user is connected to.
.PP
Definition at line 153 of file users.h.
.PP
-Referenced by userrec().
+Referenced by kick_channel(), and userrec().
.SS "long \fBuserrec::threshold\fP"
.PP
Definition at line 208 of file users.h.
diff --git a/docs/man/man3/users.h.3 b/docs/man/man3/users.h.3
index 03ced5bd9..8f98caab3 100644
--- a/docs/man/man3/users.h.3
+++ b/docs/man/man3/users.h.3
@@ -82,6 +82,8 @@ Definition at line 35 of file users.h.
.SS "#define STATUS_HOP 2"
.PP
Definition at line 30 of file users.h.
+.PP
+Referenced by kick_channel().
.SS "#define STATUS_NORMAL 0"
.PP
Definition at line 32 of file users.h.