From 4d5a17380bc71cabe544b41c7c8a26a292384f3d Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 15 May 2005 17:05:15 +0000 Subject: Added docs for hashcomp git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1396 e03df62e-2008-0410-955e-edbf42e46eb7 --- docs/man/man3/Admin.3 | 6 +- 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/Event.3 | 40 +- 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 | 33 +- 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 | 226 +-- docs/man/man3/ModuleFactory.3 | 12 +- docs/man/man3/ModuleMessage.3 | 2 +- docs/man/man3/QLine.3 | 2 +- docs/man/man3/Request.3 | 52 +- docs/man/man3/Server.3 | 769 ++++---- docs/man/man3/StrHashComp.3 | 32 +- docs/man/man3/Version.3 | 6 +- docs/man/man3/WhoWasUser.3 | 18 +- 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 | 90 +- docs/man/man3/channels.h.3 | 2 +- docs/man/man3/chanrec.3 | 216 +-- docs/man/man3/classbase.3 | 2 +- docs/man/man3/command_t.3 | 2 +- docs/man/man3/commands.h.3 | 98 +- docs/man/man3/connection.3 | 38 +- docs/man/man3/connection.h.3 | 13 +- docs/man/man3/ctables.h.3 | 2 +- docs/man/man3/dns.h.3 | 2 +- docs/man/man3/dns_ip4list.3 | 2 +- docs/man/man3/hashcomp.h.3 | 50 + docs/man/man3/irc.3 | 36 + docs/man/man3/irc_irc_char_traits.3 | 66 + docs/man/man3/ircd_connector.3 | 24 +- docs/man/man3/message.h.3 | 2 +- docs/man/man3/mode.h.3 | 2 +- docs/man/man3/modules.cpp.3 | 299 ++- docs/man/man3/modules.h.3 | 12 +- docs/man/man3/nspace.3 | 2 +- docs/man/man3/nspace_nspace_hash_ in_addr _.3 | 15 +- docs/man/man3/nspace_nspace_hash_ string _.3 | 17 +- docs/man/man3/serverrec.3 | 60 +- docs/man/man3/servers.cpp.3 | 6 +- docs/man/man3/servers.h.3 | 2 +- docs/man/man3/std.3 | 2 +- docs/man/man3/std_char_traits.3 | 15 + docs/man/man3/ucrec.3 | 2 +- docs/man/man3/userrec.3 | 475 ++--- docs/man/man3/users.cpp.3 | 8 +- docs/man/man3/users.h.3 | 4 +- docs/man/man3/xline.h.3 | 2 +- docs/module-doc/annotated.html | 10 +- docs/module-doc/base_8h-source.html | 4 +- docs/module-doc/base_8h.html | 4 +- docs/module-doc/channels_8cpp-source.html | 401 ++-- docs/module-doc/channels_8cpp.html | 183 +- docs/module-doc/channels_8cpp__incl.gif | Bin 40063 -> 37708 bytes docs/module-doc/channels_8h-source.html | 4 +- docs/module-doc/channels_8h.html | 4 +- docs/module-doc/classAdmin-members.html | 4 +- docs/module-doc/classAdmin.html | 8 +- docs/module-doc/classBanItem-members.html | 4 +- docs/module-doc/classBanItem.html | 4 +- docs/module-doc/classConfigReader-members.html | 4 +- docs/module-doc/classConfigReader.html | 322 ++-- docs/module-doc/classConnectClass-members.html | 4 +- docs/module-doc/classConnectClass.html | 4 +- docs/module-doc/classDNS-members.html | 4 +- docs/module-doc/classDNS.html | 4 +- docs/module-doc/classELine-members.html | 4 +- docs/module-doc/classELine.html | 4 +- docs/module-doc/classEvent-members.html | 4 +- docs/module-doc/classEvent.html | 48 +- docs/module-doc/classExemptItem-members.html | 4 +- docs/module-doc/classExemptItem.html | 4 +- docs/module-doc/classExtMode-members.html | 4 +- docs/module-doc/classExtMode.html | 32 +- docs/module-doc/classExtensible-members.html | 4 +- docs/module-doc/classExtensible.html | 4 +- docs/module-doc/classFileReader-members.html | 4 +- docs/module-doc/classFileReader.html | 98 +- docs/module-doc/classGLine-members.html | 4 +- docs/module-doc/classGLine.html | 4 +- docs/module-doc/classHostItem-members.html | 4 +- docs/module-doc/classHostItem.html | 4 +- docs/module-doc/classInviteItem-members.html | 4 +- docs/module-doc/classInviteItem.html | 4 +- docs/module-doc/classInvited-members.html | 4 +- docs/module-doc/classInvited.html | 6 +- docs/module-doc/classKLine-members.html | 4 +- docs/module-doc/classKLine.html | 4 +- docs/module-doc/classModeParameter-members.html | 4 +- docs/module-doc/classModeParameter.html | 10 +- docs/module-doc/classModule-members.html | 4 +- docs/module-doc/classModule.html | 234 +-- docs/module-doc/classModuleFactory-members.html | 4 +- docs/module-doc/classModuleFactory.html | 14 +- docs/module-doc/classModuleMessage-members.html | 4 +- docs/module-doc/classModuleMessage.html | 4 +- docs/module-doc/classQLine-members.html | 4 +- docs/module-doc/classQLine.html | 4 +- docs/module-doc/classRequest-members.html | 4 +- docs/module-doc/classRequest.html | 62 +- docs/module-doc/classServer-members.html | 81 +- docs/module-doc/classServer.html | 1082 +++++------ docs/module-doc/classVersion-members.html | 4 +- docs/module-doc/classVersion.html | 8 +- docs/module-doc/classWhoWasUser-members.html | 4 +- docs/module-doc/classWhoWasUser.html | 20 +- docs/module-doc/classXLine-members.html | 4 +- docs/module-doc/classXLine.html | 4 +- docs/module-doc/classZLine-members.html | 4 +- docs/module-doc/classZLine.html | 4 +- docs/module-doc/classchanrec-members.html | 4 +- docs/module-doc/classchanrec.html | 256 +-- docs/module-doc/classclassbase-members.html | 4 +- docs/module-doc/classclassbase.html | 4 +- docs/module-doc/classcommand__t-members.html | 4 +- docs/module-doc/classcommand__t.html | 4 +- docs/module-doc/classconnection-members.html | 6 +- docs/module-doc/classconnection.html | 74 +- docs/module-doc/classes.html | 30 +- docs/module-doc/classircd__connector-members.html | 4 +- docs/module-doc/classircd__connector.html | 26 +- docs/module-doc/classserverrec-members.html | 6 +- docs/module-doc/classserverrec.html | 86 +- docs/module-doc/classstd_1_1char__traits.html | 22 + .../classstd_1_1char__traits__inherit__graph.gif | Bin 0 -> 1074 bytes docs/module-doc/classucrec-members.html | 4 +- docs/module-doc/classucrec.html | 8 +- docs/module-doc/classuserrec-members.html | 7 +- docs/module-doc/classuserrec.html | 582 +++--- docs/module-doc/commands_8h-source.html | 52 +- docs/module-doc/commands_8h.html | 248 ++- docs/module-doc/connection_8h-source.html | 256 +-- docs/module-doc/connection_8h.html | 36 +- docs/module-doc/ctables_8h-source.html | 4 +- docs/module-doc/ctables_8h.html | 4 +- docs/module-doc/dns_8h-source.html | 4 +- docs/module-doc/dns_8h.html | 4 +- docs/module-doc/files.html | 5 +- docs/module-doc/functions.html | 107 +- docs/module-doc/functions_func.html | 104 +- docs/module-doc/functions_vars.html | 4 +- docs/module-doc/globals.html | 135 +- docs/module-doc/globals_defs.html | 6 +- docs/module-doc/globals_func.html | 31 +- docs/module-doc/globals_type.html | 18 +- docs/module-doc/globals_vars.html | 96 +- docs/module-doc/graph_legend.html | 4 +- docs/module-doc/hashcomp_8h-source.html | 97 + docs/module-doc/hashcomp_8h.html | 69 + docs/module-doc/hashcomp_8h__dep__incl.gif | Bin 0 -> 912 bytes docs/module-doc/hashcomp_8h__incl.gif | Bin 0 -> 1512 bytes docs/module-doc/hierarchy.html | 8 +- docs/module-doc/inherit__graph__0.gif | Bin 12716 -> 761 bytes docs/module-doc/inherit__graph__1.gif | Bin 304 -> 12716 bytes docs/module-doc/inherit__graph__2.gif | Bin 397 -> 304 bytes docs/module-doc/inherit__graph__3.gif | Bin 560 -> 397 bytes docs/module-doc/inherit__graph__4.gif | Bin 619 -> 560 bytes docs/module-doc/inherit__graph__5.gif | Bin 590 -> 619 bytes docs/module-doc/inherit__graph__6.gif | Bin 487 -> 590 bytes docs/module-doc/inherit__graph__7.gif | Bin 513 -> 487 bytes docs/module-doc/inherit__graph__8.gif | Bin 0 -> 513 bytes docs/module-doc/inherits.html | 25 +- docs/module-doc/main.html | 4 +- docs/module-doc/message_8h-source.html | 4 +- docs/module-doc/message_8h.html | 16 +- docs/module-doc/mode_8h-source.html | 4 +- docs/module-doc/mode_8h.html | 4 +- docs/module-doc/modules_8cpp-source.html | 1971 ++++++++++---------- docs/module-doc/modules_8cpp.html | 698 ++++--- docs/module-doc/modules_8cpp__incl.gif | Bin 42186 -> 40960 bytes docs/module-doc/modules_8h-source.html | 283 +-- docs/module-doc/modules_8h.html | 52 +- docs/module-doc/namespaceirc.html | 57 + docs/module-doc/namespacemembers.html | 19 + docs/module-doc/namespacemembers_type.html | 19 + docs/module-doc/namespacenspace.html | 4 +- docs/module-doc/namespaces.html | 5 +- docs/module-doc/namespacestd.html | 4 +- docs/module-doc/servers_8cpp-source.html | 77 +- docs/module-doc/servers_8cpp.html | 7 +- docs/module-doc/servers_8cpp__incl.gif | Bin 3329 -> 3785 bytes docs/module-doc/servers_8h-source.html | 4 +- docs/module-doc/servers_8h.html | 4 +- .../module-doc/structInAddr__HashComp-members.html | 6 +- docs/module-doc/structInAddr__HashComp.html | 40 +- docs/module-doc/structStrHashComp-members.html | 6 +- docs/module-doc/structStrHashComp.html | 39 +- docs/module-doc/structdns__ip4list-members.html | 4 +- docs/module-doc/structdns__ip4list.html | 4 +- .../structirc_1_1irc__char__traits-members.html | 19 + .../module-doc/structirc_1_1irc__char__traits.html | 267 +++ ...structirc_1_1irc__char__traits__coll__graph.gif | Bin 0 -> 1111 bytes ...uctirc_1_1irc__char__traits__inherit__graph.gif | Bin 0 -> 1111 bytes ..._1nspace_1_1hash_3_01in__addr_01_4-members.html | 6 +- ...nspace_1_1nspace_1_1hash_3_01in__addr_01_4.html | 23 +- ..._1_1nspace_1_1hash_3_01string_01_4-members.html | 6 +- ...ctnspace_1_1nspace_1_1hash_3_01string_01_4.html | 25 +- docs/module-doc/tree.html | 35 +- docs/module-doc/users_8cpp-source.html | 510 ++--- docs/module-doc/users_8cpp.html | 9 +- docs/module-doc/users_8cpp__incl.gif | Bin 3872 -> 4396 bytes docs/module-doc/users_8h-source.html | 35 +- docs/module-doc/users_8h.html | 8 +- docs/module-doc/xline_8h-source.html | 4 +- docs/module-doc/xline_8h.html | 24 +- 219 files changed, 6820 insertions(+), 5901 deletions(-) create mode 100644 docs/man/man3/hashcomp.h.3 create mode 100644 docs/man/man3/irc.3 create mode 100644 docs/man/man3/irc_irc_char_traits.3 create mode 100644 docs/man/man3/std_char_traits.3 create mode 100644 docs/module-doc/classstd_1_1char__traits.html create mode 100644 docs/module-doc/classstd_1_1char__traits__inherit__graph.gif create mode 100644 docs/module-doc/hashcomp_8h-source.html create mode 100644 docs/module-doc/hashcomp_8h.html create mode 100644 docs/module-doc/hashcomp_8h__dep__incl.gif create mode 100644 docs/module-doc/hashcomp_8h__incl.gif create mode 100644 docs/module-doc/inherit__graph__8.gif create mode 100644 docs/module-doc/namespaceirc.html create mode 100644 docs/module-doc/namespacemembers.html create mode 100644 docs/module-doc/namespacemembers_type.html create mode 100644 docs/module-doc/structirc_1_1irc__char__traits-members.html create mode 100644 docs/module-doc/structirc_1_1irc__char__traits.html create mode 100644 docs/module-doc/structirc_1_1irc__char__traits__coll__graph.gif create mode 100644 docs/module-doc/structirc_1_1irc__char__traits__inherit__graph.gif diff --git a/docs/man/man3/Admin.3 b/docs/man/man3/Admin.3 index 60dde5bf6..e2001754e 100644 --- a/docs/man/man3/Admin.3 +++ b/docs/man/man3/Admin.3 @@ -1,4 +1,4 @@ -.TH "Admin" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "Admin" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -43,10 +43,10 @@ Definition at line 123 of file modules.h. .PP .SS "Admin::Admin (std::string name, std::string email, std::string nick)" .PP -Definition at line 314 of file modules.cpp. +Definition at line 238 of file modules.cpp. .PP .nf -314 : Name(name), Email(email), Nick(nick) { }; +238 : Name(name), Email(email), Nick(nick) { }; .fi .SH "Member Data Documentation" .PP diff --git a/docs/man/man3/BanItem.3 b/docs/man/man3/BanItem.3 index 1d3720576..8fb296ba1 100644 --- a/docs/man/man3/BanItem.3 +++ b/docs/man/man3/BanItem.3 @@ -1,4 +1,4 @@ -.TH "BanItem" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "BanItem" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ConfigReader.3 b/docs/man/man3/ConfigReader.3 index fe2042e0c..23b16d688 100644 --- a/docs/man/man3/ConfigReader.3 +++ b/docs/man/man3/ConfigReader.3 @@ -1,4 +1,4 @@ -.TH "ConfigReader" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "ConfigReader" 3 "15 May 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 1147 of file modules.h. +Definition at line 1150 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 870 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 799 of file modules.cpp. .PP References cache, CONF_FILE_NOT_FOUND, error, errorlog, and readerror. .PP .nf -871 { -872 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); -873 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out); -874 this->readerror = LoadConf(CONFIG_FILE,this->cache,this->errorlog); -875 if (!this->readerror) -876 this->error = CONF_FILE_NOT_FOUND; -877 } +800 { +801 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); +802 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out); +803 this->readerror = LoadConf(CONFIG_FILE,this->cache,this->errorlog); +804 if (!this->readerror) +805 this->error = CONF_FILE_NOT_FOUND; +806 } .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 889 of file modules.cpp. +Overloaded constructor. This constructor initialises the ConfigReader class to read a user-specified config fileDefinition at line 818 of file modules.cpp. .PP References cache, CONF_FILE_NOT_FOUND, error, errorlog, and readerror. .PP .nf -890 { -891 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); -892 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out); -893 this->readerror = LoadConf(filename.c_str(),this->cache,this->errorlog); -894 if (!this->readerror) -895 this->error = CONF_FILE_NOT_FOUND; -896 }; +819 { +820 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); +821 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out); +822 this->readerror = LoadConf(filename.c_str(),this->cache,this->errorlog); +823 if (!this->readerror) +824 this->error = CONF_FILE_NOT_FOUND; +825 }; .fi .SS "ConfigReader::~\fBConfigReader\fP ()" .PP -Default destructor. This method destroys the ConfigReader class.Definition at line 880 of file modules.cpp. +Default destructor. This method destroys the ConfigReader class.Definition at line 809 of file modules.cpp. .PP References cache, and errorlog. .PP .nf -881 { -882 if (this->cache) -883 delete this->cache; -884 if (this->errorlog) -885 delete this->errorlog; -886 } +810 { +811 if (this->cache) +812 delete this->cache; +813 if (this->errorlog) +814 delete this->errorlog; +815 } .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 967 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 896 of file modules.cpp. .PP References errorlog, connection::fd, and userrec::nick. .PP .nf -968 { -969 if (bail) -970 { -971 printf('There were errors in your configuration:\n%s',errorlog->str().c_str()); -972 exit(0); -973 } -974 else -975 { -976 char dataline[1024]; -977 if (user) -978 { -979 WriteServ(user->fd,'NOTICE %s :There were errors in the configuration file:',user->nick); -980 while (!errorlog->eof()) -981 { -982 errorlog->getline(dataline,1024); -983 WriteServ(user->fd,'NOTICE %s :%s',user->nick,dataline); -984 } -985 } -986 else -987 { -988 WriteOpers('There were errors in the configuration file:',user->nick); -989 while (!errorlog->eof()) -990 { -991 errorlog->getline(dataline,1024); -992 WriteOpers(dataline); -993 } -994 } -995 return; -996 } -997 } +897 { +898 if (bail) +899 { +900 printf('There were errors in your configuration:\n%s',errorlog->str().c_str()); +901 exit(0); +902 } +903 else +904 { +905 char dataline[1024]; +906 if (user) +907 { +908 WriteServ(user->fd,'NOTICE %s :There were errors in the configuration file:',user->nick); +909 while (!errorlog->eof()) +910 { +911 errorlog->getline(dataline,1024); +912 WriteServ(user->fd,'NOTICE %s :%s',user->nick,dataline); +913 } +914 } +915 else +916 { +917 WriteOpers('There were errors in the configuration file:',user->nick); +918 while (!errorlog->eof()) +919 { +920 errorlog->getline(dataline,1024); +921 WriteOpers(dataline); +922 } +923 } +924 return; +925 } +926 } .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 1000 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 929 of file modules.cpp. .PP References cache. .PP .nf -1001 { -1002 return EnumConf(cache,tag.c_str()); -1003 } +930 { +931 return EnumConf(cache,tag.c_str()); +932 } .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 1005 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 934 of file modules.cpp. .PP References cache. .PP .nf -1006 { -1007 return EnumValues(cache, tag.c_str(), index); -1008 } +935 { +936 return EnumValues(cache, tag.c_str(), index); +937 } .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 960 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 889 of file modules.cpp. .PP References error. .PP .nf -961 { -962 long olderr = this->error; -963 this->error = 0; -964 return olderr; -965 } +890 { +891 long olderr = this->error; +892 this->error = 0; +893 return olderr; +894 } .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 914 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 843 of file modules.cpp. .PP References cache, CONF_VALUE_NOT_FOUND, and error. .PP .nf -915 { -916 char val[MAXBUF]; -917 char t[MAXBUF]; -918 char n[MAXBUF]; -919 strlcpy(t,tag.c_str(),MAXBUF); -920 strlcpy(n,name.c_str(),MAXBUF); -921 int res = ReadConf(cache,t,n,index,val); -922 if (!res) -923 { -924 this->error = CONF_VALUE_NOT_FOUND; -925 return false; -926 } -927 std::string s = val; -928 return ((s == 'yes') || (s == 'YES') || (s == 'true') || (s == 'TRUE') || (s == '1')); -929 } +844 { +845 char val[MAXBUF]; +846 char t[MAXBUF]; +847 char n[MAXBUF]; +848 strlcpy(t,tag.c_str(),MAXBUF); +849 strlcpy(n,name.c_str(),MAXBUF); +850 int res = ReadConf(cache,t,n,index,val); +851 if (!res) +852 { +853 this->error = CONF_VALUE_NOT_FOUND; +854 return false; +855 } +856 std::string s = val; +857 return ((s == 'yes') || (s == 'YES') || (s == 'true') || (s == 'TRUE') || (s == '1')); +858 } .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 931 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 860 of file modules.cpp. .PP References cache, CONF_NOT_A_NUMBER, CONF_NOT_UNSIGNED, CONF_VALUE_NOT_FOUND, and error. .PP .nf -932 { -933 char val[MAXBUF]; -934 char t[MAXBUF]; -935 char n[MAXBUF]; -936 strlcpy(t,tag.c_str(),MAXBUF); -937 strlcpy(n,name.c_str(),MAXBUF); -938 int res = ReadConf(cache,t,n,index,val); -939 if (!res) -940 { -941 this->error = CONF_VALUE_NOT_FOUND; -942 return 0; -943 } -944 for (int i = 0; i < strlen(val); i++) -945 { -946 if (!isdigit(val[i])) -947 { -948 this->error = CONF_NOT_A_NUMBER; -949 return 0; -950 } -951 } -952 if ((needs_unsigned) && (atoi(val)<0)) -953 { -954 this->error = CONF_NOT_UNSIGNED; -955 return 0; -956 } -957 return atoi(val); -958 } +861 { +862 char val[MAXBUF]; +863 char t[MAXBUF]; +864 char n[MAXBUF]; +865 strlcpy(t,tag.c_str(),MAXBUF); +866 strlcpy(n,name.c_str(),MAXBUF); +867 int res = ReadConf(cache,t,n,index,val); +868 if (!res) +869 { +870 this->error = CONF_VALUE_NOT_FOUND; +871 return 0; +872 } +873 for (int i = 0; i < strlen(val); i++) +874 { +875 if (!isdigit(val[i])) +876 { +877 this->error = CONF_NOT_A_NUMBER; +878 return 0; +879 } +880 } +881 if ((needs_unsigned) && (atoi(val)<0)) +882 { +883 this->error = CONF_NOT_UNSIGNED; +884 return 0; +885 } +886 return atoi(val); +887 } .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 898 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 827 of file modules.cpp. .PP References cache, CONF_VALUE_NOT_FOUND, and error. .PP .nf -899 { -900 char val[MAXBUF]; -901 char t[MAXBUF]; -902 char n[MAXBUF]; -903 strlcpy(t,tag.c_str(),MAXBUF); -904 strlcpy(n,name.c_str(),MAXBUF); -905 int res = ReadConf(cache,t,n,index,val); -906 if (!res) -907 { -908 this->error = CONF_VALUE_NOT_FOUND; -909 return ''; -910 } -911 return val; -912 } +828 { +829 char val[MAXBUF]; +830 char t[MAXBUF]; +831 char n[MAXBUF]; +832 strlcpy(t,tag.c_str(),MAXBUF); +833 strlcpy(n,name.c_str(),MAXBUF); +834 int res = ReadConf(cache,t,n,index,val); +835 if (!res) +836 { +837 this->error = CONF_VALUE_NOT_FOUND; +838 return ''; +839 } +840 return val; +841 } .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 1010 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 939 of file modules.cpp. .PP References readerror. .PP .nf -1011 { -1012 return this->readerror; -1013 } +940 { +941 return this->readerror; +942 } .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 1155 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 1158 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 1160 of file modules.h. +Definition at line 1163 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 1156 of file modules.h. +Definition at line 1159 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 1159 of file modules.h. +Used to store errors. Definition at line 1162 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 3a7c5d1f5..c71050d3c 100644 --- a/docs/man/man3/ConnectClass.3 +++ b/docs/man/man3/ConnectClass.3 @@ -1,4 +1,4 @@ -.TH "ConnectClass" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "ConnectClass" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/DNS.3 b/docs/man/man3/DNS.3 index 7af2610b6..f70f13979 100644 --- a/docs/man/man3/DNS.3 +++ b/docs/man/man3/DNS.3 @@ -1,4 +1,4 @@ -.TH "DNS" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "DNS" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ELine.3 b/docs/man/man3/ELine.3 index dd20df94f..cf223c4a7 100644 --- a/docs/man/man3/ELine.3 +++ b/docs/man/man3/ELine.3 @@ -1,4 +1,4 @@ -.TH "ELine" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "ELine" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/Event.3 b/docs/man/man3/Event.3 index dabb4c1d4..249e9bcba 100644 --- a/docs/man/man3/Event.3 +++ b/docs/man/man3/Event.3 @@ -1,4 +1,4 @@ -.TH "Event" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "Event" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -63,59 +63,59 @@ Definition at line 194 of file modules.h. .PP .SS "Event::Event (char * anydata, \fBModule\fP * src, std::string eventid)" .PP -Create a new Event. Definition at line 345 of file modules.cpp. +Create a new Event. Definition at line 269 of file modules.cpp. .PP .nf -345 : data(anydata), source(src), id(eventid) { }; +269 : data(anydata), source(src), id(eventid) { }; .fi .SH "Member Function Documentation" .PP .SS "char * Event::GetData ()" .PP -Get the Event data. Definition at line 347 of file modules.cpp. +Get the Event data. Definition at line 271 of file modules.cpp. .PP References data. .PP .nf -348 { -349 return this->data; -350 } +272 { +273 return this->data; +274 } .fi .SS "std::string Event::GetEventID ()" .PP -Get the event ID. Use this to determine the event type for safe casting of the data Definition at line 363 of file modules.cpp. +Get the event ID. Use this to determine the event type for safe casting of the data Definition at line 287 of file modules.cpp. .PP References id. .PP .nf -364 { -365 return this->id; -366 } +288 { +289 return this->id; +290 } .fi .SS "\fBModule\fP * Event::GetSource ()" .PP -Get the event Source. Definition at line 352 of file modules.cpp. +Get the event Source. Definition at line 276 of file modules.cpp. .PP References source. .PP .nf -353 { -354 return this->source; -355 } +277 { +278 return this->source; +279 } .fi .SS "char * Event::Send ()\fC [virtual]\fP" .PP Send the Event. The return result of an \fBEvent::Send()\fP will always be NULL as no replies are expected. Implements \fBModuleMessage\fP. .PP -Definition at line 357 of file modules.cpp. +Definition at line 281 of file modules.cpp. .PP References FOREACH_MOD. .PP .nf -358 { -359 FOREACH_MOD OnEvent(this); -360 return NULL; -361 } +282 { +283 FOREACH_MOD OnEvent(this); +284 return NULL; +285 } .fi .SH "Member Data Documentation" .PP diff --git a/docs/man/man3/ExemptItem.3 b/docs/man/man3/ExemptItem.3 index bd9e59b1e..b30ba6601 100644 --- a/docs/man/man3/ExemptItem.3 +++ b/docs/man/man3/ExemptItem.3 @@ -1,4 +1,4 @@ -.TH "ExemptItem" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "ExemptItem" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ExtMode.3 b/docs/man/man3/ExtMode.3 index cb5210120..353b17ce3 100644 --- a/docs/man/man3/ExtMode.3 +++ b/docs/man/man3/ExtMode.3 @@ -1,4 +1,4 @@ -.TH "ExtMode" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "ExtMode" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -41,41 +41,41 @@ Inherits \fBclassbase\fP. .PP .SS "ExtMode::ExtMode (char mc, int ty, bool oper, int p_on, int p_off)\fC [inline]\fP" .PP -Definition at line 212 of file modules.cpp. +Definition at line 136 of file modules.cpp. .PP References modechar, needsoper, params_when_off, params_when_on, and type. .PP .nf -212 : modechar(mc), type(ty), needsoper(oper), params_when_on(p_on), params_when_off(p_off) { }; +136 : 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 211 of file modules.cpp. +Definition at line 135 of file modules.cpp. .SS "char \fBExtMode::modechar\fP" .PP -Definition at line 206 of file modules.cpp. +Definition at line 130 of file modules.cpp. .PP Referenced by ExtMode(). .SS "bool \fBExtMode::needsoper\fP" .PP -Definition at line 210 of file modules.cpp. +Definition at line 134 of file modules.cpp. .PP Referenced by ExtMode(). .SS "int \fBExtMode::params_when_off\fP" .PP -Definition at line 209 of file modules.cpp. +Definition at line 133 of file modules.cpp. .PP Referenced by ExtMode(). .SS "int \fBExtMode::params_when_on\fP" .PP -Definition at line 208 of file modules.cpp. +Definition at line 132 of file modules.cpp. .PP Referenced by ExtMode(). .SS "int \fBExtMode::type\fP" .PP -Definition at line 207 of file modules.cpp. +Definition at line 131 of file modules.cpp. .PP Referenced by ExtMode(). diff --git a/docs/man/man3/Extensible.3 b/docs/man/man3/Extensible.3 index 530de1651..46a699705 100644 --- a/docs/man/man3/Extensible.3 +++ b/docs/man/man3/Extensible.3 @@ -1,4 +1,4 @@ -.TH "Extensible" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "Extensible" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/FileReader.3 b/docs/man/man3/FileReader.3 index d22ca3912..1df4ff063 100644 --- a/docs/man/man3/FileReader.3 +++ b/docs/man/man3/FileReader.3 @@ -1,4 +1,4 @@ -.TH "FileReader" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "FileReader" 3 "15 May 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 1236 of file modules.h. +Definition at line 1239 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 1023 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 952 of file modules.cpp. .PP .nf -1024 { -1025 } +953 { +954 } .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 1016 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 945 of file modules.cpp. .PP References fc, and file_cache. .PP .nf -1017 { -1018 file_cache c; -1019 readfile(c,filename.c_str()); -1020 this->fc = c; -1021 } +946 { +947 file_cache c; +948 readfile(c,filename.c_str()); +949 this->fc = c; +950 } .fi .SS "FileReader::~\fBFileReader\fP ()" .PP -Default destructor. This deletes the memory allocated to the file.Definition at line 1035 of file modules.cpp. +Default destructor. This deletes the memory allocated to the file.Definition at line 964 of file modules.cpp. .PP .nf -1036 { -1037 } +965 { +966 } .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 1039 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 968 of file modules.cpp. .PP References fc. .PP .nf -1040 { -1041 if (fc.size() == 0) -1042 { -1043 return(false); -1044 } -1045 else -1046 { -1047 return(true); -1048 } -1049 } +969 { +970 if (fc.size() == 0) +971 { +972 return(false); +973 } +974 else +975 { +976 return(true); +977 } +978 } .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 1058 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 987 of file modules.cpp. .PP References fc. .PP .nf -1059 { -1060 return fc.size(); -1061 } +988 { +989 return fc.size(); +990 } .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 1051 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 980 of file modules.cpp. .PP References fc. .PP .nf -1052 { -1053 if ((x<0) || (x>fc.size())) -1054 return ''; -1055 return fc[x]; -1056 } +981 { +982 if ((x<0) || (x>fc.size())) +983 return ''; +984 return fc[x]; +985 } .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 1027 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 956 of file modules.cpp. .PP References fc, and file_cache. .PP .nf -1028 { -1029 file_cache c; -1030 readfile(c,filename.c_str()); -1031 this->fc = c; -1032 } +957 { +958 file_cache c; +959 readfile(c,filename.c_str()); +960 this->fc = c; +961 } .fi .SH "Member Data Documentation" .PP .SS "\fBfile_cache\fP \fBFileReader::fc\fP\fC [private]\fP" .PP -Definition at line 1238 of file modules.h. +Definition at line 1241 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 720e44cf2..e781013fa 100644 --- a/docs/man/man3/GLine.3 +++ b/docs/man/man3/GLine.3 @@ -1,4 +1,4 @@ -.TH "GLine" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "GLine" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/HostItem.3 b/docs/man/man3/HostItem.3 index eeab03ac9..37b11a714 100644 --- a/docs/man/man3/HostItem.3 +++ b/docs/man/man3/HostItem.3 @@ -1,4 +1,4 @@ -.TH "HostItem" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "HostItem" 3 "15 May 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 284f16016..38bfe4075 100644 --- a/docs/man/man3/InAddr_HashComp.3 +++ b/docs/man/man3/InAddr_HashComp.3 @@ -1,36 +1,35 @@ -.TH "InAddr_HashComp" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "InAddr_HashComp" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME -InAddr_HashComp \- +InAddr_HashComp \- This class returns true if two in_addr structs match. + +.PP .SH SYNOPSIS .br .PP +\fC#include \fP +.PP .SS "Public Member Functions" .in +1c .ti -1c .RI "bool \fBoperator()\fP (const in_addr &s1, const in_addr &s2) const" .br +.RI "\fIThe operator () does the actual comparison in hash_map. \fP" .in -1c -.SH "Member Function Documentation" +.SH "Detailed Description" .PP -.SS "bool InAddr_HashComp::operator() (const in_addr & s1, const in_addr & s2) const\fC [inline]\fP" +This class returns true if two in_addr structs match. + +Checking is done by copying both into a size_t then doing a numeric comparison of the two. .PP -Definition at line 171 of file modules.cpp. +Definition at line 71 of file hashcomp.h. +.SH "Member Function Documentation" +.PP +.SS "bool InAddr_HashComp::operator() (const in_addr & s1, const in_addr & s2) const" .PP -.nf -172 { -173 size_t q; -174 size_t p; -175 -176 memcpy(&q,&s1,sizeof(size_t)); -177 memcpy(&p,&s2,sizeof(size_t)); -178 -179 return (q == p); -180 } -.fi - +The operator () does the actual comparison in hash_map. .SH "Author" .PP diff --git a/docs/man/man3/InviteItem.3 b/docs/man/man3/InviteItem.3 index 301a0d350..50608345f 100644 --- a/docs/man/man3/InviteItem.3 +++ b/docs/man/man3/InviteItem.3 @@ -1,4 +1,4 @@ -.TH "InviteItem" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "InviteItem" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/Invited.3 b/docs/man/man3/Invited.3 index 3040a4902..e09d4d9b5 100644 --- a/docs/man/man3/Invited.3 +++ b/docs/man/man3/Invited.3 @@ -1,4 +1,4 @@ -.TH "Invited" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "Invited" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/KLine.3 b/docs/man/man3/KLine.3 index 4281b3d43..ed73e3e15 100644 --- a/docs/man/man3/KLine.3 +++ b/docs/man/man3/KLine.3 @@ -1,4 +1,4 @@ -.TH "KLine" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "KLine" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ModeParameter.3 b/docs/man/man3/ModeParameter.3 index 1b6cfe6ed..2a85198db 100644 --- a/docs/man/man3/ModeParameter.3 +++ b/docs/man/man3/ModeParameter.3 @@ -1,4 +1,4 @@ -.TH "ModeParameter" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "ModeParameter" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/Module.3 b/docs/man/man3/Module.3 index 49fa49d4b..b33e933cd 100644 --- a/docs/man/man3/Module.3 +++ b/docs/man/man3/Module.3 @@ -1,4 +1,4 @@ -.TH "Module" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "Module" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -251,35 +251,35 @@ Definition at line 236 of file modules.h. .PP .SS "Module::Module ()" .PP -Default constructor creates a module class. Definition at line 370 of file modules.cpp. +Default constructor creates a module class. Definition at line 294 of file modules.cpp. .PP .nf -370 { } +294 { } .fi .SS "Module::~\fBModule\fP ()\fC [virtual]\fP" .PP -Default destructor destroys a module class. Definition at line 371 of file modules.cpp. +Default destructor destroys a module class. Definition at line 295 of file modules.cpp. .PP .nf -371 { } +295 { } .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 383 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 307 of file modules.cpp. .PP References VF_VENDOR. .PP .nf -383 { return Version(1,0,0,0,VF_VENDOR); } +307 { 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 395 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 319 of file modules.cpp. .PP .nf -395 { }; +319 { }; .fi .SS "int Module::OnAccessCheck (\fBuserrec\fP * source, \fBuserrec\fP * dest, \fBchanrec\fP * channel, int access_type)\fC [virtual]\fP" .PP @@ -307,312 +307,312 @@ Called before an action which requires a channel privilage check. This function .br .br - Upon returning from your function you must return either ACR_DEFAULT, to indicate the module wishes to do nothing, or ACR_DENY where approprate to deny the action, and ACR_ALLOW where appropriate to allow the action. Please note that in the case of some access checks (such as AC_GENERAL_MODE) access may be denied 'upstream' causing other checks such as AC_DEOP to not be reached. Be very careful with use of the AC_GENERAL_MODE type, as it may inadvertently override the behaviour of other modules. When the access_type is AC_GENERAL_MODE, the destination of the mode will be NULL (as it has not yet been determined).Definition at line 392 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 316 of file modules.cpp. .PP References ACR_DEFAULT. .PP .nf -392 { return ACR_DEFAULT; }; +316 { return ACR_DEFAULT; }; .fi .SS "int Module::OnAddBan (\fBuserrec\fP * source, \fBchanrec\fP * channel, std::string banmask)\fC [virtual]\fP" .PP -Called whenever a ban is added to a channel's list. Return a non-zero value to 'eat' the mode change and prevent the ban from being added.Definition at line 420 of file modules.cpp. +Called whenever a ban is added to a channel's list. Return a non-zero value to 'eat' the mode change and prevent the ban from being added.Definition at line 344 of file modules.cpp. .PP .nf -420 { return 0; }; +344 { return 0; }; .fi .SS "void Module::OnBackgroundTimer (time_t curtime)\fC [virtual]\fP" .PP -Called once every five seconds for background processing. This timer can be used to control timed features. Its period is not accurate enough to be used as a clock, but it is gauranteed to be called at least once in any five second period, directly from the main loop of the server.Definition at line 398 of file modules.cpp. +Called once every five seconds for background processing. This timer can be used to control timed features. Its period is not accurate enough to be used as a clock, but it is gauranteed to be called at least once in any five second period, directly from the main loop of the server.Definition at line 322 of file modules.cpp. .PP .nf -398 { }; +322 { }; .fi .SS "int Module::OnChangeLocalUserGECOS (\fBuserrec\fP * user, std::string newhost)\fC [virtual]\fP" .PP -Called whenever a change of a local users GECOS (fullname field) is attempted. return 1 to deny the name change, or 0 to allow it.Definition at line 412 of file modules.cpp. +Called whenever a change of a local users GECOS (fullname field) is attempted. return 1 to deny the name change, or 0 to allow it.Definition at line 336 of file modules.cpp. .PP .nf -412 { return 0; }; +336 { return 0; }; .fi .SS "int Module::OnChangeLocalUserHost (\fBuserrec\fP * user, std::string newhost)\fC [virtual]\fP" .PP -Called whenever a change of a local users displayed host is attempted. Return 1 to deny the host change, or 0 to allow it.Definition at line 411 of file modules.cpp. +Called whenever a change of a local users displayed host is attempted. Return 1 to deny the host change, or 0 to allow it.Definition at line 335 of file modules.cpp. .PP .nf -411 { return 0; }; +335 { return 0; }; .fi .SS "\fBstring_list\fP Module::OnChannelSync (\fBchanrec\fP * chan)\fC [virtual]\fP" .PP -Called during a netburst to sync channel data. This is called during the netburst on a per-channel basis. You should use this call to up any special channel-related things which are implemented by your module, e.g. sending listmodes. You may return multiple commands in the string_list.Definition at line 394 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 318 of file modules.cpp. .PP References string_list. .PP .nf -394 { string_list empty; return empty; } +318 { string_list empty; return empty; } .fi .SS "int Module::OnCheckBan (\fBuserrec\fP * user, \fBchanrec\fP * chan)\fC [virtual]\fP" .PP -Called whenever a user joins a channel, to determine if banlist checks should go ahead or not. This method will always be called for each join, wether or not the user actually matches a channel ban, and determines the outcome of an if statement around the whole section of ban checking code. return 1 to explicitly allow the join to go ahead or 0 to ignore the event. Definition at line 409 of file modules.cpp. +Called whenever a user joins a channel, to determine if banlist checks should go ahead or not. This method will always be called for each join, wether or not the user actually matches a channel ban, and determines the outcome of an if statement around the whole section of ban checking code. return 1 to explicitly allow the join to go ahead or 0 to ignore the event. Definition at line 333 of file modules.cpp. .PP .nf -409 { return 0; }; +333 { return 0; }; .fi .SS "int Module::OnCheckInvite (\fBuserrec\fP * user, \fBchanrec\fP * chan)\fC [virtual]\fP" .PP -Called whenever a user joins a channel, to determine if invite checks should go ahead or not. This method will always be called for each join, wether or not the channel is actually +i, and determines the outcome of an if statement around the whole section of invite checking code. return 1 to explicitly allow the join to go ahead or 0 to ignore the event.Definition at line 406 of file modules.cpp. +Called whenever a user joins a channel, to determine if invite checks should go ahead or not. This method will always be called for each join, wether or not the channel is actually +i, and determines the outcome of an if statement around the whole section of invite checking code. return 1 to explicitly allow the join to go ahead or 0 to ignore the event.Definition at line 330 of file modules.cpp. .PP .nf -406 { return 0; }; +330 { return 0; }; .fi .SS "int Module::OnCheckKey (\fBuserrec\fP * user, \fBchanrec\fP * chan, std::string keygiven)\fC [virtual]\fP" .PP -Called whenever a user joins a channel, to determine if key checks should go ahead or not. This method will always be called for each join, wether or not the channel is actually +k, and determines the outcome of an if statement around the whole section of key checking code. if the user specified no key, the keygiven string will be a valid but empty value. return 1 to explicitly allow the join to go ahead or 0 to ignore the event. Definition at line 407 of file modules.cpp. +Called whenever a user joins a channel, to determine if key checks should go ahead or not. This method will always be called for each join, wether or not the channel is actually +k, and determines the outcome of an if statement around the whole section of key checking code. if the user specified no key, the keygiven string will be a valid but empty value. return 1 to explicitly allow the join to go ahead or 0 to ignore the event. Definition at line 331 of file modules.cpp. .PP .nf -407 { return 0; }; +331 { return 0; }; .fi .SS "int Module::OnCheckLimit (\fBuserrec\fP * user, \fBchanrec\fP * chan)\fC [virtual]\fP" .PP -Called whenever a user joins a channel, to determine if channel limit checks should go ahead or not. This method will always be called for each join, wether or not the channel is actually +l, and determines the outcome of an if statement around the whole section of channel limit checking code. return 1 to explicitly allow the join to go ahead or 0 to ignore the event. Definition at line 408 of file modules.cpp. +Called whenever a user joins a channel, to determine if channel limit checks should go ahead or not. This method will always be called for each join, wether or not the channel is actually +l, and determines the outcome of an if statement around the whole section of channel limit checking code. return 1 to explicitly allow the join to go ahead or 0 to ignore the event. Definition at line 332 of file modules.cpp. .PP .nf -408 { return 0; }; +332 { return 0; }; .fi .SS "bool Module::OnCheckReady (\fBuserrec\fP * user)\fC [virtual]\fP" .PP -Called to check if a user who is connecting can now be allowed to register If any modules return false for this function, the user is held in the waiting state until all modules return true. For example a module which implements ident lookups will continue to return false for a user until their ident lookup is completed. Note that the registration timeout for a user overrides these checks, if the registration timeout is reached, the user is disconnected even if modules report that the user is not ready to connect.Definition at line 401 of file modules.cpp. +Called to check if a user who is connecting can now be allowed to register If any modules return false for this function, the user is held in the waiting state until all modules return true. For example a module which implements ident lookups will continue to return false for a user until their ident lookup is completed. Note that the registration timeout for a user overrides these checks, if the registration timeout is reached, the user is disconnected even if modules report that the user is not ready to connect.Definition at line 325 of file modules.cpp. .PP .nf -401 { return true; }; +325 { return true; }; .fi .SS "int Module::OnDelBan (\fBuserrec\fP * source, \fBchanrec\fP * channel, std::string banmask)\fC [virtual]\fP" .PP -Called whenever a ban is removed from a channel's list. Return a non-zero value to 'eat' the mode change and prevent the ban from being removed.Definition at line 421 of file modules.cpp. +Called whenever a ban is removed from a channel's list. Return a non-zero value to 'eat' the mode change and prevent the ban from being removed.Definition at line 345 of file modules.cpp. .PP .nf -421 { return 0; }; +345 { return 0; }; .fi .SS "void Module::OnEvent (\fBEvent\fP * event)\fC [virtual]\fP" .PP -Called whenever an \fBEvent\fP class is sent to all module by another module. Please see the documentation of \fBEvent::Send()\fP for further information. The \fBEvent\fP sent can always be assumed to be non-NULL, you should *always* check the value of \fBEvent::GetEventID()\fP before doing anything to the event data, and you should *not* change the event data in any way!Definition at line 415 of file modules.cpp. +Called whenever an \fBEvent\fP class is sent to all module by another module. Please see the documentation of \fBEvent::Send()\fP for further information. The \fBEvent\fP sent can always be assumed to be non-NULL, you should *always* check the value of \fBEvent::GetEventID()\fP before doing anything to the event data, and you should *not* change the event data in any way!Definition at line 339 of file modules.cpp. .PP .nf -415 { return; }; +339 { return; }; .fi .SS "int Module::OnExtendedMode (\fBuserrec\fP * user, void * target, char modechar, int type, bool mode_on, \fBstring_list\fP & params)\fC [virtual]\fP" .PP -Called whenever an extended mode is to be processed. The type parameter is MT_SERVER, MT_CLIENT or MT_CHANNEL, dependent on where the mode is being changed. mode_on is set when the mode is being set, in which case params contains a list of parameters for the mode as strings. If mode_on is false, the mode is being removed, and parameters may contain the parameters for the mode, dependent on wether they were defined when a mode handler was set up with \fBServer::AddExtendedMode\fP If the mode is a channel mode, target is a chanrec*, and if it is a user mode, target is a userrec*. You must cast this value yourself to make use of it.Definition at line 382 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 306 of file modules.cpp. .PP .nf -382 { return false; } +306 { return false; } .fi .SS "void Module::OnGlobalConnect (\fBuserrec\fP * user)\fC [virtual]\fP" .PP -Called whenever a user connects, anywhere on the network. This event is informational only. You should not change any user information in this event. To do so, use the OnUserConnect method to change the state of local users.Definition at line 419 of file modules.cpp. +Called whenever a user connects, anywhere on the network. This event is informational only. You should not change any user information in this event. To do so, use the OnUserConnect method to change the state of local users.Definition at line 343 of file modules.cpp. .PP .nf -419 { }; +343 { }; .fi .SS "void Module::OnGlobalOper (\fBuserrec\fP * user)\fC [virtual]\fP" .PP -Called whenever a user is given usermode +o, anywhere on the network. You cannot override this and prevent it from happening as it is already happened and such a task must be performed by another server. You can however bounce modes by sending servermodes out to reverse mode changes.Definition at line 418 of file modules.cpp. +Called whenever a user is given usermode +o, anywhere on the network. You cannot override this and prevent it from happening as it is already happened and such a task must be performed by another server. You can however bounce modes by sending servermodes out to reverse mode changes.Definition at line 342 of file modules.cpp. .PP .nf -418 { }; +342 { }; .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 385 of file modules.cpp. + :information hereDefinition at line 309 of file modules.cpp. .PP .nf -385 { }; +309 { }; .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 396 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 320 of file modules.cpp. .PP .nf -396 { return 0; }; +320 { 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 397 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 321 of file modules.cpp. .PP .nf -397 { }; +321 { }; .fi .SS "int Module::OnLocalTopicChange (\fBuserrec\fP * user, \fBchanrec\fP * chan, std::string topic)\fC [virtual]\fP" .PP -Called whenever a topic is changed by a local user. Return 1 to deny the topic change, or 0 to allow it.Definition at line 413 of file modules.cpp. +Called whenever a topic is changed by a local user. Return 1 to deny the topic change, or 0 to allow it.Definition at line 337 of file modules.cpp. .PP .nf -413 { return 0; }; +337 { return 0; }; .fi .SS "int Module::OnMeshToken (char token, \fBstring_list\fP params, \fBserverrec\fP * source, \fBserverrec\fP * reply, std::string tcp_host, std::string ipaddr, int port)\fC [virtual]\fP" .PP -Called whenever an unknown token is received in a server to server link. The token value is the unknown token -- please check that no other modules are using the token that you use. Returning 1 supresses the 'unknown token type' error which is usually sent to all opers with +s. The params list is a list of parameters, and if any parameters start with a colon (:) it is treated as the whole of the last parameter, identical to how RFC messages are handled. source is the sender of the message, and reply is what should be replied to for a unicast message. Note that there are not many messages in the mesh protocol which require unicast messaging. tcp_host is the server name as a string, ipaddr is its ip address in dotted decimal notation and port is the port number it is using.Definition at line 414 of file modules.cpp. +Called whenever an unknown token is received in a server to server link. The token value is the unknown token -- please check that no other modules are using the token that you use. Returning 1 supresses the 'unknown token type' error which is usually sent to all opers with +s. The params list is a list of parameters, and if any parameters start with a colon (:) it is treated as the whole of the last parameter, identical to how RFC messages are handled. source is the sender of the message, and reply is what should be replied to for a unicast message. Note that there are not many messages in the mesh protocol which require unicast messaging. tcp_host is the server name as a string, ipaddr is its ip address in dotted decimal notation and port is the port number it is using.Definition at line 338 of file modules.cpp. .PP .nf -414 { return 0; }; +338 { return 0; }; .fi .SS "void Module::OnOper (\fBuserrec\fP * user)\fC [virtual]\fP" .PP -Called whenever a user opers locally. The userrec will contain the oper mode 'o' as this function is called after any modifications are made to the user's structure by the core.Definition at line 384 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 308 of file modules.cpp. .PP .nf -384 { }; +308 { }; .fi .SS "int Module::OnOperCompare (std::string password, std::string input)\fC [virtual]\fP" .PP -Called whenever an oper password is to be compared to what a user has input. The password field (from the config file) is in 'password' and is to be compared against 'input'. This method allows for encryption of oper passwords and much more besides. You should return a nonzero value if you want to allow the comparison or zero if you wish to do nothing.Definition at line 417 of file modules.cpp. +Called whenever an oper password is to be compared to what a user has input. The password field (from the config file) is in 'password' and is to be compared against 'input'. This method allows for encryption of oper passwords and much more besides. You should return a nonzero value if you want to allow the comparison or zero if you wish to do nothing.Definition at line 341 of file modules.cpp. .PP .nf -417 { return 0; }; +341 { return 0; }; .fi .SS "void Module::OnPacketReceive (std::string & data, std::string serv)\fC [virtual]\fP" .PP -Called after a packet is received from another irc server. This allows you to easily represent it in the correct ways to implement encryption, compression, digital signatures and anything else you may want to add. This should be regarded as a pre-processor and will be called immediately after the packet is received but before any other operations with the core of the ircd.Definition at line 378 of file modules.cpp. +Called after a packet is received from another irc server. This allows you to easily represent it in the correct ways to implement encryption, compression, digital signatures and anything else you may want to add. This should be regarded as a pre-processor and will be called immediately after the packet is received but before any other operations with the core of the ircd.Definition at line 302 of file modules.cpp. .PP .nf -378 { } +302 { } .fi .SS "void Module::OnPacketTransmit (std::string & data, std::string serv)\fC [virtual]\fP" .PP -Called before a packet is transmitted across the irc network between two irc servers. This allows you to easily represent it in the correct ways to implement encryption, compression, digital signatures and anything else you may want to add. This should be regarded as a pre-processor and will be called before ANY other operations within the ircd core program.Definition at line 377 of file modules.cpp. +Called before a packet is transmitted across the irc network between two irc servers. This allows you to easily represent it in the correct ways to implement encryption, compression, digital signatures and anything else you may want to add. This should be regarded as a pre-processor and will be called before ANY other operations within the ircd core program.Definition at line 301 of file modules.cpp. .PP .nf -377 { } +301 { } .fi .SS "int Module::OnPreCommand (std::string command, char ** parameters, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP" .PP -Called whenever any command is about to be executed. This event occurs for all registered commands, wether they are registered in the core, or another module, but it will not occur for invalid commands (e.g. ones which do not exist within the command table). By returning 1 from this method you may prevent the command being executed. If you do this, no output is created by the core, and it is down to your module to produce any output neccessary. Note that unless you return 1, you should not destroy any structures (e.g. by using \fBServer::QuitUser\fP) otherwise when the command's handler function executes after your method returns, it will be passed an invalid pointer to the user object and crash!)Definition at line 400 of file modules.cpp. +Called whenever any command is about to be executed. This event occurs for all registered commands, wether they are registered in the core, or another module, but it will not occur for invalid commands (e.g. ones which do not exist within the command table). By returning 1 from this method you may prevent the command being executed. If you do this, no output is created by the core, and it is down to your module to produce any output neccessary. Note that unless you return 1, you should not destroy any structures (e.g. by using \fBServer::QuitUser\fP) otherwise when the command's handler function executes after your method returns, it will be passed an invalid pointer to the user object and crash!)Definition at line 324 of file modules.cpp. .PP .nf -400 { return 0; }; +324 { return 0; }; .fi .SS "int Module::OnRawMode (\fBuserrec\fP * user, \fBchanrec\fP * chan, char mode, std::string param, bool adding, int pcnt)\fC [virtual]\fP" .PP -Called whenever a mode character is processed. Return 1 from this function to block the mode character from being processed entirely, so that you may perform your own code instead. Note that this method allows you to override modes defined by other modes, but this is NOT RECOMMENDED!Definition at line 405 of file modules.cpp. +Called whenever a mode character is processed. Return 1 from this function to block the mode character from being processed entirely, so that you may perform your own code instead. Note that this method allows you to override modes defined by other modes, but this is NOT RECOMMENDED!Definition at line 329 of file modules.cpp. .PP .nf -405 { return 0; }; +329 { return 0; }; .fi .SS "void Module::OnRawSocketAccept (int fd, std::string ip, int localport)\fC [virtual]\fP" .PP -Called immediately after any connection is accepted. This is intended for raw socket processing (e.g. modules which wrap the tcp connection within another library) and provides no information relating to a user record as the connection has not been assigned yet. There are no return values from this call as all modules get an opportunity if required to process the connection.Definition at line 422 of file modules.cpp. +Called immediately after any connection is accepted. This is intended for raw socket processing (e.g. modules which wrap the tcp connection within another library) and provides no information relating to a user record as the connection has not been assigned yet. There are no return values from this call as all modules get an opportunity if required to process the connection.Definition at line 346 of file modules.cpp. .PP .nf -422 { }; +346 { }; .fi .SS "void Module::OnRawSocketClose (int fd)\fC [virtual]\fP" .PP -Called immediately before any socket is closed. When this event is called, shutdown() has not yet been called on the socket.Definition at line 424 of file modules.cpp. +Called immediately before any socket is closed. When this event is called, shutdown() has not yet been called on the socket.Definition at line 348 of file modules.cpp. .PP .nf -424 { }; +348 { }; .fi .SS "int Module::OnRawSocketRead (int fd, char * buffer, unsigned int count, int & readresult)\fC [virtual]\fP" .PP -Called immediately before any read() operation on a client socket in the core. This occurs AFTER the select() or poll() so there is always data waiting to be read when this event occurs. Your event should return 1 if it has handled the reading itself, which prevents the core just using read(). You should place any data read into buffer, up to but NOT GREATER THAN the value of count. The value of readresult must be identical to an actual result that might be returned from the read() system call, for example, number of bytes read upon success, 0 upon EOF or closed socket, and -1 for error. If your function returns a nonzero value, you MUST set readresult.Definition at line 425 of file modules.cpp. +Called immediately before any read() operation on a client socket in the core. This occurs AFTER the select() or poll() so there is always data waiting to be read when this event occurs. Your event should return 1 if it has handled the reading itself, which prevents the core just using read(). You should place any data read into buffer, up to but NOT GREATER THAN the value of count. The value of readresult must be identical to an actual result that might be returned from the read() system call, for example, number of bytes read upon success, 0 upon EOF or closed socket, and -1 for error. If your function returns a nonzero value, you MUST set readresult.Definition at line 349 of file modules.cpp. .PP .nf -425 { return 0; }; +349 { return 0; }; .fi .SS "int Module::OnRawSocketWrite (int fd, char * buffer, int count)\fC [virtual]\fP" .PP -Called immediately before any write() operation on a user's socket in the core. Because this event is a low level event no user information is associated with it. It is intended for use by modules which may wrap connections within another API such as SSL for example. return a non-zero result if you have handled the write operation, in which case the core will not call write().Definition at line 423 of file modules.cpp. +Called immediately before any write() operation on a user's socket in the core. Because this event is a low level event no user information is associated with it. It is intended for use by modules which may wrap connections within another API such as SSL for example. return a non-zero result if you have handled the write operation, in which case the core will not call write().Definition at line 347 of file modules.cpp. .PP .nf -423 { return 0; }; +347 { return 0; }; .fi .SS "void Module::OnRehash ()\fC [virtual]\fP" .PP -Called on rehash. This method is called prior to a /REHASH or when a SIGHUP is received from the operating system. You should use it to reload any files so that your module keeps in step with the rest of the application.Definition at line 379 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 303 of file modules.cpp. .PP .nf -379 { } +303 { } .fi .SS "char * Module::OnRequest (\fBRequest\fP * request)\fC [virtual]\fP" .PP -Called whenever a \fBRequest\fP class is sent to your module by another module. Please see the documentation of \fBRequest::Send()\fP for further information. The \fBRequest\fP sent can always be assumed to be non-NULL, you should not change the request object or its data. Your method may return arbitary data in the char* result which the requesting module may be able to use for pre-determined purposes (e.g. the results of an SQL query, etc).Definition at line 416 of file modules.cpp. +Called whenever a \fBRequest\fP class is sent to your module by another module. Please see the documentation of \fBRequest::Send()\fP for further information. The \fBRequest\fP sent can always be assumed to be non-NULL, you should not change the request object or its data. Your method may return arbitary data in the char* result which the requesting module may be able to use for pre-determined purposes (e.g. the results of an SQL query, etc).Definition at line 340 of file modules.cpp. .PP Referenced by Request::Send(). .PP .nf -416 { return NULL; }; +340 { return NULL; }; .fi .SS "void Module::OnSendList (\fBuserrec\fP * user, \fBchanrec\fP * channel, char mode)\fC [virtual]\fP" .PP -Called whenever a list is needed for a listmode. For example, when a /MODE #channel +b (without any other parameters) is called, if a module was handling +b this function would be called. The function can then output any lists it wishes to. Please note that all modules will see all mode characters to provide the ability to extend each other, so please only output a list if the mode character given matches the one(s) you want to handle.Definition at line 399 of file modules.cpp. +Called whenever a list is needed for a listmode. For example, when a /MODE #channel +b (without any other parameters) is called, if a module was handling +b this function would be called. The function can then output any lists it wishes to. Please note that all modules will see all mode characters to provide the ability to extend each other, so please only output a list if the mode character given matches the one(s) you want to handle.Definition at line 323 of file modules.cpp. .PP .nf -399 { }; +323 { }; .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 380 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 304 of file modules.cpp. .PP .nf -380 { } +304 { } .fi .SS "void Module::OnStats (char symbol)\fC [virtual]\fP" .PP -Called on all /STATS commands This method is triggered for all /STATS use, including stats symbols handled by the core. Definition at line 410 of file modules.cpp. +Called on all /STATS commands This method is triggered for all /STATS use, including stats symbols handled by the core. Definition at line 334 of file modules.cpp. .PP .nf -410 { }; +334 { }; .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 372 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 296 of file modules.cpp. .PP .nf -372 { } +296 { } .fi .SS "void Module::OnUserDisconnect (\fBuserrec\fP * user)\fC [virtual]\fP" .PP -Called whenever a user's socket is closed. The details of the exiting user are available to you in the parameter userrec *user This event is called for all users, registered or not, as a cleanup method for modules which might assign resources to user, such as dns lookups, objects and sockets.Definition at line 374 of file modules.cpp. +Called whenever a user's socket is closed. The details of the exiting user are available to you in the parameter userrec *user This event is called for all users, registered or not, as a cleanup method for modules which might assign resources to user, such as dns lookups, objects and sockets.Definition at line 298 of file modules.cpp. .PP .nf -374 { } +298 { } .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 375 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 299 of file modules.cpp. .PP .nf -375 { } +299 { } .fi .SS "void Module::OnUserKick (\fBuserrec\fP * source, \fBuserrec\fP * user, \fBchanrec\fP * chan, std::string reason)\fC [virtual]\fP" .PP -Called whenever a user is kicked. If this method is called, the kick is already underway and cannot be prevented, so to prevent a kick, please use \fBModule::OnUserPreKick\fP instead of this method.Definition at line 404 of file modules.cpp. +Called whenever a user is kicked. If this method is called, the kick is already underway and cannot be prevented, so to prevent a kick, please use \fBModule::OnUserPreKick\fP instead of this method.Definition at line 328 of file modules.cpp. .PP .nf -404 { }; +328 { }; .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 376 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 300 of file modules.cpp. .PP .nf -376 { } +300 { } .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 391 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 315 of file modules.cpp. .PP .nf -391 { }; +315 { }; .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 387 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 311 of file modules.cpp. .PP .nf -387 { return 0; }; +311 { return 0; }; .fi .SS "int Module::OnUserPreJoin (\fBuserrec\fP * user, \fBchanrec\fP * chan, const char * cname)\fC [virtual]\fP" .PP @@ -620,68 +620,68 @@ Called whenever a user is about to join a channel, before any processing is done .PP IMPORTANT NOTE! .PP -If the user joins a NEW channel which does not exist yet, OnUserPreJoin will be called BEFORE the channel record is created. This will cause chanrec* chan to be NULL. There is very little you can do in form of processing on the actual channel record at this point, however the channel NAME will still be passed in char* cname, so that you could for example implement a channel blacklist or whitelist, etc.Definition at line 381 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 305 of file modules.cpp. .PP .nf -381 { return 0; } +305 { return 0; } .fi .SS "int Module::OnUserPreKick (\fBuserrec\fP * source, \fBuserrec\fP * user, \fBchanrec\fP * chan, std::string reason)\fC [virtual]\fP" .PP -Called whenever a user is about to be kicked. Returning a value of 1 from this function stops the process immediately, causing no output to be sent to the user by the core. If you do this you must produce your own numerics, notices etc. Definition at line 403 of file modules.cpp. +Called whenever a user is about to be kicked. Returning a value of 1 from this function stops the process immediately, causing no output to be sent to the user by the core. If you do this you must produce your own numerics, notices etc. Definition at line 327 of file modules.cpp. .PP .nf -403 { return 0; }; +327 { 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 388 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 312 of file modules.cpp. .PP .nf -388 { return 0; }; +312 { 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 390 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 314 of file modules.cpp. .PP .nf -390 { return 0; }; +314 { 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 389 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 313 of file modules.cpp. .PP .nf -389 { return 0; }; +313 { return 0; }; .fi .SS "void Module::OnUserQuit (\fBuserrec\fP * user)\fC [virtual]\fP" .PP -Called when a user quits. The details of the exiting user are available to you in the parameter userrec *user This event is only called when the user is fully registered when they quit. To catch raw disconnections, use the OnUserDisconnect method.Definition at line 373 of file modules.cpp. +Called when a user quits. The details of the exiting user are available to you in the parameter userrec *user This event is only called when the user is fully registered when they quit. To catch raw disconnections, use the OnUserDisconnect method.Definition at line 297 of file modules.cpp. .PP .nf -373 { } +297 { } .fi .SS "void Module::OnUserRegister (\fBuserrec\fP * user)\fC [virtual]\fP" .PP -Called whenever a user is about to register their connection (e.g. before the user is sent the MOTD etc). Modules can use this method if they are performing a function which must be done before the actual connection is completed (e.g. ident lookups, dnsbl lookups, etc). Note that you should NOT delete the user record here by causing a disconnection! Use OnUserConnect for that instead.Definition at line 402 of file modules.cpp. +Called whenever a user is about to register their connection (e.g. before the user is sent the MOTD etc). Modules can use this method if they are performing a function which must be done before the actual connection is completed (e.g. ident lookups, dnsbl lookups, etc). Note that you should NOT delete the user record here by causing a disconnection! Use OnUserConnect for that instead.Definition at line 326 of file modules.cpp. .PP .nf -402 { }; +326 { }; .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 393 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 317 of file modules.cpp. .PP References string_list. .PP .nf -393 { string_list empty; return empty; } +317 { 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 386 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 310 of file modules.cpp. .PP .nf -386 { }; +310 { }; .fi diff --git a/docs/man/man3/ModuleFactory.3 b/docs/man/man3/ModuleFactory.3 index 2abcbcd97..be57b64c8 100644 --- a/docs/man/man3/ModuleFactory.3 +++ b/docs/man/man3/ModuleFactory.3 @@ -1,4 +1,4 @@ -.TH "ModuleFactory" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "ModuleFactory" 3 "15 May 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 1291 of file modules.h. +Definition at line 1294 of file modules.h. .SH "Constructor & Destructor Documentation" .PP .SS "ModuleFactory::ModuleFactory ()\fC [inline]\fP" .PP -Definition at line 1294 of file modules.h. +Definition at line 1297 of file modules.h. .PP .nf -1294 { } +1297 { } .fi .SS "virtual ModuleFactory::~\fBModuleFactory\fP ()\fC [inline, virtual]\fP" .PP -Definition at line 1295 of file modules.h. +Definition at line 1298 of file modules.h. .PP .nf -1295 { } +1298 { } .fi .SH "Member Function Documentation" .PP diff --git a/docs/man/man3/ModuleMessage.3 b/docs/man/man3/ModuleMessage.3 index 8f1484c69..63b7dba85 100644 --- a/docs/man/man3/ModuleMessage.3 +++ b/docs/man/man3/ModuleMessage.3 @@ -1,4 +1,4 @@ -.TH "ModuleMessage" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "ModuleMessage" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/QLine.3 b/docs/man/man3/QLine.3 index a57fa6e9d..3d9dbdc20 100644 --- a/docs/man/man3/QLine.3 +++ b/docs/man/man3/QLine.3 @@ -1,4 +1,4 @@ -.TH "QLine" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "QLine" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/Request.3 b/docs/man/man3/Request.3 index 61644568d..2f7487d15 100644 --- a/docs/man/man3/Request.3 +++ b/docs/man/man3/Request.3 @@ -1,4 +1,4 @@ -.TH "Request" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "Request" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -63,65 +63,65 @@ Definition at line 154 of file modules.h. .PP .SS "Request::Request (char * anydata, \fBModule\fP * src, \fBModule\fP * dst)" .PP -Create a new Request. Definition at line 316 of file modules.cpp. +Create a new Request. Definition at line 240 of file modules.cpp. .PP .nf -316 : data(anydata), source(src), dest(dst) { }; +240 : data(anydata), source(src), dest(dst) { }; .fi .SH "Member Function Documentation" .PP .SS "char * Request::GetData ()" .PP -Fetch the Request data. Definition at line 318 of file modules.cpp. +Fetch the Request data. Definition at line 242 of file modules.cpp. .PP References data. .PP .nf -319 { -320 return this->data; -321 } +243 { +244 return this->data; +245 } .fi .SS "\fBModule\fP * Request::GetDest ()" .PP -Fetch the request destination (should be 'this' in the receiving module). Definition at line 328 of file modules.cpp. +Fetch the request destination (should be 'this' in the receiving module). Definition at line 252 of file modules.cpp. .PP References dest. .PP .nf -329 { -330 return this->dest; -331 } +253 { +254 return this->dest; +255 } .fi .SS "\fBModule\fP * Request::GetSource ()" .PP -Fetch the request source. Definition at line 323 of file modules.cpp. +Fetch the request source. Definition at line 247 of file modules.cpp. .PP References source. .PP .nf -324 { -325 return this->source; -326 } +248 { +249 return this->source; +250 } .fi .SS "char * Request::Send ()\fC [virtual]\fP" .PP Send the Request. Upon returning the result will be arbitary data returned by the module you sent the request to. It is up to your module to know what this data is and how to deal with it. Implements \fBModuleMessage\fP. .PP -Definition at line 333 of file modules.cpp. +Definition at line 257 of file modules.cpp. .PP References dest, and Module::OnRequest(). .PP .nf -334 { -335 if (this->dest) -336 { -337 return dest->OnRequest(this); -338 } -339 else -340 { -341 return NULL; -342 } -343 } +258 { +259 if (this->dest) +260 { +261 return dest->OnRequest(this); +262 } +263 else +264 { +265 return NULL; +266 } +267 } .fi .SH "Member Data Documentation" .PP diff --git a/docs/man/man3/Server.3 b/docs/man/man3/Server.3 index d9c89aa98..93daa2cc9 100644 --- a/docs/man/man3/Server.3 +++ b/docs/man/man3/Server.3 @@ -1,4 +1,4 @@ -.TH "Server" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "Server" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -104,6 +104,10 @@ Inherits \fBclassbase\fP. .br .RI "\fIReturns the network name, global to all linked servers. \fP" .ti -1c +.RI "virtual std::string \fBGetServerDescription\fP ()" +.br +.RI "\fIReturns the server description string of the local server. \fP" +.ti -1c .RI "virtual \fBAdmin\fP \fBGetAdmin\fP ()" .br .RI "\fIReturns the information of the server as returned by the /ADMIN command. \fP" @@ -267,19 +271,19 @@ Definition at line 694 of file modules.h. .PP .SS "Server::Server ()" .PP -Default constructor. Creates a Server object.Definition at line 431 of file modules.cpp. +Default constructor. Creates a Server object.Definition at line 355 of file modules.cpp. .PP .nf -432 { -433 } +356 { +357 } .fi .SS "Server::~\fBServer\fP ()\fC [virtual]\fP" .PP -Default destructor. Destroys a Server object.Definition at line 435 of file modules.cpp. +Default destructor. Destroys a Server object.Definition at line 359 of file modules.cpp. .PP .nf -436 { -437 } +360 { +361 } .fi .SH "Member Function Documentation" .PP @@ -289,25 +293,25 @@ Adds a command to the command table. This allows modules to add extra commands i .PP typedef void (handlerfunc) (char**, int, userrec*); ... void \fBhandle_kill(char **parameters, int pcnt, userrec *user)\fP .PP -When the command is typed, the parameters will be placed into the parameters array (similar to argv) and the parameter count will be placed into pcnt (similar to argv). There will never be any less parameters than the 'minparams' value you specified when creating the command. The *user parameter is the class of the user which caused the command to trigger, who will always have the flag you specified in 'flags' when creating the initial command. For example to create an oper only command create the commands with flags='o'. The source parameter is used for resource tracking, and should contain the name of your module (with file extension) e.g. 'm_blarp.so'. If you place the wrong identifier here, you can cause crashes if your module is unloaded.Definition at line 504 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 428 of file modules.cpp. .PP References createcommand(). .PP .nf -505 { -506 createcommand(cmd,f,flags,minparams,source); -507 } +429 { +430 createcommand(cmd,f,flags,minparams,source); +431 } .fi .SS "void Server::AddELine (long duration, std::string source, std::string reason, std::string hostmask)\fC [virtual]\fP" .PP -Adds a E-line The E-line is enforced as soon as it is added. The duration must be in seconds, however you can use the \fBServer::CalcDuration\fP method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. Definition at line 750 of file modules.cpp. +Adds a E-line The E-line is enforced as soon as it is added. The duration must be in seconds, however you can use the \fBServer::CalcDuration\fP method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. Definition at line 679 of file modules.cpp. .PP References add_eline(), and duration(). .PP .nf -751 { -752 add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); -753 } +680 { +681 add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); +682 } .fi .SS "bool Server::AddExtendedListMode (char modechar)\fC [virtual]\fP" .PP @@ -321,540 +325,549 @@ Adds an extended mode letter which is parsed by a module and handled in a list f .PP (4) The mode and its parameter are NOT stored in the channels modes structure .PP -It is down to the module handling the mode to maintain state and determine what 'items' (e.g. users, or a banlist) have the mode set on them, and process the modes at the correct times, e.g. during access checks on channels, etc. When the extended mode is triggered the OnExtendedMode method will be triggered as above. Note that the target you are given will be a channel, if for example your mode is set 'on a user' (in for example +a) you must use Server::Find to locate the user the mode is operating on. Your mode handler may return 1 to handle the mode AND tell the core to display the mode change, e.g. '+aaa one two three' in the case of the mode for 'two', or it may return -1 to 'eat' the mode change, so the above example would become '+aa one three' after processing.Definition at line 667 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 596 of file modules.cpp. .PP References DoAddExtendedMode(), ModeMakeList(), and MT_CHANNEL. .PP .nf -668 { -669 bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1); -670 if (res) -671 ModeMakeList(modechar); -672 return res; -673 } +597 { +598 bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1); +599 if (res) +600 ModeMakeList(modechar); +601 return res; +602 } .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 639 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 568 of file modules.cpp. .PP References DEBUG, DoAddExtendedMode(), MT_CLIENT, and MT_SERVER. .PP .nf -640 { -641 if (((modechar >= 'A') && (modechar <= 'Z')) || ((modechar >= 'a') && (modechar <= 'z'))) -642 { -643 if (type == MT_SERVER) -644 { -645 log(DEBUG,'*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion'); -646 return false; -647 } -648 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT)) -649 { -650 log(DEBUG,'*** API ERROR *** Parameters on MT_CLIENT modes are not supported'); -651 return false; -652 } -653 if ((params_when_on>1) || (params_when_off>1)) -654 { -655 log(DEBUG,'*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported'); -656 return false; -657 } -658 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off); -659 } -660 else -661 { -662 log(DEBUG,'*** API ERROR *** Muppet modechar detected.'); -663 } -664 return false; -665 } +569 { +570 if (((modechar >= 'A') && (modechar <= 'Z')) || ((modechar >= 'a') && (modechar <= 'z'))) +571 { +572 if (type == MT_SERVER) +573 { +574 log(DEBUG,'*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion'); +575 return false; +576 } +577 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT)) +578 { +579 log(DEBUG,'*** API ERROR *** Parameters on MT_CLIENT modes are not supported'); +580 return false; +581 } +582 if ((params_when_on>1) || (params_when_off>1)) +583 { +584 log(DEBUG,'*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported'); +585 return false; +586 } +587 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off); +588 } +589 else +590 { +591 log(DEBUG,'*** API ERROR *** Muppet modechar detected.'); +592 } +593 return false; +594 } .fi .SS "void Server::AddGLine (long duration, std::string source, std::string reason, std::string hostmask)\fC [virtual]\fP" .PP -Adds a G-line The G-line is propogated to all of the servers in the mesh and enforced as soon as it is added. The duration must be in seconds, however you can use the \fBServer::CalcDuration\fP method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name.Definition at line 730 of file modules.cpp. +Adds a G-line The G-line is propogated to all of the servers in the mesh and enforced as soon as it is added. The duration must be in seconds, however you can use the \fBServer::CalcDuration\fP method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name.Definition at line 659 of file modules.cpp. .PP References add_gline(), and duration(). .PP .nf -731 { -732 add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); -733 } +660 { +661 add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); +662 } .fi .SS "void Server::AddKLine (long duration, std::string source, std::string reason, std::string hostmask)\fC [virtual]\fP" .PP -Adds a K-line The K-line is enforced as soon as it is added. The duration must be in seconds, however you can use the \fBServer::CalcDuration\fP method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. Definition at line 745 of file modules.cpp. +Adds a K-line The K-line is enforced as soon as it is added. The duration must be in seconds, however you can use the \fBServer::CalcDuration\fP method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. Definition at line 674 of file modules.cpp. .PP References add_kline(), and duration(). .PP .nf -746 { -747 add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); -748 } +675 { +676 add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); +677 } .fi .SS "void Server::AddQLine (long duration, std::string source, std::string reason, std::string nickname)\fC [virtual]\fP" .PP -Adds a Q-line The Q-line is propogated to all of the servers in the mesh and enforced as soon as it is added. The duration must be in seconds, however you can use the \fBServer::CalcDuration\fP method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. Definition at line 735 of file modules.cpp. +Adds a Q-line The Q-line is propogated to all of the servers in the mesh and enforced as soon as it is added. The duration must be in seconds, however you can use the \fBServer::CalcDuration\fP method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. Definition at line 664 of file modules.cpp. .PP References add_qline(), and duration(). .PP .nf -736 { -737 add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str()); -738 } +665 { +666 add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str()); +667 } .fi .SS "void Server::AddZLine (long duration, std::string source, std::string reason, std::string ipaddr)\fC [virtual]\fP" .PP -Adds a Z-line The Z-line is propogated to all of the servers in the mesh and enforced as soon as it is added. The duration must be in seconds, however you can use the \fBServer::CalcDuration\fP method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. Definition at line 740 of file modules.cpp. +Adds a Z-line The Z-line is propogated to all of the servers in the mesh and enforced as soon as it is added. The duration must be in seconds, however you can use the \fBServer::CalcDuration\fP method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. Definition at line 669 of file modules.cpp. .PP References add_zline(), and duration(). .PP .nf -741 { -742 add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str()); -743 } +670 { +671 add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str()); +672 } .fi .SS "long Server::CalcDuration (std::string duration)\fC [virtual]\fP" .PP -Calculates a duration This method will take a string containing a formatted duration (e.g. '1w2d') and return its value as a total number of seconds. This is the same function used internally by /GLINE etc to set the ban times.Definition at line 780 of file modules.cpp. +Calculates a duration This method will take a string containing a formatted duration (e.g. '1w2d') and return its value as a total number of seconds. This is the same function used internally by /GLINE etc to set the ban times.Definition at line 709 of file modules.cpp. .PP References duration(). .PP .nf -781 { -782 return duration(delta.c_str()); -783 } +710 { +711 return duration(delta.c_str()); +712 } .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 494 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 418 of file modules.cpp. .PP .nf -495 { -496 call_handler(commandname.c_str(),parameters,pcnt,user); -497 } +419 { +420 call_handler(commandname.c_str(),parameters,pcnt,user); +421 } .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 587 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 511 of file modules.cpp. .PP References ChangeName(). .PP .nf -588 { -589 ChangeName(user,gecos.c_str()); -590 } +512 { +513 ChangeName(user,gecos.c_str()); +514 } .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 582 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 506 of file modules.cpp. .PP References ChangeDisplayedHost(). .PP .nf -583 { -584 ChangeDisplayedHost(user,host.c_str()); -585 } +507 { +508 ChangeDisplayedHost(user,host.c_str()); +509 } .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 479 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 403 of file modules.cpp. .PP .nf -480 { -481 force_nickchange(user,nickname.c_str()); -482 } +404 { +405 force_nickchange(user,nickname.c_str()); +406 } .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 612 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 536 of file modules.cpp. .PP References cmode(). .PP .nf -613 { -614 return cmode(User,Chan); -615 } +537 { +538 return cmode(User,Chan); +539 } .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 560 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 484 of file modules.cpp. .PP References common_channels(). .PP .nf -561 { -562 return (common_channels(u1,u2) != 0); -563 } +485 { +486 return (common_channels(u1,u2) != 0); +487 } .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 675 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 604 of file modules.cpp. .PP .nf -676 { -677 return usercount(c); -678 } +605 { +606 return usercount(c); +607 } .fi .SS "bool Server::DelELine (std::string hostmask)\fC [virtual]\fP" .PP -Deletes a local E-Line. Definition at line 775 of file modules.cpp. +Deletes a local E-Line. Definition at line 704 of file modules.cpp. .PP References del_eline(). .PP .nf -776 { -777 del_eline(hostmask.c_str()); -778 } +705 { +706 del_eline(hostmask.c_str()); +707 } .fi .SS "bool Server::DelGLine (std::string hostmask)\fC [virtual]\fP" .PP -Deletes a G-Line from all servers on the mesh. Definition at line 755 of file modules.cpp. +Deletes a G-Line from all servers on the mesh. Definition at line 684 of file modules.cpp. .PP References del_gline(). .PP .nf -756 { -757 del_gline(hostmask.c_str()); -758 } +685 { +686 del_gline(hostmask.c_str()); +687 } .fi .SS "bool Server::DelKLine (std::string hostmask)\fC [virtual]\fP" .PP -Deletes a local K-Line. Definition at line 770 of file modules.cpp. +Deletes a local K-Line. Definition at line 699 of file modules.cpp. .PP References del_kline(). .PP .nf -771 { -772 del_kline(hostmask.c_str()); -773 } +700 { +701 del_kline(hostmask.c_str()); +702 } .fi .SS "bool Server::DelQLine (std::string nickname)\fC [virtual]\fP" .PP -Deletes a Q-Line from all servers on the mesh. Definition at line 760 of file modules.cpp. +Deletes a Q-Line from all servers on the mesh. Definition at line 689 of file modules.cpp. .PP References del_qline(). .PP .nf -761 { -762 del_qline(nickname.c_str()); -763 } +690 { +691 del_qline(nickname.c_str()); +692 } .fi .SS "bool Server::DelZLine (std::string ipaddr)\fC [virtual]\fP" .PP -Deletes a Z-Line from all servers on the mesh. Definition at line 765 of file modules.cpp. +Deletes a Z-Line from all servers on the mesh. Definition at line 694 of file modules.cpp. .PP References del_zline(). .PP .nf -766 { -767 del_zline(ipaddr.c_str()); -768 } +695 { +696 del_zline(ipaddr.c_str()); +697 } .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 607 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 531 of file modules.cpp. .PP .nf -608 { -609 return FindChan(channel.c_str()); -610 } +532 { +533 return FindChan(channel.c_str()); +534 } .fi .SS "\fBuserrec\fP * Server::FindDescriptor (int socket)\fC [virtual]\fP" .PP -Attempts to look up a nick using the file descriptor associated with that nick. This function will return NULL if the file descriptor is not associated with a valid user.Definition at line 602 of file modules.cpp. +Attempts to look up a nick using the file descriptor associated with that nick. This function will return NULL if the file descriptor is not associated with a valid user.Definition at line 526 of file modules.cpp. .PP References fd_ref_table. .PP .nf -603 { -604 return (socket < 65536 ? fd_ref_table[socket] : NULL); -605 } +527 { +528 return (socket < 65536 ? fd_ref_table[socket] : NULL); +529 } .fi .SS "\fBModule\fP * Server::FindModule (std::string name)\fC [virtual]\fP" .PP -This function finds a module by name. You must provide the filename of the module. If the module cannot be found (is not loaded) the function will return NULL.Definition at line 858 of file modules.cpp. +This function finds a module by name. You must provide the filename of the module. If the module cannot be found (is not loaded) the function will return NULL.Definition at line 787 of file modules.cpp. .PP References MODCOUNT, module_names, and modules. .PP .nf -859 { -860 for (int i = 0; i <= MODCOUNT; i++) -861 { -862 if (module_names[i] == name) -863 { -864 return modules[i]; -865 } -866 } -867 return NULL; -868 } +788 { +789 for (int i = 0; i <= MODCOUNT; i++) +790 { +791 if (module_names[i] == name) +792 { +793 return modules[i]; +794 } +795 } +796 return NULL; +797 } .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 597 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 521 of file modules.cpp. .PP .nf -598 { -599 return Find(nick); -600 } +522 { +523 return Find(nick); +524 } .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 632 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 561 of file modules.cpp. .PP .nf -633 { -634 return Admin(getadminname(),getadminemail(),getadminnick()); -635 } +562 { +563 return Admin(getadminname(),getadminemail(),getadminnick()); +564 } .fi .SS "std::string Server::GetNetworkName ()\fC [virtual]\fP" .PP -Returns the network name, global to all linked servers. Definition at line 627 of file modules.cpp. +Returns the network name, global to all linked servers. Definition at line 551 of file modules.cpp. +.PP +.nf +552 { +553 return getnetworkname(); +554 } +.fi +.SS "std::string Server::GetServerDescription ()\fC [virtual]\fP" +.PP +Returns the server description string of the local server. Definition at line 556 of file modules.cpp. .PP .nf -628 { -629 return getnetworkname(); -630 } +557 { +558 return getserverdesc(); +559 } .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 622 of file modules.cpp. +Returns the server name of the server where the module is loaded. Definition at line 546 of file modules.cpp. .PP .nf -623 { -624 return getservername(); -625 } +547 { +548 return getservername(); +549 } .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 467 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 391 of file modules.cpp. .PP References chanuserlist, chanrec::GetUsers(), and list. .PP .nf -468 { -469 chanuserlist userl; -470 userl.clear(); -471 std::vector *list = chan->GetUsers(); -472 for (std::vector::iterator i = list->begin(); i != list->end(); i++) -473 { -474 char* o = *i; -475 userl.push_back((userrec*)o); -476 } -477 return userl; -478 } +392 { +393 chanuserlist userl; +394 userl.clear(); +395 std::vector *list = chan->GetUsers(); +396 for (std::vector::iterator i = list->begin(); i != list->end(); i++) +397 { +398 char* o = *i; +399 userl.push_back((userrec*)o); +400 } +401 return userl; +402 } .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 592 of file modules.cpp. +Returns true if a nick is valid. Nicks for unregistered connections will return false.Definition at line 516 of file modules.cpp. .PP References isnick(). .PP .nf -593 { -594 return (isnick(nick.c_str()) != 0); -595 } +517 { +518 return (isnick(nick.c_str()) != 0); +519 } .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 617 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 541 of file modules.cpp. .PP References has_channel(). .PP .nf -618 { -619 return has_channel(User,Chan); -620 } +542 { +543 return has_channel(User,Chan); +544 } .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 489 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 413 of file modules.cpp. .PP References is_uline(). .PP .nf -490 { -491 return is_uline(server.c_str()); -492 } +414 { +415 return is_uline(server.c_str()); +416 } .fi .SS "bool Server::IsValidMask (std::string mask)\fC [virtual]\fP" .PP -Returns true if a nick!ident string is correctly formatted, false if otherwise. Definition at line 785 of file modules.cpp. +Returns true if a nick!ident string is correctly formatted, false if otherwise. Definition at line 714 of file modules.cpp. .PP .nf -786 { -787 const char* dest = mask.c_str(); -788 if (strchr(dest,'!')==0) -789 return false; -790 if (strchr(dest,'@')==0) -791 return false; -792 for (int i = 0; i < strlen(dest); i++) -793 if (dest[i] < 32) -794 return false; -795 for (int i = 0; i < strlen(dest); i++) -796 if (dest[i] > 126) -797 return false; -798 int c = 0; -799 for (int i = 0; i < strlen(dest); i++) -800 if (dest[i] == '!') -801 c++; -802 if (c>1) -803 return false; -804 c = 0; -805 for (int i = 0; i < strlen(dest); i++) -806 if (dest[i] == '@') -807 c++; -808 if (c>1) -809 return false; -810 -811 return true; -812 } +715 { +716 const char* dest = mask.c_str(); +717 if (strchr(dest,'!')==0) +718 return false; +719 if (strchr(dest,'@')==0) +720 return false; +721 for (int i = 0; i < strlen(dest); i++) +722 if (dest[i] < 32) +723 return false; +724 for (int i = 0; i < strlen(dest); i++) +725 if (dest[i] > 126) +726 return false; +727 int c = 0; +728 for (int i = 0; i < strlen(dest); i++) +729 if (dest[i] == '!') +730 c++; +731 if (c>1) +732 return false; +733 c = 0; +734 for (int i = 0; i < strlen(dest); i++) +735 if (dest[i] == '@') +736 c++; +737 if (c>1) +738 return false; +739 +740 return true; +741 } .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 457 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 381 of file modules.cpp. .PP .nf -458 { -459 return add_channel(user,cname.c_str(),key.c_str(),false); -460 } +382 { +383 return add_channel(user,cname.c_str(),key.c_str(),false); +384 } .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 499 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 423 of file modules.cpp. .PP .nf -500 { -501 log(level,'%s',s.c_str()); -502 } +424 { +425 log(level,'%s',s.c_str()); +426 } .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 444 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 368 of file modules.cpp. .PP .nf -445 { -446 char literal[MAXBUF],pattern[MAXBUF]; -447 strlcpy(literal,sliteral.c_str(),MAXBUF); -448 strlcpy(pattern,spattern.c_str(),MAXBUF); -449 return match(literal,pattern); -450 } +369 { +370 char literal[MAXBUF],pattern[MAXBUF]; +371 strlcpy(literal,sliteral.c_str(),MAXBUF); +372 strlcpy(pattern,spattern.c_str(),MAXBUF); +373 return match(literal,pattern); +374 } .fi .SS "bool Server::MeshCheckChan (\fBchanrec\fP * c, std::string servername)\fC [virtual]\fP" .PP -This function is used to check if any users on channel c are on server servername. This is used internally by PRIVMSG etc. You should not need to use it.Definition at line 840 of file modules.cpp. +This function is used to check if any users on channel c are on server servername. This is used internally by PRIVMSG etc. You should not need to use it.Definition at line 769 of file modules.cpp. .PP .nf -841 { -842 if (c) -843 { -844 return ChanAnyOnThisServer(c,(char*)servername.c_str()); -845 } -846 else return false; -847 } +770 { +771 if (c) +772 { +773 return ChanAnyOnThisServer(c,(char*)servername.c_str()); +774 } +775 else return false; +776 } .fi .SS "bool Server::MeshCheckCommon (\fBuserrec\fP * u, std::string servername)\fC [virtual]\fP" .PP -This function is used to check if user u has any channels in common with users on servername. This is used internally by \fBServer::MeshSendCommon\fP. You should very rarely need to use it.Definition at line 849 of file modules.cpp. +This function is used to check if user u has any channels in common with users on servername. This is used internally by \fBServer::MeshSendCommon\fP. You should very rarely need to use it.Definition at line 778 of file modules.cpp. .PP .nf -850 { -851 if (u) -852 { -853 return CommonOnThisServer(u,(char*)servername.c_str()); -854 } -855 else return false; -856 } +779 { +780 if (u) +781 { +782 return CommonOnThisServer(u,(char*)servername.c_str()); +783 } +784 else return false; +785 } .fi .SS "void Server::MeshSendAll (std::string text)\fC [virtual]\fP" .PP -Sends a line of text to all connected servers. If a server is not directly reachable, the core deals with routing the message, and will also deal with failures transparently.Definition at line 814 of file modules.cpp. +Sends a line of text to all connected servers. If a server is not directly reachable, the core deals with routing the message, and will also deal with failures transparently.Definition at line 743 of file modules.cpp. .PP .nf -815 { -816 NetSendToAll((char*)text.c_str()); -817 } +744 { +745 NetSendToAll((char*)text.c_str()); +746 } .fi .SS "void Server::MeshSendAllAlive (std::string text)\fC [virtual]\fP" .PP -This function is equivalent to Server::MeshSendToAll except it will only route to servers which are directly routable. Definition at line 825 of file modules.cpp. +This function is equivalent to Server::MeshSendToAll except it will only route to servers which are directly routable. Definition at line 754 of file modules.cpp. .PP .nf -826 { -827 NetSendToAllAlive((char*)text.c_str()); -828 } +755 { +756 NetSendToAllAlive((char*)text.c_str()); +757 } .fi .SS "void Server::MeshSendAllExcept (std::string target, std::string text)\fC [virtual]\fP" .PP -This function sends to all servers EXCEPT the one you specify. You should usually use this function to send messages, specifying the SENDER of your message as 'target'. This will prevent message loops.Definition at line 835 of file modules.cpp. +This function sends to all servers EXCEPT the one you specify. You should usually use this function to send messages, specifying the SENDER of your message as 'target'. This will prevent message loops.Definition at line 764 of file modules.cpp. .PP .nf -836 { -837 NetSendToAllExcept(target.c_str(),(char*)text.c_str()); -838 } +765 { +766 NetSendToAllExcept(target.c_str(),(char*)text.c_str()); +767 } .fi .SS "void Server::MeshSendCommon (\fBuserrec\fP * user, std::string text)\fC [virtual]\fP" .PP -This method sends a line of text to all servers who have users which share common channels with the user you provide. For example, if user A is on server A, and they are on channels #one and #two, and user B is on server B, and also on channel #one, but user C is on server C and on neither #one or #two, this function will cause the text to only be sent to server B. However, if server B is only reachable via C, it will route it to C (you do not have to worry about this routing, it is done transparently, but its good to know how things work!)Definition at line 819 of file modules.cpp. +This method sends a line of text to all servers who have users which share common channels with the user you provide. For example, if user A is on server A, and they are on channels #one and #two, and user B is on server B, and also on channel #one, but user C is on server C and on neither #one or #two, this function will cause the text to only be sent to server B. However, if server B is only reachable via C, it will route it to C (you do not have to worry about this routing, it is done transparently, but its good to know how things work!)Definition at line 748 of file modules.cpp. .PP .nf -820 { -821 if (user) -822 NetSendToCommon(user,(char*)text.c_str()); -823 } +749 { +750 if (user) +751 NetSendToCommon(user,(char*)text.c_str()); +752 } .fi .SS "void Server::MeshSendUnicast (std::string destination, std::string text)\fC [virtual]\fP" .PP -This function sends a line of text directly to a server. If the server is not directly routable at this time, the server attempts to route text through the mesh.Definition at line 830 of file modules.cpp. +This function sends a line of text directly to a server. If the server is not directly routable at this time, the server attempts to route text through the mesh.Definition at line 759 of file modules.cpp. .PP .nf -831 { -832 NetSendToOne((char*)destination.c_str(),(char*)text.c_str()); -833 } +760 { +761 NetSendToOne((char*)destination.c_str(),(char*)text.c_str()); +762 } .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 462 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 386 of file modules.cpp. .PP .nf -463 { -464 return del_channel(user,cname.c_str(),reason.c_str(),false); -465 } +387 { +388 return del_channel(user,cname.c_str(),reason.c_str(),false); +389 } .fi .SS "bool Server::PseudoToUser (\fBuserrec\fP * alive, \fBuserrec\fP * zombie, std::string message)\fC [virtual]\fP" .PP -This user takes one user, and switches their file descriptor with another user, so that one user 'becomes' the other. The user in 'alive' is booted off the server with the given message. The user referred to by 'zombie' should have previously been locked with Server::ZombifyUser, otherwise stale sockets and file descriptor leaks can occur. After this call, the pointer to alive will be invalid, and the pointer to zombie will be equivalent in effect to the old pointer to alive.Definition at line 700 of file modules.cpp. +This user takes one user, and switches their file descriptor with another user, so that one user 'becomes' the other. The user in 'alive' is booted off the server with the given message. The user referred to by 'zombie' should have previously been locked with Server::ZombifyUser, otherwise stale sockets and file descriptor leaks can occur. After this call, the pointer to alive will be invalid, and the pointer to zombie will be equivalent in effect to the old pointer to alive.Definition at line 629 of file modules.cpp. .PP References ucrec::channel, userrec::chans, userrec::ClearBuffer(), connection::fd, FD_MAGIC_NUMBER, fd_ref_table, connection::host, userrec::ident, chanrec::name, userrec::nick, chanrec::setby, chanrec::topic, and chanrec::topicset. .PP .nf -701 { -702 zombie->fd = alive->fd; -703 alive->fd = FD_MAGIC_NUMBER; -704 alive->ClearBuffer(); -705 Write(zombie->fd,':%s!%s@%s NICK %s',alive->nick,alive->ident,alive->host,zombie->nick); -706 kill_link(alive,message.c_str()); -707 fd_ref_table[zombie->fd] = zombie; -708 for (int i = 0; i != MAXCHANS; i++) -709 { -710 if (zombie->chans[i].channel != NULL) -711 { -712 if (zombie->chans[i].channel->name) -713 { -714 chanrec* Ptr = zombie->chans[i].channel; -715 WriteFrom(zombie->fd,zombie,'JOIN %s',Ptr->name); -716 if (Ptr->topicset) -717 { -718 WriteServ(zombie->fd,'332 %s %s :%s', zombie->nick, Ptr->name, Ptr->topic); -719 WriteServ(zombie->fd,'333 %s %s %s %d', zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset); -720 } -721 userlist(zombie,Ptr); -722 WriteServ(zombie->fd,'366 %s %s :End of /NAMES list.', zombie->nick, Ptr->name); -723 -724 } -725 } -726 } -727 -728 } +630 { +631 zombie->fd = alive->fd; +632 alive->fd = FD_MAGIC_NUMBER; +633 alive->ClearBuffer(); +634 Write(zombie->fd,':%s!%s@%s NICK %s',alive->nick,alive->ident,alive->host,zombie->nick); +635 kill_link(alive,message.c_str()); +636 fd_ref_table[zombie->fd] = zombie; +637 for (int i = 0; i != MAXCHANS; i++) +638 { +639 if (zombie->chans[i].channel != NULL) +640 { +641 if (zombie->chans[i].channel->name) +642 { +643 chanrec* Ptr = zombie->chans[i].channel; +644 WriteFrom(zombie->fd,zombie,'JOIN %s',Ptr->name); +645 if (Ptr->topicset) +646 { +647 WriteServ(zombie->fd,'332 %s %s :%s', zombie->nick, Ptr->name, Ptr->topic); +648 WriteServ(zombie->fd,'333 %s %s %s %d', zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset); +649 } +650 userlist(zombie,Ptr); +651 WriteServ(zombie->fd,'366 %s %s :End of /NAMES list.', zombie->nick, Ptr->name); +652 +653 } +654 } +655 } +656 +657 } .fi .SS "void Server::QuitUser (\fBuserrec\fP * user, std::string reason)\fC [virtual]\fP" .PP @@ -862,71 +875,71 @@ Forces a user to quit with the specified reason. To the user, it will appear as .PP WARNING! .PP -Once you call this function, userrec* user will immediately become INVALID. You MUST NOT write to, or read from this pointer after calling the QuitUser method UNDER ANY CIRCUMSTANCES! The best course of action after calling this method is to immediately bail from your handler.Definition at line 484 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 408 of file modules.cpp. .PP .nf -485 { -486 kill_link(user,reason.c_str()); -487 } +409 { +410 kill_link(user,reason.c_str()); +411 } .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 514 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 438 of file modules.cpp. .PP .nf -515 { -516 Write(Socket,'%s',s.c_str()); -517 } +439 { +440 Write(Socket,'%s',s.c_str()); +441 } .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 548 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 472 of file modules.cpp. .PP .nf -549 { -550 if (IncludeSender) -551 { -552 WriteChannel(Channel,User,'%s',s.c_str()); -553 } -554 else -555 { -556 ChanExceptSender(Channel,User,'%s',s.c_str()); -557 } -558 } +473 { +474 if (IncludeSender) +475 { +476 WriteChannel(Channel,User,'%s',s.c_str()); +477 } +478 else +479 { +480 ChanExceptSender(Channel,User,'%s',s.c_str()); +481 } +482 } .fi .SS "void Server::SendChannelServerNotice (std::string ServName, \fBchanrec\fP * Channel, std::string text)\fC [virtual]\fP" .PP -Writes text to a channel, but from a server, including all. This can be used to send server notices to a group of users.Definition at line 543 of file modules.cpp. +Writes text to a channel, but from a server, including all. This can be used to send server notices to a group of users.Definition at line 467 of file modules.cpp. .PP .nf -544 { -545 WriteChannelWithServ((char*)ServName.c_str(), Channel, '%s', text.c_str()); -546 } +468 { +469 WriteChannelWithServ((char*)ServName.c_str(), Channel, '%s', text.c_str()); +470 } .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 565 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 489 of file modules.cpp. .PP .nf -566 { -567 if (IncludeSender) -568 { -569 WriteCommon(User,'%s',text.c_str()); -570 } -571 else -572 { -573 WriteCommonExcept(User,'%s',text.c_str()); -574 } -575 } +490 { +491 if (IncludeSender) +492 { +493 WriteCommon(User,'%s',text.c_str()); +494 } +495 else +496 { +497 WriteCommonExcept(User,'%s',text.c_str()); +498 } +499 } .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 524 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 448 of file modules.cpp. .PP .nf -525 { -526 WriteFrom(Socket,User,'%s',s.c_str()); -527 } +449 { +450 WriteFrom(Socket,User,'%s',s.c_str()); +451 } .fi .SS "void Server::SendMode (char ** parameters, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP" .PP @@ -944,32 +957,32 @@ modes[2] = user->nick; .PP Srv->SendMode(modes,3,user); .PP -The modes will originate from the server where the command was issued, however responses (e.g. numerics) will be sent to the user you provide as the third parameter. You must be sure to get the number of parameters correct in the pcnt parameter otherwise you could leave your server in an unstable state!Definition at line 509 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 433 of file modules.cpp. .PP References server_mode(). .PP .nf -510 { -511 server_mode(parameters,pcnt,user); -512 } +434 { +435 server_mode(parameters,pcnt,user); +436 } .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 439 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 363 of file modules.cpp. .PP .nf -440 { -441 WriteOpers('%s',s.c_str()); -442 } +364 { +365 WriteOpers('%s',s.c_str()); +366 } .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 519 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 443 of file modules.cpp. .PP .nf -520 { -521 WriteServ(Socket,'%s',s.c_str()); -522 } +444 { +445 WriteServ(Socket,'%s',s.c_str()); +446 } .fi .SS "void Server::SendTo (\fBuserrec\fP * Source, \fBuserrec\fP * Dest, std::string s)\fC [virtual]\fP" .PP @@ -981,23 +994,23 @@ The format will become: .PP :localserver TEXT .PP -Which is useful for numerics and server notices to single users, etc.Definition at line 529 of file modules.cpp. +Which is useful for numerics and server notices to single users, etc.Definition at line 453 of file modules.cpp. .PP References connection::fd. .PP .nf -530 { -531 if (!Source) -532 { -533 // if source is NULL, then the message originates from the local server -534 Write(Dest->fd,':%s %s',this->GetServerName().c_str(),s.c_str()); -535 } -536 else -537 { -538 // otherwise it comes from the user specified -539 WriteTo(Source,Dest,'%s',s.c_str()); -540 } -541 } +454 { +455 if (!Source) +456 { +457 // if source is NULL, then the message originates from the local server +458 Write(Dest->fd,':%s %s',this->GetServerName().c_str(),s.c_str()); +459 } +460 else +461 { +462 // otherwise it comes from the user specified +463 WriteTo(Source,Dest,'%s',s.c_str()); +464 } +465 } .fi .SS "void Server::SendToModeMask (std::string modes, int flags, std::string text)\fC [virtual]\fP" .PP @@ -1005,46 +1018,46 @@ 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 452 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 376 of file modules.cpp. .PP .nf -453 { -454 WriteMode(modes.c_str(),flags,'%s',text.c_str()); -455 } +377 { +378 WriteMode(modes.c_str(),flags,'%s',text.c_str()); +379 } .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 577 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 501 of file modules.cpp. .PP .nf -578 { -579 WriteWallOps(User,false,'%s',text.c_str()); -580 } +502 { +503 WriteWallOps(User,false,'%s',text.c_str()); +504 } .fi .SS "bool Server::UserToPseudo (\fBuserrec\fP * user, std::string message)\fC [virtual]\fP" .PP -Remove a user's connection to the irc server, but leave their client in existence in the user hash. When you call this function, the user's file descriptor will be replaced with the value of FD_MAGIC_NUMBER and their old file descriptor will be closed. This idle client will remain until it is restored with a valid file descriptor, or is removed from IRC by an operator After this call, the pointer to user will be invalid.Definition at line 681 of file modules.cpp. +Remove a user's connection to the irc server, but leave their client in existence in the user hash. When you call this function, the user's file descriptor will be replaced with the value of FD_MAGIC_NUMBER and their old file descriptor will be closed. This idle client will remain until it is restored with a valid file descriptor, or is removed from IRC by an operator After this call, the pointer to user will be invalid.Definition at line 610 of file modules.cpp. .PP References userrec::ClearBuffer(), DEBUG, connection::fd, FD_MAGIC_NUMBER, connection::host, and userrec::ident. .PP .nf -682 { -683 unsigned int old_fd = user->fd; -684 user->fd = FD_MAGIC_NUMBER; -685 user->ClearBuffer(); -686 Write(old_fd,'ERROR :Closing link (%s@%s) [%s]',user->ident,user->host,message.c_str()); -687 #ifdef USE_KQUEUE -688 struct kevent ke; -689 EV_SET(&ke, old_fd, EVFILT_READ, EV_DELETE, 0, 0, NULL); -690 int i = kevent(kq, &ke, 1, 0, 0, NULL); -691 if (i == -1) -692 { -693 log(DEBUG,'kqueue: Failed to remove user from queue!'); -694 } -695 #endif -696 shutdown(old_fd,2); -697 close(old_fd); -698 } +611 { +612 unsigned int old_fd = user->fd; +613 user->fd = FD_MAGIC_NUMBER; +614 user->ClearBuffer(); +615 Write(old_fd,'ERROR :Closing link (%s@%s) [%s]',user->ident,user->host,message.c_str()); +616 #ifdef USE_KQUEUE +617 struct kevent ke; +618 EV_SET(&ke, old_fd, EVFILT_READ, EV_DELETE, 0, 0, NULL); +619 int i = kevent(kq, &ke, 1, 0, 0, NULL); +620 if (i == -1) +621 { +622 log(DEBUG,'kqueue: Failed to remove user from queue!'); +623 } +624 #endif +625 shutdown(old_fd,2); +626 close(old_fd); +627 } .fi diff --git a/docs/man/man3/StrHashComp.3 b/docs/man/man3/StrHashComp.3 index 24b2ebb81..bff4dec00 100644 --- a/docs/man/man3/StrHashComp.3 +++ b/docs/man/man3/StrHashComp.3 @@ -1,35 +1,35 @@ -.TH "StrHashComp" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "StrHashComp" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME -StrHashComp \- +StrHashComp \- This class returns true if two strings match. + +.PP .SH SYNOPSIS .br .PP +\fC#include \fP +.PP .SS "Public Member Functions" .in +1c .ti -1c .RI "bool \fBoperator()\fP (const string &s1, const string &s2) const" .br +.RI "\fIThe operator () does the actual comparison in hash_map. \fP" .in -1c -.SH "Member Function Documentation" +.SH "Detailed Description" .PP -.SS "bool StrHashComp::operator() (const string & s1, const string & s2) const\fC [inline]\fP" +This class returns true if two strings match. + +Case sensitivity is ignored, and the RFC 'character set' is adhered to .PP -Definition at line 156 of file modules.cpp. +Definition at line 60 of file hashcomp.h. +.SH "Member Function Documentation" +.PP +.SS "bool StrHashComp::operator() (const string & s1, const string & s2) const" .PP -.nf -157 { -158 char a[MAXBUF],b[MAXBUF]; -159 strlcpy(a,s1.c_str(),MAXBUF); -160 strlcpy(b,s2.c_str(),MAXBUF); -161 strlower(a); -162 strlower(b); -163 return (strcasecmp(a,b) == 0); -164 } -.fi - +The operator () does the actual comparison in hash_map. .SH "Author" .PP diff --git a/docs/man/man3/Version.3 b/docs/man/man3/Version.3 index f755c1cfb..b553e9e20 100644 --- a/docs/man/man3/Version.3 +++ b/docs/man/man3/Version.3 @@ -1,4 +1,4 @@ -.TH "Version" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "Version" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -49,10 +49,10 @@ Definition at line 111 of file modules.h. .PP .SS "Version::Version (int major, int minor, int revision, int build, int flags)" .PP -Definition at line 310 of file modules.cpp. +Definition at line 234 of file modules.cpp. .PP .nf -310 : Major(major), Minor(minor), Revision(revision), Build(build), Flags(flags) { }; +234 : Major(major), Minor(minor), Revision(revision), Build(build), Flags(flags) { }; .fi .SH "Member Data Documentation" .PP diff --git a/docs/man/man3/WhoWasUser.3 b/docs/man/man3/WhoWasUser.3 index 40ffbca4b..a6d45973f 100644 --- a/docs/man/man3/WhoWasUser.3 +++ b/docs/man/man3/WhoWasUser.3 @@ -1,4 +1,4 @@ -.TH "WhoWasUser" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "WhoWasUser" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -37,30 +37,30 @@ WhoWasUser \- A lightweight userrec used by WHOWAS. .in -1c .SH "Detailed Description" .PP -A lightweight userrec used by WHOWAS. Definition at line 315 of file users.h. +A lightweight userrec used by WHOWAS. Definition at line 318 of file users.h. .SH "Member Data Documentation" .PP .SS "char \fBWhoWasUser::dhost\fP[160]" .PP -Definition at line 320 of file users.h. +Definition at line 323 of file users.h. .SS "char \fBWhoWasUser::fullname\fP[128]" .PP -Definition at line 322 of file users.h. +Definition at line 325 of file users.h. .SS "char \fBWhoWasUser::host\fP[160]" .PP -Definition at line 321 of file users.h. +Definition at line 324 of file users.h. .SS "char \fBWhoWasUser::ident\fP[16]" .PP -Definition at line 319 of file users.h. +Definition at line 322 of file users.h. .SS "char \fBWhoWasUser::nick\fP[NICKMAX]" .PP -Definition at line 318 of file users.h. +Definition at line 321 of file users.h. .SS "char \fBWhoWasUser::server\fP[256]" .PP -Definition at line 323 of file users.h. +Definition at line 326 of file users.h. .SS "time_t \fBWhoWasUser::signon\fP" .PP -Definition at line 324 of file users.h. +Definition at line 327 of file users.h. .SH "Author" .PP diff --git a/docs/man/man3/XLine.3 b/docs/man/man3/XLine.3 index 2933362c4..8cd21fa0c 100644 --- a/docs/man/man3/XLine.3 +++ b/docs/man/man3/XLine.3 @@ -1,4 +1,4 @@ -.TH "XLine" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "XLine" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ZLine.3 b/docs/man/man3/ZLine.3 index 72dbca6fc..916e3681f 100644 --- a/docs/man/man3/ZLine.3 +++ b/docs/man/man3/ZLine.3 @@ -1,4 +1,4 @@ -.TH "ZLine" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "ZLine" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/base.h.3 b/docs/man/man3/base.h.3 index f3784d649..d3d7d4065 100644 --- a/docs/man/man3/base.h.3 +++ b/docs/man/man3/base.h.3 @@ -1,4 +1,4 @@ -.TH "base.h" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "base.h" 3 "15 May 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 9cf60156c..1b0bc51c5 100644 --- a/docs/man/man3/channels.cpp.3 +++ b/docs/man/man3/channels.cpp.3 @@ -1,4 +1,4 @@ -.TH "channels.cpp" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "channels.cpp" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -16,16 +16,12 @@ channels.cpp \- .br \fC#include \fP .br -\fC#include \fP -.br \fC#include \fP .br \fC#include \fP .br \fC#include \fP .br -\fC#include \fP -.br \fC#include \fP .br \fC#include \fP @@ -38,12 +34,8 @@ channels.cpp \- .br \fC#include \fP .br -\fC#include \fP -.br \fC#include \fP .br -\fC#include \fP -.br \fC#include 'connection.h'\fP .br \fC#include 'users.h'\fP @@ -68,6 +60,8 @@ channels.cpp \- .br \fC#include 'inspstring.h'\fP .br +\fC#include 'helperfuncs.h'\fP +.br .SS "Namespaces" @@ -205,137 +199,137 @@ channels.cpp \- .PP .SS "#define nspace std" .PP -Definition at line 58 of file channels.cpp. +Definition at line 53 of file channels.cpp. .SH "Variable Documentation" .PP .SS "char \fBAdminEmail\fP[MAXBUF]" .PP -Definition at line 72 of file channels.cpp. +Definition at line 67 of file channels.cpp. .SS "char \fBAdminName\fP[MAXBUF]" .PP -Definition at line 71 of file channels.cpp. +Definition at line 66 of file channels.cpp. .SS "char \fBAdminNick\fP[MAXBUF]" .PP -Definition at line 73 of file channels.cpp. +Definition at line 68 of file channels.cpp. .SS "std::vector \fBauth_cookies\fP" .PP -Definition at line 100 of file channels.cpp. +Definition at line 95 of file channels.cpp. .SS "int \fBboundPortCount\fP" .PP -Definition at line 94 of file channels.cpp. +Definition at line 89 of file channels.cpp. .SS "std::stringstream \fBconfig_f\fP" .PP -Definition at line 101 of file channels.cpp. +Definition at line 96 of file channels.cpp. .PP Referenced by userrec::HasPermission(). .SS "std::vector<\fBModeParameter\fP> \fBcustom_mode_params\fP" .PP -Definition at line 111 of file channels.cpp. +Definition at line 106 of file channels.cpp. .PP Referenced by chanrec::GetModeParameter(), and chanrec::SetCustomModeParam(). .SS "int \fBdebugging\fP" .PP -Definition at line 82 of file channels.cpp. +Definition at line 77 of file channels.cpp. .SS "int \fBdefaultRoute\fP" .PP -Definition at line 98 of file channels.cpp. +Definition at line 93 of file channels.cpp. .SS "int \fBDieDelay\fP" .PP -Definition at line 85 of file channels.cpp. +Definition at line 80 of file channels.cpp. .SS "char \fBdiepass\fP[MAXBUF]" .PP -Definition at line 74 of file channels.cpp. +Definition at line 69 of file channels.cpp. .SS "char \fBDieValue\fP[MAXBUF]" .PP -Definition at line 80 of file channels.cpp. +Definition at line 75 of file channels.cpp. .SS "std::vector<\fBircd_module\fP*> factory" .PP -Definition at line 65 of file channels.cpp. +Definition at line 60 of file channels.cpp. .SS "std::vector \fBfd_reap\fP" .PP -Definition at line 91 of file channels.cpp. +Definition at line 86 of file channels.cpp. .SS "char \fBlist\fP[MAXBUF]" .PP -Definition at line 78 of file channels.cpp. +Definition at line 73 of file channels.cpp. .PP Referenced by Server::GetUsers(). .SS "FILE* \fBlog_file\fP" .PP -Definition at line 105 of file channels.cpp. +Definition at line 100 of file channels.cpp. .SS "int \fBLogLevel\fP" .PP -Definition at line 67 of file channels.cpp. +Definition at line 62 of file channels.cpp. .SS "int \fBMaxWhoResults\fP" .PP -Definition at line 88 of file channels.cpp. +Definition at line 83 of file channels.cpp. .SS "\fBserverrec\fP* \fBme\fP[32]" .PP -Definition at line 103 of file channels.cpp. +Definition at line 98 of file channels.cpp. .SS "int \fBMODCOUNT\fP = -1" .PP -Definition at line 1067 of file modules.cpp. +Definition at line 996 of file modules.cpp. .PP Referenced by Server::FindModule(). .SS "std::vector \fBmodule_names\fP" .PP -Definition at line 92 of file channels.cpp. +Definition at line 87 of file channels.cpp. .PP Referenced by Server::FindModule(). .SS "std::vector<\fBModule\fP*> modules" .PP -Definition at line 64 of file channels.cpp. +Definition at line 59 of file channels.cpp. .PP Referenced by Server::FindModule(). .SS "char \fBmotd\fP[MAXBUF]" .PP -Definition at line 76 of file channels.cpp. +Definition at line 71 of file channels.cpp. .SS "time_t \fBnb_start\fP" .PP -Definition at line 89 of file channels.cpp. +Definition at line 84 of file channels.cpp. .SS "int \fBNetBufferSize\fP" .PP -Definition at line 87 of file channels.cpp. +Definition at line 82 of file channels.cpp. .SS "char \fBNetwork\fP[MAXBUF]" .PP -Definition at line 69 of file channels.cpp. +Definition at line 64 of file channels.cpp. .SS "int \fBportCount\fP" .PP -Definition at line 95 of file channels.cpp. +Definition at line 90 of file channels.cpp. .SS "int \fBports\fP[MAXSOCKS]" .PP -Definition at line 97 of file channels.cpp. +Definition at line 92 of file channels.cpp. .SS "char \fBPrefixQuit\fP[MAXBUF]" .PP -Definition at line 79 of file channels.cpp. +Definition at line 74 of file channels.cpp. .SS "char \fBrestartpass\fP[MAXBUF]" .PP -Definition at line 75 of file channels.cpp. +Definition at line 70 of file channels.cpp. .SS "char \fBrules\fP[MAXBUF]" .PP -Definition at line 77 of file channels.cpp. +Definition at line 72 of file channels.cpp. .SS "char \fBServerDesc\fP[MAXBUF]" .PP -Definition at line 70 of file channels.cpp. +Definition at line 65 of file channels.cpp. .SS "char \fBServerName\fP[MAXBUF]" .PP -Definition at line 68 of file channels.cpp. +Definition at line 63 of file channels.cpp. .SS "int \fBSERVERportCount\fP" .PP -Definition at line 96 of file channels.cpp. +Definition at line 91 of file channels.cpp. .SS "time_t \fBstartup_time\fP" .PP -Definition at line 86 of file channels.cpp. +Definition at line 81 of file channels.cpp. .SS "time_t \fBTIME\fP" .PP -Definition at line 107 of file channels.cpp. +Definition at line 102 of file channels.cpp. .PP Referenced by serverrec::serverrec(), and userrec::userrec(). .SS "int \fBWHOWAS_MAX\fP" .PP -Definition at line 84 of file channels.cpp. +Definition at line 79 of file channels.cpp. .SS "int \fBWHOWAS_STALE\fP" .PP -Definition at line 83 of file channels.cpp. +Definition at line 78 of file channels.cpp. .SH "Author" .PP Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/man3/channels.h.3 b/docs/man/man3/channels.h.3 index 97577d320..0609a03e6 100644 --- a/docs/man/man3/channels.h.3 +++ b/docs/man/man3/channels.h.3 @@ -1,4 +1,4 @@ -.TH "channels.h" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "channels.h" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/chanrec.3 b/docs/man/man3/chanrec.3 index 2e965d43a..0831e46b3 100644 --- a/docs/man/man3/chanrec.3 +++ b/docs/man/man3/chanrec.3 @@ -1,4 +1,4 @@ -.TH "chanrec" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "chanrec" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -114,21 +114,21 @@ Definition at line 101 of file channels.h. .PP .SS "chanrec::chanrec ()" .PP -Creates a channel record and initialises it with default values. Definition at line 113 of file channels.cpp. +Creates a channel record and initialises it with default values. Definition at line 108 of file channels.cpp. .PP References binarymodes, created, custom_modes, internal_userlist, key, limit, name, setby, topic, and topicset. .PP .nf -114 { -115 strcpy(name,''); -116 strcpy(custom_modes,''); -117 strcpy(topic,''); -118 strcpy(setby,''); -119 strcpy(key,''); -120 created = topicset = limit = 0; -121 binarymodes = 0; -122 internal_userlist.clear(); -123 } +109 { +110 strcpy(name,''); +111 strcpy(custom_modes,''); +112 strcpy(topic,''); +113 strcpy(setby,''); +114 strcpy(key,''); +115 created = topicset = limit = 0; +116 binarymodes = 0; +117 internal_userlist.clear(); +118 } .fi .SS "virtual chanrec::~\fBchanrec\fP ()\fC [inline, virtual]\fP" .PP @@ -141,161 +141,161 @@ Definition at line 205 of file channels.h. .PP .SS "void chanrec::AddUser (char * castuser)" .PP -Add a user pointer to the internal reference list The data inserted into the reference list is a table as it is an arbitary pointer compared to other users by its memory address, as this is a very fast 32 or 64 bit integer comparison. Definition at line 207 of file channels.cpp. +Add a user pointer to the internal reference list The data inserted into the reference list is a table as it is an arbitary pointer compared to other users by its memory address, as this is a very fast 32 or 64 bit integer comparison. Definition at line 202 of file channels.cpp. .PP References DEBUG, and internal_userlist. .PP .nf -208 { -209 internal_userlist.push_back(castuser); -210 log(DEBUG,'Added casted user to channel's internal list'); -211 } +203 { +204 internal_userlist.push_back(castuser); +205 log(DEBUG,'Added casted user to channel's internal list'); +206 } .fi .SS "void chanrec::DelUser (char * castuser)" .PP -Delete a user pointer to the internal reference list The data removed from the reference list is a table as it is an arbitary pointer compared to other users by its memory address, as this is a very fast 32 or 64 bit integer comparison. Definition at line 213 of file channels.cpp. +Delete a user pointer to the internal reference list The data removed from the reference list is a table as it is an arbitary pointer compared to other users by its memory address, as this is a very fast 32 or 64 bit integer comparison. Definition at line 208 of file channels.cpp. .PP References DEBUG, internal_userlist, and name. .PP .nf -214 { -215 for (std::vector::iterator a = internal_userlist.begin(); a < internal_userlist.end(); a++) -216 { -217 if (*a == castuser) -218 { -219 log(DEBUG,'Removed casted user from channel's internal list'); -220 internal_userlist.erase(a); -221 return; -222 } -223 } -224 log(DEBUG,'BUG BUG BUG! Attempt to remove an uncasted user from the internal list of %s!',name); -225 } +209 { +210 for (std::vector::iterator a = internal_userlist.begin(); a < internal_userlist.end(); a++) +211 { +212 if (*a == castuser) +213 { +214 log(DEBUG,'Removed casted user from channel's internal list'); +215 internal_userlist.erase(a); +216 return; +217 } +218 } +219 log(DEBUG,'BUG BUG BUG! Attempt to remove an uncasted user from the internal list of %s!',name); +220 } .fi .SS "std::string chanrec::GetModeParameter (char mode)" .PP -Returns the parameter for a custom mode on a channel. For example if '+L #foo' is set, and you pass this method 'L', it will return '#foo'. If the mode is not set on the channel, or the mode has no parameters associated with it, it will return an empty string.Definition at line 187 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 182 of file channels.cpp. .PP References custom_mode_params. .PP .nf -188 { -189 if (custom_mode_params.size()) -190 { -191 for (vector::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++) -192 { -193 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel))) -194 { -195 return i->parameter; -196 } -197 } -198 } -199 return ''; -200 } +183 { +184 if (custom_mode_params.size()) +185 { +186 for (vector::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++) +187 { +188 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel))) +189 { +190 return i->parameter; +191 } +192 } +193 } +194 return ''; +195 } .fi .SS "long chanrec::GetUserCounter ()" .PP -Obtain the channel 'user counter' This returns the channel reference counter, which is initialized to 0 when the channel is created and incremented/decremented upon joins, parts quits and kicks. Definition at line 202 of file channels.cpp. +Obtain the channel 'user counter' This returns the channel reference counter, which is initialized to 0 when the channel is created and incremented/decremented upon joins, parts quits and kicks. Definition at line 197 of file channels.cpp. .PP References internal_userlist. .PP .nf -203 { -204 return (this->internal_userlist.size()); -205 } +198 { +199 return (this->internal_userlist.size()); +200 } .fi .SS "std::vector< char * > * chanrec::GetUsers ()" .PP -Obrain the internal reference list The internal reference list contains a list of userrec* cast to char*. These are used for rapid comparison to determine channel membership for PRIVMSG, NOTICE, QUIT, PART etc. The resulting pointer to the vector should be considered readonly and only modified via AddUser and DelUser.Definition at line 227 of file channels.cpp. +Obrain the internal reference list The internal reference list contains a list of userrec* cast to char*. These are used for rapid comparison to determine channel membership for PRIVMSG, NOTICE, QUIT, PART etc. The resulting pointer to the vector should be considered readonly and only modified via AddUser and DelUser.Definition at line 222 of file channels.cpp. .PP References internal_userlist. .PP Referenced by Server::GetUsers(). .PP .nf -228 { -229 return &internal_userlist; -230 } +223 { +224 return &internal_userlist; +225 } .fi .SS "bool chanrec::IsCustomModeSet (char mode)" .PP -Returns true if a custom mode is set on a channel. Definition at line 181 of file channels.cpp. +Returns true if a custom mode is set on a channel. Definition at line 176 of file channels.cpp. .PP References DEBUG. .PP .nf -182 { -183 log(DEBUG,'Checking ISCustomModeSet: %c %s',mode,this->custom_modes); -184 return (strchr(this->custom_modes,mode) != 0); -185 } +177 { +178 log(DEBUG,'Checking ISCustomModeSet: %c %s',mode,this->custom_modes); +179 return (strchr(this->custom_modes,mode) != 0); +180 } .fi .SS "void chanrec::SetCustomMode (char mode, bool mode_on)" .PP -Sets or unsets a custom mode in the channels info. Definition at line 125 of file channels.cpp. +Sets or unsets a custom mode in the channels info. Definition at line 120 of file channels.cpp. .PP References custom_modes, DEBUG, and SetCustomModeParam(). .PP .nf -126 { -127 if (mode_on) { -128 static char m[3]; -129 m[0] = mode; -130 m[1] = '\0'; -131 if (!strchr(this->custom_modes,mode)) -132 { -133 strlcat(custom_modes,m,MAXMODES); -134 } -135 log(DEBUG,'Custom mode %c set',mode); -136 } -137 else { +121 { +122 if (mode_on) { +123 static char m[3]; +124 m[0] = mode; +125 m[1] = '\0'; +126 if (!strchr(this->custom_modes,mode)) +127 { +128 strlcat(custom_modes,m,MAXMODES); +129 } +130 log(DEBUG,'Custom mode %c set',mode); +131 } +132 else { +133 +134 std::string a = this->custom_modes; +135 int pos = a.find(mode); +136 a.erase(pos,1); +137 strncpy(this->custom_modes,a.c_str(),MAXMODES); 138 -139 std::string a = this->custom_modes; -140 int pos = a.find(mode); -141 a.erase(pos,1); -142 strncpy(this->custom_modes,a.c_str(),MAXMODES); -143 -144 log(DEBUG,'Custom mode %c removed: modelist='%s'',mode,this->custom_modes); -145 this->SetCustomModeParam(mode,'',false); -146 } -147 } +139 log(DEBUG,'Custom mode %c removed: modelist='%s'',mode,this->custom_modes); +140 this->SetCustomModeParam(mode,'',false); +141 } +142 } .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 150 of file channels.cpp. +Sets or unsets the parameters for a custom mode in a channels info. Definition at line 145 of file channels.cpp. .PP References ModeParameter::channel, custom_mode_params, DEBUG, ModeParameter::mode, and ModeParameter::parameter. .PP Referenced by SetCustomMode(). .PP .nf -151 { -152 -153 log(DEBUG,'SetCustomModeParam called'); -154 ModeParameter M; -155 M.mode = mode; -156 strlcpy(M.channel,this->name,CHANMAX); -157 strlcpy(M.parameter,parameter,MAXBUF); -158 if (mode_on) +146 { +147 +148 log(DEBUG,'SetCustomModeParam called'); +149 ModeParameter M; +150 M.mode = mode; +151 strlcpy(M.channel,this->name,CHANMAX); +152 strlcpy(M.parameter,parameter,MAXBUF); +153 if (mode_on) +154 { +155 log(DEBUG,'Custom mode parameter %c %s added',mode,parameter); +156 custom_mode_params.push_back(M); +157 } +158 else 159 { -160 log(DEBUG,'Custom mode parameter %c %s added',mode,parameter); -161 custom_mode_params.push_back(M); -162 } -163 else -164 { -165 if (custom_mode_params.size()) -166 { -167 for (vector::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++) -168 { -169 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel))) -170 { -171 log(DEBUG,'Custom mode parameter %c %s removed',mode,parameter); -172 custom_mode_params.erase(i); -173 return; -174 } -175 } -176 } -177 log(DEBUG,'*** BUG *** Attempt to remove non-existent mode parameter!'); -178 } -179 } +160 if (custom_mode_params.size()) +161 { +162 for (vector::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++) +163 { +164 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel))) +165 { +166 log(DEBUG,'Custom mode parameter %c %s removed',mode,parameter); +167 custom_mode_params.erase(i); +168 return; +169 } +170 } +171 } +172 log(DEBUG,'*** BUG *** Attempt to remove non-existent mode parameter!'); +173 } +174 } .fi .SH "Member Data Documentation" .PP diff --git a/docs/man/man3/classbase.3 b/docs/man/man3/classbase.3 index d3c9b34b4..9530bb7c8 100644 --- a/docs/man/man3/classbase.3 +++ b/docs/man/man3/classbase.3 @@ -1,4 +1,4 @@ -.TH "classbase" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "classbase" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/command_t.3 b/docs/man/man3/command_t.3 index fe5b1b348..8309583b7 100644 --- a/docs/man/man3/command_t.3 +++ b/docs/man/man3/command_t.3 @@ -1,4 +1,4 @@ -.TH "command_t" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "command_t" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/commands.h.3 b/docs/man/man3/commands.h.3 index 3033594c2..c13b7bd21 100644 --- a/docs/man/man3/commands.h.3 +++ b/docs/man/man3/commands.h.3 @@ -1,4 +1,4 @@ -.TH "commands.h" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "commands.h" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -178,78 +178,78 @@ commands.h \- .RI "void \fBhandle_unloadmodule\fP (char **parameters, int pcnt, \fBuserrec\fP *user)" .br .ti -1c -.RI "void \fBhandle_link_packet\fP (char *tcp_msg, char *tcp_host, \fBserverrec\fP *serv)" +.RI "void \fBhandle_link_packet\fP (char *tcp_msg, char *tcp_host, \fBserverrec\fP *serv, char *tcp_sum)" .br .RI "\fISpecial functions for processing server to server traffic. \fP" .ti -1c -.RI "void \fBprocess_restricted_commands\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host, char *ipaddr, int port)" +.RI "void \fBprocess_restricted_commands\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host, char *ipaddr, int port, char *tcp_sum)" .br .ti -1c -.RI "void \fBhandle_amp\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.RI "void \fBhandle_amp\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host, char *tcp_sum)" .br .RI "\fIThese are the handlers for server commands (tokens). \fP" .ti -1c -.RI "void \fBhandle_dollar\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.RI "void \fBhandle_dollar\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host, char *tcp_sum)" .br .ti -1c -.RI "void \fBhandle_J\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.RI "void \fBhandle_J\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host, char *tcp_sum)" .br .ti -1c -.RI "void \fBhandle_R\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.RI "void \fBhandle_R\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host, char *tcp_sum)" .br .ti -1c -.RI "void \fBhandle_plus\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.RI "void \fBhandle_plus\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host, char *tcp_sum)" .br .ti -1c -.RI "void \fBhandle_b\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.RI "void \fBhandle_b\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host, char *tcp_sum)" .br .ti -1c -.RI "void \fBhandle_a\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.RI "void \fBhandle_a\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host, char *tcp_sum)" .br .ti -1c -.RI "void \fBhandle_F\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.RI "void \fBhandle_F\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host, char *tcp_sum)" .br .ti -1c -.RI "void \fBhandle_N\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.RI "void \fBhandle_N\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host, char *tcp_sum)" .br .ti -1c -.RI "void \fBhandle_AT\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.RI "void \fBhandle_AT\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host, char *tcp_sum)" .br .ti -1c -.RI "void \fBhandle_k\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.RI "void \fBhandle_k\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host, char *tcp_sum)" .br .ti -1c -.RI "void \fBhandle_n\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.RI "void \fBhandle_n\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host, char *tcp_sum)" .br .ti -1c -.RI "void \fBhandle_Q\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.RI "void \fBhandle_Q\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host, char *tcp_sum)" .br .ti -1c -.RI "void \fBhandle_K\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.RI "void \fBhandle_K\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host, char *tcp_sum)" .br .ti -1c -.RI "void \fBhandle_L\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.RI "void \fBhandle_L\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host, char *tcp_sum)" .br .ti -1c -.RI "void \fBhandle_m\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.RI "void \fBhandle_m\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host, char *tcp_sum)" .br .ti -1c -.RI "void \fBhandle_M\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.RI "void \fBhandle_M\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host, char *tcp_sum)" .br .ti -1c -.RI "void \fBhandle_T\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.RI "void \fBhandle_T\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host, char *tcp_sum)" .br .ti -1c -.RI "void \fBhandle_t\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.RI "void \fBhandle_t\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host, char *tcp_sum)" .br .ti -1c -.RI "void \fBhandle_i\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.RI "void \fBhandle_i\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host, char *tcp_sum)" .br .ti -1c -.RI "void \fBhandle_P\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.RI "void \fBhandle_P\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host, char *tcp_sum)" .br .ti -1c -.RI "void \fBhandle_V\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host)" +.RI "void \fBhandle_V\fP (char token, char *params, \fBserverrec\fP *source, \fBserverrec\fP *reply, char *tcp_host, char *tcp_sum)" .br .ti -1c .RI "bool \fBis_uline\fP (const char *server)" @@ -265,32 +265,32 @@ commands.h \- .SS "long duration (const char * str)" .PP Other useful functions. Referenced by Server::AddELine(), Server::AddGLine(), Server::AddKLine(), Server::AddQLine(), Server::AddZLine(), and Server::CalcDuration(). -.SS "void handle_a (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.SS "void handle_a (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host, char * tcp_sum)" .PP .SS "void handle_admin (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP -.SS "void handle_amp (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.SS "void handle_amp (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host, char * tcp_sum)" .PP These are the handlers for server commands (tokens). -.SS "void handle_AT (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.SS "void handle_AT (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host, char * tcp_sum)" .PP .SS "void handle_away (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP -.SS "void handle_b (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.SS "void handle_b (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host, char * tcp_sum)" .PP .SS "void handle_connect (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP .SS "void handle_die (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP -.SS "void handle_dollar (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.SS "void handle_dollar (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host, char * tcp_sum)" .PP .SS "void handle_eline (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP -.SS "void handle_F (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.SS "void handle_F (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host, char * tcp_sum)" .PP .SS "void handle_gline (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP -.SS "void handle_i (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.SS "void handle_i (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host, char * tcp_sum)" .PP .SS "void handle_info (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP @@ -298,14 +298,14 @@ These are the handlers for server commands (tokens). .PP .SS "void handle_ison (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP -.SS "void handle_J (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.SS "void handle_J (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host, char * tcp_sum)" .PP .SS "void handle_join (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP These are the handlers for user commands. -.SS "void handle_K (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.SS "void handle_K (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host, char * tcp_sum)" .PP -.SS "void handle_k (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.SS "void handle_k (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host, char * tcp_sum)" .PP .SS "void handle_kick (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP @@ -313,9 +313,9 @@ These are the handlers for user commands. .PP .SS "void handle_kline (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP -.SS "void handle_L (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.SS "void handle_L (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host, char * tcp_sum)" .PP -.SS "void handle_link_packet (char * tcp_msg, char * tcp_host, \fBserverrec\fP * serv)" +.SS "void handle_link_packet (char * tcp_msg, char * tcp_host, \fBserverrec\fP * serv, char * tcp_sum)" .PP Special functions for processing server to server traffic. .SS "void handle_links (char ** parameters, int pcnt, \fBuserrec\fP * user)" @@ -326,9 +326,9 @@ Special functions for processing server to server traffic. .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)" +.SS "void handle_M (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host, char * tcp_sum)" .PP -.SS "void handle_m (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.SS "void handle_m (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host, char * tcp_sum)" .PP .SS "void handle_map (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP @@ -336,9 +336,9 @@ Special functions for processing server to server traffic. .PP .SS "void handle_motd (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP -.SS "void handle_n (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.SS "void handle_n (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host, char * tcp_sum)" .PP -.SS "void handle_N (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.SS "void handle_N (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host, char * tcp_sum)" .PP .SS "void handle_names (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP @@ -348,7 +348,7 @@ Special functions for processing server to server traffic. .PP .SS "void handle_oper (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP -.SS "void handle_P (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.SS "void handle_P (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host, char * tcp_sum)" .PP .SS "void handle_part (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP @@ -356,19 +356,19 @@ Special functions for processing server to server traffic. .PP .SS "void handle_ping (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP -.SS "void handle_plus (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.SS "void handle_plus (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host, char * tcp_sum)" .PP .SS "void handle_pong (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP .SS "void handle_privmsg (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP -.SS "void handle_Q (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.SS "void handle_Q (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host, char * tcp_sum)" .PP .SS "void handle_qline (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP .SS "void handle_quit (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP -.SS "void handle_R (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.SS "void handle_R (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host, char * tcp_sum)" .PP .SS "void handle_rehash (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP @@ -384,9 +384,9 @@ Special functions for processing server to server traffic. .PP .SS "void handle_summon (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP -.SS "void handle_t (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.SS "void handle_t (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host, char * tcp_sum)" .PP -.SS "void handle_T (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.SS "void handle_T (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host, char * tcp_sum)" .PP .SS "void handle_time (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP @@ -402,7 +402,7 @@ Special functions for processing server to server traffic. .PP .SS "void handle_users (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP -.SS "void handle_V (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host)" +.SS "void handle_V (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host, char * tcp_sum)" .PP .SS "void handle_wallops (char ** parameters, int pcnt, \fBuserrec\fP * user)" .PP @@ -417,7 +417,7 @@ Special functions for processing server to server traffic. .SS "bool is_uline (const char * server)" .PP Functions for u:lined servers. Referenced by Server::IsUlined(). -.SS "void process_restricted_commands (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host, char * ipaddr, int port)" +.SS "void process_restricted_commands (char token, char * params, \fBserverrec\fP * source, \fBserverrec\fP * reply, char * tcp_host, char * ipaddr, int port, char * tcp_sum)" .PP .SH "Author" .PP diff --git a/docs/man/man3/connection.3 b/docs/man/man3/connection.3 index 089bd108e..e21a84b8d 100644 --- a/docs/man/man3/connection.3 +++ b/docs/man/man3/connection.3 @@ -1,4 +1,4 @@ -.TH "connection" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "connection" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -42,7 +42,7 @@ Inherited by \fBserverrec\fP, and \fBuserrec\fP. .br .RI "\fISend a message to a server by name, if the server is unavailable directly route the packet via another server If the server still cannot be reached after attempting to route the message remotely, returns false. \fP" .ti -1c -.RI "bool \fBRecvPacket\fP (std::deque< std::string > &messages, char *\fBhost\fP)" +.RI "bool \fBRecvPacket\fP (std::deque< std::string > &messages, char *\fBhost\fP, std::deque< std::string > &sums)" .br .RI "\fIReturns the next available packet and returns true if data is available. \fP" .ti -1c @@ -120,7 +120,7 @@ Inherited by \fBserverrec\fP, and \fBuserrec\fP. .in -1c .SH "Detailed Description" .PP -Please note: classes serverrec and userrec both inherit from class connection. Definition at line 210 of file connection.h. +Please note: classes serverrec and userrec both inherit from class connection. Definition at line 212 of file connection.h. .SH "Constructor & Destructor Documentation" .PP .SS "connection::connection ()" @@ -143,7 +143,7 @@ Find the \fBircd_connector\fP oject related to a certain servername given in 'ho .SS "bool connection::MeshCookie (char * targethost, int port, unsigned long cookie, char * servername)" .PP Begin an outbound mesh link to another ircd on a network you are already an authenticated member of. -.SS "bool connection::RecvPacket (std::deque< std::string > & messages, char * host)" +.SS "bool connection::RecvPacket (std::deque< std::string > & messages, char * host, std::deque< std::string > & sums)" .PP Returns the next available packet and returns true if data is available. Writes the servername the data came from to 'host'. If no data is available this function returns false. This function will automatically close broken links and reroute pathways, generating split messages on the network. .SS "bool connection::SendPacket (char * message, const char * host)" @@ -156,75 +156,75 @@ Terminate a link to 'targethost' by calling the \fBircd_connector::CloseConnecti .PP .SS "long \fBconnection::bytes_in\fP" .PP -Stats counter for bytes inbound. Definition at line 227 of file connection.h. +Stats counter for bytes inbound. Definition at line 229 of file connection.h. .PP Referenced by userrec::userrec(). .SS "long \fBconnection::bytes_out\fP" .PP -Stats counter for bytes outbound. Definition at line 231 of file connection.h. +Stats counter for bytes outbound. Definition at line 233 of file connection.h. .PP Referenced by userrec::FlushWriteBuf(), and userrec::userrec(). .SS "long \fBconnection::cmds_in\fP" .PP -Stats counter for commands inbound. Definition at line 235 of file connection.h. +Stats counter for commands inbound. Definition at line 237 of file connection.h. .PP Referenced by userrec::userrec(). .SS "long \fBconnection::cmds_out\fP" .PP -Stats counter for commands outbound. Definition at line 239 of file connection.h. +Stats counter for commands outbound. Definition at line 241 of file connection.h. .PP Referenced by userrec::FlushWriteBuf(), and userrec::userrec(). .SS "std::vector<\fBircd_connector\fP> \fBconnection::connectors\fP" .PP -With a serverrec, this is a list of all established server connections. With a userrec this is unused.Definition at line 274 of file connection.h. +With a serverrec, this is a list of all established server connections. With a userrec this is unused.Definition at line 276 of file connection.h. .SS "int \fBconnection::fd\fP" .PP -File descriptor of the connection. Definition at line 215 of file connection.h. +File descriptor of the connection. Definition at line 217 of file connection.h. .PP Referenced by ConfigReader::DumpErrors(), Server::PseudoToUser(), Server::SendTo(), serverrec::serverrec(), userrec::userrec(), and Server::UserToPseudo(). .SS "bool \fBconnection::haspassed\fP" .PP -True if server/user has authenticated, false if otherwise. Definition at line 243 of file connection.h. +True if server/user has authenticated, false if otherwise. Definition at line 245 of file connection.h. .PP Referenced by userrec::userrec(). .SS "char \fBconnection::host\fP[160]" .PP -Hostname of connection. Not used if this is a serverrecDefinition at line 219 of file connection.h. +Hostname of connection. Not used if this is a serverrecDefinition at line 221 of file connection.h. .PP Referenced by userrec::GetFullRealHost(), Server::PseudoToUser(), userrec::userrec(), and Server::UserToPseudo(). .SS "time_t \fBconnection::idle_lastmsg\fP" .PP -Time that the connection last sent data, used to calculate idle time. Definition at line 265 of file connection.h. +Time that the connection last sent data, used to calculate idle time. Definition at line 267 of file connection.h. .PP Referenced by userrec::userrec(). .SS "char \fBconnection::ip\fP[16]" .PP -IP of connection. Definition at line 223 of file connection.h. +IP of connection. Definition at line 225 of file connection.h. .PP Referenced by userrec::userrec(). .SS "time_t \fBconnection::lastping\fP" .PP -Time the connection was last pinged. Definition at line 257 of file connection.h. +Time the connection was last pinged. Definition at line 259 of file connection.h. .PP Referenced by serverrec::serverrec(), and userrec::userrec(). .SS "time_t \fBconnection::nping\fP" .PP -Used by PING checks with clients. Definition at line 269 of file connection.h. +Used by PING checks with clients. Definition at line 271 of file connection.h. .PP Referenced by userrec::userrec(). .SS "int \fBconnection::port\fP" .PP -Port number For a userrec, this is the port they connected to the network on. For a serverrec this is the current listening port of the serverrec object.Definition at line 249 of file connection.h. +Port number For a userrec, this is the port they connected to the network on. For a serverrec this is the current listening port of the serverrec object.Definition at line 251 of file connection.h. .PP Referenced by userrec::userrec(). .SS "char \fBconnection::registered\fP" .PP -Used by userrec to indicate the registration status of the connection. Definition at line 253 of file connection.h. +Used by userrec to indicate the registration status of the connection. Definition at line 255 of file connection.h. .PP Referenced by userrec::userrec(). .SS "time_t \fBconnection::signon\fP" .PP -Time the connection was created, set in the constructor. Definition at line 261 of file connection.h. +Time the connection was created, set in the constructor. Definition at line 263 of file connection.h. .PP Referenced by serverrec::serverrec(), and userrec::userrec(). diff --git a/docs/man/man3/connection.h.3 b/docs/man/man3/connection.h.3 index 20f716f16..2bd9c858a 100644 --- a/docs/man/man3/connection.h.3 +++ b/docs/man/man3/connection.h.3 @@ -1,4 +1,4 @@ -.TH "connection.h" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "connection.h" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -69,6 +69,13 @@ connection.h \- .RI "#define \fBSTATE_SERVICES\fP 5" .br .in -1c +.SS "Functions" + +.in +1c +.ti -1c +.RI "std::string \fBCreateSum\fP ()" +.br +.in -1c .SH "Define Documentation" .PP .SS "#define STATE_CONNECTED 1" @@ -89,6 +96,10 @@ Definition at line 40 of file connection.h. .SS "#define STATE_SYNC 2" .PP Definition at line 37 of file connection.h. +.SH "Function Documentation" +.PP +.SS "std::string CreateSum ()" +.PP .SH "Author" .PP Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/man3/ctables.h.3 b/docs/man/man3/ctables.h.3 index dbbfcd783..2d7eb05c9 100644 --- a/docs/man/man3/ctables.h.3 +++ b/docs/man/man3/ctables.h.3 @@ -1,4 +1,4 @@ -.TH "ctables.h" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "ctables.h" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/dns.h.3 b/docs/man/man3/dns.h.3 index 2262c8192..aca6fe856 100644 --- a/docs/man/man3/dns.h.3 +++ b/docs/man/man3/dns.h.3 @@ -1,4 +1,4 @@ -.TH "dns.h" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "dns.h" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/dns_ip4list.3 b/docs/man/man3/dns_ip4list.3 index 72756c11c..a3835ec7f 100644 --- a/docs/man/man3/dns_ip4list.3 +++ b/docs/man/man3/dns_ip4list.3 @@ -1,4 +1,4 @@ -.TH "dns_ip4list" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "dns_ip4list" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/hashcomp.h.3 b/docs/man/man3/hashcomp.h.3 new file mode 100644 index 000000000..abd940138 --- /dev/null +++ b/docs/man/man3/hashcomp.h.3 @@ -0,0 +1,50 @@ +.TH "hashcomp.h" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +hashcomp.h \- +.SH SYNOPSIS +.br +.PP +\fC#include 'inspircd_config.h'\fP +.br +\fC#include \fP +.br + +.SS "Namespaces" + +.in +1c +.ti -1c +.RI "namespace \fBirc\fP" +.br +.ti -1c +.RI "namespace \fBnspace\fP" +.br +.in -1c +.SS "Compounds" + +.in +1c +.ti -1c +.RI "struct \fBInAddr_HashComp\fP" +.br +.RI "\fIThis class returns true if two in_addr structs match. \fP" +.ti -1c +.RI "struct \fBStrHashComp\fP" +.br +.RI "\fIThis class returns true if two strings match. \fP" +.in -1c +.SS "Defines" + +.in +1c +.ti -1c +.RI "#define \fBnspace\fP __gnu_cxx" +.br +.in -1c +.SH "Define Documentation" +.PP +.SS "#define nspace __gnu_cxx" +.PP +Definition at line 29 of file hashcomp.h. +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/man3/irc.3 b/docs/man/man3/irc.3 new file mode 100644 index 000000000..a825271ad --- /dev/null +++ b/docs/man/man3/irc.3 @@ -0,0 +1,36 @@ +.TH "irc" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +irc \- The irc namespace contains a number of helper classes. + +.SH SYNOPSIS +.br +.PP +.SS "Compounds" + +.in +1c +.ti -1c +.RI "struct \fBirc_char_traits\fP" +.br +.RI "\fIThe \fBirc_char_traits\fP class is used for RFC-style comparison of strings. \fP" +.in -1c +.SS "Typedefs" + +.in +1c +.ti -1c +.RI "typedef basic_string< char, \fBirc_char_traits\fP, allocator< char > > \fBstring\fP" +.br +.RI "\fIThis typedef declares \fBirc::string\fP based upon \fBirc_char_traits\fP. \fP" +.in -1c +.SH "Detailed Description" +.PP +The irc namespace contains a number of helper classes. +.SH "Typedef Documentation" +.PP +.SS "typedef basic_string > \fBirc::string\fP" +.PP +This typedef declares \fBirc::string\fP based upon \fBirc_char_traits\fP. Definition at line 111 of file hashcomp.h. +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/man3/irc_irc_char_traits.3 b/docs/man/man3/irc_irc_char_traits.3 new file mode 100644 index 000000000..1ee931ba6 --- /dev/null +++ b/docs/man/man3/irc_irc_char_traits.3 @@ -0,0 +1,66 @@ +.TH "irc::irc_char_traits" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +irc::irc_char_traits \- The \fBirc_char_traits\fP class is used for RFC-style comparison of strings. + +.PP +.SH SYNOPSIS +.br +.PP +\fC#include \fP +.PP +Inherits \fBchar_traits< char >\fP. +.PP +.SS "Static Public Member Functions" + +.in +1c +.ti -1c +.RI "bool \fBeq\fP (char c1st, char c2nd)" +.br +.RI "\fICheck if two chars match. \fP" +.ti -1c +.RI "bool \fBne\fP (char c1st, char c2nd)" +.br +.RI "\fICheck if two chars do NOT match. \fP" +.ti -1c +.RI "bool \fBlt\fP (char c1st, char c2nd)" +.br +.RI "\fICheck if one char is less than another. \fP" +.ti -1c +.RI "int \fBcompare\fP (const char *str1, const char *str2, size_t n)" +.br +.RI "\fICompare two strings of size n. \fP" +.ti -1c +.RI "const char * \fBfind\fP (const char *s1, int n, char c)" +.br +.RI "\fIFind a char within a string up to position n. \fP" +.in -1c +.SH "Detailed Description" +.PP +The \fBirc_char_traits\fP class is used for RFC-style comparison of strings. + +This class is used to implement \fBirc::string\fP, a case-insensitive, RFC- comparing string class. +.PP +Definition at line 86 of file hashcomp.h. +.SH "Member Function Documentation" +.PP +.SS "int irc::irc_char_traits::compare (const char * str1, const char * str2, size_t n)\fC [static]\fP" +.PP +Compare two strings of size n. +.SS "bool irc::irc_char_traits::eq (char c1st, char c2nd)\fC [static]\fP" +.PP +Check if two chars match. +.SS "const char* irc::irc_char_traits::find (const char * s1, int n, char c)\fC [static]\fP" +.PP +Find a char within a string up to position n. +.SS "bool irc::irc_char_traits::lt (char c1st, char c2nd)\fC [static]\fP" +.PP +Check if one char is less than another. +.SS "bool irc::irc_char_traits::ne (char c1st, char c2nd)\fC [static]\fP" +.PP +Check if two chars do NOT match. + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/man3/ircd_connector.3 b/docs/man/man3/ircd_connector.3 index f45d65f95..226b6797e 100644 --- a/docs/man/man3/ircd_connector.3 +++ b/docs/man/man3/ircd_connector.3 @@ -1,4 +1,4 @@ -.TH "ircd_connector" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "ircd_connector" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -160,7 +160,7 @@ Each connection has one or more of these each represents ONE outbound connection A listening socket that accepts server type connections is represented by one class serverrec. Class serverrec will instantiate several objects of type ircd_connector to represent each established connection, inbound or outbound. So, to determine all linked servers you must walk through all the serverrecs that the core defines, and in each one iterate through until you find connection(s) relating to the server you want information on. The core and module API provide functions for this. .PP -Definition at line 54 of file connection.h. +Definition at line 56 of file connection.h. .SH "Member Function Documentation" .PP .SS "void ircd_connector::AddBuffer (std::string a)" @@ -230,36 +230,36 @@ This method sets the version string of the remote server. .PP .SS "sockaddr_in \fBircd_connector::addr\fP\fC [private]\fP" .PP -Sockaddr of the outbound ip and port. Definition at line 59 of file connection.h. +Sockaddr of the outbound ip and port. Definition at line 61 of file connection.h. .SS "std::string \fBircd_connector::description\fP\fC [private]\fP" .PP -\fBServer\fP 'GECOS'. Definition at line 71 of file connection.h. +\fBServer\fP 'GECOS'. Definition at line 73 of file connection.h. .SS "int \fBircd_connector::fd\fP\fC [private]\fP" .PP -File descriptor of the connection. Definition at line 63 of file connection.h. +File descriptor of the connection. Definition at line 65 of file connection.h. .SS "char \fBircd_connector::host\fP[MAXBUF]" .PP -When MakeOutboundConnection is called, these public members are filled with the details passed to the function, for future reference. Definition at line 99 of file connection.h. +When MakeOutboundConnection is called, these public members are filled with the details passed to the function, for future reference. Definition at line 101 of file connection.h. .SS "std::string \fBircd_connector::ircdbuffer\fP" .PP IRCD Buffer for input characters, holds as many lines as are pending - Note that the final line may not be complete and should only be read when there is a .br - seperator. Definition at line 92 of file connection.h. + seperator. Definition at line 94 of file connection.h. .SS "int \fBircd_connector::port\fP" .PP -When MakeOutboundConnection is called, these public members are filled with the details passed to the function, for future reference. Definition at line 105 of file connection.h. +When MakeOutboundConnection is called, these public members are filled with the details passed to the function, for future reference. Definition at line 107 of file connection.h. .SS "std::vector \fBircd_connector::routes\fP" .PP -\fBServer\fP names of servers that this server is linked to So for A->B->C, if this was the record for B it would contain A and C whilever both servers are connected to B. Definition at line 111 of file connection.h. +\fBServer\fP names of servers that this server is linked to So for A->B->C, if this was the record for B it would contain A and C whilever both servers are connected to B. Definition at line 113 of file connection.h. .SS "std::string \fBircd_connector::servername\fP\fC [private]\fP" .PP -\fBServer\fP name. Definition at line 67 of file connection.h. +\fBServer\fP name. Definition at line 69 of file connection.h. .SS "char \fBircd_connector::state\fP\fC [private]\fP" .PP -State. STATE_NOAUTH_INBOUND, STATE_NOAUTH_OUTBOUND STATE_SYNC, STATE_DISCONNECTED, STATE_CONNECTEDDefinition at line 76 of file connection.h. +State. STATE_NOAUTH_INBOUND, STATE_NOAUTH_OUTBOUND STATE_SYNC, STATE_DISCONNECTED, STATE_CONNECTEDDefinition at line 78 of file connection.h. .SS "std::string \fBircd_connector::version\fP\fC [private]\fP" .PP -This string holds the ircd's version response. Definition at line 84 of file connection.h. +This string holds the ircd's version response. Definition at line 86 of file connection.h. .SH "Author" .PP diff --git a/docs/man/man3/message.h.3 b/docs/man/man3/message.h.3 index 3cbc9f2c8..5b7529f6c 100644 --- a/docs/man/man3/message.h.3 +++ b/docs/man/man3/message.h.3 @@ -1,4 +1,4 @@ -.TH "message.h" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "message.h" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/mode.h.3 b/docs/man/man3/mode.h.3 index 9d1833afe..51981f20d 100644 --- a/docs/man/man3/mode.h.3 +++ b/docs/man/man3/mode.h.3 @@ -1,4 +1,4 @@ -.TH "mode.h" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "mode.h" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/modules.cpp.3 b/docs/man/man3/modules.cpp.3 index 2c42d18cb..dfea1301b 100644 --- a/docs/man/man3/modules.cpp.3 +++ b/docs/man/man3/modules.cpp.3 @@ -1,4 +1,4 @@ -.TH "modules.cpp" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "modules.cpp" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -16,16 +16,8 @@ modules.cpp \- .br \fC#include \fP .br -\fC#include \fP -.br \fC#include \fP .br -\fC#include \fP -.br -\fC#include \fP -.br -\fC#include \fP -.br \fC#include \fP .br \fC#include \fP @@ -38,12 +30,8 @@ modules.cpp \- .br \fC#include \fP .br -\fC#include \fP -.br \fC#include \fP .br -\fC#include \fP -.br \fC#include 'connection.h'\fP .br \fC#include 'users.h'\fP @@ -70,33 +58,17 @@ modules.cpp \- .br \fC#include 'inspstring.h'\fP .br - -.SS "Namespaces" - -.in +1c -.ti -1c -.RI "namespace \fBnspace\fP" +\fC#include 'helperfuncs.h'\fP .br -.in -1c +\fC#include 'hashcomp.h'\fP +.br + .SS "Compounds" .in +1c .ti -1c .RI "class \fBExtMode\fP" .br -.ti -1c -.RI "struct \fBInAddr_HashComp\fP" -.br -.ti -1c -.RI "struct \fBStrHashComp\fP" -.br -.in -1c -.SS "Defines" - -.in +1c -.ti -1c -.RI "#define \fBnspace\fP std" -.br .in -1c .SS "Typedefs" @@ -296,169 +268,164 @@ modules.cpp \- .RI "\fBExtModeList\fP \fBEMode\fP" .br .in -1c -.SH "Define Documentation" -.PP -.SS "#define nspace std" -.PP -Definition at line 64 of file modules.cpp. .SH "Typedef Documentation" .PP .SS "typedef nspace::hash_map, \fBInAddr_HashComp\fP> \fBaddress_cache\fP" .PP -Definition at line 187 of file modules.cpp. +Definition at line 111 of file modules.cpp. .SS "typedef nspace::hash_map, \fBStrHashComp\fP> \fBchan_hash\fP" .PP -Definition at line 186 of file modules.cpp. +Definition at line 110 of file modules.cpp. .SS "typedef std::deque<\fBcommand_t\fP> \fBcommand_table\fP" .PP -Definition at line 189 of file modules.cpp. +Definition at line 113 of file modules.cpp. .SS "typedef std::vector<\fBExtMode\fP> \fBExtModeList\fP" .PP -Definition at line 215 of file modules.cpp. +Definition at line 139 of file modules.cpp. .SS "typedef ExtModeList::iterator \fBExtModeListIter\fP" .PP -Definition at line 216 of file modules.cpp. +Definition at line 140 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 185 of file modules.cpp. +Definition at line 109 of file modules.cpp. .SS "typedef nspace::hash_map, \fBStrHashComp\fP> \fBwhowas_hash\fP" .PP -Definition at line 188 of file modules.cpp. +Definition at line 112 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 285 of file modules.cpp. +Definition at line 209 of file modules.cpp. .PP References EMode, and ModeDefined(). .PP Referenced by Server::AddExtendedListMode(), and Server::AddExtendedMode(). .PP .nf -286 { -287 if (ModeDefined(modechar,type)) { -288 return false; -289 } -290 EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off)); -291 return true; -292 } +210 { +211 if (ModeDefined(modechar,type)) { +212 return false; +213 } +214 EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off)); +215 return true; +216 } .fi .SS "std::vector<\fBircd_module\fP*> factory (255)" .PP .SS "bool ModeDefined (char modechar, int type)" .PP -Definition at line 222 of file modules.cpp. +Definition at line 146 of file modules.cpp. .PP References EMode, and ExtModeListIter. .PP Referenced by DoAddExtendedMode(). .PP .nf -223 { -224 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -225 { -226 if ((i->modechar == modechar) && (i->type == type)) -227 { -228 return true; -229 } -230 } -231 return false; -232 } +147 { +148 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +149 { +150 if ((i->modechar == modechar) && (i->type == type)) +151 { +152 return true; +153 } +154 } +155 return false; +156 } .fi .SS "int ModeDefinedOff (char modechar, int type)" .PP -Definition at line 272 of file modules.cpp. +Definition at line 196 of file modules.cpp. .PP References EMode, and ExtModeListIter. .PP .nf -273 { -274 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -275 { -276 if ((i->modechar == modechar) && (i->type == type)) -277 { -278 return i->params_when_off; -279 } -280 } -281 return 0; -282 } +197 { +198 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +199 { +200 if ((i->modechar == modechar) && (i->type == type)) +201 { +202 return i->params_when_off; +203 } +204 } +205 return 0; +206 } .fi .SS "int ModeDefinedOn (char modechar, int type)" .PP -Definition at line 259 of file modules.cpp. +Definition at line 183 of file modules.cpp. .PP References EMode, and ExtModeListIter. .PP .nf -260 { -261 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -262 { -263 if ((i->modechar == modechar) && (i->type == type)) -264 { -265 return i->params_when_on; -266 } -267 } -268 return 0; -269 } +184 { +185 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +186 { +187 if ((i->modechar == modechar) && (i->type == type)) +188 { +189 return i->params_when_on; +190 } +191 } +192 return 0; +193 } .fi .SS "bool ModeDefinedOper (char modechar, int type)" .PP -Definition at line 246 of file modules.cpp. +Definition at line 170 of file modules.cpp. .PP References EMode, and ExtModeListIter. .PP .nf -247 { -248 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -249 { -250 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true)) -251 { -252 return true; -253 } -254 } -255 return false; -256 } +171 { +172 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +173 { +174 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true)) +175 { +176 return true; +177 } +178 } +179 return false; +180 } .fi .SS "bool ModeIsListMode (char modechar, int type)" .PP -Definition at line 234 of file modules.cpp. +Definition at line 158 of file modules.cpp. .PP References EMode, and ExtModeListIter. .PP .nf -235 { -236 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -237 { -238 if ((i->modechar == modechar) && (i->type == type) && (i->list == true)) -239 { -240 return true; -241 } -242 } -243 return false; -244 } +159 { +160 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +161 { +162 if ((i->modechar == modechar) && (i->type == type) && (i->list == true)) +163 { +164 return true; +165 } +166 } +167 return false; +168 } .fi .SS "void ModeMakeList (char modechar)" .PP -Definition at line 295 of file modules.cpp. +Definition at line 219 of file modules.cpp. .PP References EMode, ExtModeListIter, and MT_CHANNEL. .PP Referenced by Server::AddExtendedListMode(). .PP .nf -296 { -297 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -298 { -299 if ((i->modechar == modechar) && (i->type == MT_CHANNEL)) -300 { -301 i->list = true; -302 return; -303 } -304 } -305 return; -306 } +220 { +221 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +222 { +223 if ((i->modechar == modechar) && (i->type == MT_CHANNEL)) +224 { +225 i->list = true; +226 return; +227 } +228 } +229 return; +230 } .fi .SS "std::vector<\fBModule\fP*> modules (255)" .PP @@ -466,146 +433,146 @@ Referenced by Server::AddExtendedListMode(). .PP .SS "char \fBAdminEmail\fP[MAXBUF]" .PP -Definition at line 84 of file modules.cpp. +Definition at line 72 of file modules.cpp. .SS "char \fBAdminName\fP[MAXBUF]" .PP -Definition at line 83 of file modules.cpp. +Definition at line 71 of file modules.cpp. .SS "char \fBAdminNick\fP[MAXBUF]" .PP -Definition at line 85 of file modules.cpp. +Definition at line 73 of file modules.cpp. .SS "std::vector \fBauth_cookies\fP" .PP -Definition at line 112 of file modules.cpp. +Definition at line 100 of file modules.cpp. .SS "int \fBboundPortCount\fP" .PP -Definition at line 106 of file modules.cpp. +Definition at line 94 of file modules.cpp. .SS "\fBchan_hash\fP \fBchanlist\fP" .PP -Definition at line 193 of file modules.cpp. +Definition at line 117 of file modules.cpp. .SS "\fBuser_hash\fP \fBclientlist\fP" .PP -Definition at line 192 of file modules.cpp. +Definition at line 116 of file modules.cpp. .SS "\fBcommand_table\fP \fBcmdlist\fP" .PP -Definition at line 195 of file modules.cpp. +Definition at line 119 of file modules.cpp. .SS "std::stringstream \fBconfig_f\fP" .PP -Definition at line 113 of file modules.cpp. +Definition at line 101 of file modules.cpp. .SS "int \fBdebugging\fP" .PP -Definition at line 94 of file modules.cpp. +Definition at line 82 of file modules.cpp. .SS "int \fBdefaultRoute\fP" .PP -Definition at line 110 of file modules.cpp. +Definition at line 98 of file modules.cpp. .SS "int \fBDieDelay\fP" .PP -Definition at line 97 of file modules.cpp. +Definition at line 85 of file modules.cpp. .SS "char \fBdiepass\fP[MAXBUF]" .PP -Definition at line 86 of file modules.cpp. +Definition at line 74 of file modules.cpp. .SS "char \fBDieValue\fP[MAXBUF]" .PP -Definition at line 92 of file modules.cpp. +Definition at line 80 of file modules.cpp. .SS "\fBExtModeList\fP \fBEMode\fP" .PP -Definition at line 219 of file modules.cpp. +Definition at line 143 of file modules.cpp. .PP Referenced by DoAddExtendedMode(), ModeDefined(), ModeDefinedOff(), ModeDefinedOn(), ModeDefinedOper(), ModeIsListMode(), and ModeMakeList(). .SS "std::vector<\fBircd_module\fP*> factory" .PP -Definition at line 75 of file modules.cpp. +Definition at line 63 of file modules.cpp. .SS "std::vector \fBfd_reap\fP" .PP -Definition at line 103 of file modules.cpp. +Definition at line 91 of file modules.cpp. .SS "\fBuserrec\fP* \fBfd_ref_table\fP[65536]" .PP -Definition at line 119 of file modules.cpp. +Definition at line 107 of file modules.cpp. .PP Referenced by Server::FindDescriptor(), and Server::PseudoToUser(). .SS "\fBaddress_cache\fP \fBIP\fP" .PP -Definition at line 198 of file modules.cpp. +Definition at line 122 of file modules.cpp. .SS "char \fBlist\fP[MAXBUF]" .PP -Definition at line 90 of file modules.cpp. +Definition at line 78 of file modules.cpp. .SS "FILE* \fBlog_file\fP" .PP -Definition at line 117 of file modules.cpp. +Definition at line 105 of file modules.cpp. .SS "int \fBLogLevel\fP" .PP -Definition at line 79 of file modules.cpp. +Definition at line 67 of file modules.cpp. .SS "int \fBMaxWhoResults\fP" .PP -Definition at line 100 of file modules.cpp. +Definition at line 88 of file modules.cpp. .SS "\fBserverrec\fP* \fBme\fP[32]" .PP -Definition at line 115 of file modules.cpp. +Definition at line 103 of file modules.cpp. .SS "int \fBMODCOUNT\fP = -1" .PP -Definition at line 1067 of file modules.cpp. +Definition at line 996 of file modules.cpp. .SS "std::vector \fBmodule_names\fP" .PP -Definition at line 104 of file modules.cpp. +Definition at line 92 of file modules.cpp. .SS "std::vector<\fBModule\fP*> modules" .PP -Definition at line 74 of file modules.cpp. +Definition at line 62 of file modules.cpp. .SS "\fBfile_cache\fP \fBMOTD\fP" .PP -Definition at line 196 of file modules.cpp. +Definition at line 120 of file modules.cpp. .SS "char \fBmotd\fP[MAXBUF]" .PP -Definition at line 88 of file modules.cpp. +Definition at line 76 of file modules.cpp. .SS "time_t \fBnb_start\fP" .PP -Definition at line 101 of file modules.cpp. +Definition at line 89 of file modules.cpp. .SS "int \fBNetBufferSize\fP" .PP -Definition at line 99 of file modules.cpp. +Definition at line 87 of file modules.cpp. .SS "char \fBNetwork\fP[MAXBUF]" .PP -Definition at line 81 of file modules.cpp. +Definition at line 69 of file modules.cpp. .SS "int \fBportCount\fP" .PP -Definition at line 107 of file modules.cpp. +Definition at line 95 of file modules.cpp. .SS "int \fBports\fP[MAXSOCKS]" .PP -Definition at line 109 of file modules.cpp. +Definition at line 97 of file modules.cpp. .SS "char \fBPrefixQuit\fP[MAXBUF]" .PP -Definition at line 91 of file modules.cpp. +Definition at line 79 of file modules.cpp. .SS "char \fBrestartpass\fP[MAXBUF]" .PP -Definition at line 87 of file modules.cpp. +Definition at line 75 of file modules.cpp. .SS "\fBfile_cache\fP \fBRULES\fP" .PP -Definition at line 197 of file modules.cpp. +Definition at line 121 of file modules.cpp. .SS "char \fBrules\fP[MAXBUF]" .PP -Definition at line 89 of file modules.cpp. +Definition at line 77 of file modules.cpp. .SS "char \fBServerDesc\fP[MAXBUF]" .PP -Definition at line 82 of file modules.cpp. +Definition at line 70 of file modules.cpp. .SS "char \fBServerName\fP[MAXBUF]" .PP -Definition at line 80 of file modules.cpp. +Definition at line 68 of file modules.cpp. .SS "int \fBSERVERportCount\fP" .PP -Definition at line 108 of file modules.cpp. +Definition at line 96 of file modules.cpp. .SS "time_t \fBstartup_time\fP" .PP -Definition at line 98 of file modules.cpp. +Definition at line 86 of file modules.cpp. .SS "time_t \fBTIME\fP" .PP -Definition at line 77 of file modules.cpp. +Definition at line 65 of file modules.cpp. .SS "\fBwhowas_hash\fP \fBwhowas\fP" .PP -Definition at line 194 of file modules.cpp. +Definition at line 118 of file modules.cpp. .SS "int \fBWHOWAS_MAX\fP" .PP -Definition at line 96 of file modules.cpp. +Definition at line 84 of file modules.cpp. .SS "int \fBWHOWAS_STALE\fP" .PP -Definition at line 95 of file modules.cpp. +Definition at line 83 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 ac7e9ea35..38bf3733a 100644 --- a/docs/man/man3/modules.h.3 +++ b/docs/man/man3/modules.h.3 @@ -1,4 +1,4 @@ -.TH "modules.h" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "modules.h" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -230,22 +230,22 @@ Referenced by Module::OnAccessCheck(). Definition at line 38 of file modules.h. .SS "#define CONF_FILE_NOT_FOUND 0x000200" .PP -Definition at line 1138 of file modules.h. +Definition at line 1141 of file modules.h. .PP Referenced by ConfigReader::ConfigReader(). .SS "#define CONF_NOT_A_NUMBER 0x000010" .PP -Definition at line 1135 of file modules.h. +Definition at line 1138 of file modules.h. .PP Referenced by ConfigReader::ReadInteger(). .SS "#define CONF_NOT_UNSIGNED 0x000080" .PP -Definition at line 1136 of file modules.h. +Definition at line 1139 of file modules.h. .PP Referenced by ConfigReader::ReadInteger(). .SS "#define CONF_VALUE_NOT_FOUND 0x000100" .PP -Definition at line 1137 of file modules.h. +Definition at line 1140 of file modules.h. .PP Referenced by ConfigReader::ReadFlag(), ConfigReader::ReadInteger(), and ConfigReader::ReadValue(). .SS "#define DEBUG 10" @@ -333,7 +333,7 @@ Low level definition of a \fBFileReader\fP classes file cache area. Definition a Referenced by FileReader::FileReader(), and FileReader::LoadFile(). .SS "typedef DLLFactory<\fBModuleFactory\fP> \fBircd_module\fP" .PP -Definition at line 1304 of file modules.h. +Definition at line 1307 of file modules.h. .SS "typedef \fBfile_cache\fP \fBstring_list\fP" .PP Definition at line 68 of file modules.h. diff --git a/docs/man/man3/nspace.3 b/docs/man/man3/nspace.3 index 736e4cfb7..cbe375840 100644 --- a/docs/man/man3/nspace.3 +++ b/docs/man/man3/nspace.3 @@ -1,4 +1,4 @@ -.TH "nspace" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "nspace" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/nspace_nspace_hash_ in_addr _.3 b/docs/man/man3/nspace_nspace_hash_ in_addr _.3 index 43b548dd9..a21b8fa75 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 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "nspace::nspace::hash< in_addr >" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -6,6 +6,8 @@ nspace::nspace::hash< in_addr > \- .SH SYNOPSIS .br .PP +\fC#include \fP +.PP .SS "Public Member Functions" .in +1c @@ -18,17 +20,8 @@ nspace::nspace::hash< in_addr > \- .SH "Member Function Documentation" .PP -.SS "size_t nspace::hash< in_addr >::operator() (const struct in_addr & a) const\fC [inline]\fP" -.PP -Definition at line 129 of file modules.cpp. +.SS "size_t nspace::hash< in_addr >::operator() (const struct in_addr & a) const" .PP -.nf -130 { -131 size_t q; -132 memcpy(&q,&a,sizeof(size_t)); -133 return q; -134 } -.fi .SH "Author" diff --git a/docs/man/man3/nspace_nspace_hash_ string _.3 b/docs/man/man3/nspace_nspace_hash_ string _.3 index ba9c5a6f5..58c32c257 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 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "nspace::nspace::hash< string >" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -6,6 +6,8 @@ nspace::nspace::hash< string > \- .SH SYNOPSIS .br .PP +\fC#include \fP +.PP .SS "Public Member Functions" .in +1c @@ -18,19 +20,8 @@ nspace::nspace::hash< string > \- .SH "Member Function Documentation" .PP -.SS "size_t nspace::hash< string >::operator() (const string & s) const\fC [inline]\fP" -.PP -Definition at line 142 of file modules.cpp. +.SS "size_t nspace::hash< string >::operator() (const string & s) const" .PP -.nf -143 { -144 char a[MAXBUF]; -145 static struct hash strhash; -146 strlcpy(a,s.c_str(),MAXBUF); -147 strlower(a); -148 return strhash(a); -149 } -.fi .SH "Author" diff --git a/docs/man/man3/serverrec.3 b/docs/man/man3/serverrec.3 index 8f2ed614c..6dd9d4387 100644 --- a/docs/man/man3/serverrec.3 +++ b/docs/man/man3/serverrec.3 @@ -1,4 +1,4 @@ -.TH "serverrec" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "serverrec" 3 "15 May 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 26 of file servers.cpp. +Constructor. Definition at line 27 of file servers.cpp. .PP References connection::fd, hops_away, jupiter, connection::lastping, name, nickserv, opercount, pingtime, connection::signon, sync_soon, TIME, usercount, usercount_i, and version. .PP .nf -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 } +28 { +29 strlcpy(name,'',256); +30 pingtime = 0; +31 lastping = TIME; +32 usercount_i = usercount = opercount = version = 0; +33 hops_away = 1; +34 signon = TIME; +35 jupiter = false; +36 fd = 0; +37 sync_soon = false; +38 strlcpy(nickserv,'',NICKMAX); +39 } .fi .SS "serverrec::serverrec (char * n, long ver, bool jupe)" .PP -Constructor which initialises some of the main variables. Definition at line 45 of file servers.cpp. +Constructor which initialises some of the main variables. Definition at line 46 of file servers.cpp. .PP References connection::fd, hops_away, jupiter, connection::lastping, name, nickserv, opercount, connection::signon, sync_soon, TIME, usercount, usercount_i, and version. .PP .nf -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 } +47 { +48 strlcpy(name,n,256); +49 lastping = TIME; +50 usercount_i = usercount = opercount = 0; +51 version = ver; +52 hops_away = 1; +53 signon = TIME; +54 jupiter = jupe; +55 fd = 0; +56 sync_soon = false; +57 strlcpy(nickserv,'',NICKMAX); +58 } .fi .SS "serverrec::~\fBserverrec\fP ()" .PP -Destructor. Definition at line 41 of file servers.cpp. +Destructor. Definition at line 42 of file servers.cpp. .PP .nf -42 { -43 } +43 { +44 } .fi .SH "Member Data Documentation" .PP diff --git a/docs/man/man3/servers.cpp.3 b/docs/man/man3/servers.cpp.3 index e02fb0eb2..af036f7c6 100644 --- a/docs/man/man3/servers.cpp.3 +++ b/docs/man/man3/servers.cpp.3 @@ -1,4 +1,4 @@ -.TH "servers.cpp" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "servers.cpp" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -18,6 +18,8 @@ servers.cpp \- .br \fC#include 'inspstring.h'\fP .br +\fC#include 'helperfuncs.h'\fP +.br .SS "Variables" @@ -30,7 +32,7 @@ servers.cpp \- .PP .SS "time_t \fBTIME\fP" .PP -Definition at line 24 of file servers.cpp. +Definition at line 25 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 cb3f26dd6..a048d2a6e 100644 --- a/docs/man/man3/servers.h.3 +++ b/docs/man/man3/servers.h.3 @@ -1,4 +1,4 @@ -.TH "servers.h" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "servers.h" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/std.3 b/docs/man/man3/std.3 index 77d52825a..6d1a2ae72 100644 --- a/docs/man/man3/std.3 +++ b/docs/man/man3/std.3 @@ -1,4 +1,4 @@ -.TH "std" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "std" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/std_char_traits.3 b/docs/man/man3/std_char_traits.3 new file mode 100644 index 000000000..64a98bafc --- /dev/null +++ b/docs/man/man3/std_char_traits.3 @@ -0,0 +1,15 @@ +.TH "std::char_traits" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- +.ad l +.nh +.SH NAME +std::char_traits \- +.SH SYNOPSIS +.br +.PP +Inherited by \fBirc::irc_char_traits\fP. +.PP + + +.SH "Author" +.PP +Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/man3/ucrec.3 b/docs/man/man3/ucrec.3 index 986d2ba8f..efe396234 100644 --- a/docs/man/man3/ucrec.3 +++ b/docs/man/man3/ucrec.3 @@ -1,4 +1,4 @@ -.TH "ucrec" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "ucrec" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/userrec.3 b/docs/man/man3/userrec.3 index 3afc6d02c..61e70f590 100644 --- a/docs/man/man3/userrec.3 +++ b/docs/man/man3/userrec.3 @@ -1,4 +1,4 @@ -.TH "userrec" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "userrec" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -77,6 +77,10 @@ Inherits \fBconnection\fP. .RI "void \fBFlushWriteBuf\fP ()" .br .RI "\fIFlushes as much of the user's buffer to the file descriptor as possible. \fP" +.ti -1c +.RI "\fBInvitedList\fP * \fBGetInviteList\fP ()" +.br +.RI "\fIReturns the list of channels this user has been invited to but has not yet joined. \fP" .in -1c .SS "Public Attributes" @@ -189,40 +193,40 @@ Definition at line 108 of file users.h. .PP .SS "userrec::userrec ()" .PP -Definition at line 28 of file users.cpp. +Definition at line 29 of file users.cpp. .PP References awaymsg, connection::bytes_in, connection::bytes_out, ucrec::channel, chans, connection::cmds_in, connection::cmds_out, dhost, dns_done, connection::fd, flood, fullname, connection::haspassed, connection::host, ident, connection::idle_lastmsg, invites, connection::ip, connection::lastping, lines_in, modes, nick, connection::nping, oper, connection::port, recvq, connection::registered, reset_due, result, sendq, server, connection::signon, TIME, timeout, and ucrec::uc_modes. .PP .nf -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(server,''); -40 strcpy(awaymsg,''); -41 strcpy(oper,''); -42 reset_due = TIME; -43 lines_in = 0; -44 fd = lastping = signon = idle_lastmsg = nping = registered = 0; -45 flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0; -46 haspassed = false; -47 dns_done = false; -48 recvq = ''; -49 sendq = ''; -50 strcpy(result,''); -51 for (int i = 0; i < MAXCHANS; i++) -52 { -53 this->chans[i].channel = NULL; -54 this->chans[i].uc_modes = 0; -55 } -56 invites.clear(); -57 } +30 { +31 // the PROPER way to do it, AVOID bzero at *ALL* costs +32 strcpy(nick,''); +33 strcpy(ip,'127.0.0.1'); +34 timeout = 0; +35 strcpy(ident,''); +36 strcpy(host,''); +37 strcpy(dhost,''); +38 strcpy(fullname,''); +39 strcpy(modes,''); +40 strcpy(server,''); +41 strcpy(awaymsg,''); +42 strcpy(oper,''); +43 reset_due = TIME; +44 lines_in = 0; +45 fd = lastping = signon = idle_lastmsg = nping = registered = 0; +46 flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0; +47 haspassed = false; +48 dns_done = false; +49 recvq = ''; +50 sendq = ''; +51 strcpy(result,''); +52 for (int i = 0; i < MAXCHANS; i++) +53 { +54 this->chans[i].channel = NULL; +55 this->chans[i].uc_modes = 0; +56 } +57 invites.clear(); +58 } .fi .SS "virtual userrec::~\fBuserrec\fP ()\fC [inline, virtual]\fP" .PP @@ -235,305 +239,316 @@ Definition at line 222 of file users.h. .PP .SS "bool userrec::AddBuffer (std::string a)" .PP -This method adds data to the buffer of the user. The buffer can grow to any size within limits of the available memory, managed by the size of a std::string, however if any individual line in the buffer grows over 600 bytes in length (which is 88 chars over the RFC-specified limit per line) then the method will return false and the text will not be inserted.Definition at line 169 of file users.cpp. +This method adds data to the buffer of the user. The buffer can grow to any size within limits of the available memory, managed by the size of a std::string, however if any individual line in the buffer grows over 600 bytes in length (which is 88 chars over the RFC-specified limit per line) then the method will return false and the text will not be inserted.Definition at line 175 of file users.cpp. .PP References recvq, recvqmax, and SetWriteError(). .PP .nf -170 { -171 std::string b = ''; -172 for (int i = 0; i < a.length(); i++) -173 if ((a[i] != '\r') && (a[i] != '\0') && (a[i] != 7)) -174 b = b + a[i]; -175 std::stringstream stream(recvq); -176 stream << b; -177 recvq = stream.str(); -178 int i = 0; -179 // count the size of the first line in the buffer. -180 while (i < recvq.length()) -181 { -182 if (recvq[i++] == '\n') -183 break; -184 } -185 if (recvq.length() > this->recvqmax) -186 { -187 this->SetWriteError('RecvQ exceeded'); -188 WriteOpers('*** User %s RecvQ of %d exceeds connect class maximum of %d',this->nick,recvq.length(),this->recvqmax); -189 } -190 // return false if we've had more than 600 characters WITHOUT -191 // a carriage return (this is BAD, drop the socket) -192 return (i < 600); -193 } +176 { +177 std::string b = ''; +178 for (int i = 0; i < a.length(); i++) +179 if ((a[i] != '\r') && (a[i] != '\0') && (a[i] != 7)) +180 b = b + a[i]; +181 std::stringstream stream(recvq); +182 stream << b; +183 recvq = stream.str(); +184 int i = 0; +185 // count the size of the first line in the buffer. +186 while (i < recvq.length()) +187 { +188 if (recvq[i++] == '\n') +189 break; +190 } +191 if (recvq.length() > this->recvqmax) +192 { +193 this->SetWriteError('RecvQ exceeded'); +194 WriteOpers('*** User %s RecvQ of %d exceeds connect class maximum of %d',this->nick,recvq.length(),this->recvqmax); +195 } +196 // return false if we've had more than 600 characters WITHOUT +197 // a carriage return (this is BAD, drop the socket) +198 return (i < 600); +199 } .fi .SS "void userrec::AddWriteBuf (std::string data)" .PP -Adds to the user's write buffer. You may add any amount of text up to this users sendq value, if you exceed the sendq value, \fBSetWriteError()\fP will be called to set the users error string to 'SendQ exceeded', and further buffer adds will be dropped.Definition at line 225 of file users.cpp. +Adds to the user's write buffer. You may add any amount of text up to this users sendq value, if you exceed the sendq value, \fBSetWriteError()\fP will be called to set the users error string to 'SendQ exceeded', and further buffer adds will be dropped.Definition at line 231 of file users.cpp. .PP References GetWriteError(), sendq, sendqmax, and SetWriteError(). .PP .nf -226 { -227 if (this->GetWriteError() != '') -228 return; -229 if (sendq.length() + data.length() > this->sendqmax) -230 { -231 WriteOpers('*** User %s SendQ of %d exceeds connect class maximum of %d',this->nick,sendq.length() + data.length(),this->sendqmax); -232 this->SetWriteError('SendQ exceeded'); -233 return; -234 } -235 std::stringstream stream; -236 stream << sendq << data; -237 sendq = stream.str(); -238 } +232 { +233 if (this->GetWriteError() != '') +234 return; +235 if (sendq.length() + data.length() > this->sendqmax) +236 { +237 WriteOpers('*** User %s SendQ of %d exceeds connect class maximum of %d',this->nick,sendq.length() + data.length(),this->sendqmax); +238 this->SetWriteError('SendQ exceeded'); +239 return; +240 } +241 std::stringstream stream; +242 stream << sendq << data; +243 sendq = stream.str(); +244 } .fi .SS "bool userrec::BufferIsReady ()" .PP -This method returns true if the buffer contains at least one carriage return character (e.g. one complete line may be read)Definition at line 195 of file users.cpp. +This method returns true if the buffer contains at least one carriage return character (e.g. one complete line may be read)Definition at line 201 of file users.cpp. .PP References recvq. .PP .nf -196 { -197 for (int i = 0; i < recvq.length(); i++) -198 if (recvq[i] == '\n') -199 return true; -200 return false; -201 } +202 { +203 for (int i = 0; i < recvq.length(); i++) +204 if (recvq[i] == '\n') +205 return true; +206 return false; +207 } .fi .SS "void userrec::ClearBuffer ()" .PP -This function clears the entire buffer by setting it to an empty string. Definition at line 203 of file users.cpp. +This function clears the entire buffer by setting it to an empty string. Definition at line 209 of file users.cpp. .PP References recvq. .PP Referenced by Server::PseudoToUser(), and Server::UserToPseudo(). .PP .nf -204 { -205 recvq = ''; -206 } +210 { +211 recvq = ''; +212 } .fi .SS "void userrec::FlushWriteBuf ()" .PP -Flushes as much of the user's buffer to the file descriptor as possible. This function may not always flush the entire buffer, rather instead as much of it as it possibly can. If the send() call fails to send the entire buffer, the buffer position is advanced forwards and the rest of the data sent at the next call to this method.Definition at line 241 of file users.cpp. +Flushes as much of the user's buffer to the file descriptor as possible. This function may not always flush the entire buffer, rather instead as much of it as it possibly can. If the send() call fails to send the entire buffer, the buffer position is advanced forwards and the rest of the data sent at the next call to this method.Definition at line 247 of file users.cpp. .PP References connection::bytes_out, connection::cmds_out, sendq, and SetWriteError(). .PP .nf -242 { -243 if (sendq.length()) -244 { -245 char* tb = (char*)this->sendq.c_str(); -246 int n_sent = write(this->fd,tb,this->sendq.length()); -247 if (n_sent == -1) -248 { -249 this->SetWriteError(strerror(errno)); -250 } -251 else -252 { -253 // advance the queue -254 tb += n_sent; -255 this->sendq = tb; -256 // update the user's stats counters -257 this->bytes_out += n_sent; -258 this->cmds_out++; -259 } -260 } -261 } +248 { +249 if (sendq.length()) +250 { +251 char* tb = (char*)this->sendq.c_str(); +252 int n_sent = write(this->fd,tb,this->sendq.length()); +253 if (n_sent == -1) +254 { +255 this->SetWriteError(strerror(errno)); +256 } +257 else +258 { +259 // advance the queue +260 tb += n_sent; +261 this->sendq = tb; +262 // update the user's stats counters +263 this->bytes_out += n_sent; +264 this->cmds_out++; +265 } +266 } +267 } .fi .SS "std::string userrec::GetBuffer ()" .PP -This method returns the first available string at the tail end of the buffer and advances the tail end of the buffer past the string. This means it is a one way operation in a similar way to strtok(), and multiple calls return multiple lines if they are available. The results of this function if there are no lines to be read are unknown, always use \fBBufferIsReady()\fP to check if it is ok to read the buffer before calling \fBGetBuffer()\fP.Definition at line 208 of file users.cpp. +This method returns the first available string at the tail end of the buffer and advances the tail end of the buffer past the string. This means it is a one way operation in a similar way to strtok(), and multiple calls return multiple lines if they are available. The results of this function if there are no lines to be read are unknown, always use \fBBufferIsReady()\fP to check if it is ok to read the buffer before calling \fBGetBuffer()\fP.Definition at line 214 of file users.cpp. .PP References recvq. .PP .nf -209 { -210 if (recvq == '') -211 return ''; -212 char* line = (char*)recvq.c_str(); -213 std::string ret = ''; -214 while ((*line != '\n') && (strlen(line))) -215 { -216 ret = ret + *line; -217 line++; -218 } -219 if ((*line == '\n') || (*line == '\r')) -220 line++; -221 recvq = line; -222 return ret; -223 } +215 { +216 if (recvq == '') +217 return ''; +218 char* line = (char*)recvq.c_str(); +219 std::string ret = ''; +220 while ((*line != '\n') && (strlen(line))) +221 { +222 ret = ret + *line; +223 line++; +224 } +225 if ((*line == '\n') || (*line == '\r')) +226 line++; +227 recvq = line; +228 return ret; +229 } .fi .SS "char * userrec::GetFullHost ()\fC [virtual]\fP" .PP -Returns the full displayed host of the user This member function returns the hostname of the user as seen by other users on the server, in nick!identhost form. Definition at line 61 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 62 of file users.cpp. .PP References dhost, ident, nick, and result. .PP .nf -62 { -63 snprintf(result,MAXBUF,'%s!%s@%s',nick,ident,dhost); -64 return result; -65 } +63 { +64 snprintf(result,MAXBUF,'%s!%s@%s',nick,ident,dhost); +65 return result; +66 } .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 68 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 69 of file users.cpp. .PP References connection::host, ident, nick, and result. .PP .nf -69 { -70 snprintf(result,MAXBUF,'%s!%s@%s',nick,ident,host); -71 return result; -72 } +70 { +71 snprintf(result,MAXBUF,'%s!%s@%s',nick,ident,host); +72 return result; +73 } +.fi +.SS "\fBInvitedList\fP * userrec::GetInviteList ()" +.PP +Returns the list of channels this user has been invited to but has not yet joined. Definition at line 89 of file users.cpp. +.PP +References InvitedList, and invites. +.PP +.nf +90 { +91 return &invites; +92 } .fi .SS "std::string userrec::GetWriteError ()" .PP -Returns the write error which last occured on this connection or an empty string if none occured. Definition at line 271 of file users.cpp. +Returns the write error which last occured on this connection or an empty string if none occured. Definition at line 277 of file users.cpp. .PP References WriteError. .PP Referenced by AddWriteBuf(). .PP .nf -272 { -273 return this->WriteError; -274 } +278 { +279 return this->WriteError; +280 } .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 117 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 123 of file users.cpp. .PP References config_f, and DEBUG. .PP .nf -118 { -119 char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF]; -120 char* mycmd; -121 char* savept; -122 char* savept2; -123 -124 // are they even an oper at all? -125 if (strchr(this->modes,'o')) -126 { -127 log(DEBUG,'*** HasPermission: %s is an oper',this->nick); -128 for (int j =0; j < ConfValueEnum('type',&config_f); j++) -129 { -130 ConfValue('type','name',j,TypeName,&config_f); -131 if (!strcmp(TypeName,this->oper)) -132 { -133 log(DEBUG,'*** HasPermission: %s is an oper of type '%s'',this->nick,this->oper); -134 ConfValue('type','classes',j,Classes,&config_f); -135 char* myclass = strtok_r(Classes,' ',&savept); -136 while (myclass) -137 { -138 log(DEBUG,'*** HasPermission: checking classtype '%s'',myclass); -139 for (int k =0; k < ConfValueEnum('class',&config_f); k++) -140 { -141 ConfValue('class','name',k,ClassName,&config_f); -142 if (!strcmp(ClassName,myclass)) -143 { -144 ConfValue('class','commands',k,CommandList,&config_f); -145 log(DEBUG,'*** HasPermission: found class named %s with commands: '%s'',ClassName,CommandList); -146 -147 -148 mycmd = strtok_r(CommandList,' ',&savept2); -149 while (mycmd) -150 { -151 if (!strcasecmp(mycmd,command)) -152 { -153 log(DEBUG,'*** Command %s found, returning true',command); -154 return true; -155 } -156 mycmd = strtok_r(NULL,' ',&savept2); -157 } -158 } -159 } -160 myclass = strtok_r(NULL,' ',&savept); -161 } -162 } -163 } -164 } -165 return false; -166 } +124 { +125 char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF]; +126 char* mycmd; +127 char* savept; +128 char* savept2; +129 +130 // are they even an oper at all? +131 if (strchr(this->modes,'o')) +132 { +133 log(DEBUG,'*** HasPermission: %s is an oper',this->nick); +134 for (int j =0; j < ConfValueEnum('type',&config_f); j++) +135 { +136 ConfValue('type','name',j,TypeName,&config_f); +137 if (!strcmp(TypeName,this->oper)) +138 { +139 log(DEBUG,'*** HasPermission: %s is an oper of type '%s'',this->nick,this->oper); +140 ConfValue('type','classes',j,Classes,&config_f); +141 char* myclass = strtok_r(Classes,' ',&savept); +142 while (myclass) +143 { +144 log(DEBUG,'*** HasPermission: checking classtype '%s'',myclass); +145 for (int k =0; k < ConfValueEnum('class',&config_f); k++) +146 { +147 ConfValue('class','name',k,ClassName,&config_f); +148 if (!strcmp(ClassName,myclass)) +149 { +150 ConfValue('class','commands',k,CommandList,&config_f); +151 log(DEBUG,'*** HasPermission: found class named %s with commands: '%s'',ClassName,CommandList); +152 +153 +154 mycmd = strtok_r(CommandList,' ',&savept2); +155 while (mycmd) +156 { +157 if (!strcasecmp(mycmd,command)) +158 { +159 log(DEBUG,'*** Command %s found, returning true',command); +160 return true; +161 } +162 mycmd = strtok_r(NULL,' ',&savept2); +163 } +164 } +165 } +166 myclass = strtok_r(NULL,' ',&savept); +167 } +168 } +169 } +170 } +171 return false; +172 } .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 88 of file users.cpp. +Adds a channel to a users invite list (invites them to a channel). Definition at line 94 of file users.cpp. .PP References Invited::channel, and invites. .PP .nf -89 { -90 Invited i; -91 strlcpy(i.channel,channel,CHANMAX); -92 invites.push_back(i); -93 } +95 { +96 Invited i; +97 strlcpy(i.channel,channel,CHANMAX); +98 invites.push_back(i); +99 } .fi .SS "bool userrec::IsInvited (char * channel)\fC [virtual]\fP" .PP -Returns true if a user is invited to a channel. Definition at line 74 of file users.cpp. +Returns true if a user is invited to a channel. Definition at line 75 of file users.cpp. .PP References invites. .PP .nf -75 { -76 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) -77 { -78 if (i->channel) { -79 if (!strcasecmp(i->channel,channel)) -80 { -81 return true; -82 } -83 } -84 } -85 return false; -86 } +76 { +77 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) +78 { +79 if (i->channel) { +80 if (!strcasecmp(i->channel,channel)) +81 { +82 return true; +83 } +84 } +85 } +86 return false; +87 } .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 95 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 101 of file users.cpp. .PP References DEBUG, and invites. .PP .nf -96 { -97 log(DEBUG,'Removing invites'); -98 if (channel) -99 { -100 if (invites.size()) -101 { -102 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) -103 { -104 if (i->channel) -105 { -106 if (!strcasecmp(i->channel,channel)) -107 { -108 invites.erase(i); -109 return; -110 } -111 } -112 } -113 } -114 } -115 } +102 { +103 log(DEBUG,'Removing invites'); +104 if (channel) +105 { +106 if (invites.size()) +107 { +108 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) +109 { +110 if (i->channel) +111 { +112 if (!strcasecmp(i->channel,channel)) +113 { +114 invites.erase(i); +115 return; +116 } +117 } +118 } +119 } +120 } +121 } .fi .SS "void userrec::SetWriteError (std::string error)" .PP -Sets the write error for a connection. This is done because the actual disconnect of a client may occur at an inopportune time such as half way through /LIST output. The WriteErrors of clients are checked at a more ideal time (in the mainloop) and errored clients purged.Definition at line 263 of file users.cpp. +Sets the write error for a connection. This is done because the actual disconnect of a client may occur at an inopportune time such as half way through /LIST output. The WriteErrors of clients are checked at a more ideal time (in the mainloop) and errored clients purged.Definition at line 269 of file users.cpp. .PP References DEBUG, and WriteError. .PP Referenced by AddBuffer(), AddWriteBuf(), and FlushWriteBuf(). .PP .nf -264 { -265 log(DEBUG,'Setting error string for %s to '%s'',this->nick,error.c_str()); -266 // don't try to set the error twice, its already set take the first string. -267 if (this->WriteError == '') -268 this->WriteError = error; -269 } +270 { +271 log(DEBUG,'Setting error string for %s to '%s'',this->nick,error.c_str()); +272 // don't try to set the error twice, its already set take the first string. +273 if (this->WriteError == '') +274 this->WriteError = error; +275 } .fi .SH "Member Data Documentation" .PP @@ -576,7 +591,7 @@ Referenced by GetFullHost(), GetFullRealHost(), Server::PseudoToUser(), userrec( .PP A list of channels the user has a pending invite to. Definition at line 114 of file users.h. .PP -Referenced by InviteTo(), IsInvited(), RemoveInvite(), and userrec(). +Referenced by GetInviteList(), InviteTo(), IsInvited(), RemoveInvite(), and userrec(). .SS "int \fBuserrec::lines_in\fP" .PP Flood counters. Definition at line 204 of file users.h. diff --git a/docs/man/man3/users.cpp.3 b/docs/man/man3/users.cpp.3 index 72cf2e6fb..e8d74655d 100644 --- a/docs/man/man3/users.cpp.3 +++ b/docs/man/man3/users.cpp.3 @@ -1,4 +1,4 @@ -.TH "users.cpp" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "users.cpp" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -18,6 +18,8 @@ users.cpp \- .br \fC#include 'inspstring.h'\fP .br +\fC#include 'helperfuncs.h'\fP +.br .SS "Variables" @@ -33,10 +35,10 @@ users.cpp \- .PP .SS "std::stringstream \fBconfig_f\fP" .PP -Definition at line 24 of file users.cpp. +Definition at line 25 of file users.cpp. .SS "time_t \fBTIME\fP" .PP -Definition at line 26 of file users.cpp. +Definition at line 27 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 ea393b917..234320343 100644 --- a/docs/man/man3/users.h.3 +++ b/docs/man/man3/users.h.3 @@ -1,4 +1,4 @@ -.TH "users.h" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "users.h" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -99,6 +99,8 @@ Holds a complete list of all allow and deny tags from the configuration file (co .SS "typedef std::vector<\fBInvited\fP> \fBInvitedList\fP" .PP Holds a complete list of all channels to which a user has been invited and has not yet joined. Definition at line 94 of file users.h. +.PP +Referenced by userrec::GetInviteList(). .SH "Author" .PP Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/man3/xline.h.3 b/docs/man/man3/xline.h.3 index 49c111470..65e55d871 100644 --- a/docs/man/man3/xline.h.3 +++ b/docs/man/man3/xline.h.3 @@ -1,4 +1,4 @@ -.TH "xline.h" 3 "13 May 2005" "InspIRCd" \" -*- nroff -*- +.TH "xline.h" 3 "15 May 2005" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/module-doc/annotated.html b/docs/module-doc/annotated.html index ebb8d5dd2..c72a198b1 100644 --- a/docs/module-doc/annotated.html +++ b/docs/module-doc/annotated.html @@ -4,11 +4,12 @@ - +

InspIRCd Compound List

Here are the classes, structs, unions and interfaces with brief descriptions: + @@ -24,9 +25,10 @@ - + + @@ -39,7 +41,7 @@ - + @@ -47,7 +49,7 @@
AdminHolds /ADMIN data This class contains the admin details of the local server
BanItemA subclass of HostItem designed to hold channel bans (+b)
chanrecHolds all relevent information for a channel
char_traits
classbaseThe base class for all inspircd classes
command_tA structure that defines a command
ConfigReaderAllows reading of values from configuration files This class allows a module to read from either the main configuration file (inspircd.conf) or from a module-specified configuration file
FileReaderCaches a text file into memory and can be used to retrieve lines from it
GLineGLine class
HostItemHolds an entry for a ban list, exemption list, or invite list
InAddr_HashComp
InAddr_HashCompThis class returns true if two in_addr structs match
InvitedHolds a channel name to which a user has been invited
InviteItemA subclass of HostItem designed to hold channel invites (+I)
irc::irc_char_traitsThe irc_char_traits class is used for RFC-style comparison of strings
ircd_connectorEach connection has one or more of these each represents ONE outbound connection to another ircd so each inbound has multiple outbounds
KLineKLine class
ModeParameterHolds a custom parameter to a module-defined channel mode e.g
RequestUnicast message directed at a given module
ServerAllows server output and query functions This class contains methods which allow a module to query the state of the irc server, and produce output to users and other servers
serverrecA class that defines the local server or a remote server
StrHashComp
StrHashCompThis class returns true if two strings match
ucrecHolds a user's modes on a channel This class associates a users privilages with a channel by creating a pointer link between a userrec and chanrec class
userrecHolds all information about a user This class stores all information about a user connected to the irc server
VersionHolds a module's Version information The four members (set by the constructor only) indicate details as to the version number of a module
XLineXLine is the base class for ban lines such as G lines and K lines
ZLineZLine class
-
Generated on Fri May 13 15:49:18 2005 for InspIRCd by +
Generated on Sun May 15 17:02:54 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/base_8h-source.html b/docs/module-doc/base_8h-source.html index bd2bbd269..eb978937b 100644 --- a/docs/module-doc/base_8h-source.html +++ b/docs/module-doc/base_8h-source.html @@ -4,7 +4,7 @@ - +

base.h

Go to the documentation of this file.
00001 /*       +------------------------------------+
 00002  *       | Inspire Internet Relay Chat Daemon |
 00003  *       +------------------------------------+
@@ -55,7 +55,7 @@
 00079 
 00080 #endif
 00081 
-

Generated on Fri May 13 15:48:40 2005 for InspIRCd by +
Generated on Sun May 15 17:02:04 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/base_8h.html b/docs/module-doc/base_8h.html index eadd92c54..cf65200b7 100644 --- a/docs/module-doc/base_8h.html +++ b/docs/module-doc/base_8h.html @@ -4,7 +4,7 @@ - +

base.h File Reference

#include "inspircd_config.h"
#include <time.h>
#include <map>
@@ -61,7 +61,7 @@ This graph shows which files directly or indirectly include this file:

25 of file base.h. -
Generated on Fri May 13 15:48:43 2005 for InspIRCd by +
Generated on Sun May 15 17:02:09 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/channels_8cpp-source.html b/docs/module-doc/channels_8cpp-source.html index 19e1b9b67..c9117360a 100644 --- a/docs/module-doc/channels_8cpp-source.html +++ b/docs/module-doc/channels_8cpp-source.html @@ -4,7 +4,7 @@ - +

channels.cpp

Go to the documentation of this file.
00001 /*       +------------------------------------+
 00002  *       | Inspire Internet Relay Chat Daemon |
 00003  *       +------------------------------------+
@@ -26,216 +26,211 @@
 00019 #include "inspircd_util.h"
 00020 #include "inspircd_config.h"
 00021 #include <unistd.h>
-00022 #include <fcntl.h>
-00023 #include <sys/errno.h>
-00024 #include <sys/ioctl.h>
-00025 #include <sys/utsname.h>
-00026 #include <cstdio>
-00027 #include <time.h>
-00028 #include <string>
-00029 #ifdef GCC3
-00030 #include <ext/hash_map>
-00031 #else
-00032 #include <hash_map>
-00033 #endif
-00034 #include <map>
-00035 #include <sstream>
-00036 #include <vector>
-00037 #include <errno.h>
-00038 #include <deque>
-00039 #include <errno.h>
-00040 #include <unistd.h>
-00041 #include <sched.h>
-00042 #include "connection.h"
-00043 #include "users.h"
-00044 #include "servers.h"
-00045 #include "ctables.h"
-00046 #include "globals.h"
-00047 #include "modules.h"
-00048 #include "dynamic.h"
-00049 #include "wildcard.h"
-00050 #include "message.h"
-00051 #include "mode.h"
-00052 #include "xline.h"
-00053 #include "inspstring.h"
-00054 
-00055 #ifdef GCC3
-00056 #define nspace __gnu_cxx
-00057 #else
-00058 #define nspace std
-00059 #endif
-00060 
-00061 using namespace std;
-00062 
-00063 extern int MODCOUNT;
-00064 extern std::vector<Module*> modules;
-00065 extern std::vector<ircd_module*> factory;
-00066 
-00067 extern int LogLevel;
-00068 extern char ServerName[MAXBUF];
-00069 extern char Network[MAXBUF];
-00070 extern char ServerDesc[MAXBUF];
-00071 extern char AdminName[MAXBUF];
-00072 extern char AdminEmail[MAXBUF];
-00073 extern char AdminNick[MAXBUF];
-00074 extern char diepass[MAXBUF];
-00075 extern char restartpass[MAXBUF];
-00076 extern char motd[MAXBUF];
-00077 extern char rules[MAXBUF];
-00078 extern char list[MAXBUF];
-00079 extern char PrefixQuit[MAXBUF];
-00080 extern char DieValue[MAXBUF];
-00081 
-00082 extern int debugging;
-00083 extern int WHOWAS_STALE;
-00084 extern int WHOWAS_MAX;
-00085 extern int DieDelay;
-00086 extern time_t startup_time;
-00087 extern int NetBufferSize;
-00088 int MaxWhoResults;
-00089 extern time_t nb_start;
-00090 
-00091 extern std::vector<int> fd_reap;
-00092 extern std::vector<std::string> module_names;
-00093 
-00094 extern int boundPortCount;
-00095 extern int portCount;
-00096 extern int SERVERportCount;
-00097 extern int ports[MAXSOCKS];
-00098 extern int defaultRoute;
+00022 #include <sys/errno.h>
+00023 #include <sys/ioctl.h>
+00024 #include <sys/utsname.h>
+00025 #include <time.h>
+00026 #include <string>
+00027 #ifdef GCC3
+00028 #include <ext/hash_map>
+00029 #else
+00030 #include <hash_map>
+00031 #endif
+00032 #include <map>
+00033 #include <sstream>
+00034 #include <vector>
+00035 #include <deque>
+00036 #include "connection.h"
+00037 #include "users.h"
+00038 #include "servers.h"
+00039 #include "ctables.h"
+00040 #include "globals.h"
+00041 #include "modules.h"
+00042 #include "dynamic.h"
+00043 #include "wildcard.h"
+00044 #include "message.h"
+00045 #include "mode.h"
+00046 #include "xline.h"
+00047 #include "inspstring.h"
+00048 #include "helperfuncs.h"
+00049 
+00050 #ifdef GCC3
+00051 #define nspace __gnu_cxx
+00052 #else
+00053 #define nspace std
+00054 #endif
+00055 
+00056 using namespace std;
+00057 
+00058 extern int MODCOUNT;
+00059 extern std::vector<Module*> modules;
+00060 extern std::vector<ircd_module*> factory;
+00061 
+00062 extern int LogLevel;
+00063 extern char ServerName[MAXBUF];
+00064 extern char Network[MAXBUF];
+00065 extern char ServerDesc[MAXBUF];
+00066 extern char AdminName[MAXBUF];
+00067 extern char AdminEmail[MAXBUF];
+00068 extern char AdminNick[MAXBUF];
+00069 extern char diepass[MAXBUF];
+00070 extern char restartpass[MAXBUF];
+00071 extern char motd[MAXBUF];
+00072 extern char rules[MAXBUF];
+00073 extern char list[MAXBUF];
+00074 extern char PrefixQuit[MAXBUF];
+00075 extern char DieValue[MAXBUF];
+00076 
+00077 extern int debugging;
+00078 extern int WHOWAS_STALE;
+00079 extern int WHOWAS_MAX;
+00080 extern int DieDelay;
+00081 extern time_t startup_time;
+00082 extern int NetBufferSize;
+00083 int MaxWhoResults;
+00084 extern time_t nb_start;
+00085 
+00086 extern std::vector<int> fd_reap;
+00087 extern std::vector<std::string> module_names;
+00088 
+00089 extern int boundPortCount;
+00090 extern int portCount;
+00091 extern int SERVERportCount;
+00092 extern int ports[MAXSOCKS];
+00093 extern int defaultRoute;
+00094 
+00095 extern std::vector<long> auth_cookies;
+00096 extern std::stringstream config_f;
+00097 
+00098 extern serverrec* me[32];
 00099 
-00100 extern std::vector<long> auth_cookies;
-00101 extern std::stringstream config_f;
-00102 
-00103 extern serverrec* me[32];
-00104 
-00105 extern FILE *log_file;
-00106 
-00107 extern time_t TIME;
-00108 
-00109 using namespace std;
-00110 
-00111 std::vector<ModeParameter> custom_mode_params;
-00112 
-00113 chanrec::chanrec()
-00114 {
-00115         strcpy(name,"");
-00116         strcpy(custom_modes,"");
-00117         strcpy(topic,"");
-00118         strcpy(setby,"");
-00119         strcpy(key,"");
-00120         created = topicset = limit = 0;
-00121         binarymodes = 0;
-00122         internal_userlist.clear();
-00123 }
-00124 
-00125 void chanrec::SetCustomMode(char mode,bool mode_on)
-00126 {
-00127         if (mode_on) {
-00128                 static char m[3];
-00129                 m[0] = mode;
-00130                 m[1] = '\0';
-00131                 if (!strchr(this->custom_modes,mode))
-00132                 {
-00133                         strlcat(custom_modes,m,MAXMODES);
-00134                 }
-00135                 log(DEBUG,"Custom mode %c set",mode);
-00136         }
-00137         else {
+00100 extern FILE *log_file;
+00101 
+00102 extern time_t TIME;
+00103 
+00104 using namespace std;
+00105 
+00106 std::vector<ModeParameter> custom_mode_params;
+00107 
+00108 chanrec::chanrec()
+00109 {
+00110         strcpy(name,"");
+00111         strcpy(custom_modes,"");
+00112         strcpy(topic,"");
+00113         strcpy(setby,"");
+00114         strcpy(key,"");
+00115         created = topicset = limit = 0;
+00116         binarymodes = 0;
+00117         internal_userlist.clear();
+00118 }
+00119 
+00120 void chanrec::SetCustomMode(char mode,bool mode_on)
+00121 {
+00122         if (mode_on) {
+00123                 static char m[3];
+00124                 m[0] = mode;
+00125                 m[1] = '\0';
+00126                 if (!strchr(this->custom_modes,mode))
+00127                 {
+00128                         strlcat(custom_modes,m,MAXMODES);
+00129                 }
+00130                 log(DEBUG,"Custom mode %c set",mode);
+00131         }
+00132         else {
+00133 
+00134                 std::string a = this->custom_modes;
+00135                 int pos = a.find(mode);
+00136                 a.erase(pos,1);
+00137                 strncpy(this->custom_modes,a.c_str(),MAXMODES);
 00138 
-00139                 std::string a = this->custom_modes;
-00140                 int pos = a.find(mode);
-00141                 a.erase(pos,1);
-00142                 strncpy(this->custom_modes,a.c_str(),MAXMODES);
+00139                 log(DEBUG,"Custom mode %c removed: modelist='%s'",mode,this->custom_modes);
+00140                 this->SetCustomModeParam(mode,"",false);
+00141         }
+00142 }
 00143 
-00144                 log(DEBUG,"Custom mode %c removed: modelist='%s'",mode,this->custom_modes);
-00145                 this->SetCustomModeParam(mode,"",false);
-00146         }
-00147 }
-00148 
-00149 
-00150 void chanrec::SetCustomModeParam(char mode,char* parameter,bool mode_on)
-00151 {
-00152 
-00153         log(DEBUG,"SetCustomModeParam called");
-00154         ModeParameter M;
-00155         M.mode = mode;
-00156         strlcpy(M.channel,this->name,CHANMAX);
-00157         strlcpy(M.parameter,parameter,MAXBUF);
-00158         if (mode_on)
+00144 
+00145 void chanrec::SetCustomModeParam(char mode,char* parameter,bool mode_on)
+00146 {
+00147 
+00148         log(DEBUG,"SetCustomModeParam called");
+00149         ModeParameter M;
+00150         M.mode = mode;
+00151         strlcpy(M.channel,this->name,CHANMAX);
+00152         strlcpy(M.parameter,parameter,MAXBUF);
+00153         if (mode_on)
+00154         {
+00155                 log(DEBUG,"Custom mode parameter %c %s added",mode,parameter);
+00156                 custom_mode_params.push_back(M);
+00157         }
+00158         else
 00159         {
-00160                 log(DEBUG,"Custom mode parameter %c %s added",mode,parameter);
-00161                 custom_mode_params.push_back(M);
-00162         }
-00163         else
-00164         {
-00165                 if (custom_mode_params.size())
-00166                 {
-00167                         for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++)
-00168                         {
-00169                                 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
-00170                                 {
-00171                                         log(DEBUG,"Custom mode parameter %c %s removed",mode,parameter);
-00172                                         custom_mode_params.erase(i);
-00173                                         return;
-00174                                 }
-00175                         }
-00176                 }
-00177                 log(DEBUG,"*** BUG *** Attempt to remove non-existent mode parameter!");
-00178         }
-00179 }
-00180 
-00181 bool chanrec::IsCustomModeSet(char mode)
-00182 {
-00183         log(DEBUG,"Checking ISCustomModeSet: %c %s",mode,this->custom_modes);
-00184         return (strchr(this->custom_modes,mode) != 0);
-00185 }
-00186 
-00187 std::string chanrec::GetModeParameter(char mode)
-00188 {
-00189         if (custom_mode_params.size())
-00190         {
-00191                 for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++)
-00192                 {
-00193                         if ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
-00194                         {
-00195                                 return i->parameter;
-00196                         }
-00197                 }
-00198         }
-00199         return "";
+00160                 if (custom_mode_params.size())
+00161                 {
+00162                         for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++)
+00163                         {
+00164                                 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
+00165                                 {
+00166                                         log(DEBUG,"Custom mode parameter %c %s removed",mode,parameter);
+00167                                         custom_mode_params.erase(i);
+00168                                         return;
+00169                                 }
+00170                         }
+00171                 }
+00172                 log(DEBUG,"*** BUG *** Attempt to remove non-existent mode parameter!");
+00173         }
+00174 }
+00175 
+00176 bool chanrec::IsCustomModeSet(char mode)
+00177 {
+00178         log(DEBUG,"Checking ISCustomModeSet: %c %s",mode,this->custom_modes);
+00179         return (strchr(this->custom_modes,mode) != 0);
+00180 }
+00181 
+00182 std::string chanrec::GetModeParameter(char mode)
+00183 {
+00184         if (custom_mode_params.size())
+00185         {
+00186                 for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++)
+00187                 {
+00188                         if ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
+00189                         {
+00190                                 return i->parameter;
+00191                         }
+00192                 }
+00193         }
+00194         return "";
+00195 }
+00196 
+00197 long chanrec::GetUserCounter()
+00198 {
+00199         return (this->internal_userlist.size());
 00200 }
 00201 
-00202 long chanrec::GetUserCounter()
+00202 void chanrec::AddUser(char* castuser)
 00203 {
-00204         return (this->internal_userlist.size());
-00205 }
-00206 
-00207 void chanrec::AddUser(char* castuser)
-00208 {
-00209         internal_userlist.push_back(castuser);
-00210         log(DEBUG,"Added casted user to channel's internal list");
-00211 }
-00212 
-00213 void chanrec::DelUser(char* castuser)
-00214 {
-00215         for (std::vector<char*>::iterator a = internal_userlist.begin(); a < internal_userlist.end(); a++)
-00216         {
-00217                 if (*a == castuser)
-00218                 {
-00219                         log(DEBUG,"Removed casted user from channel's internal list");
-00220                         internal_userlist.erase(a);
-00221                         return;
-00222                 }
-00223         }
-00224         log(DEBUG,"BUG BUG BUG! Attempt to remove an uncasted user from the internal list of %s!",name);
+00204         internal_userlist.push_back(castuser);
+00205         log(DEBUG,"Added casted user to channel's internal list");
+00206 }
+00207 
+00208 void chanrec::DelUser(char* castuser)
+00209 {
+00210         for (std::vector<char*>::iterator a = internal_userlist.begin(); a < internal_userlist.end(); a++)
+00211         {
+00212                 if (*a == castuser)
+00213                 {
+00214                         log(DEBUG,"Removed casted user from channel's internal list");
+00215                         internal_userlist.erase(a);
+00216                         return;
+00217                 }
+00218         }
+00219         log(DEBUG,"BUG BUG BUG! Attempt to remove an uncasted user from the internal list of %s!",name);
+00220 }
+00221 
+00222 std::vector<char*> *chanrec::GetUsers()
+00223 {
+00224         return &internal_userlist;
 00225 }
-00226 
-00227 std::vector<char*> *chanrec::GetUsers()
-00228 {
-00229         return &internal_userlist;
-00230 }
-

Generated on Fri May 13 15:48:40 2005 for InspIRCd by +
Generated on Sun May 15 17:02:04 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/channels_8cpp.html b/docs/module-doc/channels_8cpp.html index 0a8560ac3..e653d96c0 100644 --- a/docs/module-doc/channels_8cpp.html +++ b/docs/module-doc/channels_8cpp.html @@ -4,26 +4,22 @@ - +

channels.cpp File Reference

#include "inspircd.h"
#include "inspircd_io.h"
#include "inspircd_util.h"
#include "inspircd_config.h"
#include <unistd.h>
-#include <fcntl.h>
#include <sys/errno.h>
#include <sys/ioctl.h>
#include <sys/utsname.h>
-#include <cstdio>
#include <time.h>
#include <string>
#include <hash_map>
#include <map>
#include <sstream>
#include <vector>
-#include <errno.h>
#include <deque>
-#include <sched.h>
#include "connection.h"
#include "users.h"
#include "servers.h"
@@ -36,18 +32,19 @@ #include "mode.h"
#include "xline.h"
#include "inspstring.h"
+#include "helperfuncs.h"

Include dependency graph for channels.cpp:

Include dependency graph
- - - - - - - - + + + + + + + +

@@ -159,7 +156,7 @@ Include dependency graph for channels.cpp:

58 of file channels.cpp. +Definition at line 53 of file channels.cpp.

Variable Documentation

@@ -169,7 +166,7 @@ Definition at line 58 -
char AdminEmail[MAXBUF] + char AdminEmail[MAXBUF]
@@ -184,7 +181,7 @@ Definition at line 58

-Definition at line 72 of file channels.cpp. +Definition at line 67 of file channels.cpp.

@@ -193,7 +190,7 @@ Definition at line 72 -
char AdminName[MAXBUF] + char AdminName[MAXBUF]
@@ -208,7 +205,7 @@ Definition at line 72

-Definition at line 71 of file channels.cpp. +Definition at line 66 of file channels.cpp.

@@ -217,7 +214,7 @@ Definition at line 71 -
char AdminNick[MAXBUF] + char AdminNick[MAXBUF]
@@ -232,7 +229,7 @@ Definition at line 71

-Definition at line 73 of file channels.cpp. +Definition at line 68 of file channels.cpp.

@@ -241,7 +238,7 @@ Definition at line 73 -
std::vector<long> auth_cookies + std::vector<long> auth_cookies
@@ -256,7 +253,7 @@ Definition at line 73

-Definition at line 100 of file channels.cpp. +Definition at line 95 of file channels.cpp.

@@ -265,7 +262,7 @@ Definition at line 100 -
int boundPortCount + int boundPortCount
@@ -280,7 +277,7 @@ Definition at line 100

-Definition at line 94 of file channels.cpp. +Definition at line 89 of file channels.cpp.

@@ -304,9 +301,9 @@ Definition at line 94

-Definition at line 101 of file channels.cpp. +Definition at line 96 of file channels.cpp.

-Referenced by userrec::HasPermission(). +Referenced by userrec::HasPermission().

@@ -330,9 +327,9 @@ Referenced by userrec::HasPer

-Definition at line 111 of file channels.cpp. +Definition at line 106 of file channels.cpp.

-Referenced by chanrec::GetModeParameter(), and chanrec::SetCustomModeParam(). +Referenced by chanrec::GetModeParameter(), and chanrec::SetCustomModeParam().

@@ -341,7 +338,7 @@ Referenced by chanrec::Get -
int debugging + int debugging
@@ -356,7 +353,7 @@ Referenced by
chanrec::Get

-Definition at line 82 of file channels.cpp. +Definition at line 77 of file channels.cpp.

@@ -365,7 +362,7 @@ Definition at line 82 -
int defaultRoute + int defaultRoute
@@ -380,7 +377,7 @@ Definition at line 82

-Definition at line 98 of file channels.cpp. +Definition at line 93 of file channels.cpp.

@@ -389,7 +386,7 @@ Definition at line 98 -
int DieDelay + int DieDelay
@@ -404,7 +401,7 @@ Definition at line 98

-Definition at line 85 of file channels.cpp. +Definition at line 80 of file channels.cpp.

@@ -413,7 +410,7 @@ Definition at line 85 -
char diepass[MAXBUF] + char diepass[MAXBUF]
@@ -428,7 +425,7 @@ Definition at line 85

-Definition at line 74 of file channels.cpp. +Definition at line 69 of file channels.cpp.

@@ -437,7 +434,7 @@ Definition at line 74 -
char DieValue[MAXBUF] + char DieValue[MAXBUF]
@@ -452,7 +449,7 @@ Definition at line 74

-Definition at line 80 of file channels.cpp. +Definition at line 75 of file channels.cpp.

@@ -476,7 +473,7 @@ Definition at line 80

-Definition at line 65 of file channels.cpp. +Definition at line 60 of file channels.cpp.

@@ -485,7 +482,7 @@ Definition at line 65 -
std::vector<int> fd_reap + std::vector<int> fd_reap
@@ -500,7 +497,7 @@ Definition at line 65

-Definition at line 91 of file channels.cpp. +Definition at line 86 of file channels.cpp.

@@ -509,7 +506,7 @@ Definition at line 91 -
char list[MAXBUF] + char list[MAXBUF]
@@ -524,9 +521,9 @@ Definition at line 91

-Definition at line 78 of file channels.cpp. +Definition at line 73 of file channels.cpp.

-Referenced by Server::GetUsers(). +Referenced by Server::GetUsers().

@@ -535,7 +532,7 @@ Referenced by Server::GetUs -
FILE* log_file + FILE* log_file
@@ -550,7 +547,7 @@ Referenced by
Server::GetUs

-Definition at line 105 of file channels.cpp. +Definition at line 100 of file channels.cpp.

@@ -559,7 +556,7 @@ Definition at line 105 -
int LogLevel + int LogLevel
@@ -574,7 +571,7 @@ Definition at line 105

-Definition at line 67 of file channels.cpp. +Definition at line 62 of file channels.cpp.

@@ -583,7 +580,7 @@ Definition at line 67 -
int MaxWhoResults + int MaxWhoResults
@@ -598,7 +595,7 @@ Definition at line 67

-Definition at line 88 of file channels.cpp. +Definition at line 83 of file channels.cpp.

@@ -607,7 +604,7 @@ Definition at line 88 -
serverrec* me[32] + serverrec* me[32]
@@ -622,7 +619,7 @@ Definition at line 88

-Definition at line 103 of file channels.cpp. +Definition at line 98 of file channels.cpp.

@@ -631,7 +628,7 @@ Definition at line 103 -
int MODCOUNT = -1 + int MODCOUNT = -1
@@ -646,9 +643,9 @@ Definition at line 103

-Definition at line 1067 of file modules.cpp. +Definition at line 996 of file modules.cpp.

-Referenced by Server::FindModule(). +Referenced by Server::FindModule().

@@ -657,7 +654,7 @@ Referenced by Server::FindM -
std::vector<std::string> module_names + std::vector<std::string> module_names
@@ -672,9 +669,9 @@ Referenced by
Server::FindM

-Definition at line 92 of file channels.cpp. +Definition at line 87 of file channels.cpp.

-Referenced by Server::FindModule(). +Referenced by Server::FindModule().

@@ -698,9 +695,9 @@ Referenced by Server::FindM

-Definition at line 64 of file channels.cpp. +Definition at line 59 of file channels.cpp.

-Referenced by Server::FindModule(). +Referenced by Server::FindModule().

@@ -709,7 +706,7 @@ Referenced by Server::FindM -
char motd[MAXBUF] + char motd[MAXBUF]
@@ -724,7 +721,7 @@ Referenced by
Server::FindM

-Definition at line 76 of file channels.cpp. +Definition at line 71 of file channels.cpp.

@@ -733,7 +730,7 @@ Definition at line 76 -
time_t nb_start + time_t nb_start
@@ -748,7 +745,7 @@ Definition at line 76

-Definition at line 89 of file channels.cpp. +Definition at line 84 of file channels.cpp.

@@ -757,7 +754,7 @@ Definition at line 89 -
int NetBufferSize + int NetBufferSize
@@ -772,7 +769,7 @@ Definition at line 89

-Definition at line 87 of file channels.cpp. +Definition at line 82 of file channels.cpp.

@@ -781,7 +778,7 @@ Definition at line 87 -
char Network[MAXBUF] + char Network[MAXBUF]
@@ -796,7 +793,7 @@ Definition at line 87

-Definition at line 69 of file channels.cpp. +Definition at line 64 of file channels.cpp.

@@ -805,7 +802,7 @@ Definition at line 69 -
int portCount + int portCount
@@ -820,7 +817,7 @@ Definition at line 69

-Definition at line 95 of file channels.cpp. +Definition at line 90 of file channels.cpp.

@@ -829,7 +826,7 @@ Definition at line 95 -
int ports[MAXSOCKS] + int ports[MAXSOCKS]
@@ -844,7 +841,7 @@ Definition at line 95

-Definition at line 97 of file channels.cpp. +Definition at line 92 of file channels.cpp.

@@ -853,7 +850,7 @@ Definition at line 97 -
char PrefixQuit[MAXBUF] + char PrefixQuit[MAXBUF]
@@ -868,7 +865,7 @@ Definition at line 97

-Definition at line 79 of file channels.cpp. +Definition at line 74 of file channels.cpp.

@@ -877,7 +874,7 @@ Definition at line 79 -
char restartpass[MAXBUF] + char restartpass[MAXBUF]
@@ -892,7 +889,7 @@ Definition at line 79

-Definition at line 75 of file channels.cpp. +Definition at line 70 of file channels.cpp.

@@ -901,7 +898,7 @@ Definition at line 75 -
char rules[MAXBUF] + char rules[MAXBUF]
@@ -916,7 +913,7 @@ Definition at line 75

-Definition at line 77 of file channels.cpp. +Definition at line 72 of file channels.cpp.

@@ -925,7 +922,7 @@ Definition at line 77 -
char ServerDesc[MAXBUF] + char ServerDesc[MAXBUF]
@@ -940,7 +937,7 @@ Definition at line 77

-Definition at line 70 of file channels.cpp. +Definition at line 65 of file channels.cpp.

@@ -949,7 +946,7 @@ Definition at line 70 -
char ServerName[MAXBUF] + char ServerName[MAXBUF]
@@ -964,7 +961,7 @@ Definition at line 70

-Definition at line 68 of file channels.cpp. +Definition at line 63 of file channels.cpp.

@@ -973,7 +970,7 @@ Definition at line 68 -
int SERVERportCount + int SERVERportCount
@@ -988,7 +985,7 @@ Definition at line 68

-Definition at line 96 of file channels.cpp. +Definition at line 91 of file channels.cpp.

@@ -997,7 +994,7 @@ Definition at line 96 -
time_t startup_time + time_t startup_time
@@ -1012,7 +1009,7 @@ Definition at line 96

-Definition at line 86 of file channels.cpp. +Definition at line 81 of file channels.cpp.

@@ -1036,9 +1033,9 @@ Definition at line 86

-Definition at line 107 of file channels.cpp. +Definition at line 102 of file channels.cpp.

-Referenced by serverrec::serverrec(), and userrec::userrec(). +Referenced by serverrec::serverrec(), and userrec::userrec().

@@ -1047,7 +1044,7 @@ Referenced by serverrec::se -
int WHOWAS_MAX + int WHOWAS_MAX
@@ -1062,7 +1059,7 @@ Referenced by
serverrec::se

-Definition at line 84 of file channels.cpp. +Definition at line 79 of file channels.cpp.

@@ -1071,7 +1068,7 @@ Definition at line 84 -
int WHOWAS_STALE + int WHOWAS_STALE
@@ -1086,10 +1083,10 @@ Definition at line 84

-Definition at line 83 of file channels.cpp. +Definition at line 78 of file channels.cpp. -


Generated on Fri May 13 15:48:50 2005 for InspIRCd by +
Generated on Sun May 15 17:02:17 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/channels_8cpp__incl.gif b/docs/module-doc/channels_8cpp__incl.gif index 8e12d08e2..73931eed5 100644 Binary files a/docs/module-doc/channels_8cpp__incl.gif and b/docs/module-doc/channels_8cpp__incl.gif differ diff --git a/docs/module-doc/channels_8h-source.html b/docs/module-doc/channels_8h-source.html index 97845d1e3..2c736052b 100644 --- a/docs/module-doc/channels_8h-source.html +++ b/docs/module-doc/channels_8h-source.html @@ -4,7 +4,7 @@ - +

channels.h

Go to the documentation of this file.
00001 /*       +------------------------------------+
 00002  *       | Inspire Internet Relay Chat Daemon |
 00003  *       +------------------------------------+
@@ -146,7 +146,7 @@
 00238 
 00239 #endif
 00240 
-

Generated on Fri May 13 15:48:40 2005 for InspIRCd by +
Generated on Sun May 15 17:02:04 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/channels_8h.html b/docs/module-doc/channels_8h.html index 4250c94b5..58076771b 100644 --- a/docs/module-doc/channels_8h.html +++ b/docs/module-doc/channels_8h.html @@ -4,7 +4,7 @@ - +

channels.h File Reference

#include "inspircd_config.h"
#include "base.h"
#include <time.h>
@@ -433,7 +433,7 @@ Holds a complete invite list. Definition at line 95 of file channels.h. -
Generated on Fri May 13 15:48:52 2005 for InspIRCd by +
Generated on Sun May 15 17:02:20 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classAdmin-members.html b/docs/module-doc/classAdmin-members.html index 35e715bfb..fc99a14ef 100644 --- a/docs/module-doc/classAdmin-members.html +++ b/docs/module-doc/classAdmin-members.html @@ -4,7 +4,7 @@ - +

Admin Member List

This is the complete list of members for Admin, including all inherited members. @@ -13,7 +13,7 @@ -
Admin(std::string name, std::string email, std::string nick)Admin
ageclassbase
NameAdmin
NickAdmin
~classbase()classbase [inline]

Generated on Fri May 13 15:49:19 2005 for InspIRCd by +
Generated on Sun May 15 17:02:55 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classAdmin.html b/docs/module-doc/classAdmin.html index 54252f78a..588f9d9e5 100644 --- a/docs/module-doc/classAdmin.html +++ b/docs/module-doc/classAdmin.html @@ -4,7 +4,7 @@ - +

Admin Class Reference

Holds /ADMIN data This class contains the admin details of the local server. More...

@@ -82,9 +82,9 @@ Definition at line 123 of

-Definition at line 314 of file modules.cpp. +Definition at line 238 of file modules.cpp.

-

00314 : Name(name), Email(email), Nick(nick) { };
+
00238 : Name(name), Email(email), Nick(nick) { };
 
@@ -163,7 +163,7 @@ Definition at line 126 of
The documentation for this class was generated from the following files: -
Generated on Fri May 13 15:49:19 2005 for InspIRCd by +
Generated on Sun May 15 17:02:55 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classBanItem-members.html b/docs/module-doc/classBanItem-members.html index 80d27e7cd..caf6514f1 100644 --- a/docs/module-doc/classBanItem-members.html +++ b/docs/module-doc/classBanItem-members.html @@ -4,7 +4,7 @@ - +

BanItem Member List

This is the complete list of members for BanItem, including all inherited members. @@ -14,7 +14,7 @@ -
ageclassbase
classbase()classbase [inline]
set_timeHostItem
~classbase()classbase [inline]
~HostItem()HostItem [inline, virtual]

Generated on Fri May 13 15:49:20 2005 for InspIRCd by +
Generated on Sun May 15 17:02:57 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classBanItem.html b/docs/module-doc/classBanItem.html index 852b7aa0b..79cbe2fbc 100644 --- a/docs/module-doc/classBanItem.html +++ b/docs/module-doc/classBanItem.html @@ -4,7 +4,7 @@ - +

BanItem Class Reference

A subclass of HostItem designed to hold channel bans (+b). More...

@@ -30,7 +30,7 @@ A subclass of HostItem designed to h

Definition at line 52 of file channels.h.


The documentation for this class was generated from the following file: -
Generated on Fri May 13 15:49:20 2005 for InspIRCd by +
Generated on Sun May 15 17:02:57 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classConfigReader-members.html b/docs/module-doc/classConfigReader-members.html index 4d4508557..1e20db98d 100644 --- a/docs/module-doc/classConfigReader-members.html +++ b/docs/module-doc/classConfigReader-members.html @@ -4,7 +4,7 @@ - +

ConfigReader Member List

This is the complete list of members for ConfigReader, including all inherited members. @@ -24,7 +24,7 @@ -
ageclassbase
cacheConfigReader [protected]
Verify()ConfigReader
~classbase()classbase [inline]
~ConfigReader()ConfigReader

Generated on Fri May 13 15:49:26 2005 for InspIRCd by +
Generated on Sun May 15 17:03:09 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classConfigReader.html b/docs/module-doc/classConfigReader.html index cb2e2e0f5..166aab65b 100644 --- a/docs/module-doc/classConfigReader.html +++ b/docs/module-doc/classConfigReader.html @@ -4,7 +4,7 @@ - +

ConfigReader Class Reference

Allows reading of values from configuration files This class allows a module to read from either the main configuration file (inspircd.conf) or from a module-specified configuration file. More...

@@ -73,7 +73,7 @@ It may either be instantiated with one parameter or none. Constructing the class

-Definition at line 1147 of file modules.h.


Constructor & Destructor Documentation

+Definition at line 1150 of file modules.h.

Constructor & Destructor Documentation

@@ -103,17 +103,17 @@ Default constructor.

This constructor initialises the ConfigReader class to read the inspircd.conf file as specified when running ./configure.

-Definition at line 870 of file modules.cpp. +Definition at line 799 of file modules.cpp.

-References cache, CONF_FILE_NOT_FOUND, error, errorlog, and readerror. +References cache, CONF_FILE_NOT_FOUND, error, errorlog, and readerror.

-

00871 {
-00872         this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
-00873         this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
-00874         this->readerror = LoadConf(CONFIG_FILE,this->cache,this->errorlog);
-00875         if (!this->readerror)
-00876                 this->error = CONF_FILE_NOT_FOUND;
-00877 }
+
00800 {
+00801         this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
+00802         this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
+00803         this->readerror = LoadConf(CONFIG_FILE,this->cache,this->errorlog);
+00804         if (!this->readerror)
+00805                 this->error = CONF_FILE_NOT_FOUND;
+00806 }
 
@@ -147,17 +147,17 @@ Overloaded constructor.

This constructor initialises the ConfigReader class to read a user-specified config file

-Definition at line 889 of file modules.cpp. +Definition at line 818 of file modules.cpp.

-References cache, CONF_FILE_NOT_FOUND, error, errorlog, and readerror. +References cache, CONF_FILE_NOT_FOUND, error, errorlog, and readerror.

-

00890 {
-00891         this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
-00892         this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
-00893         this->readerror = LoadConf(filename.c_str(),this->cache,this->errorlog);
-00894         if (!this->readerror)
-00895                 this->error = CONF_FILE_NOT_FOUND;
-00896 };
+
00819 {
+00820         this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
+00821         this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
+00822         this->readerror = LoadConf(filename.c_str(),this->cache,this->errorlog);
+00823         if (!this->readerror)
+00824                 this->error = CONF_FILE_NOT_FOUND;
+00825 };
 
@@ -190,16 +190,16 @@ Default destructor.

This method destroys the ConfigReader class.

-Definition at line 880 of file modules.cpp. +Definition at line 809 of file modules.cpp.

-References cache, and errorlog. +References cache, and errorlog.

-

00881 {
-00882         if (this->cache)
-00883                 delete this->cache;
-00884         if (this->errorlog)
-00885                 delete this->errorlog;
-00886 }
+
00810 {
+00811         if (this->cache)
+00812                 delete this->cache;
+00813         if (this->errorlog)
+00814                 delete this->errorlog;
+00815 }
 
@@ -243,40 +243,40 @@ 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 967 of file modules.cpp. -

-References errorlog, connection::fd, and userrec::nick. -

-

00968 {
-00969         if (bail)
-00970         {
-00971                 printf("There were errors in your configuration:\n%s",errorlog->str().c_str());
-00972                 exit(0);
-00973         }
-00974         else
-00975         {
-00976                 char dataline[1024];
-00977                 if (user)
-00978                 {
-00979                         WriteServ(user->fd,"NOTICE %s :There were errors in the configuration file:",user->nick);
-00980                         while (!errorlog->eof())
-00981                         {
-00982                                 errorlog->getline(dataline,1024);
-00983                                 WriteServ(user->fd,"NOTICE %s :%s",user->nick,dataline);
-00984                         }
-00985                 }
-00986                 else
-00987                 {
-00988                         WriteOpers("There were errors in the configuration file:",user->nick);
-00989                         while (!errorlog->eof())
-00990                         {
-00991                                 errorlog->getline(dataline,1024);
-00992                                 WriteOpers(dataline);
-00993                         }
-00994                 }
-00995                 return;
-00996         }
-00997 }
+Definition at line 896 of file modules.cpp.
+

+References errorlog, connection::fd, and userrec::nick. +

+

00897 {
+00898         if (bail)
+00899         {
+00900                 printf("There were errors in your configuration:\n%s",errorlog->str().c_str());
+00901                 exit(0);
+00902         }
+00903         else
+00904         {
+00905                 char dataline[1024];
+00906                 if (user)
+00907                 {
+00908                         WriteServ(user->fd,"NOTICE %s :There were errors in the configuration file:",user->nick);
+00909                         while (!errorlog->eof())
+00910                         {
+00911                                 errorlog->getline(dataline,1024);
+00912                                 WriteServ(user->fd,"NOTICE %s :%s",user->nick,dataline);
+00913                         }
+00914                 }
+00915                 else
+00916                 {
+00917                         WriteOpers("There were errors in the configuration file:",user->nick);
+00918                         while (!errorlog->eof())
+00919                         {
+00920                                 errorlog->getline(dataline,1024);
+00921                                 WriteOpers(dataline);
+00922                         }
+00923                 }
+00924                 return;
+00925         }
+00926 }
 
@@ -310,13 +310,13 @@ 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 ConfigReader::ReadValue to loop through all copies of a multiple instance tag.

-Definition at line 1000 of file modules.cpp. +Definition at line 929 of file modules.cpp.

-References cache. +References cache.

-

01001 {
-01002         return EnumConf(cache,tag.c_str());
-01003 }
+
00930 {
+00931         return EnumConf(cache,tag.c_str());
+00932 }
 
@@ -359,13 +359,13 @@ Returns the number of items within a tag.

For example if the tag was <test tag="blah" data="foo"> then this function would return 2. Spaces and newlines both qualify as valid seperators between values.

-Definition at line 1005 of file modules.cpp. +Definition at line 934 of file modules.cpp.

-References cache. +References cache.

-

01006 {
-01007         return EnumValues(cache, tag.c_str(), index);
-01008 }
+
00935 {
+00936         return EnumValues(cache, tag.c_str(), index);
+00937 }
 
@@ -398,15 +398,15 @@ Returns the last error to occur.

Valid errors can be found by looking in modules.h. Any nonzero value indicates an error condition. A call to GetError() resets the error flag back to 0.

-Definition at line 960 of file modules.cpp. +Definition at line 889 of file modules.cpp.

-References error. +References error.

-

00961 {
-00962         long olderr = this->error;
-00963         this->error = 0;
-00964         return olderr;
-00965 }
+
00890 {
+00891         long olderr = this->error;
+00892         this->error = 0;
+00893         return olderr;
+00894 }
 
@@ -455,25 +455,25 @@ 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 914 of file modules.cpp. -

-References cache, CONF_VALUE_NOT_FOUND, and error. -

-

00915 {
-00916         char val[MAXBUF];
-00917         char t[MAXBUF];
-00918         char n[MAXBUF];
-00919         strlcpy(t,tag.c_str(),MAXBUF);
-00920         strlcpy(n,name.c_str(),MAXBUF);
-00921         int res = ReadConf(cache,t,n,index,val);
-00922         if (!res)
-00923         {
-00924                 this->error = CONF_VALUE_NOT_FOUND;
-00925                 return false;
-00926         }
-00927         std::string s = val;
-00928         return ((s == "yes") || (s == "YES") || (s == "true") || (s == "TRUE") || (s == "1"));
-00929 }
+Definition at line 843 of file modules.cpp.
+

+References cache, CONF_VALUE_NOT_FOUND, and error. +

+

00844 {
+00845         char val[MAXBUF];
+00846         char t[MAXBUF];
+00847         char n[MAXBUF];
+00848         strlcpy(t,tag.c_str(),MAXBUF);
+00849         strlcpy(n,name.c_str(),MAXBUF);
+00850         int res = ReadConf(cache,t,n,index,val);
+00851         if (!res)
+00852         {
+00853                 this->error = CONF_VALUE_NOT_FOUND;
+00854                 return false;
+00855         }
+00856         std::string s = val;
+00857         return ((s == "yes") || (s == "YES") || (s == "true") || (s == "TRUE") || (s == "1"));
+00858 }
 
@@ -528,37 +528,37 @@ 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 GetError() 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 GetError() will return CONF_NOT_UNSIGNED

-Definition at line 931 of file modules.cpp. -

-References cache, CONF_NOT_A_NUMBER, CONF_NOT_UNSIGNED, CONF_VALUE_NOT_FOUND, and error. -

-

00932 {
-00933         char val[MAXBUF];
-00934         char t[MAXBUF];
-00935         char n[MAXBUF];
-00936         strlcpy(t,tag.c_str(),MAXBUF);
-00937         strlcpy(n,name.c_str(),MAXBUF);
-00938         int res = ReadConf(cache,t,n,index,val);
-00939         if (!res)
-00940         {
-00941                 this->error = CONF_VALUE_NOT_FOUND;
-00942                 return 0;
-00943         }
-00944         for (int i = 0; i < strlen(val); i++)
-00945         {
-00946                 if (!isdigit(val[i]))
-00947                 {
-00948                         this->error = CONF_NOT_A_NUMBER;
-00949                         return 0;
-00950                 }
-00951         }
-00952         if ((needs_unsigned) && (atoi(val)<0))
-00953         {
-00954                 this->error = CONF_NOT_UNSIGNED;
-00955                 return 0;
-00956         }
-00957         return atoi(val);
-00958 }
+Definition at line 860 of file modules.cpp.
+

+References cache, CONF_NOT_A_NUMBER, CONF_NOT_UNSIGNED, CONF_VALUE_NOT_FOUND, and error. +

+

00861 {
+00862         char val[MAXBUF];
+00863         char t[MAXBUF];
+00864         char n[MAXBUF];
+00865         strlcpy(t,tag.c_str(),MAXBUF);
+00866         strlcpy(n,name.c_str(),MAXBUF);
+00867         int res = ReadConf(cache,t,n,index,val);
+00868         if (!res)
+00869         {
+00870                 this->error = CONF_VALUE_NOT_FOUND;
+00871                 return 0;
+00872         }
+00873         for (int i = 0; i < strlen(val); i++)
+00874         {
+00875                 if (!isdigit(val[i]))
+00876                 {
+00877                         this->error = CONF_NOT_A_NUMBER;
+00878                         return 0;
+00879                 }
+00880         }
+00881         if ((needs_unsigned) && (atoi(val)<0))
+00882         {
+00883                 this->error = CONF_NOT_UNSIGNED;
+00884                 return 0;
+00885         }
+00886         return atoi(val);
+00887 }
 
@@ -607,24 +607,24 @@ 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 898 of file modules.cpp. -

-References cache, CONF_VALUE_NOT_FOUND, and error. -

-

00899 {
-00900         char val[MAXBUF];
-00901         char t[MAXBUF];
-00902         char n[MAXBUF];
-00903         strlcpy(t,tag.c_str(),MAXBUF);
-00904         strlcpy(n,name.c_str(),MAXBUF);
-00905         int res = ReadConf(cache,t,n,index,val);
-00906         if (!res)
-00907         {
-00908                 this->error = CONF_VALUE_NOT_FOUND;
-00909                 return "";
-00910         }
-00911         return val;
-00912 }
+Definition at line 827 of file modules.cpp.
+

+References cache, CONF_VALUE_NOT_FOUND, and error. +

+

00828 {
+00829         char val[MAXBUF];
+00830         char t[MAXBUF];
+00831         char n[MAXBUF];
+00832         strlcpy(t,tag.c_str(),MAXBUF);
+00833         strlcpy(n,name.c_str(),MAXBUF);
+00834         int res = ReadConf(cache,t,n,index,val);
+00835         if (!res)
+00836         {
+00837                 this->error = CONF_VALUE_NOT_FOUND;
+00838                 return "";
+00839         }
+00840         return val;
+00841 }
 
@@ -657,13 +657,13 @@ 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 1010 of file modules.cpp. +Definition at line 939 of file modules.cpp.

-References readerror. +References readerror.

-

01011 {
-01012         return this->readerror;
-01013 }
+
00940 {
+00941         return this->readerror;
+00942 }
 
@@ -691,9 +691,9 @@ The contents of the configuration file This protected member should never be acc

It will contain a pointer to the configuration file data with unneeded data (such as comments) stripped from it.

-Definition at line 1155 of file modules.h. +Definition at line 1158 of file modules.h.

-Referenced by ConfigReader(), Enumerate(), EnumerateValues(), ReadFlag(), ReadInteger(), ReadValue(), and ~ConfigReader(). +Referenced by ConfigReader(), Enumerate(), EnumerateValues(), ReadFlag(), ReadInteger(), ReadValue(), and ~ConfigReader().

@@ -717,9 +717,9 @@ Referenced by ConfigReader(

-Definition at line 1160 of file modules.h. +Definition at line 1163 of file modules.h.

-Referenced by ConfigReader(), GetError(), ReadFlag(), ReadInteger(), and ReadValue(). +Referenced by ConfigReader(), GetError(), ReadFlag(), ReadInteger(), and ReadValue().

@@ -743,9 +743,9 @@ Referenced by ConfigReader(

-Definition at line 1156 of file modules.h. +Definition at line 1159 of file modules.h.

-Referenced by ConfigReader(), DumpErrors(), and ~ConfigReader(). +Referenced by ConfigReader(), DumpErrors(), and ~ConfigReader().

@@ -771,14 +771,14 @@ Used to store errors.

-Definition at line 1159 of file modules.h. +Definition at line 1162 of file modules.h.

-Referenced by ConfigReader(), and Verify(). +Referenced by ConfigReader(), and Verify().


The documentation for this class was generated from the following files: -
Generated on Fri May 13 15:49:26 2005 for InspIRCd by +
Generated on Sun May 15 17:03:09 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classConnectClass-members.html b/docs/module-doc/classConnectClass-members.html index d6235b042..eae51ce7a 100644 --- a/docs/module-doc/classConnectClass-members.html +++ b/docs/module-doc/classConnectClass-members.html @@ -4,7 +4,7 @@ - +

ConnectClass Member List

This is the complete list of members for ConnectClass, including all inherited members. @@ -19,7 +19,7 @@ -
ageclassbase
classbase()classbase [inline]
thresholdConnectClass
typeConnectClass
~classbase()classbase [inline]

Generated on Fri May 13 15:49:28 2005 for InspIRCd by +
Generated on Sun May 15 17:03:11 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classConnectClass.html b/docs/module-doc/classConnectClass.html index 9e60c867e..131cb49be 100644 --- a/docs/module-doc/classConnectClass.html +++ b/docs/module-doc/classConnectClass.html @@ -4,7 +4,7 @@ - +

ConnectClass Class Reference

Holds information relevent to <connect allow> and <connect deny> tags in the config file. More...

@@ -355,7 +355,7 @@ Definition at line 50 of fi


The documentation for this class was generated from the following file: -
Generated on Fri May 13 15:49:28 2005 for InspIRCd by +
Generated on Sun May 15 17:03:11 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classDNS-members.html b/docs/module-doc/classDNS-members.html index decd6c889..4c1ae1319 100644 --- a/docs/module-doc/classDNS-members.html +++ b/docs/module-doc/classDNS-members.html @@ -4,7 +4,7 @@ - +

DNS Member List

This is the complete list of members for DNS, including all inherited members. @@ -33,7 +33,7 @@ -
binipDNS [private]
DNS()DNS
SetNS(std::string dnsserver)DNS
tDNS [private]
~DNS()DNS

Generated on Fri May 13 15:49:30 2005 for InspIRCd by +
Generated on Sun May 15 17:03:18 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classDNS.html b/docs/module-doc/classDNS.html index ba7e9eaa0..4a4a413df 100644 --- a/docs/module-doc/classDNS.html +++ b/docs/module-doc/classDNS.html @@ -4,7 +4,7 @@ - +

DNS Class Reference

The DNS class allows fast nonblocking resolution of hostnames and ip addresses. More...

@@ -891,7 +891,7 @@ Definition at line 40 of file


The documentation for this class was generated from the following file: -
Generated on Fri May 13 15:49:30 2005 for InspIRCd by +
Generated on Sun May 15 17:03:18 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classELine-members.html b/docs/module-doc/classELine-members.html index b0e74a97f..d0ccc1410 100644 --- a/docs/module-doc/classELine-members.html +++ b/docs/module-doc/classELine-members.html @@ -4,7 +4,7 @@ - +

ELine Member List

This is the complete list of members for ELine, including all inherited members. @@ -15,7 +15,7 @@ -
ageclassbase
classbase()classbase [inline]
set_timeXLine
sourceXLine
~classbase()classbase [inline]

Generated on Fri May 13 15:49:32 2005 for InspIRCd by +
Generated on Sun May 15 17:03:20 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classELine.html b/docs/module-doc/classELine.html index c3bdac0da..24279c0f2 100644 --- a/docs/module-doc/classELine.html +++ b/docs/module-doc/classELine.html @@ -4,7 +4,7 @@ - +

ELine Class Reference

#include <xline.h>

Inheritance diagram for ELine:

Inheritance graph
@@ -53,7 +53,7 @@ Definition at line 88 of fi
The documentation for this class was generated from the following file: -
Generated on Fri May 13 15:49:32 2005 for InspIRCd by +
Generated on Sun May 15 17:03:20 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classEvent-members.html b/docs/module-doc/classEvent-members.html index 15b37e1c3..2764d3dce 100644 --- a/docs/module-doc/classEvent-members.html +++ b/docs/module-doc/classEvent-members.html @@ -4,7 +4,7 @@ - +

Event Member List

This is the complete list of members for Event, including all inherited members. @@ -17,7 +17,7 @@ -
ageclassbase
classbase()classbase [inline]
Send()Event [virtual]
sourceEvent [protected]
~classbase()classbase [inline]

Generated on Fri May 13 15:49:33 2005 for InspIRCd by +
Generated on Sun May 15 17:03:22 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classEvent.html b/docs/module-doc/classEvent.html index fc2d4dd6f..a7ee526da 100644 --- a/docs/module-doc/classEvent.html +++ b/docs/module-doc/classEvent.html @@ -4,7 +4,7 @@ - +

Event Class Reference

The Event class is a unicast message directed at all modules. More...

@@ -103,9 +103,9 @@ Create a new Event.

-Definition at line 345 of file modules.cpp. +Definition at line 269 of file modules.cpp.

-

00345 : data(anydata), source(src), id(eventid) { };
+
00269 : data(anydata), source(src), id(eventid) { };
 
@@ -139,13 +139,13 @@ Get the Event data.

-Definition at line 347 of file modules.cpp. +Definition at line 271 of file modules.cpp.

References data.

-

00348 {
-00349         return this->data;
-00350 }
+
00272 {
+00273         return this->data;
+00274 }
 
@@ -178,13 +178,13 @@ Get the event ID.

Use this to determine the event type for safe casting of the data

-Definition at line 363 of file modules.cpp. +Definition at line 287 of file modules.cpp.

References id.

-

00364 {
-00365         return this->id;
-00366 }
+
00288 {
+00289         return this->id;
+00290 }
 
@@ -217,13 +217,13 @@ Get the event Source.

-Definition at line 352 of file modules.cpp. +Definition at line 276 of file modules.cpp.

References source.

-

00353 {
-00354         return this->source;
-00355 }
+
00277 {
+00278         return this->source;
+00279 }
 
@@ -258,14 +258,14 @@ The return result of an Event::Send() Implements ModuleMessage.

-Definition at line 357 of file modules.cpp. +Definition at line 281 of file modules.cpp.

References FOREACH_MOD.

-

00358 {
-00359         FOREACH_MOD OnEvent(this);
-00360         return NULL;
-00361 }
+
00282 {
+00283         FOREACH_MOD OnEvent(this);
+00284         return NULL;
+00285 }
 
@@ -295,7 +295,7 @@ This member holds a pointer to arbitary data set by the emitter of the message.

Definition at line 199 of file modules.h.

-Referenced by GetData(). +Referenced by GetData().

@@ -323,7 +323,7 @@ This is arbitary text which should be used to distinguish one type of event from

Definition at line 208 of file modules.h.

-Referenced by GetEventID(). +Referenced by GetEventID().

@@ -351,12 +351,12 @@ This is a pointer to the sender of the message, which can be used to directly tr

Definition at line 203 of file modules.h.

-Referenced by GetSource(). +Referenced by GetSource().


The documentation for this class was generated from the following files: -
Generated on Fri May 13 15:49:33 2005 for InspIRCd by +
Generated on Sun May 15 17:03:21 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classExemptItem-members.html b/docs/module-doc/classExemptItem-members.html index a83b3446b..052a4d876 100644 --- a/docs/module-doc/classExemptItem-members.html +++ b/docs/module-doc/classExemptItem-members.html @@ -4,7 +4,7 @@ - +

ExemptItem Member List

This is the complete list of members for ExemptItem, including all inherited members. @@ -14,7 +14,7 @@ -
ageclassbase
classbase()classbase [inline]
set_timeHostItem
~classbase()classbase [inline]
~HostItem()HostItem [inline, virtual]

Generated on Fri May 13 15:49:34 2005 for InspIRCd by +
Generated on Sun May 15 17:03:23 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classExemptItem.html b/docs/module-doc/classExemptItem.html index 18f6048fb..afc704ef7 100644 --- a/docs/module-doc/classExemptItem.html +++ b/docs/module-doc/classExemptItem.html @@ -4,7 +4,7 @@ - +

ExemptItem Class Reference

A subclass of HostItem designed to hold channel exempts (+e). More...

@@ -30,7 +30,7 @@ A subclass of HostItem designed to h

Definition at line 60 of file channels.h.


The documentation for this class was generated from the following file: -
Generated on Fri May 13 15:49:34 2005 for InspIRCd by +
Generated on Sun May 15 17:03:23 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classExtMode-members.html b/docs/module-doc/classExtMode-members.html index 1f7b195a5..7804a6447 100644 --- a/docs/module-doc/classExtMode-members.html +++ b/docs/module-doc/classExtMode-members.html @@ -4,7 +4,7 @@ - +

ExtMode Member List

This is the complete list of members for ExtMode, including all inherited members. @@ -16,7 +16,7 @@ -
ageclassbase
classbase()classbase [inline]
params_when_onExtMode
typeExtMode
~classbase()classbase [inline]

Generated on Fri May 13 15:49:37 2005 for InspIRCd by +
Generated on Sun May 15 17:03:25 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classExtMode.html b/docs/module-doc/classExtMode.html index 6626c7c88..88af67a5c 100644 --- a/docs/module-doc/classExtMode.html +++ b/docs/module-doc/classExtMode.html @@ -4,7 +4,7 @@ - +

ExtMode Class Reference

Inheritance diagram for ExtMode:

Inheritance graph
@@ -88,11 +88,11 @@

-Definition at line 212 of file modules.cpp. +Definition at line 136 of file modules.cpp.

-References modechar, needsoper, params_when_off, params_when_on, and type. +References modechar, needsoper, params_when_off, params_when_on, and type.

-

00212 : modechar(mc), type(ty), needsoper(oper), params_when_on(p_on), params_when_off(p_off) { };
+
00136 : modechar(mc), type(ty), needsoper(oper), params_when_on(p_on), params_when_off(p_off) { };
 
@@ -118,7 +118,7 @@ References modechar,

-Definition at line 211 of file modules.cpp. +Definition at line 135 of file modules.cpp.

@@ -142,9 +142,9 @@ Definition at line 211

-Definition at line 206 of file modules.cpp. +Definition at line 130 of file modules.cpp.

-Referenced by ExtMode(). +Referenced by ExtMode().

@@ -168,9 +168,9 @@ Referenced by ExtMode()

-Definition at line 210 of file modules.cpp. +Definition at line 134 of file modules.cpp.

-Referenced by ExtMode(). +Referenced by ExtMode().

@@ -194,9 +194,9 @@ Referenced by ExtMode()

-Definition at line 209 of file modules.cpp. +Definition at line 133 of file modules.cpp.

-Referenced by ExtMode(). +Referenced by ExtMode().

@@ -220,9 +220,9 @@ Referenced by ExtMode()

-Definition at line 208 of file modules.cpp. +Definition at line 132 of file modules.cpp.

-Referenced by ExtMode(). +Referenced by ExtMode().

@@ -246,14 +246,14 @@ Referenced by ExtMode()

-Definition at line 207 of file modules.cpp. +Definition at line 131 of file modules.cpp.

-Referenced by ExtMode(). +Referenced by ExtMode().


The documentation for this class was generated from the following file: -
Generated on Fri May 13 15:49:37 2005 for InspIRCd by +
Generated on Sun May 15 17:03:25 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classExtensible-members.html b/docs/module-doc/classExtensible-members.html index 4d874896a..93a96a694 100644 --- a/docs/module-doc/classExtensible-members.html +++ b/docs/module-doc/classExtensible-members.html @@ -4,7 +4,7 @@ - +

Extensible Member List

This is the complete list of members for Extensible, including all inherited members. @@ -13,7 +13,7 @@ -
ageclassbase
classbase()classbase [inline]
GetExt(std::string key)Extensible
Shrink(std::string key)Extensible
~classbase()classbase [inline]

Generated on Fri May 13 15:49:36 2005 for InspIRCd by +
Generated on Sun May 15 17:03:24 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classExtensible.html b/docs/module-doc/classExtensible.html index 8883a804f..2465aed61 100644 --- a/docs/module-doc/classExtensible.html +++ b/docs/module-doc/classExtensible.html @@ -4,7 +4,7 @@ - +

Extensible Class Reference

class Extensible is the parent class of many classes such as userrec and chanrec. More...

@@ -180,7 +180,7 @@ Definition at line 54 of fil


The documentation for this class was generated from the following file: -
Generated on Fri May 13 15:49:36 2005 for InspIRCd by +
Generated on Sun May 15 17:03:24 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classFileReader-members.html b/docs/module-doc/classFileReader-members.html index 4beac30ad..7a0140fd2 100644 --- a/docs/module-doc/classFileReader-members.html +++ b/docs/module-doc/classFileReader-members.html @@ -4,7 +4,7 @@ - +

FileReader Member List

This is the complete list of members for FileReader, including all inherited members. @@ -17,7 +17,7 @@ -
ageclassbase
classbase()classbase [inline]
LoadFile(std::string filename)FileReader
~classbase()classbase [inline]
~FileReader()FileReader

Generated on Fri May 13 15:49:38 2005 for InspIRCd by +
Generated on Sun May 15 17:03:26 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classFileReader.html b/docs/module-doc/classFileReader.html index d9be72a02..646b92de9 100644 --- a/docs/module-doc/classFileReader.html +++ b/docs/module-doc/classFileReader.html @@ -4,7 +4,7 @@ - +

FileReader Class Reference

Caches a text file into memory and can be used to retrieve lines from it. More...

@@ -53,7 +53,7 @@ This class contains methods for read-only manipulation of a text file in memory.

-Definition at line 1236 of file modules.h.


Constructor & Destructor Documentation

+Definition at line 1239 of file modules.h.

Constructor & Destructor Documentation

@@ -83,10 +83,10 @@ 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 1023 of file modules.cpp. +Definition at line 952 of file modules.cpp.

-

01024 {
-01025 }
+
00953 {
+00954 }
 
@@ -120,15 +120,15 @@ 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, FileReader::FileSize returns 0.

-Definition at line 1016 of file modules.cpp. +Definition at line 945 of file modules.cpp.

-References fc, and file_cache. +References fc, and file_cache.

-

01017 {
-01018         file_cache c;
-01019         readfile(c,filename.c_str());
-01020         this->fc = c;
-01021 }
+
00946 {
+00947         file_cache c;
+00948         readfile(c,filename.c_str());
+00949         this->fc = c;
+00950 }
 
@@ -161,10 +161,10 @@ Default destructor.

This deletes the memory allocated to the file.

-Definition at line 1035 of file modules.cpp. +Definition at line 964 of file modules.cpp.

-

01036 {
-01037 }
+
00965 {
+00966 }
 
@@ -198,20 +198,20 @@ Returns true if the file exists This function will return false if the file coul

-Definition at line 1039 of file modules.cpp. +Definition at line 968 of file modules.cpp.

-References fc. +References fc.

-

01040 {
-01041         if (fc.size() == 0)
-01042         {
-01043                 return(false);
-01044         }
-01045         else
-01046         {
-01047                 return(true);
-01048         }
-01049 }
+
00969 {
+00970         if (fc.size() == 0)
+00971         {
+00972                 return(false);
+00973         }
+00974         else
+00975         {
+00976                 return(true);
+00977         }
+00978 }
 
@@ -244,13 +244,13 @@ 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 1058 of file modules.cpp. +Definition at line 987 of file modules.cpp.

-References fc. +References fc.

-

01059 {
-01060         return fc.size();
-01061 }
+
00988 {
+00989         return fc.size();
+00990 }
 
@@ -284,15 +284,15 @@ 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 1051 of file modules.cpp. +Definition at line 980 of file modules.cpp.

-References fc. +References fc.

-

01052 {
-01053         if ((x<0) || (x>fc.size()))
-01054                 return "";
-01055         return fc[x];
-01056 }
+
00981 {
+00982         if ((x<0) || (x>fc.size()))
+00983                 return "";
+00984         return fc[x];
+00985 }
 
@@ -326,15 +326,15 @@ 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, FileReader::FileSize returns 0.

-Definition at line 1027 of file modules.cpp. +Definition at line 956 of file modules.cpp.

-References fc, and file_cache. +References fc, and file_cache.

-

01028 {
-01029         file_cache c;
-01030         readfile(c,filename.c_str());
-01031         this->fc = c;
-01032 }
+
00957 {
+00958         file_cache c;
+00959         readfile(c,filename.c_str());
+00960         this->fc = c;
+00961 }
 
@@ -360,14 +360,14 @@ References fc, and

-Definition at line 1238 of file modules.h. +Definition at line 1241 of file modules.h.

-Referenced by Exists(), FileReader(), FileSize(), GetLine(), and LoadFile(). +Referenced by Exists(), FileReader(), FileSize(), GetLine(), and LoadFile().


The documentation for this class was generated from the following files: -
Generated on Fri May 13 15:49:38 2005 for InspIRCd by +
Generated on Sun May 15 17:03:26 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classGLine-members.html b/docs/module-doc/classGLine-members.html index 8d5af13f3..8cedfd02a 100644 --- a/docs/module-doc/classGLine-members.html +++ b/docs/module-doc/classGLine-members.html @@ -4,7 +4,7 @@ - +

GLine Member List

This is the complete list of members for GLine, including all inherited members. @@ -15,7 +15,7 @@ -
ageclassbase
classbase()classbase [inline]
set_timeXLine
sourceXLine
~classbase()classbase [inline]

Generated on Fri May 13 15:49:39 2005 for InspIRCd by +
Generated on Sun May 15 17:03:28 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classGLine.html b/docs/module-doc/classGLine.html index 3d1f7e735..901ef24ff 100644 --- a/docs/module-doc/classGLine.html +++ b/docs/module-doc/classGLine.html @@ -4,7 +4,7 @@ - +

GLine Class Reference

GLine class. More...

@@ -61,7 +61,7 @@ Definition at line 79 of fi


The documentation for this class was generated from the following file: -
Generated on Fri May 13 15:49:39 2005 for InspIRCd by +
Generated on Sun May 15 17:03:28 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classHostItem-members.html b/docs/module-doc/classHostItem-members.html index 5269c6e75..9927250bc 100644 --- a/docs/module-doc/classHostItem-members.html +++ b/docs/module-doc/classHostItem-members.html @@ -4,7 +4,7 @@ - +

HostItem Member List

This is the complete list of members for HostItem, including all inherited members. @@ -14,7 +14,7 @@ -
ageclassbase
classbase()classbase [inline]
set_timeHostItem
~classbase()classbase [inline]
~HostItem()HostItem [inline, virtual]

Generated on Fri May 13 15:49:40 2005 for InspIRCd by +
Generated on Sun May 15 17:03:29 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classHostItem.html b/docs/module-doc/classHostItem.html index 6176efaa7..2d9cab15c 100644 --- a/docs/module-doc/classHostItem.html +++ b/docs/module-doc/classHostItem.html @@ -4,7 +4,7 @@ - +

HostItem Class Reference

Holds an entry for a ban list, exemption list, or invite list. More...

@@ -185,7 +185,7 @@ Definition at line 39 of


The documentation for this class was generated from the following file: -
Generated on Fri May 13 15:49:40 2005 for InspIRCd by +
Generated on Sun May 15 17:03:29 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classInviteItem-members.html b/docs/module-doc/classInviteItem-members.html index 44a656368..30f42926f 100644 --- a/docs/module-doc/classInviteItem-members.html +++ b/docs/module-doc/classInviteItem-members.html @@ -4,7 +4,7 @@ - +

InviteItem Member List

This is the complete list of members for InviteItem, including all inherited members. @@ -14,7 +14,7 @@ -
ageclassbase
classbase()classbase [inline]
set_timeHostItem
~classbase()classbase [inline]
~HostItem()HostItem [inline, virtual]

Generated on Fri May 13 15:49:42 2005 for InspIRCd by +
Generated on Sun May 15 17:03:31 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classInviteItem.html b/docs/module-doc/classInviteItem.html index e5aa8959a..db260931e 100644 --- a/docs/module-doc/classInviteItem.html +++ b/docs/module-doc/classInviteItem.html @@ -4,7 +4,7 @@ - +

InviteItem Class Reference

A subclass of HostItem designed to hold channel invites (+I). More...

@@ -30,7 +30,7 @@ A subclass of HostItem designed to h

Definition at line 68 of file channels.h.


The documentation for this class was generated from the following file: -
Generated on Fri May 13 15:49:42 2005 for InspIRCd by +
Generated on Sun May 15 17:03:31 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classInvited-members.html b/docs/module-doc/classInvited-members.html index a1ea18bea..f4718eea6 100644 --- a/docs/module-doc/classInvited-members.html +++ b/docs/module-doc/classInvited-members.html @@ -4,13 +4,13 @@ - +

Invited Member List

This is the complete list of members for Invited, including all inherited members. -
ageclassbase
channelInvited
classbase()classbase [inline]
~classbase()classbase [inline]

Generated on Fri May 13 15:49:41 2005 for InspIRCd by +
Generated on Sun May 15 17:03:30 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classInvited.html b/docs/module-doc/classInvited.html index 6cf22b4d9..383a50357 100644 --- a/docs/module-doc/classInvited.html +++ b/docs/module-doc/classInvited.html @@ -4,7 +4,7 @@ - +

Invited Class Reference

Holds a channel name to which a user has been invited. More...

@@ -53,12 +53,12 @@ Definition at line 36 of fi

Definition at line 39 of file users.h.

-Referenced by userrec::InviteTo(). +Referenced by userrec::InviteTo().


The documentation for this class was generated from the following file: -
Generated on Fri May 13 15:49:41 2005 for InspIRCd by +
Generated on Sun May 15 17:03:30 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classKLine-members.html b/docs/module-doc/classKLine-members.html index 4e085f5e3..1ee263413 100644 --- a/docs/module-doc/classKLine-members.html +++ b/docs/module-doc/classKLine-members.html @@ -4,7 +4,7 @@ - +

KLine Member List

This is the complete list of members for KLine, including all inherited members. @@ -15,7 +15,7 @@ -
ageclassbase
classbase()classbase [inline]
set_timeXLine
sourceXLine
~classbase()classbase [inline]

Generated on Fri May 13 15:49:45 2005 for InspIRCd by +
Generated on Sun May 15 17:03:34 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classKLine.html b/docs/module-doc/classKLine.html index f9efa2bea..3902144d2 100644 --- a/docs/module-doc/classKLine.html +++ b/docs/module-doc/classKLine.html @@ -4,7 +4,7 @@ - +

KLine Class Reference

KLine class. More...

@@ -61,7 +61,7 @@ Definition at line 68 of fi


The documentation for this class was generated from the following file: -
Generated on Fri May 13 15:49:45 2005 for InspIRCd by +
Generated on Sun May 15 17:03:34 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classModeParameter-members.html b/docs/module-doc/classModeParameter-members.html index d71c58eb3..a5404a735 100644 --- a/docs/module-doc/classModeParameter-members.html +++ b/docs/module-doc/classModeParameter-members.html @@ -4,7 +4,7 @@ - +

ModeParameter Member List

This is the complete list of members for ModeParameter, including all inherited members. @@ -12,7 +12,7 @@ -
ageclassbase
channelModeParameter
modeModeParameter
parameterModeParameter
~classbase()classbase [inline]

Generated on Fri May 13 15:49:46 2005 for InspIRCd by +
Generated on Sun May 15 17:03:35 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classModeParameter.html b/docs/module-doc/classModeParameter.html index 6f4a05668..f19b1776c 100644 --- a/docs/module-doc/classModeParameter.html +++ b/docs/module-doc/classModeParameter.html @@ -4,7 +4,7 @@ - +

ModeParameter Class Reference

Holds a custom parameter to a module-defined channel mode e.g. More...

@@ -59,7 +59,7 @@ Definition at line 77 of

Definition at line 82 of file channels.h.

-Referenced by chanrec::SetCustomModeParam(). +Referenced by chanrec::SetCustomModeParam().

@@ -85,7 +85,7 @@ Referenced by chanrec::Set

Definition at line 80 of file channels.h.

-Referenced by chanrec::SetCustomModeParam(). +Referenced by chanrec::SetCustomModeParam().

@@ -111,12 +111,12 @@ Referenced by chanrec::Set

Definition at line 81 of file channels.h.

-Referenced by chanrec::SetCustomModeParam(). +Referenced by chanrec::SetCustomModeParam().


The documentation for this class was generated from the following file: -
Generated on Fri May 13 15:49:46 2005 for InspIRCd by +
Generated on Sun May 15 17:03:35 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classModule-members.html b/docs/module-doc/classModule-members.html index 4ecacaa9d..dd6ad7db9 100644 --- a/docs/module-doc/classModule-members.html +++ b/docs/module-doc/classModule-members.html @@ -4,7 +4,7 @@ - +

Module Member List

This is the complete list of members for Module, including all inherited members. @@ -65,7 +65,7 @@ -
ageclassbase
classbase()classbase [inline]
OnWhois(userrec *source, userrec *dest)Module [virtual]
~classbase()classbase [inline]
~Module()Module [virtual]

Generated on Fri May 13 15:49:48 2005 for InspIRCd by +
Generated on Sun May 15 17:03:37 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classModule.html b/docs/module-doc/classModule.html index 407b3a446..0e509f674 100644 --- a/docs/module-doc/classModule.html +++ b/docs/module-doc/classModule.html @@ -4,7 +4,7 @@ - +

Module Class Reference

Base class for all InspIRCd modules This class is the base class for InspIRCd modules. More...

@@ -227,9 +227,9 @@ Default constructor creates a module class.

-Definition at line 370 of file modules.cpp. +Definition at line 294 of file modules.cpp.

-

00370 { }
+
00294 { }
 
@@ -262,9 +262,9 @@ Default destructor destroys a module class.

-Definition at line 371 of file modules.cpp. +Definition at line 295 of file modules.cpp.

-

00371 { }
+
00295 { }
 
@@ -298,11 +298,11 @@ Returns the version number of a Module.

The method should return a Version object with its version information assigned via Version::Version

-Definition at line 383 of file modules.cpp. +Definition at line 307 of file modules.cpp.

References VF_VENDOR.

-

00383 { return Version(1,0,0,0,VF_VENDOR); }
+
00307 { return Version(1,0,0,0,VF_VENDOR); }
 
@@ -336,9 +336,9 @@ 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 395 of file modules.cpp. +Definition at line 319 of file modules.cpp.

-

00395 { };
+
00319 { };
 
@@ -405,11 +405,11 @@ This function is called before many functions which check a users status on a ch
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 392 of file modules.cpp. +Definition at line 316 of file modules.cpp.

References ACR_DEFAULT.

-

00392 { return ACR_DEFAULT; };
+
00316 { return ACR_DEFAULT; };
 
@@ -458,9 +458,9 @@ Called whenever a ban is added to a channel's list.

Return a non-zero value to 'eat' the mode change and prevent the ban from being added.

-Definition at line 420 of file modules.cpp. +Definition at line 344 of file modules.cpp.

-

00420 { return 0; };
+
00344 { return 0; };
 
@@ -494,9 +494,9 @@ Called once every five seconds for background processing.

This timer can be used to control timed features. Its period is not accurate enough to be used as a clock, but it is gauranteed to be called at least once in any five second period, directly from the main loop of the server.

-Definition at line 398 of file modules.cpp. +Definition at line 322 of file modules.cpp.

-

00398 { };
+
00322 { };
 
@@ -539,9 +539,9 @@ Called whenever a change of a local users GECOS (fullname field) is attempted.

return 1 to deny the name change, or 0 to allow it.

-Definition at line 412 of file modules.cpp. +Definition at line 336 of file modules.cpp.

-

00412 { return 0; };
+
00336 { return 0; };
 
@@ -584,9 +584,9 @@ Called whenever a change of a local users displayed host is attempted.

Return 1 to deny the host change, or 0 to allow it.

-Definition at line 411 of file modules.cpp. +Definition at line 335 of file modules.cpp.

-

00411 { return 0; };
+
00335 { return 0; };
 
@@ -620,11 +620,11 @@ 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 394 of file modules.cpp. +Definition at line 318 of file modules.cpp.

References string_list.

-

00394 { string_list empty; return empty; }
+
00318 { string_list empty; return empty; }
 
@@ -667,9 +667,9 @@ Called whenever a user joins a channel, to determine if banlist checks should go

This method will always be called for each join, wether or not the user actually matches a channel ban, and determines the outcome of an if statement around the whole section of ban checking code. return 1 to explicitly allow the join to go ahead or 0 to ignore the event.

-Definition at line 409 of file modules.cpp. +Definition at line 333 of file modules.cpp.

-

00409 { return 0; };
+
00333 { return 0; };
 
@@ -712,9 +712,9 @@ Called whenever a user joins a channel, to determine if invite checks should go

This method will always be called for each join, wether or not the channel is actually +i, and determines the outcome of an if statement around the whole section of invite checking code. return 1 to explicitly allow the join to go ahead or 0 to ignore the event.

-Definition at line 406 of file modules.cpp. +Definition at line 330 of file modules.cpp.

-

00406 { return 0; };
+
00330 { return 0; };
 
@@ -763,9 +763,9 @@ Called whenever a user joins a channel, to determine if key checks should go ahe

This method will always be called for each join, wether or not the channel is actually +k, and determines the outcome of an if statement around the whole section of key checking code. if the user specified no key, the keygiven string will be a valid but empty value. return 1 to explicitly allow the join to go ahead or 0 to ignore the event.

-Definition at line 407 of file modules.cpp. +Definition at line 331 of file modules.cpp.

-

00407 { return 0; };
+
00331 { return 0; };
 
@@ -808,9 +808,9 @@ Called whenever a user joins a channel, to determine if channel limit checks sho

This method will always be called for each join, wether or not the channel is actually +l, and determines the outcome of an if statement around the whole section of channel limit checking code. return 1 to explicitly allow the join to go ahead or 0 to ignore the event.

-Definition at line 408 of file modules.cpp. +Definition at line 332 of file modules.cpp.

-

00408 { return 0; };
+
00332 { return 0; };
 
@@ -844,9 +844,9 @@ Called to check if a user who is connecting can now be allowed to register If an

For example a module which implements ident lookups will continue to return false for a user until their ident lookup is completed. Note that the registration timeout for a user overrides these checks, if the registration timeout is reached, the user is disconnected even if modules report that the user is not ready to connect.

-Definition at line 401 of file modules.cpp. +Definition at line 325 of file modules.cpp.

-

00401 { return true; };
+
00325 { return true; };
 
@@ -895,9 +895,9 @@ Called whenever a ban is removed from a channel's list.

Return a non-zero value to 'eat' the mode change and prevent the ban from being removed.

-Definition at line 421 of file modules.cpp. +Definition at line 345 of file modules.cpp.

-

00421 { return 0; };
+
00345 { return 0; };
 
@@ -931,9 +931,9 @@ Called whenever an Event class is sent

Please see the documentation of Event::Send() for further information. The Event sent can always be assumed to be non-NULL, you should *always* check the value of Event::GetEventID() before doing anything to the event data, and you should *not* change the event data in any way!

-Definition at line 415 of file modules.cpp. +Definition at line 339 of file modules.cpp.

-

00415 { return; };
+
00339 { return; };
 
@@ -998,11 +998,11 @@ Definition at line 415

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 Server::AddExtendedMode 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. +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 Server::AddExtendedMode 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 382 of file modules.cpp. +Definition at line 306 of file modules.cpp.

-

00382 { return false; }
+
00306 { return false; }
 
@@ -1036,9 +1036,9 @@ Called whenever a user connects, anywhere on the network.

This event is informational only. You should not change any user information in this event. To do so, use the OnUserConnect method to change the state of local users.

-Definition at line 419 of file modules.cpp. +Definition at line 343 of file modules.cpp.

-

00419 { };
+
00343 { };
 
@@ -1072,9 +1072,9 @@ Called whenever a user is given usermode +o, anywhere on the network.

You cannot override this and prevent it from happening as it is already happened and such a task must be performed by another server. You can however bounce modes by sending servermodes out to reverse mode changes.

-Definition at line 418 of file modules.cpp. +Definition at line 342 of file modules.cpp.

-

00418 { };
+
00342 { };
 
@@ -1109,9 +1109,9 @@ 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:

<nick> :information here

-Definition at line 385 of file modules.cpp. +Definition at line 309 of file modules.cpp.

-

00385 { };
+
00309 { };
 
@@ -1160,9 +1160,9 @@ 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 396 of file modules.cpp. +Definition at line 320 of file modules.cpp.

-

00396 { return 0; };
+
00320 { return 0; };
 
@@ -1205,9 +1205,9 @@ 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 397 of file modules.cpp. +Definition at line 321 of file modules.cpp.

-

00397 { };
+
00321 { };
 
@@ -1256,9 +1256,9 @@ Called whenever a topic is changed by a local user.

Return 1 to deny the topic change, or 0 to allow it.

-Definition at line 413 of file modules.cpp. +Definition at line 337 of file modules.cpp.

-

00413 { return 0; };
+
00337 { return 0; };
 
@@ -1331,9 +1331,9 @@ Called whenever an unknown token is received in a server to server link.

The token value is the unknown token -- please check that no other modules are using the token that you use. Returning 1 supresses the 'unknown token type' error which is usually sent to all opers with +s. The params list is a list of parameters, and if any parameters start with a colon (:) it is treated as the whole of the last parameter, identical to how RFC messages are handled. source is the sender of the message, and reply is what should be replied to for a unicast message. Note that there are not many messages in the mesh protocol which require unicast messaging. tcp_host is the server name as a string, ipaddr is its ip address in dotted decimal notation and port is the port number it is using.

-Definition at line 414 of file modules.cpp. +Definition at line 338 of file modules.cpp.

-

00414 { return 0; };
+
00338 { return 0; };
 
@@ -1367,9 +1367,9 @@ 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 384 of file modules.cpp. +Definition at line 308 of file modules.cpp.

-

00384 { };
+
00308 { };
 
@@ -1412,9 +1412,9 @@ Called whenever an oper password is to be compared to what a user has input.

The password field (from the config file) is in 'password' and is to be compared against 'input'. This method allows for encryption of oper passwords and much more besides. You should return a nonzero value if you want to allow the comparison or zero if you wish to do nothing.

-Definition at line 417 of file modules.cpp. +Definition at line 341 of file modules.cpp.

-

00417 { return 0; };
+
00341 { return 0; };
 
@@ -1457,9 +1457,9 @@ Called after a packet is received from another irc server.

This allows you to easily represent it in the correct ways to implement encryption, compression, digital signatures and anything else you may want to add. This should be regarded as a pre-processor and will be called immediately after the packet is received but before any other operations with the core of the ircd.

-Definition at line 378 of file modules.cpp. +Definition at line 302 of file modules.cpp.

-

00378 { }
+
00302 { }
 
@@ -1502,9 +1502,9 @@ Called before a packet is transmitted across the irc network between two irc ser

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 377 of file modules.cpp. +Definition at line 301 of file modules.cpp.

-

00377 { }
+
00301 { }
 
@@ -1557,11 +1557,11 @@ Definition at line 377

Called whenever any command is about to be executed.

-This event occurs for all registered commands, wether they are registered in the core, or another module, but it will not occur for invalid commands (e.g. ones which do not exist within the command table). By returning 1 from this method you may prevent the command being executed. If you do this, no output is created by the core, and it is down to your module to produce any output neccessary. Note that unless you return 1, you should not destroy any structures (e.g. by using Server::QuitUser) otherwise when the command's handler function executes after your method returns, it will be passed an invalid pointer to the user object and crash!) +This event occurs for all registered commands, wether they are registered in the core, or another module, but it will not occur for invalid commands (e.g. ones which do not exist within the command table). By returning 1 from this method you may prevent the command being executed. If you do this, no output is created by the core, and it is down to your module to produce any output neccessary. Note that unless you return 1, you should not destroy any structures (e.g. by using Server::QuitUser) otherwise when the command's handler function executes after your method returns, it will be passed an invalid pointer to the user object and crash!)

-Definition at line 400 of file modules.cpp. +Definition at line 324 of file modules.cpp.

-

00400 { return 0; };
+
00324 { return 0; };
 
@@ -1628,9 +1628,9 @@ Called whenever a mode character is processed.

Return 1 from this function to block the mode character from being processed entirely, so that you may perform your own code instead. Note that this method allows you to override modes defined by other modes, but this is NOT RECOMMENDED!

-Definition at line 405 of file modules.cpp. +Definition at line 329 of file modules.cpp.

-

00405 { return 0; };
+
00329 { return 0; };
 
@@ -1679,9 +1679,9 @@ Called immediately after any connection is accepted.

This is intended for raw socket processing (e.g. modules which wrap the tcp connection within another library) and provides no information relating to a user record as the connection has not been assigned yet. There are no return values from this call as all modules get an opportunity if required to process the connection.

-Definition at line 422 of file modules.cpp. +Definition at line 346 of file modules.cpp.

-

00422 { };
+
00346 { };
 
@@ -1715,9 +1715,9 @@ Called immediately before any socket is closed.

When this event is called, shutdown() has not yet been called on the socket.

-Definition at line 424 of file modules.cpp. +Definition at line 348 of file modules.cpp.

-

00424 { };
+
00348 { };
 
@@ -1772,9 +1772,9 @@ Called immediately before any read() operation on a client socket in the core.

This occurs AFTER the select() or poll() so there is always data waiting to be read when this event occurs. Your event should return 1 if it has handled the reading itself, which prevents the core just using read(). You should place any data read into buffer, up to but NOT GREATER THAN the value of count. The value of readresult must be identical to an actual result that might be returned from the read() system call, for example, number of bytes read upon success, 0 upon EOF or closed socket, and -1 for error. If your function returns a nonzero value, you MUST set readresult.

-Definition at line 425 of file modules.cpp. +Definition at line 349 of file modules.cpp.

-

00425 { return 0; };
+
00349 { return 0; };
 
@@ -1823,9 +1823,9 @@ Called immediately before any write() operation on a user's socket in the core.

Because this event is a low level event no user information is associated with it. It is intended for use by modules which may wrap connections within another API such as SSL for example. return a non-zero result if you have handled the write operation, in which case the core will not call write().

-Definition at line 423 of file modules.cpp. +Definition at line 347 of file modules.cpp.

-

00423 { return 0; };
+
00347 { return 0; };
 
@@ -1858,9 +1858,9 @@ 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 379 of file modules.cpp. +Definition at line 303 of file modules.cpp.

-

00379 { }
+
00303 { }
 
@@ -1894,11 +1894,11 @@ Called whenever a Request class is se

Please see the documentation of Request::Send() for further information. The Request sent can always be assumed to be non-NULL, you should not change the request object or its data. Your method may return arbitary data in the char* result which the requesting module may be able to use for pre-determined purposes (e.g. the results of an SQL query, etc).

-Definition at line 416 of file modules.cpp. +Definition at line 340 of file modules.cpp.

-Referenced by Request::Send(). +Referenced by Request::Send().

-

00416 { return NULL; };
+
00340 { return NULL; };
 
@@ -1947,9 +1947,9 @@ Called whenever a list is needed for a listmode.

For example, when a /MODE #channel +b (without any other parameters) is called, if a module was handling +b this function would be called. The function can then output any lists it wishes to. Please note that all modules will see all mode characters to provide the ability to extend each other, so please only output a list if the mode character given matches the one(s) you want to handle.

-Definition at line 399 of file modules.cpp. +Definition at line 323 of file modules.cpp.

-

00399 { };
+
00323 { };
 
@@ -1998,9 +1998,9 @@ 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 380 of file modules.cpp. +Definition at line 304 of file modules.cpp.

-

00380 { }
+
00304 { }
 
@@ -2034,9 +2034,9 @@ Called on all /STATS commands This method is triggered for all /STATS use, inclu

-Definition at line 410 of file modules.cpp. +Definition at line 334 of file modules.cpp.

-

00410 { };
+
00334 { };
 
@@ -2070,9 +2070,9 @@ Called when a user connects.

The details of the connecting user are available to you in the parameter userrec *user

-Definition at line 372 of file modules.cpp. +Definition at line 296 of file modules.cpp.

-

00372 { }
+
00296 { }
 
@@ -2106,9 +2106,9 @@ Called whenever a user's socket is closed.

The details of the exiting user are available to you in the parameter userrec *user This event is called for all users, registered or not, as a cleanup method for modules which might assign resources to user, such as dns lookups, objects and sockets.

-Definition at line 374 of file modules.cpp. +Definition at line 298 of file modules.cpp.

-

00374 { }
+
00298 { }
 
@@ -2151,9 +2151,9 @@ 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 *channel

-Definition at line 375 of file modules.cpp. +Definition at line 299 of file modules.cpp.

-

00375 { }
+
00299 { }
 
@@ -2208,9 +2208,9 @@ Called whenever a user is kicked.

If this method is called, the kick is already underway and cannot be prevented, so to prevent a kick, please use Module::OnUserPreKick instead of this method.

-Definition at line 404 of file modules.cpp. +Definition at line 328 of file modules.cpp.

-

00404 { };
+
00328 { };
 
@@ -2253,9 +2253,9 @@ 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 *channel

-Definition at line 376 of file modules.cpp. +Definition at line 300 of file modules.cpp.

-

00376 { }
+
00300 { }
 
@@ -2298,9 +2298,9 @@ 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 391 of file modules.cpp. +Definition at line 315 of file modules.cpp.

-

00391 { };
+
00315 { };
 
@@ -2349,9 +2349,9 @@ Called whenever a user is about to invite another user into a channel, before an

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 387 of file modules.cpp. +Definition at line 311 of file modules.cpp.

-

00387 { return 0; };
+
00311 { return 0; };
 
@@ -2402,9 +2402,9 @@ Returning a value of 1 from this function stops the process immediately, causing IMPORTANT NOTE!

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 381 of file modules.cpp. +Definition at line 305 of file modules.cpp.

-

00381 { return 0; }
+
00305 { return 0; }
 
@@ -2459,9 +2459,9 @@ Called whenever a user is about to be kicked.

Returning a value of 1 from this function stops the process immediately, causing no output to be sent to the user by the core. If you do this you must produce your own numerics, notices etc.

-Definition at line 403 of file modules.cpp. +Definition at line 327 of file modules.cpp.

-

00403 { return 0; };
+
00327 { return 0; };
 
@@ -2516,9 +2516,9 @@ Called whenever a user is about to PRIVMSG A user or a channel, before any proce

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 388 of file modules.cpp. +Definition at line 312 of file modules.cpp.

-

00388 { return 0; };
+
00312 { return 0; };
 
@@ -2561,9 +2561,9 @@ 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 390 of file modules.cpp. +Definition at line 314 of file modules.cpp.

-

00390 { return 0; };
+
00314 { return 0; };
 
@@ -2618,9 +2618,9 @@ Called whenever a user is about to NOTICE A user or a channel, before any proces

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 389 of file modules.cpp. +Definition at line 313 of file modules.cpp.

-

00389 { return 0; };
+
00313 { return 0; };
 
@@ -2654,9 +2654,9 @@ Called when a user quits.

The details of the exiting user are available to you in the parameter userrec *user This event is only called when the user is fully registered when they quit. To catch raw disconnections, use the OnUserDisconnect method.

-Definition at line 373 of file modules.cpp. +Definition at line 297 of file modules.cpp.

-

00373 { }
+
00297 { }
 
@@ -2690,9 +2690,9 @@ Called whenever a user is about to register their connection (e.g.

before the user is sent the MOTD etc). Modules can use this method if they are performing a function which must be done before the actual connection is completed (e.g. ident lookups, dnsbl lookups, etc). Note that you should NOT delete the user record here by causing a disconnection! Use OnUserConnect for that instead.

-Definition at line 402 of file modules.cpp. +Definition at line 326 of file modules.cpp.

-

00402 { };
+
00326 { };
 
@@ -2726,11 +2726,11 @@ 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 393 of file modules.cpp. +Definition at line 317 of file modules.cpp.

References string_list.

-

00393 { string_list empty; return empty; }
+
00317 { string_list empty; return empty; }
 
@@ -2773,15 +2773,15 @@ 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 386 of file modules.cpp. +Definition at line 310 of file modules.cpp.

-

00386 { };
+
00310 { };
 

The documentation for this class was generated from the following files: -
Generated on Fri May 13 15:49:48 2005 for InspIRCd by +
Generated on Sun May 15 17:03:37 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classModuleFactory-members.html b/docs/module-doc/classModuleFactory-members.html index 5519f0ffb..5ef77ef04 100644 --- a/docs/module-doc/classModuleFactory-members.html +++ b/docs/module-doc/classModuleFactory-members.html @@ -4,7 +4,7 @@ - +

ModuleFactory Member List

This is the complete list of members for ModuleFactory, including all inherited members. @@ -12,7 +12,7 @@ -
ageclassbase
classbase()classbase [inline]
ModuleFactory()ModuleFactory [inline]
~classbase()classbase [inline]
~ModuleFactory()ModuleFactory [inline, virtual]

Generated on Fri May 13 15:49:49 2005 for InspIRCd by +
Generated on Sun May 15 17:03:38 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classModuleFactory.html b/docs/module-doc/classModuleFactory.html index b00be9c94..a1a0d2868 100644 --- a/docs/module-doc/classModuleFactory.html +++ b/docs/module-doc/classModuleFactory.html @@ -4,7 +4,7 @@ - +

ModuleFactory Class Reference

Instantiates classes inherited from Module This class creates a class inherited from type Module, using new. More...

@@ -36,7 +36,7 @@ This is to allow for modules to create many different variants of

-Definition at line 1291 of file modules.h.


Constructor & Destructor Documentation

+Definition at line 1294 of file modules.h.

Constructor & Destructor Documentation

@@ -64,9 +64,9 @@ Definition at line 1291 o

-Definition at line 1294 of file modules.h. +Definition at line 1297 of file modules.h.

-

01294 { }
+
01297 { }
 
@@ -97,9 +97,9 @@ Definition at line 1294 o

-Definition at line 1295 of file modules.h. +Definition at line 1298 of file modules.h.

-

01295 { }
+
01298 { }
 
@@ -136,7 +136,7 @@ Your inherited class of ModuleFactory must return a pointer to your modules.h -
Generated on Fri May 13 15:49:49 2005 for InspIRCd by +
Generated on Sun May 15 17:03:38 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classModuleMessage-members.html b/docs/module-doc/classModuleMessage-members.html index 3a8e5ed5f..d8ce77629 100644 --- a/docs/module-doc/classModuleMessage-members.html +++ b/docs/module-doc/classModuleMessage-members.html @@ -4,13 +4,13 @@ - +

ModuleMessage Member List

This is the complete list of members for ModuleMessage, including all inherited members. -
ageclassbase
classbase()classbase [inline]
Send()=0ModuleMessage [pure virtual]
~classbase()classbase [inline]

Generated on Fri May 13 15:49:50 2005 for InspIRCd by +
Generated on Sun May 15 17:03:39 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classModuleMessage.html b/docs/module-doc/classModuleMessage.html index 131048528..5a0bdc877 100644 --- a/docs/module-doc/classModuleMessage.html +++ b/docs/module-doc/classModuleMessage.html @@ -4,7 +4,7 @@ - +

ModuleMessage Class Reference

The ModuleMessage class is the base class of Request and Event This class is used to represent a basic data structure which is passed between modules for safe inter-module communications. More...

@@ -67,7 +67,7 @@ Implemented in Request, and


The documentation for this class was generated from the following file: -
Generated on Fri May 13 15:49:50 2005 for InspIRCd by +
Generated on Sun May 15 17:03:39 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classQLine-members.html b/docs/module-doc/classQLine-members.html index 608837f36..276be9e04 100644 --- a/docs/module-doc/classQLine-members.html +++ b/docs/module-doc/classQLine-members.html @@ -4,7 +4,7 @@ - +

QLine Member List

This is the complete list of members for QLine, including all inherited members. @@ -16,7 +16,7 @@ -
ageclassbase
classbase()classbase [inline]
set_timeXLine
sourceXLine
~classbase()classbase [inline]

Generated on Fri May 13 15:49:51 2005 for InspIRCd by +
Generated on Sun May 15 17:03:40 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classQLine.html b/docs/module-doc/classQLine.html index 2bf8bc2e1..e2497ebd0 100644 --- a/docs/module-doc/classQLine.html +++ b/docs/module-doc/classQLine.html @@ -4,7 +4,7 @@ - +

QLine Class Reference

QLine class. More...

@@ -90,7 +90,7 @@ Definition at line 114 of f


The documentation for this class was generated from the following file: -
Generated on Fri May 13 15:49:51 2005 for InspIRCd by +
Generated on Sun May 15 17:03:40 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classRequest-members.html b/docs/module-doc/classRequest-members.html index 4c2a09d65..93ea57e2a 100644 --- a/docs/module-doc/classRequest-members.html +++ b/docs/module-doc/classRequest-members.html @@ -4,7 +4,7 @@ - +

Request Member List

This is the complete list of members for Request, including all inherited members. @@ -17,7 +17,7 @@ -
ageclassbase
classbase()classbase [inline]
Send()Request [virtual]
sourceRequest [protected]
~classbase()classbase [inline]

Generated on Fri May 13 15:49:53 2005 for InspIRCd by +
Generated on Sun May 15 17:03:41 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classRequest.html b/docs/module-doc/classRequest.html index bf74a61c4..d4d3154d4 100644 --- a/docs/module-doc/classRequest.html +++ b/docs/module-doc/classRequest.html @@ -4,7 +4,7 @@ - +

Request Class Reference

The Request class is a unicast message directed at a given module. More...

@@ -103,9 +103,9 @@ Create a new Request.

-Definition at line 316 of file modules.cpp. +Definition at line 240 of file modules.cpp.

-

00316 : data(anydata), source(src), dest(dst) { };
+
00240 : data(anydata), source(src), dest(dst) { };
 
@@ -139,13 +139,13 @@ Fetch the Request data.

-Definition at line 318 of file modules.cpp. +Definition at line 242 of file modules.cpp.

References data.

-

00319 {
-00320         return this->data;
-00321 }
+
00243 {
+00244         return this->data;
+00245 }
 
@@ -178,13 +178,13 @@ Fetch the request destination (should be 'this' in the receiving module).

-Definition at line 328 of file modules.cpp. +Definition at line 252 of file modules.cpp.

References dest.

-

00329 {
-00330         return this->dest;
-00331 }
+
00253 {
+00254         return this->dest;
+00255 }
 
@@ -217,13 +217,13 @@ Fetch the request source.

-Definition at line 323 of file modules.cpp. +Definition at line 247 of file modules.cpp.

References source.

-

00324 {
-00325         return this->source;
-00326 }
+
00248 {
+00249         return this->source;
+00250 }
 
@@ -258,20 +258,20 @@ Upon returning the result will be arbitary data returned by the module you sent

Implements ModuleMessage.

-Definition at line 333 of file modules.cpp. +Definition at line 257 of file modules.cpp.

-References dest, and Module::OnRequest(). +References dest, and Module::OnRequest().

-

00334 {
-00335         if (this->dest)
-00336         {
-00337                 return dest->OnRequest(this);
-00338         }
-00339         else
-00340         {
-00341                 return NULL;
-00342         }
-00343 }
+
00258 {
+00259         if (this->dest)
+00260         {
+00261                 return dest->OnRequest(this);
+00262         }
+00263         else
+00264         {
+00265                 return NULL;
+00266         }
+00267 }
 
@@ -301,7 +301,7 @@ This member holds a pointer to arbitary data set by the emitter of the message.

Definition at line 159 of file modules.h.

-Referenced by GetData(). +Referenced by GetData().

@@ -329,7 +329,7 @@ The single destination of the Request.

Definition at line 166 of file modules.h.

-Referenced by GetDest(), and Send(). +Referenced by GetDest(), and Send().

@@ -357,12 +357,12 @@ This is a pointer to the sender of the message, which can be used to directly tr

Definition at line 163 of file modules.h.

-Referenced by GetSource(). +Referenced by GetSource().


The documentation for this class was generated from the following files: -
Generated on Fri May 13 15:49:53 2005 for InspIRCd by +
Generated on Sun May 15 17:03:41 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classServer-members.html b/docs/module-doc/classServer-members.html index 7458e46db..fddda36eb 100644 --- a/docs/module-doc/classServer-members.html +++ b/docs/module-doc/classServer-members.html @@ -4,72 +4,73 @@ - +

Server Member List

This is the complete list of members for Server, including all inherited members. - - - - - - - - + + + + + + + + - - - - - + + + + + - - - - - + + + + + - + - + + - + - - - + + + - - - - - - - - - - - + + + + + + + + + + + - + - + - + -
AddCommand(char *cmd, handlerfunc f, char flags, int minparams, char *source)Server [virtual]
AddELine(long duration, std::string source, std::string reason, std::string hostmask)Server [virtual]
AddExtendedListMode(char modechar)Server [virtual]
AddExtendedMode(char modechar, int type, bool requires_oper, int params_when_on, int params_when_off)Server [virtual]
AddGLine(long duration, std::string source, std::string reason, std::string hostmask)Server [virtual]
AddKLine(long duration, std::string source, std::string reason, std::string hostmask)Server [virtual]
AddQLine(long duration, std::string source, std::string reason, std::string nickname)Server [virtual]
AddZLine(long duration, std::string source, std::string reason, std::string ipaddr)Server [virtual]
AddCommand(char *cmd, handlerfunc f, char flags, int minparams, char *source)Server [virtual]
AddELine(long duration, std::string source, std::string reason, std::string hostmask)Server [virtual]
AddExtendedListMode(char modechar)Server [virtual]
AddExtendedMode(char modechar, int type, bool requires_oper, int params_when_on, int params_when_off)Server [virtual]
AddGLine(long duration, std::string source, std::string reason, std::string hostmask)Server [virtual]
AddKLine(long duration, std::string source, std::string reason, std::string hostmask)Server [virtual]
AddQLine(long duration, std::string source, std::string reason, std::string nickname)Server [virtual]
AddZLine(long duration, std::string source, std::string reason, std::string ipaddr)Server [virtual]
ageclassbase
CalcDuration(std::string duration)Server [virtual]
CallCommandHandler(std::string commandname, char **parameters, int pcnt, userrec *user)Server [virtual]
ChangeGECOS(userrec *user, std::string gecos)Server [virtual]
ChangeHost(userrec *user, std::string host)Server [virtual]
ChangeUserNick(userrec *user, std::string nickname)Server [virtual]
CalcDuration(std::string duration)Server [virtual]
CallCommandHandler(std::string commandname, char **parameters, int pcnt, userrec *user)Server [virtual]
ChangeGECOS(userrec *user, std::string gecos)Server [virtual]
ChangeHost(userrec *user, std::string host)Server [virtual]
ChangeUserNick(userrec *user, std::string nickname)Server [virtual]
ChanMode(userrec *User, chanrec *Chan)Server [virtual]
classbase()classbase [inline]
CommonChannels(userrec *u1, userrec *u2)Server [virtual]
CountUsers(chanrec *c)Server [virtual]
DelELine(std::string hostmask)Server [virtual]
DelGLine(std::string hostmask)Server [virtual]
DelKLine(std::string hostmask)Server [virtual]
DelQLine(std::string nickname)Server [virtual]
DelZLine(std::string ipaddr)Server [virtual]
DelELine(std::string hostmask)Server [virtual]
DelGLine(std::string hostmask)Server [virtual]
DelKLine(std::string hostmask)Server [virtual]
DelQLine(std::string nickname)Server [virtual]
DelZLine(std::string ipaddr)Server [virtual]
FindChannel(std::string channel)Server [virtual]
FindDescriptor(int socket)Server [virtual]
FindModule(std::string name)Server [virtual]
FindModule(std::string name)Server [virtual]
FindNick(std::string nick)Server [virtual]
GetAdmin()Server [virtual]
GetAdmin()Server [virtual]
GetNetworkName()Server [virtual]
GetServerDescription()Server [virtual]
GetServerName()Server [virtual]
GetUsers(chanrec *chan)Server [virtual]
GetUsers(chanrec *chan)Server [virtual]
IsNick(std::string nick)Server [virtual]
IsOnChannel(userrec *User, chanrec *Chan)Server [virtual]
IsUlined(std::string server)Server [virtual]
IsValidMask(std::string mask)Server [virtual]
JoinUserToChannel(userrec *user, std::string cname, std::string key)Server [virtual]
IsUlined(std::string server)Server [virtual]
IsValidMask(std::string mask)Server [virtual]
JoinUserToChannel(userrec *user, std::string cname, std::string key)Server [virtual]
Log(int level, std::string s)Server [virtual]
MatchText(std::string sliteral, std::string spattern)Server [virtual]
MeshCheckChan(chanrec *c, std::string servername)Server [virtual]
MeshCheckCommon(userrec *u, std::string servername)Server [virtual]
MeshSendAll(std::string text)Server [virtual]
MeshSendAllAlive(std::string text)Server [virtual]
MeshSendAllExcept(std::string target, std::string text)Server [virtual]
MeshSendCommon(userrec *user, std::string text)Server [virtual]
MeshSendUnicast(std::string destination, std::string text)Server [virtual]
PartUserFromChannel(userrec *user, std::string cname, std::string reason)Server [virtual]
PseudoToUser(userrec *alive, userrec *zombie, std::string message)Server [virtual]
QuitUser(userrec *user, std::string reason)Server [virtual]
MatchText(std::string sliteral, std::string spattern)Server [virtual]
MeshCheckChan(chanrec *c, std::string servername)Server [virtual]
MeshCheckCommon(userrec *u, std::string servername)Server [virtual]
MeshSendAll(std::string text)Server [virtual]
MeshSendAllAlive(std::string text)Server [virtual]
MeshSendAllExcept(std::string target, std::string text)Server [virtual]
MeshSendCommon(userrec *user, std::string text)Server [virtual]
MeshSendUnicast(std::string destination, std::string text)Server [virtual]
PartUserFromChannel(userrec *user, std::string cname, std::string reason)Server [virtual]
PseudoToUser(userrec *alive, userrec *zombie, std::string message)Server [virtual]
QuitUser(userrec *user, std::string reason)Server [virtual]
Send(int Socket, std::string s)Server [virtual]
SendChannel(userrec *User, chanrec *Channel, std::string s, bool IncludeSender)Server [virtual]
SendChannelServerNotice(std::string ServName, chanrec *Channel, std::string text)Server [virtual]
SendCommon(userrec *User, std::string text, bool IncludeSender)Server [virtual]
SendFrom(int Socket, userrec *User, std::string s)Server [virtual]
SendMode(char **parameters, int pcnt, userrec *user)Server [virtual]
SendMode(char **parameters, int pcnt, userrec *user)Server [virtual]
SendOpers(std::string s)Server [virtual]
SendServ(int Socket, std::string s)Server [virtual]
SendTo(userrec *Source, userrec *Dest, std::string s)Server [virtual]
SendToModeMask(std::string modes, int flags, std::string text)Server [virtual]
SendToModeMask(std::string modes, int flags, std::string text)Server [virtual]
SendWallops(userrec *User, std::string text)Server [virtual]
Server()Server
UserToPseudo(userrec *user, std::string message)Server [virtual]
UserToPseudo(userrec *user, std::string message)Server [virtual]
~classbase()classbase [inline]
~Server()Server [virtual]

Generated on Fri May 13 15:49:55 2005 for InspIRCd by +
Generated on Sun May 15 17:03:43 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classServer.html b/docs/module-doc/classServer.html index b065a5dd7..1b20ba109 100644 --- a/docs/module-doc/classServer.html +++ b/docs/module-doc/classServer.html @@ -4,7 +4,7 @@ - +

Server Class Reference

Allows server output and query functions This class contains methods which allow a module to query the state of the irc server, and produce output to users and other servers. More...

@@ -87,120 +87,123 @@ Inheritance diagram for Server:

virtual std::string GetNetworkName ()  Returns the network name, global to all linked servers.

-virtual Admin GetAdmin () +virtual std::string GetServerDescription () - Returns the information of the server as returned by the /ADMIN command.


-virtual bool AddExtendedMode (char modechar, int type, bool requires_oper, int params_when_on, int params_when_off) + Returns the server description string of the local server.


+virtual Admin GetAdmin () - Adds an extended mode letter which is parsed by a module.


-virtual bool AddExtendedListMode (char modechar) + Returns the information of the server as returned by the /ADMIN command.


+virtual bool AddExtendedMode (char modechar, int type, bool requires_oper, int params_when_on, int params_when_off) - Adds an extended mode letter which is parsed by a module and handled in a list fashion.


-virtual void AddCommand (char *cmd, handlerfunc f, char flags, int minparams, char *source) + Adds an extended mode letter which is parsed by a module.


+virtual bool AddExtendedListMode (char modechar) - Adds a command to the command table.


-virtual void SendMode (char **parameters, int pcnt, userrec *user) + Adds an extended mode letter which is parsed by a module and handled in a list fashion.


+virtual void AddCommand (char *cmd, handlerfunc f, char flags, int minparams, char *source) - Sends a servermode.


-virtual void SendToModeMask (std::string modes, int flags, std::string text) + Adds a command to the command table.


+virtual void SendMode (char **parameters, int pcnt, userrec *user) - Sends to all users matching a mode mask You must specify one or more usermodes as the first parameter.


-virtual chanrecJoinUserToChannel (userrec *user, std::string cname, std::string key) + Sends a servermode.


+virtual void SendToModeMask (std::string modes, int flags, std::string text) - Forces a user to join a channel.


-virtual chanrecPartUserFromChannel (userrec *user, std::string cname, std::string reason) + Sends to all users matching a mode mask You must specify one or more usermodes as the first parameter.


+virtual chanrecJoinUserToChannel (userrec *user, std::string cname, std::string key) - Forces a user to part a channel.


-virtual void ChangeUserNick (userrec *user, std::string nickname) + Forces a user to join a channel.


+virtual chanrecPartUserFromChannel (userrec *user, std::string cname, std::string reason) - Forces a user nickchange.


-virtual void QuitUser (userrec *user, std::string reason) + Forces a user to part a channel.


+virtual void ChangeUserNick (userrec *user, std::string nickname) - Forces a user to quit with the specified reason.


-virtual bool MatchText (std::string sliteral, std::string spattern) + Forces a user nickchange.


+virtual void QuitUser (userrec *user, std::string reason) - Matches text against a glob pattern.


-virtual void CallCommandHandler (std::string commandname, char **parameters, int pcnt, userrec *user) + Forces a user to quit with the specified reason.


+virtual bool MatchText (std::string sliteral, std::string spattern) - Calls the handler for a command, either implemented by the core or by another module.


-virtual void ChangeHost (userrec *user, std::string host) + Matches text against a glob pattern.


+virtual void CallCommandHandler (std::string commandname, char **parameters, int pcnt, userrec *user) - Change displayed hostname of a user.


-virtual void ChangeGECOS (userrec *user, std::string gecos) + Calls the handler for a command, either implemented by the core or by another module.


+virtual void ChangeHost (userrec *user, std::string host) - Change GECOS (fullname) of a user.


-virtual bool IsUlined (std::string server) + Change displayed hostname of a user.


+virtual void ChangeGECOS (userrec *user, std::string gecos) - Returns true if the servername you give is ulined.


-virtual chanuserlist GetUsers (chanrec *chan) + Change GECOS (fullname) of a user.


+virtual bool IsUlined (std::string server) - Fetches the userlist of a channel.


-virtual bool UserToPseudo (userrec *user, std::string message) + Returns true if the servername you give is ulined.


+virtual chanuserlist GetUsers (chanrec *chan) - Remove a user's connection to the irc server, but leave their client in existence in the user hash.


-virtual bool PseudoToUser (userrec *alive, userrec *zombie, std::string message) + Fetches the userlist of a channel.


+virtual bool UserToPseudo (userrec *user, std::string message) - This user takes one user, and switches their file descriptor with another user, so that one user "becomes" the other.


-virtual void AddGLine (long duration, std::string source, std::string reason, std::string hostmask) + Remove a user's connection to the irc server, but leave their client in existence in the user hash.


+virtual bool PseudoToUser (userrec *alive, userrec *zombie, std::string message) - Adds a G-line The G-line is propogated to all of the servers in the mesh and enforced as soon as it is added.


-virtual void AddQLine (long duration, std::string source, std::string reason, std::string nickname) + This user takes one user, and switches their file descriptor with another user, so that one user "becomes" the other.


+virtual void AddGLine (long duration, std::string source, std::string reason, std::string hostmask) - Adds a Q-line The Q-line is propogated to all of the servers in the mesh and enforced as soon as it is added.


-virtual void AddZLine (long duration, std::string source, std::string reason, std::string ipaddr) + Adds a G-line The G-line is propogated to all of the servers in the mesh and enforced as soon as it is added.


+virtual void AddQLine (long duration, std::string source, std::string reason, std::string nickname) - Adds a Z-line The Z-line is propogated to all of the servers in the mesh and enforced as soon as it is added.


-virtual void AddKLine (long duration, std::string source, std::string reason, std::string hostmask) + Adds a Q-line The Q-line is propogated to all of the servers in the mesh and enforced as soon as it is added.


+virtual void AddZLine (long duration, std::string source, std::string reason, std::string ipaddr) - Adds a K-line The K-line is enforced as soon as it is added.


-virtual void AddELine (long duration, std::string source, std::string reason, std::string hostmask) + Adds a Z-line The Z-line is propogated to all of the servers in the mesh and enforced as soon as it is added.


+virtual void AddKLine (long duration, std::string source, std::string reason, std::string hostmask) - Adds a E-line The E-line is enforced as soon as it is added.


-virtual bool DelGLine (std::string hostmask) + Adds a K-line The K-line is enforced as soon as it is added.


+virtual void AddELine (long duration, std::string source, std::string reason, std::string hostmask) - Deletes a G-Line from all servers on the mesh.


-virtual bool DelQLine (std::string nickname) + Adds a E-line The E-line is enforced as soon as it is added.


+virtual bool DelGLine (std::string hostmask) - Deletes a Q-Line from all servers on the mesh.


-virtual bool DelZLine (std::string ipaddr) + Deletes a G-Line from all servers on the mesh.


+virtual bool DelQLine (std::string nickname) - Deletes a Z-Line from all servers on the mesh.


-virtual bool DelKLine (std::string hostmask) + Deletes a Q-Line from all servers on the mesh.


+virtual bool DelZLine (std::string ipaddr) - Deletes a local K-Line.


-virtual bool DelELine (std::string hostmask) + Deletes a Z-Line from all servers on the mesh.


+virtual bool DelKLine (std::string hostmask) - Deletes a local E-Line.


-virtual long CalcDuration (std::string duration) + Deletes a local K-Line.


+virtual bool DelELine (std::string hostmask) - Calculates a duration This method will take a string containing a formatted duration (e.g.


-virtual bool IsValidMask (std::string mask) + Deletes a local E-Line.


+virtual long CalcDuration (std::string duration) - Returns true if a nick!ident string is correctly formatted, false if otherwise.


-virtual void MeshSendAll (std::string text) + Calculates a duration This method will take a string containing a formatted duration (e.g.


+virtual bool IsValidMask (std::string mask) - Sends a line of text to all connected servers.


-virtual void MeshSendCommon (userrec *user, std::string text) + Returns true if a nick!ident string is correctly formatted, false if otherwise.


+virtual void MeshSendAll (std::string text) - This method sends a line of text to all servers who have users which share common channels with the user you provide.


-virtual void MeshSendAllAlive (std::string text) + Sends a line of text to all connected servers.


+virtual void MeshSendCommon (userrec *user, std::string text) - This function is equivalent to Server::MeshSendToAll except it will only route to servers which are directly routable.


-virtual void MeshSendUnicast (std::string destination, std::string text) + This method sends a line of text to all servers who have users which share common channels with the user you provide.


+virtual void MeshSendAllAlive (std::string text) - This function sends a line of text directly to a server.


-virtual void MeshSendAllExcept (std::string target, std::string text) + This function is equivalent to Server::MeshSendToAll except it will only route to servers which are directly routable.


+virtual void MeshSendUnicast (std::string destination, std::string text) - This function sends to all servers EXCEPT the one you specify.


-virtual bool MeshCheckChan (chanrec *c, std::string servername) + This function sends a line of text directly to a server.


+virtual void MeshSendAllExcept (std::string target, std::string text) - This function is used to check if any users on channel c are on server servername.


-virtual bool MeshCheckCommon (userrec *u, std::string servername) + This function sends to all servers EXCEPT the one you specify.


+virtual bool MeshCheckChan (chanrec *c, std::string servername) - This function is used to check if user u has any channels in common with users on servername.


-virtual ModuleFindModule (std::string name) + This function is used to check if any users on channel c are on server servername.


+virtual bool MeshCheckCommon (userrec *u, std::string servername) - This function finds a module by name.


+ This function is used to check if user u has any channels in common with users on servername.


+virtual ModuleFindModule (std::string name) + + This function finds a module by name.



Detailed Description

Allows server output and query functions This class contains methods which allow a module to query the state of the irc server, and produce output to users and other servers. @@ -239,10 +242,10 @@ Default constructor.

Creates a Server object.

-Definition at line 431 of file modules.cpp. +Definition at line 355 of file modules.cpp.

-

00432 {
-00433 }
+
00356 {
+00357 }
 
@@ -275,15 +278,15 @@ Default destructor.

Destroys a Server object.

-Definition at line 435 of file modules.cpp. +Definition at line 359 of file modules.cpp.

-

00436 {
-00437 }
+
00360 {
+00361 }
 

Member Function Documentation

-

+

@@ -342,17 +345,17 @@ This allows modules to add extra commands into the command table. You must place typedef void (handlerfunc) (char**, int, userrec*); ... void handle_kill(char **parameters, int pcnt, userrec *user)

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 504 of file modules.cpp. +Definition at line 428 of file modules.cpp.

References createcommand().

-

00505 {
-00506         createcommand(cmd,f,flags,minparams,source);
-00507 }
+
00429 {
+00430         createcommand(cmd,f,flags,minparams,source);
+00431 }
 
-

+

@@ -401,19 +404,19 @@ References createcommand().

Adds a E-line The E-line is enforced as soon as it is added.

-The duration must be in seconds, however you can use the Server::CalcDuration method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. +The duration must be in seconds, however you can use the Server::CalcDuration method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name.

-Definition at line 750 of file modules.cpp. +Definition at line 679 of file modules.cpp.

References add_eline(), and duration().

-

00751 {
-00752         add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
-00753 }
+
00680 {
+00681         add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
+00682 }
 
-

+

@@ -448,20 +451,20 @@ This call is used to implement modes like +q and +a. The characteristics of thes (4) The mode and its parameter are NOT stored in the channels modes structure

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 667 of file modules.cpp. +Definition at line 596 of file modules.cpp.

-References DoAddExtendedMode(), ModeMakeList(), and MT_CHANNEL. +References DoAddExtendedMode(), ModeMakeList(), and MT_CHANNEL.

-

00668 {
-00669         bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1);
-00670         if (res)
-00671                 ModeMakeList(modechar);
-00672         return res;
-00673 }
+
00597 {
+00598         bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1);
+00599         if (res)
+00600                 ModeMakeList(modechar);
+00601         return res;
+00602 }
 
-

+

@@ -518,40 +521,40 @@ 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 639 of file modules.cpp. -

-References DEBUG, DoAddExtendedMode(), MT_CLIENT, and MT_SERVER. -

-

00640 {
-00641         if (((modechar >= 'A') && (modechar <= 'Z')) || ((modechar >= 'a') && (modechar <= 'z')))
-00642         {
-00643                 if (type == MT_SERVER)
-00644                 {
-00645                         log(DEBUG,"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion");
-00646                         return false;
-00647                 }
-00648                 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT))
-00649                 {
-00650                         log(DEBUG,"*** API ERROR *** Parameters on MT_CLIENT modes are not supported");
-00651                         return false;
-00652                 }
-00653                 if ((params_when_on>1) || (params_when_off>1))
-00654                 {
-00655                         log(DEBUG,"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported");
-00656                         return false;
-00657                 }
-00658                 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off);
-00659         }
-00660         else
-00661         {
-00662                 log(DEBUG,"*** API ERROR *** Muppet modechar detected.");
-00663         }
-00664         return false;
-00665 }
+Definition at line 568 of file modules.cpp.
+

+References DEBUG, DoAddExtendedMode(), MT_CLIENT, and MT_SERVER. +

+

00569 {
+00570         if (((modechar >= 'A') && (modechar <= 'Z')) || ((modechar >= 'a') && (modechar <= 'z')))
+00571         {
+00572                 if (type == MT_SERVER)
+00573                 {
+00574                         log(DEBUG,"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion");
+00575                         return false;
+00576                 }
+00577                 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT))
+00578                 {
+00579                         log(DEBUG,"*** API ERROR *** Parameters on MT_CLIENT modes are not supported");
+00580                         return false;
+00581                 }
+00582                 if ((params_when_on>1) || (params_when_off>1))
+00583                 {
+00584                         log(DEBUG,"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported");
+00585                         return false;
+00586                 }
+00587                 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off);
+00588         }
+00589         else
+00590         {
+00591                 log(DEBUG,"*** API ERROR *** Muppet modechar detected.");
+00592         }
+00593         return false;
+00594 }
 
-

+

@@ -600,19 +603,19 @@ References DEBUG, Adds a G-line The G-line is propogated to all of the servers in the mesh and enforced as soon as it is added.

-The duration must be in seconds, however you can use the Server::CalcDuration method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. +The duration must be in seconds, however you can use the Server::CalcDuration method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name.

-Definition at line 730 of file modules.cpp. +Definition at line 659 of file modules.cpp.

References add_gline(), and duration().

-

00731 {
-00732         add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
-00733 }
+
00660 {
+00661         add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
+00662 }
 
-

+

@@ -661,19 +664,19 @@ References add_gline(), and Server::CalcDuration method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. +The duration must be in seconds, however you can use the Server::CalcDuration method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name.

-Definition at line 745 of file modules.cpp. +Definition at line 674 of file modules.cpp.

References add_kline(), and duration().

-

00746 {
-00747         add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
-00748 }
+
00675 {
+00676         add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
+00677 }
 
-

+

@@ -722,19 +725,19 @@ References add_kline(), and Server::CalcDuration method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. +The duration must be in seconds, however you can use the Server::CalcDuration method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name.

-Definition at line 735 of file modules.cpp. +Definition at line 664 of file modules.cpp.

References add_qline(), and duration().

-

00736 {
-00737         add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str());
-00738 }
+
00665 {
+00666         add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str());
+00667 }
 
-

+

@@ -783,19 +786,19 @@ References add_qline(), and Server::CalcDuration method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. +The duration must be in seconds, however you can use the Server::CalcDuration method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name.

-Definition at line 740 of file modules.cpp. +Definition at line 669 of file modules.cpp.

References add_zline(), and duration().

-

00741 {
-00742         add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str());
-00743 }
+
00670 {
+00671         add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str());
+00672 }
 
-

+

@@ -825,17 +828,17 @@ Calculates a duration This method will take a string containing a formatted dura

"1w2d") and return its value as a total number of seconds. This is the same function used internally by /GLINE etc to set the ban times.

-Definition at line 780 of file modules.cpp. +Definition at line 709 of file modules.cpp.

References duration().

-

00781 {
-00782         return duration(delta.c_str());
-00783 }
+
00710 {
+00711         return duration(delta.c_str());
+00712 }
 
-

+

@@ -885,17 +888,17 @@ References duration(). 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
-) 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 AddCommand(). 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. +) 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 AddCommand(). 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 494 of file modules.cpp. +Definition at line 418 of file modules.cpp.

-

00495 {
-00496         call_handler(commandname.c_str(),parameters,pcnt,user);
-00497 }
+
00419 {
+00420         call_handler(commandname.c_str(),parameters,pcnt,user);
+00421 }
 
-

+

@@ -934,17 +937,17 @@ 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 587 of file modules.cpp. +Definition at line 511 of file modules.cpp.

References ChangeName().

-

00588 {
-00589         ChangeName(user,gecos.c_str());
-00590 }
+
00512 {
+00513         ChangeName(user,gecos.c_str());
+00514 }
 
-

+

@@ -983,17 +986,17 @@ 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 582 of file modules.cpp. +Definition at line 506 of file modules.cpp.

References ChangeDisplayedHost().

-

00583 {
-00584         ChangeDisplayedHost(user,host.c_str());
-00585 }
+
00507 {
+00508         ChangeDisplayedHost(user,host.c_str());
+00509 }
 
-

+

@@ -1032,11 +1035,11 @@ 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 479 of file modules.cpp. +Definition at line 403 of file modules.cpp.

-

00480 {
-00481         force_nickchange(user,nickname.c_str());
-00482 }
+
00404 {
+00405         force_nickchange(user,nickname.c_str());
+00406 }
 
@@ -1079,13 +1082,13 @@ 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 612 of file modules.cpp. +Definition at line 536 of file modules.cpp.

References cmode().

-

00613 {
-00614         return cmode(User,Chan);
-00615 }
+
00537 {
+00538         return cmode(User,Chan);
+00539 }
 
@@ -1128,13 +1131,13 @@ Returns true if two users share a common channel.

This method is used internally by the NICK and QUIT commands, and the Server::SendCommon method.

-Definition at line 560 of file modules.cpp. +Definition at line 484 of file modules.cpp.

References common_channels().

-

00561 {
-00562         return (common_channels(u1,u2) != 0);
-00563 }
+
00485 {
+00486         return (common_channels(u1,u2) != 0);
+00487 }
 
@@ -1168,15 +1171,15 @@ 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 675 of file modules.cpp. +Definition at line 604 of file modules.cpp.

-

00676 {
-00677         return usercount(c);
-00678 }
+
00605 {
+00606         return usercount(c);
+00607 }
 
-

+

@@ -1206,17 +1209,17 @@ Deletes a local E-Line.

-Definition at line 775 of file modules.cpp. +Definition at line 704 of file modules.cpp.

References del_eline().

-

00776 {
-00777         del_eline(hostmask.c_str());
-00778 }
+
00705 {
+00706         del_eline(hostmask.c_str());
+00707 }
 
-

+

@@ -1246,17 +1249,17 @@ Deletes a G-Line from all servers on the mesh.

-Definition at line 755 of file modules.cpp. +Definition at line 684 of file modules.cpp.

References del_gline().

-

00756 {
-00757         del_gline(hostmask.c_str());
-00758 }
+
00685 {
+00686         del_gline(hostmask.c_str());
+00687 }
 
-

+

@@ -1286,17 +1289,17 @@ Deletes a local K-Line.

-Definition at line 770 of file modules.cpp. +Definition at line 699 of file modules.cpp.

References del_kline().

-

00771 {
-00772         del_kline(hostmask.c_str());
-00773 }
+
00700 {
+00701         del_kline(hostmask.c_str());
+00702 }
 
-

+

@@ -1326,17 +1329,17 @@ Deletes a Q-Line from all servers on the mesh.

-Definition at line 760 of file modules.cpp. +Definition at line 689 of file modules.cpp.

References del_qline().

-

00761 {
-00762         del_qline(nickname.c_str());
-00763 }
+
00690 {
+00691         del_qline(nickname.c_str());
+00692 }
 
-

+

@@ -1366,13 +1369,13 @@ Deletes a Z-Line from all servers on the mesh.

-Definition at line 765 of file modules.cpp. +Definition at line 694 of file modules.cpp.

References del_zline().

-

00766 {
-00767         del_zline(ipaddr.c_str());
-00768 }
+
00695 {
+00696         del_zline(ipaddr.c_str());
+00697 }
 
@@ -1406,11 +1409,11 @@ 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 607 of file modules.cpp. +Definition at line 531 of file modules.cpp.

-

00608 {
-00609         return FindChan(channel.c_str());
-00610 }
+
00532 {
+00533         return FindChan(channel.c_str());
+00534 }
 
@@ -1444,17 +1447,17 @@ Attempts to look up a nick using the file descriptor associated with that nick.

This function will return NULL if the file descriptor is not associated with a valid user.

-Definition at line 602 of file modules.cpp. +Definition at line 526 of file modules.cpp.

-References fd_ref_table. +References fd_ref_table.

-

00603 {
-00604         return (socket < 65536 ? fd_ref_table[socket] : NULL);
-00605 }
+
00527 {
+00528         return (socket < 65536 ? fd_ref_table[socket] : NULL);
+00529 }
 
-

+

@@ -1484,20 +1487,20 @@ This function finds a module by name.

You must provide the filename of the module. If the module cannot be found (is not loaded) the function will return NULL.

-Definition at line 858 of file modules.cpp. +Definition at line 787 of file modules.cpp.

-References MODCOUNT, module_names, and modules. +References MODCOUNT, module_names, and modules.

-

00859 {
-00860         for (int i = 0; i <= MODCOUNT; i++)
-00861         {
-00862                 if (module_names[i] == name)
-00863                 {
-00864                         return modules[i];
-00865                 }
-00866         }
-00867         return NULL;
-00868 }
+
00788 {
+00789         for (int i = 0; i <= MODCOUNT; i++)
+00790         {
+00791                 if (module_names[i] == name)
+00792                 {
+00793                         return modules[i];
+00794                 }
+00795         }
+00796         return NULL;
+00797 }
 
@@ -1531,15 +1534,15 @@ 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 597 of file modules.cpp. +Definition at line 521 of file modules.cpp.

-

00598 {
-00599         return Find(nick);
-00600 }
+
00522 {
+00523         return Find(nick);
+00524 }
 
-

+

@@ -1568,11 +1571,11 @@ Returns the information of the server as returned by the /ADMIN command.

See the Admin class for further information of the return value. The members Admin::Nick, Admin::Email and Admin::Name contain the information for the server where the module is loaded.

-Definition at line 632 of file modules.cpp. +Definition at line 561 of file modules.cpp.

-

00633 {
-00634         return Admin(getadminname(),getadminemail(),getadminnick());
-00635 }
+
00562 {
+00563         return Admin(getadminname(),getadminemail(),getadminnick());
+00564 }
 
@@ -1605,11 +1608,48 @@ Returns the network name, global to all linked servers.

-Definition at line 627 of file modules.cpp. +Definition at line 551 of file modules.cpp. +

+

00552 {
+00553         return getnetworkname();
+00554 }
+
+ + +

+ + + + +
+ + + + + + + + + +
std::string Server::GetServerDescription  )  [virtual]
+
+ + + +
+   + + +

+Returns the server description string of the local server. +

+ +

+Definition at line 556 of file modules.cpp.

-

00628 {
-00629         return getnetworkname();
-00630 }
+
00557 {
+00558         return getserverdesc();
+00559 }
 
@@ -1642,15 +1682,15 @@ Returns the server name of the server where the module is loaded.

-Definition at line 622 of file modules.cpp. +Definition at line 546 of file modules.cpp.

-

00623 {
-00624         return getservername();
-00625 }
+
00547 {
+00548         return getservername();
+00549 }
 
-

+

@@ -1680,21 +1720,21 @@ 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 467 of file modules.cpp. -

-References chanuserlist, chanrec::GetUsers(), and list. -

-

00468 {
-00469         chanuserlist userl;
-00470         userl.clear();
-00471         std::vector<char*> *list = chan->GetUsers();
-00472         for (std::vector<char*>::iterator i = list->begin(); i != list->end(); i++)
-00473         {
-00474                 char* o = *i;
-00475                 userl.push_back((userrec*)o);
-00476         }
-00477         return userl;
-00478 }
+Definition at line 391 of file modules.cpp.
+

+References chanuserlist, chanrec::GetUsers(), and list. +

+

00392 {
+00393         chanuserlist userl;
+00394         userl.clear();
+00395         std::vector<char*> *list = chan->GetUsers();
+00396         for (std::vector<char*>::iterator i = list->begin(); i != list->end(); i++)
+00397         {
+00398                 char* o = *i;
+00399                 userl.push_back((userrec*)o);
+00400         }
+00401         return userl;
+00402 }
 
@@ -1728,13 +1768,13 @@ Returns true if a nick is valid.

Nicks for unregistered connections will return false.

-Definition at line 592 of file modules.cpp. +Definition at line 516 of file modules.cpp.

References isnick().

-

00593 {
-00594         return (isnick(nick.c_str()) != 0);
-00595 }
+
00517 {
+00518         return (isnick(nick.c_str()) != 0);
+00519 }
 
@@ -1777,17 +1817,17 @@ 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 617 of file modules.cpp. +Definition at line 541 of file modules.cpp.

References has_channel().

-

00618 {
-00619         return has_channel(User,Chan);
-00620 }
+
00542 {
+00543         return has_channel(User,Chan);
+00544 }
 
-

+

@@ -1817,17 +1857,17 @@ 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 489 of file modules.cpp. +Definition at line 413 of file modules.cpp.

References is_uline().

-

00490 {
-00491         return is_uline(server.c_str());
-00492 }
+
00414 {
+00415         return is_uline(server.c_str());
+00416 }
 
-

+

@@ -1857,39 +1897,39 @@ Returns true if a nick!ident string is correctly formatted, false if otherwise.

-Definition at line 785 of file modules.cpp. -

-

00786 {
-00787         const char* dest = mask.c_str();
-00788         if (strchr(dest,'!')==0)
-00789                 return false;
-00790         if (strchr(dest,'@')==0)
-00791                 return false;
-00792         for (int i = 0; i < strlen(dest); i++)
-00793                 if (dest[i] < 32)
-00794                         return false;
-00795         for (int i = 0; i < strlen(dest); i++)
-00796                 if (dest[i] > 126)
-00797                         return false;
-00798         int c = 0;
-00799         for (int i = 0; i < strlen(dest); i++)
-00800                 if (dest[i] == '!')
-00801                         c++;
-00802         if (c>1)
-00803                 return false;
-00804         c = 0;
-00805         for (int i = 0; i < strlen(dest); i++)
-00806                 if (dest[i] == '@')
-00807                         c++;
-00808         if (c>1)
-00809                 return false;
-00810 
-00811         return true;
-00812 }
+Definition at line 714 of file modules.cpp.
+

+

00715 {
+00716         const char* dest = mask.c_str();
+00717         if (strchr(dest,'!')==0)
+00718                 return false;
+00719         if (strchr(dest,'@')==0)
+00720                 return false;
+00721         for (int i = 0; i < strlen(dest); i++)
+00722                 if (dest[i] < 32)
+00723                         return false;
+00724         for (int i = 0; i < strlen(dest); i++)
+00725                 if (dest[i] > 126)
+00726                         return false;
+00727         int c = 0;
+00728         for (int i = 0; i < strlen(dest); i++)
+00729                 if (dest[i] == '!')
+00730                         c++;
+00731         if (c>1)
+00732                 return false;
+00733         c = 0;
+00734         for (int i = 0; i < strlen(dest); i++)
+00735                 if (dest[i] == '@')
+00736                         c++;
+00737         if (c>1)
+00738                 return false;
+00739 
+00740         return true;
+00741 }
 
-

+

@@ -1934,11 +1974,11 @@ 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 457 of file modules.cpp. +Definition at line 381 of file modules.cpp.

-

00458 {
-00459         return add_channel(user,cname.c_str(),key.c_str(),false);
-00460 }
+
00382 {
+00383         return add_channel(user,cname.c_str(),key.c_str(),false);
+00384 }
 
@@ -1981,15 +2021,15 @@ 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 499 of file modules.cpp. +Definition at line 423 of file modules.cpp.

-

00500 {
-00501         log(level,"%s",s.c_str());
-00502 }
+
00424 {
+00425         log(level,"%s",s.c_str());
+00426 }
 
-

+

@@ -2028,18 +2068,18 @@ 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 444 of file modules.cpp. +Definition at line 368 of file modules.cpp.

-

00445 {
-00446         char literal[MAXBUF],pattern[MAXBUF];
-00447         strlcpy(literal,sliteral.c_str(),MAXBUF);
-00448         strlcpy(pattern,spattern.c_str(),MAXBUF);
-00449         return match(literal,pattern);
-00450 }
+
00369 {
+00370         char literal[MAXBUF],pattern[MAXBUF];
+00371         strlcpy(literal,sliteral.c_str(),MAXBUF);
+00372         strlcpy(pattern,spattern.c_str(),MAXBUF);
+00373         return match(literal,pattern);
+00374 }
 
-

+

@@ -2078,19 +2118,19 @@ This function is used to check if any users on channel c are on server servernam

This is used internally by PRIVMSG etc. You should not need to use it.

-Definition at line 840 of file modules.cpp. +Definition at line 769 of file modules.cpp.

-

00841 {
-00842         if (c)
-00843         {
-00844                 return ChanAnyOnThisServer(c,(char*)servername.c_str());
-00845         }
-00846         else return false;
-00847 }
+
00770 {
+00771         if (c)
+00772         {
+00773                 return ChanAnyOnThisServer(c,(char*)servername.c_str());
+00774         }
+00775         else return false;
+00776 }
 
-

+

@@ -2127,21 +2167,21 @@ Definition at line 840

This function is used to check if user u has any channels in common with users on servername.

-This is used internally by Server::MeshSendCommon. You should very rarely need to use it. +This is used internally by Server::MeshSendCommon. You should very rarely need to use it.

-Definition at line 849 of file modules.cpp. +Definition at line 778 of file modules.cpp.

-

00850 {
-00851         if (u)
-00852         {
-00853                 return CommonOnThisServer(u,(char*)servername.c_str());
-00854         }
-00855         else return false;
-00856 }
+
00779 {
+00780         if (u)
+00781         {
+00782                 return CommonOnThisServer(u,(char*)servername.c_str());
+00783         }
+00784         else return false;
+00785 }
 
-

+

@@ -2171,15 +2211,15 @@ Sends a line of text to all connected servers.

If a server is not directly reachable, the core deals with routing the message, and will also deal with failures transparently.

-Definition at line 814 of file modules.cpp. +Definition at line 743 of file modules.cpp.

-

00815 {
-00816         NetSendToAll((char*)text.c_str());
-00817 }
+
00744 {
+00745         NetSendToAll((char*)text.c_str());
+00746 }
 
-

+

@@ -2209,15 +2249,15 @@ This function is equivalent to Server::MeshSendToAll except it will only route t

-Definition at line 825 of file modules.cpp. +Definition at line 754 of file modules.cpp.

-

00826 {
-00827         NetSendToAllAlive((char*)text.c_str());
-00828 }
+
00755 {
+00756         NetSendToAllAlive((char*)text.c_str());
+00757 }
 
-

+

@@ -2256,15 +2296,15 @@ This function sends to all servers EXCEPT the one you specify.

You should usually use this function to send messages, specifying the SENDER of your message as 'target'. This will prevent message loops.

-Definition at line 835 of file modules.cpp. +Definition at line 764 of file modules.cpp.

-

00836 {
-00837         NetSendToAllExcept(target.c_str(),(char*)text.c_str());
-00838 }
+
00765 {
+00766         NetSendToAllExcept(target.c_str(),(char*)text.c_str());
+00767 }
 
-

+

@@ -2303,16 +2343,16 @@ This method sends a line of text to all servers who have users which share commo

For example, if user A is on server A, and they are on channels #one and #two, and user B is on server B, and also on channel #one, but user C is on server C and on neither #one or #two, this function will cause the text to only be sent to server B. However, if server B is only reachable via C, it will route it to C (you do not have to worry about this routing, it is done transparently, but its good to know how things work!)

-Definition at line 819 of file modules.cpp. +Definition at line 748 of file modules.cpp.

-

00820 {
-00821         if (user)
-00822                 NetSendToCommon(user,(char*)text.c_str());
-00823 }
+
00749 {
+00750         if (user)
+00751                 NetSendToCommon(user,(char*)text.c_str());
+00752 }
 
-

+

@@ -2351,15 +2391,15 @@ This function sends a line of text directly to a server.

If the server is not directly routable at this time, the server attempts to route text through the mesh.

-Definition at line 830 of file modules.cpp. +Definition at line 759 of file modules.cpp.

-

00831 {
-00832         NetSendToOne((char*)destination.c_str(),(char*)text.c_str());
-00833 }
+
00760 {
+00761         NetSendToOne((char*)destination.c_str(),(char*)text.c_str());
+00762 }
 
-

+

@@ -2404,15 +2444,15 @@ 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 462 of file modules.cpp. +Definition at line 386 of file modules.cpp.

-

00463 {
-00464         return del_channel(user,cname.c_str(),reason.c_str(),false);
-00465 }
+
00387 {
+00388         return del_channel(user,cname.c_str(),reason.c_str(),false);
+00389 }
 
-

+

@@ -2457,42 +2497,42 @@ This user takes one user, and switches their file descriptor with another user,

The user in 'alive' is booted off the server with the given message. The user referred to by 'zombie' should have previously been locked with Server::ZombifyUser, otherwise stale sockets and file descriptor leaks can occur. After this call, the pointer to alive will be invalid, and the pointer to zombie will be equivalent in effect to the old pointer to alive.

-Definition at line 700 of file modules.cpp. -

-References ucrec::channel, userrec::chans, userrec::ClearBuffer(), connection::fd, FD_MAGIC_NUMBER, fd_ref_table, connection::host, userrec::ident, chanrec::name, userrec::nick, chanrec::setby, chanrec::topic, and chanrec::topicset. -

-

00701 {
-00702         zombie->fd = alive->fd;
-00703         alive->fd = FD_MAGIC_NUMBER;
-00704         alive->ClearBuffer();
-00705         Write(zombie->fd,":%s!%s@%s NICK %s",alive->nick,alive->ident,alive->host,zombie->nick);
-00706         kill_link(alive,message.c_str());
-00707         fd_ref_table[zombie->fd] = zombie;
-00708         for (int i = 0; i != MAXCHANS; i++)
-00709         {
-00710                 if (zombie->chans[i].channel != NULL)
-00711                 {
-00712                         if (zombie->chans[i].channel->name)
-00713                         {
-00714                                 chanrec* Ptr = zombie->chans[i].channel;
-00715                                 WriteFrom(zombie->fd,zombie,"JOIN %s",Ptr->name);
-00716                                 if (Ptr->topicset)
-00717                                 {
-00718                                         WriteServ(zombie->fd,"332 %s %s :%s", zombie->nick, Ptr->name, Ptr->topic);
-00719                                         WriteServ(zombie->fd,"333 %s %s %s %d", zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset);
-00720                                 }
-00721                                 userlist(zombie,Ptr);
-00722                                 WriteServ(zombie->fd,"366 %s %s :End of /NAMES list.", zombie->nick, Ptr->name);
-00723 
-00724                         }
-00725                 }
-00726         }
-00727 
-00728 }
+Definition at line 629 of file modules.cpp.
+

+References ucrec::channel, userrec::chans, userrec::ClearBuffer(), connection::fd, FD_MAGIC_NUMBER, fd_ref_table, connection::host, userrec::ident, chanrec::name, userrec::nick, chanrec::setby, chanrec::topic, and chanrec::topicset. +

+

00630 {
+00631         zombie->fd = alive->fd;
+00632         alive->fd = FD_MAGIC_NUMBER;
+00633         alive->ClearBuffer();
+00634         Write(zombie->fd,":%s!%s@%s NICK %s",alive->nick,alive->ident,alive->host,zombie->nick);
+00635         kill_link(alive,message.c_str());
+00636         fd_ref_table[zombie->fd] = zombie;
+00637         for (int i = 0; i != MAXCHANS; i++)
+00638         {
+00639                 if (zombie->chans[i].channel != NULL)
+00640                 {
+00641                         if (zombie->chans[i].channel->name)
+00642                         {
+00643                                 chanrec* Ptr = zombie->chans[i].channel;
+00644                                 WriteFrom(zombie->fd,zombie,"JOIN %s",Ptr->name);
+00645                                 if (Ptr->topicset)
+00646                                 {
+00647                                         WriteServ(zombie->fd,"332 %s %s :%s", zombie->nick, Ptr->name, Ptr->topic);
+00648                                         WriteServ(zombie->fd,"333 %s %s %s %d", zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset);
+00649                                 }
+00650                                 userlist(zombie,Ptr);
+00651                                 WriteServ(zombie->fd,"366 %s %s :End of /NAMES list.", zombie->nick, Ptr->name);
+00652 
+00653                         }
+00654                 }
+00655         }
+00656 
+00657 }
 
-

+

@@ -2533,11 +2573,11 @@ To the user, it will appear as if they typed /QUIT themselves, except for the fa WARNING!

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 484 of file modules.cpp. +Definition at line 408 of file modules.cpp.

-

00485 {
-00486         kill_link(user,reason.c_str());
-00487 }
+
00409 {
+00410         kill_link(user,reason.c_str());
+00411 }
 
@@ -2580,11 +2620,11 @@ 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 514 of file modules.cpp. +Definition at line 438 of file modules.cpp.

-

00515 {
-00516         Write(Socket,"%s",s.c_str());
-00517 }
+
00439 {
+00440         Write(Socket,"%s",s.c_str());
+00441 }
 
@@ -2639,18 +2679,18 @@ 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 548 of file modules.cpp. -

-

00549 {
-00550         if (IncludeSender)
-00551         {
-00552                 WriteChannel(Channel,User,"%s",s.c_str());
-00553         }
-00554         else
-00555         {
-00556                 ChanExceptSender(Channel,User,"%s",s.c_str());
-00557         }
-00558 }
+Definition at line 472 of file modules.cpp.
+

+

00473 {
+00474         if (IncludeSender)
+00475         {
+00476                 WriteChannel(Channel,User,"%s",s.c_str());
+00477         }
+00478         else
+00479         {
+00480                 ChanExceptSender(Channel,User,"%s",s.c_str());
+00481         }
+00482 }
 
@@ -2699,11 +2739,11 @@ Writes text to a channel, but from a server, including all.

This can be used to send server notices to a group of users.

-Definition at line 543 of file modules.cpp. +Definition at line 467 of file modules.cpp.

-

00544 {
-00545         WriteChannelWithServ((char*)ServName.c_str(), Channel, "%s", text.c_str());
-00546 }
+
00468 {
+00469         WriteChannelWithServ((char*)ServName.c_str(), Channel, "%s", text.c_str());
+00470 }
 
@@ -2752,18 +2792,18 @@ 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 565 of file modules.cpp. -

-

00566 {
-00567         if (IncludeSender)
-00568         {
-00569                 WriteCommon(User,"%s",text.c_str());
-00570         }
-00571         else
-00572         {
-00573                 WriteCommonExcept(User,"%s",text.c_str());
-00574         }
-00575 }
+Definition at line 489 of file modules.cpp.
+

+

00490 {
+00491         if (IncludeSender)
+00492         {
+00493                 WriteCommon(User,"%s",text.c_str());
+00494         }
+00495         else
+00496         {
+00497                 WriteCommonExcept(User,"%s",text.c_str());
+00498         }
+00499 }
 
@@ -2812,15 +2852,15 @@ 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 524 of file modules.cpp. +Definition at line 448 of file modules.cpp.

-

00525 {
-00526         WriteFrom(Socket,User,"%s",s.c_str());
-00527 }
+
00449 {
+00450         WriteFrom(Socket,User,"%s",s.c_str());
+00451 }
 
-

+

@@ -2872,13 +2912,13 @@ modes[2] = user->nick;

Srv->SendMode(modes,3,user);

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 509 of file modules.cpp. +Definition at line 433 of file modules.cpp.

References server_mode().

-

00510 {
-00511         server_mode(parameters,pcnt,user);
-00512 }
+
00434 {
+00435         server_mode(parameters,pcnt,user);
+00436 }
 
@@ -2912,11 +2952,11 @@ Sends text to all opers.

This method sends a server notice to all opers with the usermode +s.

-Definition at line 439 of file modules.cpp. +Definition at line 363 of file modules.cpp.

-

00440 {
-00441         WriteOpers("%s",s.c_str());
-00442 }
+
00364 {
+00365         WriteOpers("%s",s.c_str());
+00366 }
 
@@ -2959,11 +2999,11 @@ 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 519 of file modules.cpp. +Definition at line 443 of file modules.cpp.

-

00520 {
-00521         WriteServ(Socket,"%s",s.c_str());
-00522 }
+
00444 {
+00445         WriteServ(Socket,"%s",s.c_str());
+00446 }
 
@@ -3016,26 +3056,26 @@ The format will become:

:localserver TEXT

Which is useful for numerics and server notices to single users, etc.

-Definition at line 529 of file modules.cpp. -

-References connection::fd. -

-

00530 {
-00531         if (!Source)
-00532         {
-00533                 // if source is NULL, then the message originates from the local server
-00534                 Write(Dest->fd,":%s %s",this->GetServerName().c_str(),s.c_str());
-00535         }
-00536         else
-00537         {
-00538                 // otherwise it comes from the user specified
-00539                 WriteTo(Source,Dest,"%s",s.c_str());
-00540         }
-00541 }
+Definition at line 453 of file modules.cpp.
+

+References connection::fd. +

+

00454 {
+00455         if (!Source)
+00456         {
+00457                 // if source is NULL, then the message originates from the local server
+00458                 Write(Dest->fd,":%s %s",this->GetServerName().c_str(),s.c_str());
+00459         }
+00460         else
+00461         {
+00462                 // otherwise it comes from the user specified
+00463                 WriteTo(Source,Dest,"%s",s.c_str());
+00464         }
+00465 }
 
-

+

@@ -3082,11 +3122,11 @@ These can be RFC specified modes such as +i, or module provided modes, including Serv->SendToModeMask("xi", WM_OR, "m00");

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 452 of file modules.cpp. +Definition at line 376 of file modules.cpp.

-

00453 {
-00454         WriteMode(modes.c_str(),flags,"%s",text.c_str());
-00455 }
+
00377 {
+00378         WriteMode(modes.c_str(),flags,"%s",text.c_str());
+00379 }
 
@@ -3129,15 +3169,15 @@ 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 577 of file modules.cpp. +Definition at line 501 of file modules.cpp.

-

00578 {
-00579         WriteWallOps(User,false,"%s",text.c_str());
-00580 }
+
00502 {
+00503         WriteWallOps(User,false,"%s",text.c_str());
+00504 }
 
-

+

@@ -3176,33 +3216,33 @@ Remove a user's connection to the irc server, but leave their client in existenc

When you call this function, the user's file descriptor will be replaced with the value of FD_MAGIC_NUMBER and their old file descriptor will be closed. This idle client will remain until it is restored with a valid file descriptor, or is removed from IRC by an operator After this call, the pointer to user will be invalid.

-Definition at line 681 of file modules.cpp. -

-References userrec::ClearBuffer(), DEBUG, connection::fd, FD_MAGIC_NUMBER, connection::host, and userrec::ident. -

-

00682 {
-00683         unsigned int old_fd = user->fd;
-00684         user->fd = FD_MAGIC_NUMBER;
-00685         user->ClearBuffer();
-00686         Write(old_fd,"ERROR :Closing link (%s@%s) [%s]",user->ident,user->host,message.c_str());
-00687 #ifdef USE_KQUEUE
-00688         struct kevent ke;
-00689         EV_SET(&ke, old_fd, EVFILT_READ, EV_DELETE, 0, 0, NULL);
-00690         int i = kevent(kq, &ke, 1, 0, 0, NULL);
-00691         if (i == -1)
-00692         {
-00693                 log(DEBUG,"kqueue: Failed to remove user from queue!");
-00694         }
-00695 #endif
-00696         shutdown(old_fd,2);
-00697         close(old_fd);
-00698 }
+Definition at line 610 of file modules.cpp.
+

+References userrec::ClearBuffer(), DEBUG, connection::fd, FD_MAGIC_NUMBER, connection::host, and userrec::ident. +

+

00611 {
+00612         unsigned int old_fd = user->fd;
+00613         user->fd = FD_MAGIC_NUMBER;
+00614         user->ClearBuffer();
+00615         Write(old_fd,"ERROR :Closing link (%s@%s) [%s]",user->ident,user->host,message.c_str());
+00616 #ifdef USE_KQUEUE
+00617         struct kevent ke;
+00618         EV_SET(&ke, old_fd, EVFILT_READ, EV_DELETE, 0, 0, NULL);
+00619         int i = kevent(kq, &ke, 1, 0, 0, NULL);
+00620         if (i == -1)
+00621         {
+00622                 log(DEBUG,"kqueue: Failed to remove user from queue!");
+00623         }
+00624 #endif
+00625         shutdown(old_fd,2);
+00626         close(old_fd);
+00627 }
 


The documentation for this class was generated from the following files: -
Generated on Fri May 13 15:49:55 2005 for InspIRCd by +
Generated on Sun May 15 17:03:43 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classVersion-members.html b/docs/module-doc/classVersion-members.html index 14be1c20a..8bfb03d10 100644 --- a/docs/module-doc/classVersion-members.html +++ b/docs/module-doc/classVersion-members.html @@ -4,7 +4,7 @@ - +

Version Member List

This is the complete list of members for Version, including all inherited members. @@ -15,7 +15,7 @@ -
ageclassbase
BuildVersion
RevisionVersion
Version(int major, int minor, int revision, int build, int flags)Version
~classbase()classbase [inline]

Generated on Fri May 13 15:50:07 2005 for InspIRCd by +
Generated on Sun May 15 17:03:52 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classVersion.html b/docs/module-doc/classVersion.html index 3f83fc228..2a3373493 100644 --- a/docs/module-doc/classVersion.html +++ b/docs/module-doc/classVersion.html @@ -4,7 +4,7 @@ - +

Version Class Reference

Holds a module's Version information The four members (set by the constructor only) indicate details as to the version number of a module. More...

@@ -98,9 +98,9 @@ Definition at line 111 of

-Definition at line 310 of file modules.cpp. +Definition at line 234 of file modules.cpp.

-

00310 : Major(major), Minor(minor), Revision(revision), Build(build), Flags(flags) { };
+
00234 : Major(major), Minor(minor), Revision(revision), Build(build), Flags(flags) { };
 
@@ -227,7 +227,7 @@ Definition at line 114 of
The documentation for this class was generated from the following files: -
Generated on Fri May 13 15:50:07 2005 for InspIRCd by +
Generated on Sun May 15 17:03:52 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classWhoWasUser-members.html b/docs/module-doc/classWhoWasUser-members.html index 709b32406..31f07221d 100644 --- a/docs/module-doc/classWhoWasUser-members.html +++ b/docs/module-doc/classWhoWasUser-members.html @@ -4,7 +4,7 @@ - +

WhoWasUser Member List

This is the complete list of members for WhoWasUser, including all inherited members. @@ -13,7 +13,7 @@ -
dhostWhoWasUser
fullnameWhoWasUser
nickWhoWasUser
serverWhoWasUser
signonWhoWasUser

Generated on Fri May 13 15:50:07 2005 for InspIRCd by +
Generated on Sun May 15 17:03:53 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classWhoWasUser.html b/docs/module-doc/classWhoWasUser.html index 5958d81dd..cc427000f 100644 --- a/docs/module-doc/classWhoWasUser.html +++ b/docs/module-doc/classWhoWasUser.html @@ -4,7 +4,7 @@ - +

WhoWasUser Class Reference

A lightweight userrec used by WHOWAS. More...

@@ -34,7 +34,7 @@ A lightweight userrec used by WHOWAS.

-Definition at line 315 of file users.h.


Member Data Documentation

+Definition at line 318 of file users.h.

Member Data Documentation

@@ -56,7 +56,7 @@ Definition at line 315 of f

-Definition at line 320 of file users.h. +Definition at line 323 of file users.h.

@@ -80,7 +80,7 @@ Definition at line 320 of f

-Definition at line 322 of file users.h. +Definition at line 325 of file users.h.

@@ -104,7 +104,7 @@ Definition at line 322 of f

-Definition at line 321 of file users.h. +Definition at line 324 of file users.h.

@@ -128,7 +128,7 @@ Definition at line 321 of f

-Definition at line 319 of file users.h. +Definition at line 322 of file users.h.

@@ -152,7 +152,7 @@ Definition at line 319 of f

-Definition at line 318 of file users.h. +Definition at line 321 of file users.h.

@@ -176,7 +176,7 @@ Definition at line 318 of f

-Definition at line 323 of file users.h. +Definition at line 326 of file users.h.

@@ -200,12 +200,12 @@ Definition at line 323 of f

-Definition at line 324 of file users.h. +Definition at line 327 of file users.h.


The documentation for this class was generated from the following file: -
Generated on Fri May 13 15:50:07 2005 for InspIRCd by +
Generated on Sun May 15 17:03:53 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classXLine-members.html b/docs/module-doc/classXLine-members.html index f2cb45c69..0e58b98e8 100644 --- a/docs/module-doc/classXLine-members.html +++ b/docs/module-doc/classXLine-members.html @@ -4,7 +4,7 @@ - +

XLine Member List

This is the complete list of members for XLine, including all inherited members. @@ -14,7 +14,7 @@ -
ageclassbase
classbase()classbase [inline]
set_timeXLine
sourceXLine
~classbase()classbase [inline]

Generated on Fri May 13 15:50:08 2005 for InspIRCd by +
Generated on Sun May 15 17:03:54 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classXLine.html b/docs/module-doc/classXLine.html index ab642ac68..43585dca1 100644 --- a/docs/module-doc/classXLine.html +++ b/docs/module-doc/classXLine.html @@ -4,7 +4,7 @@ - +

XLine Class Reference

XLine is the base class for ban lines such as G lines and K lines. More...

@@ -180,7 +180,7 @@ Definition at line 48 of fi


The documentation for this class was generated from the following file: -
Generated on Fri May 13 15:50:08 2005 for InspIRCd by +
Generated on Sun May 15 17:03:54 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classZLine-members.html b/docs/module-doc/classZLine-members.html index 21836295a..e3e93500b 100644 --- a/docs/module-doc/classZLine-members.html +++ b/docs/module-doc/classZLine-members.html @@ -4,7 +4,7 @@ - +

ZLine Member List

This is the complete list of members for ZLine, including all inherited members. @@ -16,7 +16,7 @@ -
ageclassbase
classbase()classbase [inline]
set_timeXLine
sourceXLine
~classbase()classbase [inline]

Generated on Fri May 13 15:50:10 2005 for InspIRCd by +
Generated on Sun May 15 17:03:55 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classZLine.html b/docs/module-doc/classZLine.html index 67b73386c..cd558704a 100644 --- a/docs/module-doc/classZLine.html +++ b/docs/module-doc/classZLine.html @@ -4,7 +4,7 @@ - +

ZLine Class Reference

ZLine class. More...

@@ -90,7 +90,7 @@ Definition at line 103 of f


The documentation for this class was generated from the following file: -
Generated on Fri May 13 15:50:10 2005 for InspIRCd by +
Generated on Sun May 15 17:03:55 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classchanrec-members.html b/docs/module-doc/classchanrec-members.html index 2a25bf948..80ec39cf3 100644 --- a/docs/module-doc/classchanrec-members.html +++ b/docs/module-doc/classchanrec-members.html @@ -4,7 +4,7 @@ - +

chanrec Member List

This is the complete list of members for chanrec, including all inherited members. @@ -33,7 +33,7 @@ -
AddUser(char *castuser)chanrec
ageclassbase
topicsetchanrec
~chanrec()chanrec [inline, virtual]
~classbase()classbase [inline]

Generated on Fri May 13 15:49:22 2005 for InspIRCd by +
Generated on Sun May 15 17:03:01 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classchanrec.html b/docs/module-doc/classchanrec.html index f3cd20fae..1e44bd8e0 100644 --- a/docs/module-doc/classchanrec.html +++ b/docs/module-doc/classchanrec.html @@ -4,7 +4,7 @@ - +

chanrec Class Reference

Holds all relevent information for a channel. More...

@@ -124,20 +124,20 @@ Creates a channel record and initialises it with default values.

-Definition at line 113 of file channels.cpp. +Definition at line 108 of file channels.cpp.

References binarymodes, created, custom_modes, internal_userlist, key, limit, name, setby, topic, and topicset.

-

00114 {
-00115         strcpy(name,"");
-00116         strcpy(custom_modes,"");
-00117         strcpy(topic,"");
-00118         strcpy(setby,"");
-00119         strcpy(key,"");
-00120         created = topicset = limit = 0;
-00121         binarymodes = 0;
-00122         internal_userlist.clear();
-00123 }
+
00109 {
+00110         strcpy(name,"");
+00111         strcpy(custom_modes,"");
+00112         strcpy(topic,"");
+00113         strcpy(setby,"");
+00114         strcpy(key,"");
+00115         created = topicset = limit = 0;
+00116         binarymodes = 0;
+00117         internal_userlist.clear();
+00118 }
 
@@ -205,14 +205,14 @@ Add a user pointer to the internal reference list The data inserted into the ref

-Definition at line 207 of file channels.cpp. +Definition at line 202 of file channels.cpp.

References DEBUG, and internal_userlist.

-

00208 {
-00209         internal_userlist.push_back(castuser);
-00210         log(DEBUG,"Added casted user to channel's internal list");
-00211 }
+
00203 {
+00204         internal_userlist.push_back(castuser);
+00205         log(DEBUG,"Added casted user to channel's internal list");
+00206 }
 
@@ -246,22 +246,22 @@ Delete a user pointer to the internal reference list The data removed from the r

-Definition at line 213 of file channels.cpp. +Definition at line 208 of file channels.cpp.

References DEBUG, internal_userlist, and name.

-

00214 {
-00215         for (std::vector<char*>::iterator a = internal_userlist.begin(); a < internal_userlist.end(); a++)
-00216         {
-00217                 if (*a == castuser)
-00218                 {
-00219                         log(DEBUG,"Removed casted user from channel's internal list");
-00220                         internal_userlist.erase(a);
-00221                         return;
-00222                 }
-00223         }
-00224         log(DEBUG,"BUG BUG BUG! Attempt to remove an uncasted user from the internal list of %s!",name);
-00225 }
+
00209 {
+00210         for (std::vector<char*>::iterator a = internal_userlist.begin(); a < internal_userlist.end(); a++)
+00211         {
+00212                 if (*a == castuser)
+00213                 {
+00214                         log(DEBUG,"Removed casted user from channel's internal list");
+00215                         internal_userlist.erase(a);
+00216                         return;
+00217                 }
+00218         }
+00219         log(DEBUG,"BUG BUG BUG! Attempt to remove an uncasted user from the internal list of %s!",name);
+00220 }
 
@@ -295,23 +295,23 @@ Returns the parameter for a custom mode on a channel.

For example if "+L #foo" is set, and you pass this method 'L', it will return '#foo'. If the mode is not set on the channel, or the mode has no parameters associated with it, it will return an empty string.

-Definition at line 187 of file channels.cpp. -

-References custom_mode_params. -

-

00188 {
-00189         if (custom_mode_params.size())
-00190         {
-00191                 for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++)
-00192                 {
-00193                         if ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
-00194                         {
-00195                                 return i->parameter;
-00196                         }
-00197                 }
-00198         }
-00199         return "";
-00200 }
+Definition at line 182 of file channels.cpp.
+

+References custom_mode_params. +

+

00183 {
+00184         if (custom_mode_params.size())
+00185         {
+00186                 for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++)
+00187                 {
+00188                         if ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
+00189                         {
+00190                                 return i->parameter;
+00191                         }
+00192                 }
+00193         }
+00194         return "";
+00195 }
 
@@ -344,13 +344,13 @@ Obtain the channel "user counter" This returns the channel reference counter, wh

-Definition at line 202 of file channels.cpp. +Definition at line 197 of file channels.cpp.

References internal_userlist.

-

00203 {
-00204         return (this->internal_userlist.size());
-00205 }
+
00198 {
+00199         return (this->internal_userlist.size());
+00200 }
 
@@ -383,15 +383,15 @@ Obrain the internal reference list The internal reference list contains a list o

These are used for rapid comparison to determine channel membership for PRIVMSG, NOTICE, QUIT, PART etc. The resulting pointer to the vector should be considered readonly and only modified via AddUser and DelUser.

-Definition at line 227 of file channels.cpp. +Definition at line 222 of file channels.cpp.

References internal_userlist.

-Referenced by Server::GetUsers(). +Referenced by Server::GetUsers().

-

00228 {
-00229         return &internal_userlist;
-00230 }
+
00223 {
+00224         return &internal_userlist;
+00225 }
 
@@ -425,14 +425,14 @@ Returns true if a custom mode is set on a channel.

-Definition at line 181 of file channels.cpp. +Definition at line 176 of file channels.cpp.

References DEBUG.

-

00182 {
-00183         log(DEBUG,"Checking ISCustomModeSet: %c %s",mode,this->custom_modes);
-00184         return (strchr(this->custom_modes,mode) != 0);
-00185 }
+
00177 {
+00178         log(DEBUG,"Checking ISCustomModeSet: %c %s",mode,this->custom_modes);
+00179         return (strchr(this->custom_modes,mode) != 0);
+00180 }
 
@@ -475,32 +475,32 @@ Sets or unsets a custom mode in the channels info.

-Definition at line 125 of file channels.cpp. -

-References custom_modes, DEBUG, and SetCustomModeParam(). -

-

00126 {
-00127         if (mode_on) {
-00128                 static char m[3];
-00129                 m[0] = mode;
-00130                 m[1] = '\0';
-00131                 if (!strchr(this->custom_modes,mode))
-00132                 {
-00133                         strlcat(custom_modes,m,MAXMODES);
-00134                 }
-00135                 log(DEBUG,"Custom mode %c set",mode);
-00136         }
-00137         else {
+Definition at line 120 of file channels.cpp.
+

+References custom_modes, DEBUG, and SetCustomModeParam(). +

+

00121 {
+00122         if (mode_on) {
+00123                 static char m[3];
+00124                 m[0] = mode;
+00125                 m[1] = '\0';
+00126                 if (!strchr(this->custom_modes,mode))
+00127                 {
+00128                         strlcat(custom_modes,m,MAXMODES);
+00129                 }
+00130                 log(DEBUG,"Custom mode %c set",mode);
+00131         }
+00132         else {
+00133 
+00134                 std::string a = this->custom_modes;
+00135                 int pos = a.find(mode);
+00136                 a.erase(pos,1);
+00137                 strncpy(this->custom_modes,a.c_str(),MAXMODES);
 00138 
-00139                 std::string a = this->custom_modes;
-00140                 int pos = a.find(mode);
-00141                 a.erase(pos,1);
-00142                 strncpy(this->custom_modes,a.c_str(),MAXMODES);
-00143 
-00144                 log(DEBUG,"Custom mode %c removed: modelist='%s'",mode,this->custom_modes);
-00145                 this->SetCustomModeParam(mode,"",false);
-00146         }
-00147 }
+00139                 log(DEBUG,"Custom mode %c removed: modelist='%s'",mode,this->custom_modes);
+00140                 this->SetCustomModeParam(mode,"",false);
+00141         }
+00142 }
 
@@ -549,41 +549,41 @@ Sets or unsets the parameters for a custom mode in a channels info.

-Definition at line 150 of file channels.cpp. +Definition at line 145 of file channels.cpp.

-References ModeParameter::channel, custom_mode_params, DEBUG, ModeParameter::mode, and ModeParameter::parameter. +References ModeParameter::channel, custom_mode_params, DEBUG, ModeParameter::mode, and ModeParameter::parameter.

-Referenced by SetCustomMode(). +Referenced by SetCustomMode().

-

00151 {
-00152 
-00153         log(DEBUG,"SetCustomModeParam called");
-00154         ModeParameter M;
-00155         M.mode = mode;
-00156         strlcpy(M.channel,this->name,CHANMAX);
-00157         strlcpy(M.parameter,parameter,MAXBUF);
-00158         if (mode_on)
+
00146 {
+00147 
+00148         log(DEBUG,"SetCustomModeParam called");
+00149         ModeParameter M;
+00150         M.mode = mode;
+00151         strlcpy(M.channel,this->name,CHANMAX);
+00152         strlcpy(M.parameter,parameter,MAXBUF);
+00153         if (mode_on)
+00154         {
+00155                 log(DEBUG,"Custom mode parameter %c %s added",mode,parameter);
+00156                 custom_mode_params.push_back(M);
+00157         }
+00158         else
 00159         {
-00160                 log(DEBUG,"Custom mode parameter %c %s added",mode,parameter);
-00161                 custom_mode_params.push_back(M);
-00162         }
-00163         else
-00164         {
-00165                 if (custom_mode_params.size())
-00166                 {
-00167                         for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++)
-00168                         {
-00169                                 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
-00170                                 {
-00171                                         log(DEBUG,"Custom mode parameter %c %s removed",mode,parameter);
-00172                                         custom_mode_params.erase(i);
-00173                                         return;
-00174                                 }
-00175                         }
-00176                 }
-00177                 log(DEBUG,"*** BUG *** Attempt to remove non-existent mode parameter!");
-00178         }
-00179 }
+00160                 if (custom_mode_params.size())
+00161                 {
+00162                         for (vector<ModeParameter>::iterator i = custom_mode_params.begin(); i < custom_mode_params.end(); i++)
+00163                         {
+00164                                 if ((i->mode == mode) && (!strcasecmp(this->name,i->channel)))
+00165                                 {
+00166                                         log(DEBUG,"Custom mode parameter %c %s removed",mode,parameter);
+00167                                         custom_mode_params.erase(i);
+00168                                         return;
+00169                                 }
+00170                         }
+00171                 }
+00172                 log(DEBUG,"*** BUG *** Attempt to remove non-existent mode parameter!");
+00173         }
+00174 }
 
@@ -639,7 +639,7 @@ Contains a bitmask of the CM_* builtin (RFC) binary mode symbols.

Definition at line 145 of file channels.h.

-Referenced by chanrec(). +Referenced by chanrec().

@@ -667,7 +667,7 @@ Creation time.

Definition at line 123 of file channels.h.

-Referenced by chanrec(). +Referenced by chanrec().

@@ -695,7 +695,7 @@ Plugins may use this field in any way they see fit.

Definition at line 110 of file channels.h.

-Referenced by chanrec(), and SetCustomMode(). +Referenced by chanrec(), and SetCustomMode().

@@ -723,7 +723,7 @@ User list (casted to char*'s to stop forward declaration stuff) (chicken and egg

Definition at line 115 of file channels.h.

-Referenced by AddUser(), chanrec(), DelUser(), GetUserCounter(), and GetUsers(). +Referenced by AddUser(), chanrec(), DelUser(), GetUserCounter(), and GetUsers().

@@ -751,7 +751,7 @@ If this value is an empty string, there is no channel key in place.

Definition at line 141 of file channels.h.

-Referenced by chanrec(). +Referenced by chanrec().

@@ -779,7 +779,7 @@ If this value is zero, there is no limit in place.

Definition at line 136 of file channels.h.

-Referenced by chanrec(). +Referenced by chanrec().

@@ -807,7 +807,7 @@ The channels name.

Definition at line 106 of file channels.h.

-Referenced by chanrec(), DelUser(), and Server::PseudoToUser(). +Referenced by chanrec(), DelUser(), and Server::PseudoToUser().

@@ -835,7 +835,7 @@ If this member is an empty string, no topic was ever set.

Definition at line 131 of file channels.h.

-Referenced by chanrec(), and Server::PseudoToUser(). +Referenced by chanrec(), and Server::PseudoToUser().

@@ -863,7 +863,7 @@ If this is an empty string, no channel topic is set.

Definition at line 120 of file channels.h.

-Referenced by chanrec(), and Server::PseudoToUser(). +Referenced by chanrec(), and Server::PseudoToUser().

@@ -891,12 +891,12 @@ If no topic was ever set, this will be equal to 127 of file channels.h.

-Referenced by chanrec(), and Server::PseudoToUser(). +Referenced by chanrec(), and Server::PseudoToUser().


The documentation for this class was generated from the following files: -
Generated on Fri May 13 15:49:22 2005 for InspIRCd by +
Generated on Sun May 15 17:03:01 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classclassbase-members.html b/docs/module-doc/classclassbase-members.html index 1dfdbdbd5..1b414f3e3 100644 --- a/docs/module-doc/classclassbase-members.html +++ b/docs/module-doc/classclassbase-members.html @@ -4,12 +4,12 @@ - +

classbase Member List

This is the complete list of members for classbase, including all inherited members. -
ageclassbase
classbase()classbase [inline]
~classbase()classbase [inline]

Generated on Fri May 13 15:49:23 2005 for InspIRCd by +
Generated on Sun May 15 17:03:04 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classclassbase.html b/docs/module-doc/classclassbase.html index 6eda601a3..6d425626f 100644 --- a/docs/module-doc/classclassbase.html +++ b/docs/module-doc/classclassbase.html @@ -4,7 +4,7 @@ - +

classbase Class Reference

The base class for all inspircd classes. More...

@@ -150,7 +150,7 @@ Referenced by classbase().


The documentation for this class was generated from the following file: -
Generated on Fri May 13 15:49:23 2005 for InspIRCd by +
Generated on Sun May 15 17:03:04 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classcommand__t-members.html b/docs/module-doc/classcommand__t-members.html index 76cd68860..b5961a903 100644 --- a/docs/module-doc/classcommand__t-members.html +++ b/docs/module-doc/classcommand__t-members.html @@ -4,7 +4,7 @@ - +

command_t Member List

This is the complete list of members for command_t, including all inherited members. @@ -19,7 +19,7 @@ -
ageclassbase
classbase()classbase [inline]
total_bytescommand_t
use_countcommand_t
~classbase()classbase [inline]

Generated on Fri May 13 15:49:25 2005 for InspIRCd by +
Generated on Sun May 15 17:03:07 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classcommand__t.html b/docs/module-doc/classcommand__t.html index ddb05c0f6..2b436c462 100644 --- a/docs/module-doc/classcommand__t.html +++ b/docs/module-doc/classcommand__t.html @@ -4,7 +4,7 @@ - +

command_t Class Reference

A structure that defines a command. More...

@@ -235,7 +235,7 @@ Definition at line 43 of


The documentation for this class was generated from the following file: -
Generated on Fri May 13 15:49:25 2005 for InspIRCd by +
Generated on Sun May 15 17:03:07 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classconnection-members.html b/docs/module-doc/classconnection-members.html index e2b8b6d94..88b889780 100644 --- a/docs/module-doc/classconnection-members.html +++ b/docs/module-doc/classconnection-members.html @@ -4,7 +4,7 @@ - +

connection Member List

This is the complete list of members for connection, including all inherited members. @@ -29,14 +29,14 @@ - + -
AddIncoming(int fd, char *targethost, int sourceport)connection
ageclassbase
MeshCookie(char *targethost, int port, unsigned long cookie, char *servername)connection
npingconnection
portconnection
RecvPacket(std::deque< std::string > &messages, char *host)connection
RecvPacket(std::deque< std::string > &messages, char *host, std::deque< std::string > &sums)connection
registeredconnection
SendPacket(char *message, const char *host)connection
Shrink(std::string key)Extensible
signonconnection
TerminateLink(char *targethost)connection
~classbase()classbase [inline]

Generated on Fri May 13 15:49:30 2005 for InspIRCd by +
Generated on Sun May 15 17:03:15 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classconnection.html b/docs/module-doc/classconnection.html index f98b623a9..934d2b485 100644 --- a/docs/module-doc/classconnection.html +++ b/docs/module-doc/classconnection.html @@ -4,7 +4,7 @@ - +

connection Class Reference

Please note: classes serverrec and userrec both inherit from class connection. More...

@@ -42,7 +42,7 @@ Inheritance diagram for connection:

bool SendPacket (char *message, const char *host)  Send a message to a server by name, if the server is unavailable directly route the packet via another server If the server still cannot be reached after attempting to route the message remotely, returns false.

-bool RecvPacket (std::deque< std::string > &messages, char *host) +bool RecvPacket (std::deque< std::string > &messages, char *host, std::deque< std::string > &sums)  Returns the next available packet and returns true if data is available.


ircd_connectorFindHost (std::string host) @@ -103,7 +103,7 @@ Please note: classes serverrec and userrec both inherit from class connection.

-Definition at line 210 of file connection.h.


Constructor & Destructor Documentation

+Definition at line 212 of file connection.h.

Constructor & Destructor Documentation

@@ -377,7 +377,13 @@ Begin an outbound mesh link to another ircd on a network you are already an auth - + + + + + + + @@ -497,9 +503,9 @@ Stats counter for bytes inbound.

-Definition at line 227 of file connection.h. +Definition at line 229 of file connection.h.

-Referenced by userrec::userrec(). +Referenced by userrec::userrec().

char *  host host,
std::deque< std::string > &  sums

@@ -525,9 +531,9 @@ Stats counter for bytes outbound.

-Definition at line 231 of file connection.h. +Definition at line 233 of file connection.h.

-Referenced by userrec::FlushWriteBuf(), and userrec::userrec(). +Referenced by userrec::FlushWriteBuf(), and userrec::userrec().

@@ -553,9 +559,9 @@ Stats counter for commands inbound.

-Definition at line 235 of file connection.h. +Definition at line 237 of file connection.h.

-Referenced by userrec::userrec(). +Referenced by userrec::userrec().

@@ -581,9 +587,9 @@ Stats counter for commands outbound.

-Definition at line 239 of file connection.h. +Definition at line 241 of file connection.h.

-Referenced by userrec::FlushWriteBuf(), and userrec::userrec(). +Referenced by userrec::FlushWriteBuf(), and userrec::userrec().

@@ -609,7 +615,7 @@ With a serverrec, this is a list of all established server connections.

With a userrec this is unused.

-Definition at line 274 of file connection.h. +Definition at line 276 of file connection.h.

@@ -635,9 +641,9 @@ File descriptor of the connection.

-Definition at line 215 of file connection.h. +Definition at line 217 of file connection.h.

-Referenced by ConfigReader::DumpErrors(), Server::PseudoToUser(), Server::SendTo(), serverrec::serverrec(), userrec::userrec(), and Server::UserToPseudo(). +Referenced by ConfigReader::DumpErrors(), Server::PseudoToUser(), Server::SendTo(), serverrec::serverrec(), userrec::userrec(), and Server::UserToPseudo().

@@ -663,9 +669,9 @@ True if server/user has authenticated, false if otherwise.

-Definition at line 243 of file connection.h. +Definition at line 245 of file connection.h.

-Referenced by userrec::userrec(). +Referenced by userrec::userrec().

@@ -691,9 +697,9 @@ Hostname of connection.

Not used if this is a serverrec

-Definition at line 219 of file connection.h. +Definition at line 221 of file connection.h.

-Referenced by userrec::GetFullRealHost(), Server::PseudoToUser(), userrec::userrec(), and Server::UserToPseudo(). +Referenced by userrec::GetFullRealHost(), Server::PseudoToUser(), userrec::userrec(), and Server::UserToPseudo().

@@ -719,9 +725,9 @@ Time that the connection last sent data, used to calculate idle time.

-Definition at line 265 of file connection.h. +Definition at line 267 of file connection.h.

-Referenced by userrec::userrec(). +Referenced by userrec::userrec().

@@ -747,9 +753,9 @@ IP of connection.

-Definition at line 223 of file connection.h. +Definition at line 225 of file connection.h.

-Referenced by userrec::userrec(). +Referenced by userrec::userrec().

@@ -775,9 +781,9 @@ Time the connection was last pinged.

-Definition at line 257 of file connection.h. +Definition at line 259 of file connection.h.

-Referenced by serverrec::serverrec(), and userrec::userrec(). +Referenced by serverrec::serverrec(), and userrec::userrec().

@@ -803,9 +809,9 @@ Used by PING checks with clients.

-Definition at line 269 of file connection.h. +Definition at line 271 of file connection.h.

-Referenced by userrec::userrec(). +Referenced by userrec::userrec().

@@ -831,9 +837,9 @@ Port number For a userrec, this is the port they connected to the network on.

For a serverrec this is the current listening port of the serverrec object.

-Definition at line 249 of file connection.h. +Definition at line 251 of file connection.h.

-Referenced by userrec::userrec(). +Referenced by userrec::userrec().

@@ -859,9 +865,9 @@ Used by userrec to indicate the registration status of the connection.

-Definition at line 253 of file connection.h. +Definition at line 255 of file connection.h.

-Referenced by userrec::userrec(). +Referenced by userrec::userrec().

@@ -887,14 +893,14 @@ Time the connection was created, set in the constructor.

-Definition at line 261 of file connection.h. +Definition at line 263 of file connection.h.

-Referenced by serverrec::serverrec(), and userrec::userrec(). +Referenced by serverrec::serverrec(), and userrec::userrec().


The documentation for this class was generated from the following file: -
Generated on Fri May 13 15:49:30 2005 for InspIRCd by +
Generated on Sun May 15 17:03:15 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classes.html b/docs/module-doc/classes.html index 76a458194..0a2857acb 100644 --- a/docs/module-doc/classes.html +++ b/docs/module-doc/classes.html @@ -4,29 +4,29 @@ - +

InspIRCd Compound Index

  A  
-
DNS   
  H  
-
ModuleFactory   StrHashComp   
Admin   dns_ip4list   HostItem   ModuleMessage   
  U  
+
DNS   HostItem   ModuleFactory   StrHashComp   
Admin   dns_ip4list   
  I  
+
ModuleMessage   
  U  
  B  
  E  
-
  I  
-
  N  
-
ucrec   
BanItem   ELine   InAddr_HashComp   nspace::hash< in_addr > (nspace)   userrec   
  C  
-
Event   Invited   nspace::hash< string > (nspace)   
  V  
-
chanrec   ExemptItem   InviteItem   
  Q  
-
Version   
classbase   Extensible   ircd_connector   QLine   
  W  
-
command_t   ExtMode   
  K  
+
InAddr_HashComp   
  N  
+
ucrec   
BanItem   ELine   Invited   nspace::hash< in_addr > (nspace)   userrec   
  C  
+
Event   InviteItem   nspace::hash< string > (nspace)   
  V  
+
chanrec   ExemptItem   irc_char_traits (irc)   
  Q  
+
Version   
char_traits (std)   Extensible   ircd_connector   QLine   
  W  
+
classbase   ExtMode   
  K  
  R  
-
WhoWasUser   
ConfigReader   
  F  
+
WhoWasUser   
command_t   
  F  
KLine   Request   
  X  
-
ConnectClass   FileReader   
  M  
+
ConfigReader   FileReader   
  M  
  S  
-
XLine   
connection   
  G  
+
XLine   
ConnectClass   
  G  
ModeParameter   Server   
  Z  
-
  D  
-
GLine   Module   serverrec   ZLine   

Generated on Fri May 13 15:49:18 2005 for InspIRCd by +connection   GLine   Module   serverrec   ZLine   
  D  
+
  H  
+
Generated on Sun May 15 17:02:54 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classircd__connector-members.html b/docs/module-doc/classircd__connector-members.html index 5ba71d6f8..fc18a6a4d 100644 --- a/docs/module-doc/classircd__connector-members.html +++ b/docs/module-doc/classircd__connector-members.html @@ -4,7 +4,7 @@ - +

ircd_connector Member List

This is the complete list of members for ircd_connector, including all inherited members. @@ -43,7 +43,7 @@ -
AddBuffer(std::string a)ircd_connector
addrircd_connector [private]
stateircd_connector [private]
versionircd_connector [private]
~classbase()classbase [inline]

Generated on Fri May 13 15:49:44 2005 for InspIRCd by +
Generated on Sun May 15 17:03:32 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classircd__connector.html b/docs/module-doc/classircd__connector.html index fd911333d..1180bca0c 100644 --- a/docs/module-doc/classircd__connector.html +++ b/docs/module-doc/classircd__connector.html @@ -4,7 +4,7 @@ - +

ircd_connector Class Reference

Each connection has one or more of these each represents ONE outbound connection to another ircd so each inbound has multiple outbounds. More...

@@ -127,7 +127,7 @@ A listening socket that accepts server type connections is represented by one cl

-Definition at line 54 of file connection.h.


Member Function Documentation

+Definition at line 56 of file connection.h.

Member Function Documentation

@@ -819,7 +819,7 @@ Sockaddr of the outbound ip and port.

-Definition at line 59 of file connection.h. +Definition at line 61 of file connection.h.

@@ -845,7 +845,7 @@ Definition at line 59

-Definition at line 71 of file connection.h. +Definition at line 73 of file connection.h.

@@ -871,7 +871,7 @@ File descriptor of the connection.

-Definition at line 63 of file connection.h. +Definition at line 65 of file connection.h.

@@ -897,7 +897,7 @@ When MakeOutboundConnection is called, these public members are filled with the

-Definition at line 99 of file connection.h. +Definition at line 101 of file connection.h.

@@ -924,7 +924,7 @@ IRCD Buffer for input characters, holds as many lines as are pending - Note that

-Definition at line 92 of file connection.h. +Definition at line 94 of file connection.h.

@@ -950,7 +950,7 @@ When MakeOutboundConnection is called, these public members are filled with the

-Definition at line 105 of file connection.h. +Definition at line 107 of file connection.h.

@@ -976,7 +976,7 @@ Definition at line 105

-Definition at line 111 of file connection.h. +Definition at line 113 of file connection.h.

@@ -1002,7 +1002,7 @@ Definition at line 111

-Definition at line 67 of file connection.h. +Definition at line 69 of file connection.h.

@@ -1028,7 +1028,7 @@ State.

STATE_NOAUTH_INBOUND, STATE_NOAUTH_OUTBOUND STATE_SYNC, STATE_DISCONNECTED, STATE_CONNECTED

-Definition at line 76 of file connection.h. +Definition at line 78 of file connection.h.

@@ -1054,12 +1054,12 @@ This string holds the ircd's version response.

-Definition at line 84 of file connection.h. +Definition at line 86 of file connection.h.


The documentation for this class was generated from the following file: -
Generated on Fri May 13 15:49:44 2005 for InspIRCd by +
Generated on Sun May 15 17:03:32 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classserverrec-members.html b/docs/module-doc/classserverrec-members.html index e865d7232..04b74971e 100644 --- a/docs/module-doc/classserverrec-members.html +++ b/docs/module-doc/classserverrec-members.html @@ -4,7 +4,7 @@ - +

serverrec Member List

This is the complete list of members for serverrec, including all inherited members. @@ -36,7 +36,7 @@ - + @@ -50,7 +50,7 @@ -
AddIncoming(int fd, char *targethost, int sourceport)connection
ageclassbase
opercountserverrec
pingtimeserverrec
portconnection
RecvPacket(std::deque< std::string > &messages, char *host)connection
RecvPacket(std::deque< std::string > &messages, char *host, std::deque< std::string > &sums)connection
registeredconnection
SendPacket(char *message, const char *host)connection
serverrec()serverrec
versionserverrec
~classbase()classbase [inline]
~serverrec()serverrec

Generated on Fri May 13 15:49:57 2005 for InspIRCd by +
Generated on Sun May 15 17:03:46 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classserverrec.html b/docs/module-doc/classserverrec.html index e8e7390e7..89a4c1f18 100644 --- a/docs/module-doc/classserverrec.html +++ b/docs/module-doc/classserverrec.html @@ -4,7 +4,7 @@ - +

serverrec Class Reference

A class that defines the local server or a remote server. More...

@@ -101,22 +101,22 @@ Constructor.

-Definition at line 26 of file servers.cpp. +Definition at line 27 of file servers.cpp.

-References connection::fd, hops_away, jupiter, connection::lastping, name, nickserv, opercount, pingtime, connection::signon, sync_soon, TIME, 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.

-

00027 {
-00028         strlcpy(name,"",256);
-00029         pingtime = 0;
-00030         lastping = TIME;
-00031         usercount_i = usercount = opercount = version = 0;
-00032         hops_away = 1;
-00033         signon = TIME;
-00034         jupiter = false;
-00035         fd = 0;
-00036         sync_soon = false;
-00037         strlcpy(nickserv,"",NICKMAX);
-00038 }
+
00028 {
+00029         strlcpy(name,"",256);
+00030         pingtime = 0;
+00031         lastping = TIME;
+00032         usercount_i = usercount = opercount = version = 0;
+00033         hops_away = 1;
+00034         signon = TIME;
+00035         jupiter = false;
+00036         fd = 0;
+00037         sync_soon = false;
+00038         strlcpy(nickserv,"",NICKMAX);
+00039 }
 
@@ -165,22 +165,22 @@ Constructor which initialises some of the main variables.

-Definition at line 45 of file servers.cpp. +Definition at line 46 of file servers.cpp.

-References connection::fd, hops_away, jupiter, connection::lastping, name, nickserv, opercount, connection::signon, sync_soon, TIME, 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.

-

00046 {
-00047         strlcpy(name,n,256);
-00048         lastping = TIME;
-00049         usercount_i = usercount = opercount = 0;
-00050         version = ver;
-00051         hops_away = 1;
-00052         signon = TIME;
-00053         jupiter = jupe;
-00054         fd = 0;
-00055         sync_soon = false;
-00056         strlcpy(nickserv,"",NICKMAX);
-00057 }
+
00047 {
+00048         strlcpy(name,n,256);
+00049         lastping = TIME;
+00050         usercount_i = usercount = opercount = 0;
+00051         version = ver;
+00052         hops_away = 1;
+00053         signon = TIME;
+00054         jupiter = jupe;
+00055         fd = 0;
+00056         sync_soon = false;
+00057         strlcpy(nickserv,"",NICKMAX);
+00058 }
 
@@ -213,10 +213,10 @@ Destructor.

-Definition at line 41 of file servers.cpp. +Definition at line 42 of file servers.cpp.

-

00042 {
-00043 }
+
00043 {
+00044 }
 
@@ -272,7 +272,7 @@ number of hops away (for quick access)

Definition at line 51 of file servers.h.

-Referenced by serverrec(). +Referenced by serverrec().

@@ -300,7 +300,7 @@ is a JUPE server (faked to enforce a server ban)

Definition at line 57 of file servers.h.

-Referenced by serverrec(). +Referenced by serverrec().

@@ -328,7 +328,7 @@ server name

Definition at line 36 of file servers.h.

-Referenced by serverrec(). +Referenced by serverrec().

@@ -356,7 +356,7 @@ Holds nickserv's name on U:lined (services) servers (this is a kludge for ircser

Definition at line 65 of file servers.h.

-Referenced by serverrec(). +Referenced by serverrec().

@@ -384,7 +384,7 @@ opers on server

Definition at line 48 of file servers.h.

-Referenced by serverrec(). +Referenced by serverrec().

@@ -412,7 +412,7 @@ last ping response (ms)

Definition at line 39 of file servers.h.

-Referenced by serverrec(). +Referenced by serverrec().

@@ -438,7 +438,7 @@ Referenced by serverrec() Definition at line 67 of file servers.h.

-Referenced by serverrec(). +Referenced by serverrec().

@@ -466,7 +466,7 @@ non-invisible users on server

Definition at line 45 of file servers.h.

-Referenced by serverrec(). +Referenced by serverrec().

@@ -494,7 +494,7 @@ invisible users on server

Definition at line 42 of file servers.h.

-Referenced by serverrec(). +Referenced by serverrec().

@@ -522,12 +522,12 @@ ircd version

Definition at line 54 of file servers.h.

-Referenced by serverrec(). +Referenced by serverrec().


The documentation for this class was generated from the following files: -
Generated on Fri May 13 15:49:57 2005 for InspIRCd by +
Generated on Sun May 15 17:03:46 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classstd_1_1char__traits.html b/docs/module-doc/classstd_1_1char__traits.html new file mode 100644 index 000000000..4838507b0 --- /dev/null +++ b/docs/module-doc/classstd_1_1char__traits.html @@ -0,0 +1,22 @@ + + +InspIRCd: char_traits class Reference + + + + +

char_traits Class Reference

Inheritance diagram for char_traits:

Inheritance graph
+ + + +
[legend]
+ +
+
The documentation for this class was generated from the following file: +
Generated on Sun May 15 17:03:02 2005 for InspIRCd by + +doxygen +1.3.3
+ + diff --git a/docs/module-doc/classstd_1_1char__traits__inherit__graph.gif b/docs/module-doc/classstd_1_1char__traits__inherit__graph.gif new file mode 100644 index 000000000..f8ae3419b Binary files /dev/null and b/docs/module-doc/classstd_1_1char__traits__inherit__graph.gif differ diff --git a/docs/module-doc/classucrec-members.html b/docs/module-doc/classucrec-members.html index a09480b32..e32b0b46b 100644 --- a/docs/module-doc/classucrec-members.html +++ b/docs/module-doc/classucrec-members.html @@ -4,7 +4,7 @@ - +

ucrec Member List

This is the complete list of members for ucrec, including all inherited members. @@ -13,7 +13,7 @@ -
ageclassbase
channelucrec
ucrec()ucrec [inline]
~classbase()classbase [inline]
~ucrec()ucrec [inline, virtual]

Generated on Fri May 13 15:49:58 2005 for InspIRCd by +
Generated on Sun May 15 17:03:47 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classucrec.html b/docs/module-doc/classucrec.html index 01f313584..cb42f131f 100644 --- a/docs/module-doc/classucrec.html +++ b/docs/module-doc/classucrec.html @@ -4,7 +4,7 @@ - +

ucrec Class Reference

Holds a user's modes on a channel This class associates a users privilages with a channel by creating a pointer link between a userrec and chanrec class. More...

@@ -134,7 +134,7 @@ If the record is not in use, this value will be NULL.

Definition at line 233 of file channels.h.

-Referenced by Server::PseudoToUser(), and userrec::userrec(). +Referenced by Server::PseudoToUser(), and userrec::userrec().

@@ -162,12 +162,12 @@ UCMODE_FOUNDER values. If this value is zero, the user has no privilages upon th

Definition at line 228 of file channels.h.

-Referenced by userrec::userrec(). +Referenced by userrec::userrec().


The documentation for this class was generated from the following file: -
Generated on Fri May 13 15:49:58 2005 for InspIRCd by +
Generated on Sun May 15 17:03:47 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classuserrec-members.html b/docs/module-doc/classuserrec-members.html index 9e20d561e..200def63f 100644 --- a/docs/module-doc/classuserrec-members.html +++ b/docs/module-doc/classuserrec-members.html @@ -4,7 +4,7 @@ - +

userrec Member List

This is the complete list of members for userrec, including all inherited members. @@ -35,6 +35,7 @@ + @@ -55,7 +56,7 @@ - + @@ -76,7 +77,7 @@ -
AddBuffer(std::string a)userrec
AddIncoming(int fd, char *targethost, int sourceport)connection
GetExt(std::string key)Extensible
GetFullHost()userrec [virtual]
GetFullRealHost()userrec [virtual]
GetInviteList()userrec
GetWriteError()userrec
haspassedconnection
HasPermission(char *command)userrec
passworduserrec
pingmaxuserrec
portconnection
RecvPacket(std::deque< std::string > &messages, char *host)connection
RecvPacket(std::deque< std::string > &messages, char *host, std::deque< std::string > &sums)connection
recvquserrec
recvqmaxuserrec
registeredconnection
WriteErroruserrec
~classbase()classbase [inline]
~userrec()userrec [inline, virtual]

Generated on Fri May 13 15:50:05 2005 for InspIRCd by +
Generated on Sun May 15 17:03:51 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classuserrec.html b/docs/module-doc/classuserrec.html index 8e875c5b3..74ebbc256 100644 --- a/docs/module-doc/classuserrec.html +++ b/docs/module-doc/classuserrec.html @@ -4,7 +4,7 @@ - +

userrec Class Reference

Holds all information about a user This class stores all information about a user connected to the irc server. More...

@@ -70,6 +70,9 @@ Inheritance diagram for userrec:

void FlushWriteBuf ()  Flushes as much of the user's buffer to the file descriptor as possible.

+InvitedListGetInviteList () + + Returns the list of channels this user has been invited to but has not yet joined.



Public Attributes

char nick [NICKMAX] @@ -176,39 +179,39 @@ Definition at line 108 of f

-Definition at line 28 of file users.cpp. -

-References awaymsg, connection::bytes_in, connection::bytes_out, ucrec::channel, chans, connection::cmds_in, connection::cmds_out, dhost, dns_done, connection::fd, flood, fullname, connection::haspassed, connection::host, ident, connection::idle_lastmsg, invites, connection::ip, connection::lastping, lines_in, modes, nick, connection::nping, oper, connection::port, recvq, connection::registered, reset_due, result, sendq, server, connection::signon, TIME, timeout, and ucrec::uc_modes. -

-

00029 {
-00030         // the PROPER way to do it, AVOID bzero at *ALL* costs
-00031         strcpy(nick,"");
-00032         strcpy(ip,"127.0.0.1");
-00033         timeout = 0;
-00034         strcpy(ident,"");
-00035         strcpy(host,"");
-00036         strcpy(dhost,"");
-00037         strcpy(fullname,"");
-00038         strcpy(modes,"");
-00039         strcpy(server,"");
-00040         strcpy(awaymsg,"");
-00041         strcpy(oper,"");
-00042         reset_due = TIME;
-00043         lines_in = 0;
-00044         fd = lastping = signon = idle_lastmsg = nping = registered = 0;
-00045         flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0;
-00046         haspassed = false;
-00047         dns_done = false;
-00048         recvq = "";
-00049         sendq = "";
-00050         strcpy(result,"");
-00051         for (int i = 0; i < MAXCHANS; i++)
-00052         {
-00053                 this->chans[i].channel = NULL;
-00054                 this->chans[i].uc_modes = 0;
-00055         }
-00056         invites.clear();
-00057 }
+Definition at line 29 of file users.cpp.
+

+References awaymsg, connection::bytes_in, connection::bytes_out, ucrec::channel, chans, connection::cmds_in, connection::cmds_out, dhost, dns_done, connection::fd, flood, fullname, connection::haspassed, connection::host, ident, connection::idle_lastmsg, invites, connection::ip, connection::lastping, lines_in, modes, nick, connection::nping, oper, connection::port, recvq, connection::registered, reset_due, result, sendq, server, connection::signon, TIME, timeout, and ucrec::uc_modes. +

+

00030 {
+00031         // the PROPER way to do it, AVOID bzero at *ALL* costs
+00032         strcpy(nick,"");
+00033         strcpy(ip,"127.0.0.1");
+00034         timeout = 0;
+00035         strcpy(ident,"");
+00036         strcpy(host,"");
+00037         strcpy(dhost,"");
+00038         strcpy(fullname,"");
+00039         strcpy(modes,"");
+00040         strcpy(server,"");
+00041         strcpy(awaymsg,"");
+00042         strcpy(oper,"");
+00043         reset_due = TIME;
+00044         lines_in = 0;
+00045         fd = lastping = signon = idle_lastmsg = nping = registered = 0;
+00046         flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0;
+00047         haspassed = false;
+00048         dns_done = false;
+00049         recvq = "";
+00050         sendq = "";
+00051         strcpy(result,"");
+00052         for (int i = 0; i < MAXCHANS; i++)
+00053         {
+00054                 this->chans[i].channel = NULL;
+00055                 this->chans[i].uc_modes = 0;
+00056         }
+00057         invites.clear();
+00058 }
 
@@ -276,34 +279,34 @@ This method adds data to the buffer of the user.

The buffer can grow to any size within limits of the available memory, managed by the size of a std::string, however if any individual line in the buffer grows over 600 bytes in length (which is 88 chars over the RFC-specified limit per line) then the method will return false and the text will not be inserted.

-Definition at line 169 of file users.cpp. -

-References recvq, recvqmax, and SetWriteError(). -

-

00170 {
-00171         std::string b = "";
-00172         for (int i = 0; i < a.length(); i++)
-00173                 if ((a[i] != '\r') && (a[i] != '\0') && (a[i] != 7))
-00174                         b = b + a[i];
-00175         std::stringstream stream(recvq);
-00176         stream << b;
-00177         recvq = stream.str();
-00178         int i = 0;
-00179         // count the size of the first line in the buffer.
-00180         while (i < recvq.length())
-00181         {
-00182                 if (recvq[i++] == '\n')
-00183                         break;
-00184         }
-00185         if (recvq.length() > this->recvqmax)
-00186         {
-00187                 this->SetWriteError("RecvQ exceeded");
-00188                 WriteOpers("*** User %s RecvQ of %d exceeds connect class maximum of %d",this->nick,recvq.length(),this->recvqmax);
-00189         }
-00190         // return false if we've had more than 600 characters WITHOUT
-00191         // a carriage return (this is BAD, drop the socket)
-00192         return (i < 600);
-00193 }
+Definition at line 175 of file users.cpp.
+

+References recvq, recvqmax, and SetWriteError(). +

+

00176 {
+00177         std::string b = "";
+00178         for (int i = 0; i < a.length(); i++)
+00179                 if ((a[i] != '\r') && (a[i] != '\0') && (a[i] != 7))
+00180                         b = b + a[i];
+00181         std::stringstream stream(recvq);
+00182         stream << b;
+00183         recvq = stream.str();
+00184         int i = 0;
+00185         // count the size of the first line in the buffer.
+00186         while (i < recvq.length())
+00187         {
+00188                 if (recvq[i++] == '\n')
+00189                         break;
+00190         }
+00191         if (recvq.length() > this->recvqmax)
+00192         {
+00193                 this->SetWriteError("RecvQ exceeded");
+00194                 WriteOpers("*** User %s RecvQ of %d exceeds connect class maximum of %d",this->nick,recvq.length(),this->recvqmax);
+00195         }
+00196         // return false if we've had more than 600 characters WITHOUT
+00197         // a carriage return (this is BAD, drop the socket)
+00198         return (i < 600);
+00199 }
 
@@ -337,23 +340,23 @@ Adds to the user's write buffer.

You may add any amount of text up to this users sendq value, if you exceed the sendq value, SetWriteError() will be called to set the users error string to "SendQ exceeded", and further buffer adds will be dropped.

-Definition at line 225 of file users.cpp. -

-References GetWriteError(), sendq, sendqmax, and SetWriteError(). -

-

00226 {
-00227         if (this->GetWriteError() != "")
-00228                 return;
-00229         if (sendq.length() + data.length() > this->sendqmax)
-00230         {
-00231                 WriteOpers("*** User %s SendQ of %d exceeds connect class maximum of %d",this->nick,sendq.length() + data.length(),this->sendqmax);
-00232                 this->SetWriteError("SendQ exceeded");
-00233                 return;
-00234         }
-00235         std::stringstream stream;
-00236         stream << sendq << data;
-00237         sendq = stream.str();
-00238 }
+Definition at line 231 of file users.cpp.
+

+References GetWriteError(), sendq, sendqmax, and SetWriteError(). +

+

00232 {
+00233         if (this->GetWriteError() != "")
+00234                 return;
+00235         if (sendq.length() + data.length() > this->sendqmax)
+00236         {
+00237                 WriteOpers("*** User %s SendQ of %d exceeds connect class maximum of %d",this->nick,sendq.length() + data.length(),this->sendqmax);
+00238                 this->SetWriteError("SendQ exceeded");
+00239                 return;
+00240         }
+00241         std::stringstream stream;
+00242         stream << sendq << data;
+00243         sendq = stream.str();
+00244 }
 
@@ -386,16 +389,16 @@ This method returns true if the buffer contains at least one carriage return cha

one complete line may be read)

-Definition at line 195 of file users.cpp. +Definition at line 201 of file users.cpp.

References recvq.

-

00196 {
-00197         for (int i = 0; i < recvq.length(); i++)
-00198                 if (recvq[i] == '\n')
-00199                         return true;
-00200         return false;
-00201 }
+
00202 {
+00203         for (int i = 0; i < recvq.length(); i++)
+00204                 if (recvq[i] == '\n')
+00205                         return true;
+00206         return false;
+00207 }
 
@@ -428,15 +431,15 @@ This function clears the entire buffer by setting it to an empty string.

-Definition at line 203 of file users.cpp. +Definition at line 209 of file users.cpp.

References recvq.

-Referenced by Server::PseudoToUser(), and Server::UserToPseudo(). +Referenced by Server::PseudoToUser(), and Server::UserToPseudo().

-

00204 {
-00205         recvq = "";
-00206 }
+
00210 {
+00211         recvq = "";
+00212 }
 
@@ -469,30 +472,30 @@ Flushes as much of the user's buffer to the file descriptor as possible.

This function may not always flush the entire buffer, rather instead as much of it as it possibly can. If the send() call fails to send the entire buffer, the buffer position is advanced forwards and the rest of the data sent at the next call to this method.

-Definition at line 241 of file users.cpp. -

-References connection::bytes_out, connection::cmds_out, sendq, and SetWriteError(). -

-

00242 {
-00243         if (sendq.length())
-00244         {
-00245                 char* tb = (char*)this->sendq.c_str();
-00246                 int n_sent = write(this->fd,tb,this->sendq.length());
-00247                 if (n_sent == -1)
-00248                 {
-00249                         this->SetWriteError(strerror(errno));
-00250                 }
-00251                 else
-00252                 {
-00253                         // advance the queue
-00254                         tb += n_sent;
-00255                         this->sendq = tb;
-00256                         // update the user's stats counters
-00257                         this->bytes_out += n_sent;
-00258                         this->cmds_out++;
-00259                 }
-00260         }
-00261 }
+Definition at line 247 of file users.cpp.
+

+References connection::bytes_out, connection::cmds_out, sendq, and SetWriteError(). +

+

00248 {
+00249         if (sendq.length())
+00250         {
+00251                 char* tb = (char*)this->sendq.c_str();
+00252                 int n_sent = write(this->fd,tb,this->sendq.length());
+00253                 if (n_sent == -1)
+00254                 {
+00255                         this->SetWriteError(strerror(errno));
+00256                 }
+00257                 else
+00258                 {
+00259                         // advance the queue
+00260                         tb += n_sent;
+00261                         this->sendq = tb;
+00262                         // update the user's stats counters
+00263                         this->bytes_out += n_sent;
+00264                         this->cmds_out++;
+00265                 }
+00266         }
+00267 }
 
@@ -525,25 +528,25 @@ This method returns the first available string at the tail end of the buffer and

This means it is a one way operation in a similar way to strtok(), and multiple calls return multiple lines if they are available. The results of this function if there are no lines to be read are unknown, always use BufferIsReady() to check if it is ok to read the buffer before calling GetBuffer().

-Definition at line 208 of file users.cpp. +Definition at line 214 of file users.cpp.

References recvq.

-

00209 {
-00210         if (recvq == "")
-00211                 return "";
-00212         char* line = (char*)recvq.c_str();
-00213         std::string ret = "";
-00214         while ((*line != '\n') && (strlen(line)))
-00215         {
-00216                 ret = ret + *line;
-00217                 line++;
-00218         }
-00219         if ((*line == '\n') || (*line == '\r'))
-00220                 line++;
-00221         recvq = line;
-00222         return ret;
-00223 }
+
00215 {
+00216         if (recvq == "")
+00217                 return "";
+00218         char* line = (char*)recvq.c_str();
+00219         std::string ret = "";
+00220         while ((*line != '\n') && (strlen(line)))
+00221         {
+00222                 ret = ret + *line;
+00223                 line++;
+00224         }
+00225         if ((*line == '\n') || (*line == '\r'))
+00226                 line++;
+00227         recvq = line;
+00228         return ret;
+00229 }
 
@@ -576,14 +579,14 @@ Returns the full displayed host of the user This member function returns the hos

-Definition at line 61 of file users.cpp. +Definition at line 62 of file users.cpp.

References dhost, ident, nick, and result.

-

00062 {
-00063         snprintf(result,MAXBUF,"%s!%s@%s",nick,ident,dhost);
-00064         return result;
-00065 }
+
00063 {
+00064         snprintf(result,MAXBUF,"%s!%s@%s",nick,ident,dhost);
+00065         return result;
+00066 }
 
@@ -616,14 +619,53 @@ Returns the full real host of the user This member function returns the hostname

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 68 of file users.cpp. +Definition at line 69 of file users.cpp. +

+References connection::host, ident, nick, and result. +

+

00070 {
+00071         snprintf(result,MAXBUF,"%s!%s@%s",nick,ident,host);
+00072         return result;
+00073 }
+
+ + +

+ + + + +
+ + + + + + + + + +
InvitedList * userrec::GetInviteList  ) 
+
+ + + +
+   + + +

+Returns the list of channels this user has been invited to but has not yet joined. +

+ +

+Definition at line 89 of file users.cpp.

-References connection::host, ident, nick, and result. +References InvitedList, and invites.

-

00069 {
-00070         snprintf(result,MAXBUF,"%s!%s@%s",nick,ident,host);
-00071         return result;
-00072 }
+
00090 {
+00091         return &invites;
+00092 }
 
@@ -656,15 +698,15 @@ Returns the write error which last occured on this connection or an empty string

-Definition at line 271 of file users.cpp. +Definition at line 277 of file users.cpp.

References WriteError.

-Referenced by AddWriteBuf(). +Referenced by AddWriteBuf().

-

00272 {
-00273         return this->WriteError;
-00274 }
+
00278 {
+00279         return this->WriteError;
+00280 }
 
@@ -698,59 +740,59 @@ Returns true or false for if a user can execute a privilaged oper command.

This is done by looking up their oper type from userrec::oper, then referencing this to their oper classes and checking the commands they can execute.

-Definition at line 117 of file users.cpp. -

-References config_f, and DEBUG. -

-

00118 {
-00119         char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF];
-00120         char* mycmd;
-00121         char* savept;
-00122         char* savept2;
-00123         
-00124         // are they even an oper at all?
-00125         if (strchr(this->modes,'o'))
-00126         {
-00127                 log(DEBUG,"*** HasPermission: %s is an oper",this->nick);
-00128                 for (int j =0; j < ConfValueEnum("type",&config_f); j++)
-00129                 {
-00130                         ConfValue("type","name",j,TypeName,&config_f);
-00131                         if (!strcmp(TypeName,this->oper))
-00132                         {
-00133                                 log(DEBUG,"*** HasPermission: %s is an oper of type '%s'",this->nick,this->oper);
-00134                                 ConfValue("type","classes",j,Classes,&config_f);
-00135                                 char* myclass = strtok_r(Classes," ",&savept);
-00136                                 while (myclass)
-00137                                 {
-00138                                         log(DEBUG,"*** HasPermission: checking classtype '%s'",myclass);
-00139                                         for (int k =0; k < ConfValueEnum("class",&config_f); k++)
-00140                                         {
-00141                                                 ConfValue("class","name",k,ClassName,&config_f);
-00142                                                 if (!strcmp(ClassName,myclass))
-00143                                                 {
-00144                                                         ConfValue("class","commands",k,CommandList,&config_f);
-00145                                                         log(DEBUG,"*** HasPermission: found class named %s with commands: '%s'",ClassName,CommandList);
-00146                                                         
-00147                                                         
-00148                                                         mycmd = strtok_r(CommandList," ",&savept2);
-00149                                                         while (mycmd)
-00150                                                         {
-00151                                                                 if (!strcasecmp(mycmd,command))
-00152                                                                 {
-00153                                                                         log(DEBUG,"*** Command %s found, returning true",command);
-00154                                                                         return true;
-00155                                                                 }
-00156                                                                 mycmd = strtok_r(NULL," ",&savept2);
-00157                                                         }
-00158                                                 }
-00159                                         }
-00160                                         myclass = strtok_r(NULL," ",&savept);
-00161                                 }
-00162                         }
-00163                 }
-00164         }
-00165         return false;
-00166 }
+Definition at line 123 of file users.cpp.
+

+References config_f, and DEBUG. +

+

00124 {
+00125         char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF];
+00126         char* mycmd;
+00127         char* savept;
+00128         char* savept2;
+00129         
+00130         // are they even an oper at all?
+00131         if (strchr(this->modes,'o'))
+00132         {
+00133                 log(DEBUG,"*** HasPermission: %s is an oper",this->nick);
+00134                 for (int j =0; j < ConfValueEnum("type",&config_f); j++)
+00135                 {
+00136                         ConfValue("type","name",j,TypeName,&config_f);
+00137                         if (!strcmp(TypeName,this->oper))
+00138                         {
+00139                                 log(DEBUG,"*** HasPermission: %s is an oper of type '%s'",this->nick,this->oper);
+00140                                 ConfValue("type","classes",j,Classes,&config_f);
+00141                                 char* myclass = strtok_r(Classes," ",&savept);
+00142                                 while (myclass)
+00143                                 {
+00144                                         log(DEBUG,"*** HasPermission: checking classtype '%s'",myclass);
+00145                                         for (int k =0; k < ConfValueEnum("class",&config_f); k++)
+00146                                         {
+00147                                                 ConfValue("class","name",k,ClassName,&config_f);
+00148                                                 if (!strcmp(ClassName,myclass))
+00149                                                 {
+00150                                                         ConfValue("class","commands",k,CommandList,&config_f);
+00151                                                         log(DEBUG,"*** HasPermission: found class named %s with commands: '%s'",ClassName,CommandList);
+00152                                                         
+00153                                                         
+00154                                                         mycmd = strtok_r(CommandList," ",&savept2);
+00155                                                         while (mycmd)
+00156                                                         {
+00157                                                                 if (!strcasecmp(mycmd,command))
+00158                                                                 {
+00159                                                                         log(DEBUG,"*** Command %s found, returning true",command);
+00160                                                                         return true;
+00161                                                                 }
+00162                                                                 mycmd = strtok_r(NULL," ",&savept2);
+00163                                                         }
+00164                                                 }
+00165                                         }
+00166                                         myclass = strtok_r(NULL," ",&savept);
+00167                                 }
+00168                         }
+00169                 }
+00170         }
+00171         return false;
+00172 }
 
@@ -784,15 +826,15 @@ Adds a channel to a users invite list (invites them to a channel).

-Definition at line 88 of file users.cpp. +Definition at line 94 of file users.cpp.

References Invited::channel, and invites.

-

00089 {
-00090         Invited i;
-00091         strlcpy(i.channel,channel,CHANMAX);
-00092         invites.push_back(i);
-00093 }
+
00095 {
+00096         Invited i;
+00097         strlcpy(i.channel,channel,CHANMAX);
+00098         invites.push_back(i);
+00099 }
 
@@ -826,22 +868,22 @@ Returns true if a user is invited to a channel.

-Definition at line 74 of file users.cpp. +Definition at line 75 of file users.cpp.

References invites.

-

00075 {
-00076         for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
-00077         {
-00078                 if (i->channel) {
-00079                         if (!strcasecmp(i->channel,channel))
-00080                         {
-00081                                 return true;
-00082                         }
-00083                 }
-00084         }
-00085         return false;
-00086 }
+
00076 {
+00077         for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
+00078         {
+00079                 if (i->channel) {
+00080                         if (!strcasecmp(i->channel,channel))
+00081                         {
+00082                                 return true;
+00083                         }
+00084                 }
+00085         }
+00086         return false;
+00087 }
 
@@ -875,30 +917,30 @@ 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 95 of file users.cpp. +Definition at line 101 of file users.cpp.

References DEBUG, and invites.

-

00096 {
-00097         log(DEBUG,"Removing invites");
-00098         if (channel)
-00099         {
-00100                 if (invites.size())
-00101                 {
-00102                         for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
-00103                         {
-00104                                 if (i->channel)
-00105                                 {
-00106                                         if (!strcasecmp(i->channel,channel))
-00107                                         {
-00108                                                 invites.erase(i);
-00109                                                 return;
-00110                                         }
-00111                                 }
-00112                         }
-00113                 }
-00114         }
-00115 }
+
00102 {
+00103         log(DEBUG,"Removing invites");
+00104         if (channel)
+00105         {
+00106                 if (invites.size())
+00107                 {
+00108                         for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
+00109                         {
+00110                                 if (i->channel)
+00111                                 {
+00112                                         if (!strcasecmp(i->channel,channel))
+00113                                         {
+00114                                                 invites.erase(i);
+00115                                                 return;
+00116                                         }
+00117                                 }
+00118                         }
+00119                 }
+00120         }
+00121 }
 
@@ -932,18 +974,18 @@ Sets the write error for a connection.

This is done because the actual disconnect of a client may occur at an inopportune time such as half way through /LIST output. The WriteErrors of clients are checked at a more ideal time (in the mainloop) and errored clients purged.

-Definition at line 263 of file users.cpp. +Definition at line 269 of file users.cpp.

References DEBUG, and WriteError.

-Referenced by AddBuffer(), AddWriteBuf(), and FlushWriteBuf(). +Referenced by AddBuffer(), AddWriteBuf(), and FlushWriteBuf().

-

00264 {
-00265         log(DEBUG,"Setting error string for %s to '%s'",this->nick,error.c_str());
-00266         // don't try to set the error twice, its already set take the first string.
-00267         if (this->WriteError == "")
-00268                 this->WriteError = error;
-00269 }
+
00270 {
+00271         log(DEBUG,"Setting error string for %s to '%s'",this->nick,error.c_str());
+00272         // don't try to set the error twice, its already set take the first string.
+00273         if (this->WriteError == "")
+00274                 this->WriteError = error;
+00275 }
 
@@ -973,7 +1015,7 @@ If this string is empty, the user is not marked as away.

Definition at line 151 of file users.h.

-Referenced by userrec(). +Referenced by userrec().

@@ -999,7 +1041,7 @@ Referenced by userrec().

Definition at line 142 of file users.h.

-Referenced by Server::PseudoToUser(), and userrec(). +Referenced by Server::PseudoToUser(), and userrec().

@@ -1027,7 +1069,7 @@ This usually matches the value of u

Definition at line 130 of file users.h.

-Referenced by GetFullHost(), and userrec(). +Referenced by GetFullHost(), and userrec().

@@ -1055,7 +1097,7 @@ True when DNS lookups are completed.

Definition at line 179 of file users.h.

-Referenced by userrec(). +Referenced by userrec().

@@ -1083,7 +1125,7 @@ Number of lines the user can place into the buffer (up to the global NetBufferSi

Definition at line 162 of file users.h.

-Referenced by userrec(). +Referenced by userrec().

@@ -1111,7 +1153,7 @@ The users full name.

Definition at line 134 of file users.h.

-Referenced by userrec(). +Referenced by userrec().

@@ -1139,7 +1181,7 @@ The users ident reply.

Definition at line 125 of file users.h.

-Referenced by GetFullHost(), GetFullRealHost(), Server::PseudoToUser(), userrec(), and Server::UserToPseudo(). +Referenced by GetFullHost(), GetFullRealHost(), Server::PseudoToUser(), userrec(), and Server::UserToPseudo().

@@ -1167,7 +1209,7 @@ A list of channels the user has a pending invite to.

Definition at line 114 of file users.h.

-Referenced by InviteTo(), IsInvited(), RemoveInvite(), and userrec(). +Referenced by GetInviteList(), InviteTo(), IsInvited(), RemoveInvite(), and userrec().

@@ -1195,7 +1237,7 @@ Flood counters.

Definition at line 204 of file users.h.

-Referenced by userrec(). +Referenced by userrec().

@@ -1223,7 +1265,7 @@ This may contain any of the following RFC characters: o, w, s, i Your module may

Definition at line 140 of file users.h.

-Referenced by userrec(). +Referenced by userrec().

@@ -1251,7 +1293,7 @@ An invalid nickname indicates an unregistered connection prior to the NICK comma

Definition at line 121 of file users.h.

-Referenced by ConfigReader::DumpErrors(), GetFullHost(), GetFullRealHost(), Server::PseudoToUser(), and userrec(). +Referenced by ConfigReader::DumpErrors(), GetFullHost(), GetFullRealHost(), Server::PseudoToUser(), and userrec().

@@ -1279,7 +1321,7 @@ This is used to check permissions in operclasses, so that we can say 'yay' or 'n

Definition at line 175 of file users.h.

-Referenced by userrec(). +Referenced by userrec().

@@ -1359,7 +1401,7 @@ Lines from the IRCd awaiting processing are stored here. Upgraded april 2005, ol

Definition at line 195 of file users.h.

-Referenced by AddBuffer(), BufferIsReady(), ClearBuffer(), GetBuffer(), and userrec(). +Referenced by AddBuffer(), BufferIsReady(), ClearBuffer(), GetBuffer(), and userrec().

@@ -1387,7 +1429,7 @@ Maximum size this user's recvq can become.

Definition at line 218 of file users.h.

-Referenced by AddBuffer(). +Referenced by AddBuffer().

@@ -1413,7 +1455,7 @@ Referenced by AddBuffer()

Definition at line 205 of file users.h.

-Referenced by userrec(). +Referenced by userrec().

@@ -1441,7 +1483,7 @@ You may use this to increase the speed of use of this class.

Definition at line 156 of file users.h.

-Referenced by GetFullHost(), GetFullRealHost(), and userrec(). +Referenced by GetFullHost(), GetFullRealHost(), and userrec().

@@ -1469,7 +1511,7 @@ Lines waiting to be sent are stored here until their buffer is flushed.

Definition at line 200 of file users.h.

-Referenced by AddWriteBuf(), FlushWriteBuf(), and userrec(). +Referenced by AddWriteBuf(), FlushWriteBuf(), and userrec().

@@ -1497,7 +1539,7 @@ Maximum size this user's sendq can become.

Definition at line 214 of file users.h.

-Referenced by AddWriteBuf(). +Referenced by AddWriteBuf().

@@ -1525,7 +1567,7 @@ The server the user is connected to.

Definition at line 146 of file users.h.

-Referenced by userrec(). +Referenced by userrec().

@@ -1577,7 +1619,7 @@ Number of seconds this user is given to send USER/NICK If they do not send their

Definition at line 168 of file users.h.

-Referenced by userrec(). +Referenced by userrec().

@@ -1603,12 +1645,12 @@ Referenced by userrec().

Definition at line 210 of file users.h.

-Referenced by GetWriteError(), and SetWriteError(). +Referenced by GetWriteError(), and SetWriteError().


The documentation for this class was generated from the following files: -
Generated on Fri May 13 15:50:05 2005 for InspIRCd by +
Generated on Sun May 15 17:03:51 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/commands_8h-source.html b/docs/module-doc/commands_8h-source.html index 7ccf10133..ff5528155 100644 --- a/docs/module-doc/commands_8h-source.html +++ b/docs/module-doc/commands_8h-source.html @@ -4,7 +4,7 @@ - +

commands.h

Go to the documentation of this file.
00001 /*       +------------------------------------+
 00002  *       | Inspire Internet Relay Chat Daemon |
 00003  *       +------------------------------------+
@@ -87,38 +87,38 @@
 00082 void handle_loadmodule(char **parameters, int pcnt, userrec *user);
 00083 void handle_unloadmodule(char **parameters, int pcnt, userrec *user);
 00084 
-00087 void handle_link_packet(char* tcp_msg, char* tcp_host, serverrec *serv);
-00088 void process_restricted_commands(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host,char* ipaddr,int port);
+00087 void handle_link_packet(char* tcp_msg, char* tcp_host, serverrec *serv, char* tcp_sum);
+00088 void process_restricted_commands(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host,char* ipaddr,int port, char* tcp_sum);
 00089 
-00092 void handle_amp(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host);
-00093 void handle_dollar(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host);
-00094 void handle_J(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host);
-00095 void handle_R(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host);
-00096 void handle_plus(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host);
-00097 void handle_b(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host);
-00098 void handle_a(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host);
-00099 void handle_F(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host);
-00100 void handle_N(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host);
-00101 void handle_AT(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host);
-00102 void handle_k(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host);
-00103 void handle_n(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host);
-00104 void handle_Q(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host);
-00105 void handle_K(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host);
-00106 void handle_L(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host);
-00107 void handle_m(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host);
-00108 void handle_M(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host);
-00109 void handle_T(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host);
-00110 void handle_t(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host);
-00111 void handle_i(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host);
-00112 void handle_P(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host);
-00113 void handle_V(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host);
+00092 void handle_amp(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host, char* tcp_sum);
+00093 void handle_dollar(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host, char* tcp_sum);
+00094 void handle_J(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host, char* tcp_sum);
+00095 void handle_R(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host, char* tcp_sum);
+00096 void handle_plus(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host, char* tcp_sum);
+00097 void handle_b(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host, char* tcp_sum);
+00098 void handle_a(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host, char* tcp_sum);
+00099 void handle_F(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host, char* tcp_sum);
+00100 void handle_N(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host, char* tcp_sum);
+00101 void handle_AT(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host, char* tcp_sum);
+00102 void handle_k(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host, char* tcp_sum);
+00103 void handle_n(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host, char* tcp_sum);
+00104 void handle_Q(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host, char* tcp_sum);
+00105 void handle_K(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host, char* tcp_sum);
+00106 void handle_L(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host, char* tcp_sum);
+00107 void handle_m(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host, char* tcp_sum);
+00108 void handle_M(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host, char* tcp_sum);
+00109 void handle_T(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host, char* tcp_sum);
+00110 void handle_t(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host, char* tcp_sum);
+00111 void handle_i(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host, char* tcp_sum);
+00112 void handle_P(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host, char* tcp_sum);
+00113 void handle_V(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host, char* tcp_sum);
 00114 
 00117 bool is_uline(const char* server);
 00118 
 00121 long duration(const char* str);
 00122 
 00123 #endif
-

Generated on Fri May 13 15:48:40 2005 for InspIRCd by +

Generated on Sun May 15 17:02:05 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/commands_8h.html b/docs/module-doc/commands_8h.html index 90380939e..cc7600fdf 100644 --- a/docs/module-doc/commands_8h.html +++ b/docs/module-doc/commands_8h.html @@ -4,7 +4,7 @@ - +

commands.h File Reference

#include <typeinfo>
#include <iostream>
#include <string>
@@ -132,55 +132,55 @@ This graph shows which files directly or indirectly include this file:

void handle_unloadmodule (char **parameters, int pcnt, userrec *user) -void handle_link_packet (char *tcp_msg, char *tcp_host, serverrec *serv) +void handle_link_packet (char *tcp_msg, char *tcp_host, serverrec *serv, char *tcp_sum)  Special functions for processing server to server traffic.

-void process_restricted_commands (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host, char *ipaddr, int port) +void process_restricted_commands (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host, char *ipaddr, int port, char *tcp_sum) -void handle_amp (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host) +void handle_amp (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host, char *tcp_sum)  These are the handlers for server commands (tokens).


-void handle_dollar (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host) +void handle_dollar (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host, char *tcp_sum) -void handle_J (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host) +void handle_J (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host, char *tcp_sum) -void handle_R (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host) +void handle_R (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host, char *tcp_sum) -void handle_plus (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host) +void handle_plus (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host, char *tcp_sum) -void handle_b (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host) +void handle_b (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host, char *tcp_sum) -void handle_a (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host) +void handle_a (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host, char *tcp_sum) -void handle_F (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host) +void handle_F (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host, char *tcp_sum) -void handle_N (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host) +void handle_N (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host, char *tcp_sum) -void handle_AT (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host) +void handle_AT (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host, char *tcp_sum) -void handle_k (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host) +void handle_k (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host, char *tcp_sum) -void handle_n (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host) +void handle_n (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host, char *tcp_sum) -void handle_Q (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host) +void handle_Q (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host, char *tcp_sum) -void handle_K (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host) +void handle_K (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host, char *tcp_sum) -void handle_L (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host) +void handle_L (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host, char *tcp_sum) -void handle_m (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host) +void handle_m (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host, char *tcp_sum) -void handle_M (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host) +void handle_M (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host, char *tcp_sum) -void handle_T (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host) +void handle_T (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host, char *tcp_sum) -void handle_t (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host) +void handle_t (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host, char *tcp_sum) -void handle_i (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host) +void handle_i (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host, char *tcp_sum) -void handle_P (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host) +void handle_P (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host, char *tcp_sum) -void handle_V (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host) +void handle_V (char token, char *params, serverrec *source, serverrec *reply, char *tcp_host, char *tcp_sum) bool is_uline (const char *server) @@ -220,7 +220,7 @@ Other useful functions.

-Referenced by Server::AddELine(), Server::AddGLine(), Server::AddKLine(), Server::AddQLine(), Server::AddZLine(), and Server::CalcDuration(). +Referenced by Server::AddELine(), Server::AddGLine(), Server::AddKLine(), Server::AddQLine(), Server::AddZLine(), and Server::CalcDuration().

@@ -256,7 +256,13 @@ Referenced by Server::AddEL char *  - tcp_host + tcp_host, + + + + + char *  + tcp_sum @@ -356,7 +362,13 @@ Referenced by Server::AddEL char *  - tcp_host + tcp_host, + + + + + char *  + tcp_sum @@ -414,7 +426,13 @@ These are the handlers for server commands (tokens). char *  - tcp_host + tcp_host, + + + + + char *  + tcp_sum @@ -514,7 +532,13 @@ These are the handlers for server commands (tokens). char *  - tcp_host + tcp_host, + + + + + char *  + tcp_sum @@ -658,7 +682,13 @@ These are the handlers for server commands (tokens). char *  - tcp_host + tcp_host, + + + + + char *  + tcp_sum @@ -758,7 +788,13 @@ These are the handlers for server commands (tokens). char *  - tcp_host + tcp_host, + + + + + char *  + tcp_sum @@ -858,7 +894,13 @@ These are the handlers for server commands (tokens). char *  - tcp_host + tcp_host, + + + + + char *  + tcp_sum @@ -1046,7 +1088,13 @@ These are the handlers for server commands (tokens). char *  - tcp_host + tcp_host, + + + + + char *  + tcp_sum @@ -1148,7 +1196,13 @@ These are the handlers for user commands. char *  - tcp_host + tcp_host, + + + + + char *  + tcp_sum @@ -1204,7 +1258,13 @@ These are the handlers for user commands. char *  - tcp_host + tcp_host, + + + + + char *  + tcp_sum @@ -1392,7 +1452,13 @@ These are the handlers for user commands. char *  - tcp_host + tcp_host, + + + + + char *  + tcp_sum @@ -1436,7 +1502,13 @@ These are the handlers for user commands. serverrec *  - serv + serv, + + + + + char *  + tcp_sum @@ -1670,7 +1742,13 @@ Special functions for processing server to server traffic. char *  - tcp_host + tcp_host, + + + + + char *  + tcp_sum @@ -1726,7 +1804,13 @@ Special functions for processing server to server traffic. char *  - tcp_host + tcp_host, + + + + + char *  + tcp_sum @@ -1914,7 +1998,13 @@ Special functions for processing server to server traffic. char *  - tcp_host + tcp_host, + + + + + char *  + tcp_sum @@ -1970,7 +2060,13 @@ Special functions for processing server to server traffic. char *  - tcp_host + tcp_host, + + + + + char *  + tcp_sum @@ -2202,7 +2298,13 @@ Special functions for processing server to server traffic. char *  - tcp_host + tcp_host, + + + + + char *  + tcp_sum @@ -2390,7 +2492,13 @@ Special functions for processing server to server traffic. char *  - tcp_host + tcp_host, + + + + + char *  + tcp_sum @@ -2534,7 +2642,13 @@ Special functions for processing server to server traffic. char *  - tcp_host + tcp_host, + + + + + char *  + tcp_sum @@ -2678,7 +2792,13 @@ Special functions for processing server to server traffic. char *  - tcp_host + tcp_host, + + + + + char *  + tcp_sum @@ -3042,7 +3162,13 @@ Special functions for processing server to server traffic. char *  - tcp_host + tcp_host, + + + + + char *  + tcp_sum @@ -3098,7 +3224,13 @@ Special functions for processing server to server traffic. char *  - tcp_host + tcp_host, + + + + + char *  + tcp_sum @@ -3462,7 +3594,13 @@ Special functions for processing server to server traffic. char *  - tcp_host + tcp_host, + + + + + char *  + tcp_sum @@ -3735,7 +3873,7 @@ Functions for u:lined servers.

-Referenced by Server::IsUlined(). +Referenced by Server::IsUlined().

@@ -3783,7 +3921,13 @@ Referenced by Server::IsUli int  - port + port, + + + + + char *  + tcp_sum @@ -3806,7 +3950,7 @@ Referenced by Server::IsUli -


Generated on Fri May 13 15:48:54 2005 for InspIRCd by +
Generated on Sun May 15 17:02:22 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/connection_8h-source.html b/docs/module-doc/connection_8h-source.html index a808f43f7..e56f1b61b 100644 --- a/docs/module-doc/connection_8h-source.html +++ b/docs/module-doc/connection_8h-source.html @@ -4,7 +4,7 @@ - +

connection.h

Go to the documentation of this file.
00001 /*       +------------------------------------+
 00002  *       | Inspire Internet Relay Chat Daemon |
 00003  *       +------------------------------------+
@@ -46,133 +46,135 @@
 00039 #define STATE_NOAUTH_OUTBOUND   4
 00040 #define STATE_SERVICES          5
 00041 
-00054 class ircd_connector : public Extensible
-00055 {
-00056  private:
-00059         sockaddr_in addr;
-00060         
-00063         int fd;
-00064         
-00067         std::string servername;
-00068         
-00071         std::string description;
-00072         
-00076         char state;
-00077         
-00080         bool SetHostAddress(char* host, int port);
-00081 
-00084         std::string version;
-00085 
-00086  public:
+00042 std::string CreateSum();
+00043 
+00056 class ircd_connector : public Extensible
+00057 {
+00058  private:
+00061         sockaddr_in addr;
+00062         
+00065         int fd;
+00066         
+00069         std::string servername;
+00070         
+00073         std::string description;
+00074         
+00078         char state;
+00079         
+00082         bool SetHostAddress(char* host, int port);
+00083 
+00086         std::string version;
 00087 
-00092         std::string ircdbuffer;
-00093 
-00094  
-00099         char host[MAXBUF];
-00100 
-00105         int port;
-00106         
-00111         std::vector<std::string> routes;
-00112         
-00113 
-00116         bool MakeOutboundConnection(char* newhost, int newport);
-00117         
-00120         std::string GetServerName();
-00121         
-00124         void SetServerName(std::string serv);
-00125         
-00128         int GetDescriptor();
-00129         
-00132         void SetDescriptor(int fd);
-00133         
-00136         int GetState();
-00137         
-00140         void SetState(int state);
-00141         
-00144         char* GetServerIP();
-00145         
-00148         std::string GetDescription();
-00149         
-00152         void SetDescription(std::string desc);
-00153         
-00159         int GetServerPort();
-00160         
-00163         void SetServerPort(int p);
-00164         
-00167         bool SetHostAndPort(char* newhost, int newport);
-00168         
-00172         void CloseConnection();
-00173 
-00179         void AddBuffer(std::string a);
-00180 
-00185         bool BufferIsComplete();
-00186 
-00189         void ClearBuffer();
-00190 
-00195         std::string GetBuffer();
-00196 
-00199         void SetVersionString(std::string newversion);
-00200 
-00204         std::string GetVersionString();
-00205 };
-00206 
-00207 
-00210 class connection : public Extensible
-00211 {
-00212  public:
-00215         int fd;
-00216         
-00219         char host[160];
-00220         
-00223         char ip[16];
-00224         
-00227         long bytes_in;
-00228 
-00231         long bytes_out;
-00232 
-00235         long cmds_in;
-00236 
-00239         long cmds_out;
-00240 
-00243         bool haspassed;
-00244 
-00249         int port;
-00250         
-00253         char registered;
-00254         
-00257         time_t lastping;
-00258         
-00261         time_t signon;
-00262         
-00265         time_t idle_lastmsg;
-00266         
-00269         time_t nping;
-00270         
-00274         std::vector<ircd_connector> connectors;
-00275         
-00278         connection();
-00279         
-00282         bool CreateListener(char* host, int p);
-00283         
-00286         bool BeginLink(char* targethost, int port, char* password, char* servername, int myport);
-00287         
-00290         bool MeshCookie(char* targethost, int port, unsigned long cookie, char* servername);
-00291         
-00294         void TerminateLink(char* targethost);
-00295         
-00299         bool SendPacket(char *message, const char* host);
-00300         
-00305         bool RecvPacket(std::deque<std::string> &messages, char* host);
-00306         
-00309         ircd_connector* FindHost(std::string host);
-00310         
-00314         bool AddIncoming(int fd,char* targethost, int sourceport);
-00315         
-00316 };
-00317 
-00318 
-00319 #endif
-

Generated on Fri May 13 15:48:41 2005 for InspIRCd by +00088 public: +00089 +00094 std::string ircdbuffer; +00095 +00096 +00101 char host[MAXBUF]; +00102 +00107 int port; +00108 +00113 std::vector<std::string> routes; +00114 +00115 +00118 bool MakeOutboundConnection(char* newhost, int newport); +00119 +00122 std::string GetServerName(); +00123 +00126 void SetServerName(std::string serv); +00127 +00130 int GetDescriptor(); +00131 +00134 void SetDescriptor(int fd); +00135 +00138 int GetState(); +00139 +00142 void SetState(int state); +00143 +00146 char* GetServerIP(); +00147 +00150 std::string GetDescription(); +00151 +00154 void SetDescription(std::string desc); +00155 +00161 int GetServerPort(); +00162 +00165 void SetServerPort(int p); +00166 +00169 bool SetHostAndPort(char* newhost, int newport); +00170 +00174 void CloseConnection(); +00175 +00181 void AddBuffer(std::string a); +00182 +00187 bool BufferIsComplete(); +00188 +00191 void ClearBuffer(); +00192 +00197 std::string GetBuffer(); +00198 +00201 void SetVersionString(std::string newversion); +00202 +00206 std::string GetVersionString(); +00207 }; +00208 +00209 +00212 class connection : public Extensible +00213 { +00214 public: +00217 int fd; +00218 +00221 char host[160]; +00222 +00225 char ip[16]; +00226 +00229 long bytes_in; +00230 +00233 long bytes_out; +00234 +00237 long cmds_in; +00238 +00241 long cmds_out; +00242 +00245 bool haspassed; +00246 +00251 int port; +00252 +00255 char registered; +00256 +00259 time_t lastping; +00260 +00263 time_t signon; +00264 +00267 time_t idle_lastmsg; +00268 +00271 time_t nping; +00272 +00276 std::vector<ircd_connector> connectors; +00277 +00280 connection(); +00281 +00284 bool CreateListener(char* host, int p); +00285 +00288 bool BeginLink(char* targethost, int port, char* password, char* servername, int myport); +00289 +00292 bool MeshCookie(char* targethost, int port, unsigned long cookie, char* servername); +00293 +00296 void TerminateLink(char* targethost); +00297 +00301 bool SendPacket(char *message, const char* host); +00302 +00307 bool RecvPacket(std::deque<std::string> &messages, char* host, std::deque<std::string> &sums); +00308 +00311 ircd_connector* FindHost(std::string host); +00312 +00316 bool AddIncoming(int fd,char* targethost, int sourceport); +00317 +00318 }; +00319 +00320 +00321 #endif +

Generated on Sun May 15 17:02:05 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/connection_8h.html b/docs/module-doc/connection_8h.html index d5d15482d..cfe88c4d2 100644 --- a/docs/module-doc/connection_8h.html +++ b/docs/module-doc/connection_8h.html @@ -4,7 +4,7 @@ - +

connection.h File Reference

#include "inspircd_config.h"
#include "base.h"
#include <string>
@@ -58,6 +58,9 @@ This graph shows which files directly or indirectly include this file:

#define STATE_SERVICES   5 +

Functions

+std::string CreateSum () +

Define Documentation

@@ -204,7 +207,36 @@ Definition at line 40 Definition at line 37 of file connection.h. -


Generated on Fri May 13 15:48:56 2005 for InspIRCd by +

Function Documentation

+

+ + + + +
+ + + + + + + + + +
std::string CreateSum  ) 
+
+ + + + + +
+   + + +

+

+


Generated on Sun May 15 17:02:25 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/ctables_8h-source.html b/docs/module-doc/ctables_8h-source.html index 11bbda8b7..81613b796 100644 --- a/docs/module-doc/ctables_8h-source.html +++ b/docs/module-doc/ctables_8h-source.html @@ -4,7 +4,7 @@ - +

ctables.h

Go to the documentation of this file.
00001 /*       +------------------------------------+
 00002  *       | Inspire Internet Relay Chat Daemon |
 00003  *       +------------------------------------+
@@ -42,7 +42,7 @@
 00051 
 00052 #endif
 00053 
-

Generated on Fri May 13 15:48:41 2005 for InspIRCd by +

Generated on Sun May 15 17:02:05 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/ctables_8h.html b/docs/module-doc/ctables_8h.html index aec2689e8..23bda01ee 100644 --- a/docs/module-doc/ctables_8h.html +++ b/docs/module-doc/ctables_8h.html @@ -4,7 +4,7 @@ - +

ctables.h File Reference

#include "inspircd_config.h"
#include "inspircd.h"
#include "base.h"
@@ -31,7 +31,7 @@ This graph shows which files directly or indirectly include this file:

 A structure that defines a command. More...

-
Generated on Fri May 13 15:48:57 2005 for InspIRCd by +
Generated on Sun May 15 17:02:26 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/dns_8h-source.html b/docs/module-doc/dns_8h-source.html index 6089e9f1e..a572e51d4 100644 --- a/docs/module-doc/dns_8h-source.html +++ b/docs/module-doc/dns_8h-source.html @@ -4,7 +4,7 @@ - +

dns.h

Go to the documentation of this file.
00001 /*
 00002 dns.h - dns library declarations based on firedns Copyright (C) 2002 Ian Gulliver
 00003 
@@ -70,7 +70,7 @@
 00093 };
 00094 
 00095 #endif
-

Generated on Fri May 13 15:48:41 2005 for InspIRCd by +

Generated on Sun May 15 17:02:05 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/dns_8h.html b/docs/module-doc/dns_8h.html index a3b2a8eb6..08c0757ca 100644 --- a/docs/module-doc/dns_8h.html +++ b/docs/module-doc/dns_8h.html @@ -4,7 +4,7 @@ - +

dns.h File Reference

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
@@ -23,7 +23,7 @@ Include dependency graph for dns.h:

struct  dns_ip4list -
Generated on Fri May 13 15:48:58 2005 for InspIRCd by +
Generated on Sun May 15 17:02:27 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/files.html b/docs/module-doc/files.html index 90f37662f..4cde2d477 100644 --- a/docs/module-doc/files.html +++ b/docs/module-doc/files.html @@ -4,7 +4,7 @@ - +

InspIRCd File List

Here is a list of all files with brief descriptions: @@ -13,6 +13,7 @@ + @@ -23,7 +24,7 @@
base.h [code]
channels.cpp [code]
connection.h [code]
ctables.h [code]
dns.h [code]
hashcomp.h [code]
message.h [code]
mode.h [code]
modules.cpp [code]
users.h [code]
xline.h [code]
-
Generated on Fri May 13 15:48:40 2005 for InspIRCd by +
Generated on Sun May 15 17:02:04 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/functions.html b/docs/module-doc/functions.html index 7adda59a1..2199f5c4f 100644 --- a/docs/module-doc/functions.html +++ b/docs/module-doc/functions.html @@ -4,7 +4,7 @@ - +
a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | ~
@@ -15,18 +15,18 @@ Here is a list of all class members with links to the classes they belong to:

@@ -46,11 +46,11 @@ Here is a list of all class members with links to the classes they belong to:

- j -

- k -

    @@ -209,21 +214,22 @@ Here is a list of all class members with links to the classes they belong to:

    userrec
  • list : ExtMode
  • LoadFile() : FileReader
  • Log() -: Server
+: Server
  • lt() +: irc::irc_char_traits

    - m -

    +: Server

    - q -

    +: Server

    - r -

    +: Server

    - v -

    +: ConfigReader
  • version +: serverrec, ircd_connector
  • Version() +: Version

    - w -

    • WriteError @@ -426,7 +433,7 @@ Here is a list of all class members with links to the classes they belong to:

      serverrec
    • ~ucrec() : ucrec
    • ~userrec() : userrec
    -
    Generated on Fri May 13 15:49:18 2005 for InspIRCd by +
    Generated on Sun May 15 17:02:54 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/functions_func.html b/docs/module-doc/functions_func.html index c900b096c..7c5c98f9d 100644 --- a/docs/module-doc/functions_func.html +++ b/docs/module-doc/functions_func.html @@ -4,9 +4,9 @@ - + -
    a | b | c | d | e | f | g | h | i | j | l | m | o | p | q | r | s | t | u | v | ~
    +
    a | b | c | d | e | f | g | h | i | j | l | m | n | o | p | q | r | s | t | u | v | ~

    @@ -15,17 +15,17 @@

    - b -

    - m -

    +

    - n - +

    - o -

    - q -

    +: Server

    - r -

    +: Server

    - v -

    -
    Generated on Fri May 13 15:49:18 2005 for InspIRCd by +
    Generated on Sun May 15 17:02:54 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/functions_vars.html b/docs/module-doc/functions_vars.html index 5e1bc5103..51f896dd8 100644 --- a/docs/module-doc/functions_vars.html +++ b/docs/module-doc/functions_vars.html @@ -4,7 +4,7 @@ - +
    a | b | c | d | e | f | h | i | j | k | l | m | n | o | p | r | s | t | u | v | w
    @@ -187,7 +187,7 @@ -
    Generated on Fri May 13 15:49:18 2005 for InspIRCd by +
    Generated on Sun May 15 17:02:54 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/globals.html b/docs/module-doc/globals.html index d70ea24d2..9bc221055 100644 --- a/docs/module-doc/globals.html +++ b/docs/module-doc/globals.html @@ -4,7 +4,7 @@ - +
    a | b | c | d | e | f | g | h | i | l | m | n | p | q | r | s | t | u | v | w | z
    @@ -32,85 +32,86 @@ Here is a list of all file members with links to the files they belong to:

    xline.h
  • add_qline() : xline.h
  • add_zline() : xline.h
  • address_cache -: modules.cpp
  • AdminEmail -: modules.cpp, channels.cpp
  • AdminName -: modules.cpp, channels.cpp
  • AdminNick -: modules.cpp, channels.cpp
  • allowed_umode() +: modules.cpp
  • AdminEmail +: modules.cpp, channels.cpp
  • AdminName +: modules.cpp, channels.cpp
  • AdminNick +: modules.cpp, channels.cpp
  • allowed_umode() : mode.h
  • apply_lines() : xline.h
  • auth_cookies -: modules.cpp, channels.cpp +: modules.cpp, channels.cpp

    - b -

    +: modules.cpp, channels.cpp

    - c -

    - d -

    - e -

    +: modules.cpp
  • ExtModeListIter +: modules.cpp

    - f -

    @@ -182,9 +183,9 @@ Here is a list of all file members with links to the files they belong to:

    commands.h
  • handle_squit() : commands.h
  • handle_stats() : commands.h
  • handle_summon() -: commands.h
  • handle_t() -: commands.h
  • handle_T() -: commands.h
  • handle_time() +: commands.h
  • handle_T() +: commands.h
  • handle_t() +: commands.h
  • handle_time() : commands.h
  • handle_topic() : commands.h
  • handle_trace() : commands.h
  • handle_unloadmodule() @@ -205,7 +206,7 @@ Here is a list of all file members with links to the files they belong to:

    InvitedList : users.h
  • InviteList : channels.h
  • IP -: modules.cpp
  • ircd_module +: modules.cpp
  • ircd_module : modules.h
  • is_uline() : commands.h
  • isident() : message.h
  • isnick() @@ -215,9 +216,9 @@ Here is a list of all file members with links to the files they belong to:

    LINK_ACTIVE : servers.h
  • LINK_INACTIVE : servers.h
  • list -: modules.cpp, channels.cpp
  • log_file -: modules.cpp, channels.cpp
  • LogLevel -: modules.cpp, channels.cpp +: modules.cpp, channels.cpp
  • log_file +: modules.cpp, channels.cpp
  • LogLevel +: modules.cpp, channels.cpp

    - m -

    - n -

    +: hashcomp.h, channels.cpp

    - p -

    @@ -271,20 +272,20 @@ Here is a list of all file members with links to the files they belong to:

    +: modules.cpp, channels.cpp
  • rules +: modules.cpp, channels.cpp
  • RULES +: modules.cpp

    - s -

    +: users.cpp, servers.cpp, modules.cpp, channels.cpp

    - u -

    +: modules.cpp

    - v -

    - z -

    -
    Generated on Fri May 13 15:50:10 2005 for InspIRCd by +
    Generated on Sun May 15 17:03:57 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/globals_defs.html b/docs/module-doc/globals_defs.html index 855ebc923..ea7ddb035 100644 --- a/docs/module-doc/globals_defs.html +++ b/docs/module-doc/globals_defs.html @@ -4,7 +4,7 @@ - +
    a | c | d | f | l | m | n | s | u | v
    @@ -67,7 +67,7 @@
  • +: hashcomp.h, channels.cpp

    - s -

    -
    Generated on Fri May 13 15:50:10 2005 for InspIRCd by +
    Generated on Sun May 15 17:03:57 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/globals_func.html b/docs/module-doc/globals_func.html index 7c41a5414..dcde05ba6 100644 --- a/docs/module-doc/globals_func.html +++ b/docs/module-doc/globals_func.html @@ -4,7 +4,7 @@ - +
    a | b | c | d | e | f | g | h | i | m | n | p | q | r | s | t | z
    @@ -37,7 +37,8 @@ : message.h
  • cmode() : message.h
  • common_channels() : message.h
  • createcommand() -: modules.h
  • cstatus() +: modules.h
  • CreateSum() +: connection.h
  • cstatus() : message.h

    - d -

    - e -

    - g -

    +: modules.cpp
  • ModeDefinedOff() +: modules.cpp
  • ModeDefinedOn() +: modules.cpp
  • ModeDefinedOper() +: modules.cpp
  • ModeIsListMode() +: modules.cpp
  • ModeMakeList() +: modules.cpp
  • modules() +: modules.cpp, channels.cpp

    - n -

    • NonBlocking() @@ -211,7 +212,7 @@
    • zline_make_global() : xline.h
    • zline_set_creation_time() : xline.h
    -
    Generated on Fri May 13 15:50:10 2005 for InspIRCd by +
    Generated on Sun May 15 17:03:57 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/globals_type.html b/docs/module-doc/globals_type.html index 160c26206..0ef9ca1e3 100644 --- a/docs/module-doc/globals_type.html +++ b/docs/module-doc/globals_type.html @@ -4,30 +4,30 @@ - +

    -
    Generated on Fri May 13 15:50:10 2005 for InspIRCd by +: modules.cpp +
    Generated on Sun May 15 17:03:57 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/globals_vars.html b/docs/module-doc/globals_vars.html index 6d9ebd687..1a31c56d6 100644 --- a/docs/module-doc/globals_vars.html +++ b/docs/module-doc/globals_vars.html @@ -4,7 +4,7 @@ - +
    a | b | c | d | e | f | i | l | m | n | p | r | s | t | w
    @@ -14,96 +14,96 @@

    - a -

    +: modules.cpp, channels.cpp
  • AdminName +: modules.cpp, channels.cpp
  • AdminNick +: modules.cpp, channels.cpp
  • auth_cookies +: modules.cpp, channels.cpp

    - b -

    +: modules.cpp, channels.cpp

    - c -

    - d -

    +: modules.cpp, channels.cpp
  • defaultRoute +: modules.cpp, channels.cpp
  • DieDelay +: modules.cpp, channels.cpp
  • diepass +: modules.cpp, channels.cpp
  • DieValue +: modules.cpp, channels.cpp

    - e -

    +: modules.cpp

    - f -

    +: modules.cpp, channels.cpp
  • fd_reap +: modules.cpp, channels.cpp
  • fd_ref_table +: modules.cpp

    - i -

    +: modules.cpp

    - l -

    +: modules.cpp, channels.cpp
  • log_file +: modules.cpp, channels.cpp
  • LogLevel +: modules.cpp, channels.cpp

    - m -

    +: modules.cpp, channels.cpp
  • me +: modules.cpp, channels.cpp
  • MODCOUNT +: modules.cpp, channels.cpp
  • module_names +: modules.cpp, channels.cpp
  • modules +: modules.cpp, channels.cpp
  • motd +: modules.cpp, channels.cpp
  • MOTD +: modules.cpp

    - n -

    +: modules.cpp, channels.cpp
  • NetBufferSize +: modules.cpp, channels.cpp
  • Network +: modules.cpp, channels.cpp

    - p -

    +: modules.cpp, channels.cpp
  • ports +: modules.cpp, channels.cpp
  • PrefixQuit +: modules.cpp, channels.cpp

    - r -

    +: modules.cpp, channels.cpp
  • rules +: modules.cpp, channels.cpp
  • RULES +: modules.cpp

    - s -

    +: modules.cpp, channels.cpp
  • ServerName +: modules.cpp, channels.cpp
  • SERVERportCount +: modules.cpp, channels.cpp
  • startup_time +: modules.cpp, channels.cpp

    - t -

    +: users.cpp, servers.cpp, modules.cpp, channels.cpp

    - w -

    -
    Generated on Fri May 13 15:50:10 2005 for InspIRCd by +: modules.cpp
  • WHOWAS_MAX +: modules.cpp, channels.cpp
  • WHOWAS_STALE +: modules.cpp, channels.cpp +
    Generated on Sun May 15 17:03:57 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/graph_legend.html b/docs/module-doc/graph_legend.html index abdd1fabc..0892dff1d 100644 --- a/docs/module-doc/graph_legend.html +++ b/docs/module-doc/graph_legend.html @@ -4,7 +4,7 @@ - +

    Graph Legend

    This page explains how to interpret the graphs that are generated by doxygen.

    Consider the following example:

    /*! Invisible class because of truncation */
     class Invisible { };
    @@ -67,7 +67,7 @@ A purple dashed arrow is used if a class is contained or used by another class.
     
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.
  • -
    Generated on Fri May 13 15:50:10 2005 for InspIRCd by +
    Generated on Sun May 15 17:03:57 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/hashcomp_8h-source.html b/docs/module-doc/hashcomp_8h-source.html new file mode 100644 index 000000000..9314d0209 --- /dev/null +++ b/docs/module-doc/hashcomp_8h-source.html @@ -0,0 +1,97 @@ + + +InspIRCd: hashcomp.h Source File + + + + +

    hashcomp.h

    Go to the documentation of this file.
    00001 /*       +------------------------------------+
    +00002  *       | Inspire Internet Relay Chat Daemon |
    +00003  *       +------------------------------------+
    +00004  *
    +00005  *  Inspire is copyright (C) 2002-2005 ChatSpike-Dev.
    +00006  *                       E-mail:
    +00007  *                <brain@chatspike.net>
    +00008  *                <Craig@chatspike.net>
    +00009  *
    +00010  * Written by Craig Edwards, Craig McLure, and others.
    +00011  * This program is free but copyrighted software; see
    +00012  *            the file COPYING for details.
    +00013  *
    +00014  * ---------------------------------------------------
    +00015  */
    +00016 
    +00017 #ifndef _HASHCOMP_H_
    +00018 #define _HASHCOMP_H_
    +00019 
    +00020 #include "inspircd_config.h"
    +00021 
    +00022 #ifdef GCC3
    +00023 #include <ext/hash_map>
    +00024 #else
    +00025 #include <hash_map>
    +00026 #endif
    +00027 
    +00028 #ifdef GCC3
    +00029 #define nspace __gnu_cxx
    +00030 #else
    +00031 #define nspace std
    +00032 #endif
    +00033 
    +00034 using namespace std;
    +00035 
    +00036 namespace nspace
    +00037 {
    +00038 #ifdef GCC34
    +00039         template<> struct hash<in_addr>
    +00040 #else
    +00041         template<> struct nspace::hash<in_addr>
    +00042 #endif
    +00043         {
    +00044                 size_t operator()(const struct in_addr &a) const;
    +00045         };
    +00046 #ifdef GCC34
    +00047         template<> struct hash<string>
    +00048 #else
    +00049         template<> struct nspace::hash<string>
    +00050 #endif
    +00051         {
    +00052                 size_t operator()(const string &s) const;
    +00053         };
    +00054 }
    +00055 
    +00060 struct StrHashComp
    +00061 {
    +00064         bool operator()(const string& s1, const string& s2) const;
    +00065 };
    +00066 
    +00071 struct InAddr_HashComp
    +00072 {
    +00075         bool operator()(const in_addr &s1, const in_addr &s2) const;
    +00076 };
    +00077 
    +00080 namespace irc
    +00081 {
    +00086         struct irc_char_traits : std::char_traits<char> {
    +00087 
    +00090                 static bool eq(char c1st, char c2nd);
    +00091 
    +00094                 static bool ne(char c1st, char c2nd);
    +00095 
    +00098                 static bool lt(char c1st, char c2nd);
    +00099 
    +00102                 static int compare(const char* str1, const char* str2, size_t n);
    +00103 
    +00106                 static const char* find(const char* s1, int  n, char c);
    +00107         };
    +00108 
    +00111         typedef basic_string<char, irc_char_traits, allocator<char> > string;
    +00112 }
    +00113 
    +00114 #endif
    +

    Generated on Sun May 15 17:02:05 2005 for InspIRCd by + +doxygen +1.3.3
    + + diff --git a/docs/module-doc/hashcomp_8h.html b/docs/module-doc/hashcomp_8h.html new file mode 100644 index 000000000..ceb1dacd0 --- /dev/null +++ b/docs/module-doc/hashcomp_8h.html @@ -0,0 +1,69 @@ + + +InspIRCd: hashcomp.h File Reference + + + + +

    hashcomp.h File Reference

    #include "inspircd_config.h"
    +#include <ext/hash_map>
    + +

    +Include dependency graph for hashcomp.h:

    Include dependency graph
    + +

    +This graph shows which files directly or indirectly include this file:

    Included by dependency graph
    + + + + +

    +Go to the source code of this file. + + + + + + + + + + + + + + + + +

    Namespaces

    namespace  irc
    namespace  nspace

    Compounds

    struct  InAddr_HashComp
     This class returns true if two in_addr structs match. More...

    struct  StrHashComp
     This class returns true if two strings match. More...


    Defines

    #define nspace   __gnu_cxx
    +


    Define Documentation

    +

    + + + + +
    + + +
    #define nspace   __gnu_cxx +
    +
    + + + + + +
    +   + + +

    + +

    +Definition at line 29 of file hashcomp.h.

    +


    Generated on Sun May 15 17:02:28 2005 for InspIRCd by + +doxygen +1.3.3
    + + diff --git a/docs/module-doc/hashcomp_8h__dep__incl.gif b/docs/module-doc/hashcomp_8h__dep__incl.gif new file mode 100644 index 000000000..5595a48da Binary files /dev/null and b/docs/module-doc/hashcomp_8h__dep__incl.gif differ diff --git a/docs/module-doc/hashcomp_8h__incl.gif b/docs/module-doc/hashcomp_8h__incl.gif new file mode 100644 index 000000000..be85b903e Binary files /dev/null and b/docs/module-doc/hashcomp_8h__incl.gif differ diff --git a/docs/module-doc/hierarchy.html b/docs/module-doc/hierarchy.html index e8a66964c..28093b0d5 100644 --- a/docs/module-doc/hierarchy.html +++ b/docs/module-doc/hierarchy.html @@ -4,10 +4,14 @@ - +

    InspIRCd Class Hierarchy

    Go to the graphical class hierarchy

    This inheritance list is sorted roughly, but not completely, alphabetically:

      +
    • char_traits +
    • classbase
      • Admin @@ -61,7 +65,7 @@ This inheritance list is sorted roughly, but not completely, alphabetically: -
        Generated on Fri May 13 15:49:18 2005 for InspIRCd by +
        Generated on Sun May 15 17:02:54 2005 for InspIRCd by doxygen 1.3.3
        diff --git a/docs/module-doc/inherit__graph__0.gif b/docs/module-doc/inherit__graph__0.gif index a434ea0a7..397bfc922 100644 Binary files a/docs/module-doc/inherit__graph__0.gif and b/docs/module-doc/inherit__graph__0.gif differ diff --git a/docs/module-doc/inherit__graph__1.gif b/docs/module-doc/inherit__graph__1.gif index 992d6ed85..a434ea0a7 100644 Binary files a/docs/module-doc/inherit__graph__1.gif and b/docs/module-doc/inherit__graph__1.gif differ diff --git a/docs/module-doc/inherit__graph__2.gif b/docs/module-doc/inherit__graph__2.gif index 224232736..992d6ed85 100644 Binary files a/docs/module-doc/inherit__graph__2.gif and b/docs/module-doc/inherit__graph__2.gif differ diff --git a/docs/module-doc/inherit__graph__3.gif b/docs/module-doc/inherit__graph__3.gif index 54f78b321..224232736 100644 Binary files a/docs/module-doc/inherit__graph__3.gif and b/docs/module-doc/inherit__graph__3.gif differ diff --git a/docs/module-doc/inherit__graph__4.gif b/docs/module-doc/inherit__graph__4.gif index d85abdb1b..54f78b321 100644 Binary files a/docs/module-doc/inherit__graph__4.gif and b/docs/module-doc/inherit__graph__4.gif differ diff --git a/docs/module-doc/inherit__graph__5.gif b/docs/module-doc/inherit__graph__5.gif index 516567cb0..d85abdb1b 100644 Binary files a/docs/module-doc/inherit__graph__5.gif and b/docs/module-doc/inherit__graph__5.gif differ diff --git a/docs/module-doc/inherit__graph__6.gif b/docs/module-doc/inherit__graph__6.gif index e3f1b5b05..516567cb0 100644 Binary files a/docs/module-doc/inherit__graph__6.gif and b/docs/module-doc/inherit__graph__6.gif differ diff --git a/docs/module-doc/inherit__graph__7.gif b/docs/module-doc/inherit__graph__7.gif index a7d4324c4..e3f1b5b05 100644 Binary files a/docs/module-doc/inherit__graph__7.gif and b/docs/module-doc/inherit__graph__7.gif differ diff --git a/docs/module-doc/inherit__graph__8.gif b/docs/module-doc/inherit__graph__8.gif new file mode 100644 index 000000000..a7d4324c4 Binary files /dev/null and b/docs/module-doc/inherit__graph__8.gif differ diff --git a/docs/module-doc/inherits.html b/docs/module-doc/inherits.html index 9c4f67ede..bf56418f2 100644 --- a/docs/module-doc/inherits.html +++ b/docs/module-doc/inherits.html @@ -4,11 +4,16 @@ - +

        InspIRCd Graphical Class Hierarchy

        Go to the textual class hierarchy

        - + - - - - - - -
        +
        + + + +
        @@ -44,36 +49,36 @@
        +
        +
        +
        +
        +
        +
        +
        -


        Generated on Fri May 13 15:50:13 2005 for InspIRCd by +
        Generated on Sun May 15 17:04:00 2005 for InspIRCd by doxygen 1.3.3
        diff --git a/docs/module-doc/main.html b/docs/module-doc/main.html index ad2088d71..a137dee20 100644 --- a/docs/module-doc/main.html +++ b/docs/module-doc/main.html @@ -4,10 +4,10 @@ - +

        InspIRCd Documentation

        -

        1.0Betareleases


        Generated on Fri May 13 15:48:40 2005 for InspIRCd by +

        1.0Betareleases


        Generated on Sun May 15 17:02:04 2005 for InspIRCd by doxygen 1.3.3
        diff --git a/docs/module-doc/message_8h-source.html b/docs/module-doc/message_8h-source.html index 3626a3fa0..958c56b71 100644 --- a/docs/module-doc/message_8h-source.html +++ b/docs/module-doc/message_8h-source.html @@ -4,7 +4,7 @@ - +

        message.h

        Go to the documentation of this file.
        00001 /*       +------------------------------------+
         00002  *       | Inspire Internet Relay Chat Daemon |
         00003  *       +------------------------------------+
        @@ -57,7 +57,7 @@
         00050 void send_network_quit(const char* nick, const char* reason);
         00051 
         00052 #endif
        -

        Generated on Fri May 13 15:48:41 2005 for InspIRCd by +

    Generated on Sun May 15 17:02:05 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/message_8h.html b/docs/module-doc/message_8h.html index 687a00ed8..98336179d 100644 --- a/docs/module-doc/message_8h.html +++ b/docs/module-doc/message_8h.html @@ -4,7 +4,7 @@ - +

    message.h File Reference

    #include <typeinfo>
    #include <iostream>
    #include <string>
    @@ -169,7 +169,7 @@ This graph shows which files directly or indirectly include this file:

    -Referenced by Server::ChangeHost(). +Referenced by Server::ChangeHost().

    @@ -209,7 +209,7 @@ Referenced by Server::Chang

    -Referenced by Server::ChangeGECOS(). +Referenced by Server::ChangeGECOS().

    @@ -354,7 +354,7 @@ Referenced by Server::Chang

    -Referenced by Server::ChanMode(). +Referenced by Server::ChanMode().

    @@ -394,7 +394,7 @@ Referenced by Server::ChanM

    -Referenced by Server::CommonChannels(). +Referenced by Server::CommonChannels().

    @@ -472,7 +472,7 @@ Referenced by Server::Commo

    -Referenced by Server::IsOnChannel(). +Referenced by Server::IsOnChannel().

    @@ -570,7 +570,7 @@ Referenced by Server::IsOnC

    -Referenced by Server::IsNick(). +Referenced by Server::IsNick().

    @@ -756,7 +756,7 @@ Referenced by Server::IsNic -


    Generated on Fri May 13 15:48:59 2005 for InspIRCd by +
    Generated on Sun May 15 17:02:30 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/mode_8h-source.html b/docs/module-doc/mode_8h-source.html index b8bc7b719..3afbfc976 100644 --- a/docs/module-doc/mode_8h-source.html +++ b/docs/module-doc/mode_8h-source.html @@ -4,7 +4,7 @@ - +

    mode.h

    Go to the documentation of this file.
    00001 /*       +------------------------------------+
     00002  *       | Inspire Internet Relay Chat Daemon |
     00003  *       +------------------------------------+
    @@ -53,7 +53,7 @@
     00046 
     00047 
     00048 #endif
    -

    Generated on Fri May 13 15:48:41 2005 for InspIRCd by +

  • Generated on Sun May 15 17:02:05 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/mode_8h.html b/docs/module-doc/mode_8h.html index 2edbe429f..48eafe999 100644 --- a/docs/module-doc/mode_8h.html +++ b/docs/module-doc/mode_8h.html @@ -4,7 +4,7 @@ - +

    mode.h File Reference

    #include <typeinfo>
    #include <iostream>
    #include <string>
    @@ -802,7 +802,7 @@ This graph shows which files directly or indirectly include this file:

    -
    Generated on Fri May 13 15:49:01 2005 for InspIRCd by +
    Generated on Sun May 15 17:02:32 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/modules_8cpp-source.html b/docs/module-doc/modules_8cpp-source.html index 024038f7d..5f6dfb3be 100644 --- a/docs/module-doc/modules_8cpp-source.html +++ b/docs/module-doc/modules_8cpp-source.html @@ -4,7 +4,7 @@ - +

    modules.cpp

    Go to the documentation of this file.
    00001 /*       +------------------------------------+
     00002  *       | Inspire Internet Relay Chat Daemon |
     00003  *       +------------------------------------+
    @@ -26,1055 +26,984 @@
     00019 #include "inspircd_util.h"
     00020 #include "inspircd_config.h"
     00021 #include <unistd.h>
    -00022 #include <fcntl.h>
    -00023 #include <sys/errno.h>
    -00024 #include <sys/ioctl.h>
    -00025 #include <sys/utsname.h>
    -00026 #ifdef USE_KQUEUE
    -00027 #include <sys/types.h>
    -00028 #include <sys/event.h>
    -00029 #include <sys/time.h>
    -00030 #endif
    -00031 #include <cstdio>
    -00032 #include <time.h>
    -00033 #include <string>
    -00034 #ifdef GCC3
    -00035 #include <ext/hash_map>
    -00036 #else
    -00037 #include <hash_map>
    -00038 #endif
    -00039 #include <map>
    -00040 #include <sstream>
    -00041 #include <vector>
    -00042 #include <errno.h>
    -00043 #include <deque>
    -00044 #include <errno.h>
    -00045 #include <unistd.h>
    -00046 #include <sched.h>
    -00047 #include "connection.h"
    -00048 #include "users.h"
    -00049 #include "servers.h"
    -00050 #include "ctables.h"
    -00051 #include "globals.h"
    -00052 #include "modules.h"
    -00053 #include "dynamic.h"
    -00054 #include "wildcard.h"
    -00055 #include "message.h"
    -00056 #include "mode.h"
    -00057 #include "xline.h"
    -00058 #include "commands.h"
    -00059 #include "inspstring.h"
    -00060 
    -00061 #ifdef GCC3
    -00062 #define nspace __gnu_cxx
    -00063 #else
    -00064 #define nspace std
    -00065 #endif
    -00066 
    -00067 using namespace std;
    -00068 
    -00069 #ifdef USE_KQUEUE
    -00070 extern int kq;
    -00071 #endif
    -00072 
    -00073 extern int MODCOUNT;
    -00074 extern std::vector<Module*> modules;
    -00075 extern std::vector<ircd_module*> factory;
    -00076 
    -00077 extern time_t TIME;
    -00078 
    -00079 extern int LogLevel;
    -00080 extern char ServerName[MAXBUF];
    -00081 extern char Network[MAXBUF];
    -00082 extern char ServerDesc[MAXBUF];
    -00083 extern char AdminName[MAXBUF];
    -00084 extern char AdminEmail[MAXBUF];
    -00085 extern char AdminNick[MAXBUF];
    -00086 extern char diepass[MAXBUF];
    -00087 extern char restartpass[MAXBUF];
    -00088 extern char motd[MAXBUF];
    -00089 extern char rules[MAXBUF];
    -00090 extern char list[MAXBUF];
    -00091 extern char PrefixQuit[MAXBUF];
    -00092 extern char DieValue[MAXBUF];
    +00022 #include <sys/errno.h>
    +00023 #ifdef USE_KQUEUE
    +00024 #include <sys/types.h>
    +00025 #include <sys/event.h>
    +00026 #include <sys/time.h>
    +00027 #endif
    +00028 #include <time.h>
    +00029 #include <string>
    +00030 #ifdef GCC3
    +00031 #include <ext/hash_map>
    +00032 #else
    +00033 #include <hash_map>
    +00034 #endif
    +00035 #include <map>
    +00036 #include <sstream>
    +00037 #include <vector>
    +00038 #include <deque>
    +00039 #include "connection.h"
    +00040 #include "users.h"
    +00041 #include "servers.h"
    +00042 #include "ctables.h"
    +00043 #include "globals.h"
    +00044 #include "modules.h"
    +00045 #include "dynamic.h"
    +00046 #include "wildcard.h"
    +00047 #include "message.h"
    +00048 #include "mode.h"
    +00049 #include "xline.h"
    +00050 #include "commands.h"
    +00051 #include "inspstring.h"
    +00052 #include "helperfuncs.h"
    +00053 #include "hashcomp.h"
    +00054 
    +00055 using namespace std;
    +00056 
    +00057 #ifdef USE_KQUEUE
    +00058 extern int kq;
    +00059 #endif
    +00060 
    +00061 extern int MODCOUNT;
    +00062 extern std::vector<Module*> modules;
    +00063 extern std::vector<ircd_module*> factory;
    +00064 
    +00065 extern time_t TIME;
    +00066 
    +00067 extern int LogLevel;
    +00068 extern char ServerName[MAXBUF];
    +00069 extern char Network[MAXBUF];
    +00070 extern char ServerDesc[MAXBUF];
    +00071 extern char AdminName[MAXBUF];
    +00072 extern char AdminEmail[MAXBUF];
    +00073 extern char AdminNick[MAXBUF];
    +00074 extern char diepass[MAXBUF];
    +00075 extern char restartpass[MAXBUF];
    +00076 extern char motd[MAXBUF];
    +00077 extern char rules[MAXBUF];
    +00078 extern char list[MAXBUF];
    +00079 extern char PrefixQuit[MAXBUF];
    +00080 extern char DieValue[MAXBUF];
    +00081 
    +00082 extern int debugging;
    +00083 extern int WHOWAS_STALE;
    +00084 extern int WHOWAS_MAX;
    +00085 extern int DieDelay;
    +00086 extern time_t startup_time;
    +00087 extern int NetBufferSize;
    +00088 extern int MaxWhoResults;
    +00089 extern time_t nb_start;
    +00090 
    +00091 extern std::vector<int> fd_reap;
    +00092 extern std::vector<std::string> module_names;
     00093 
    -00094 extern int debugging;
    -00095 extern int WHOWAS_STALE;
    -00096 extern int WHOWAS_MAX;
    -00097 extern int DieDelay;
    -00098 extern time_t startup_time;
    -00099 extern int NetBufferSize;
    -00100 extern int MaxWhoResults;
    -00101 extern time_t nb_start;
    +00094 extern int boundPortCount;
    +00095 extern int portCount;
    +00096 extern int SERVERportCount;
    +00097 extern int ports[MAXSOCKS];
    +00098 extern int defaultRoute;
    +00099 
    +00100 extern std::vector<long> auth_cookies;
    +00101 extern std::stringstream config_f;
     00102 
    -00103 extern std::vector<int> fd_reap;
    -00104 extern std::vector<std::string> module_names;
    -00105 
    -00106 extern int boundPortCount;
    -00107 extern int portCount;
    -00108 extern int SERVERportCount;
    -00109 extern int ports[MAXSOCKS];
    -00110 extern int defaultRoute;
    -00111 
    -00112 extern std::vector<long> auth_cookies;
    -00113 extern std::stringstream config_f;
    +00103 extern serverrec* me[32];
    +00104 
    +00105 extern FILE *log_file;
    +00106 
    +00107 extern userrec* fd_ref_table[65536];
    +00108 
    +00109 typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, StrHashComp> user_hash;
    +00110 typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, StrHashComp> chan_hash;
    +00111 typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, InAddr_HashComp> address_cache;
    +00112 typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, StrHashComp> whowas_hash;
    +00113 typedef std::deque<command_t> command_table;
     00114 
    -00115 extern serverrec* me[32];
    -00116 
    -00117 extern FILE *log_file;
    -00118 
    -00119 extern userrec* fd_ref_table[65536];
    -00120 
    -00121 namespace nspace
    -00122 {
    -00123 #ifdef GCC34
    -00124         template<> struct hash<in_addr>
    -00125 #else
    -00126         template<> struct nspace::hash<in_addr>
    -00127 #endif
    -00128         {
    -00129                 size_t operator()(const struct in_addr &a) const
    -00130                 {
    -00131                         size_t q;
    -00132                         memcpy(&q,&a,sizeof(size_t));
    -00133                         return q;
    -00134                 }
    -00135         };
    -00136 #ifdef GCC34
    -00137         template<> struct hash<string>
    -00138 #else
    -00139         template<> struct nspace::hash<string>
    -00140 #endif
    -00141         {
    -00142                 size_t operator()(const string &s) const
    -00143                 {
    -00144                         char a[MAXBUF];
    -00145                         static struct hash<const char *> strhash;
    -00146                         strlcpy(a,s.c_str(),MAXBUF);
    -00147                         strlower(a);
    -00148                         return strhash(a);
    -00149                 }
    -00150         };
    -00151 }
    -00152 
    -00153 struct StrHashComp
    -00154 {
    -00155 
    -00156         bool operator()(const string& s1, const string& s2) const
    -00157         {
    -00158                 char a[MAXBUF],b[MAXBUF];
    -00159                 strlcpy(a,s1.c_str(),MAXBUF);
    -00160                 strlcpy(b,s2.c_str(),MAXBUF);
    -00161                 strlower(a);
    -00162                 strlower(b);
    -00163                 return (strcasecmp(a,b) == 0);
    -00164         }
    -00165 
    -00166 };
    -00167 
    -00168 struct InAddr_HashComp
    -00169 {
    -00170 
    -00171         bool operator()(const in_addr &s1, const in_addr &s2) const
    -00172         {
    -00173                 size_t q;
    -00174                 size_t p;
    -00175                 
    -00176                 memcpy(&q,&s1,sizeof(size_t));
    -00177                 memcpy(&p,&s2,sizeof(size_t));
    -00178                 
    -00179                 return (q == p);
    -00180         }
    +00115 
    +00116 extern user_hash clientlist;
    +00117 extern chan_hash chanlist;
    +00118 extern whowas_hash whowas;
    +00119 extern command_table cmdlist;
    +00120 extern file_cache MOTD;
    +00121 extern file_cache RULES;
    +00122 extern address_cache IP;
    +00123 
    +00124 
    +00125 // class type for holding an extended mode character - internal to core
    +00126 
    +00127 class ExtMode : public classbase
    +00128 {
    +00129 public:
    +00130         char modechar;
    +00131         int type;
    +00132         int params_when_on;
    +00133         int params_when_off;
    +00134         bool needsoper;
    +00135         bool list;
    +00136         ExtMode(char mc, int ty, bool oper, int p_on, int p_off) : modechar(mc), type(ty), needsoper(oper), params_when_on(p_on), params_when_off(p_off) { };
    +00137 };                                     
    +00138 
    +00139 typedef std::vector<ExtMode> ExtModeList;
    +00140 typedef ExtModeList::iterator ExtModeListIter;
    +00141 
    +00142 
    +00143 ExtModeList EMode;
    +00144 
    +00145 // returns true if an extended mode character is in use
    +00146 bool ModeDefined(char modechar, int type)
    +00147 {
    +00148         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    +00149         {
    +00150                 if ((i->modechar == modechar) && (i->type == type))
    +00151                 {
    +00152                         return true;
    +00153                 }
    +00154         }
    +00155         return false;
    +00156 }
    +00157 
    +00158 bool ModeIsListMode(char modechar, int type)
    +00159 {
    +00160         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    +00161         {
    +00162                 if ((i->modechar == modechar) && (i->type == type) && (i->list == true))
    +00163                 {
    +00164                         return true;
    +00165                 }
    +00166         }
    +00167         return false;
    +00168 }
    +00169 
    +00170 bool ModeDefinedOper(char modechar, int type)
    +00171 {
    +00172         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    +00173         {
    +00174                 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true))
    +00175                 {
    +00176                         return true;
    +00177                 }
    +00178         }
    +00179         return false;
    +00180 }
     00181 
    -00182 };
    -00183 
    -00184 
    -00185 typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, StrHashComp> user_hash;
    -00186 typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, StrHashComp> chan_hash;
    -00187 typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, InAddr_HashComp> address_cache;
    -00188 typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, StrHashComp> whowas_hash;
    -00189 typedef std::deque<command_t> command_table;
    -00190 
    -00191 
    -00192 extern user_hash clientlist;
    -00193 extern chan_hash chanlist;
    -00194 extern whowas_hash whowas;
    -00195 extern command_table cmdlist;
    -00196 extern file_cache MOTD;
    -00197 extern file_cache RULES;
    -00198 extern address_cache IP;
    -00199 
    -00200 
    -00201 // class type for holding an extended mode character - internal to core
    -00202 
    -00203 class ExtMode : public classbase
    -00204 {
    -00205 public:
    -00206         char modechar;
    -00207         int type;
    -00208         int params_when_on;
    -00209         int params_when_off;
    -00210         bool needsoper;
    -00211         bool list;
    -00212         ExtMode(char mc, int ty, bool oper, int p_on, int p_off) : modechar(mc), type(ty), needsoper(oper), params_when_on(p_on), params_when_off(p_off) { };
    -00213 };                                     
    -00214 
    -00215 typedef std::vector<ExtMode> ExtModeList;
    -00216 typedef ExtModeList::iterator ExtModeListIter;
    +00182 // returns number of parameters for a custom mode when it is switched on
    +00183 int ModeDefinedOn(char modechar, int type)
    +00184 {
    +00185         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    +00186         {
    +00187                 if ((i->modechar == modechar) && (i->type == type))
    +00188                 {
    +00189                         return i->params_when_on;
    +00190                 }
    +00191         }
    +00192         return 0;
    +00193 }
    +00194 
    +00195 // returns number of parameters for a custom mode when it is switched on
    +00196 int ModeDefinedOff(char modechar, int type)
    +00197 {
    +00198         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    +00199         {
    +00200                 if ((i->modechar == modechar) && (i->type == type))
    +00201                 {
    +00202                         return i->params_when_off;
    +00203                 }
    +00204         }
    +00205         return 0;
    +00206 }
    +00207 
    +00208 // returns true if an extended mode character is in use
    +00209 bool DoAddExtendedMode(char modechar, int type, bool requires_oper, int params_on, int params_off)
    +00210 {
    +00211         if (ModeDefined(modechar,type)) {
    +00212                 return false;
    +00213         }
    +00214         EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off));
    +00215         return true;
    +00216 }
     00217 
    -00218 
    -00219 ExtModeList EMode;
    -00220 
    -00221 // returns true if an extended mode character is in use
    -00222 bool ModeDefined(char modechar, int type)
    -00223 {
    -00224         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    -00225         {
    -00226                 if ((i->modechar == modechar) && (i->type == type))
    -00227                 {
    -00228                         return true;
    -00229                 }
    -00230         }
    -00231         return false;
    -00232 }
    +00218 // turns a mode into a listmode
    +00219 void ModeMakeList(char modechar)
    +00220 {
    +00221         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    +00222         {
    +00223                 if ((i->modechar == modechar) && (i->type == MT_CHANNEL))
    +00224                 {
    +00225                         i->list = true;
    +00226                         return;
    +00227                 }
    +00228         }
    +00229         return;
    +00230 }
    +00231 
    +00232 // version is a simple class for holding a modules version number
     00233 
    -00234 bool ModeIsListMode(char modechar, int type)
    -00235 {
    -00236         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    -00237         {
    -00238                 if ((i->modechar == modechar) && (i->type == type) && (i->list == true))
    -00239                 {
    -00240                         return true;
    -00241                 }
    -00242         }
    -00243         return false;
    -00244 }
    -00245 
    -00246 bool ModeDefinedOper(char modechar, int type)
    -00247 {
    -00248         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    -00249         {
    -00250                 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true))
    -00251                 {
    -00252                         return true;
    -00253                 }
    -00254         }
    -00255         return false;
    -00256 }
    -00257 
    -00258 // returns number of parameters for a custom mode when it is switched on
    -00259 int ModeDefinedOn(char modechar, int type)
    -00260 {
    -00261         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    -00262         {
    -00263                 if ((i->modechar == modechar) && (i->type == type))
    -00264                 {
    -00265                         return i->params_when_on;
    -00266                 }
    -00267         }
    -00268         return 0;
    -00269 }
    +00234 Version::Version(int major, int minor, int revision, int build, int flags) : Major(major), Minor(minor), Revision(revision), Build(build), Flags(flags) { };
    +00235 
    +00236 // admin is a simple class for holding a server's administrative info
    +00237 
    +00238 Admin::Admin(std::string name, std::string email, std::string nick) : Name(name), Email(email), Nick(nick) { };
    +00239 
    +00240 Request::Request(char* anydata, Module* src, Module* dst) : data(anydata), source(src), dest(dst) { };
    +00241 
    +00242 char* Request::GetData()
    +00243 {
    +00244         return this->data;
    +00245 }
    +00246 
    +00247 Module* Request::GetSource()
    +00248 {
    +00249         return this->source;
    +00250 }
    +00251 
    +00252 Module* Request::GetDest()
    +00253 {
    +00254         return this->dest;
    +00255 }
    +00256 
    +00257 char* Request::Send()
    +00258 {
    +00259         if (this->dest)
    +00260         {
    +00261                 return dest->OnRequest(this);
    +00262         }
    +00263         else
    +00264         {
    +00265                 return NULL;
    +00266         }
    +00267 }
    +00268 
    +00269 Event::Event(char* anydata, Module* src, std::string eventid) : data(anydata), source(src), id(eventid) { };
     00270 
    -00271 // returns number of parameters for a custom mode when it is switched on
    -00272 int ModeDefinedOff(char modechar, int type)
    -00273 {
    -00274         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    -00275         {
    -00276                 if ((i->modechar == modechar) && (i->type == type))
    -00277                 {
    -00278                         return i->params_when_off;
    -00279                 }
    -00280         }
    -00281         return 0;
    -00282 }
    -00283 
    -00284 // returns true if an extended mode character is in use
    -00285 bool DoAddExtendedMode(char modechar, int type, bool requires_oper, int params_on, int params_off)
    -00286 {
    -00287         if (ModeDefined(modechar,type)) {
    -00288                 return false;
    -00289         }
    -00290         EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off));
    -00291         return true;
    -00292 }
    -00293 
    -00294 // turns a mode into a listmode
    -00295 void ModeMakeList(char modechar)
    -00296 {
    -00297         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    -00298         {
    -00299                 if ((i->modechar == modechar) && (i->type == MT_CHANNEL))
    -00300                 {
    -00301                         i->list = true;
    -00302                         return;
    -00303                 }
    -00304         }
    -00305         return;
    -00306 }
    -00307 
    -00308 // version is a simple class for holding a modules version number
    -00309 
    -00310 Version::Version(int major, int minor, int revision, int build, int flags) : Major(major), Minor(minor), Revision(revision), Build(build), Flags(flags) { };
    -00311 
    -00312 // admin is a simple class for holding a server's administrative info
    -00313 
    -00314 Admin::Admin(std::string name, std::string email, std::string nick) : Name(name), Email(email), Nick(nick) { };
    -00315 
    -00316 Request::Request(char* anydata, Module* src, Module* dst) : data(anydata), source(src), dest(dst) { };
    -00317 
    -00318 char* Request::GetData()
    -00319 {
    -00320         return this->data;
    -00321 }
    -00322 
    -00323 Module* Request::GetSource()
    -00324 {
    -00325         return this->source;
    -00326 }
    -00327 
    -00328 Module* Request::GetDest()
    -00329 {
    -00330         return this->dest;
    -00331 }
    -00332 
    -00333 char* Request::Send()
    -00334 {
    -00335         if (this->dest)
    -00336         {
    -00337                 return dest->OnRequest(this);
    -00338         }
    -00339         else
    -00340         {
    -00341                 return NULL;
    -00342         }
    -00343 }
    -00344 
    -00345 Event::Event(char* anydata, Module* src, std::string eventid) : data(anydata), source(src), id(eventid) { };
    -00346 
    -00347 char* Event::GetData()
    -00348 {
    -00349         return this->data;
    -00350 }
    -00351 
    -00352 Module* Event::GetSource()
    -00353 {
    -00354         return this->source;
    -00355 }
    -00356 
    -00357 char* Event::Send()
    -00358 {
    -00359         FOREACH_MOD OnEvent(this);
    -00360         return NULL;
    +00271 char* Event::GetData()
    +00272 {
    +00273         return this->data;
    +00274 }
    +00275 
    +00276 Module* Event::GetSource()
    +00277 {
    +00278         return this->source;
    +00279 }
    +00280 
    +00281 char* Event::Send()
    +00282 {
    +00283         FOREACH_MOD OnEvent(this);
    +00284         return NULL;
    +00285 }
    +00286 
    +00287 std::string Event::GetEventID()
    +00288 {
    +00289         return this->id;
    +00290 }
    +00291 
    +00292 
    +00293 // These declarations define the behavours of the base class Module (which does nothing at all)
    +00294                 Module::Module() { }
    +00295                 Module::~Module() { }
    +00296 void            Module::OnUserConnect(userrec* user) { }
    +00297 void            Module::OnUserQuit(userrec* user) { }
    +00298 void            Module::OnUserDisconnect(userrec* user) { }
    +00299 void            Module::OnUserJoin(userrec* user, chanrec* channel) { }
    +00300 void            Module::OnUserPart(userrec* user, chanrec* channel) { }
    +00301 void            Module::OnPacketTransmit(std::string &data, std::string serv) { }
    +00302 void            Module::OnPacketReceive(std::string &data, std::string serv) { }
    +00303 void            Module::OnRehash() { }
    +00304 void            Module::OnServerRaw(std::string &raw, bool inbound, userrec* user) { }
    +00305 int             Module::OnUserPreJoin(userrec* user, chanrec* chan, const char* cname) { return 0; }
    +00306 int             Module::OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params) { return false; }
    +00307 Version         Module::GetVersion() { return Version(1,0,0,0,VF_VENDOR); }
    +00308 void            Module::OnOper(userrec* user) { };
    +00309 void            Module::OnInfo(userrec* user) { };
    +00310 void            Module::OnWhois(userrec* source, userrec* dest) { };
    +00311 int             Module::OnUserPreInvite(userrec* source,userrec* dest,chanrec* channel) { return 0; };
    +00312 int             Module::OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text) { return 0; };
    +00313 int             Module::OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text) { return 0; };
    +00314 int             Module::OnUserPreNick(userrec* user, std::string newnick) { return 0; };
    +00315 void            Module::OnUserPostNick(userrec* user, std::string oldnick) { };
    +00316 int             Module::OnAccessCheck(userrec* source,userrec* dest,chanrec* channel,int access_type) { return ACR_DEFAULT; };
    +00317 string_list     Module::OnUserSync(userrec* user) { string_list empty; return empty; }
    +00318 string_list     Module::OnChannelSync(chanrec* chan) { string_list empty; return empty; }
    +00319 void            Module::On005Numeric(std::string &output) { };
    +00320 int             Module::OnKill(userrec* source, userrec* dest, std::string reason) { return 0; };
    +00321 void            Module::OnLoadModule(Module* mod,std::string name) { };
    +00322 void            Module::OnBackgroundTimer(time_t curtime) { };
    +00323 void            Module::OnSendList(userrec* user, chanrec* channel, char mode) { };
    +00324 int             Module::OnPreCommand(std::string command, char **parameters, int pcnt, userrec *user) { return 0; };
    +00325 bool            Module::OnCheckReady(userrec* user) { return true; };
    +00326 void            Module::OnUserRegister(userrec* user) { };
    +00327 int             Module::OnUserPreKick(userrec* source, userrec* user, chanrec* chan, std::string reason) { return 0; };
    +00328 void            Module::OnUserKick(userrec* source, userrec* user, chanrec* chan, std::string reason) { };
    +00329 int             Module::OnRawMode(userrec* user, chanrec* chan, char mode, std::string param, bool adding, int pcnt) { return 0; };
    +00330 int             Module::OnCheckInvite(userrec* user, chanrec* chan) { return 0; };
    +00331 int             Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven) { return 0; };
    +00332 int             Module::OnCheckLimit(userrec* user, chanrec* chan) { return 0; };
    +00333 int             Module::OnCheckBan(userrec* user, chanrec* chan) { return 0; };
    +00334 void            Module::OnStats(char symbol) { };
    +00335 int             Module::OnChangeLocalUserHost(userrec* user, std::string newhost) { return 0; };
    +00336 int             Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost) { return 0; };
    +00337 int             Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic) { return 0; };
    +00338 int             Module::OnMeshToken(char token,string_list params,serverrec* source,serverrec* reply, std::string tcp_host,std::string ipaddr,int port) { return 0; };
    +00339 void            Module::OnEvent(Event* event) { return; };
    +00340 char*           Module::OnRequest(Request* request) { return NULL; };
    +00341 int             Module::OnOperCompare(std::string password, std::string input) { return 0; };
    +00342 void            Module::OnGlobalOper(userrec* user) { };
    +00343 void            Module::OnGlobalConnect(userrec* user) { };
    +00344 int             Module::OnAddBan(userrec* source, chanrec* channel,std::string banmask) { return 0; };
    +00345 int             Module::OnDelBan(userrec* source, chanrec* channel,std::string banmask) { return 0; };
    +00346 void            Module::OnRawSocketAccept(int fd, std::string ip, int localport) { };
    +00347 int             Module::OnRawSocketWrite(int fd, char* buffer, int count) { return 0; };
    +00348 void            Module::OnRawSocketClose(int fd) { };
    +00349 int             Module::OnRawSocketRead(int fd, char* buffer, unsigned int count, int &readresult) { return 0; };
    +00350 
    +00351 // server is a wrapper class that provides methods to all of the C-style
    +00352 // exports in the core
    +00353 //
    +00354 
    +00355 Server::Server()
    +00356 {
    +00357 }
    +00358 
    +00359 Server::~Server()
    +00360 {
     00361 }
     00362 
    -00363 std::string Event::GetEventID()
    +00363 void Server::SendOpers(std::string s)
     00364 {
    -00365         return this->id;
    +00365         WriteOpers("%s",s.c_str());
     00366 }
     00367 
    -00368 
    -00369 // These declarations define the behavours of the base class Module (which does nothing at all)
    -00370                 Module::Module() { }
    -00371                 Module::~Module() { }
    -00372 void            Module::OnUserConnect(userrec* user) { }
    -00373 void            Module::OnUserQuit(userrec* user) { }
    -00374 void            Module::OnUserDisconnect(userrec* user) { }
    -00375 void            Module::OnUserJoin(userrec* user, chanrec* channel) { }
    -00376 void            Module::OnUserPart(userrec* user, chanrec* channel) { }
    -00377 void            Module::OnPacketTransmit(std::string &data, std::string serv) { }
    -00378 void            Module::OnPacketReceive(std::string &data, std::string serv) { }
    -00379 void            Module::OnRehash() { }
    -00380 void            Module::OnServerRaw(std::string &raw, bool inbound, userrec* user) { }
    -00381 int             Module::OnUserPreJoin(userrec* user, chanrec* chan, const char* cname) { return 0; }
    -00382 int             Module::OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params) { return false; }
    -00383 Version         Module::GetVersion() { return Version(1,0,0,0,VF_VENDOR); }
    -00384 void            Module::OnOper(userrec* user) { };
    -00385 void            Module::OnInfo(userrec* user) { };
    -00386 void            Module::OnWhois(userrec* source, userrec* dest) { };
    -00387 int             Module::OnUserPreInvite(userrec* source,userrec* dest,chanrec* channel) { return 0; };
    -00388 int             Module::OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text) { return 0; };
    -00389 int             Module::OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text) { return 0; };
    -00390 int             Module::OnUserPreNick(userrec* user, std::string newnick) { return 0; };
    -00391 void            Module::OnUserPostNick(userrec* user, std::string oldnick) { };
    -00392 int             Module::OnAccessCheck(userrec* source,userrec* dest,chanrec* channel,int access_type) { return ACR_DEFAULT; };
    -00393 string_list     Module::OnUserSync(userrec* user) { string_list empty; return empty; }
    -00394 string_list     Module::OnChannelSync(chanrec* chan) { string_list empty; return empty; }
    -00395 void            Module::On005Numeric(std::string &output) { };
    -00396 int             Module::OnKill(userrec* source, userrec* dest, std::string reason) { return 0; };
    -00397 void            Module::OnLoadModule(Module* mod,std::string name) { };
    -00398 void            Module::OnBackgroundTimer(time_t curtime) { };
    -00399 void            Module::OnSendList(userrec* user, chanrec* channel, char mode) { };
    -00400 int             Module::OnPreCommand(std::string command, char **parameters, int pcnt, userrec *user) { return 0; };
    -00401 bool            Module::OnCheckReady(userrec* user) { return true; };
    -00402 void            Module::OnUserRegister(userrec* user) { };
    -00403 int             Module::OnUserPreKick(userrec* source, userrec* user, chanrec* chan, std::string reason) { return 0; };
    -00404 void            Module::OnUserKick(userrec* source, userrec* user, chanrec* chan, std::string reason) { };
    -00405 int             Module::OnRawMode(userrec* user, chanrec* chan, char mode, std::string param, bool adding, int pcnt) { return 0; };
    -00406 int             Module::OnCheckInvite(userrec* user, chanrec* chan) { return 0; };
    -00407 int             Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven) { return 0; };
    -00408 int             Module::OnCheckLimit(userrec* user, chanrec* chan) { return 0; };
    -00409 int             Module::OnCheckBan(userrec* user, chanrec* chan) { return 0; };
    -00410 void            Module::OnStats(char symbol) { };
    -00411 int             Module::OnChangeLocalUserHost(userrec* user, std::string newhost) { return 0; };
    -00412 int             Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost) { return 0; };
    -00413 int             Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic) { return 0; };
    -00414 int             Module::OnMeshToken(char token,string_list params,serverrec* source,serverrec* reply, std::string tcp_host,std::string ipaddr,int port) { return 0; };
    -00415 void            Module::OnEvent(Event* event) { return; };
    -00416 char*           Module::OnRequest(Request* request) { return NULL; };
    -00417 int             Module::OnOperCompare(std::string password, std::string input) { return 0; };
    -00418 void            Module::OnGlobalOper(userrec* user) { };
    -00419 void            Module::OnGlobalConnect(userrec* user) { };
    -00420 int             Module::OnAddBan(userrec* source, chanrec* channel,std::string banmask) { return 0; };
    -00421 int             Module::OnDelBan(userrec* source, chanrec* channel,std::string banmask) { return 0; };
    -00422 void            Module::OnRawSocketAccept(int fd, std::string ip, int localport) { };
    -00423 int             Module::OnRawSocketWrite(int fd, char* buffer, int count) { return 0; };
    -00424 void            Module::OnRawSocketClose(int fd) { };
    -00425 int             Module::OnRawSocketRead(int fd, char* buffer, unsigned int count, int &readresult) { return 0; };
    -00426 
    -00427 // server is a wrapper class that provides methods to all of the C-style
    -00428 // exports in the core
    -00429 //
    -00430 
    -00431 Server::Server()
    -00432 {
    -00433 }
    -00434 
    -00435 Server::~Server()
    -00436 {
    -00437 }
    -00438 
    -00439 void Server::SendOpers(std::string s)
    -00440 {
    -00441         WriteOpers("%s",s.c_str());
    -00442 }
    -00443 
    -00444 bool Server::MatchText(std::string sliteral, std::string spattern)
    -00445 {
    -00446         char literal[MAXBUF],pattern[MAXBUF];
    -00447         strlcpy(literal,sliteral.c_str(),MAXBUF);
    -00448         strlcpy(pattern,spattern.c_str(),MAXBUF);
    -00449         return match(literal,pattern);
    -00450 }
    -00451 
    -00452 void Server::SendToModeMask(std::string modes, int flags, std::string text)
    -00453 {
    -00454         WriteMode(modes.c_str(),flags,"%s",text.c_str());
    -00455 }
    -00456 
    -00457 chanrec* Server::JoinUserToChannel(userrec* user, std::string cname, std::string key)
    -00458 {
    -00459         return add_channel(user,cname.c_str(),key.c_str(),false);
    -00460 }
    -00461 
    -00462 chanrec* Server::PartUserFromChannel(userrec* user, std::string cname, std::string reason)
    -00463 {
    -00464         return del_channel(user,cname.c_str(),reason.c_str(),false);
    +00368 bool Server::MatchText(std::string sliteral, std::string spattern)
    +00369 {
    +00370         char literal[MAXBUF],pattern[MAXBUF];
    +00371         strlcpy(literal,sliteral.c_str(),MAXBUF);
    +00372         strlcpy(pattern,spattern.c_str(),MAXBUF);
    +00373         return match(literal,pattern);
    +00374 }
    +00375 
    +00376 void Server::SendToModeMask(std::string modes, int flags, std::string text)
    +00377 {
    +00378         WriteMode(modes.c_str(),flags,"%s",text.c_str());
    +00379 }
    +00380 
    +00381 chanrec* Server::JoinUserToChannel(userrec* user, std::string cname, std::string key)
    +00382 {
    +00383         return add_channel(user,cname.c_str(),key.c_str(),false);
    +00384 }
    +00385 
    +00386 chanrec* Server::PartUserFromChannel(userrec* user, std::string cname, std::string reason)
    +00387 {
    +00388         return del_channel(user,cname.c_str(),reason.c_str(),false);
    +00389 }
    +00390 
    +00391 chanuserlist Server::GetUsers(chanrec* chan)
    +00392 {
    +00393         chanuserlist userl;
    +00394         userl.clear();
    +00395         std::vector<char*> *list = chan->GetUsers();
    +00396         for (std::vector<char*>::iterator i = list->begin(); i != list->end(); i++)
    +00397         {
    +00398                 char* o = *i;
    +00399                 userl.push_back((userrec*)o);
    +00400         }
    +00401         return userl;
    +00402 }
    +00403 void Server::ChangeUserNick(userrec* user, std::string nickname)
    +00404 {
    +00405         force_nickchange(user,nickname.c_str());
    +00406 }
    +00407 
    +00408 void Server::QuitUser(userrec* user, std::string reason)
    +00409 {
    +00410         kill_link(user,reason.c_str());
    +00411 }
    +00412 
    +00413 bool Server::IsUlined(std::string server)
    +00414 {
    +00415         return is_uline(server.c_str());
    +00416 }
    +00417 
    +00418 void Server::CallCommandHandler(std::string commandname, char** parameters, int pcnt, userrec* user)
    +00419 {
    +00420         call_handler(commandname.c_str(),parameters,pcnt,user);
    +00421 }
    +00422 
    +00423 void Server::Log(int level, std::string s)
    +00424 {
    +00425         log(level,"%s",s.c_str());
    +00426 }
    +00427 
    +00428 void Server::AddCommand(char* cmd, handlerfunc f, char flags, int minparams, char* source)
    +00429 {
    +00430         createcommand(cmd,f,flags,minparams,source);
    +00431 }
    +00432 
    +00433 void Server::SendMode(char **parameters, int pcnt, userrec *user)
    +00434 {
    +00435         server_mode(parameters,pcnt,user);
    +00436 }
    +00437 
    +00438 void Server::Send(int Socket, std::string s)
    +00439 {
    +00440         Write(Socket,"%s",s.c_str());
    +00441 }
    +00442 
    +00443 void Server::SendServ(int Socket, std::string s)
    +00444 {
    +00445         WriteServ(Socket,"%s",s.c_str());
    +00446 }
    +00447 
    +00448 void Server::SendFrom(int Socket, userrec* User, std::string s)
    +00449 {
    +00450         WriteFrom(Socket,User,"%s",s.c_str());
    +00451 }
    +00452 
    +00453 void Server::SendTo(userrec* Source, userrec* Dest, std::string s)
    +00454 {
    +00455         if (!Source)
    +00456         {
    +00457                 // if source is NULL, then the message originates from the local server
    +00458                 Write(Dest->fd,":%s %s",this->GetServerName().c_str(),s.c_str());
    +00459         }
    +00460         else
    +00461         {
    +00462                 // otherwise it comes from the user specified
    +00463                 WriteTo(Source,Dest,"%s",s.c_str());
    +00464         }
     00465 }
     00466 
    -00467 chanuserlist Server::GetUsers(chanrec* chan)
    +00467 void Server::SendChannelServerNotice(std::string ServName, chanrec* Channel, std::string text)
     00468 {
    -00469         chanuserlist userl;
    -00470         userl.clear();
    -00471         std::vector<char*> *list = chan->GetUsers();
    -00472         for (std::vector<char*>::iterator i = list->begin(); i != list->end(); i++)
    -00473         {
    -00474                 char* o = *i;
    -00475                 userl.push_back((userrec*)o);
    -00476         }
    -00477         return userl;
    -00478 }
    -00479 void Server::ChangeUserNick(userrec* user, std::string nickname)
    -00480 {
    -00481         force_nickchange(user,nickname.c_str());
    +00469         WriteChannelWithServ((char*)ServName.c_str(), Channel, "%s", text.c_str());
    +00470 }
    +00471 
    +00472 void Server::SendChannel(userrec* User, chanrec* Channel, std::string s,bool IncludeSender)
    +00473 {
    +00474         if (IncludeSender)
    +00475         {
    +00476                 WriteChannel(Channel,User,"%s",s.c_str());
    +00477         }
    +00478         else
    +00479         {
    +00480                 ChanExceptSender(Channel,User,"%s",s.c_str());
    +00481         }
     00482 }
     00483 
    -00484 void Server::QuitUser(userrec* user, std::string reason)
    +00484 bool Server::CommonChannels(userrec* u1, userrec* u2)
     00485 {
    -00486         kill_link(user,reason.c_str());
    +00486         return (common_channels(u1,u2) != 0);
     00487 }
     00488 
    -00489 bool Server::IsUlined(std::string server)
    +00489 void Server::SendCommon(userrec* User, std::string text,bool IncludeSender)
     00490 {
    -00491         return is_uline(server.c_str());
    -00492 }
    -00493 
    -00494 void Server::CallCommandHandler(std::string commandname, char** parameters, int pcnt, userrec* user)
    -00495 {
    -00496         call_handler(commandname.c_str(),parameters,pcnt,user);
    -00497 }
    -00498 
    -00499 void Server::Log(int level, std::string s)
    -00500 {
    -00501         log(level,"%s",s.c_str());
    -00502 }
    -00503 
    -00504 void Server::AddCommand(char* cmd, handlerfunc f, char flags, int minparams, char* source)
    -00505 {
    -00506         createcommand(cmd,f,flags,minparams,source);
    -00507 }
    -00508 
    -00509 void Server::SendMode(char **parameters, int pcnt, userrec *user)
    -00510 {
    -00511         server_mode(parameters,pcnt,user);
    -00512 }
    -00513 
    -00514 void Server::Send(int Socket, std::string s)
    -00515 {
    -00516         Write(Socket,"%s",s.c_str());
    -00517 }
    -00518 
    -00519 void Server::SendServ(int Socket, std::string s)
    -00520 {
    -00521         WriteServ(Socket,"%s",s.c_str());
    -00522 }
    -00523 
    -00524 void Server::SendFrom(int Socket, userrec* User, std::string s)
    -00525 {
    -00526         WriteFrom(Socket,User,"%s",s.c_str());
    -00527 }
    -00528 
    -00529 void Server::SendTo(userrec* Source, userrec* Dest, std::string s)
    -00530 {
    -00531         if (!Source)
    -00532         {
    -00533                 // if source is NULL, then the message originates from the local server
    -00534                 Write(Dest->fd,":%s %s",this->GetServerName().c_str(),s.c_str());
    -00535         }
    -00536         else
    -00537         {
    -00538                 // otherwise it comes from the user specified
    -00539                 WriteTo(Source,Dest,"%s",s.c_str());
    -00540         }
    -00541 }
    -00542 
    -00543 void Server::SendChannelServerNotice(std::string ServName, chanrec* Channel, std::string text)
    -00544 {
    -00545         WriteChannelWithServ((char*)ServName.c_str(), Channel, "%s", text.c_str());
    -00546 }
    -00547 
    -00548 void Server::SendChannel(userrec* User, chanrec* Channel, std::string s,bool IncludeSender)
    -00549 {
    -00550         if (IncludeSender)
    -00551         {
    -00552                 WriteChannel(Channel,User,"%s",s.c_str());
    -00553         }
    -00554         else
    -00555         {
    -00556                 ChanExceptSender(Channel,User,"%s",s.c_str());
    -00557         }
    -00558 }
    -00559 
    -00560 bool Server::CommonChannels(userrec* u1, userrec* u2)
    -00561 {
    -00562         return (common_channels(u1,u2) != 0);
    -00563 }
    -00564 
    -00565 void Server::SendCommon(userrec* User, std::string text,bool IncludeSender)
    -00566 {
    -00567         if (IncludeSender)
    -00568         {
    -00569                 WriteCommon(User,"%s",text.c_str());
    -00570         }
    -00571         else
    -00572         {
    -00573                 WriteCommonExcept(User,"%s",text.c_str());
    -00574         }
    -00575 }
    -00576 
    -00577 void Server::SendWallops(userrec* User, std::string text)
    -00578 {
    -00579         WriteWallOps(User,false,"%s",text.c_str());
    -00580 }
    -00581 
    -00582 void Server::ChangeHost(userrec* user, std::string host)
    -00583 {
    -00584         ChangeDisplayedHost(user,host.c_str());
    -00585 }
    -00586 
    -00587 void Server::ChangeGECOS(userrec* user, std::string gecos)
    -00588 {
    -00589         ChangeName(user,gecos.c_str());
    -00590 }
    -00591 
    -00592 bool Server::IsNick(std::string nick)
    -00593 {
    -00594         return (isnick(nick.c_str()) != 0);
    -00595 }
    -00596 
    -00597 userrec* Server::FindNick(std::string nick)
    -00598 {
    -00599         return Find(nick);
    -00600 }
    -00601 
    -00602 userrec* Server::FindDescriptor(int socket)
    -00603 {
    -00604         return (socket < 65536 ? fd_ref_table[socket] : NULL);
    -00605 }
    -00606 
    -00607 chanrec* Server::FindChannel(std::string channel)
    -00608 {
    -00609         return FindChan(channel.c_str());
    -00610 }
    -00611 
    -00612 std::string Server::ChanMode(userrec* User, chanrec* Chan)
    -00613 {
    -00614         return cmode(User,Chan);
    -00615 }
    -00616 
    -00617 bool Server::IsOnChannel(userrec* User, chanrec* Chan)
    -00618 {
    -00619         return has_channel(User,Chan);
    -00620 }
    -00621 
    -00622 std::string Server::GetServerName()
    -00623 {
    -00624         return getservername();
    -00625 }
    -00626 
    -00627 std::string Server::GetNetworkName()
    -00628 {
    -00629         return getnetworkname();
    -00630 }
    -00631 
    -00632 Admin Server::GetAdmin()
    -00633 {
    -00634         return Admin(getadminname(),getadminemail(),getadminnick());
    -00635 }
    -00636 
    -00637 
    -00638 
    -00639 bool Server::AddExtendedMode(char modechar, int type, bool requires_oper, int params_when_on, int params_when_off)
    -00640 {
    -00641         if (((modechar >= 'A') && (modechar <= 'Z')) || ((modechar >= 'a') && (modechar <= 'z')))
    -00642         {
    -00643                 if (type == MT_SERVER)
    -00644                 {
    -00645                         log(DEBUG,"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion");
    -00646                         return false;
    -00647                 }
    -00648                 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT))
    -00649                 {
    -00650                         log(DEBUG,"*** API ERROR *** Parameters on MT_CLIENT modes are not supported");
    -00651                         return false;
    -00652                 }
    -00653                 if ((params_when_on>1) || (params_when_off>1))
    -00654                 {
    -00655                         log(DEBUG,"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported");
    -00656                         return false;
    -00657                 }
    -00658                 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off);
    -00659         }
    -00660         else
    -00661         {
    -00662                 log(DEBUG,"*** API ERROR *** Muppet modechar detected.");
    -00663         }
    -00664         return false;
    -00665 }
    -00666 
    -00667 bool Server::AddExtendedListMode(char modechar)
    -00668 {
    -00669         bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1);
    -00670         if (res)
    -00671                 ModeMakeList(modechar);
    -00672         return res;
    -00673 }
    -00674 
    -00675 int Server::CountUsers(chanrec* c)
    -00676 {
    -00677         return usercount(c);
    -00678 }
    -00679 
    -00680 
    -00681 bool Server::UserToPseudo(userrec* user,std::string message)
    -00682 {
    -00683         unsigned int old_fd = user->fd;
    -00684         user->fd = FD_MAGIC_NUMBER;
    -00685         user->ClearBuffer();
    -00686         Write(old_fd,"ERROR :Closing link (%s@%s) [%s]",user->ident,user->host,message.c_str());
    -00687 #ifdef USE_KQUEUE
    -00688         struct kevent ke;
    -00689         EV_SET(&ke, old_fd, EVFILT_READ, EV_DELETE, 0, 0, NULL);
    -00690         int i = kevent(kq, &ke, 1, 0, 0, NULL);
    -00691         if (i == -1)
    -00692         {
    -00693                 log(DEBUG,"kqueue: Failed to remove user from queue!");
    -00694         }
    -00695 #endif
    -00696         shutdown(old_fd,2);
    -00697         close(old_fd);
    -00698 }
    -00699 
    -00700 bool Server::PseudoToUser(userrec* alive,userrec* zombie,std::string message)
    -00701 {
    -00702         zombie->fd = alive->fd;
    -00703         alive->fd = FD_MAGIC_NUMBER;
    -00704         alive->ClearBuffer();
    -00705         Write(zombie->fd,":%s!%s@%s NICK %s",alive->nick,alive->ident,alive->host,zombie->nick);
    -00706         kill_link(alive,message.c_str());
    -00707         fd_ref_table[zombie->fd] = zombie;
    -00708         for (int i = 0; i != MAXCHANS; i++)
    -00709         {
    -00710                 if (zombie->chans[i].channel != NULL)
    -00711                 {
    -00712                         if (zombie->chans[i].channel->name)
    -00713                         {
    -00714                                 chanrec* Ptr = zombie->chans[i].channel;
    -00715                                 WriteFrom(zombie->fd,zombie,"JOIN %s",Ptr->name);
    -00716                                 if (Ptr->topicset)
    -00717                                 {
    -00718                                         WriteServ(zombie->fd,"332 %s %s :%s", zombie->nick, Ptr->name, Ptr->topic);
    -00719                                         WriteServ(zombie->fd,"333 %s %s %s %d", zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset);
    -00720                                 }
    -00721                                 userlist(zombie,Ptr);
    -00722                                 WriteServ(zombie->fd,"366 %s %s :End of /NAMES list.", zombie->nick, Ptr->name);
    -00723 
    -00724                         }
    -00725                 }
    -00726         }
    -00727 
    -00728 }
    -00729 
    -00730 void Server::AddGLine(long duration, std::string source, std::string reason, std::string hostmask)
    -00731 {
    -00732         add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
    -00733 }
    -00734 
    -00735 void Server::AddQLine(long duration, std::string source, std::string reason, std::string nickname)
    -00736 {
    -00737         add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str());
    -00738 }
    +00491         if (IncludeSender)
    +00492         {
    +00493                 WriteCommon(User,"%s",text.c_str());
    +00494         }
    +00495         else
    +00496         {
    +00497                 WriteCommonExcept(User,"%s",text.c_str());
    +00498         }
    +00499 }
    +00500 
    +00501 void Server::SendWallops(userrec* User, std::string text)
    +00502 {
    +00503         WriteWallOps(User,false,"%s",text.c_str());
    +00504 }
    +00505 
    +00506 void Server::ChangeHost(userrec* user, std::string host)
    +00507 {
    +00508         ChangeDisplayedHost(user,host.c_str());
    +00509 }
    +00510 
    +00511 void Server::ChangeGECOS(userrec* user, std::string gecos)
    +00512 {
    +00513         ChangeName(user,gecos.c_str());
    +00514 }
    +00515 
    +00516 bool Server::IsNick(std::string nick)
    +00517 {
    +00518         return (isnick(nick.c_str()) != 0);
    +00519 }
    +00520 
    +00521 userrec* Server::FindNick(std::string nick)
    +00522 {
    +00523         return Find(nick);
    +00524 }
    +00525 
    +00526 userrec* Server::FindDescriptor(int socket)
    +00527 {
    +00528         return (socket < 65536 ? fd_ref_table[socket] : NULL);
    +00529 }
    +00530 
    +00531 chanrec* Server::FindChannel(std::string channel)
    +00532 {
    +00533         return FindChan(channel.c_str());
    +00534 }
    +00535 
    +00536 std::string Server::ChanMode(userrec* User, chanrec* Chan)
    +00537 {
    +00538         return cmode(User,Chan);
    +00539 }
    +00540 
    +00541 bool Server::IsOnChannel(userrec* User, chanrec* Chan)
    +00542 {
    +00543         return has_channel(User,Chan);
    +00544 }
    +00545 
    +00546 std::string Server::GetServerName()
    +00547 {
    +00548         return getservername();
    +00549 }
    +00550 
    +00551 std::string Server::GetNetworkName()
    +00552 {
    +00553         return getnetworkname();
    +00554 }
    +00555 
    +00556 std::string Server::GetServerDescription()
    +00557 {
    +00558         return getserverdesc();
    +00559 }
    +00560 
    +00561 Admin Server::GetAdmin()
    +00562 {
    +00563         return Admin(getadminname(),getadminemail(),getadminnick());
    +00564 }
    +00565 
    +00566 
    +00567 
    +00568 bool Server::AddExtendedMode(char modechar, int type, bool requires_oper, int params_when_on, int params_when_off)
    +00569 {
    +00570         if (((modechar >= 'A') && (modechar <= 'Z')) || ((modechar >= 'a') && (modechar <= 'z')))
    +00571         {
    +00572                 if (type == MT_SERVER)
    +00573                 {
    +00574                         log(DEBUG,"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion");
    +00575                         return false;
    +00576                 }
    +00577                 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT))
    +00578                 {
    +00579                         log(DEBUG,"*** API ERROR *** Parameters on MT_CLIENT modes are not supported");
    +00580                         return false;
    +00581                 }
    +00582                 if ((params_when_on>1) || (params_when_off>1))
    +00583                 {
    +00584                         log(DEBUG,"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported");
    +00585                         return false;
    +00586                 }
    +00587                 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off);
    +00588         }
    +00589         else
    +00590         {
    +00591                 log(DEBUG,"*** API ERROR *** Muppet modechar detected.");
    +00592         }
    +00593         return false;
    +00594 }
    +00595 
    +00596 bool Server::AddExtendedListMode(char modechar)
    +00597 {
    +00598         bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1);
    +00599         if (res)
    +00600                 ModeMakeList(modechar);
    +00601         return res;
    +00602 }
    +00603 
    +00604 int Server::CountUsers(chanrec* c)
    +00605 {
    +00606         return usercount(c);
    +00607 }
    +00608 
    +00609 
    +00610 bool Server::UserToPseudo(userrec* user,std::string message)
    +00611 {
    +00612         unsigned int old_fd = user->fd;
    +00613         user->fd = FD_MAGIC_NUMBER;
    +00614         user->ClearBuffer();
    +00615         Write(old_fd,"ERROR :Closing link (%s@%s) [%s]",user->ident,user->host,message.c_str());
    +00616 #ifdef USE_KQUEUE
    +00617         struct kevent ke;
    +00618         EV_SET(&ke, old_fd, EVFILT_READ, EV_DELETE, 0, 0, NULL);
    +00619         int i = kevent(kq, &ke, 1, 0, 0, NULL);
    +00620         if (i == -1)
    +00621         {
    +00622                 log(DEBUG,"kqueue: Failed to remove user from queue!");
    +00623         }
    +00624 #endif
    +00625         shutdown(old_fd,2);
    +00626         close(old_fd);
    +00627 }
    +00628 
    +00629 bool Server::PseudoToUser(userrec* alive,userrec* zombie,std::string message)
    +00630 {
    +00631         zombie->fd = alive->fd;
    +00632         alive->fd = FD_MAGIC_NUMBER;
    +00633         alive->ClearBuffer();
    +00634         Write(zombie->fd,":%s!%s@%s NICK %s",alive->nick,alive->ident,alive->host,zombie->nick);
    +00635         kill_link(alive,message.c_str());
    +00636         fd_ref_table[zombie->fd] = zombie;
    +00637         for (int i = 0; i != MAXCHANS; i++)
    +00638         {
    +00639                 if (zombie->chans[i].channel != NULL)
    +00640                 {
    +00641                         if (zombie->chans[i].channel->name)
    +00642                         {
    +00643                                 chanrec* Ptr = zombie->chans[i].channel;
    +00644                                 WriteFrom(zombie->fd,zombie,"JOIN %s",Ptr->name);
    +00645                                 if (Ptr->topicset)
    +00646                                 {
    +00647                                         WriteServ(zombie->fd,"332 %s %s :%s", zombie->nick, Ptr->name, Ptr->topic);
    +00648                                         WriteServ(zombie->fd,"333 %s %s %s %d", zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset);
    +00649                                 }
    +00650                                 userlist(zombie,Ptr);
    +00651                                 WriteServ(zombie->fd,"366 %s %s :End of /NAMES list.", zombie->nick, Ptr->name);
    +00652 
    +00653                         }
    +00654                 }
    +00655         }
    +00656 
    +00657 }
    +00658 
    +00659 void Server::AddGLine(long duration, std::string source, std::string reason, std::string hostmask)
    +00660 {
    +00661         add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
    +00662 }
    +00663 
    +00664 void Server::AddQLine(long duration, std::string source, std::string reason, std::string nickname)
    +00665 {
    +00666         add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str());
    +00667 }
    +00668 
    +00669 void Server::AddZLine(long duration, std::string source, std::string reason, std::string ipaddr)
    +00670 {
    +00671         add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str());
    +00672 }
    +00673 
    +00674 void Server::AddKLine(long duration, std::string source, std::string reason, std::string hostmask)
    +00675 {
    +00676         add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
    +00677 }
    +00678 
    +00679 void Server::AddELine(long duration, std::string source, std::string reason, std::string hostmask)
    +00680 {
    +00681         add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
    +00682 }
    +00683 
    +00684 bool Server::DelGLine(std::string hostmask)
    +00685 {
    +00686         del_gline(hostmask.c_str());
    +00687 }
    +00688 
    +00689 bool Server::DelQLine(std::string nickname)
    +00690 {
    +00691         del_qline(nickname.c_str());
    +00692 }
    +00693 
    +00694 bool Server::DelZLine(std::string ipaddr)
    +00695 {
    +00696         del_zline(ipaddr.c_str());
    +00697 }
    +00698 
    +00699 bool Server::DelKLine(std::string hostmask)
    +00700 {
    +00701         del_kline(hostmask.c_str());
    +00702 }
    +00703 
    +00704 bool Server::DelELine(std::string hostmask)
    +00705 {
    +00706         del_eline(hostmask.c_str());
    +00707 }
    +00708 
    +00709 long Server::CalcDuration(std::string delta)
    +00710 {
    +00711         return duration(delta.c_str());
    +00712 }
    +00713 
    +00714 bool Server::IsValidMask(std::string mask)
    +00715 {
    +00716         const char* dest = mask.c_str();
    +00717         if (strchr(dest,'!')==0)
    +00718                 return false;
    +00719         if (strchr(dest,'@')==0)
    +00720                 return false;
    +00721         for (int i = 0; i < strlen(dest); i++)
    +00722                 if (dest[i] < 32)
    +00723                         return false;
    +00724         for (int i = 0; i < strlen(dest); i++)
    +00725                 if (dest[i] > 126)
    +00726                         return false;
    +00727         int c = 0;
    +00728         for (int i = 0; i < strlen(dest); i++)
    +00729                 if (dest[i] == '!')
    +00730                         c++;
    +00731         if (c>1)
    +00732                 return false;
    +00733         c = 0;
    +00734         for (int i = 0; i < strlen(dest); i++)
    +00735                 if (dest[i] == '@')
    +00736                         c++;
    +00737         if (c>1)
    +00738                 return false;
     00739 
    -00740 void Server::AddZLine(long duration, std::string source, std::string reason, std::string ipaddr)
    -00741 {
    -00742         add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str());
    -00743 }
    -00744 
    -00745 void Server::AddKLine(long duration, std::string source, std::string reason, std::string hostmask)
    -00746 {
    -00747         add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
    -00748 }
    -00749 
    -00750 void Server::AddELine(long duration, std::string source, std::string reason, std::string hostmask)
    -00751 {
    -00752         add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
    -00753 }
    -00754 
    -00755 bool Server::DelGLine(std::string hostmask)
    -00756 {
    -00757         del_gline(hostmask.c_str());
    -00758 }
    -00759 
    -00760 bool Server::DelQLine(std::string nickname)
    -00761 {
    -00762         del_qline(nickname.c_str());
    -00763 }
    -00764 
    -00765 bool Server::DelZLine(std::string ipaddr)
    -00766 {
    -00767         del_zline(ipaddr.c_str());
    -00768 }
    -00769 
    -00770 bool Server::DelKLine(std::string hostmask)
    -00771 {
    -00772         del_kline(hostmask.c_str());
    -00773 }
    -00774 
    -00775 bool Server::DelELine(std::string hostmask)
    -00776 {
    -00777         del_eline(hostmask.c_str());
    -00778 }
    -00779 
    -00780 long Server::CalcDuration(std::string delta)
    -00781 {
    -00782         return duration(delta.c_str());
    -00783 }
    -00784 
    -00785 bool Server::IsValidMask(std::string mask)
    -00786 {
    -00787         const char* dest = mask.c_str();
    -00788         if (strchr(dest,'!')==0)
    -00789                 return false;
    -00790         if (strchr(dest,'@')==0)
    -00791                 return false;
    -00792         for (int i = 0; i < strlen(dest); i++)
    -00793                 if (dest[i] < 32)
    -00794                         return false;
    -00795         for (int i = 0; i < strlen(dest); i++)
    -00796                 if (dest[i] > 126)
    -00797                         return false;
    -00798         int c = 0;
    -00799         for (int i = 0; i < strlen(dest); i++)
    -00800                 if (dest[i] == '!')
    -00801                         c++;
    -00802         if (c>1)
    -00803                 return false;
    -00804         c = 0;
    -00805         for (int i = 0; i < strlen(dest); i++)
    -00806                 if (dest[i] == '@')
    -00807                         c++;
    -00808         if (c>1)
    -00809                 return false;
    -00810 
    -00811         return true;
    -00812 }
    -00813 
    -00814 void Server::MeshSendAll(std::string text)
    -00815 {
    -00816         NetSendToAll((char*)text.c_str());
    -00817 }
    -00818 
    -00819 void Server::MeshSendCommon(userrec* user, std::string text)
    -00820 {
    -00821         if (user)
    -00822                 NetSendToCommon(user,(char*)text.c_str());
    -00823 }
    -00824 
    -00825 void Server::MeshSendAllAlive(std::string text)
    -00826 {
    -00827         NetSendToAllAlive((char*)text.c_str());
    -00828 }
    -00829 
    -00830 void Server::MeshSendUnicast(std::string destination, std::string text)
    -00831 {
    -00832         NetSendToOne((char*)destination.c_str(),(char*)text.c_str());
    -00833 }
    -00834 
    -00835 void Server::MeshSendAllExcept(std::string target, std::string text)
    -00836 {
    -00837         NetSendToAllExcept(target.c_str(),(char*)text.c_str());
    -00838 }
    -00839 
    -00840 bool Server::MeshCheckChan(chanrec *c,std::string servername)
    -00841 {
    -00842         if (c)
    -00843         {
    -00844                 return ChanAnyOnThisServer(c,(char*)servername.c_str());
    -00845         }
    -00846         else return false;
    -00847 }
    -00848 
    -00849 bool Server::MeshCheckCommon(userrec* u,std::string servername)
    -00850 {
    -00851         if (u)
    +00740         return true;
    +00741 }
    +00742 
    +00743 void Server::MeshSendAll(std::string text)
    +00744 {
    +00745         NetSendToAll((char*)text.c_str());
    +00746 }
    +00747 
    +00748 void Server::MeshSendCommon(userrec* user, std::string text)
    +00749 {
    +00750         if (user)
    +00751                 NetSendToCommon(user,(char*)text.c_str());
    +00752 }
    +00753 
    +00754 void Server::MeshSendAllAlive(std::string text)
    +00755 {
    +00756         NetSendToAllAlive((char*)text.c_str());
    +00757 }
    +00758 
    +00759 void Server::MeshSendUnicast(std::string destination, std::string text)
    +00760 {
    +00761         NetSendToOne((char*)destination.c_str(),(char*)text.c_str());
    +00762 }
    +00763 
    +00764 void Server::MeshSendAllExcept(std::string target, std::string text)
    +00765 {
    +00766         NetSendToAllExcept(target.c_str(),(char*)text.c_str());
    +00767 }
    +00768 
    +00769 bool Server::MeshCheckChan(chanrec *c,std::string servername)
    +00770 {
    +00771         if (c)
    +00772         {
    +00773                 return ChanAnyOnThisServer(c,(char*)servername.c_str());
    +00774         }
    +00775         else return false;
    +00776 }
    +00777 
    +00778 bool Server::MeshCheckCommon(userrec* u,std::string servername)
    +00779 {
    +00780         if (u)
    +00781         {
    +00782                 return CommonOnThisServer(u,(char*)servername.c_str());
    +00783         }
    +00784         else return false;
    +00785 }
    +00786 
    +00787 Module* Server::FindModule(std::string name)
    +00788 {
    +00789         for (int i = 0; i <= MODCOUNT; i++)
    +00790         {
    +00791                 if (module_names[i] == name)
    +00792                 {
    +00793                         return modules[i];
    +00794                 }
    +00795         }
    +00796         return NULL;
    +00797 }
    +00798 
    +00799 ConfigReader::ConfigReader()
    +00800 {
    +00801         this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
    +00802         this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
    +00803         this->readerror = LoadConf(CONFIG_FILE,this->cache,this->errorlog);
    +00804         if (!this->readerror)
    +00805                 this->error = CONF_FILE_NOT_FOUND;
    +00806 }
    +00807 
    +00808 
    +00809 ConfigReader::~ConfigReader()
    +00810 {
    +00811         if (this->cache)
    +00812                 delete this->cache;
    +00813         if (this->errorlog)
    +00814                 delete this->errorlog;
    +00815 }
    +00816 
    +00817 
    +00818 ConfigReader::ConfigReader(std::string filename)
    +00819 {
    +00820         this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
    +00821         this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
    +00822         this->readerror = LoadConf(filename.c_str(),this->cache,this->errorlog);
    +00823         if (!this->readerror)
    +00824                 this->error = CONF_FILE_NOT_FOUND;
    +00825 };
    +00826 
    +00827 std::string ConfigReader::ReadValue(std::string tag, std::string name, int index)
    +00828 {
    +00829         char val[MAXBUF];
    +00830         char t[MAXBUF];
    +00831         char n[MAXBUF];
    +00832         strlcpy(t,tag.c_str(),MAXBUF);
    +00833         strlcpy(n,name.c_str(),MAXBUF);
    +00834         int res = ReadConf(cache,t,n,index,val);
    +00835         if (!res)
    +00836         {
    +00837                 this->error = CONF_VALUE_NOT_FOUND;
    +00838                 return "";
    +00839         }
    +00840         return val;
    +00841 }
    +00842 
    +00843 bool ConfigReader::ReadFlag(std::string tag, std::string name, int index)
    +00844 {
    +00845         char val[MAXBUF];
    +00846         char t[MAXBUF];
    +00847         char n[MAXBUF];
    +00848         strlcpy(t,tag.c_str(),MAXBUF);
    +00849         strlcpy(n,name.c_str(),MAXBUF);
    +00850         int res = ReadConf(cache,t,n,index,val);
    +00851         if (!res)
     00852         {
    -00853                 return CommonOnThisServer(u,(char*)servername.c_str());
    -00854         }
    -00855         else return false;
    -00856 }
    -00857 
    -00858 Module* Server::FindModule(std::string name)
    -00859 {
    -00860         for (int i = 0; i <= MODCOUNT; i++)
    -00861         {
    -00862                 if (module_names[i] == name)
    -00863                 {
    -00864                         return modules[i];
    -00865                 }
    -00866         }
    -00867         return NULL;
    -00868 }
    -00869 
    -00870 ConfigReader::ConfigReader()
    -00871 {
    -00872         this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
    -00873         this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
    -00874         this->readerror = LoadConf(CONFIG_FILE,this->cache,this->errorlog);
    -00875         if (!this->readerror)
    -00876                 this->error = CONF_FILE_NOT_FOUND;
    -00877 }
    -00878 
    -00879 
    -00880 ConfigReader::~ConfigReader()
    -00881 {
    -00882         if (this->cache)
    -00883                 delete this->cache;
    -00884         if (this->errorlog)
    -00885                 delete this->errorlog;
    -00886 }
    -00887 
    +00853                 this->error = CONF_VALUE_NOT_FOUND;
    +00854                 return false;
    +00855         }
    +00856         std::string s = val;
    +00857         return ((s == "yes") || (s == "YES") || (s == "true") || (s == "TRUE") || (s == "1"));
    +00858 }
    +00859 
    +00860 long ConfigReader::ReadInteger(std::string tag, std::string name, int index, bool needs_unsigned)
    +00861 {
    +00862         char val[MAXBUF];
    +00863         char t[MAXBUF];
    +00864         char n[MAXBUF];
    +00865         strlcpy(t,tag.c_str(),MAXBUF);
    +00866         strlcpy(n,name.c_str(),MAXBUF);
    +00867         int res = ReadConf(cache,t,n,index,val);
    +00868         if (!res)
    +00869         {
    +00870                 this->error = CONF_VALUE_NOT_FOUND;
    +00871                 return 0;
    +00872         }
    +00873         for (int i = 0; i < strlen(val); i++)
    +00874         {
    +00875                 if (!isdigit(val[i]))
    +00876                 {
    +00877                         this->error = CONF_NOT_A_NUMBER;
    +00878                         return 0;
    +00879                 }
    +00880         }
    +00881         if ((needs_unsigned) && (atoi(val)<0))
    +00882         {
    +00883                 this->error = CONF_NOT_UNSIGNED;
    +00884                 return 0;
    +00885         }
    +00886         return atoi(val);
    +00887 }
     00888 
    -00889 ConfigReader::ConfigReader(std::string filename)
    +00889 long ConfigReader::GetError()
     00890 {
    -00891         this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
    -00892         this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
    -00893         this->readerror = LoadConf(filename.c_str(),this->cache,this->errorlog);
    -00894         if (!this->readerror)
    -00895                 this->error = CONF_FILE_NOT_FOUND;
    -00896 };
    -00897 
    -00898 std::string ConfigReader::ReadValue(std::string tag, std::string name, int index)
    -00899 {
    -00900         char val[MAXBUF];
    -00901         char t[MAXBUF];
    -00902         char n[MAXBUF];
    -00903         strlcpy(t,tag.c_str(),MAXBUF);
    -00904         strlcpy(n,name.c_str(),MAXBUF);
    -00905         int res = ReadConf(cache,t,n,index,val);
    -00906         if (!res)
    -00907         {
    -00908                 this->error = CONF_VALUE_NOT_FOUND;
    -00909                 return "";
    -00910         }
    -00911         return val;
    -00912 }
    -00913 
    -00914 bool ConfigReader::ReadFlag(std::string tag, std::string name, int index)
    -00915 {
    -00916         char val[MAXBUF];
    -00917         char t[MAXBUF];
    -00918         char n[MAXBUF];
    -00919         strlcpy(t,tag.c_str(),MAXBUF);
    -00920         strlcpy(n,name.c_str(),MAXBUF);
    -00921         int res = ReadConf(cache,t,n,index,val);
    -00922         if (!res)
    -00923         {
    -00924                 this->error = CONF_VALUE_NOT_FOUND;
    -00925                 return false;
    -00926         }
    -00927         std::string s = val;
    -00928         return ((s == "yes") || (s == "YES") || (s == "true") || (s == "TRUE") || (s == "1"));
    -00929 }
    -00930 
    -00931 long ConfigReader::ReadInteger(std::string tag, std::string name, int index, bool needs_unsigned)
    -00932 {
    -00933         char val[MAXBUF];
    -00934         char t[MAXBUF];
    -00935         char n[MAXBUF];
    -00936         strlcpy(t,tag.c_str(),MAXBUF);
    -00937         strlcpy(n,name.c_str(),MAXBUF);
    -00938         int res = ReadConf(cache,t,n,index,val);
    -00939         if (!res)
    -00940         {
    -00941                 this->error = CONF_VALUE_NOT_FOUND;
    -00942                 return 0;
    -00943         }
    -00944         for (int i = 0; i < strlen(val); i++)
    -00945         {
    -00946                 if (!isdigit(val[i]))
    -00947                 {
    -00948                         this->error = CONF_NOT_A_NUMBER;
    -00949                         return 0;
    -00950                 }
    -00951         }
    -00952         if ((needs_unsigned) && (atoi(val)<0))
    -00953         {
    -00954                 this->error = CONF_NOT_UNSIGNED;
    -00955                 return 0;
    -00956         }
    -00957         return atoi(val);
    -00958 }
    -00959 
    -00960 long ConfigReader::GetError()
    -00961 {
    -00962         long olderr = this->error;
    -00963         this->error = 0;
    -00964         return olderr;
    -00965 }
    -00966 
    -00967 void ConfigReader::DumpErrors(bool bail, userrec* user)
    -00968 {
    -00969         if (bail)
    -00970         {
    -00971                 printf("There were errors in your configuration:\n%s",errorlog->str().c_str());
    -00972                 exit(0);
    +00891         long olderr = this->error;
    +00892         this->error = 0;
    +00893         return olderr;
    +00894 }
    +00895 
    +00896 void ConfigReader::DumpErrors(bool bail, userrec* user)
    +00897 {
    +00898         if (bail)
    +00899         {
    +00900                 printf("There were errors in your configuration:\n%s",errorlog->str().c_str());
    +00901                 exit(0);
    +00902         }
    +00903         else
    +00904         {
    +00905                 char dataline[1024];
    +00906                 if (user)
    +00907                 {
    +00908                         WriteServ(user->fd,"NOTICE %s :There were errors in the configuration file:",user->nick);
    +00909                         while (!errorlog->eof())
    +00910                         {
    +00911                                 errorlog->getline(dataline,1024);
    +00912                                 WriteServ(user->fd,"NOTICE %s :%s",user->nick,dataline);
    +00913                         }
    +00914                 }
    +00915                 else
    +00916                 {
    +00917                         WriteOpers("There were errors in the configuration file:",user->nick);
    +00918                         while (!errorlog->eof())
    +00919                         {
    +00920                                 errorlog->getline(dataline,1024);
    +00921                                 WriteOpers(dataline);
    +00922                         }
    +00923                 }
    +00924                 return;
    +00925         }
    +00926 }
    +00927 
    +00928 
    +00929 int ConfigReader::Enumerate(std::string tag)
    +00930 {
    +00931         return EnumConf(cache,tag.c_str());
    +00932 }
    +00933 
    +00934 int ConfigReader::EnumerateValues(std::string tag, int index)
    +00935 {
    +00936         return EnumValues(cache, tag.c_str(), index);
    +00937 }
    +00938 
    +00939 bool ConfigReader::Verify()
    +00940 {
    +00941         return this->readerror;
    +00942 }
    +00943 
    +00944 
    +00945 FileReader::FileReader(std::string filename)
    +00946 {
    +00947         file_cache c;
    +00948         readfile(c,filename.c_str());
    +00949         this->fc = c;
    +00950 }
    +00951 
    +00952 FileReader::FileReader()
    +00953 {
    +00954 }
    +00955 
    +00956 void FileReader::LoadFile(std::string filename)
    +00957 {
    +00958         file_cache c;
    +00959         readfile(c,filename.c_str());
    +00960         this->fc = c;
    +00961 }
    +00962 
    +00963 
    +00964 FileReader::~FileReader()
    +00965 {
    +00966 }
    +00967 
    +00968 bool FileReader::Exists()
    +00969 {
    +00970         if (fc.size() == 0)
    +00971         {
    +00972                 return(false);
     00973         }
     00974         else
     00975         {
    -00976                 char dataline[1024];
    -00977                 if (user)
    -00978                 {
    -00979                         WriteServ(user->fd,"NOTICE %s :There were errors in the configuration file:",user->nick);
    -00980                         while (!errorlog->eof())
    -00981                         {
    -00982                                 errorlog->getline(dataline,1024);
    -00983                                 WriteServ(user->fd,"NOTICE %s :%s",user->nick,dataline);
    -00984                         }
    -00985                 }
    -00986                 else
    -00987                 {
    -00988                         WriteOpers("There were errors in the configuration file:",user->nick);
    -00989                         while (!errorlog->eof())
    -00990                         {
    -00991                                 errorlog->getline(dataline,1024);
    -00992                                 WriteOpers(dataline);
    -00993                         }
    -00994                 }
    -00995                 return;
    -00996         }
    -00997 }
    +00976                 return(true);
    +00977         }
    +00978 }
    +00979 
    +00980 std::string FileReader::GetLine(int x)
    +00981 {
    +00982         if ((x<0) || (x>fc.size()))
    +00983                 return "";
    +00984         return fc[x];
    +00985 }
    +00986 
    +00987 int FileReader::FileSize()
    +00988 {
    +00989         return fc.size();
    +00990 }
    +00991 
    +00992 
    +00993 std::vector<Module*> modules(255);
    +00994 std::vector<ircd_module*> factory(255);
    +00995 
    +00996 int MODCOUNT  = -1;
    +00997 
     00998 
    -00999 
    -01000 int ConfigReader::Enumerate(std::string tag)
    -01001 {
    -01002         return EnumConf(cache,tag.c_str());
    -01003 }
    -01004 
    -01005 int ConfigReader::EnumerateValues(std::string tag, int index)
    -01006 {
    -01007         return EnumValues(cache, tag.c_str(), index);
    -01008 }
    -01009 
    -01010 bool ConfigReader::Verify()
    -01011 {
    -01012         return this->readerror;
    -01013 }
    -01014 
    -01015 
    -01016 FileReader::FileReader(std::string filename)
    -01017 {
    -01018         file_cache c;
    -01019         readfile(c,filename.c_str());
    -01020         this->fc = c;
    -01021 }
    -01022 
    -01023 FileReader::FileReader()
    -01024 {
    -01025 }
    -01026 
    -01027 void FileReader::LoadFile(std::string filename)
    -01028 {
    -01029         file_cache c;
    -01030         readfile(c,filename.c_str());
    -01031         this->fc = c;
    -01032 }
    -01033 
    -01034 
    -01035 FileReader::~FileReader()
    -01036 {
    -01037 }
    -01038 
    -01039 bool FileReader::Exists()
    -01040 {
    -01041         if (fc.size() == 0)
    -01042         {
    -01043                 return(false);
    -01044         }
    -01045         else
    -01046         {
    -01047                 return(true);
    -01048         }
    -01049 }
    -01050 
    -01051 std::string FileReader::GetLine(int x)
    -01052 {
    -01053         if ((x<0) || (x>fc.size()))
    -01054                 return "";
    -01055         return fc[x];
    -01056 }
    -01057 
    -01058 int FileReader::FileSize()
    -01059 {
    -01060         return fc.size();
    -01061 }
    -01062 
    -01063 
    -01064 std::vector<Module*> modules(255);
    -01065 std::vector<ircd_module*> factory(255);
    -01066 
    -01067 int MODCOUNT  = -1;
    -01068 
    -01069 
    -

    Generated on Fri May 13 15:48:41 2005 for InspIRCd by +

    Generated on Sun May 15 17:02:06 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/modules_8cpp.html b/docs/module-doc/modules_8cpp.html index 0f38ceb30..b43b1f7af 100644 --- a/docs/module-doc/modules_8cpp.html +++ b/docs/module-doc/modules_8cpp.html @@ -4,26 +4,20 @@ - +

    modules.cpp File Reference

    #include "inspircd.h"
    #include "inspircd_io.h"
    #include "inspircd_util.h"
    #include "inspircd_config.h"
    #include <unistd.h>
    -#include <fcntl.h>
    #include <sys/errno.h>
    -#include <sys/ioctl.h>
    -#include <sys/utsname.h>
    -#include <cstdio>
    #include <time.h>
    #include <string>
    #include <hash_map>
    #include <map>
    #include <sstream>
    #include <vector>
    -#include <errno.h>
    #include <deque>
    -#include <sched.h>
    #include "connection.h"
    #include "users.h"
    #include "servers.h"
    @@ -37,206 +31,174 @@ #include "xline.h"
    #include "commands.h"
    #include "inspstring.h"
    +#include "helperfuncs.h"
    +#include "hashcomp.h"

    Include dependency graph for modules.cpp:

    Include dependency graph
    - - - - - - - - - + + + + + + + + + +

    Go to the source code of this file. - - - - - - - - - - + string >, StrHashComp >  + string >, StrHashComp >  + in_addr >, InAddr_HashComp >  + nspace::hash< string >, StrHashComp >  - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + -

    Namespaces

    namespace  nspace

    Compounds

    class  ExtMode
    struct  InAddr_HashComp
    struct  StrHashComp

    Defines

    #define nspace   std

    Typedefs

    typedef nspace::hash_map<
    std::string, userrec *, nspace::hash<
    - string >, StrHashComp
    user_hash
    user_hash
    typedef nspace::hash_map<
    std::string, chanrec *, nspace::hash<
    - string >, StrHashComp
    chan_hash
    chan_hash
    typedef nspace::hash_map<
    in_addr, string *, nspace::hash<
    - in_addr >, InAddr_HashComp
    address_cache
    address_cache
    typedef nspace::hash_map<
    std::string, WhoWasUser *,
    - nspace::hash< string >, StrHashComp
    whowas_hash
    whowas_hash
    typedef std::deque< command_tcommand_table
    typedef std::deque< command_tcommand_table
    typedef std::vector< ExtModeExtModeList
    typedef std::vector< ExtModeExtModeList
    typedef ExtModeList::iterator ExtModeListIter
    typedef ExtModeList::iterator ExtModeListIter

    Functions

    bool ModeDefined (char modechar, int type)
    bool ModeDefined (char modechar, int type)
    bool ModeIsListMode (char modechar, int type)
    bool ModeIsListMode (char modechar, int type)
    bool ModeDefinedOper (char modechar, int type)
    bool ModeDefinedOper (char modechar, int type)
    int ModeDefinedOn (char modechar, int type)
    int ModeDefinedOn (char modechar, int type)
    int ModeDefinedOff (char modechar, int type)
    int ModeDefinedOff (char modechar, int type)
    bool DoAddExtendedMode (char modechar, int type, bool requires_oper, int params_on, int params_off)
    bool DoAddExtendedMode (char modechar, int type, bool requires_oper, int params_on, int params_off)
    void ModeMakeList (char modechar)
    void ModeMakeList (char modechar)
    std::vector< Module * > modules (255)
    std::vector< Module * > modules (255)
    std::vector< ircd_module * > factory (255)
    std::vector< ircd_module * > factory (255)

    Variables

    int MODCOUNT = -1
    int MODCOUNT = -1
    std::vector< Module * > modules
    std::vector< Module * > modules
    std::vector< ircd_module * > factory
    std::vector< ircd_module * > factory
    time_t TIME
    time_t TIME
    int LogLevel
    int LogLevel
    char ServerName [MAXBUF]
    char ServerName [MAXBUF]
    char Network [MAXBUF]
    char Network [MAXBUF]
    char ServerDesc [MAXBUF]
    char ServerDesc [MAXBUF]
    char AdminName [MAXBUF]
    char AdminName [MAXBUF]
    char AdminEmail [MAXBUF]
    char AdminEmail [MAXBUF]
    char AdminNick [MAXBUF]
    char AdminNick [MAXBUF]
    char diepass [MAXBUF]
    char diepass [MAXBUF]
    char restartpass [MAXBUF]
    char restartpass [MAXBUF]
    char motd [MAXBUF]
    char motd [MAXBUF]
    char rules [MAXBUF]
    char rules [MAXBUF]
    char list [MAXBUF]
    char list [MAXBUF]
    char PrefixQuit [MAXBUF]
    char PrefixQuit [MAXBUF]
    char DieValue [MAXBUF]
    char DieValue [MAXBUF]
    int debugging
    int debugging
    int WHOWAS_STALE
    int WHOWAS_STALE
    int WHOWAS_MAX
    int WHOWAS_MAX
    int DieDelay
    int DieDelay
    time_t startup_time
    time_t startup_time
    int NetBufferSize
    int NetBufferSize
    int MaxWhoResults
    int MaxWhoResults
    time_t nb_start
    time_t nb_start
    std::vector< int > fd_reap
    std::vector< int > fd_reap
    std::vector< std::string > module_names
    std::vector< std::string > module_names
    int boundPortCount
    int boundPortCount
    int portCount
    int portCount
    int SERVERportCount
    int SERVERportCount
    int ports [MAXSOCKS]
    int ports [MAXSOCKS]
    int defaultRoute
    int defaultRoute
    std::vector< long > auth_cookies
    std::vector< long > auth_cookies
    std::stringstream config_f
    std::stringstream config_f
    serverrecme [32]
    serverrecme [32]
    FILE * log_file
    FILE * log_file
    userrecfd_ref_table [65536]
    userrecfd_ref_table [65536]
    user_hash clientlist
    user_hash clientlist
    chan_hash chanlist
    chan_hash chanlist
    whowas_hash whowas
    whowas_hash whowas
    command_table cmdlist
    command_table cmdlist
    file_cache MOTD
    file_cache MOTD
    file_cache RULES
    file_cache RULES
    address_cache IP
    address_cache IP
    ExtModeList EMode
    ExtModeList EMode
    -


    Define Documentation

    -

    - - - - -
    - - -
    #define nspace   std -
    -
    - - - - -
    -   - - -

    - -

    -Definition at line 64 of file modules.cpp.


    Typedef Documentation

    -

    +

    @@ -251,16 +213,16 @@ Definition at line 64 o

    -Definition at line 187 of file modules.cpp. +Definition at line 111 of file modules.cpp.

    -
    typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, InAddr_HashComp> address_cache + typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, InAddr_HashComp> address_cache
    -

    +

    @@ -275,16 +237,16 @@ Definition at line 187

    -Definition at line 186 of file modules.cpp. +Definition at line 110 of file modules.cpp.

    -
    typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, StrHashComp> chan_hash + typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, StrHashComp> chan_hash
    -

    +

    @@ -299,16 +261,16 @@ Definition at line 186

    -Definition at line 189 of file modules.cpp. +Definition at line 113 of file modules.cpp.

    -
    typedef std::deque<command_t> command_table + typedef std::deque<command_t> command_table
    -

    +

    @@ -323,16 +285,16 @@ Definition at line 189

    -Definition at line 215 of file modules.cpp. +Definition at line 139 of file modules.cpp.

    -
    typedef std::vector<ExtMode> ExtModeList + typedef std::vector<ExtMode> ExtModeList
    -

    +

    @@ -347,18 +309,18 @@ Definition at line 215

    -Definition at line 216 of file modules.cpp. +Definition at line 140 of file modules.cpp.

    -Referenced by ModeDefined(), ModeDefinedOff(), ModeDefinedOn(), ModeDefinedOper(), ModeIsListMode(), and ModeMakeList(). +Referenced by ModeDefined(), ModeDefinedOff(), ModeDefinedOn(), ModeDefinedOper(), ModeIsListMode(), and ModeMakeList().

    -
    typedef ExtModeList::iterator ExtModeListIter + typedef ExtModeList::iterator ExtModeListIter
    -

    +

    @@ -373,16 +335,16 @@ Referenced by ModeDefined()

    -Definition at line 185 of file modules.cpp. +Definition at line 109 of file modules.cpp.

    -
    typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, StrHashComp> user_hash + typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, StrHashComp> user_hash
    -

    +

    @@ -397,11 +359,11 @@ Definition at line 185

    -Definition at line 188 of file modules.cpp. +Definition at line 112 of file modules.cpp.

    -
    typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, StrHashComp> whowas_hash + typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, StrHashComp> whowas_hash


    Function Documentation

    -

    +

    @@ -456,23 +418,23 @@ Definition at line 188

    -Definition at line 285 of file modules.cpp. +Definition at line 209 of file modules.cpp.

    -References EMode, and ModeDefined(). +References EMode, and ModeDefined().

    -Referenced by Server::AddExtendedListMode(), and Server::AddExtendedMode(). +Referenced by Server::AddExtendedListMode(), and Server::AddExtendedMode().

    -

    00286 {
    -00287         if (ModeDefined(modechar,type)) {
    -00288                 return false;
    -00289         }
    -00290         EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off));
    -00291         return true;
    -00292 }
    +
    00210 {
    +00211         if (ModeDefined(modechar,type)) {
    +00212                 return false;
    +00213         }
    +00214         EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off));
    +00215         return true;
    +00216 }
     
    -

    +

    @@ -501,7 +463,7 @@ Referenced by Server::AddEx
    -

    +

    @@ -538,26 +500,26 @@ Referenced by Server::AddEx

    -Definition at line 222 of file modules.cpp. +Definition at line 146 of file modules.cpp.

    -References EMode, and ExtModeListIter. +References EMode, and ExtModeListIter.

    -Referenced by DoAddExtendedMode(). +Referenced by DoAddExtendedMode().

    -

    00223 {
    -00224         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    -00225         {
    -00226                 if ((i->modechar == modechar) && (i->type == type))
    -00227                 {
    -00228                         return true;
    -00229                 }
    -00230         }
    -00231         return false;
    -00232 }
    +
    00147 {
    +00148         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    +00149         {
    +00150                 if ((i->modechar == modechar) && (i->type == type))
    +00151                 {
    +00152                         return true;
    +00153                 }
    +00154         }
    +00155         return false;
    +00156 }
     
    -

    +

    @@ -594,24 +556,24 @@ Referenced by DoAddExtended

    -Definition at line 272 of file modules.cpp. +Definition at line 196 of file modules.cpp.

    -References EMode, and ExtModeListIter. +References EMode, and ExtModeListIter.

    -

    00273 {
    -00274         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    -00275         {
    -00276                 if ((i->modechar == modechar) && (i->type == type))
    -00277                 {
    -00278                         return i->params_when_off;
    -00279                 }
    -00280         }
    -00281         return 0;
    -00282 }
    +
    00197 {
    +00198         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    +00199         {
    +00200                 if ((i->modechar == modechar) && (i->type == type))
    +00201                 {
    +00202                         return i->params_when_off;
    +00203                 }
    +00204         }
    +00205         return 0;
    +00206 }
     
    -

    +

    @@ -648,24 +610,24 @@ References EMode, and <

    -Definition at line 259 of file modules.cpp. +Definition at line 183 of file modules.cpp.

    -References EMode, and ExtModeListIter. +References EMode, and ExtModeListIter.

    -

    00260 {
    -00261         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    -00262         {
    -00263                 if ((i->modechar == modechar) && (i->type == type))
    -00264                 {
    -00265                         return i->params_when_on;
    -00266                 }
    -00267         }
    -00268         return 0;
    -00269 }
    +
    00184 {
    +00185         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    +00186         {
    +00187                 if ((i->modechar == modechar) && (i->type == type))
    +00188                 {
    +00189                         return i->params_when_on;
    +00190                 }
    +00191         }
    +00192         return 0;
    +00193 }
     
    -

    +

    @@ -702,24 +664,24 @@ References EMode, and <

    -Definition at line 246 of file modules.cpp. +Definition at line 170 of file modules.cpp.

    -References EMode, and ExtModeListIter. +References EMode, and ExtModeListIter.

    -

    00247 {
    -00248         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    -00249         {
    -00250                 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true))
    -00251                 {
    -00252                         return true;
    -00253                 }
    -00254         }
    -00255         return false;
    -00256 }
    +
    00171 {
    +00172         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    +00173         {
    +00174                 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true))
    +00175                 {
    +00176                         return true;
    +00177                 }
    +00178         }
    +00179         return false;
    +00180 }
     
    -

    +

    @@ -756,24 +718,24 @@ References EMode, and <

    -Definition at line 234 of file modules.cpp. +Definition at line 158 of file modules.cpp.

    -References EMode, and ExtModeListIter. +References EMode, and ExtModeListIter.

    -

    00235 {
    -00236         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    -00237         {
    -00238                 if ((i->modechar == modechar) && (i->type == type) && (i->list == true))
    -00239                 {
    -00240                         return true;
    -00241                 }
    -00242         }
    -00243         return false;
    -00244 }
    +
    00159 {
    +00160         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    +00161         {
    +00162                 if ((i->modechar == modechar) && (i->type == type) && (i->list == true))
    +00163                 {
    +00164                         return true;
    +00165                 }
    +00166         }
    +00167         return false;
    +00168 }
     
    -

    +

    @@ -801,27 +763,27 @@ References EMode, and <

    -Definition at line 295 of file modules.cpp. -

    -References EMode, ExtModeListIter, and MT_CHANNEL. -

    -Referenced by Server::AddExtendedListMode(). +Definition at line 219 of file modules.cpp.

    -

    00296 {
    -00297         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    -00298         {
    -00299                 if ((i->modechar == modechar) && (i->type == MT_CHANNEL))
    -00300                 {
    -00301                         i->list = true;
    -00302                         return;
    -00303                 }
    -00304         }
    -00305         return;
    -00306 }
    +References EMode, ExtModeListIter, and MT_CHANNEL.
    +

    +Referenced by Server::AddExtendedListMode(). +

    +

    00220 {
    +00221         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    +00222         {
    +00223                 if ((i->modechar == modechar) && (i->type == MT_CHANNEL))
    +00224                 {
    +00225                         i->list = true;
    +00226                         return;
    +00227                 }
    +00228         }
    +00229         return;
    +00230 }
     
    -

    +

    @@ -851,13 +813,13 @@ Referenced by Server::AddEx


    Variable Documentation

    -

    +

    @@ -872,16 +834,16 @@ Referenced by Server::AddEx

    -Definition at line 84 of file modules.cpp. +Definition at line 72 of file modules.cpp.

    -
    char AdminEmail[MAXBUF] + char AdminEmail[MAXBUF]
    -

    +

    @@ -896,16 +858,16 @@ Definition at line 84 o

    -Definition at line 83 of file modules.cpp. +Definition at line 71 of file modules.cpp.

    -
    char AdminName[MAXBUF] + char AdminName[MAXBUF]
    -

    +

    @@ -920,16 +882,16 @@ Definition at line 83 o

    -Definition at line 85 of file modules.cpp. +Definition at line 73 of file modules.cpp.

    -
    char AdminNick[MAXBUF] + char AdminNick[MAXBUF]
    -

    +

    @@ -944,16 +906,16 @@ Definition at line 85 o

    -Definition at line 112 of file modules.cpp. +Definition at line 100 of file modules.cpp.

    -
    std::vector<long> auth_cookies + std::vector<long> auth_cookies
    -

    +

    @@ -968,16 +930,16 @@ Definition at line 112

    -Definition at line 106 of file modules.cpp. +Definition at line 94 of file modules.cpp.

    -
    int boundPortCount + int boundPortCount
    -

    +

    @@ -992,16 +954,16 @@ Definition at line 106

    -Definition at line 193 of file modules.cpp. +Definition at line 117 of file modules.cpp.

    -
    chan_hash chanlist + chan_hash chanlist
    -

    +

    @@ -1016,16 +978,16 @@ Definition at line 193

    -Definition at line 192 of file modules.cpp. +Definition at line 116 of file modules.cpp.

    -
    user_hash clientlist + user_hash clientlist
    -

    +

    @@ -1040,10 +1002,10 @@ Definition at line 192

    -Definition at line 195 of file modules.cpp. +Definition at line 119 of file modules.cpp.

    -
    command_table cmdlist + command_table cmdlist
    -

    +

    +Definition at line 101 of file modules.cpp.
    @@ -1064,16 +1026,16 @@ Definition at line 195

    -Definition at line 113 of file modules.cpp.

    -

    +

    @@ -1088,16 +1050,16 @@ Definition at line 113

    -Definition at line 94 of file modules.cpp. +Definition at line 82 of file modules.cpp.

    -
    int debugging + int debugging
    -

    +

    @@ -1112,16 +1074,16 @@ Definition at line 94 o

    -Definition at line 110 of file modules.cpp. +Definition at line 98 of file modules.cpp.

    -
    int defaultRoute + int defaultRoute
    -

    +

    @@ -1136,16 +1098,16 @@ Definition at line 110

    -Definition at line 97 of file modules.cpp. +Definition at line 85 of file modules.cpp.

    -
    int DieDelay + int DieDelay
    -

    +

    @@ -1160,16 +1122,16 @@ Definition at line 97 o

    -Definition at line 86 of file modules.cpp. +Definition at line 74 of file modules.cpp.

    -
    char diepass[MAXBUF] + char diepass[MAXBUF]
    -

    +

    @@ -1184,16 +1146,16 @@ Definition at line 86 o

    -Definition at line 92 of file modules.cpp. +Definition at line 80 of file modules.cpp.

    -
    char DieValue[MAXBUF] + char DieValue[MAXBUF]
    -

    +

    @@ -1208,12 +1170,12 @@ Definition at line 92 o

    -Definition at line 219 of file modules.cpp. +Definition at line 143 of file modules.cpp.

    -Referenced by DoAddExtendedMode(), ModeDefined(), ModeDefinedOff(), ModeDefinedOn(), ModeDefinedOper(), ModeIsListMode(), and ModeMakeList(). +Referenced by DoAddExtendedMode(), ModeDefined(), ModeDefinedOff(), ModeDefinedOn(), ModeDefinedOper(), ModeIsListMode(), and ModeMakeList().

    -
    ExtModeList EMode + ExtModeList EMode
    -

    +

    +Definition at line 63 of file modules.cpp.
    @@ -1234,16 +1196,16 @@ Referenced by DoAddExtended

    -Definition at line 75 of file modules.cpp.

    -

    +

    @@ -1258,16 +1220,16 @@ Definition at line 75 o

    -Definition at line 103 of file modules.cpp. +Definition at line 91 of file modules.cpp.

    -
    std::vector<int> fd_reap + std::vector<int> fd_reap
    -

    +

    @@ -1282,18 +1244,18 @@ Definition at line 103

    -Definition at line 119 of file modules.cpp. +Definition at line 107 of file modules.cpp.

    -Referenced by Server::FindDescriptor(), and Server::PseudoToUser(). +Referenced by Server::FindDescriptor(), and Server::PseudoToUser().

    -
    userrec* fd_ref_table[65536] + userrec* fd_ref_table[65536]
    -

    +

    @@ -1308,16 +1270,16 @@ Referenced by Server::FindD

    -Definition at line 198 of file modules.cpp. +Definition at line 122 of file modules.cpp.

    -
    address_cache IP + address_cache IP
    -

    +

    @@ -1332,16 +1294,16 @@ Definition at line 198

    -Definition at line 90 of file modules.cpp. +Definition at line 78 of file modules.cpp.

    -
    char list[MAXBUF] + char list[MAXBUF]
    -

    +

    @@ -1356,16 +1318,16 @@ Definition at line 90 o

    -Definition at line 117 of file modules.cpp. +Definition at line 105 of file modules.cpp.

    -
    FILE* log_file + FILE* log_file
    -

    +

    @@ -1380,16 +1342,16 @@ Definition at line 117

    -Definition at line 79 of file modules.cpp. +Definition at line 67 of file modules.cpp.

    -
    int LogLevel + int LogLevel
    -

    +

    @@ -1404,16 +1366,16 @@ Definition at line 79 o

    -Definition at line 100 of file modules.cpp. +Definition at line 88 of file modules.cpp.

    -
    int MaxWhoResults + int MaxWhoResults
    -

    +

    @@ -1428,16 +1390,16 @@ Definition at line 100

    -Definition at line 115 of file modules.cpp. +Definition at line 103 of file modules.cpp.

    -
    serverrec* me[32] + serverrec* me[32]
    -

    +

    @@ -1452,16 +1414,16 @@ Definition at line 115

    -Definition at line 1067 of file modules.cpp. +Definition at line 996 of file modules.cpp.

    -
    int MODCOUNT = -1 + int MODCOUNT = -1
    -

    +

    @@ -1476,10 +1438,10 @@ Definition at line 1067

    -Definition at line 104 of file modules.cpp. +Definition at line 92 of file modules.cpp.

    -
    std::vector<std::string> module_names + std::vector<std::string> module_names
    -

    +

    +Definition at line 62 of file modules.cpp.
    @@ -1500,16 +1462,16 @@ Definition at line 104

    -Definition at line 74 of file modules.cpp.

    -

    +

    @@ -1524,16 +1486,16 @@ Definition at line 74 o

    -Definition at line 196 of file modules.cpp. +Definition at line 120 of file modules.cpp.

    -
    file_cache MOTD + file_cache MOTD
    -

    +

    @@ -1548,16 +1510,16 @@ Definition at line 196

    -Definition at line 88 of file modules.cpp. +Definition at line 76 of file modules.cpp.

    -
    char motd[MAXBUF] + char motd[MAXBUF]
    -

    +

    @@ -1572,16 +1534,16 @@ Definition at line 88 o

    -Definition at line 101 of file modules.cpp. +Definition at line 89 of file modules.cpp.

    -
    time_t nb_start + time_t nb_start
    -

    +

    @@ -1596,16 +1558,16 @@ Definition at line 101

    -Definition at line 99 of file modules.cpp. +Definition at line 87 of file modules.cpp.

    -
    int NetBufferSize + int NetBufferSize
    -

    +

    @@ -1620,16 +1582,16 @@ Definition at line 99 o

    -Definition at line 81 of file modules.cpp. +Definition at line 69 of file modules.cpp.

    -
    char Network[MAXBUF] + char Network[MAXBUF]
    -

    +

    @@ -1644,16 +1606,16 @@ Definition at line 81 o

    -Definition at line 107 of file modules.cpp. +Definition at line 95 of file modules.cpp.

    -
    int portCount + int portCount
    -

    +

    @@ -1668,16 +1630,16 @@ Definition at line 107

    -Definition at line 109 of file modules.cpp. +Definition at line 97 of file modules.cpp.

    -
    int ports[MAXSOCKS] + int ports[MAXSOCKS]
    -

    +

    @@ -1692,16 +1654,16 @@ Definition at line 109

    -Definition at line 91 of file modules.cpp. +Definition at line 79 of file modules.cpp.

    -
    char PrefixQuit[MAXBUF] + char PrefixQuit[MAXBUF]
    -

    +

    @@ -1716,16 +1678,16 @@ Definition at line 91 o

    -Definition at line 87 of file modules.cpp. +Definition at line 75 of file modules.cpp.

    -
    char restartpass[MAXBUF] + char restartpass[MAXBUF]
    -

    +

    @@ -1740,16 +1702,16 @@ Definition at line 87 o

    -Definition at line 197 of file modules.cpp. +Definition at line 121 of file modules.cpp.

    -
    file_cache RULES + file_cache RULES
    -

    +

    @@ -1764,16 +1726,16 @@ Definition at line 197

    -Definition at line 89 of file modules.cpp. +Definition at line 77 of file modules.cpp.

    -
    char rules[MAXBUF] + char rules[MAXBUF]
    -

    +

    @@ -1788,16 +1750,16 @@ Definition at line 89 o

    -Definition at line 82 of file modules.cpp. +Definition at line 70 of file modules.cpp.

    -
    char ServerDesc[MAXBUF] + char ServerDesc[MAXBUF]
    -

    +

    @@ -1812,16 +1774,16 @@ Definition at line 82 o

    -Definition at line 80 of file modules.cpp. +Definition at line 68 of file modules.cpp.

    -
    char ServerName[MAXBUF] + char ServerName[MAXBUF]
    -

    +

    @@ -1836,16 +1798,16 @@ Definition at line 80 o

    -Definition at line 108 of file modules.cpp. +Definition at line 96 of file modules.cpp.

    -
    int SERVERportCount + int SERVERportCount
    -

    +

    @@ -1860,10 +1822,10 @@ Definition at line 108

    -Definition at line 98 of file modules.cpp. +Definition at line 86 of file modules.cpp.

    -
    time_t startup_time + time_t startup_time
    -

    +

    +Definition at line 65 of file modules.cpp.
    @@ -1884,16 +1846,16 @@ Definition at line 98 o

    -Definition at line 77 of file modules.cpp.

    -

    +

    @@ -1908,16 +1870,16 @@ Definition at line 77 o

    -Definition at line 194 of file modules.cpp. +Definition at line 118 of file modules.cpp.

    -
    whowas_hash whowas + whowas_hash whowas
    -

    +

    @@ -1932,16 +1894,16 @@ Definition at line 194

    -Definition at line 96 of file modules.cpp. +Definition at line 84 of file modules.cpp.

    -
    int WHOWAS_MAX + int WHOWAS_MAX
    -

    +

    @@ -1956,10 +1918,10 @@ Definition at line 96 o

    -Definition at line 95 of file modules.cpp. +Definition at line 83 of file modules.cpp.

    -
    int WHOWAS_STALE + int WHOWAS_STALE
    -


    Generated on Fri May 13 15:49:09 2005 for InspIRCd by +
    Generated on Sun May 15 17:02:42 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/modules_8cpp__incl.gif b/docs/module-doc/modules_8cpp__incl.gif index b2ba0c231..b041fb6b8 100644 Binary files a/docs/module-doc/modules_8cpp__incl.gif and b/docs/module-doc/modules_8cpp__incl.gif differ diff --git a/docs/module-doc/modules_8h-source.html b/docs/module-doc/modules_8h-source.html index 03cd2a9b7..ec270a4ae 100644 --- a/docs/module-doc/modules_8h-source.html +++ b/docs/module-doc/modules_8h-source.html @@ -4,7 +4,7 @@ - +

    modules.h

    Go to the documentation of this file.
    00001 /*       +------------------------------------+
     00002  *       | Inspire Internet Relay Chat Daemon |
     00003  *       +------------------------------------+
    @@ -309,147 +309,148 @@
     00803         virtual bool IsOnChannel(userrec* User, chanrec* Chan);
     00806         virtual std::string GetServerName();
     00809         virtual std::string GetNetworkName();
    -00815         virtual Admin GetAdmin();
    -00834         virtual bool AddExtendedMode(char modechar, int type, bool requires_oper, int params_when_on, int params_when_off);
    -00835 
    -00857         virtual bool AddExtendedListMode(char modechar);
    -00858 
    -00876         virtual void AddCommand(char* cmd, handlerfunc f, char flags, int minparams, char* source);
    -00877          
    -00899         virtual void SendMode(char **parameters, int pcnt, userrec *user);
    -00900         
    -00913         virtual void SendToModeMask(std::string modes, int flags, std::string text);
    -00914 
    -00920         virtual chanrec* JoinUserToChannel(userrec* user, std::string cname, std::string key);
    -00921         
    -00927         virtual chanrec* PartUserFromChannel(userrec* user, std::string cname, std::string reason);
    -00928         
    -00934         virtual void ChangeUserNick(userrec* user, std::string nickname);
    -00935         
    -00946         virtual void QuitUser(userrec* user, std::string reason);
    -00947         
    -00952         virtual bool MatchText(std::string sliteral, std::string spattern);
    -00953         
    -00965         virtual void CallCommandHandler(std::string commandname, char** parameters, int pcnt, userrec* user);
    -00966         
    -00972         virtual void ChangeHost(userrec* user, std::string host);
    -00973         
    -00979         virtual void ChangeGECOS(userrec* user, std::string gecos);
    -00980         
    -00989         virtual bool IsUlined(std::string server);
    -00990         
    -00994         virtual chanuserlist GetUsers(chanrec* chan);
    -00995 
    -01002         virtual bool UserToPseudo(userrec* user,std::string message);
    -01003 
    -01010         virtual bool PseudoToUser(userrec* alive,userrec* zombie,std::string message);
    -01011 
    -01019         virtual void AddGLine(long duration, std::string source, std::string reason, std::string hostmask);
    -01020 
    -01028         virtual void AddQLine(long duration, std::string source, std::string reason, std::string nickname);
    -01029 
    -01037         virtual void AddZLine(long duration, std::string source, std::string reason, std::string ipaddr);
    -01038 
    -01046         virtual void AddKLine(long duration, std::string source, std::string reason, std::string hostmask);
    -01047 
    -01055         virtual void AddELine(long duration, std::string source, std::string reason, std::string hostmask);
    -01056 
    -01059         virtual bool DelGLine(std::string hostmask);
    -01060 
    -01063         virtual bool DelQLine(std::string nickname);
    -01064 
    -01067         virtual bool DelZLine(std::string ipaddr);
    -01068 
    -01071         virtual bool DelKLine(std::string hostmask);
    -01072 
    -01075         virtual bool DelELine(std::string hostmask);
    -01076 
    -01082         virtual long CalcDuration(std::string duration);
    -01083 
    -01086         virtual bool IsValidMask(std::string mask);
    -01087 
    -01092         virtual void MeshSendAll(std::string text);
    -01093 
    -01100         virtual void MeshSendCommon(userrec* user, std::string text);
    -01101 
    -01104         virtual void MeshSendAllAlive(std::string text);
    -01105 
    -01109         virtual void MeshSendUnicast(std::string destination, std::string text);
    -01110 
    -01115         virtual void MeshSendAllExcept(std::string target, std::string text);
    -01116 
    -01120         virtual bool MeshCheckChan(chanrec *c,std::string servername);
    -01121 
    -01125         virtual bool MeshCheckCommon(userrec* u,std::string servername);
    -01126 
    -01131         virtual Module* FindModule(std::string name);
    -01132 };
    -01133 
    -01134 
    -01135 #define CONF_NOT_A_NUMBER       0x000010
    -01136 #define CONF_NOT_UNSIGNED       0x000080
    -01137 #define CONF_VALUE_NOT_FOUND    0x000100
    -01138 #define CONF_FILE_NOT_FOUND     0x000200
    -01139 
    -01140 
    -01147 class ConfigReader : public classbase
    -01148 {
    -01149   protected:
    -01155         std::stringstream *cache;
    -01156         std::stringstream *errorlog;
    -01159         bool readerror;
    -01160         long error;
    -01161         
    -01162   public:
    -01167         ConfigReader();                 // default constructor reads ircd.conf
    -01171         ConfigReader(std::string filename);     // read a module-specific config
    -01175         ~ConfigReader();
    -01180         std::string ReadValue(std::string tag, std::string name, int index);
    -01186         bool ReadFlag(std::string tag, std::string name, int index);
    -01195         long ReadInteger(std::string tag, std::string name, int index, bool needs_unsigned);
    -01200         long GetError();
    -01207         int Enumerate(std::string tag);
    -01212         bool Verify();
    -01219         void DumpErrors(bool bail,userrec* user);
    -01220 
    -01226         int EnumerateValues(std::string tag, int index);
    -01227 };
    -01228 
    -01229 
    -01230 
    -01236 class FileReader : public classbase
    -01237 {
    -01238  file_cache fc;
    -01239  public:
    -01244          FileReader();
    -01245 
    -01251          FileReader(std::string filename);
    -01252 
    -01256          ~FileReader();
    -01257 
    -01263          void LoadFile(std::string filename);
    -01264 
    -01268          bool Exists();
    -01269          
    -01274          std::string GetLine(int x);
    -01275 
    -01281          int FileSize();
    -01282 };
    -01283 
    -01284 
    -01291 class ModuleFactory : public classbase
    -01292 {
    -01293  public:
    -01294         ModuleFactory() { }
    -01295         virtual ~ModuleFactory() { }
    -01300         virtual Module * CreateModule() = 0;
    -01301 };
    -01302 
    -01303 
    -01304 typedef DLLFactory<ModuleFactory> ircd_module;
    +00812         virtual std::string GetServerDescription();
    +00818         virtual Admin GetAdmin();
    +00837         virtual bool AddExtendedMode(char modechar, int type, bool requires_oper, int params_when_on, int params_when_off);
    +00838 
    +00860         virtual bool AddExtendedListMode(char modechar);
    +00861 
    +00879         virtual void AddCommand(char* cmd, handlerfunc f, char flags, int minparams, char* source);
    +00880          
    +00902         virtual void SendMode(char **parameters, int pcnt, userrec *user);
    +00903         
    +00916         virtual void SendToModeMask(std::string modes, int flags, std::string text);
    +00917 
    +00923         virtual chanrec* JoinUserToChannel(userrec* user, std::string cname, std::string key);
    +00924         
    +00930         virtual chanrec* PartUserFromChannel(userrec* user, std::string cname, std::string reason);
    +00931         
    +00937         virtual void ChangeUserNick(userrec* user, std::string nickname);
    +00938         
    +00949         virtual void QuitUser(userrec* user, std::string reason);
    +00950         
    +00955         virtual bool MatchText(std::string sliteral, std::string spattern);
    +00956         
    +00968         virtual void CallCommandHandler(std::string commandname, char** parameters, int pcnt, userrec* user);
    +00969         
    +00975         virtual void ChangeHost(userrec* user, std::string host);
    +00976         
    +00982         virtual void ChangeGECOS(userrec* user, std::string gecos);
    +00983         
    +00992         virtual bool IsUlined(std::string server);
    +00993         
    +00997         virtual chanuserlist GetUsers(chanrec* chan);
    +00998 
    +01005         virtual bool UserToPseudo(userrec* user,std::string message);
    +01006 
    +01013         virtual bool PseudoToUser(userrec* alive,userrec* zombie,std::string message);
    +01014 
    +01022         virtual void AddGLine(long duration, std::string source, std::string reason, std::string hostmask);
    +01023 
    +01031         virtual void AddQLine(long duration, std::string source, std::string reason, std::string nickname);
    +01032 
    +01040         virtual void AddZLine(long duration, std::string source, std::string reason, std::string ipaddr);
    +01041 
    +01049         virtual void AddKLine(long duration, std::string source, std::string reason, std::string hostmask);
    +01050 
    +01058         virtual void AddELine(long duration, std::string source, std::string reason, std::string hostmask);
    +01059 
    +01062         virtual bool DelGLine(std::string hostmask);
    +01063 
    +01066         virtual bool DelQLine(std::string nickname);
    +01067 
    +01070         virtual bool DelZLine(std::string ipaddr);
    +01071 
    +01074         virtual bool DelKLine(std::string hostmask);
    +01075 
    +01078         virtual bool DelELine(std::string hostmask);
    +01079 
    +01085         virtual long CalcDuration(std::string duration);
    +01086 
    +01089         virtual bool IsValidMask(std::string mask);
    +01090 
    +01095         virtual void MeshSendAll(std::string text);
    +01096 
    +01103         virtual void MeshSendCommon(userrec* user, std::string text);
    +01104 
    +01107         virtual void MeshSendAllAlive(std::string text);
    +01108 
    +01112         virtual void MeshSendUnicast(std::string destination, std::string text);
    +01113 
    +01118         virtual void MeshSendAllExcept(std::string target, std::string text);
    +01119 
    +01123         virtual bool MeshCheckChan(chanrec *c,std::string servername);
    +01124 
    +01128         virtual bool MeshCheckCommon(userrec* u,std::string servername);
    +01129 
    +01134         virtual Module* FindModule(std::string name);
    +01135 };
    +01136 
    +01137 
    +01138 #define CONF_NOT_A_NUMBER       0x000010
    +01139 #define CONF_NOT_UNSIGNED       0x000080
    +01140 #define CONF_VALUE_NOT_FOUND    0x000100
    +01141 #define CONF_FILE_NOT_FOUND     0x000200
    +01142 
    +01143 
    +01150 class ConfigReader : public classbase
    +01151 {
    +01152   protected:
    +01158         std::stringstream *cache;
    +01159         std::stringstream *errorlog;
    +01162         bool readerror;
    +01163         long error;
    +01164         
    +01165   public:
    +01170         ConfigReader();                 // default constructor reads ircd.conf
    +01174         ConfigReader(std::string filename);     // read a module-specific config
    +01178         ~ConfigReader();
    +01183         std::string ReadValue(std::string tag, std::string name, int index);
    +01189         bool ReadFlag(std::string tag, std::string name, int index);
    +01198         long ReadInteger(std::string tag, std::string name, int index, bool needs_unsigned);
    +01203         long GetError();
    +01210         int Enumerate(std::string tag);
    +01215         bool Verify();
    +01222         void DumpErrors(bool bail,userrec* user);
    +01223 
    +01229         int EnumerateValues(std::string tag, int index);
    +01230 };
    +01231 
    +01232 
    +01233 
    +01239 class FileReader : public classbase
    +01240 {
    +01241  file_cache fc;
    +01242  public:
    +01247          FileReader();
    +01248 
    +01254          FileReader(std::string filename);
    +01255 
    +01259          ~FileReader();
    +01260 
    +01266          void LoadFile(std::string filename);
    +01267 
    +01271          bool Exists();
    +01272          
    +01277          std::string GetLine(int x);
    +01278 
    +01284          int FileSize();
    +01285 };
    +01286 
    +01287 
    +01294 class ModuleFactory : public classbase
    +01295 {
    +01296  public:
    +01297         ModuleFactory() { }
    +01298         virtual ~ModuleFactory() { }
    +01303         virtual Module * CreateModule() = 0;
    +01304 };
     01305 
    -01306 #endif
    -

    Generated on Fri May 13 15:48:42 2005 for InspIRCd by +01306 +01307 typedef DLLFactory<ModuleFactory> ircd_module; +01308 +01309 #endif +

    Generated on Sun May 15 17:02:06 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/modules_8h.html b/docs/module-doc/modules_8h.html index be75f5ea4..33f708825 100644 --- a/docs/module-doc/modules_8h.html +++ b/docs/module-doc/modules_8h.html @@ -4,7 +4,7 @@ - +

    modules.h File Reference

    #include "dynamic.h"
    #include "base.h"
    #include "ctables.h"
    @@ -109,7 +109,7 @@ This graph shows which files directly or indirectly include this file:

    #define VF_COMMON   8 -#define FOREACH_MOD   for (int _i = 0; _i <= MODCOUNT; _i++) modules[_i]-> +#define FOREACH_MOD   for (int _i = 0; _i <= MODCOUNT; _i++) modules[_i]-> #define FOREACH_RESULT(x) @@ -404,7 +404,7 @@ Definition at line 39 of

    Definition at line 37 of file modules.h.

    -Referenced by Module::OnAccessCheck(). +Referenced by Module::OnAccessCheck().

    @@ -452,9 +452,9 @@ Definition at line 38 of

    -Definition at line 1138 of file modules.h. +Definition at line 1141 of file modules.h.

    -Referenced by ConfigReader::ConfigReader(). +Referenced by ConfigReader::ConfigReader().

    @@ -478,9 +478,9 @@ Referenced by ConfigReader:

    -Definition at line 1135 of file modules.h. +Definition at line 1138 of file modules.h.

    -Referenced by ConfigReader::ReadInteger(). +Referenced by ConfigReader::ReadInteger().

    @@ -504,9 +504,9 @@ Referenced by ConfigReader:

    -Definition at line 1136 of file modules.h. +Definition at line 1139 of file modules.h.

    -Referenced by ConfigReader::ReadInteger(). +Referenced by ConfigReader::ReadInteger().

    @@ -530,9 +530,9 @@ Referenced by ConfigReader:

    -Definition at line 1137 of file modules.h. +Definition at line 1140 of file modules.h.

    -Referenced by ConfigReader::ReadFlag(), ConfigReader::ReadInteger(), and ConfigReader::ReadValue(). +Referenced by ConfigReader::ReadFlag(), ConfigReader::ReadInteger(), and ConfigReader::ReadValue().

    @@ -558,7 +558,7 @@ Referenced by ConfigReader:

    Definition at line 23 of file modules.h.

    -Referenced by Server::AddExtendedMode(), chanrec::AddUser(), chanrec::DelUser(), userrec::HasPermission(), chanrec::IsCustomModeSet(), userrec::RemoveInvite(), chanrec::SetCustomMode(), chanrec::SetCustomModeParam(), userrec::SetWriteError(), and Server::UserToPseudo(). +Referenced by Server::AddExtendedMode(), chanrec::AddUser(), chanrec::DelUser(), userrec::HasPermission(), chanrec::IsCustomModeSet(), userrec::RemoveInvite(), chanrec::SetCustomMode(), chanrec::SetCustomModeParam(), userrec::SetWriteError(), and Server::UserToPseudo().

    @@ -608,7 +608,7 @@ Definition at line 25 of

    Definition at line 99 of file modules.h.

    -Referenced by Server::PseudoToUser(), and Server::UserToPseudo(). +Referenced by Server::PseudoToUser(), and Server::UserToPseudo().

    @@ -617,7 +617,7 @@ Referenced by Server::Pseud -
    #define FOREACH_MOD   for (int _i = 0; _i <= MODCOUNT; _i++) modules[_i]-> + #define FOREACH_MOD   for (int _i = 0; _i <= MODCOUNT; _i++) modules[_i]->
    @@ -634,7 +634,7 @@ Referenced by
    Server::Pseud

    Definition at line 79 of file modules.h.

    -Referenced by Event::Send(). +Referenced by Event::Send().

    @@ -698,7 +698,7 @@ Definition at line 87 of

    Definition at line 31 of file modules.h.

    -Referenced by Server::AddExtendedListMode(), and ModeMakeList(). +Referenced by Server::AddExtendedListMode(), and ModeMakeList().

    @@ -724,7 +724,7 @@ Referenced by Server::AddEx

    Definition at line 32 of file modules.h.

    -Referenced by Server::AddExtendedMode(). +Referenced by Server::AddExtendedMode().

    @@ -750,7 +750,7 @@ Referenced by Server::AddEx

    Definition at line 33 of file modules.h.

    -Referenced by Server::AddExtendedMode(). +Referenced by Server::AddExtendedMode().

    @@ -920,7 +920,7 @@ Definition at line 53 of

    Definition at line 54 of file modules.h.

    -Referenced by Module::GetVersion(). +Referenced by Module::GetVersion().


    Typedef Documentation

    @@ -949,7 +949,7 @@ Holds a list of users in a channel.

    Definition at line 72 of file modules.h.

    -Referenced by Server::GetUsers(). +Referenced by Server::GetUsers().

    @@ -977,7 +977,7 @@ Low level definition of a FileReader Definition at line 67 of file modules.h.

    -Referenced by FileReader::FileReader(), and FileReader::LoadFile(). +Referenced by FileReader::FileReader(), and FileReader::LoadFile().

    @@ -1001,7 +1001,7 @@ Referenced by FileReader::F

    -Definition at line 1304 of file modules.h. +Definition at line 1307 of file modules.h.

    @@ -1027,7 +1027,7 @@ Definition at line 1304 o

    Definition at line 68 of file modules.h.

    -Referenced by Module::OnChannelSync(), and Module::OnUserSync(). +Referenced by Module::OnChannelSync(), and Module::OnUserSync().


    Function Documentation

    @@ -1086,7 +1086,7 @@ Referenced by Module::OnCha

    -Referenced by Server::AddCommand(). +Referenced by Server::AddCommand().

    @@ -1132,10 +1132,10 @@ Referenced by Server::AddCo

    -Referenced by Server::SendMode(). +Referenced by Server::SendMode(). -


    Generated on Fri May 13 15:49:10 2005 for InspIRCd by +
    Generated on Sun May 15 17:02:44 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/namespaceirc.html b/docs/module-doc/namespaceirc.html new file mode 100644 index 000000000..fe1a06e8c --- /dev/null +++ b/docs/module-doc/namespaceirc.html @@ -0,0 +1,57 @@ + + +InspIRCd: irc Namespace Reference + + + + +

    irc Namespace Reference

    The irc namespace contains a number of helper classes. +More... +

    + + + + + + + + + + +

    Compounds

    struct  irc_char_traits
     The irc_char_traits class is used for RFC-style comparison of strings. More...


    Typedefs

    typedef basic_string< char,
    + irc_char_traits, allocator<
    + char > > 
    string
     This typedef declares irc::string based upon irc_char_traits.

    +


    Detailed Description

    +The irc namespace contains a number of helper classes.

    Typedef Documentation

    +

    + + + + +
    + + +
    typedef basic_string<char, irc_char_traits, allocator<char> > irc::string +
    +
    + + + + + +
    +   + + +

    +This typedef declares irc::string based upon irc_char_traits. +

    + +

    +Definition at line 111 of file hashcomp.h.

    +


    Generated on Sun May 15 17:03:56 2005 for InspIRCd by + +doxygen +1.3.3
    + + diff --git a/docs/module-doc/namespacemembers.html b/docs/module-doc/namespacemembers.html new file mode 100644 index 000000000..455fb3f7c --- /dev/null +++ b/docs/module-doc/namespacemembers.html @@ -0,0 +1,19 @@ + + +InspIRCd: Namespace Member Index + + + + + + +

    +Here is a list of all namespace members with links to the namespace documentation for each member:

      +
    • string +: irc
    +
    Generated on Sun May 15 17:03:57 2005 for InspIRCd by + +doxygen +1.3.3
    + + diff --git a/docs/module-doc/namespacemembers_type.html b/docs/module-doc/namespacemembers_type.html new file mode 100644 index 000000000..c7b742c84 --- /dev/null +++ b/docs/module-doc/namespacemembers_type.html @@ -0,0 +1,19 @@ + + +InspIRCd: Namespace Member Index + + + + + + +

    +

      +
    • string +: irc
    +
    Generated on Sun May 15 17:03:57 2005 for InspIRCd by + +doxygen +1.3.3
    + + diff --git a/docs/module-doc/namespacenspace.html b/docs/module-doc/namespacenspace.html index 7a733dbb4..3106c8370 100644 --- a/docs/module-doc/namespacenspace.html +++ b/docs/module-doc/namespacenspace.html @@ -4,7 +4,7 @@ - +

    nspace Namespace Reference

    @@ -15,7 +15,7 @@
    struct  nspace.hash< string >
    -


    Generated on Fri May 13 15:50:10 2005 for InspIRCd by +
    Generated on Sun May 15 17:03:56 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/namespaces.html b/docs/module-doc/namespaces.html index ad50a7a14..3083039d3 100644 --- a/docs/module-doc/namespaces.html +++ b/docs/module-doc/namespaces.html @@ -4,12 +4,13 @@ - +

    InspIRCd Namespace List

    Here is a list of all namespaces with brief descriptions: +
    ircThe irc namespace contains a number of helper classes
    nspace
    std
    -
    Generated on Fri May 13 15:50:10 2005 for InspIRCd by +
    Generated on Sun May 15 17:03:56 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/namespacestd.html b/docs/module-doc/namespacestd.html index 7b2a1dced..877b08682 100644 --- a/docs/module-doc/namespacestd.html +++ b/docs/module-doc/namespacestd.html @@ -4,13 +4,13 @@ - +

    std Namespace Reference

    -


    Generated on Fri May 13 15:50:10 2005 for InspIRCd by +
    Generated on Sun May 15 17:03:57 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/servers_8cpp-source.html b/docs/module-doc/servers_8cpp-source.html index f77ed551a..d3ece0aa5 100644 --- a/docs/module-doc/servers_8cpp-source.html +++ b/docs/module-doc/servers_8cpp-source.html @@ -4,7 +4,7 @@ - +

    servers.cpp

    Go to the documentation of this file.
    00001 /*       +------------------------------------+
     00002  *       | Inspire Internet Relay Chat Daemon |
     00003  *       +------------------------------------+
    @@ -27,43 +27,44 @@
     00020 #include <stdio.h>
     00021 #include <map>
     00022 #include "inspstring.h"
    -00023 
    -00024 extern time_t TIME;
    -00025 
    -00026 serverrec::serverrec()
    -00027 {
    -00028         strlcpy(name,"",256);
    -00029         pingtime = 0;
    -00030         lastping = TIME;
    -00031         usercount_i = usercount = opercount = version = 0;
    -00032         hops_away = 1;
    -00033         signon = TIME;
    -00034         jupiter = false;
    -00035         fd = 0;
    -00036         sync_soon = false;
    -00037         strlcpy(nickserv,"",NICKMAX);
    -00038 }
    -00039 
    -00040  
    -00041 serverrec::~serverrec()
    -00042 {
    -00043 }
    -00044 
    -00045 serverrec::serverrec(char* n, long ver, bool jupe)
    -00046 {
    -00047         strlcpy(name,n,256);
    -00048         lastping = TIME;
    -00049         usercount_i = usercount = opercount = 0;
    -00050         version = ver;
    -00051         hops_away = 1;
    -00052         signon = TIME;
    -00053         jupiter = jupe;
    -00054         fd = 0;
    -00055         sync_soon = false;
    -00056         strlcpy(nickserv,"",NICKMAX);
    -00057 }
    -00058 
    -

    Generated on Fri May 13 15:48:42 2005 for InspIRCd by +00023 #include "helperfuncs.h" +00024 +00025 extern time_t TIME; +00026 +00027 serverrec::serverrec() +00028 { +00029 strlcpy(name,"",256); +00030 pingtime = 0; +00031 lastping = TIME; +00032 usercount_i = usercount = opercount = version = 0; +00033 hops_away = 1; +00034 signon = TIME; +00035 jupiter = false; +00036 fd = 0; +00037 sync_soon = false; +00038 strlcpy(nickserv,"",NICKMAX); +00039 } +00040 +00041 +00042 serverrec::~serverrec() +00043 { +00044 } +00045 +00046 serverrec::serverrec(char* n, long ver, bool jupe) +00047 { +00048 strlcpy(name,n,256); +00049 lastping = TIME; +00050 usercount_i = usercount = opercount = 0; +00051 version = ver; +00052 hops_away = 1; +00053 signon = TIME; +00054 jupiter = jupe; +00055 fd = 0; +00056 sync_soon = false; +00057 strlcpy(nickserv,"",NICKMAX); +00058 } +00059 +

    Generated on Sun May 15 17:02:06 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/servers_8cpp.html b/docs/module-doc/servers_8cpp.html index 7e3ea1822..5c49966dd 100644 --- a/docs/module-doc/servers_8cpp.html +++ b/docs/module-doc/servers_8cpp.html @@ -4,13 +4,14 @@ - +

    servers.cpp File Reference

    #include "inspircd_config.h"
    #include "servers.h"
    #include "inspircd.h"
    #include <stdio.h>
    #include <map>
    #include "inspstring.h"
    +#include "helperfuncs.h"

    Include dependency graph for servers.cpp:

    Include dependency graph
    @@ -47,10 +48,10 @@ Include dependency graph for servers.cpp:

    24 of file servers.cpp. +Definition at line 25 of file servers.cpp. -
    Generated on Fri May 13 15:49:11 2005 for InspIRCd by +
    Generated on Sun May 15 17:02:45 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/servers_8cpp__incl.gif b/docs/module-doc/servers_8cpp__incl.gif index 035914c55..6158892d6 100644 Binary files a/docs/module-doc/servers_8cpp__incl.gif and b/docs/module-doc/servers_8cpp__incl.gif differ diff --git a/docs/module-doc/servers_8h-source.html b/docs/module-doc/servers_8h-source.html index e27f582cc..d5780b3e0 100644 --- a/docs/module-doc/servers_8h-source.html +++ b/docs/module-doc/servers_8h-source.html @@ -4,7 +4,7 @@ - +

    servers.h

    Go to the documentation of this file.
    00001 /*       +------------------------------------+
     00002  *       | Inspire Internet Relay Chat Daemon |
     00003  *       +------------------------------------+
    @@ -61,7 +61,7 @@
     00082 
     00083 #endif
     00084 
    -

    Generated on Fri May 13 15:48:42 2005 for InspIRCd by +

    Generated on Sun May 15 17:02:06 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/servers_8h.html b/docs/module-doc/servers_8h.html index cc8c8ea62..1ad696e14 100644 --- a/docs/module-doc/servers_8h.html +++ b/docs/module-doc/servers_8h.html @@ -4,7 +4,7 @@ - +

    servers.h File Reference

    #include "inspircd_config.h"
    #include "connection.h"
    #include <string>
    @@ -86,7 +86,7 @@ Definition at line 25 of Definition at line 26 of file servers.h. -
    Generated on Fri May 13 15:49:13 2005 for InspIRCd by +
    Generated on Sun May 15 17:02:47 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/structInAddr__HashComp-members.html b/docs/module-doc/structInAddr__HashComp-members.html index 3a68f92cc..ccb39f559 100644 --- a/docs/module-doc/structInAddr__HashComp-members.html +++ b/docs/module-doc/structInAddr__HashComp-members.html @@ -4,10 +4,10 @@ - +

    InAddr_HashComp Member List

    This is the complete list of members for InAddr_HashComp, including all inherited members. - -
    operator()(const in_addr &s1, const in_addr &s2) constInAddr_HashComp [inline]

    Generated on Fri May 13 15:49:40 2005 for InspIRCd by + operator()(const in_addr &s1, const in_addr &s2) constInAddr_HashComp +
    Generated on Sun May 15 17:03:29 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/structInAddr__HashComp.html b/docs/module-doc/structInAddr__HashComp.html index 8e0f35bb7..4aebb1d97 100644 --- a/docs/module-doc/structInAddr__HashComp.html +++ b/docs/module-doc/structInAddr__HashComp.html @@ -4,14 +4,27 @@ - -

    InAddr_HashComp Struct Reference

    List of all members. + +

    InAddr_HashComp Struct Reference

    This class returns true if two in_addr structs match. +More... +

    +#include <hashcomp.h> +

    +List of all members.

    +

    Public Member Functions

    bool operator() (const in_addr &s1, const in_addr &s2) const
     The operator () does the actual comparison in hash_map.

    -

    Member Function Documentation

    +

    Detailed Description

    +This class returns true if two in_addr structs match. +

    +Checking is done by copying both into a size_t then doing a numeric comparison of the two. +

    + +

    +Definition at line 71 of file hashcomp.h.


    Member Function Documentation

    @@ -32,7 +45,7 @@ - +
    const [inline] const
    @@ -47,25 +60,14 @@

    - -

    -Definition at line 171 of file modules.cpp. +The operator () does the actual comparison in hash_map.

    -

    00172         {
    -00173                 size_t q;
    -00174                 size_t p;
    -00175                 
    -00176                 memcpy(&q,&s1,sizeof(size_t));
    -00177                 memcpy(&p,&s2,sizeof(size_t));
    -00178                 
    -00179                 return (q == p);
    -00180         }
    -
    +
    The documentation for this struct was generated from the following file: -
    Generated on Fri May 13 15:49:40 2005 for InspIRCd by +
  • hashcomp.h +
    Generated on Sun May 15 17:03:29 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/structStrHashComp-members.html b/docs/module-doc/structStrHashComp-members.html index 7e1c81f5c..98853fc0d 100644 --- a/docs/module-doc/structStrHashComp-members.html +++ b/docs/module-doc/structStrHashComp-members.html @@ -4,10 +4,10 @@ - +

    StrHashComp Member List

    This is the complete list of members for StrHashComp, including all inherited members. - -
    operator()(const string &s1, const string &s2) constStrHashComp [inline]

    Generated on Fri May 13 15:49:57 2005 for InspIRCd by + operator()(const string &s1, const string &s2) constStrHashComp +
    Generated on Sun May 15 17:03:46 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/structStrHashComp.html b/docs/module-doc/structStrHashComp.html index 9c06b5618..23f3e82ef 100644 --- a/docs/module-doc/structStrHashComp.html +++ b/docs/module-doc/structStrHashComp.html @@ -4,14 +4,27 @@ - -

    StrHashComp Struct Reference

    List of all members. + +

    StrHashComp Struct Reference

    This class returns true if two strings match. +More... +

    +#include <hashcomp.h> +

    +List of all members.

    +

    Public Member Functions

    bool operator() (const string &s1, const string &s2) const
     The operator () does the actual comparison in hash_map.

    -

    Member Function Documentation

    +

    Detailed Description

    +This class returns true if two strings match. +

    +Case sensitivity is ignored, and the RFC 'character set' is adhered to +

    + +

    +Definition at line 60 of file hashcomp.h.


    Member Function Documentation

    @@ -32,7 +45,7 @@ - +
    const [inline] const
    @@ -47,24 +60,14 @@

    - -

    -Definition at line 156 of file modules.cpp. +The operator () does the actual comparison in hash_map.

    -

    00157         {
    -00158                 char a[MAXBUF],b[MAXBUF];
    -00159                 strlcpy(a,s1.c_str(),MAXBUF);
    -00160                 strlcpy(b,s2.c_str(),MAXBUF);
    -00161                 strlower(a);
    -00162                 strlower(b);
    -00163                 return (strcasecmp(a,b) == 0);
    -00164         }
    -
    +
    The documentation for this struct was generated from the following file: -
    Generated on Fri May 13 15:49:57 2005 for InspIRCd by +
  • hashcomp.h +
    Generated on Sun May 15 17:03:46 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/structdns__ip4list-members.html b/docs/module-doc/structdns__ip4list-members.html index b6bdbb8eb..27dc1e726 100644 --- a/docs/module-doc/structdns__ip4list-members.html +++ b/docs/module-doc/structdns__ip4list-members.html @@ -4,11 +4,11 @@ - +

    dns_ip4list Member List

    This is the complete list of members for dns_ip4list, including all inherited members. -
    ipdns_ip4list
    nextdns_ip4list

    Generated on Fri May 13 15:49:31 2005 for InspIRCd by +
    Generated on Sun May 15 17:03:19 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/structdns__ip4list.html b/docs/module-doc/structdns__ip4list.html index 17168b2ec..c3001ad65 100644 --- a/docs/module-doc/structdns__ip4list.html +++ b/docs/module-doc/structdns__ip4list.html @@ -4,7 +4,7 @@ - +

    dns_ip4list Struct Reference

    #include <dns.h>

    Collaboration diagram for dns_ip4list:

    Collaboration graph
    @@ -67,7 +67,7 @@ Definition at line 28 of file
    The documentation for this struct was generated from the following file: -
    Generated on Fri May 13 15:49:31 2005 for InspIRCd by +
    Generated on Sun May 15 17:03:19 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/structirc_1_1irc__char__traits-members.html b/docs/module-doc/structirc_1_1irc__char__traits-members.html new file mode 100644 index 000000000..6d05351be --- /dev/null +++ b/docs/module-doc/structirc_1_1irc__char__traits-members.html @@ -0,0 +1,19 @@ + + +InspIRCd: Member List + + + + +

    irc::irc_char_traits Member List

    This is the complete list of members for irc::irc_char_traits, including all inherited members. + + + + + +
    compare(const char *str1, const char *str2, size_t n)irc::irc_char_traits [static]
    eq(char c1st, char c2nd)irc::irc_char_traits [static]
    find(const char *s1, int n, char c)irc::irc_char_traits [static]
    lt(char c1st, char c2nd)irc::irc_char_traits [static]
    ne(char c1st, char c2nd)irc::irc_char_traits [static]

    Generated on Sun May 15 17:03:56 2005 for InspIRCd by + +doxygen +1.3.3
    + + diff --git a/docs/module-doc/structirc_1_1irc__char__traits.html b/docs/module-doc/structirc_1_1irc__char__traits.html new file mode 100644 index 000000000..6953a5bdd --- /dev/null +++ b/docs/module-doc/structirc_1_1irc__char__traits.html @@ -0,0 +1,267 @@ + + +InspIRCd: irc::irc_char_traits struct Reference + + + + +

    irc::irc_char_traits Struct Reference

    The irc_char_traits class is used for RFC-style comparison of strings. +More... +

    +#include <hashcomp.h> +

    +Inheritance diagram for irc::irc_char_traits:

    Inheritance graph
    + + + +
    [legend]
    Collaboration diagram for irc::irc_char_traits:

    Collaboration graph
    + + + +
    [legend]
    List of all members. + + + + + + + + + + + + + + + + + +

    Static Public Member Functions

    bool eq (char c1st, char c2nd)
     Check if two chars match.

    bool ne (char c1st, char c2nd)
     Check if two chars do NOT match.

    bool lt (char c1st, char c2nd)
     Check if one char is less than another.

    int compare (const char *str1, const char *str2, size_t n)
     Compare two strings of size n.

    const char * find (const char *s1, int n, char c)
     Find a char within a string up to position n.

    +

    Detailed Description

    +The irc_char_traits class is used for RFC-style comparison of strings. +

    +This class is used to implement irc::string, a case-insensitive, RFC- comparing string class. +

    + +

    +Definition at line 86 of file hashcomp.h.


    Member Function Documentation

    +

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    int irc::irc_char_traits::compare const char *  str1,
    const char *  str2,
    size_t  n
    [static]
    +
    + + + + + +
    +   + + +

    +Compare two strings of size n. +

    +

    +

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    bool irc::irc_char_traits::eq char  c1st,
    char  c2nd
    [static]
    +
    + + + + + +
    +   + + +

    +Check if two chars match. +

    +

    +

    + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    const char* irc::irc_char_traits::find const char *  s1,
    int  n,
    char  c
    [static]
    +
    + + + + + +
    +   + + +

    +Find a char within a string up to position n. +

    +

    +

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    bool irc::irc_char_traits::lt char  c1st,
    char  c2nd
    [static]
    +
    + + + + + +
    +   + + +

    +Check if one char is less than another. +

    +

    +

    + + + + +
    + + + + + + + + + + + + + + + + + + + +
    bool irc::irc_char_traits::ne char  c1st,
    char  c2nd
    [static]
    +
    + + + + + +
    +   + + +

    +Check if two chars do NOT match. +

    +

    +


    The documentation for this struct was generated from the following file: +
    Generated on Sun May 15 17:03:56 2005 for InspIRCd by + +doxygen +1.3.3
    + + diff --git a/docs/module-doc/structirc_1_1irc__char__traits__coll__graph.gif b/docs/module-doc/structirc_1_1irc__char__traits__coll__graph.gif new file mode 100644 index 000000000..514f37993 Binary files /dev/null and b/docs/module-doc/structirc_1_1irc__char__traits__coll__graph.gif differ diff --git a/docs/module-doc/structirc_1_1irc__char__traits__inherit__graph.gif b/docs/module-doc/structirc_1_1irc__char__traits__inherit__graph.gif new file mode 100644 index 000000000..514f37993 Binary files /dev/null and b/docs/module-doc/structirc_1_1irc__char__traits__inherit__graph.gif differ diff --git a/docs/module-doc/structnspace_1_1nspace_1_1hash_3_01in__addr_01_4-members.html b/docs/module-doc/structnspace_1_1nspace_1_1hash_3_01in__addr_01_4-members.html index 03b899b26..ef8948706 100644 --- a/docs/module-doc/structnspace_1_1nspace_1_1hash_3_01in__addr_01_4-members.html +++ b/docs/module-doc/structnspace_1_1nspace_1_1hash_3_01in__addr_01_4-members.html @@ -4,10 +4,10 @@ - +

    nspace::hash< in_addr > Member List

    This is the complete list of members for nspace::hash< in_addr >, including all inherited members. - -
    operator()(const struct in_addr &a) constnspace::hash< in_addr > [inline]

    Generated on Fri May 13 15:50:10 2005 for InspIRCd by + operator()(const struct in_addr &a) constnspace::hash< in_addr > +
    Generated on Sun May 15 17:03:56 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/structnspace_1_1nspace_1_1hash_3_01in__addr_01_4.html b/docs/module-doc/structnspace_1_1nspace_1_1hash_3_01in__addr_01_4.html index 8e0f5ea66..6326e91b6 100644 --- a/docs/module-doc/structnspace_1_1nspace_1_1hash_3_01in__addr_01_4.html +++ b/docs/module-doc/structnspace_1_1nspace_1_1hash_3_01in__addr_01_4.html @@ -4,8 +4,10 @@ - -

    nspace::hash< in_addr > Struct Template Reference

    List of all members. + +

    nspace::hash< in_addr > Struct Template Reference

    #include <hashcomp.h> +

    +List of all members.

    @@ -26,7 +28,7 @@ - +

    Public Member Functions

    size_t operator() (const struct in_addr &a) const
    const struct in_addr &  a  )  const [inline] const
    @@ -41,21 +43,12 @@

    - -

    -Definition at line 129 of file modules.cpp. -

    -

    00130                 {
    -00131                         size_t q;
    -00132                         memcpy(&q,&a,sizeof(size_t));
    -00133                         return q;
    -00134                 }
    -
    +
    The documentation for this struct was generated from the following file: -
    Generated on Fri May 13 15:50:10 2005 for InspIRCd by +
  • hashcomp.h +
    Generated on Sun May 15 17:03:56 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/structnspace_1_1nspace_1_1hash_3_01string_01_4-members.html b/docs/module-doc/structnspace_1_1nspace_1_1hash_3_01string_01_4-members.html index 78dc1f303..895c45869 100644 --- a/docs/module-doc/structnspace_1_1nspace_1_1hash_3_01string_01_4-members.html +++ b/docs/module-doc/structnspace_1_1nspace_1_1hash_3_01string_01_4-members.html @@ -4,10 +4,10 @@ - +

    nspace::hash< string > Member List

    This is the complete list of members for nspace::hash< string >, including all inherited members. - -
    operator()(const string &s) constnspace::hash< string > [inline]

    Generated on Fri May 13 15:50:10 2005 for InspIRCd by + operator()(const string &s) constnspace::hash< string > +
    Generated on Sun May 15 17:03:57 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/structnspace_1_1nspace_1_1hash_3_01string_01_4.html b/docs/module-doc/structnspace_1_1nspace_1_1hash_3_01string_01_4.html index ba45c743c..daa13eb4a 100644 --- a/docs/module-doc/structnspace_1_1nspace_1_1hash_3_01string_01_4.html +++ b/docs/module-doc/structnspace_1_1nspace_1_1hash_3_01string_01_4.html @@ -4,8 +4,10 @@ - -

    nspace::hash< string > Struct Template Reference

    List of all members. + +

    nspace::hash< string > Struct Template Reference

    #include <hashcomp.h> +

    +List of all members.

    @@ -26,7 +28,7 @@ - +

    Public Member Functions

    size_t operator() (const string &s) const
    const string &  s  )  const [inline] const
    @@ -41,23 +43,12 @@

    - -

    -Definition at line 142 of file modules.cpp. -

    -

    00143                 {
    -00144                         char a[MAXBUF];
    -00145                         static struct hash<const char *> strhash;
    -00146                         strlcpy(a,s.c_str(),MAXBUF);
    -00147                         strlower(a);
    -00148                         return strhash(a);
    -00149                 }
    -
    +
    The documentation for this struct was generated from the following file: -
    Generated on Fri May 13 15:50:10 2005 for InspIRCd by +
  • hashcomp.h +
    Generated on Sun May 15 17:03:57 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/tree.html b/docs/module-doc/tree.html index 74bb23f49..000e9bac7 100644 --- a/docs/module-doc/tree.html +++ b/docs/module-doc/tree.html @@ -120,6 +120,7 @@

    |o*connection.h

    |o*ctables.h

    |o*dns.h

    +

    |o*hashcomp.h

    |o*message.h

    |o*mode.h

    |o*modules.cpp

    @@ -135,6 +136,7 @@

    |o*Admin

    |o*BanItem

    |o*chanrec

    +

    |o*char_traits

    |o*classbase

    |o*command_t

    |o*ConfigReader

    @@ -153,6 +155,7 @@

    |o*InAddr_HashComp

    |o*Invited

    |o*InviteItem

    +

    |o*irc::irc_char_traits

    |o*ircd_connector

    |o*KLine

    |o*ModeParameter

    @@ -175,17 +178,21 @@
  • o+Class Hierarchy

    -

    |o+classbase

    +

    |o+char_traits

    +

    |o+classbase

    +

    ||o*Admin

    ||o*ConfigReader

    ||o*ConnectClass

    -

    ||o+Extensible

    -
    +

    ||o+Extensible

    +

    |||o*chanrec

    |||o*command_t

    -

    |||o+connection

    -
    +

    |||o+connection

    + @@ -193,8 +200,8 @@

    ||o*ExtMode

    ||o*FileReader

    -

    ||o+HostItem

    -
    +

    ||o+HostItem

    +

    |||o*BanItem

    |||o*ExemptItem

    |||\*InviteItem

    @@ -203,16 +210,16 @@

    ||o*ModeParameter

    ||o*Module

    ||o*ModuleFactory

    -

    ||o+ModuleMessage

    -
    +

    ||o+ModuleMessage

    +

    ||o*Server

    ||o*ucrec

    ||o*Version

    -

    ||\+XLine

    - diff --git a/docs/module-doc/users_8cpp-source.html b/docs/module-doc/users_8cpp-source.html index b1258eb0a..4e2e35443 100644 --- a/docs/module-doc/users_8cpp-source.html +++ b/docs/module-doc/users_8cpp-source.html @@ -4,7 +4,7 @@ - +

    users.cpp

    Go to the documentation of this file.
    00001 /*       +------------------------------------+
     00002  *       | Inspire Internet Relay Chat Daemon |
     00003  *       +------------------------------------+
    @@ -27,259 +27,265 @@
     00020 #include "inspircd.h"
     00021 #include <stdio.h>
     00022 #include "inspstring.h"
    -00023 
    -00024 extern std::stringstream config_f;
    -00025 
    -00026 extern time_t TIME;
    -00027 
    -00028 userrec::userrec()
    -00029 {
    -00030         // the PROPER way to do it, AVOID bzero at *ALL* costs
    -00031         strcpy(nick,"");
    -00032         strcpy(ip,"127.0.0.1");
    -00033         timeout = 0;
    -00034         strcpy(ident,"");
    -00035         strcpy(host,"");
    -00036         strcpy(dhost,"");
    -00037         strcpy(fullname,"");
    -00038         strcpy(modes,"");
    -00039         strcpy(server,"");
    -00040         strcpy(awaymsg,"");
    -00041         strcpy(oper,"");
    -00042         reset_due = TIME;
    -00043         lines_in = 0;
    -00044         fd = lastping = signon = idle_lastmsg = nping = registered = 0;
    -00045         flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0;
    -00046         haspassed = false;
    -00047         dns_done = false;
    -00048         recvq = "";
    -00049         sendq = "";
    -00050         strcpy(result,"");
    -00051         for (int i = 0; i < MAXCHANS; i++)
    -00052         {
    -00053                 this->chans[i].channel = NULL;
    -00054                 this->chans[i].uc_modes = 0;
    -00055         }
    -00056         invites.clear();
    -00057 }
    -00058 
    +00023 #include "helperfuncs.h"
    +00024 
    +00025 extern std::stringstream config_f;
    +00026 
    +00027 extern time_t TIME;
    +00028 
    +00029 userrec::userrec()
    +00030 {
    +00031         // the PROPER way to do it, AVOID bzero at *ALL* costs
    +00032         strcpy(nick,"");
    +00033         strcpy(ip,"127.0.0.1");
    +00034         timeout = 0;
    +00035         strcpy(ident,"");
    +00036         strcpy(host,"");
    +00037         strcpy(dhost,"");
    +00038         strcpy(fullname,"");
    +00039         strcpy(modes,"");
    +00040         strcpy(server,"");
    +00041         strcpy(awaymsg,"");
    +00042         strcpy(oper,"");
    +00043         reset_due = TIME;
    +00044         lines_in = 0;
    +00045         fd = lastping = signon = idle_lastmsg = nping = registered = 0;
    +00046         flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0;
    +00047         haspassed = false;
    +00048         dns_done = false;
    +00049         recvq = "";
    +00050         sendq = "";
    +00051         strcpy(result,"");
    +00052         for (int i = 0; i < MAXCHANS; i++)
    +00053         {
    +00054                 this->chans[i].channel = NULL;
    +00055                 this->chans[i].uc_modes = 0;
    +00056         }
    +00057         invites.clear();
    +00058 }
     00059 
    -00060  
    -00061 char* userrec::GetFullHost()
    -00062 {
    -00063         snprintf(result,MAXBUF,"%s!%s@%s",nick,ident,dhost);
    -00064         return result;
    -00065 }
    -00066 
    +00060 
    +00061  
    +00062 char* userrec::GetFullHost()
    +00063 {
    +00064         snprintf(result,MAXBUF,"%s!%s@%s",nick,ident,dhost);
    +00065         return result;
    +00066 }
     00067 
    -00068 char* userrec::GetFullRealHost()
    -00069 {
    -00070         snprintf(result,MAXBUF,"%s!%s@%s",nick,ident,host);
    -00071         return result;
    -00072 }
    -00073 
    -00074 bool userrec::IsInvited(char* channel)
    -00075 {
    -00076         for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
    -00077         {
    -00078                 if (i->channel) {
    -00079                         if (!strcasecmp(i->channel,channel))
    -00080                         {
    -00081                                 return true;
    -00082                         }
    -00083                 }
    -00084         }
    -00085         return false;
    -00086 }
    -00087 
    -00088 void userrec::InviteTo(char* channel)
    -00089 {
    -00090         Invited i;
    -00091         strlcpy(i.channel,channel,CHANMAX);
    -00092         invites.push_back(i);
    -00093 }
    -00094 
    -00095 void userrec::RemoveInvite(char* channel)
    -00096 {
    -00097         log(DEBUG,"Removing invites");
    -00098         if (channel)
    -00099         {
    -00100                 if (invites.size())
    -00101                 {
    -00102                         for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
    -00103                         {
    -00104                                 if (i->channel)
    -00105                                 {
    -00106                                         if (!strcasecmp(i->channel,channel))
    -00107                                         {
    -00108                                                 invites.erase(i);
    -00109                                                 return;
    -00110                                         }
    -00111                                 }
    -00112                         }
    -00113                 }
    -00114         }
    -00115 }
    -00116 
    -00117 bool userrec::HasPermission(char* command)
    -00118 {
    -00119         char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF];
    -00120         char* mycmd;
    -00121         char* savept;
    -00122         char* savept2;
    -00123         
    -00124         // are they even an oper at all?
    -00125         if (strchr(this->modes,'o'))
    -00126         {
    -00127                 log(DEBUG,"*** HasPermission: %s is an oper",this->nick);
    -00128                 for (int j =0; j < ConfValueEnum("type",&config_f); j++)
    -00129                 {
    -00130                         ConfValue("type","name",j,TypeName,&config_f);
    -00131                         if (!strcmp(TypeName,this->oper))
    -00132                         {
    -00133                                 log(DEBUG,"*** HasPermission: %s is an oper of type '%s'",this->nick,this->oper);
    -00134                                 ConfValue("type","classes",j,Classes,&config_f);
    -00135                                 char* myclass = strtok_r(Classes," ",&savept);
    -00136                                 while (myclass)
    -00137                                 {
    -00138                                         log(DEBUG,"*** HasPermission: checking classtype '%s'",myclass);
    -00139                                         for (int k =0; k < ConfValueEnum("class",&config_f); k++)
    -00140                                         {
    -00141                                                 ConfValue("class","name",k,ClassName,&config_f);
    -00142                                                 if (!strcmp(ClassName,myclass))
    -00143                                                 {
    -00144                                                         ConfValue("class","commands",k,CommandList,&config_f);
    -00145                                                         log(DEBUG,"*** HasPermission: found class named %s with commands: '%s'",ClassName,CommandList);
    -00146                                                         
    -00147                                                         
    -00148                                                         mycmd = strtok_r(CommandList," ",&savept2);
    -00149                                                         while (mycmd)
    -00150                                                         {
    -00151                                                                 if (!strcasecmp(mycmd,command))
    -00152                                                                 {
    -00153                                                                         log(DEBUG,"*** Command %s found, returning true",command);
    -00154                                                                         return true;
    -00155                                                                 }
    -00156                                                                 mycmd = strtok_r(NULL," ",&savept2);
    -00157                                                         }
    -00158                                                 }
    -00159                                         }
    -00160                                         myclass = strtok_r(NULL," ",&savept);
    -00161                                 }
    -00162                         }
    -00163                 }
    -00164         }
    -00165         return false;
    -00166 }
    -00167 
    -00168 
    -00169 bool userrec::AddBuffer(std::string a)
    -00170 {
    -00171         std::string b = "";
    -00172         for (int i = 0; i < a.length(); i++)
    -00173                 if ((a[i] != '\r') && (a[i] != '\0') && (a[i] != 7))
    -00174                         b = b + a[i];
    -00175         std::stringstream stream(recvq);
    -00176         stream << b;
    -00177         recvq = stream.str();
    -00178         int i = 0;
    -00179         // count the size of the first line in the buffer.
    -00180         while (i < recvq.length())
    -00181         {
    -00182                 if (recvq[i++] == '\n')
    -00183                         break;
    -00184         }
    -00185         if (recvq.length() > this->recvqmax)
    -00186         {
    -00187                 this->SetWriteError("RecvQ exceeded");
    -00188                 WriteOpers("*** User %s RecvQ of %d exceeds connect class maximum of %d",this->nick,recvq.length(),this->recvqmax);
    -00189         }
    -00190         // return false if we've had more than 600 characters WITHOUT
    -00191         // a carriage return (this is BAD, drop the socket)
    -00192         return (i < 600);
    -00193 }
    -00194 
    -00195 bool userrec::BufferIsReady()
    -00196 {
    -00197         for (int i = 0; i < recvq.length(); i++)
    -00198                 if (recvq[i] == '\n')
    -00199                         return true;
    -00200         return false;
    -00201 }
    -00202 
    -00203 void userrec::ClearBuffer()
    -00204 {
    -00205         recvq = "";
    -00206 }
    -00207 
    -00208 std::string userrec::GetBuffer()
    -00209 {
    -00210         if (recvq == "")
    -00211                 return "";
    -00212         char* line = (char*)recvq.c_str();
    -00213         std::string ret = "";
    -00214         while ((*line != '\n') && (strlen(line)))
    -00215         {
    -00216                 ret = ret + *line;
    -00217                 line++;
    -00218         }
    -00219         if ((*line == '\n') || (*line == '\r'))
    -00220                 line++;
    -00221         recvq = line;
    -00222         return ret;
    -00223 }
    -00224 
    -00225 void userrec::AddWriteBuf(std::string data)
    -00226 {
    -00227         if (this->GetWriteError() != "")
    -00228                 return;
    -00229         if (sendq.length() + data.length() > this->sendqmax)
    -00230         {
    -00231                 WriteOpers("*** User %s SendQ of %d exceeds connect class maximum of %d",this->nick,sendq.length() + data.length(),this->sendqmax);
    -00232                 this->SetWriteError("SendQ exceeded");
    -00233                 return;
    -00234         }
    -00235         std::stringstream stream;
    -00236         stream << sendq << data;
    -00237         sendq = stream.str();
    -00238 }
    -00239 
    -00240 // send AS MUCH OF THE USERS SENDQ as we are able to (might not be all of it)
    -00241 void userrec::FlushWriteBuf()
    -00242 {
    -00243         if (sendq.length())
    -00244         {
    -00245                 char* tb = (char*)this->sendq.c_str();
    -00246                 int n_sent = write(this->fd,tb,this->sendq.length());
    -00247                 if (n_sent == -1)
    -00248                 {
    -00249                         this->SetWriteError(strerror(errno));
    -00250                 }
    -00251                 else
    -00252                 {
    -00253                         // advance the queue
    -00254                         tb += n_sent;
    -00255                         this->sendq = tb;
    -00256                         // update the user's stats counters
    -00257                         this->bytes_out += n_sent;
    -00258                         this->cmds_out++;
    -00259                 }
    -00260         }
    -00261 }
    -00262 
    -00263 void userrec::SetWriteError(std::string error)
    -00264 {
    -00265         log(DEBUG,"Setting error string for %s to '%s'",this->nick,error.c_str());
    -00266         // don't try to set the error twice, its already set take the first string.
    -00267         if (this->WriteError == "")
    -00268                 this->WriteError = error;
    -00269 }
    -00270 
    -00271 std::string userrec::GetWriteError()
    -00272 {
    -00273         return this->WriteError;
    -00274 }
    -

    Generated on Fri May 13 15:48:42 2005 for InspIRCd by +00068 +00069 char* userrec::GetFullRealHost() +00070 { +00071 snprintf(result,MAXBUF,"%s!%s@%s",nick,ident,host); +00072 return result; +00073 } +00074 +00075 bool userrec::IsInvited(char* channel) +00076 { +00077 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) +00078 { +00079 if (i->channel) { +00080 if (!strcasecmp(i->channel,channel)) +00081 { +00082 return true; +00083 } +00084 } +00085 } +00086 return false; +00087 } +00088 +00089 InvitedList* userrec::GetInviteList() +00090 { +00091 return &invites; +00092 } +00093 +00094 void userrec::InviteTo(char* channel) +00095 { +00096 Invited i; +00097 strlcpy(i.channel,channel,CHANMAX); +00098 invites.push_back(i); +00099 } +00100 +00101 void userrec::RemoveInvite(char* channel) +00102 { +00103 log(DEBUG,"Removing invites"); +00104 if (channel) +00105 { +00106 if (invites.size()) +00107 { +00108 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) +00109 { +00110 if (i->channel) +00111 { +00112 if (!strcasecmp(i->channel,channel)) +00113 { +00114 invites.erase(i); +00115 return; +00116 } +00117 } +00118 } +00119 } +00120 } +00121 } +00122 +00123 bool userrec::HasPermission(char* command) +00124 { +00125 char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF]; +00126 char* mycmd; +00127 char* savept; +00128 char* savept2; +00129 +00130 // are they even an oper at all? +00131 if (strchr(this->modes,'o')) +00132 { +00133 log(DEBUG,"*** HasPermission: %s is an oper",this->nick); +00134 for (int j =0; j < ConfValueEnum("type",&config_f); j++) +00135 { +00136 ConfValue("type","name",j,TypeName,&config_f); +00137 if (!strcmp(TypeName,this->oper)) +00138 { +00139 log(DEBUG,"*** HasPermission: %s is an oper of type '%s'",this->nick,this->oper); +00140 ConfValue("type","classes",j,Classes,&config_f); +00141 char* myclass = strtok_r(Classes," ",&savept); +00142 while (myclass) +00143 { +00144 log(DEBUG,"*** HasPermission: checking classtype '%s'",myclass); +00145 for (int k =0; k < ConfValueEnum("class",&config_f); k++) +00146 { +00147 ConfValue("class","name",k,ClassName,&config_f); +00148 if (!strcmp(ClassName,myclass)) +00149 { +00150 ConfValue("class","commands",k,CommandList,&config_f); +00151 log(DEBUG,"*** HasPermission: found class named %s with commands: '%s'",ClassName,CommandList); +00152 +00153 +00154 mycmd = strtok_r(CommandList," ",&savept2); +00155 while (mycmd) +00156 { +00157 if (!strcasecmp(mycmd,command)) +00158 { +00159 log(DEBUG,"*** Command %s found, returning true",command); +00160 return true; +00161 } +00162 mycmd = strtok_r(NULL," ",&savept2); +00163 } +00164 } +00165 } +00166 myclass = strtok_r(NULL," ",&savept); +00167 } +00168 } +00169 } +00170 } +00171 return false; +00172 } +00173 +00174 +00175 bool userrec::AddBuffer(std::string a) +00176 { +00177 std::string b = ""; +00178 for (int i = 0; i < a.length(); i++) +00179 if ((a[i] != '\r') && (a[i] != '\0') && (a[i] != 7)) +00180 b = b + a[i]; +00181 std::stringstream stream(recvq); +00182 stream << b; +00183 recvq = stream.str(); +00184 int i = 0; +00185 // count the size of the first line in the buffer. +00186 while (i < recvq.length()) +00187 { +00188 if (recvq[i++] == '\n') +00189 break; +00190 } +00191 if (recvq.length() > this->recvqmax) +00192 { +00193 this->SetWriteError("RecvQ exceeded"); +00194 WriteOpers("*** User %s RecvQ of %d exceeds connect class maximum of %d",this->nick,recvq.length(),this->recvqmax); +00195 } +00196 // return false if we've had more than 600 characters WITHOUT +00197 // a carriage return (this is BAD, drop the socket) +00198 return (i < 600); +00199 } +00200 +00201 bool userrec::BufferIsReady() +00202 { +00203 for (int i = 0; i < recvq.length(); i++) +00204 if (recvq[i] == '\n') +00205 return true; +00206 return false; +00207 } +00208 +00209 void userrec::ClearBuffer() +00210 { +00211 recvq = ""; +00212 } +00213 +00214 std::string userrec::GetBuffer() +00215 { +00216 if (recvq == "") +00217 return ""; +00218 char* line = (char*)recvq.c_str(); +00219 std::string ret = ""; +00220 while ((*line != '\n') && (strlen(line))) +00221 { +00222 ret = ret + *line; +00223 line++; +00224 } +00225 if ((*line == '\n') || (*line == '\r')) +00226 line++; +00227 recvq = line; +00228 return ret; +00229 } +00230 +00231 void userrec::AddWriteBuf(std::string data) +00232 { +00233 if (this->GetWriteError() != "") +00234 return; +00235 if (sendq.length() + data.length() > this->sendqmax) +00236 { +00237 WriteOpers("*** User %s SendQ of %d exceeds connect class maximum of %d",this->nick,sendq.length() + data.length(),this->sendqmax); +00238 this->SetWriteError("SendQ exceeded"); +00239 return; +00240 } +00241 std::stringstream stream; +00242 stream << sendq << data; +00243 sendq = stream.str(); +00244 } +00245 +00246 // send AS MUCH OF THE USERS SENDQ as we are able to (might not be all of it) +00247 void userrec::FlushWriteBuf() +00248 { +00249 if (sendq.length()) +00250 { +00251 char* tb = (char*)this->sendq.c_str(); +00252 int n_sent = write(this->fd,tb,this->sendq.length()); +00253 if (n_sent == -1) +00254 { +00255 this->SetWriteError(strerror(errno)); +00256 } +00257 else +00258 { +00259 // advance the queue +00260 tb += n_sent; +00261 this->sendq = tb; +00262 // update the user's stats counters +00263 this->bytes_out += n_sent; +00264 this->cmds_out++; +00265 } +00266 } +00267 } +00268 +00269 void userrec::SetWriteError(std::string error) +00270 { +00271 log(DEBUG,"Setting error string for %s to '%s'",this->nick,error.c_str()); +00272 // don't try to set the error twice, its already set take the first string. +00273 if (this->WriteError == "") +00274 this->WriteError = error; +00275 } +00276 +00277 std::string userrec::GetWriteError() +00278 { +00279 return this->WriteError; +00280 } +

    Generated on Sun May 15 17:02:06 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/users_8cpp.html b/docs/module-doc/users_8cpp.html index 1fcfca347..8a30d8f8f 100644 --- a/docs/module-doc/users_8cpp.html +++ b/docs/module-doc/users_8cpp.html @@ -4,13 +4,14 @@ - +

    users.cpp File Reference

    #include "inspircd_config.h"
    #include "channels.h"
    #include "users.h"
    #include "inspircd.h"
    #include <stdio.h>
    #include "inspstring.h"
    +#include "helperfuncs.h"

    Include dependency graph for users.cpp:

    Include dependency graph
    @@ -50,7 +51,7 @@ Include dependency graph for users.cpp:

    24 of file users.cpp. +Definition at line 25 of file users.cpp.

    @@ -74,10 +75,10 @@ Definition at line 24 of

    -Definition at line 26 of file users.cpp. +Definition at line 27 of file users.cpp. -


    Generated on Fri May 13 15:49:14 2005 for InspIRCd by +
    Generated on Sun May 15 17:02:49 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/users_8cpp__incl.gif b/docs/module-doc/users_8cpp__incl.gif index 4203b57eb..97c4fd610 100644 Binary files a/docs/module-doc/users_8cpp__incl.gif and b/docs/module-doc/users_8cpp__incl.gif differ diff --git a/docs/module-doc/users_8h-source.html b/docs/module-doc/users_8h-source.html index a07350688..b42643395 100644 --- a/docs/module-doc/users_8h-source.html +++ b/docs/module-doc/users_8h-source.html @@ -4,7 +4,7 @@ - +

    users.h

    Go to the documentation of this file.
    00001 /*       +------------------------------------+
     00002  *       | Inspire Internet Relay Chat Daemon |
     00003  *       +------------------------------------+
    @@ -165,22 +165,23 @@
     00302 
     00309         void FlushWriteBuf();
     00310 
    -00311 };
    -00312 
    -00315 class WhoWasUser
    -00316 {
    -00317  public:
    -00318         char nick[NICKMAX];
    -00319         char ident[16];
    -00320         char dhost[160];
    -00321         char host[160];
    -00322         char fullname[128];
    -00323         char server[256];
    -00324         time_t signon;
    -00325 };
    -00326 
    -00327 #endif
    -

    Generated on Fri May 13 15:48:42 2005 for InspIRCd by +00313 InvitedList* GetInviteList(); +00314 }; +00315 +00318 class WhoWasUser +00319 { +00320 public: +00321 char nick[NICKMAX]; +00322 char ident[16]; +00323 char dhost[160]; +00324 char host[160]; +00325 char fullname[128]; +00326 char server[256]; +00327 time_t signon; +00328 }; +00329 +00330 #endif +

    Generated on Sun May 15 17:02:06 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/users_8h.html b/docs/module-doc/users_8h.html index 2770d9134..7dbbb6bb4 100644 --- a/docs/module-doc/users_8h.html +++ b/docs/module-doc/users_8h.html @@ -4,7 +4,7 @@ - +

    users.h File Reference

    #include "inspircd_config.h"
    #include "channels.h"
    #include "connection.h"
    @@ -262,10 +262,12 @@ Holds a complete list of all channels to which a user has been invited and has n

    -Definition at line 94 of file users.h. +Definition at line 94 of file users.h. +

    +Referenced by userrec::GetInviteList(). -


    Generated on Fri May 13 15:49:16 2005 for InspIRCd by +
    Generated on Sun May 15 17:02:52 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/xline_8h-source.html b/docs/module-doc/xline_8h-source.html index d5bcc75f0..66d7e8b30 100644 --- a/docs/module-doc/xline_8h-source.html +++ b/docs/module-doc/xline_8h-source.html @@ -4,7 +4,7 @@ - +

    xline.h

    Go to the documentation of this file.
    00001 /*       +------------------------------------+
     00002  *       | Inspire Internet Relay Chat Daemon |
     00003  *       +------------------------------------+
    @@ -123,7 +123,7 @@
     00157 void sync_xlines(serverrec* serv, char* tcp_host);
     00158 
     00159 #endif
    -

    Generated on Fri May 13 15:48:42 2005 for InspIRCd by +

    Generated on Sun May 15 17:02:06 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/xline_8h.html b/docs/module-doc/xline_8h.html index e8ca32b26..82b18ac7a 100644 --- a/docs/module-doc/xline_8h.html +++ b/docs/module-doc/xline_8h.html @@ -4,7 +4,7 @@ - +

    xline.h File Reference

    #include <typeinfo>
    #include <iostream>
    #include <string>
    @@ -159,7 +159,7 @@ This graph shows which files directly or indirectly include this file:

    -Referenced by Server::AddELine(). +Referenced by Server::AddELine().

    @@ -211,7 +211,7 @@ Referenced by Server::AddEL

    -Referenced by Server::AddGLine(). +Referenced by Server::AddGLine().

    @@ -263,7 +263,7 @@ Referenced by Server::AddGL

    -Referenced by Server::AddKLine(). +Referenced by Server::AddKLine().

    @@ -315,7 +315,7 @@ Referenced by Server::AddKL

    -Referenced by Server::AddQLine(). +Referenced by Server::AddQLine().

    @@ -367,7 +367,7 @@ Referenced by Server::AddQL

    -Referenced by Server::AddZLine(). +Referenced by Server::AddZLine().

    @@ -426,7 +426,7 @@ Referenced by Server::AddZL

    -Referenced by Server::DelELine(). +Referenced by Server::DelELine().

    @@ -457,7 +457,7 @@ Referenced by Server::DelEL

    -Referenced by Server::DelGLine(). +Referenced by Server::DelGLine().

    @@ -488,7 +488,7 @@ Referenced by Server::DelGL

    -Referenced by Server::DelKLine(). +Referenced by Server::DelKLine().

    @@ -519,7 +519,7 @@ Referenced by Server::DelKL

    -Referenced by Server::DelQLine(). +Referenced by Server::DelQLine().

    @@ -550,7 +550,7 @@ Referenced by Server::DelQL

    -Referenced by Server::DelZLine(). +Referenced by Server::DelZLine().

    @@ -1109,7 +1109,7 @@ Referenced by Server::DelZL -


    Generated on Fri May 13 15:49:17 2005 for InspIRCd by +
    Generated on Sun May 15 17:02:54 2005 for InspIRCd by doxygen 1.3.3
    -- cgit v1.2.3