From 755d67224f033aaa9b4ef3d2dd00f46bb8c19dc2 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 7 Apr 2005 20:15:05 +0000 Subject: New docs to match extra module Version class stuff, etc git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1008 e03df62e-2008-0410-955e-edbf42e46eb7 --- docs/man/man3/Admin.3 | 14 +- docs/man/man3/BanItem.3 | 2 +- docs/man/man3/ConfigReader.3 | 274 ++++++++--------- docs/man/man3/ConnectClass.3 | 2 +- docs/man/man3/DNS.3 | 2 +- docs/man/man3/ELine.3 | 2 +- docs/man/man3/ExemptItem.3 | 2 +- docs/man/man3/ExtMode.3 | 18 +- docs/man/man3/Extensible.3 | 2 +- docs/man/man3/FileReader.3 | 84 +++--- docs/man/man3/GLine.3 | 2 +- docs/man/man3/HostItem.3 | 2 +- docs/man/man3/InAddr_HashComp.3 | 22 +- docs/man/man3/InviteItem.3 | 2 +- docs/man/man3/Invited.3 | 2 +- docs/man/man3/KLine.3 | 2 +- docs/man/man3/ModeParameter.3 | 2 +- docs/man/man3/Module.3 | 114 +++---- docs/man/man3/ModuleFactory.3 | 12 +- docs/man/man3/QLine.3 | 2 +- docs/man/man3/Server.3 | 412 +++++++++++++------------- docs/man/man3/StrHashComp.3 | 16 +- docs/man/man3/Version.3 | 26 +- docs/man/man3/XLine.3 | 2 +- docs/man/man3/ZLine.3 | 2 +- docs/man/man3/base.h.3 | 2 +- docs/man/man3/channels.cpp.3 | 14 +- docs/man/man3/channels.h.3 | 2 +- docs/man/man3/chanrec.3 | 166 +++++------ docs/man/man3/classbase.3 | 2 +- docs/man/man3/command_t.3 | 9 +- docs/man/man3/commands.h.3 | 12 +- docs/man/man3/connection.3 | 2 +- docs/man/man3/connection.h.3 | 2 +- docs/man/man3/ctables.h.3 | 2 +- docs/man/man3/dns.h.3 | 2 +- docs/man/man3/dns_ip4list.3 | 2 +- docs/man/man3/ircd_connector.3 | 2 +- docs/man/man3/message.h.3 | 2 +- docs/man/man3/mode.h.3 | 2 +- docs/man/man3/modules.cpp.3 | 260 ++++++++-------- docs/man/man3/modules.h.3 | 52 +++- docs/man/man3/nspace.3 | 2 +- docs/man/man3/nspace_nspace_hash_ in_addr _.3 | 14 +- docs/man/man3/nspace_nspace_hash_ string _.3 | 18 +- docs/man/man3/packet.3 | 2 +- docs/man/man3/serverrec.3 | 64 ++-- docs/man/man3/servers.cpp.3 | 14 +- docs/man/man3/servers.h.3 | 2 +- docs/man/man3/std.3 | 2 +- docs/man/man3/ucrec.3 | 2 +- docs/man/man3/userrec.3 | 258 ++++++++-------- docs/man/man3/users.cpp.3 | 8 +- docs/man/man3/users.h.3 | 2 +- docs/man/man3/xline.h.3 | 2 +- 55 files changed, 1015 insertions(+), 932 deletions(-) (limited to 'docs/man/man3') diff --git a/docs/man/man3/Admin.3 b/docs/man/man3/Admin.3 index 38345d7c9..c98cc1bb4 100644 --- a/docs/man/man3/Admin.3 +++ b/docs/man/man3/Admin.3 @@ -1,4 +1,4 @@ -.TH "Admin" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "Admin" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -38,27 +38,27 @@ Holds /ADMIN data This class contains the admin details of the local server. It is constructed by class \fBServer\fP, and has three read-only values, Name, Email and Nick that contain the specified values for the server where the module is running. .PP -Definition at line 114 of file modules.h. +Definition at line 121 of file modules.h. .SH "Constructor & Destructor Documentation" .PP .SS "Admin::Admin (std::string name, std::string email, std::string nick)" .PP -Definition at line 302 of file modules.cpp. +Definition at line 304 of file modules.cpp. .PP .nf -302 : Name(name), Email(email), Nick(nick) { }; +304 : Name(name), Email(email), Nick(nick) { }; .fi .SH "Member Data Documentation" .PP .SS "const std::string \fBAdmin::Email\fP" .PP -Definition at line 117 of file modules.h. +Definition at line 124 of file modules.h. .SS "const std::string \fBAdmin::Name\fP" .PP -Definition at line 117 of file modules.h. +Definition at line 124 of file modules.h. .SS "const std::string \fBAdmin::Nick\fP" .PP -Definition at line 117 of file modules.h. +Definition at line 124 of file modules.h. .SH "Author" .PP diff --git a/docs/man/man3/BanItem.3 b/docs/man/man3/BanItem.3 index 5ab1500b3..570c67b82 100644 --- a/docs/man/man3/BanItem.3 +++ b/docs/man/man3/BanItem.3 @@ -1,4 +1,4 @@ -.TH "BanItem" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "BanItem" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ConfigReader.3 b/docs/man/man3/ConfigReader.3 index f3e02bdb4..78aa3d341 100644 --- a/docs/man/man3/ConfigReader.3 +++ b/docs/man/man3/ConfigReader.3 @@ -1,4 +1,4 @@ -.TH "ConfigReader" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "ConfigReader" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -84,239 +84,239 @@ Allows reading of values from configuration files This class allows a module to It may either be instantiated with one parameter or none. Constructing the class using one parameter allows you to specify a path to your own configuration file, otherwise, inspircd.conf is read. .PP -Definition at line 675 of file modules.h. +Definition at line 685 of file modules.h. .SH "Constructor & Destructor Documentation" .PP .SS "ConfigReader::ConfigReader ()" .PP -Default constructor. This constructor initialises the ConfigReader class to read the inspircd.conf file as specified when running ./configure.Definition at line 577 of file modules.cpp. +Default constructor. This constructor initialises the ConfigReader class to read the inspircd.conf file as specified when running ./configure.Definition at line 579 of file modules.cpp. .PP References cache, CONF_FILE_NOT_FOUND, error, errorlog, and readerror. .PP .nf -578 { -579 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); -580 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out); -581 this->readerror = LoadConf(CONFIG_FILE,this->cache,this->errorlog); -582 if (!this->readerror) -583 this->error = CONF_FILE_NOT_FOUND; -584 } +580 { +581 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); +582 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out); +583 this->readerror = LoadConf(CONFIG_FILE,this->cache,this->errorlog); +584 if (!this->readerror) +585 this->error = CONF_FILE_NOT_FOUND; +586 } .fi .SS "ConfigReader::ConfigReader (std::string filename)" .PP -Overloaded constructor. This constructor initialises the ConfigReader class to read a user-specified config fileDefinition at line 596 of file modules.cpp. +Overloaded constructor. This constructor initialises the ConfigReader class to read a user-specified config fileDefinition at line 598 of file modules.cpp. .PP References cache, CONF_FILE_NOT_FOUND, error, errorlog, and readerror. .PP .nf -597 { -598 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); -599 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out); -600 this->readerror = LoadConf(filename.c_str(),this->cache,this->errorlog); -601 if (!this->readerror) -602 this->error = CONF_FILE_NOT_FOUND; -603 }; +599 { +600 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); +601 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out); +602 this->readerror = LoadConf(filename.c_str(),this->cache,this->errorlog); +603 if (!this->readerror) +604 this->error = CONF_FILE_NOT_FOUND; +605 }; .fi .SS "ConfigReader::~\fBConfigReader\fP ()" .PP -Default destructor. This method destroys the ConfigReader class.Definition at line 587 of file modules.cpp. +Default destructor. This method destroys the ConfigReader class.Definition at line 589 of file modules.cpp. .PP References cache, and errorlog. .PP .nf -588 { -589 if (this->cache) -590 delete this->cache; -591 if (this->errorlog) -592 delete this->errorlog; -593 } +590 { +591 if (this->cache) +592 delete this->cache; +593 if (this->errorlog) +594 delete this->errorlog; +595 } .fi .SH "Member Function Documentation" .PP .SS "void ConfigReader::DumpErrors (bool bail, \fBuserrec\fP * user)" .PP -Dumps the list of errors in a config file to an output location. If bail is true, then the program will abort. If bail is false and user points to a valid user record, the error report will be spooled to the given user by means of NOTICE. if bool is false AND user is false, the error report will be spooled to all opers by means of a NOTICE to all opers.Definition at line 674 of file modules.cpp. +Dumps the list of errors in a config file to an output location. If bail is true, then the program will abort. If bail is false and user points to a valid user record, the error report will be spooled to the given user by means of NOTICE. if bool is false AND user is false, the error report will be spooled to all opers by means of a NOTICE to all opers.Definition at line 676 of file modules.cpp. .PP References errorlog, connection::fd, and userrec::nick. .PP .nf -675 { -676 if (bail) -677 { -678 printf('There were errors in your configuration:\n%s',errorlog->str().c_str()); -679 exit(0); -680 } -681 else -682 { -683 char dataline[1024]; -684 if (user) -685 { -686 WriteServ(user->fd,'NOTICE %s :There were errors in the configuration file:',user->nick); -687 while (!errorlog->eof()) -688 { -689 errorlog->getline(dataline,1024); -690 WriteServ(user->fd,'NOTICE %s :%s',user->nick,dataline); -691 } -692 } -693 else -694 { -695 WriteOpers('There were errors in the configuration file:',user->nick); -696 while (!errorlog->eof()) -697 { -698 errorlog->getline(dataline,1024); -699 WriteOpers(dataline); -700 } -701 } -702 return; -703 } -704 } +677 { +678 if (bail) +679 { +680 printf('There were errors in your configuration:\n%s',errorlog->str().c_str()); +681 exit(0); +682 } +683 else +684 { +685 char dataline[1024]; +686 if (user) +687 { +688 WriteServ(user->fd,'NOTICE %s :There were errors in the configuration file:',user->nick); +689 while (!errorlog->eof()) +690 { +691 errorlog->getline(dataline,1024); +692 WriteServ(user->fd,'NOTICE %s :%s',user->nick,dataline); +693 } +694 } +695 else +696 { +697 WriteOpers('There were errors in the configuration file:',user->nick); +698 while (!errorlog->eof()) +699 { +700 errorlog->getline(dataline,1024); +701 WriteOpers(dataline); +702 } +703 } +704 return; +705 } +706 } .fi .SS "int ConfigReader::Enumerate (std::string tag)" .PP -Counts the number of times a given tag appears in the config file. This method counts the number of times a tag appears in a config file, for use where there are several tags of the same kind, e.g. with opers and connect types. It can be used with the index value of \fBConfigReader::ReadValue\fP to loop through all copies of a multiple instance tag.Definition at line 707 of file modules.cpp. +Counts the number of times a given tag appears in the config file. This method counts the number of times a tag appears in a config file, for use where there are several tags of the same kind, e.g. with opers and connect types. It can be used with the index value of \fBConfigReader::ReadValue\fP to loop through all copies of a multiple instance tag.Definition at line 709 of file modules.cpp. .PP References cache. .PP .nf -708 { -709 return EnumConf(cache,tag.c_str()); -710 } +710 { +711 return EnumConf(cache,tag.c_str()); +712 } .fi .SS "int ConfigReader::EnumerateValues (std::string tag, int index)" .PP -Returns the number of items within a tag. For example if the tag was then this function would return 2. Spaces and newlines both qualify as valid seperators between values.Definition at line 712 of file modules.cpp. +Returns the number of items within a tag. For example if the tag was then this function would return 2. Spaces and newlines both qualify as valid seperators between values.Definition at line 714 of file modules.cpp. .PP References cache. .PP .nf -713 { -714 return EnumValues(cache, tag.c_str(), index); -715 } +715 { +716 return EnumValues(cache, tag.c_str(), index); +717 } .fi .SS "long ConfigReader::GetError ()" .PP -Returns the last error to occur. Valid errors can be found by looking in \fBmodules.h\fP. Any nonzero value indicates an error condition. A call to \fBGetError()\fP resets the error flag back to 0.Definition at line 667 of file modules.cpp. +Returns the last error to occur. Valid errors can be found by looking in \fBmodules.h\fP. Any nonzero value indicates an error condition. A call to \fBGetError()\fP resets the error flag back to 0.Definition at line 669 of file modules.cpp. .PP References error. .PP .nf -668 { -669 long olderr = this->error; -670 this->error = 0; -671 return olderr; -672 } +670 { +671 long olderr = this->error; +672 this->error = 0; +673 return olderr; +674 } .fi .SS "bool ConfigReader::ReadFlag (std::string tag, std::string name, int index)" .PP -Retrieves a boolean value from the config file. This method retrieves a boolean value from the config file. Where multiple copies of the tag exist in the config file, index indicates which of the values to retrieve. The values '1', 'yes' and 'true' in the config file count as true to ReadFlag, and any other value counts as false.Definition at line 621 of file modules.cpp. +Retrieves a boolean value from the config file. This method retrieves a boolean value from the config file. Where multiple copies of the tag exist in the config file, index indicates which of the values to retrieve. The values '1', 'yes' and 'true' in the config file count as true to ReadFlag, and any other value counts as false.Definition at line 623 of file modules.cpp. .PP References cache, CONF_VALUE_NOT_FOUND, and error. .PP .nf -622 { -623 char val[MAXBUF]; -624 char t[MAXBUF]; -625 char n[MAXBUF]; -626 strlcpy(t,tag.c_str(),MAXBUF); -627 strlcpy(n,name.c_str(),MAXBUF); -628 int res = ReadConf(cache,t,n,index,val); -629 if (!res) -630 { -631 this->error = CONF_VALUE_NOT_FOUND; -632 return false; -633 } -634 std::string s = val; -635 return ((s == 'yes') || (s == 'YES') || (s == 'true') || (s == 'TRUE') || (s == '1')); -636 } +624 { +625 char val[MAXBUF]; +626 char t[MAXBUF]; +627 char n[MAXBUF]; +628 strlcpy(t,tag.c_str(),MAXBUF); +629 strlcpy(n,name.c_str(),MAXBUF); +630 int res = ReadConf(cache,t,n,index,val); +631 if (!res) +632 { +633 this->error = CONF_VALUE_NOT_FOUND; +634 return false; +635 } +636 std::string s = val; +637 return ((s == 'yes') || (s == 'YES') || (s == 'true') || (s == 'TRUE') || (s == '1')); +638 } .fi .SS "long ConfigReader::ReadInteger (std::string tag, std::string name, int index, bool needs_unsigned)" .PP -Retrieves an integer value from the config file. This method retrieves an integer value from the config file. Where multiple copies of the tag exist in the config file, index indicates which of the values to retrieve. Any invalid integer values in the tag will cause the objects error value to be set, and any call to \fBGetError()\fP will return CONF_INVALID_NUMBER to be returned. needs_unsigned is set if the number must be unsigned. If a signed number is placed into a tag which is specified unsigned, 0 will be returned and \fBGetError()\fP will return CONF_NOT_UNSIGNEDDefinition at line 638 of file modules.cpp. +Retrieves an integer value from the config file. This method retrieves an integer value from the config file. Where multiple copies of the tag exist in the config file, index indicates which of the values to retrieve. Any invalid integer values in the tag will cause the objects error value to be set, and any call to \fBGetError()\fP will return CONF_INVALID_NUMBER to be returned. needs_unsigned is set if the number must be unsigned. If a signed number is placed into a tag which is specified unsigned, 0 will be returned and \fBGetError()\fP will return CONF_NOT_UNSIGNEDDefinition at line 640 of file modules.cpp. .PP References cache, CONF_NOT_A_NUMBER, CONF_NOT_UNSIGNED, CONF_VALUE_NOT_FOUND, and error. .PP .nf -639 { -640 char val[MAXBUF]; -641 char t[MAXBUF]; -642 char n[MAXBUF]; -643 strlcpy(t,tag.c_str(),MAXBUF); -644 strlcpy(n,name.c_str(),MAXBUF); -645 int res = ReadConf(cache,t,n,index,val); -646 if (!res) -647 { -648 this->error = CONF_VALUE_NOT_FOUND; -649 return 0; -650 } -651 for (int i = 0; i < strlen(val); i++) -652 { -653 if (!isdigit(val[i])) -654 { -655 this->error = CONF_NOT_A_NUMBER; -656 return 0; -657 } -658 } -659 if ((needs_unsigned) && (atoi(val)<0)) -660 { -661 this->error = CONF_NOT_UNSIGNED; -662 return 0; -663 } -664 return atoi(val); -665 } +641 { +642 char val[MAXBUF]; +643 char t[MAXBUF]; +644 char n[MAXBUF]; +645 strlcpy(t,tag.c_str(),MAXBUF); +646 strlcpy(n,name.c_str(),MAXBUF); +647 int res = ReadConf(cache,t,n,index,val); +648 if (!res) +649 { +650 this->error = CONF_VALUE_NOT_FOUND; +651 return 0; +652 } +653 for (int i = 0; i < strlen(val); i++) +654 { +655 if (!isdigit(val[i])) +656 { +657 this->error = CONF_NOT_A_NUMBER; +658 return 0; +659 } +660 } +661 if ((needs_unsigned) && (atoi(val)<0)) +662 { +663 this->error = CONF_NOT_UNSIGNED; +664 return 0; +665 } +666 return atoi(val); +667 } .fi .SS "std::string ConfigReader::ReadValue (std::string tag, std::string name, int index)" .PP -Retrieves a value from the config file. This method retrieves a value from the config file. Where multiple copies of the tag exist in the config file, index indicates which of the values to retrieve.Definition at line 605 of file modules.cpp. +Retrieves a value from the config file. This method retrieves a value from the config file. Where multiple copies of the tag exist in the config file, index indicates which of the values to retrieve.Definition at line 607 of file modules.cpp. .PP References cache, CONF_VALUE_NOT_FOUND, and error. .PP .nf -606 { -607 char val[MAXBUF]; -608 char t[MAXBUF]; -609 char n[MAXBUF]; -610 strlcpy(t,tag.c_str(),MAXBUF); -611 strlcpy(n,name.c_str(),MAXBUF); -612 int res = ReadConf(cache,t,n,index,val); -613 if (!res) -614 { -615 this->error = CONF_VALUE_NOT_FOUND; -616 return ''; -617 } -618 return std::string(val); -619 } +608 { +609 char val[MAXBUF]; +610 char t[MAXBUF]; +611 char n[MAXBUF]; +612 strlcpy(t,tag.c_str(),MAXBUF); +613 strlcpy(n,name.c_str(),MAXBUF); +614 int res = ReadConf(cache,t,n,index,val); +615 if (!res) +616 { +617 this->error = CONF_VALUE_NOT_FOUND; +618 return ''; +619 } +620 return std::string(val); +621 } .fi .SS "bool ConfigReader::Verify ()" .PP -Returns true if a config file is valid. This method is partially implemented and will only return false if the config file does not exist or could not be opened.Definition at line 717 of file modules.cpp. +Returns true if a config file is valid. This method is partially implemented and will only return false if the config file does not exist or could not be opened.Definition at line 719 of file modules.cpp. .PP References readerror. .PP .nf -718 { -719 return this->readerror; -720 } +720 { +721 return this->readerror; +722 } .fi .SH "Member Data Documentation" .PP .SS "std::stringstream* \fBConfigReader::cache\fP\fC [protected]\fP" .PP -The contents of the configuration file This protected member should never be accessed by a module (and cannot be accessed unless the core is changed). It will contain a pointer to the configuration file data with unneeded data (such as comments) stripped from it.Definition at line 683 of file modules.h. +The contents of the configuration file This protected member should never be accessed by a module (and cannot be accessed unless the core is changed). It will contain a pointer to the configuration file data with unneeded data (such as comments) stripped from it.Definition at line 693 of file modules.h. .PP Referenced by ConfigReader(), Enumerate(), EnumerateValues(), ReadFlag(), ReadInteger(), ReadValue(), and ~ConfigReader(). .SS "long \fBConfigReader::error\fP\fC [protected]\fP" .PP -Definition at line 688 of file modules.h. +Definition at line 698 of file modules.h. .PP Referenced by ConfigReader(), GetError(), ReadFlag(), ReadInteger(), and ReadValue(). .SS "std::stringstream* \fBConfigReader::errorlog\fP\fC [protected]\fP" .PP -Definition at line 684 of file modules.h. +Definition at line 694 of file modules.h. .PP Referenced by ConfigReader(), DumpErrors(), and ~ConfigReader(). .SS "bool \fBConfigReader::readerror\fP\fC [protected]\fP" .PP -Used to store errors. Definition at line 687 of file modules.h. +Used to store errors. Definition at line 697 of file modules.h. .PP Referenced by ConfigReader(), and Verify(). diff --git a/docs/man/man3/ConnectClass.3 b/docs/man/man3/ConnectClass.3 index 549784a28..4d8891d60 100644 --- a/docs/man/man3/ConnectClass.3 +++ b/docs/man/man3/ConnectClass.3 @@ -1,4 +1,4 @@ -.TH "ConnectClass" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "ConnectClass" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/DNS.3 b/docs/man/man3/DNS.3 index 68f450166..e497d01a0 100644 --- a/docs/man/man3/DNS.3 +++ b/docs/man/man3/DNS.3 @@ -1,4 +1,4 @@ -.TH "DNS" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "DNS" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ELine.3 b/docs/man/man3/ELine.3 index bc8a86094..9ecca8954 100644 --- a/docs/man/man3/ELine.3 +++ b/docs/man/man3/ELine.3 @@ -1,4 +1,4 @@ -.TH "ELine" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "ELine" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ExemptItem.3 b/docs/man/man3/ExemptItem.3 index 170f480cb..fbff2f13c 100644 --- a/docs/man/man3/ExemptItem.3 +++ b/docs/man/man3/ExemptItem.3 @@ -1,4 +1,4 @@ -.TH "ExemptItem" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "ExemptItem" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ExtMode.3 b/docs/man/man3/ExtMode.3 index 9abd492ad..b32870c12 100644 --- a/docs/man/man3/ExtMode.3 +++ b/docs/man/man3/ExtMode.3 @@ -1,4 +1,4 @@ -.TH "ExtMode" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "ExtMode" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -41,41 +41,41 @@ Inherits \fBclassbase\fP. .PP .SS "ExtMode::ExtMode (char mc, int ty, bool oper, int p_on, int p_off)\fC [inline]\fP" .PP -Definition at line 197 of file modules.cpp. +Definition at line 199 of file modules.cpp. .PP References modechar, needsoper, params_when_off, params_when_on, and type. .PP .nf -197 : modechar(mc), type(ty), needsoper(oper), params_when_on(p_on), params_when_off(p_off) { }; +199 : modechar(mc), type(ty), needsoper(oper), params_when_on(p_on), params_when_off(p_off) { }; .fi .SH "Member Data Documentation" .PP .SS "bool \fBExtMode::list\fP" .PP -Definition at line 196 of file modules.cpp. +Definition at line 198 of file modules.cpp. .SS "char \fBExtMode::modechar\fP" .PP -Definition at line 191 of file modules.cpp. +Definition at line 193 of file modules.cpp. .PP Referenced by ExtMode(). .SS "bool \fBExtMode::needsoper\fP" .PP -Definition at line 195 of file modules.cpp. +Definition at line 197 of file modules.cpp. .PP Referenced by ExtMode(). .SS "int \fBExtMode::params_when_off\fP" .PP -Definition at line 194 of file modules.cpp. +Definition at line 196 of file modules.cpp. .PP Referenced by ExtMode(). .SS "int \fBExtMode::params_when_on\fP" .PP -Definition at line 193 of file modules.cpp. +Definition at line 195 of file modules.cpp. .PP Referenced by ExtMode(). .SS "int \fBExtMode::type\fP" .PP -Definition at line 192 of file modules.cpp. +Definition at line 194 of file modules.cpp. .PP Referenced by ExtMode(). diff --git a/docs/man/man3/Extensible.3 b/docs/man/man3/Extensible.3 index 90bb78178..3fc7b5373 100644 --- a/docs/man/man3/Extensible.3 +++ b/docs/man/man3/Extensible.3 @@ -1,4 +1,4 @@ -.TH "Extensible" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "Extensible" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/FileReader.3 b/docs/man/man3/FileReader.3 index 377933336..677e59b5d 100644 --- a/docs/man/man3/FileReader.3 +++ b/docs/man/man3/FileReader.3 @@ -1,4 +1,4 @@ -.TH "FileReader" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "FileReader" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -57,100 +57,100 @@ Caches a text file into memory and can be used to retrieve lines from it. This class contains methods for read-only manipulation of a text file in memory. Either use the constructor type with one parameter to load a file into memory at construction, or use the LoadFile method to load a file. .PP -Definition at line 764 of file modules.h. +Definition at line 774 of file modules.h. .SH "Constructor & Destructor Documentation" .PP .SS "FileReader::FileReader ()" .PP -Default constructor. This method does not load any file into memory, you must use the LoadFile method after constructing the class this way.Definition at line 730 of file modules.cpp. +Default constructor. This method does not load any file into memory, you must use the LoadFile method after constructing the class this way.Definition at line 732 of file modules.cpp. .PP .nf -731 { -732 } +733 { +734 } .fi .SS "FileReader::FileReader (std::string filename)" .PP -Secondary constructor. This method initialises the class with a file loaded into it ready for GetLine and and other methods to be called. If the file could not be loaded, \fBFileReader::FileSize\fP returns 0.Definition at line 723 of file modules.cpp. +Secondary constructor. This method initialises the class with a file loaded into it ready for GetLine and and other methods to be called. If the file could not be loaded, \fBFileReader::FileSize\fP returns 0.Definition at line 725 of file modules.cpp. .PP References fc, and file_cache. .PP .nf -724 { -725 file_cache c; -726 readfile(c,filename.c_str()); -727 this->fc = c; -728 } +726 { +727 file_cache c; +728 readfile(c,filename.c_str()); +729 this->fc = c; +730 } .fi .SS "FileReader::~\fBFileReader\fP ()" .PP -Default destructor. This deletes the memory allocated to the file.Definition at line 742 of file modules.cpp. +Default destructor. This deletes the memory allocated to the file.Definition at line 744 of file modules.cpp. .PP .nf -743 { -744 } +745 { +746 } .fi .SH "Member Function Documentation" .PP .SS "bool FileReader::Exists ()" .PP -Returns true if the file exists This function will return false if the file could not be opened. Definition at line 746 of file modules.cpp. +Returns true if the file exists This function will return false if the file could not be opened. Definition at line 748 of file modules.cpp. .PP References fc. .PP .nf -747 { -748 if (fc.size() == 0) -749 { -750 return(false); -751 } -752 else -753 { -754 return(true); -755 } -756 } +749 { +750 if (fc.size() == 0) +751 { +752 return(false); +753 } +754 else +755 { +756 return(true); +757 } +758 } .fi .SS "int FileReader::FileSize ()" .PP -Returns the size of the file in lines. This method returns the number of lines in the read file. If it is 0, no lines have been read into memory, either because the file is empty or it does not exist, or cannot be opened due to permission problems.Definition at line 765 of file modules.cpp. +Returns the size of the file in lines. This method returns the number of lines in the read file. If it is 0, no lines have been read into memory, either because the file is empty or it does not exist, or cannot be opened due to permission problems.Definition at line 767 of file modules.cpp. .PP References fc. .PP .nf -766 { -767 return fc.size(); -768 } +768 { +769 return fc.size(); +770 } .fi .SS "std::string FileReader::GetLine (int x)" .PP -Retrieve one line from the file. This method retrieves one line from the text file. If an empty non-NULL string is returned, the index was out of bounds, or the line had no data on it.Definition at line 758 of file modules.cpp. +Retrieve one line from the file. This method retrieves one line from the text file. If an empty non-NULL string is returned, the index was out of bounds, or the line had no data on it.Definition at line 760 of file modules.cpp. .PP References fc. .PP .nf -759 { -760 if ((x<0) || (x>fc.size())) -761 return ''; -762 return fc[x]; -763 } +761 { +762 if ((x<0) || (x>fc.size())) +763 return ''; +764 return fc[x]; +765 } .fi .SS "void FileReader::LoadFile (std::string filename)" .PP -Used to load a file. This method loads a file into the class ready for GetLine and and other methods to be called. If the file could not be loaded, \fBFileReader::FileSize\fP returns 0.Definition at line 734 of file modules.cpp. +Used to load a file. This method loads a file into the class ready for GetLine and and other methods to be called. If the file could not be loaded, \fBFileReader::FileSize\fP returns 0.Definition at line 736 of file modules.cpp. .PP References fc, and file_cache. .PP .nf -735 { -736 file_cache c; -737 readfile(c,filename.c_str()); -738 this->fc = c; -739 } +737 { +738 file_cache c; +739 readfile(c,filename.c_str()); +740 this->fc = c; +741 } .fi .SH "Member Data Documentation" .PP .SS "\fBfile_cache\fP \fBFileReader::fc\fP\fC [private]\fP" .PP -Definition at line 766 of file modules.h. +Definition at line 776 of file modules.h. .PP Referenced by Exists(), FileReader(), FileSize(), GetLine(), and LoadFile(). diff --git a/docs/man/man3/GLine.3 b/docs/man/man3/GLine.3 index d55391531..3e02d2bc4 100644 --- a/docs/man/man3/GLine.3 +++ b/docs/man/man3/GLine.3 @@ -1,4 +1,4 @@ -.TH "GLine" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "GLine" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/HostItem.3 b/docs/man/man3/HostItem.3 index d767c5879..1c833f94d 100644 --- a/docs/man/man3/HostItem.3 +++ b/docs/man/man3/HostItem.3 @@ -1,4 +1,4 @@ -.TH "HostItem" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "HostItem" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/InAddr_HashComp.3 b/docs/man/man3/InAddr_HashComp.3 index eb1584eaf..47bc468f3 100644 --- a/docs/man/man3/InAddr_HashComp.3 +++ b/docs/man/man3/InAddr_HashComp.3 @@ -1,4 +1,4 @@ -.TH "InAddr_HashComp" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "InAddr_HashComp" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -17,18 +17,18 @@ InAddr_HashComp \- .PP .SS "bool InAddr_HashComp::operator() (const in_addr & s1, const in_addr & s2) const\fC [inline]\fP" .PP -Definition at line 157 of file modules.cpp. +Definition at line 159 of file modules.cpp. .PP .nf -158 { -159 size_t q; -160 size_t p; -161 -162 memcpy(&q,&s1,sizeof(size_t)); -163 memcpy(&p,&s2,sizeof(size_t)); -164 -165 return (q == p); -166 } +160 { +161 size_t q; +162 size_t p; +163 +164 memcpy(&q,&s1,sizeof(size_t)); +165 memcpy(&p,&s2,sizeof(size_t)); +166 +167 return (q == p); +168 } .fi diff --git a/docs/man/man3/InviteItem.3 b/docs/man/man3/InviteItem.3 index 89d36a36a..a03076a3b 100644 --- a/docs/man/man3/InviteItem.3 +++ b/docs/man/man3/InviteItem.3 @@ -1,4 +1,4 @@ -.TH "InviteItem" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "InviteItem" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/Invited.3 b/docs/man/man3/Invited.3 index ab1a87bb8..2a47106a2 100644 --- a/docs/man/man3/Invited.3 +++ b/docs/man/man3/Invited.3 @@ -1,4 +1,4 @@ -.TH "Invited" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "Invited" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/KLine.3 b/docs/man/man3/KLine.3 index 991453d01..1d7529288 100644 --- a/docs/man/man3/KLine.3 +++ b/docs/man/man3/KLine.3 @@ -1,4 +1,4 @@ -.TH "KLine" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "KLine" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ModeParameter.3 b/docs/man/man3/ModeParameter.3 index b374643d8..6c8553ede 100644 --- a/docs/man/man3/ModeParameter.3 +++ b/docs/man/man3/ModeParameter.3 @@ -1,4 +1,4 @@ -.TH "ModeParameter" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "ModeParameter" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/Module.3 b/docs/man/man3/Module.3 index 1196ebcaa..04c1c9654 100644 --- a/docs/man/man3/Module.3 +++ b/docs/man/man3/Module.3 @@ -1,4 +1,4 @@ -.TH "Module" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "Module" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -130,38 +130,40 @@ Base class for all InspIRCd modules This class is the base class for InspIRCd mo All modules must inherit from this class, its methods will be called when irc server events occur. class inherited from module must be instantiated by the \fBModuleFactory\fP class (see relevent section) for the plugin to be initialised. .PP -Definition at line 126 of file modules.h. +Definition at line 133 of file modules.h. .SH "Constructor & Destructor Documentation" .PP .SS "Module::Module ()" .PP -Default constructor creates a module class. Definition at line 304 of file modules.cpp. +Default constructor creates a module class. Definition at line 306 of file modules.cpp. .PP .nf -304 { } +306 { } .fi .SS "Module::~\fBModule\fP ()\fC [virtual]\fP" .PP -Default destructor destroys a module class. Definition at line 305 of file modules.cpp. +Default destructor destroys a module class. Definition at line 307 of file modules.cpp. .PP .nf -305 { } +307 { } .fi .SH "Member Function Documentation" .PP .SS "\fBVersion\fP Module::GetVersion ()\fC [virtual]\fP" .PP -Returns the version number of a Module. The method should return a \fBVersion\fP object with its version information assigned via \fBVersion::Version\fPDefinition at line 316 of file modules.cpp. +Returns the version number of a Module. The method should return a \fBVersion\fP object with its version information assigned via \fBVersion::Version\fPDefinition at line 318 of file modules.cpp. +.PP +References VF_VENDOR. .PP .nf -316 { return Version(1,0,0,0); } +318 { return Version(1,0,0,0,VF_VENDOR); } .fi .SS "void Module::On005Numeric (std::string & output)\fC [virtual]\fP" .PP -Called when a 005 numeric is about to be output. The module should modify the 005 numeric if needed to indicate its features.Definition at line 328 of file modules.cpp. +Called when a 005 numeric is about to be output. The module should modify the 005 numeric if needed to indicate its features.Definition at line 330 of file modules.cpp. .PP .nf -328 { }; +330 { }; .fi .SS "int Module::OnAccessCheck (\fBuserrec\fP * source, \fBuserrec\fP * dest, \fBchanrec\fP * channel, int access_type)\fC [virtual]\fP" .PP @@ -189,121 +191,121 @@ Called before an action which requires a channel privilage check. This function .br .br - Upon returning from your function you must return either ACR_DEFAULT, to indicate the module wishes to do nothing, or ACR_DENY where approprate to deny the action, and ACR_ALLOW where appropriate to allow the action. Please note that in the case of some access checks (such as AC_GENERAL_MODE) access may be denied 'upstream' causing other checks such as AC_DEOP to not be reached. Be very careful with use of the AC_GENERAL_MODE type, as it may inadvertently override the behaviour of other modules. When the access_type is AC_GENERAL_MODE, the destination of the mode will be NULL (as it has not yet been determined).Definition at line 325 of file modules.cpp. + Upon returning from your function you must return either ACR_DEFAULT, to indicate the module wishes to do nothing, or ACR_DENY where approprate to deny the action, and ACR_ALLOW where appropriate to allow the action. Please note that in the case of some access checks (such as AC_GENERAL_MODE) access may be denied 'upstream' causing other checks such as AC_DEOP to not be reached. Be very careful with use of the AC_GENERAL_MODE type, as it may inadvertently override the behaviour of other modules. When the access_type is AC_GENERAL_MODE, the destination of the mode will be NULL (as it has not yet been determined).Definition at line 327 of file modules.cpp. .PP References ACR_DEFAULT. .PP .nf -325 { return ACR_DEFAULT; }; +327 { return ACR_DEFAULT; }; .fi .SS "\fBstring_list\fP Module::OnChannelSync (\fBchanrec\fP * chan)\fC [virtual]\fP" .PP -Called during a netburst to sync channel data. This is called during the netburst on a per-channel basis. You should use this call to up any special channel-related things which are implemented by your module, e.g. sending listmodes. You may return multiple commands in the string_list.Definition at line 327 of file modules.cpp. +Called during a netburst to sync channel data. This is called during the netburst on a per-channel basis. You should use this call to up any special channel-related things which are implemented by your module, e.g. sending listmodes. You may return multiple commands in the string_list.Definition at line 329 of file modules.cpp. .PP References string_list. .PP .nf -327 { string_list empty; return empty; } +329 { string_list empty; return empty; } .fi .SS "int Module::OnExtendedMode (\fBuserrec\fP * user, void * target, char modechar, int type, bool mode_on, \fBstring_list\fP & params)\fC [virtual]\fP" .PP -Called whenever an extended mode is to be processed. The type parameter is MT_SERVER, MT_CLIENT or MT_CHANNEL, dependent on where the mode is being changed. mode_on is set when the mode is being set, in which case params contains a list of parameters for the mode as strings. If mode_on is false, the mode is being removed, and parameters may contain the parameters for the mode, dependent on wether they were defined when a mode handler was set up with \fBServer::AddExtendedMode\fP If the mode is a channel mode, target is a chanrec*, and if it is a user mode, target is a userrec*. You must cast this value yourself to make use of it.Definition at line 315 of file modules.cpp. +Called whenever an extended mode is to be processed. The type parameter is MT_SERVER, MT_CLIENT or MT_CHANNEL, dependent on where the mode is being changed. mode_on is set when the mode is being set, in which case params contains a list of parameters for the mode as strings. If mode_on is false, the mode is being removed, and parameters may contain the parameters for the mode, dependent on wether they were defined when a mode handler was set up with \fBServer::AddExtendedMode\fP If the mode is a channel mode, target is a chanrec*, and if it is a user mode, target is a userrec*. You must cast this value yourself to make use of it.Definition at line 317 of file modules.cpp. .PP .nf -315 { return false; } +317 { return false; } .fi .SS "void Module::OnInfo (\fBuserrec\fP * user)\fC [virtual]\fP" .PP Called whenever a user types /INFO. The userrec will contain the information of the user who typed the command. Modules may use this method to output their own credits in /INFO (which is the ircd's version of an about box). It is purposefully not possible to modify any info that has already been output, or halt the list. You must write a 371 numeric to the user, containing your info in the following format: .PP - :information hereDefinition at line 318 of file modules.cpp. + :information hereDefinition at line 320 of file modules.cpp. .PP .nf -318 { }; +320 { }; .fi .SS "int Module::OnKill (\fBuserrec\fP * source, \fBuserrec\fP * dest, std::string reason)\fC [virtual]\fP" .PP -Called when a client is disconnected by KILL. If a client is killed by a server, e.g. a nickname collision or protocol error, source is NULL. Return 1 from this function to prevent the kill, and 0 from this function to allow it as normal. If you prevent the kill no output will be sent to the client, it is down to your module to generate this information. NOTE: It is NOT advisable to stop kills which originate from servers. If you do so youre risking race conditions, desyncs and worse!Definition at line 329 of file modules.cpp. +Called when a client is disconnected by KILL. If a client is killed by a server, e.g. a nickname collision or protocol error, source is NULL. Return 1 from this function to prevent the kill, and 0 from this function to allow it as normal. If you prevent the kill no output will be sent to the client, it is down to your module to generate this information. NOTE: It is NOT advisable to stop kills which originate from servers. If you do so youre risking race conditions, desyncs and worse!Definition at line 331 of file modules.cpp. .PP .nf -329 { return 0; }; +331 { return 0; }; .fi .SS "void Module::OnLoadModule (\fBModule\fP * mod, std::string name)\fC [virtual]\fP" .PP -Called whenever a module is loaded. mod will contain a pointer to the module, and string will contain its name, for example m_widgets.so. This function is primary for dependency checking, your module may decide to enable some extra features if it sees that you have for example loaded 'm_killwidgets.so' with 'm_makewidgets.so'. It is highly recommended that modules do *NOT* bail if they cannot satisfy dependencies, but instead operate under reduced functionality, unless the dependency is absolutely neccessary (e.g. a module that extends the features of another module).Definition at line 330 of file modules.cpp. +Called whenever a module is loaded. mod will contain a pointer to the module, and string will contain its name, for example m_widgets.so. This function is primary for dependency checking, your module may decide to enable some extra features if it sees that you have for example loaded 'm_killwidgets.so' with 'm_makewidgets.so'. It is highly recommended that modules do *NOT* bail if they cannot satisfy dependencies, but instead operate under reduced functionality, unless the dependency is absolutely neccessary (e.g. a module that extends the features of another module).Definition at line 332 of file modules.cpp. .PP .nf -330 { }; +332 { }; .fi .SS "void Module::OnOper (\fBuserrec\fP * user)\fC [virtual]\fP" .PP -Called whenever a user opers locally. The userrec will contain the oper mode 'o' as this function is called after any modifications are made to the user's structure by the core.Definition at line 317 of file modules.cpp. +Called whenever a user opers locally. The userrec will contain the oper mode 'o' as this function is called after any modifications are made to the user's structure by the core.Definition at line 319 of file modules.cpp. .PP .nf -317 { }; +319 { }; .fi .SS "void Module::OnPacketReceive (char * p)\fC [virtual]\fP" .PP -Called after a packet is received from another irc server. The packet is represented as a char*, as it should be regarded as a buffer, and not a string. This allows you to easily represent it in the correct ways to implement encryption, compression, digital signatures and anything else you may want to add. This should be regarded as a pre-processor and will be called immediately after the packet is received but before any other operations with the core of the ircd.Definition at line 311 of file modules.cpp. +Called after a packet is received from another irc server. The packet is represented as a char*, as it should be regarded as a buffer, and not a string. This allows you to easily represent it in the correct ways to implement encryption, compression, digital signatures and anything else you may want to add. This should be regarded as a pre-processor and will be called immediately after the packet is received but before any other operations with the core of the ircd.Definition at line 313 of file modules.cpp. .PP .nf -311 { } +313 { } .fi .SS "void Module::OnPacketTransmit (char * p)\fC [virtual]\fP" .PP -Called before a packet is transmitted across the irc network between two irc servers. The packet is represented as a char*, as it should be regarded as a buffer, and not a string. This allows you to easily represent it in the correct ways to implement encryption, compression, digital signatures and anything else you may want to add. This should be regarded as a pre-processor and will be called before ANY other operations within the ircd core program.Definition at line 310 of file modules.cpp. +Called before a packet is transmitted across the irc network between two irc servers. The packet is represented as a char*, as it should be regarded as a buffer, and not a string. This allows you to easily represent it in the correct ways to implement encryption, compression, digital signatures and anything else you may want to add. This should be regarded as a pre-processor and will be called before ANY other operations within the ircd core program.Definition at line 312 of file modules.cpp. .PP .nf -310 { } +312 { } .fi .SS "void Module::OnRehash ()\fC [virtual]\fP" .PP -Called on rehash. This method is called prior to a /REHASH or when a SIGHUP is received from the operating system. You should use it to reload any files so that your module keeps in step with the rest of the application.Definition at line 312 of file modules.cpp. +Called on rehash. This method is called prior to a /REHASH or when a SIGHUP is received from the operating system. You should use it to reload any files so that your module keeps in step with the rest of the application.Definition at line 314 of file modules.cpp. .PP .nf -312 { } +314 { } .fi .SS "void Module::OnServerRaw (std::string & raw, bool inbound, \fBuserrec\fP * user)\fC [virtual]\fP" .PP -Called when a raw command is transmitted or received. This method is the lowest level of handler available to a module. It will be called with raw data which is passing through a connected socket. If you wish, you may munge this data by changing the string parameter 'raw'. If you do this, after your function exits it will immediately be cut down to 510 characters plus a carriage return and linefeed. For INBOUND messages only (where inbound is set to true) the value of user will be the userrec of the connection sending the data. This is not possible for outbound data because the data may be being routed to multiple targets.Definition at line 313 of file modules.cpp. +Called when a raw command is transmitted or received. This method is the lowest level of handler available to a module. It will be called with raw data which is passing through a connected socket. If you wish, you may munge this data by changing the string parameter 'raw'. If you do this, after your function exits it will immediately be cut down to 510 characters plus a carriage return and linefeed. For INBOUND messages only (where inbound is set to true) the value of user will be the userrec of the connection sending the data. This is not possible for outbound data because the data may be being routed to multiple targets.Definition at line 315 of file modules.cpp. .PP .nf -313 { } +315 { } .fi .SS "void Module::OnUserConnect (\fBuserrec\fP * user)\fC [virtual]\fP" .PP -Called when a user connects. The details of the connecting user are available to you in the parameter userrec *userDefinition at line 306 of file modules.cpp. +Called when a user connects. The details of the connecting user are available to you in the parameter userrec *userDefinition at line 308 of file modules.cpp. .PP .nf -306 { } +308 { } .fi .SS "void Module::OnUserJoin (\fBuserrec\fP * user, \fBchanrec\fP * channel)\fC [virtual]\fP" .PP -Called when a user joins a channel. The details of the joining user are available to you in the parameter userrec *user, and the details of the channel they have joined is available in the variable chanrec *channelDefinition at line 308 of file modules.cpp. +Called when a user joins a channel. The details of the joining user are available to you in the parameter userrec *user, and the details of the channel they have joined is available in the variable chanrec *channelDefinition at line 310 of file modules.cpp. .PP .nf -308 { } +310 { } .fi .SS "void Module::OnUserPart (\fBuserrec\fP * user, \fBchanrec\fP * channel)\fC [virtual]\fP" .PP -Called when a user parts a channel. The details of the leaving user are available to you in the parameter userrec *user, and the details of the channel they have left is available in the variable chanrec *channelDefinition at line 309 of file modules.cpp. +Called when a user parts a channel. The details of the leaving user are available to you in the parameter userrec *user, and the details of the channel they have left is available in the variable chanrec *channelDefinition at line 311 of file modules.cpp. .PP .nf -309 { } +311 { } .fi .SS "void Module::OnUserPostNick (\fBuserrec\fP * user, std::string oldnick)\fC [virtual]\fP" .PP -Called after any nickchange, local or remote. This can be used to track users after nickchanges have been applied. Please note that although you can see remote nickchanges through this function, you should NOT make any changes to the userrec if the user is a remote user as this may cause a desnyc. check user->server before taking any action (including returning nonzero from the method). Because this method is called after the nickchange is taken place, no return values are possible to indicate forbidding of the nick change. Use OnUserPreNick for this. Definition at line 324 of file modules.cpp. +Called after any nickchange, local or remote. This can be used to track users after nickchanges have been applied. Please note that although you can see remote nickchanges through this function, you should NOT make any changes to the userrec if the user is a remote user as this may cause a desnyc. check user->server before taking any action (including returning nonzero from the method). Because this method is called after the nickchange is taken place, no return values are possible to indicate forbidding of the nick change. Use OnUserPreNick for this. Definition at line 326 of file modules.cpp. .PP .nf -324 { }; +326 { }; .fi .SS "int Module::OnUserPreInvite (\fBuserrec\fP * source, \fBuserrec\fP * dest, \fBchanrec\fP * channel)\fC [virtual]\fP" .PP -Called whenever a user is about to invite another user into a channel, before any processing is done. Returning 1 from this function stops the process immediately, causing no output to be sent to the user by the core. If you do this you must produce your own numerics, notices etc. This is useful for modules which may want to filter invites to channels.Definition at line 320 of file modules.cpp. +Called whenever a user is about to invite another user into a channel, before any processing is done. Returning 1 from this function stops the process immediately, causing no output to be sent to the user by the core. If you do this you must produce your own numerics, notices etc. This is useful for modules which may want to filter invites to channels.Definition at line 322 of file modules.cpp. .PP .nf -320 { return 0; }; +322 { return 0; }; .fi .SS "int Module::OnUserPreJoin (\fBuserrec\fP * user, \fBchanrec\fP * chan, const char * cname)\fC [virtual]\fP" .PP @@ -311,54 +313,54 @@ Called whenever a user is about to join a channel, before any processing is done .PP IMPORTANT NOTE! .PP -If the user joins a NEW channel which does not exist yet, OnUserPreJoin will be called BEFORE the channel record is created. This will cause chanrec* chan to be NULL. There is very little you can do in form of processing on the actual channel record at this point, however the channel NAME will still be passed in char* cname, so that you could for example implement a channel blacklist or whitelist, etc.Definition at line 314 of file modules.cpp. +If the user joins a NEW channel which does not exist yet, OnUserPreJoin will be called BEFORE the channel record is created. This will cause chanrec* chan to be NULL. There is very little you can do in form of processing on the actual channel record at this point, however the channel NAME will still be passed in char* cname, so that you could for example implement a channel blacklist or whitelist, etc.Definition at line 316 of file modules.cpp. .PP .nf -314 { return 0; } +316 { return 0; } .fi .SS "int Module::OnUserPreMessage (\fBuserrec\fP * user, void * dest, int target_type, std::string & text)\fC [virtual]\fP" .PP -Called whenever a user is about to PRIVMSG A user or a channel, before any processing is done. Returning any nonzero value from this function stops the process immediately, causing no output to be sent to the user by the core. If you do this you must produce your own numerics, notices etc. This is useful for modules which may want to filter or redirect messages. target_type can be one of TYPE_USER or TYPE_CHANNEL. If the target_type value is a user, you must cast dest to a userrec* otherwise you must cast it to a chanrec*, this is the details of where the message is destined to be sent.Definition at line 321 of file modules.cpp. +Called whenever a user is about to PRIVMSG A user or a channel, before any processing is done. Returning any nonzero value from this function stops the process immediately, causing no output to be sent to the user by the core. If you do this you must produce your own numerics, notices etc. This is useful for modules which may want to filter or redirect messages. target_type can be one of TYPE_USER or TYPE_CHANNEL. If the target_type value is a user, you must cast dest to a userrec* otherwise you must cast it to a chanrec*, this is the details of where the message is destined to be sent.Definition at line 323 of file modules.cpp. .PP .nf -321 { return 0; }; +323 { return 0; }; .fi .SS "int Module::OnUserPreNick (\fBuserrec\fP * user, std::string newnick)\fC [virtual]\fP" .PP -Called before any nickchange, local or remote. This can be used to implement Q-lines etc. Please note that although you can see remote nickchanges through this function, you should NOT make any changes to the userrec if the user is a remote user as this may cause a desnyc. check user->server before taking any action (including returning nonzero from the method). If your method returns nonzero, the nickchange is silently forbidden, and it is down to your module to generate some meaninful output.Definition at line 323 of file modules.cpp. +Called before any nickchange, local or remote. This can be used to implement Q-lines etc. Please note that although you can see remote nickchanges through this function, you should NOT make any changes to the userrec if the user is a remote user as this may cause a desnyc. check user->server before taking any action (including returning nonzero from the method). If your method returns nonzero, the nickchange is silently forbidden, and it is down to your module to generate some meaninful output.Definition at line 325 of file modules.cpp. .PP .nf -323 { return 0; }; +325 { return 0; }; .fi .SS "int Module::OnUserPreNotice (\fBuserrec\fP * user, void * dest, int target_type, std::string & text)\fC [virtual]\fP" .PP -Called whenever a user is about to NOTICE A user or a channel, before any processing is done. Returning any nonzero value from this function stops the process immediately, causing no output to be sent to the user by the core. If you do this you must produce your own numerics, notices etc. This is useful for modules which may want to filter or redirect messages. target_type can be one of TYPE_USER or TYPE_CHANNEL. If the target_type value is a user, you must cast dest to a userrec* otherwise you must cast it to a chanrec*, this is the details of where the message is destined to be sent. You may alter the message text as you wish before relinquishing control to the next module in the chain, and if no other modules block the text this altered form of the text will be sent out to the user and possibly to other servers.Definition at line 322 of file modules.cpp. +Called whenever a user is about to NOTICE A user or a channel, before any processing is done. Returning any nonzero value from this function stops the process immediately, causing no output to be sent to the user by the core. If you do this you must produce your own numerics, notices etc. This is useful for modules which may want to filter or redirect messages. target_type can be one of TYPE_USER or TYPE_CHANNEL. If the target_type value is a user, you must cast dest to a userrec* otherwise you must cast it to a chanrec*, this is the details of where the message is destined to be sent. You may alter the message text as you wish before relinquishing control to the next module in the chain, and if no other modules block the text this altered form of the text will be sent out to the user and possibly to other servers.Definition at line 324 of file modules.cpp. .PP .nf -322 { return 0; }; +324 { return 0; }; .fi .SS "void Module::OnUserQuit (\fBuserrec\fP * user)\fC [virtual]\fP" .PP -Called when a user quits. The details of the exiting user are available to you in the parameter userrec *userDefinition at line 307 of file modules.cpp. +Called when a user quits. The details of the exiting user are available to you in the parameter userrec *userDefinition at line 309 of file modules.cpp. .PP .nf -307 { } +309 { } .fi .SS "\fBstring_list\fP Module::OnUserSync (\fBuserrec\fP * user)\fC [virtual]\fP" .PP -Called during a netburst to sync user data. This is called during the netburst on a per-user basis. You should use this call to up any special user-related things which are implemented by your module, e.g. sending listmodes. You may return multiple commands in the string_list.Definition at line 326 of file modules.cpp. +Called during a netburst to sync user data. This is called during the netburst on a per-user basis. You should use this call to up any special user-related things which are implemented by your module, e.g. sending listmodes. You may return multiple commands in the string_list.Definition at line 328 of file modules.cpp. .PP References string_list. .PP .nf -326 { string_list empty; return empty; } +328 { string_list empty; return empty; } .fi .SS "void Module::OnWhois (\fBuserrec\fP * source, \fBuserrec\fP * dest)\fC [virtual]\fP" .PP -Called whenever a /WHOIS is performed on a local user. The source parameter contains the details of the user who issued the WHOIS command, and the dest parameter contains the information of the user they are whoising.Definition at line 319 of file modules.cpp. +Called whenever a /WHOIS is performed on a local user. The source parameter contains the details of the user who issued the WHOIS command, and the dest parameter contains the information of the user they are whoising.Definition at line 321 of file modules.cpp. .PP .nf -319 { }; +321 { }; .fi diff --git a/docs/man/man3/ModuleFactory.3 b/docs/man/man3/ModuleFactory.3 index b17e177bf..18d6bb943 100644 --- a/docs/man/man3/ModuleFactory.3 +++ b/docs/man/man3/ModuleFactory.3 @@ -1,4 +1,4 @@ -.TH "ModuleFactory" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "ModuleFactory" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -32,22 +32,22 @@ Instantiates classes inherited from \fBModule\fP This class creates a class inhe This is to allow for modules to create many different variants of \fBModule\fP, dependent on architecture, configuration, etc. In most cases, the simple class shown in the example module m_foobar.so will suffice for most modules. .PP -Definition at line 819 of file modules.h. +Definition at line 829 of file modules.h. .SH "Constructor & Destructor Documentation" .PP .SS "ModuleFactory::ModuleFactory ()\fC [inline]\fP" .PP -Definition at line 822 of file modules.h. +Definition at line 832 of file modules.h. .PP .nf -822 { } +832 { } .fi .SS "virtual ModuleFactory::~\fBModuleFactory\fP ()\fC [inline, virtual]\fP" .PP -Definition at line 823 of file modules.h. +Definition at line 833 of file modules.h. .PP .nf -823 { } +833 { } .fi .SH "Member Function Documentation" .PP diff --git a/docs/man/man3/QLine.3 b/docs/man/man3/QLine.3 index a90addc4c..f3dbdbea3 100644 --- a/docs/man/man3/QLine.3 +++ b/docs/man/man3/QLine.3 @@ -1,4 +1,4 @@ -.TH "QLine" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "QLine" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/Server.3 b/docs/man/man3/Server.3 index 56e6c0252..d3268626a 100644 --- a/docs/man/man3/Server.3 +++ b/docs/man/man3/Server.3 @@ -1,4 +1,4 @@ -.TH "Server" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "Server" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -108,7 +108,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)" +.RI "virtual void \fBAddCommand\fP (char *cmd, handlerfunc f, char flags, int minparams, char *source)" .br .RI "\fIAdds a command to the command table. \fP" .ti -1c @@ -166,41 +166,41 @@ Allows server output and query functions This class contains methods which allow All modules should instantiate at least one copy of this class, and use its member functions to perform their tasks. .PP -Definition at line 371 of file modules.h. +Definition at line 378 of file modules.h. .SH "Constructor & Destructor Documentation" .PP .SS "Server::Server ()" .PP -Default constructor. Creates a Server object.Definition at line 337 of file modules.cpp. +Default constructor. Creates a Server object.Definition at line 339 of file modules.cpp. .PP .nf -338 { -339 } +340 { +341 } .fi .SS "Server::~\fBServer\fP ()\fC [virtual]\fP" .PP -Default destructor. Destroys a Server object.Definition at line 341 of file modules.cpp. +Default destructor. Destroys a Server object.Definition at line 343 of file modules.cpp. .PP .nf -342 { -343 } +344 { +345 } .fi .SH "Member Function Documentation" .PP -.SS "void Server::AddCommand (char * cmd, handlerfunc f, char flags, int minparams)\fC [virtual]\fP" +.SS "void Server::AddCommand (char * cmd, handlerfunc f, char flags, int minparams, char * source)\fC [virtual]\fP" .PP Adds a command to the command table. This allows modules to add extra commands into the command table. You must place a function within your module which is is of type handlerfunc: .PP typedef void (handlerfunc) (char**, int, userrec*); ... void \fBhandle_kill(char **parameters, int pcnt, userrec *user)\fP .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'.Definition at line 418 of file modules.cpp. +When the command is typed, the parameters will be placed into the parameters array (similar to argv) and the parameter count will be placed into pcnt (similar to argv). There will never be any less parameters than the 'minparams' value you specified when creating the command. The *user parameter is the class of the user which caused the command to trigger, who will always have the flag you specified in 'flags' when creating the initial command. For example to create an oper only command create the commands with flags='o'. The source parameter is used for resource tracking, and should contain the name of your module (with file extension) e.g. 'm_blarp.so'. If you place the wrong identifier here, you can cause crashes if your module is unloaded.Definition at line 420 of file modules.cpp. .PP References createcommand(). .PP .nf -419 { -420 createcommand(cmd,f,flags,minparams); -421 } +421 { +422 createcommand(cmd,f,flags,minparams,source); +423 } .fi .SS "bool Server::AddExtendedListMode (char modechar)\fC [virtual]\fP" .PP @@ -214,259 +214,259 @@ Adds an extended mode letter which is parsed by a module and handled in a list f .PP (4) The mode and its parameter are NOT stored in the channels modes structure .PP -It is down to the module handling the mode to maintain state and determine what 'items' (e.g. users, or a banlist) have the mode set on them, and process the modes at the correct times, e.g. during access checks on channels, etc. When the extended mode is triggered the OnExtendedMode method will be triggered as above. Note that the target you are given will be a channel, if for example your mode is set 'on a user' (in for example +a) you must use Server::Find to locate the user the mode is operating on. Your mode handler may return 1 to handle the mode AND tell the core to display the mode change, e.g. '+aaa one two three' in the case of the mode for 'two', or it may return -1 to 'eat' the mode change, so the above example would become '+aa one three' after processing.Definition at line 563 of file modules.cpp. +It is down to the module handling the mode to maintain state and determine what 'items' (e.g. users, or a banlist) have the mode set on them, and process the modes at the correct times, e.g. during access checks on channels, etc. When the extended mode is triggered the OnExtendedMode method will be triggered as above. Note that the target you are given will be a channel, if for example your mode is set 'on a user' (in for example +a) you must use Server::Find to locate the user the mode is operating on. Your mode handler may return 1 to handle the mode AND tell the core to display the mode change, e.g. '+aaa one two three' in the case of the mode for 'two', or it may return -1 to 'eat' the mode change, so the above example would become '+aa one three' after processing.Definition at line 565 of file modules.cpp. .PP References DoAddExtendedMode(), ModeMakeList(), and MT_CHANNEL. .PP .nf -564 { -565 bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1); -566 if (res) -567 ModeMakeList(modechar); -568 return res; -569 } +566 { +567 bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1); +568 if (res) +569 ModeMakeList(modechar); +570 return res; +571 } .fi .SS "bool Server::AddExtendedMode (char modechar, int type, bool requires_oper, int params_when_on, int params_when_off)\fC [virtual]\fP" .PP -Adds an extended mode letter which is parsed by a module. This allows modules to add extra mode letters, e.g. +x for hostcloak. the 'type' parameter is either MT_CHANNEL, MT_CLIENT, or MT_SERVER, to indicate wether the mode is a channel mode, a client mode, or a server mode. requires_oper is used with MT_CLIENT type modes only to indicate the mode can only be set or unset by an oper. If this is used for MT_CHANNEL type modes it is ignored. params_when_on is the number of modes to expect when the mode is turned on (for type MT_CHANNEL only), e.g. with mode +k, this would have a value of 1. the params_when_off value has a similar value to params_when_on, except it indicates the number of parameters to expect when the mode is disabled. Modes which act in a similar way to channel mode +l (e.g. require a parameter to enable, but not to disable) should use this parameter. The function returns false if the mode is unavailable, and will not attempt to allocate another character, as this will confuse users. This also means that as only one module can claim a specific mode character, the core does not need to keep track of which modules own which modes, which speeds up operation of the server. In this version, a mode can have at most one parameter, attempting to use more parameters will have undefined effects.Definition at line 543 of file modules.cpp. +Adds an extended mode letter which is parsed by a module. This allows modules to add extra mode letters, e.g. +x for hostcloak. the 'type' parameter is either MT_CHANNEL, MT_CLIENT, or MT_SERVER, to indicate wether the mode is a channel mode, a client mode, or a server mode. requires_oper is used with MT_CLIENT type modes only to indicate the mode can only be set or unset by an oper. If this is used for MT_CHANNEL type modes it is ignored. params_when_on is the number of modes to expect when the mode is turned on (for type MT_CHANNEL only), e.g. with mode +k, this would have a value of 1. the params_when_off value has a similar value to params_when_on, except it indicates the number of parameters to expect when the mode is disabled. Modes which act in a similar way to channel mode +l (e.g. require a parameter to enable, but not to disable) should use this parameter. The function returns false if the mode is unavailable, and will not attempt to allocate another character, as this will confuse users. This also means that as only one module can claim a specific mode character, the core does not need to keep track of which modules own which modes, which speeds up operation of the server. In this version, a mode can have at most one parameter, attempting to use more parameters will have undefined effects.Definition at line 545 of file modules.cpp. .PP References DEBUG, DoAddExtendedMode(), MT_CLIENT, and MT_SERVER. .PP .nf -544 { -545 if (type == MT_SERVER) -546 { -547 log(DEBUG,'*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion'); -548 return false; -549 } -550 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT)) -551 { -552 log(DEBUG,'*** API ERROR *** Parameters on MT_CLIENT modes are not supported'); -553 return false; -554 } -555 if ((params_when_on>1) || (params_when_off>1)) -556 { -557 log(DEBUG,'*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported'); -558 return false; -559 } -560 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off); -561 } +546 { +547 if (type == MT_SERVER) +548 { +549 log(DEBUG,'*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion'); +550 return false; +551 } +552 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT)) +553 { +554 log(DEBUG,'*** API ERROR *** Parameters on MT_CLIENT modes are not supported'); +555 return false; +556 } +557 if ((params_when_on>1) || (params_when_off>1)) +558 { +559 log(DEBUG,'*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported'); +560 return false; +561 } +562 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off); +563 } .fi .SS "void Server::CallCommandHandler (std::string commandname, char ** parameters, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP" .PP Calls the handler for a command, either implemented by the core or by another module. You can use this function to trigger other commands in the ircd, such as PRIVMSG, JOIN, KICK etc, or even as a method of callback. By defining command names that are untypeable for users on irc (e.g. those which contain a or .br -) you may use them as callback identifiers. The first parameter to this method is the name of the command handler you wish to call, e.g. PRIVMSG. This will be a command handler previously registered by the core or wih \fBAddCommand()\fP. The second parameter is an array of parameters, and the third parameter is a count of parameters in the array. If you do not pass enough parameters to meet the minimum needed by the handler, the functiom will silently ignore it. The final parameter is the user executing the command handler, used for privilage checks, etc.Definition at line 408 of file modules.cpp. +) you may use them as callback identifiers. The first parameter to this method is the name of the command handler you wish to call, e.g. PRIVMSG. This will be a command handler previously registered by the core or wih \fBAddCommand()\fP. The second parameter is an array of parameters, and the third parameter is a count of parameters in the array. If you do not pass enough parameters to meet the minimum needed by the handler, the functiom will silently ignore it. The final parameter is the user executing the command handler, used for privilage checks, etc.Definition at line 410 of file modules.cpp. .PP .nf -409 { -410 call_handler(commandname.c_str(),parameters,pcnt,user); -411 } +411 { +412 call_handler(commandname.c_str(),parameters,pcnt,user); +413 } .fi .SS "void Server::ChangeGECOS (\fBuserrec\fP * user, std::string gecos)\fC [virtual]\fP" .PP -Change GECOS (fullname) of a user. You should always call this method to change a user's GECOS rather than writing directly to the fullname member of userrec, as any change applied via this method will be propogated to any linked servers.Definition at line 496 of file modules.cpp. +Change GECOS (fullname) of a user. You should always call this method to change a user's GECOS rather than writing directly to the fullname member of userrec, as any change applied via this method will be propogated to any linked servers.Definition at line 498 of file modules.cpp. .PP References ChangeName(). .PP .nf -497 { -498 ChangeName(user,gecos.c_str()); -499 } +499 { +500 ChangeName(user,gecos.c_str()); +501 } .fi .SS "void Server::ChangeHost (\fBuserrec\fP * user, std::string host)\fC [virtual]\fP" .PP -Change displayed hostname of a user. You should always call this method to change a user's host rather than writing directly to the dhost member of userrec, as any change applied via this method will be propogated to any linked servers.Definition at line 491 of file modules.cpp. +Change displayed hostname of a user. You should always call this method to change a user's host rather than writing directly to the dhost member of userrec, as any change applied via this method will be propogated to any linked servers.Definition at line 493 of file modules.cpp. .PP References ChangeDisplayedHost(). .PP .nf -492 { -493 ChangeDisplayedHost(user,host.c_str()); -494 } +494 { +495 ChangeDisplayedHost(user,host.c_str()); +496 } .fi .SS "void Server::ChangeUserNick (\fBuserrec\fP * user, std::string nickname)\fC [virtual]\fP" .PP -Forces a user nickchange. This command works similarly to SVSNICK, and can be used to implement Q-lines etc. If you specify an invalid nickname, the nick change will be dropped and the target user will receive the error numeric for it.Definition at line 392 of file modules.cpp. +Forces a user nickchange. This command works similarly to SVSNICK, and can be used to implement Q-lines etc. If you specify an invalid nickname, the nick change will be dropped and the target user will receive the error numeric for it.Definition at line 394 of file modules.cpp. .PP .nf -393 { -394 force_nickchange(user,nickname.c_str()); -395 } +395 { +396 force_nickchange(user,nickname.c_str()); +397 } .fi .SS "std::string Server::ChanMode (\fBuserrec\fP * User, \fBchanrec\fP * Chan)\fC [virtual]\fP" .PP -Attempts to look up a user's privilages on a channel. This function will return a string containing either @, , +, or an empty string, representing the user's privilages upon the channel you specify.Definition at line 516 of file modules.cpp. +Attempts to look up a user's privilages on a channel. This function will return a string containing either @, , +, or an empty string, representing the user's privilages upon the channel you specify.Definition at line 518 of file modules.cpp. .PP References cmode(). .PP .nf -517 { -518 return cmode(User,Chan); -519 } +519 { +520 return cmode(User,Chan); +521 } .fi .SS "bool Server::CommonChannels (\fBuserrec\fP * u1, \fBuserrec\fP * u2)\fC [virtual]\fP" .PP -Returns true if two users share a common channel. This method is used internally by the NICK and QUIT commands, and the \fBServer::SendCommon\fP method.Definition at line 469 of file modules.cpp. +Returns true if two users share a common channel. This method is used internally by the NICK and QUIT commands, and the \fBServer::SendCommon\fP method.Definition at line 471 of file modules.cpp. .PP References common_channels(). .PP .nf -470 { -471 return (common_channels(u1,u2) != 0); -472 } +472 { +473 return (common_channels(u1,u2) != 0); +474 } .fi .SS "int Server::CountUsers (\fBchanrec\fP * c)\fC [virtual]\fP" .PP -Returns a count of the number of users on a channel. This will NEVER be 0, as if the chanrec exists, it will have at least one user in the channel.Definition at line 571 of file modules.cpp. +Returns a count of the number of users on a channel. This will NEVER be 0, as if the chanrec exists, it will have at least one user in the channel.Definition at line 573 of file modules.cpp. .PP .nf -572 { -573 return usercount(c); -574 } +574 { +575 return usercount(c); +576 } .fi .SS "\fBchanrec\fP * Server::FindChannel (std::string channel)\fC [virtual]\fP" .PP -Attempts to look up a channel and return a pointer to it. This function will return NULL if the channel does not exist.Definition at line 511 of file modules.cpp. +Attempts to look up a channel and return a pointer to it. This function will return NULL if the channel does not exist.Definition at line 513 of file modules.cpp. .PP .nf -512 { -513 return FindChan(channel.c_str()); -514 } +514 { +515 return FindChan(channel.c_str()); +516 } .fi .SS "\fBuserrec\fP * Server::FindNick (std::string nick)\fC [virtual]\fP" .PP -Attempts to look up a nick and return a pointer to it. This function will return NULL if the nick does not exist.Definition at line 506 of file modules.cpp. +Attempts to look up a nick and return a pointer to it. This function will return NULL if the nick does not exist.Definition at line 508 of file modules.cpp. .PP .nf -507 { -508 return Find(nick); -509 } +509 { +510 return Find(nick); +511 } .fi .SS "\fBAdmin\fP Server::GetAdmin ()\fC [virtual]\fP" .PP -Returns the information of the server as returned by the /ADMIN command. See the \fBAdmin\fP class for further information of the return value. The members \fBAdmin::Nick\fP, \fBAdmin::Email\fP and \fBAdmin::Name\fP contain the information for the server where the module is loaded.Definition at line 536 of file modules.cpp. +Returns the information of the server as returned by the /ADMIN command. See the \fBAdmin\fP class for further information of the return value. The members \fBAdmin::Nick\fP, \fBAdmin::Email\fP and \fBAdmin::Name\fP contain the information for the server where the module is loaded.Definition at line 538 of file modules.cpp. .PP .nf -537 { -538 return Admin(getadminname(),getadminemail(),getadminnick()); -539 } +539 { +540 return Admin(getadminname(),getadminemail(),getadminnick()); +541 } .fi .SS "std::string Server::GetNetworkName ()\fC [virtual]\fP" .PP -Returns the network name, global to all linked servers. Definition at line 531 of file modules.cpp. +Returns the network name, global to all linked servers. Definition at line 533 of file modules.cpp. .PP .nf -532 { -533 return getnetworkname(); -534 } +534 { +535 return getnetworkname(); +536 } .fi .SS "std::string Server::GetServerName ()\fC [virtual]\fP" .PP -Returns the server name of the server where the module is loaded. Definition at line 526 of file modules.cpp. +Returns the server name of the server where the module is loaded. Definition at line 528 of file modules.cpp. .PP .nf -527 { -528 return getservername(); -529 } +529 { +530 return getservername(); +531 } .fi .SS "\fBchanuserlist\fP Server::GetUsers (\fBchanrec\fP * chan)\fC [virtual]\fP" .PP -Fetches the userlist of a channel. This function must be here and not a member of userrec or chanrec due to include constraints.Definition at line 373 of file modules.cpp. +Fetches the userlist of a channel. This function must be here and not a member of userrec or chanrec due to include constraints.Definition at line 375 of file modules.cpp. .PP References chanuserlist, clientlist, has_channel(), and isnick(). .PP .nf -374 { -375 chanuserlist userl; -376 userl.clear(); -377 for (user_hash::const_iterator i = clientlist.begin(); i != clientlist.end(); i++) -378 { -379 if (i->second) -380 { -381 if (has_channel(i->second,chan)) -382 { -383 if (isnick(i->second->nick)) -384 { -385 userl.push_back(i->second); -386 } -387 } -388 } -389 } -390 return userl; -391 } +376 { +377 chanuserlist userl; +378 userl.clear(); +379 for (user_hash::const_iterator i = clientlist.begin(); i != clientlist.end(); i++) +380 { +381 if (i->second) +382 { +383 if (has_channel(i->second,chan)) +384 { +385 if (isnick(i->second->nick)) +386 { +387 userl.push_back(i->second); +388 } +389 } +390 } +391 } +392 return userl; +393 } .fi .SS "bool Server::IsNick (std::string nick)\fC [virtual]\fP" .PP -Returns true if a nick is valid. Nicks for unregistered connections will return false.Definition at line 501 of file modules.cpp. +Returns true if a nick is valid. Nicks for unregistered connections will return false.Definition at line 503 of file modules.cpp. .PP References isnick(). .PP .nf -502 { -503 return (isnick(nick.c_str()) != 0); -504 } +504 { +505 return (isnick(nick.c_str()) != 0); +506 } .fi .SS "bool Server::IsOnChannel (\fBuserrec\fP * User, \fBchanrec\fP * Chan)\fC [virtual]\fP" .PP -Checks if a user is on a channel. This function will return true or false to indicate if user 'User' is on channel 'Chan'.Definition at line 521 of file modules.cpp. +Checks if a user is on a channel. This function will return true or false to indicate if user 'User' is on channel 'Chan'.Definition at line 523 of file modules.cpp. .PP References has_channel(). .PP .nf -522 { -523 return has_channel(User,Chan); -524 } +524 { +525 return has_channel(User,Chan); +526 } .fi .SS "bool Server::IsUlined (std::string server)\fC [virtual]\fP" .PP -Returns true if the servername you give is ulined. ULined servers have extra privilages. They are allowed to change nicknames on remote servers, change modes of clients which are on remote servers and set modes of channels where there are no channel operators for that channel on the ulined server, amongst other things. Ulined server data is also broadcast across the mesh at all times as opposed to selectively messaged in the case of normal servers, as many ulined server types (such as services) do not support meshed links and must operate in this manner.Definition at line 403 of file modules.cpp. +Returns true if the servername you give is ulined. ULined servers have extra privilages. They are allowed to change nicknames on remote servers, change modes of clients which are on remote servers and set modes of channels where there are no channel operators for that channel on the ulined server, amongst other things. Ulined server data is also broadcast across the mesh at all times as opposed to selectively messaged in the case of normal servers, as many ulined server types (such as services) do not support meshed links and must operate in this manner.Definition at line 405 of file modules.cpp. .PP References is_uline(). .PP .nf -404 { -405 return is_uline(server.c_str()); -406 } +406 { +407 return is_uline(server.c_str()); +408 } .fi .SS "\fBchanrec\fP * Server::JoinUserToChannel (\fBuserrec\fP * user, std::string cname, std::string key)\fC [virtual]\fP" .PP -Forces a user to join a channel. This is similar to svsjoin and can be used to implement redirection, etc. On success, the return value is a valid pointer to a chanrec* of the channel the user was joined to. On failure, the result is NULL.Definition at line 363 of file modules.cpp. +Forces a user to join a channel. This is similar to svsjoin and can be used to implement redirection, etc. On success, the return value is a valid pointer to a chanrec* of the channel the user was joined to. On failure, the result is NULL.Definition at line 365 of file modules.cpp. .PP .nf -364 { -365 return add_channel(user,cname.c_str(),key.c_str(),true); -366 } +366 { +367 return add_channel(user,cname.c_str(),key.c_str(),true); +368 } .fi .SS "void Server::Log (int level, std::string s)\fC [virtual]\fP" .PP -Writes a log string. This method writes a line of text to the log. If the level given is lower than the level given in the configuration, this command has no effect.Definition at line 413 of file modules.cpp. +Writes a log string. This method writes a line of text to the log. If the level given is lower than the level given in the configuration, this command has no effect.Definition at line 415 of file modules.cpp. .PP .nf -414 { -415 log(level,'%s',s.c_str()); -416 } +416 { +417 log(level,'%s',s.c_str()); +418 } .fi .SS "bool Server::MatchText (std::string sliteral, std::string spattern)\fC [virtual]\fP" .PP -Matches text against a glob pattern. Uses the ircd's internal matching function to match string against a globbing pattern, e.g. *!*@*.com Returns true if the literal successfully matches the pattern, false if otherwise.Definition at line 350 of file modules.cpp. +Matches text against a glob pattern. Uses the ircd's internal matching function to match string against a globbing pattern, e.g. *!*@*.com Returns true if the literal successfully matches the pattern, false if otherwise.Definition at line 352 of file modules.cpp. .PP .nf -351 { -352 char literal[MAXBUF],pattern[MAXBUF]; -353 strlcpy(literal,sliteral.c_str(),MAXBUF); -354 strlcpy(pattern,spattern.c_str(),MAXBUF); -355 return match(literal,pattern); -356 } +353 { +354 char literal[MAXBUF],pattern[MAXBUF]; +355 strlcpy(literal,sliteral.c_str(),MAXBUF); +356 strlcpy(pattern,spattern.c_str(),MAXBUF); +357 return match(literal,pattern); +358 } .fi .SS "\fBchanrec\fP * Server::PartUserFromChannel (\fBuserrec\fP * user, std::string cname, std::string reason)\fC [virtual]\fP" .PP -Forces a user to part a channel. This is similar to svspart and can be used to implement redirection, etc. Although the return value of this function is a pointer to a channel record, the returned data is undefined and should not be read or written to. This behaviour may be changed in a future version.Definition at line 368 of file modules.cpp. +Forces a user to part a channel. This is similar to svspart and can be used to implement redirection, etc. Although the return value of this function is a pointer to a channel record, the returned data is undefined and should not be read or written to. This behaviour may be changed in a future version.Definition at line 370 of file modules.cpp. .PP .nf -369 { -370 return del_channel(user,cname.c_str(),reason.c_str(),false); -371 } +371 { +372 return del_channel(user,cname.c_str(),reason.c_str(),false); +373 } .fi .SS "void Server::QuitUser (\fBuserrec\fP * user, std::string reason)\fC [virtual]\fP" .PP @@ -474,65 +474,65 @@ Forces a user to quit with the specified reason. To the user, it will appear as .PP WARNING! .PP -Once you call this function, userrec* user will immediately become INVALID. You MUST NOT write to, or read from this pointer after calling the QuitUser method UNDER ANY CIRCUMSTANCES! The best course of action after calling this method is to immediately bail from your handler.Definition at line 397 of file modules.cpp. +Once you call this function, userrec* user will immediately become INVALID. You MUST NOT write to, or read from this pointer after calling the QuitUser method UNDER ANY CIRCUMSTANCES! The best course of action after calling this method is to immediately bail from your handler.Definition at line 399 of file modules.cpp. .PP References userrec::nick, and send_network_quit(). .PP .nf -398 { -399 send_network_quit(user->nick,reason.c_str()); -400 kill_link(user,reason.c_str()); -401 } +400 { +401 send_network_quit(user->nick,reason.c_str()); +402 kill_link(user,reason.c_str()); +403 } .fi .SS "void Server::Send (int Socket, std::string s)\fC [virtual]\fP" .PP -Sends a line of text down a TCP/IP socket. This method writes a line of text to an established socket, cutting it to 510 characters plus a carriage return and linefeed if required.Definition at line 428 of file modules.cpp. +Sends a line of text down a TCP/IP socket. This method writes a line of text to an established socket, cutting it to 510 characters plus a carriage return and linefeed if required.Definition at line 430 of file modules.cpp. .PP .nf -429 { -430 Write(Socket,'%s',s.c_str()); -431 } +431 { +432 Write(Socket,'%s',s.c_str()); +433 } .fi .SS "void Server::SendChannel (\fBuserrec\fP * User, \fBchanrec\fP * Channel, std::string s, bool IncludeSender)\fC [virtual]\fP" .PP -Sends text from a user to a channel (mulicast). This method writes a line of text to a channel, with the given user's nick/ident /host combination prepended, as used in PRIVMSG etc commands (see RFC 1459). If the IncludeSender flag is set, then the text is also sent back to the user from which it originated, as seen in MODE (see RFC 1459).Definition at line 457 of file modules.cpp. +Sends text from a user to a channel (mulicast). This method writes a line of text to a channel, with the given user's nick/ident /host combination prepended, as used in PRIVMSG etc commands (see RFC 1459). If the IncludeSender flag is set, then the text is also sent back to the user from which it originated, as seen in MODE (see RFC 1459).Definition at line 459 of file modules.cpp. .PP .nf -458 { -459 if (IncludeSender) -460 { -461 WriteChannel(Channel,User,'%s',s.c_str()); -462 } -463 else -464 { -465 ChanExceptSender(Channel,User,'%s',s.c_str()); -466 } -467 } +460 { +461 if (IncludeSender) +462 { +463 WriteChannel(Channel,User,'%s',s.c_str()); +464 } +465 else +466 { +467 ChanExceptSender(Channel,User,'%s',s.c_str()); +468 } +469 } .fi .SS "void Server::SendCommon (\fBuserrec\fP * User, std::string text, bool IncludeSender)\fC [virtual]\fP" .PP -Sends text from a user to one or more channels (mulicast). This method writes a line of text to all users which share a common channel with a given user, with the user's nick/ident/host combination prepended, as used in PRIVMSG etc commands (see RFC 1459). If the IncludeSender flag is set, then the text is also sent back to the user from which it originated, as seen in NICK (see RFC 1459). Otherwise, it is only sent to the other recipients, as seen in QUIT.Definition at line 474 of file modules.cpp. +Sends text from a user to one or more channels (mulicast). This method writes a line of text to all users which share a common channel with a given user, with the user's nick/ident/host combination prepended, as used in PRIVMSG etc commands (see RFC 1459). If the IncludeSender flag is set, then the text is also sent back to the user from which it originated, as seen in NICK (see RFC 1459). Otherwise, it is only sent to the other recipients, as seen in QUIT.Definition at line 476 of file modules.cpp. .PP .nf -475 { -476 if (IncludeSender) -477 { -478 WriteCommon(User,'%s',text.c_str()); -479 } -480 else -481 { -482 WriteCommonExcept(User,'%s',text.c_str()); -483 } -484 } +477 { +478 if (IncludeSender) +479 { +480 WriteCommon(User,'%s',text.c_str()); +481 } +482 else +483 { +484 WriteCommonExcept(User,'%s',text.c_str()); +485 } +486 } .fi .SS "void Server::SendFrom (int Socket, \fBuserrec\fP * User, std::string s)\fC [virtual]\fP" .PP -Sends text from a user to a socket. This method writes a line of text to an established socket, with the given user's nick/ident /host combination prepended, as used in PRIVSG etc commands (see RFC 1459)Definition at line 438 of file modules.cpp. +Sends text from a user to a socket. This method writes a line of text to an established socket, with the given user's nick/ident /host combination prepended, as used in PRIVSG etc commands (see RFC 1459)Definition at line 440 of file modules.cpp. .PP .nf -439 { -440 WriteFrom(Socket,User,'%s',s.c_str()); -441 } +441 { +442 WriteFrom(Socket,User,'%s',s.c_str()); +443 } .fi .SS "void Server::SendMode (char ** parameters, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP" .PP @@ -550,32 +550,32 @@ modes[2] = user->nick; .PP Srv->SendMode(modes,3,user); .PP -The modes will originate from the server where the command was issued, however responses (e.g. numerics) will be sent to the user you provide as the third parameter. You must be sure to get the number of parameters correct in the pcnt parameter otherwise you could leave your server in an unstable state!Definition at line 423 of file modules.cpp. +The modes will originate from the server where the command was issued, however responses (e.g. numerics) will be sent to the user you provide as the third parameter. You must be sure to get the number of parameters correct in the pcnt parameter otherwise you could leave your server in an unstable state!Definition at line 425 of file modules.cpp. .PP References server_mode(). .PP .nf -424 { -425 server_mode(parameters,pcnt,user); -426 } +426 { +427 server_mode(parameters,pcnt,user); +428 } .fi .SS "void Server::SendOpers (std::string s)\fC [virtual]\fP" .PP -Sends text to all opers. This method sends a server notice to all opers with the usermode +s.Definition at line 345 of file modules.cpp. +Sends text to all opers. This method sends a server notice to all opers with the usermode +s.Definition at line 347 of file modules.cpp. .PP .nf -346 { -347 WriteOpers('%s',s.c_str()); -348 } +348 { +349 WriteOpers('%s',s.c_str()); +350 } .fi .SS "void Server::SendServ (int Socket, std::string s)\fC [virtual]\fP" .PP -Sends text from the server to a socket. This method writes a line of text to an established socket, with the servername prepended as used by numerics (see RFC 1459)Definition at line 433 of file modules.cpp. +Sends text from the server to a socket. This method writes a line of text to an established socket, with the servername prepended as used by numerics (see RFC 1459)Definition at line 435 of file modules.cpp. .PP .nf -434 { -435 WriteServ(Socket,'%s',s.c_str()); -436 } +436 { +437 WriteServ(Socket,'%s',s.c_str()); +438 } .fi .SS "void Server::SendTo (\fBuserrec\fP * Source, \fBuserrec\fP * Dest, std::string s)\fC [virtual]\fP" .PP @@ -587,23 +587,23 @@ The format will become: .PP :localserver TEXT .PP -Which is useful for numerics and server notices to single users, etc.Definition at line 443 of file modules.cpp. +Which is useful for numerics and server notices to single users, etc.Definition at line 445 of file modules.cpp. .PP References connection::fd. .PP .nf -444 { -445 if (!Source) -446 { -447 // if source is NULL, then the message originates from the local server -448 Write(Dest->fd,':%s %s',this->GetServerName().c_str(),s.c_str()); -449 } -450 else -451 { -452 // otherwise it comes from the user specified -453 WriteTo(Source,Dest,'%s',s.c_str()); -454 } -455 } +446 { +447 if (!Source) +448 { +449 // if source is NULL, then the message originates from the local server +450 Write(Dest->fd,':%s %s',this->GetServerName().c_str(),s.c_str()); +451 } +452 else +453 { +454 // otherwise it comes from the user specified +455 WriteTo(Source,Dest,'%s',s.c_str()); +456 } +457 } .fi .SS "void Server::SendToModeMask (std::string modes, int flags, std::string text)\fC [virtual]\fP" .PP @@ -611,21 +611,21 @@ Sends to all users matching a mode mask You must specify one or more usermodes a .PP Serv->SendToModeMask('xi', WM_OR, 'm00'); .PP -Then the text 'm00' will be sent to all users with EITHER mode x or i. Conversely if you used WM_AND, the user must have both modes set to receive the message.Definition at line 358 of file modules.cpp. +Then the text 'm00' will be sent to all users with EITHER mode x or i. Conversely if you used WM_AND, the user must have both modes set to receive the message.Definition at line 360 of file modules.cpp. .PP .nf -359 { -360 WriteMode(modes.c_str(),flags,'%s',text.c_str()); -361 } +361 { +362 WriteMode(modes.c_str(),flags,'%s',text.c_str()); +363 } .fi .SS "void Server::SendWallops (\fBuserrec\fP * User, std::string text)\fC [virtual]\fP" .PP -Sends a WALLOPS message. This method writes a WALLOPS message to all users with the +w flag, originating from the specified user.Definition at line 486 of file modules.cpp. +Sends a WALLOPS message. This method writes a WALLOPS message to all users with the +w flag, originating from the specified user.Definition at line 488 of file modules.cpp. .PP .nf -487 { -488 WriteWallOps(User,false,'%s',text.c_str()); -489 } +489 { +490 WriteWallOps(User,false,'%s',text.c_str()); +491 } .fi diff --git a/docs/man/man3/StrHashComp.3 b/docs/man/man3/StrHashComp.3 index 2614d4533..d4bc096fe 100644 --- a/docs/man/man3/StrHashComp.3 +++ b/docs/man/man3/StrHashComp.3 @@ -1,4 +1,4 @@ -.TH "StrHashComp" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "StrHashComp" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -17,15 +17,15 @@ StrHashComp \- .PP .SS "bool StrHashComp::operator() (const string & s1, const string & s2) const\fC [inline]\fP" .PP -Definition at line 144 of file modules.cpp. +Definition at line 146 of file modules.cpp. .PP .nf -145 { -146 char a[MAXBUF],b[MAXBUF]; -147 strlcpy(a,s1.c_str(),MAXBUF); -148 strlcpy(b,s2.c_str(),MAXBUF); -149 return (strcasecmp(a,b) == 0); -150 } +147 { +148 char a[MAXBUF],b[MAXBUF]; +149 strlcpy(a,s1.c_str(),MAXBUF); +150 strlcpy(b,s2.c_str(),MAXBUF); +151 return (strcasecmp(a,b) == 0); +152 } .fi diff --git a/docs/man/man3/Version.3 b/docs/man/man3/Version.3 index 5f4bdea7c..69a2da861 100644 --- a/docs/man/man3/Version.3 +++ b/docs/man/man3/Version.3 @@ -1,4 +1,4 @@ -.TH "Version" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "Version" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -16,7 +16,7 @@ Inherits \fBclassbase\fP. .in +1c .ti -1c -.RI "\fBVersion\fP (int major, int minor, int revision, int build)" +.RI "\fBVersion\fP (int major, int minor, int revision, int build, int flags)" .br .in -1c .SS "Public Attributes" @@ -34,6 +34,9 @@ Inherits \fBclassbase\fP. .ti -1c .RI "const int \fBBuild\fP" .br +.ti -1c +.RI "const int \fBFlags\fP" +.br .in -1c .SH "Detailed Description" .PP @@ -41,30 +44,33 @@ Holds a module's Version information The four members (set by the constructor on A class of type Version is returned by the GetVersion method of the \fBModule\fP class. .PP -Definition at line 102 of file modules.h. +Definition at line 109 of file modules.h. .SH "Constructor & Destructor Documentation" .PP -.SS "Version::Version (int major, int minor, int revision, int build)" +.SS "Version::Version (int major, int minor, int revision, int build, int flags)" .PP -Definition at line 298 of file modules.cpp. +Definition at line 300 of file modules.cpp. .PP .nf -298 : Major(major), Minor(minor), Revision(revision), Build(build) { }; +300 : Major(major), Minor(minor), Revision(revision), Build(build), Flags(flags) { }; .fi .SH "Member Data Documentation" .PP .SS "const int \fBVersion::Build\fP" .PP -Definition at line 105 of file modules.h. +Definition at line 112 of file modules.h. +.SS "const int \fBVersion::Flags\fP" +.PP +Definition at line 112 of file modules.h. .SS "const int \fBVersion::Major\fP" .PP -Definition at line 105 of file modules.h. +Definition at line 112 of file modules.h. .SS "const int \fBVersion::Minor\fP" .PP -Definition at line 105 of file modules.h. +Definition at line 112 of file modules.h. .SS "const int \fBVersion::Revision\fP" .PP -Definition at line 105 of file modules.h. +Definition at line 112 of file modules.h. .SH "Author" .PP diff --git a/docs/man/man3/XLine.3 b/docs/man/man3/XLine.3 index c71f4b90e..409aba33f 100644 --- a/docs/man/man3/XLine.3 +++ b/docs/man/man3/XLine.3 @@ -1,4 +1,4 @@ -.TH "XLine" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "XLine" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ZLine.3 b/docs/man/man3/ZLine.3 index 158e01b73..6d71ea0c5 100644 --- a/docs/man/man3/ZLine.3 +++ b/docs/man/man3/ZLine.3 @@ -1,4 +1,4 @@ -.TH "ZLine" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "ZLine" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/base.h.3 b/docs/man/man3/base.h.3 index 72bc81322..f07ed0ecd 100644 --- a/docs/man/man3/base.h.3 +++ b/docs/man/man3/base.h.3 @@ -1,4 +1,4 @@ -.TH "base.h" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "base.h" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/channels.cpp.3 b/docs/man/man3/channels.cpp.3 index 05c9e5ce5..3595b02fb 100644 --- a/docs/man/man3/channels.cpp.3 +++ b/docs/man/man3/channels.cpp.3 @@ -1,4 +1,4 @@ -.TH "channels.cpp" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "channels.cpp" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -195,6 +195,9 @@ channels.cpp \- .RI "FILE * \fBlog_file\fP" .br .ti -1c +.RI "time_t \fBTIME\fP" +.br +.ti -1c .RI "std::vector< \fBModeParameter\fP > \fBcustom_mode_params\fP" .br .in -1c @@ -227,7 +230,7 @@ Definition at line 101 of file channels.cpp. Referenced by userrec::HasPermission(). .SS "std::vector<\fBModeParameter\fP> \fBcustom_mode_params\fP" .PP -Definition at line 110 of file channels.cpp. +Definition at line 111 of file channels.cpp. .PP Referenced by chanrec::GetModeParameter(), and chanrec::SetCustomModeParam(). .SS "int \fBdebugging\fP" @@ -268,7 +271,7 @@ Definition at line 88 of file channels.cpp. Definition at line 103 of file channels.cpp. .SS "int \fBMODCOUNT\fP = -1" .PP -Definition at line 774 of file modules.cpp. +Definition at line 776 of file modules.cpp. .SS "std::vector \fBmodule_names\fP" .PP Definition at line 92 of file channels.cpp. @@ -311,6 +314,11 @@ Definition at line 68 of file channels.cpp. .SS "time_t \fBstartup_time\fP" .PP Definition at line 86 of file channels.cpp. +.SS "time_t \fBTIME\fP" +.PP +Definition at line 107 of file channels.cpp. +.PP +Referenced by serverrec::serverrec(). .SS "int \fBUDPportCount\fP" .PP Definition at line 96 of file channels.cpp. diff --git a/docs/man/man3/channels.h.3 b/docs/man/man3/channels.h.3 index c4717f2e6..6444b221f 100644 --- a/docs/man/man3/channels.h.3 +++ b/docs/man/man3/channels.h.3 @@ -1,4 +1,4 @@ -.TH "channels.h" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "channels.h" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/chanrec.3 b/docs/man/man3/chanrec.3 index 4a75dcff5..d76b09c65 100644 --- a/docs/man/man3/chanrec.3 +++ b/docs/man/man3/chanrec.3 @@ -1,4 +1,4 @@ -.TH "chanrec" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "chanrec" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -114,20 +114,20 @@ Definition at line 94 of file channels.h. .PP .SS "chanrec::chanrec ()" .PP -Creates a channel record and initialises it with default values. Definition at line 112 of file channels.cpp. +Creates a channel record and initialises it with default values. Definition at line 113 of file channels.cpp. .PP References c_private, created, custom_modes, inviteonly, key, limit, moderated, name, noexternal, secret, setby, topic, topiclock, and topicset. .PP .nf -113 { -114 strcpy(name,''); -115 strcpy(custom_modes,''); -116 strcpy(topic,''); -117 strcpy(setby,''); -118 strcpy(key,''); -119 created = topicset = limit = 0; -120 topiclock = noexternal = inviteonly = moderated = secret = c_private = false; -121 } +114 { +115 strcpy(name,''); +116 strcpy(custom_modes,''); +117 strcpy(topic,''); +118 strcpy(setby,''); +119 strcpy(key,''); +120 created = topicset = limit = 0; +121 topiclock = noexternal = inviteonly = moderated = secret = c_private = false; +122 } .fi .SS "virtual chanrec::~\fBchanrec\fP ()\fC [inline, virtual]\fP" .PP @@ -140,105 +140,105 @@ Definition at line 185 of file channels.h. .PP .SS "std::string chanrec::GetModeParameter (char mode)" .PP -Returns the parameter for a custom mode on a channel. For example if '+L #foo' is set, and you pass this method 'L', it will return '#foo'. If the mode is not set on the channel, or the mode has no parameters associated with it, it will return an empty string.Definition at line 185 of file channels.cpp. +Returns the parameter for a custom mode on a channel. For example if '+L #foo' is set, and you pass this method 'L', it will return '#foo'. If the mode is not set on the channel, or the mode has no parameters associated with it, it will return an empty string.Definition at line 186 of file channels.cpp. .PP References custom_mode_params. .PP .nf -186 { -187 if (custom_mode_params.size()) -188 { -189 for (vector::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++) -190 { -191 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel))) -192 { -193 return std::string(i->parameter); -194 } -195 } -196 } -197 return std::string(''); -198 } +187 { +188 if (custom_mode_params.size()) +189 { +190 for (vector::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++) +191 { +192 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel))) +193 { +194 return std::string(i->parameter); +195 } +196 } +197 } +198 return std::string(''); +199 } .fi .SS "bool chanrec::IsCustomModeSet (char mode)" .PP -Returns true if a custom mode is set on a channel. Definition at line 179 of file channels.cpp. +Returns true if a custom mode is set on a channel. Definition at line 180 of file channels.cpp. .PP References DEBUG. .PP .nf -180 { -181 log(DEBUG,'Checking ISCustomModeSet: %c %s',mode,this->custom_modes); -182 return (strchr(this->custom_modes,mode) != 0); -183 } +181 { +182 log(DEBUG,'Checking ISCustomModeSet: %c %s',mode,this->custom_modes); +183 return (strchr(this->custom_modes,mode) != 0); +184 } .fi .SS "void chanrec::SetCustomMode (char mode, bool mode_on)" .PP -Sets or unsets a custom mode in the channels info. Definition at line 123 of file channels.cpp. +Sets or unsets a custom mode in the channels info. Definition at line 124 of file channels.cpp. .PP References custom_modes, DEBUG, and SetCustomModeParam(). .PP .nf -124 { -125 if (mode_on) { -126 char m[3]; -127 m[0] = mode; -128 m[1] = '\0'; -129 if (!strchr(this->custom_modes,mode)) -130 { -131 strlcat(custom_modes,m,MAXMODES); -132 } -133 log(DEBUG,'Custom mode %c set',mode); -134 } -135 else { -136 -137 std::string a = this->custom_modes; -138 int pos = a.find(mode); -139 a.erase(pos,1); -140 strncpy(this->custom_modes,a.c_str(),MAXMODES); -141 -142 log(DEBUG,'Custom mode %c removed: modelist='%s'',mode,this->custom_modes); -143 this->SetCustomModeParam(mode,'',false); -144 } -145 } +125 { +126 if (mode_on) { +127 char m[3]; +128 m[0] = mode; +129 m[1] = '\0'; +130 if (!strchr(this->custom_modes,mode)) +131 { +132 strlcat(custom_modes,m,MAXMODES); +133 } +134 log(DEBUG,'Custom mode %c set',mode); +135 } +136 else { +137 +138 std::string a = this->custom_modes; +139 int pos = a.find(mode); +140 a.erase(pos,1); +141 strncpy(this->custom_modes,a.c_str(),MAXMODES); +142 +143 log(DEBUG,'Custom mode %c removed: modelist='%s'',mode,this->custom_modes); +144 this->SetCustomModeParam(mode,'',false); +145 } +146 } .fi .SS "void chanrec::SetCustomModeParam (char mode, char * parameter, bool mode_on)" .PP -Sets or unsets the parameters for a custom mode in a channels info. Definition at line 148 of file channels.cpp. +Sets or unsets the parameters for a custom mode in a channels info. Definition at line 149 of file channels.cpp. .PP References ModeParameter::channel, custom_mode_params, DEBUG, ModeParameter::mode, and ModeParameter::parameter. .PP Referenced by SetCustomMode(). .PP .nf -149 { -150 -151 log(DEBUG,'SetCustomModeParam called'); -152 ModeParameter M; -153 M.mode = mode; -154 strlcpy(M.channel,this->name,CHANMAX); -155 strlcpy(M.parameter,parameter,MAXBUF); -156 if (mode_on) -157 { -158 log(DEBUG,'Custom mode parameter %c %s added',mode,parameter); -159 custom_mode_params.push_back(M); -160 } -161 else -162 { -163 if (custom_mode_params.size()) -164 { -165 for (vector::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++) -166 { -167 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel))) -168 { -169 log(DEBUG,'Custom mode parameter %c %s removed',mode,parameter); -170 custom_mode_params.erase(i); -171 return; -172 } -173 } -174 } -175 log(DEBUG,'*** BUG *** Attempt to remove non-existent mode parameter!'); -176 } -177 } +150 { +151 +152 log(DEBUG,'SetCustomModeParam called'); +153 ModeParameter M; +154 M.mode = mode; +155 strlcpy(M.channel,this->name,CHANMAX); +156 strlcpy(M.parameter,parameter,MAXBUF); +157 if (mode_on) +158 { +159 log(DEBUG,'Custom mode parameter %c %s added',mode,parameter); +160 custom_mode_params.push_back(M); +161 } +162 else +163 { +164 if (custom_mode_params.size()) +165 { +166 for (vector::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++) +167 { +168 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel))) +169 { +170 log(DEBUG,'Custom mode parameter %c %s removed',mode,parameter); +171 custom_mode_params.erase(i); +172 return; +173 } +174 } +175 } +176 log(DEBUG,'*** BUG *** Attempt to remove non-existent mode parameter!'); +177 } +178 } .fi .SH "Member Data Documentation" .PP diff --git a/docs/man/man3/classbase.3 b/docs/man/man3/classbase.3 index a48ba4b2a..c5be3f65e 100644 --- a/docs/man/man3/classbase.3 +++ b/docs/man/man3/classbase.3 @@ -1,4 +1,4 @@ -.TH "classbase" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "classbase" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/command_t.3 b/docs/man/man3/command_t.3 index 30cc7884c..f791b6319 100644 --- a/docs/man/man3/command_t.3 +++ b/docs/man/man3/command_t.3 @@ -1,4 +1,4 @@ -.TH "command_t" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "command_t" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -39,6 +39,10 @@ Inherits \fBExtensible\fP. .RI "long \fBtotal_bytes\fP" .br .RI "\fIused by /stats m \fP" +.ti -1c +.RI "char \fBsource\fP [MAXBUF]" +.br +.RI "\fIused for resource tracking between modules \fP" .in -1c .SH "Detailed Description" .PP @@ -57,6 +61,9 @@ Handler function as in typedef. Definition at line 34 of file ctables.h. .SS "int \fBcommand_t::min_params\fP" .PP Minimum number of parameters command takes. Definition at line 40 of file ctables.h. +.SS "char \fBcommand_t::source\fP[MAXBUF]" +.PP +used for resource tracking between modules Definition at line 49 of file ctables.h. .SS "long \fBcommand_t::total_bytes\fP" .PP used by /stats m Definition at line 46 of file ctables.h. diff --git a/docs/man/man3/commands.h.3 b/docs/man/man3/commands.h.3 index 1862a08e6..d4b6aeec6 100644 --- a/docs/man/man3/commands.h.3 +++ b/docs/man/man3/commands.h.3 @@ -1,4 +1,4 @@ -.TH "commands.h" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "commands.h" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -172,6 +172,12 @@ commands.h \- .RI "void \fBhandle_server\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" .br .ti -1c +.RI "void \fBhandle_loadmodule\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c +.RI "void \fBhandle_unloadmodule\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c .RI "void \fBhandle_link_packet\fP (char *udp_msg, char *tcp_host, \fBserverrec\fP *serv)" .br .RI "\fISpecial functions for processing server to server traffic. \fP" @@ -309,6 +315,8 @@ Special functions for processing server to server traffic. .PP .SS "void handle_list (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP +.SS "void handle_loadmodule (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP .SS "void handle_lusers (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP .SS "void handle_M (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" @@ -379,6 +387,8 @@ Special functions for processing server to server traffic. .PP .SS "void handle_trace (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP +.SS "void handle_unloadmodule (char ** parameters, int pcnt, \fBuserrec\fP * user)" +.PP .SS "void handle_user (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP .SS "void handle_userhost (char ** parameters, int pcnt, \fBuserrec\fP * user)" diff --git a/docs/man/man3/connection.3 b/docs/man/man3/connection.3 index 81ec8837b..bb7c727da 100644 --- a/docs/man/man3/connection.3 +++ b/docs/man/man3/connection.3 @@ -1,4 +1,4 @@ -.TH "connection" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "connection" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/connection.h.3 b/docs/man/man3/connection.h.3 index 9e725ed53..d0d5c75f4 100644 --- a/docs/man/man3/connection.h.3 +++ b/docs/man/man3/connection.h.3 @@ -1,4 +1,4 @@ -.TH "connection.h" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "connection.h" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ctables.h.3 b/docs/man/man3/ctables.h.3 index 1d86c7691..f87098c19 100644 --- a/docs/man/man3/ctables.h.3 +++ b/docs/man/man3/ctables.h.3 @@ -1,4 +1,4 @@ -.TH "ctables.h" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "ctables.h" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/dns.h.3 b/docs/man/man3/dns.h.3 index bb90ae447..9943ef834 100644 --- a/docs/man/man3/dns.h.3 +++ b/docs/man/man3/dns.h.3 @@ -1,4 +1,4 @@ -.TH "dns.h" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "dns.h" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/dns_ip4list.3 b/docs/man/man3/dns_ip4list.3 index a6b848650..aadab66bd 100644 --- a/docs/man/man3/dns_ip4list.3 +++ b/docs/man/man3/dns_ip4list.3 @@ -1,4 +1,4 @@ -.TH "dns_ip4list" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "dns_ip4list" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ircd_connector.3 b/docs/man/man3/ircd_connector.3 index 6589a00e4..594e67b18 100644 --- a/docs/man/man3/ircd_connector.3 +++ b/docs/man/man3/ircd_connector.3 @@ -1,4 +1,4 @@ -.TH "ircd_connector" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "ircd_connector" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/message.h.3 b/docs/man/man3/message.h.3 index e9f815aeb..ea9c93645 100644 --- a/docs/man/man3/message.h.3 +++ b/docs/man/man3/message.h.3 @@ -1,4 +1,4 @@ -.TH "message.h" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "message.h" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/mode.h.3 b/docs/man/man3/mode.h.3 index b2411fc99..2a1f7dd48 100644 --- a/docs/man/man3/mode.h.3 +++ b/docs/man/man3/mode.h.3 @@ -1,4 +1,4 @@ -.TH "mode.h" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "mode.h" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/modules.cpp.3 b/docs/man/man3/modules.cpp.3 index 695648eb0..6504d9eba 100644 --- a/docs/man/man3/modules.cpp.3 +++ b/docs/man/man3/modules.cpp.3 @@ -1,4 +1,4 @@ -.TH "modules.cpp" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "modules.cpp" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -164,6 +164,9 @@ modules.cpp \- .RI "std::vector< \fBircd_module\fP * > \fBfactory\fP" .br .ti -1c +.RI "time_t \fBTIME\fP" +.br +.ti -1c .RI "int \fBLogLevel\fP" .br .ti -1c @@ -296,160 +299,160 @@ Definition at line 59 of file modules.cpp. .PP .SS "typedef nspace::hash_map, \fBInAddr_HashComp\fP> \fBaddress_cache\fP" .PP -Definition at line 173 of file modules.cpp. +Definition at line 175 of file modules.cpp. .SS "typedef nspace::hash_map, \fBStrHashComp\fP> \fBchan_hash\fP" .PP -Definition at line 172 of file modules.cpp. +Definition at line 174 of file modules.cpp. .SS "typedef std::deque<\fBcommand_t\fP> \fBcommand_table\fP" .PP -Definition at line 174 of file modules.cpp. +Definition at line 176 of file modules.cpp. .SS "typedef std::vector<\fBExtMode\fP> \fBExtModeList\fP" .PP -Definition at line 200 of file modules.cpp. +Definition at line 202 of file modules.cpp. .SS "typedef ExtModeList::iterator \fBExtModeListIter\fP" .PP -Definition at line 201 of file modules.cpp. +Definition at line 203 of file modules.cpp. .PP Referenced by ModeDefined(), ModeDefinedOff(), ModeDefinedOn(), ModeDefinedOper(), ModeIsListMode(), and ModeMakeList(). .SS "typedef nspace::hash_map, \fBStrHashComp\fP> \fBuser_hash\fP" .PP -Definition at line 171 of file modules.cpp. +Definition at line 173 of file modules.cpp. .SH "Function Documentation" .PP .SS "bool DoAddExtendedMode (char modechar, int type, bool requires_oper, int params_on, int params_off)" .PP -Definition at line 273 of file modules.cpp. +Definition at line 275 of file modules.cpp. .PP References EMode, and ModeDefined(). .PP Referenced by Server::AddExtendedListMode(), and Server::AddExtendedMode(). .PP .nf -274 { -275 if (ModeDefined(modechar,type)) { -276 return false; -277 } -278 EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off)); -279 return true; -280 } +276 { +277 if (ModeDefined(modechar,type)) { +278 return false; +279 } +280 EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off)); +281 return true; +282 } .fi .SS "std::vector<\fBircd_module\fP*> factory (255)" .PP .SS "bool ModeDefined (char modechar, int type)" .PP -Definition at line 207 of file modules.cpp. +Definition at line 209 of file modules.cpp. .PP References DEBUG, EMode, and ExtModeListIter. .PP Referenced by DoAddExtendedMode(). .PP .nf -208 { -209 log(DEBUG,'Size of extmodes vector is %d',EMode.size()); -210 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -211 { -212 if ((i->modechar == modechar) && (i->type == type)) -213 { -214 return true; -215 } -216 } -217 return false; -218 } +210 { +211 log(DEBUG,'Size of extmodes vector is %d',EMode.size()); +212 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +213 { +214 if ((i->modechar == modechar) && (i->type == type)) +215 { +216 return true; +217 } +218 } +219 return false; +220 } .fi .SS "int ModeDefinedOff (char modechar, int type)" .PP -Definition at line 260 of file modules.cpp. +Definition at line 262 of file modules.cpp. .PP References EMode, and ExtModeListIter. .PP .nf -261 { -262 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -263 { -264 if ((i->modechar == modechar) && (i->type == type)) -265 { -266 return i->params_when_off; -267 } -268 } -269 return 0; -270 } +263 { +264 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +265 { +266 if ((i->modechar == modechar) && (i->type == type)) +267 { +268 return i->params_when_off; +269 } +270 } +271 return 0; +272 } .fi .SS "int ModeDefinedOn (char modechar, int type)" .PP -Definition at line 247 of file modules.cpp. +Definition at line 249 of file modules.cpp. .PP References EMode, and ExtModeListIter. .PP .nf -248 { -249 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -250 { -251 if ((i->modechar == modechar) && (i->type == type)) -252 { -253 return i->params_when_on; -254 } -255 } -256 return 0; -257 } +250 { +251 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +252 { +253 if ((i->modechar == modechar) && (i->type == type)) +254 { +255 return i->params_when_on; +256 } +257 } +258 return 0; +259 } .fi .SS "bool ModeDefinedOper (char modechar, int type)" .PP -Definition at line 233 of file modules.cpp. +Definition at line 235 of file modules.cpp. .PP References DEBUG, EMode, and ExtModeListIter. .PP .nf -234 { -235 log(DEBUG,'Size of extmodes vector is %d',EMode.size()); -236 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -237 { -238 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true)) -239 { -240 return true; -241 } -242 } -243 return false; -244 } +236 { +237 log(DEBUG,'Size of extmodes vector is %d',EMode.size()); +238 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +239 { +240 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true)) +241 { +242 return true; +243 } +244 } +245 return false; +246 } .fi .SS "bool ModeIsListMode (char modechar, int type)" .PP -Definition at line 220 of file modules.cpp. +Definition at line 222 of file modules.cpp. .PP References DEBUG, EMode, and ExtModeListIter. .PP .nf -221 { -222 log(DEBUG,'Size of extmodes vector is %d',EMode.size()); -223 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -224 { -225 if ((i->modechar == modechar) && (i->type == type) && (i->list == true)) -226 { -227 return true; -228 } -229 } -230 return false; -231 } +223 { +224 log(DEBUG,'Size of extmodes vector is %d',EMode.size()); +225 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +226 { +227 if ((i->modechar == modechar) && (i->type == type) && (i->list == true)) +228 { +229 return true; +230 } +231 } +232 return false; +233 } .fi .SS "void ModeMakeList (char modechar)" .PP -Definition at line 283 of file modules.cpp. +Definition at line 285 of file modules.cpp. .PP References EMode, ExtModeListIter, and MT_CHANNEL. .PP Referenced by Server::AddExtendedListMode(). .PP .nf -284 { -285 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -286 { -287 if ((i->modechar == modechar) && (i->type == MT_CHANNEL)) -288 { -289 i->list = true; -290 return; -291 } -292 } -293 return; -294 } +286 { +287 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +288 { +289 if ((i->modechar == modechar) && (i->type == MT_CHANNEL)) +290 { +291 i->list = true; +292 return; +293 } +294 } +295 return; +296 } .fi .SS "std::vector<\fBModule\fP*> modules (255)" .PP @@ -457,51 +460,51 @@ Referenced by Server::AddExtendedListMode(). .PP .SS "char \fBAdminEmail\fP[MAXBUF]" .PP -Definition at line 73 of file modules.cpp. +Definition at line 75 of file modules.cpp. .SS "char \fBAdminName\fP[MAXBUF]" .PP -Definition at line 72 of file modules.cpp. +Definition at line 74 of file modules.cpp. .SS "char \fBAdminNick\fP[MAXBUF]" .PP -Definition at line 74 of file modules.cpp. +Definition at line 76 of file modules.cpp. .SS "std::vector \fBauth_cookies\fP" .PP -Definition at line 101 of file modules.cpp. +Definition at line 103 of file modules.cpp. .SS "int \fBboundPortCount\fP" .PP -Definition at line 95 of file modules.cpp. +Definition at line 97 of file modules.cpp. .SS "\fBchan_hash\fP \fBchanlist\fP" .PP -Definition at line 178 of file modules.cpp. +Definition at line 180 of file modules.cpp. .SS "\fBuser_hash\fP \fBclientlist\fP" .PP -Definition at line 177 of file modules.cpp. +Definition at line 179 of file modules.cpp. .PP Referenced by Server::GetUsers(). .SS "\fBcommand_table\fP \fBcmdlist\fP" .PP -Definition at line 180 of file modules.cpp. +Definition at line 182 of file modules.cpp. .SS "std::stringstream \fBconfig_f\fP" .PP -Definition at line 102 of file modules.cpp. +Definition at line 104 of file modules.cpp. .SS "int \fBdebugging\fP" .PP -Definition at line 83 of file modules.cpp. +Definition at line 85 of file modules.cpp. .SS "int \fBdefaultRoute\fP" .PP -Definition at line 99 of file modules.cpp. +Definition at line 101 of file modules.cpp. .SS "int \fBDieDelay\fP" .PP -Definition at line 86 of file modules.cpp. +Definition at line 88 of file modules.cpp. .SS "char \fBdiepass\fP[MAXBUF]" .PP -Definition at line 75 of file modules.cpp. +Definition at line 77 of file modules.cpp. .SS "char \fBDieValue\fP[MAXBUF]" .PP -Definition at line 81 of file modules.cpp. +Definition at line 83 of file modules.cpp. .SS "\fBExtModeList\fP \fBEMode\fP" .PP -Definition at line 204 of file modules.cpp. +Definition at line 206 of file modules.cpp. .PP Referenced by DoAddExtendedMode(), ModeDefined(), ModeDefinedOff(), ModeDefinedOn(), ModeDefinedOper(), ModeIsListMode(), and ModeMakeList(). .SS "std::vector<\fBircd_module\fP*> factory" @@ -509,88 +512,91 @@ Referenced by DoAddExtendedMode(), ModeDefined(), ModeDefinedOff(), ModeDefinedO Definition at line 66 of file modules.cpp. .SS "std::vector \fBfd_reap\fP" .PP -Definition at line 92 of file modules.cpp. +Definition at line 94 of file modules.cpp. .SS "\fBaddress_cache\fP \fBIP\fP" .PP -Definition at line 183 of file modules.cpp. +Definition at line 185 of file modules.cpp. .SS "char \fBlist\fP[MAXBUF]" .PP -Definition at line 79 of file modules.cpp. +Definition at line 81 of file modules.cpp. .SS "FILE* \fBlog_file\fP" .PP -Definition at line 106 of file modules.cpp. +Definition at line 108 of file modules.cpp. .SS "int \fBLogLevel\fP" .PP -Definition at line 68 of file modules.cpp. +Definition at line 70 of file modules.cpp. .SS "int \fBMaxWhoResults\fP" .PP -Definition at line 89 of file modules.cpp. +Definition at line 91 of file modules.cpp. .SS "\fBserverrec\fP* \fBme\fP[32]" .PP -Definition at line 104 of file modules.cpp. +Definition at line 106 of file modules.cpp. .SS "int \fBMODCOUNT\fP = -1" .PP -Definition at line 774 of file modules.cpp. +Definition at line 776 of file modules.cpp. .SS "std::vector \fBmodule_names\fP" .PP -Definition at line 93 of file modules.cpp. +Definition at line 95 of file modules.cpp. .SS "std::vector<\fBModule\fP*> modules" .PP Definition at line 65 of file modules.cpp. .SS "\fBfile_cache\fP \fBMOTD\fP" .PP -Definition at line 181 of file modules.cpp. +Definition at line 183 of file modules.cpp. .SS "char \fBmotd\fP[MAXBUF]" .PP -Definition at line 77 of file modules.cpp. +Definition at line 79 of file modules.cpp. .SS "time_t \fBnb_start\fP" .PP -Definition at line 90 of file modules.cpp. +Definition at line 92 of file modules.cpp. .SS "int \fBNetBufferSize\fP" .PP -Definition at line 88 of file modules.cpp. +Definition at line 90 of file modules.cpp. .SS "char \fBNetwork\fP[MAXBUF]" .PP -Definition at line 70 of file modules.cpp. +Definition at line 72 of file modules.cpp. .SS "int \fBportCount\fP" .PP -Definition at line 96 of file modules.cpp. +Definition at line 98 of file modules.cpp. .SS "int \fBports\fP[MAXSOCKS]" .PP -Definition at line 98 of file modules.cpp. +Definition at line 100 of file modules.cpp. .SS "char \fBPrefixQuit\fP[MAXBUF]" .PP -Definition at line 80 of file modules.cpp. +Definition at line 82 of file modules.cpp. .SS "char \fBrestartpass\fP[MAXBUF]" .PP -Definition at line 76 of file modules.cpp. +Definition at line 78 of file modules.cpp. .SS "\fBfile_cache\fP \fBRULES\fP" .PP -Definition at line 182 of file modules.cpp. +Definition at line 184 of file modules.cpp. .SS "char \fBrules\fP[MAXBUF]" .PP -Definition at line 78 of file modules.cpp. +Definition at line 80 of file modules.cpp. .SS "char \fBServerDesc\fP[MAXBUF]" .PP -Definition at line 71 of file modules.cpp. +Definition at line 73 of file modules.cpp. .SS "char \fBServerName\fP[MAXBUF]" .PP -Definition at line 69 of file modules.cpp. +Definition at line 71 of file modules.cpp. .SS "time_t \fBstartup_time\fP" .PP -Definition at line 87 of file modules.cpp. +Definition at line 89 of file modules.cpp. +.SS "time_t \fBTIME\fP" +.PP +Definition at line 68 of file modules.cpp. .SS "int \fBUDPportCount\fP" .PP -Definition at line 97 of file modules.cpp. +Definition at line 99 of file modules.cpp. .SS "\fBuser_hash\fP \fBwhowas\fP" .PP -Definition at line 179 of file modules.cpp. +Definition at line 181 of file modules.cpp. .SS "int \fBWHOWAS_MAX\fP" .PP -Definition at line 85 of file modules.cpp. +Definition at line 87 of file modules.cpp. .SS "int \fBWHOWAS_STALE\fP" .PP -Definition at line 84 of file modules.cpp. +Definition at line 86 of file modules.cpp. .SH "Author" .PP Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/man3/modules.h.3 b/docs/man/man3/modules.h.3 index 710ae58f2..6a3ccce31 100644 --- a/docs/man/man3/modules.h.3 +++ b/docs/man/man3/modules.h.3 @@ -1,4 +1,4 @@ -.TH "modules.h" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "modules.h" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -115,6 +115,18 @@ modules.h \- .RI "#define \fBAC_GENERAL_MODE\fP 8" .br .ti -1c +.RI "#define \fBVF_STATIC\fP 1" +.br +.ti -1c +.RI "#define \fBVF_VENDOR\fP 2" +.br +.ti -1c +.RI "#define \fBVF_SERVICEPROVIDER\fP 4" +.br +.ti -1c +.RI "#define \fBVF_COMMON\fP 8" +.br +.ti -1c .RI "#define \fBFOREACH_MOD\fP for (int i = 0; i <= \fBMODCOUNT\fP; i++) modules[i]->" .br .ti -1c @@ -155,7 +167,7 @@ modules.h \- .in +1c .ti -1c -.RI "void \fBcreatecommand\fP (char *cmd, handlerfunc f, char flags, int minparams)" +.RI "void \fBcreatecommand\fP (char *cmd, handlerfunc f, char flags, int minparams, char *source)" .br .ti -1c .RI "void \fBserver_mode\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" @@ -203,22 +215,22 @@ Referenced by Module::OnAccessCheck(). Definition at line 38 of file modules.h. .SS "#define CONF_FILE_NOT_FOUND 0x000200" .PP -Definition at line 667 of file modules.h. +Definition at line 677 of file modules.h. .PP Referenced by ConfigReader::ConfigReader(). .SS "#define CONF_NOT_A_NUMBER 0x000010" .PP -Definition at line 664 of file modules.h. +Definition at line 674 of file modules.h. .PP Referenced by ConfigReader::ReadInteger(). .SS "#define CONF_NOT_UNSIGNED 0x000080" .PP -Definition at line 665 of file modules.h. +Definition at line 675 of file modules.h. .PP Referenced by ConfigReader::ReadInteger(). .SS "#define CONF_VALUE_NOT_FOUND 0x000100" .PP -Definition at line 666 of file modules.h. +Definition at line 676 of file modules.h. .PP Referenced by ConfigReader::ReadFlag(), ConfigReader::ReadInteger(), and ConfigReader::ReadValue(). .SS "#define DEBUG 10" @@ -231,7 +243,7 @@ Referenced by Server::AddExtendedMode(), userrec::HasPermission(), chanrec::IsCu Definition at line 25 of file modules.h. .SS "#define FOREACH_MOD for (int i = 0; i <= \fBMODCOUNT\fP; i++) modules[i]->" .PP -Definition at line 72 of file modules.h. +Definition at line 79 of file modules.h. .SS "#define FOREACH_RESULT(x)" .PP \fBValue:\fP.nf @@ -246,7 +258,7 @@ Definition at line 72 of file modules.h. } .fi .PP -Definition at line 80 of file modules.h. +Definition at line 87 of file modules.h. .SS "#define MT_CHANNEL 1" .PP Definition at line 31 of file modules.h. @@ -271,29 +283,43 @@ Definition at line 26 of file modules.h. .SS "#define VERBOSE 20" .PP Definition at line 24 of file modules.h. +.SS "#define VF_COMMON 8" +.PP +Definition at line 56 of file modules.h. +.SS "#define VF_SERVICEPROVIDER 4" +.PP +Definition at line 55 of file modules.h. +.SS "#define VF_STATIC 1" +.PP +Definition at line 53 of file modules.h. +.SS "#define VF_VENDOR 2" +.PP +Definition at line 54 of file modules.h. +.PP +Referenced by Module::GetVersion(). .SH "Typedef Documentation" .PP .SS "typedef std::deque<\fBuserrec\fP*> \fBchanuserlist\fP" .PP -Holds a list of users in a channel. Definition at line 65 of file modules.h. +Holds a list of users in a channel. Definition at line 72 of file modules.h. .PP Referenced by Server::GetUsers(). .SS "typedef std::deque \fBfile_cache\fP" .PP -Low level definition of a \fBFileReader\fP classes file cache area. Definition at line 60 of file modules.h. +Low level definition of a \fBFileReader\fP classes file cache area. Definition at line 67 of file modules.h. .PP Referenced by FileReader::FileReader(), and FileReader::LoadFile(). .SS "typedef DLLFactory<\fBModuleFactory\fP> \fBircd_module\fP" .PP -Definition at line 832 of file modules.h. +Definition at line 842 of file modules.h. .SS "typedef \fBfile_cache\fP \fBstring_list\fP" .PP -Definition at line 61 of file modules.h. +Definition at line 68 of file modules.h. .PP Referenced by Module::OnChannelSync(), and Module::OnUserSync(). .SH "Function Documentation" .PP -.SS "void createcommand (char * cmd, handlerfunc f, char flags, int minparams)" +.SS "void createcommand (char * cmd, handlerfunc f, char flags, int minparams, char * source)" .PP Referenced by Server::AddCommand(). .SS "void server_mode (char ** parameters, int pcnt, \fBuserrec\fP * user)" diff --git a/docs/man/man3/nspace.3 b/docs/man/man3/nspace.3 index 8c2952b8c..38a8c655d 100644 --- a/docs/man/man3/nspace.3 +++ b/docs/man/man3/nspace.3 @@ -1,4 +1,4 @@ -.TH "nspace" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "nspace" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/nspace_nspace_hash_ in_addr _.3 b/docs/man/man3/nspace_nspace_hash_ in_addr _.3 index b7c3416ae..f01f2ea77 100644 --- a/docs/man/man3/nspace_nspace_hash_ in_addr _.3 +++ b/docs/man/man3/nspace_nspace_hash_ in_addr _.3 @@ -1,4 +1,4 @@ -.TH "nspace::nspace::hash< in_addr >" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "nspace::nspace::hash< in_addr >" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -20,14 +20,14 @@ nspace::nspace::hash< in_addr > \- .PP .SS "size_t nspace::hash< in_addr >::operator() (const struct in_addr & a) const\fC [inline]\fP" .PP -Definition at line 117 of file modules.cpp. +Definition at line 119 of file modules.cpp. .PP .nf -118 { -119 size_t q; -120 memcpy(&q,&a,sizeof(size_t)); -121 return q; -122 } +120 { +121 size_t q; +122 memcpy(&q,&a,sizeof(size_t)); +123 return q; +124 } .fi diff --git a/docs/man/man3/nspace_nspace_hash_ string _.3 b/docs/man/man3/nspace_nspace_hash_ string _.3 index 8b1d756c9..024bdfe5c 100644 --- a/docs/man/man3/nspace_nspace_hash_ string _.3 +++ b/docs/man/man3/nspace_nspace_hash_ string _.3 @@ -1,4 +1,4 @@ -.TH "nspace::nspace::hash< string >" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "nspace::nspace::hash< string >" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -20,16 +20,16 @@ nspace::nspace::hash< string > \- .PP .SS "size_t nspace::hash< string >::operator() (const string & s) const\fC [inline]\fP" .PP -Definition at line 130 of file modules.cpp. +Definition at line 132 of file modules.cpp. .PP .nf -131 { -132 char a[MAXBUF]; -133 static struct hash strhash; -134 strlcpy(a,s.c_str(),MAXBUF); -135 strlower(a); -136 return strhash(a); -137 } +133 { +134 char a[MAXBUF]; +135 static struct hash strhash; +136 strlcpy(a,s.c_str(),MAXBUF); +137 strlower(a); +138 return strhash(a); +139 } .fi diff --git a/docs/man/man3/packet.3 b/docs/man/man3/packet.3 index 9341780fb..d351617e7 100644 --- a/docs/man/man3/packet.3 +++ b/docs/man/man3/packet.3 @@ -1,4 +1,4 @@ -.TH "packet" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "packet" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/serverrec.3 b/docs/man/man3/serverrec.3 index 1453b9af0..5db6846d2 100644 --- a/docs/man/man3/serverrec.3 +++ b/docs/man/man3/serverrec.3 @@ -1,4 +1,4 @@ -.TH "serverrec" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "serverrec" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -82,51 +82,51 @@ A class that defines the local server or a remote server. Definition at line 30 .PP .SS "serverrec::serverrec ()" .PP -Constructor. Definition at line 24 of file servers.cpp. +Constructor. Definition at line 26 of file servers.cpp. .PP -References connection::fd, hops_away, jupiter, connection::lastping, name, nickserv, opercount, pingtime, connection::signon, sync_soon, usercount, usercount_i, and version. +References connection::fd, hops_away, jupiter, connection::lastping, name, nickserv, opercount, pingtime, connection::signon, sync_soon, TIME, usercount, usercount_i, and version. .PP .nf -25 { -26 strlcpy(name,'',256); -27 pingtime = 0; -28 lastping = time(NULL); -29 usercount_i = usercount = opercount = version = 0; -30 hops_away = 1; -31 signon = time(NULL); -32 jupiter = false; -33 fd = 0; -34 sync_soon = false; -35 strlcpy(nickserv,'',NICKMAX); -36 } +27 { +28 strlcpy(name,'',256); +29 pingtime = 0; +30 lastping = TIME; +31 usercount_i = usercount = opercount = version = 0; +32 hops_away = 1; +33 signon = TIME; +34 jupiter = false; +35 fd = 0; +36 sync_soon = false; +37 strlcpy(nickserv,'',NICKMAX); +38 } .fi .SS "serverrec::serverrec (char * n, long ver, bool jupe)" .PP -Constructor which initialises some of the main variables. Definition at line 43 of file servers.cpp. +Constructor which initialises some of the main variables. Definition at line 45 of file servers.cpp. .PP -References connection::fd, hops_away, jupiter, connection::lastping, name, nickserv, opercount, connection::signon, sync_soon, usercount, usercount_i, and version. +References connection::fd, hops_away, jupiter, connection::lastping, name, nickserv, opercount, connection::signon, sync_soon, TIME, usercount, usercount_i, and version. .PP .nf -44 { -45 strlcpy(name,n,256); -46 lastping = time(NULL); -47 usercount_i = usercount = opercount = 0; -48 version = ver; -49 hops_away = 1; -50 signon = time(NULL); -51 jupiter = jupe; -52 fd = 0; -53 sync_soon = false; -54 strlcpy(nickserv,'',NICKMAX); -55 } +46 { +47 strlcpy(name,n,256); +48 lastping = TIME; +49 usercount_i = usercount = opercount = 0; +50 version = ver; +51 hops_away = 1; +52 signon = TIME; +53 jupiter = jupe; +54 fd = 0; +55 sync_soon = false; +56 strlcpy(nickserv,'',NICKMAX); +57 } .fi .SS "serverrec::~\fBserverrec\fP ()" .PP -Destructor. Definition at line 39 of file servers.cpp. +Destructor. Definition at line 41 of file servers.cpp. .PP .nf -40 { -41 } +42 { +43 } .fi .SH "Member Data Documentation" .PP diff --git a/docs/man/man3/servers.cpp.3 b/docs/man/man3/servers.cpp.3 index bb2c03249..f975694d8 100644 --- a/docs/man/man3/servers.cpp.3 +++ b/docs/man/man3/servers.cpp.3 @@ -1,4 +1,4 @@ -.TH "servers.cpp" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "servers.cpp" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -19,6 +19,18 @@ servers.cpp \- \fC#include 'inspstring.h'\fP .br +.SS "Variables" + +.in +1c +.ti -1c +.RI "time_t \fBTIME\fP" +.br +.in -1c +.SH "Variable Documentation" +.PP +.SS "time_t \fBTIME\fP" +.PP +Definition at line 24 of file servers.cpp. .SH "Author" .PP Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/man3/servers.h.3 b/docs/man/man3/servers.h.3 index bcc9682d3..73b812f67 100644 --- a/docs/man/man3/servers.h.3 +++ b/docs/man/man3/servers.h.3 @@ -1,4 +1,4 @@ -.TH "servers.h" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "servers.h" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/std.3 b/docs/man/man3/std.3 index e6219e93d..015cc75e9 100644 --- a/docs/man/man3/std.3 +++ b/docs/man/man3/std.3 @@ -1,4 +1,4 @@ -.TH "std" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "std" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ucrec.3 b/docs/man/man3/ucrec.3 index 821b53864..97567e926 100644 --- a/docs/man/man3/ucrec.3 +++ b/docs/man/man3/ucrec.3 @@ -1,4 +1,4 @@ -.TH "ucrec" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "ucrec" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/userrec.3 b/docs/man/man3/userrec.3 index c0b101d3b..f223c145d 100644 --- a/docs/man/man3/userrec.3 +++ b/docs/man/man3/userrec.3 @@ -1,4 +1,4 @@ -.TH "userrec" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "userrec" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -120,37 +120,37 @@ Definition at line 89 of file users.h. .PP .SS "userrec::userrec ()" .PP -Definition at line 26 of file users.cpp. +Definition at line 28 of file users.cpp. .PP References awaymsg, connection::bytes_in, connection::bytes_out, ucrec::channel, chans, connection::cmds_in, connection::cmds_out, dhost, dns_done, connection::fd, flood, fullname, connection::haspassed, connection::host, ident, connection::idle_lastmsg, connection::inbuf, invites, connection::ip, connection::lastping, modes, nick, connection::nping, oper, connection::port, connection::registered, result, server, connection::signon, timeout, and ucrec::uc_modes. .PP .nf -27 { -28 // the PROPER way to do it, AVOID bzero at *ALL* costs -29 strcpy(nick,''); -30 strcpy(ip,'127.0.0.1'); -31 timeout = 0; -32 strcpy(ident,''); -33 strcpy(host,''); -34 strcpy(dhost,''); -35 strcpy(fullname,''); -36 strcpy(modes,''); -37 strcpy(inbuf,''); -38 strcpy(server,''); -39 strcpy(awaymsg,''); -40 strcpy(oper,''); -41 fd = lastping = signon = idle_lastmsg = nping = registered = 0; -42 flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0; -43 haspassed = false; -44 dns_done = false; -45 strcpy(result,''); -46 for (int i = 0; i < MAXCHANS; i++) -47 { -48 this->chans[i].channel = NULL; -49 this->chans[i].uc_modes = 0; -50 } -51 invites.clear(); -52 } +29 { +30 // the PROPER way to do it, AVOID bzero at *ALL* costs +31 strcpy(nick,''); +32 strcpy(ip,'127.0.0.1'); +33 timeout = 0; +34 strcpy(ident,''); +35 strcpy(host,''); +36 strcpy(dhost,''); +37 strcpy(fullname,''); +38 strcpy(modes,''); +39 strcpy(inbuf,''); +40 strcpy(server,''); +41 strcpy(awaymsg,''); +42 strcpy(oper,''); +43 fd = lastping = signon = idle_lastmsg = nping = registered = 0; +44 flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0; +45 haspassed = false; +46 dns_done = false; +47 strcpy(result,''); +48 for (int i = 0; i < MAXCHANS; i++) +49 { +50 this->chans[i].channel = NULL; +51 this->chans[i].uc_modes = 0; +52 } +53 invites.clear(); +54 } .fi .SS "virtual userrec::~\fBuserrec\fP ()\fC [inline, virtual]\fP" .PP @@ -163,146 +163,146 @@ Definition at line 164 of file users.h. .PP .SS "char * userrec::GetFullHost ()\fC [virtual]\fP" .PP -Returns the full displayed host of the user This member function returns the hostname of the user as seen by other users on the server, in nick!identhost form. Definition at line 56 of file users.cpp. +Returns the full displayed host of the user This member function returns the hostname of the user as seen by other users on the server, in nick!identhost form. Definition at line 58 of file users.cpp. .PP References dhost, ident, nick, and result. .PP .nf -57 { -58 snprintf(result,MAXBUF,'%s!%s@%s',nick,ident,dhost); -59 return result; -60 } +59 { +60 snprintf(result,MAXBUF,'%s!%s@%s',nick,ident,dhost); +61 return result; +62 } .fi .SS "char * userrec::GetFullRealHost ()\fC [virtual]\fP" .PP -Returns the full real host of the user This member function returns the hostname of the user as seen by other users on the server, in nick!identhost form. If any form of hostname cloaking is in operation, e.g. through a module, then this method will ignore it and return the true hostname.Definition at line 63 of file users.cpp. +Returns the full real host of the user This member function returns the hostname of the user as seen by other users on the server, in nick!identhost form. If any form of hostname cloaking is in operation, e.g. through a module, then this method will ignore it and return the true hostname.Definition at line 65 of file users.cpp. .PP References connection::host, ident, nick, and result. .PP .nf -64 { -65 snprintf(result,MAXBUF,'%s!%s@%s',nick,ident,host); -66 return result; -67 } +66 { +67 snprintf(result,MAXBUF,'%s!%s@%s',nick,ident,host); +68 return result; +69 } .fi .SS "bool userrec::HasPermission (char * command)" .PP -Returns true or false for if a user can execute a privilaged oper command. This is done by looking up their oper type from \fBuserrec::oper\fP, then referencing this to their oper classes and checking the commands they can execute.Definition at line 112 of file users.cpp. +Returns true or false for if a user can execute a privilaged oper command. This is done by looking up their oper type from \fBuserrec::oper\fP, then referencing this to their oper classes and checking the commands they can execute.Definition at line 114 of file users.cpp. .PP References config_f, and DEBUG. .PP .nf -113 { -114 char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF]; -115 char* myclass; -116 char* mycmd; -117 char* savept; -118 char* savept2; -119 -120 // are they even an oper at all? -121 if (strchr(this->modes,'o')) -122 { -123 log(DEBUG,'*** HasPermission: %s is an oper',this->nick); -124 for (int j =0; j < ConfValueEnum('type',&config_f); j++) -125 { -126 ConfValue('type','name',j,TypeName,&config_f); -127 if (!strcmp(TypeName,this->oper)) -128 { -129 log(DEBUG,'*** HasPermission: %s is an oper of type '%s'',this->nick,this->oper); -130 ConfValue('type','classes',j,Classes,&config_f); -131 char* myclass = strtok_r(Classes,' ',&savept); -132 while (myclass) -133 { -134 log(DEBUG,'*** HasPermission: checking classtype '%s'',myclass); -135 for (int k =0; k < ConfValueEnum('class',&config_f); k++) -136 { -137 ConfValue('class','name',k,ClassName,&config_f); -138 if (!strcmp(ClassName,myclass)) -139 { -140 ConfValue('class','commands',k,CommandList,&config_f); -141 log(DEBUG,'*** HasPermission: found class named %s with commands: '%s'',ClassName,CommandList); -142 -143 -144 mycmd = strtok_r(CommandList,' ',&savept2); -145 while (mycmd) -146 { -147 if (!strcasecmp(mycmd,command)) -148 { -149 log(DEBUG,'*** Command %s found, returning true',command); -150 return true; -151 } -152 mycmd = strtok_r(NULL,' ',&savept2); -153 } -154 } -155 } -156 myclass = strtok_r(NULL,' ',&savept); -157 } -158 } -159 } -160 } -161 return false; -162 } +115 { +116 char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF]; +117 char* myclass; +118 char* mycmd; +119 char* savept; +120 char* savept2; +121 +122 // are they even an oper at all? +123 if (strchr(this->modes,'o')) +124 { +125 log(DEBUG,'*** HasPermission: %s is an oper',this->nick); +126 for (int j =0; j < ConfValueEnum('type',&config_f); j++) +127 { +128 ConfValue('type','name',j,TypeName,&config_f); +129 if (!strcmp(TypeName,this->oper)) +130 { +131 log(DEBUG,'*** HasPermission: %s is an oper of type '%s'',this->nick,this->oper); +132 ConfValue('type','classes',j,Classes,&config_f); +133 char* myclass = strtok_r(Classes,' ',&savept); +134 while (myclass) +135 { +136 log(DEBUG,'*** HasPermission: checking classtype '%s'',myclass); +137 for (int k =0; k < ConfValueEnum('class',&config_f); k++) +138 { +139 ConfValue('class','name',k,ClassName,&config_f); +140 if (!strcmp(ClassName,myclass)) +141 { +142 ConfValue('class','commands',k,CommandList,&config_f); +143 log(DEBUG,'*** HasPermission: found class named %s with commands: '%s'',ClassName,CommandList); +144 +145 +146 mycmd = strtok_r(CommandList,' ',&savept2); +147 while (mycmd) +148 { +149 if (!strcasecmp(mycmd,command)) +150 { +151 log(DEBUG,'*** Command %s found, returning true',command); +152 return true; +153 } +154 mycmd = strtok_r(NULL,' ',&savept2); +155 } +156 } +157 } +158 myclass = strtok_r(NULL,' ',&savept); +159 } +160 } +161 } +162 } +163 return false; +164 } .fi .SS "void userrec::InviteTo (char * channel)\fC [virtual]\fP" .PP -Adds a channel to a users invite list (invites them to a channel). Definition at line 83 of file users.cpp. +Adds a channel to a users invite list (invites them to a channel). Definition at line 85 of file users.cpp. .PP References Invited::channel, and invites. .PP .nf -84 { -85 Invited i; -86 strlcpy(i.channel,channel,CHANMAX); -87 invites.push_back(i); -88 } +86 { +87 Invited i; +88 strlcpy(i.channel,channel,CHANMAX); +89 invites.push_back(i); +90 } .fi .SS "bool userrec::IsInvited (char * channel)\fC [virtual]\fP" .PP -Returns true if a user is invited to a channel. Definition at line 69 of file users.cpp. +Returns true if a user is invited to a channel. Definition at line 71 of file users.cpp. .PP References invites. .PP .nf -70 { -71 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) -72 { -73 if (i->channel) { -74 if (!strcasecmp(i->channel,channel)) -75 { -76 return true; -77 } -78 } -79 } -80 return false; -81 } +72 { +73 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) +74 { +75 if (i->channel) { +76 if (!strcasecmp(i->channel,channel)) +77 { +78 return true; +79 } +80 } +81 } +82 return false; +83 } .fi .SS "void userrec::RemoveInvite (char * channel)\fC [virtual]\fP" .PP -Removes a channel from a users invite list. This member function is called on successfully joining an invite only channel to which the user has previously been invited, to clear the invitation.Definition at line 90 of file users.cpp. +Removes a channel from a users invite list. This member function is called on successfully joining an invite only channel to which the user has previously been invited, to clear the invitation.Definition at line 92 of file users.cpp. .PP References DEBUG, and invites. .PP .nf -91 { -92 log(DEBUG,'Removing invites'); -93 if (channel) -94 { -95 if (invites.size()) -96 { -97 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) -98 { -99 if (i->channel) -100 { -101 if (!strcasecmp(i->channel,channel)) -102 { -103 invites.erase(i); -104 return; -105 } -106 } -107 } -108 } -109 } -110 } +93 { +94 log(DEBUG,'Removing invites'); +95 if (channel) +96 { +97 if (invites.size()) +98 { +99 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) +100 { +101 if (i->channel) +102 { +103 if (!strcasecmp(i->channel,channel)) +104 { +105 invites.erase(i); +106 return; +107 } +108 } +109 } +110 } +111 } +112 } .fi .SH "Member Data Documentation" .PP diff --git a/docs/man/man3/users.cpp.3 b/docs/man/man3/users.cpp.3 index a59c5fc6b..f33f24c81 100644 --- a/docs/man/man3/users.cpp.3 +++ b/docs/man/man3/users.cpp.3 @@ -1,4 +1,4 @@ -.TH "users.cpp" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "users.cpp" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -25,12 +25,18 @@ users.cpp \- .ti -1c .RI "std::stringstream \fBconfig_f\fP" .br +.ti -1c +.RI "time_t \fBTIME\fP" +.br .in -1c .SH "Variable Documentation" .PP .SS "std::stringstream \fBconfig_f\fP" .PP Definition at line 24 of file users.cpp. +.SS "time_t \fBTIME\fP" +.PP +Definition at line 26 of file users.cpp. .SH "Author" .PP Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/man3/users.h.3 b/docs/man/man3/users.h.3 index ab692bb35..c9c548862 100644 --- a/docs/man/man3/users.h.3 +++ b/docs/man/man3/users.h.3 @@ -1,4 +1,4 @@ -.TH "users.h" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "users.h" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/xline.h.3 b/docs/man/man3/xline.h.3 index b0cf4684b..738d84d05 100644 --- a/docs/man/man3/xline.h.3 +++ b/docs/man/man3/xline.h.3 @@ -1,4 +1,4 @@ -.TH "xline.h" 3 "4 Apr 2005" "InspIRCd" \" -*- nroff -*- +.TH "xline.h" 3 "7 Apr 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME -- cgit v1.2.3