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

InspIRCd Compound List

Here are the classes, structs, unions and interfaces with brief descriptions: + @@ -49,7 +50,7 @@
AdminHolds /ADMIN data This class contains the admin details of the local server
BanItemA subclass of HostItem designed to hold channel bans (+b)
BoolSetBoolSet is a utility class designed to hold eight bools in a bitmask
chanrecHolds all relevent information for a channel
char_traits
classbaseThe base class for all inspircd classes
XLineXLine is the base class for ban lines such as G lines and K lines
ZLineZLine class
-
Generated on Wed May 25 22:02:44 2005 for InspIRCd by +
Generated on Mon May 30 05:16:22 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 437322d94..9a2058149 100644 --- a/docs/module-doc/base_8h-source.html +++ b/docs/module-doc/base_8h-source.html @@ -53,9 +53,40 @@ 00088 char* GetExt(std::string key); 00089 }; 00090 -00091 #endif -00092 -
Generated on Wed May 25 22:02:04 2005 for InspIRCd by +00091 const int bitfields[] = {1,2,4,8,16,32,64,128}; +00092 const int inverted_bitfields[] = {~1,~2,~4,~8,~16,~32,~64,~128}; +00093 +00098 class BoolSet +00099 { +00100 char bits; +00101 +00102 public: +00103 +00106 BoolSet(); +00107 +00110 BoolSet(char bitmask); +00111 +00116 void Set(int number); +00117 +00124 bool Get(int number); +00125 +00130 void Unset(int number); +00131 +00136 void Invert(int number); +00137 +00140 bool operator==(BoolSet other); +00141 +00144 BoolSet operator|(BoolSet other); +00145 +00148 BoolSet operator&(BoolSet other); +00149 +00152 bool operator=(BoolSet other); +00153 }; +00154 +00155 +00156 #endif +00157 +
Generated on Mon May 30 05:15:18 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 d29ee2284..6da6ca04e 100644 --- a/docs/module-doc/base_8h.html +++ b/docs/module-doc/base_8h.html @@ -26,6 +26,9 @@ This graph shows which files directly or indirectly include this file:

Go to the source code of this file. + + + @@ -35,6 +38,11 @@ This graph shows which files directly or indirectly include this file:

+ + + + +

Compounds

class  BoolSet
 BoolSet is a utility class designed to hold eight bools in a bitmask. More...

class  classbase
 The base class for all inspircd classes. More...


Typedefs

typedef void * VoidPointer

Variables

const int bitfields [] = {1,2,4,8,16,32,64,128}
const int inverted_bitfields [] = {~1,~2,~4,~8,~16,~32,~64,~128}

Typedef Documentation

@@ -61,7 +69,56 @@ This graph shows which files directly or indirectly include this file:

25 of file base.h. -
Generated on Wed May 25 22:02:07 2005 for InspIRCd by +

Variable Documentation

+

+ + + + +
+ + +
const int bitfields[] = {1,2,4,8,16,32,64,128} +
+
+ + + + + +
+   + + +

+ +

+Definition at line 91 of file base.h.

+

+ + + + +
+ + +
const int inverted_bitfields[] = {~1,~2,~4,~8,~16,~32,~64,~128} +
+
+ + + + + +
+   + + +

+ +

+Definition at line 92 of file base.h.

+


Generated on Mon May 30 05:15:25 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 5c935020a..91c8beca5 100644 --- a/docs/module-doc/channels_8cpp-source.html +++ b/docs/module-doc/channels_8cpp-source.html @@ -23,10 +23,10 @@ 00016 00017 using namespace std; 00018 -00019 #include "inspircd.h" -00020 #include "inspircd_io.h" -00021 #include "inspircd_util.h" -00022 #include "inspircd_config.h" +00019 #include "inspircd_config.h" +00020 #include "inspircd.h" +00021 #include "inspircd_io.h" +00022 #include "inspircd_util.h" 00023 #include <unistd.h> 00024 #include <sys/errno.h> 00025 #include <sys/ioctl.h> @@ -229,7 +229,7 @@ 00222 { 00223 return &internal_userlist; 00224 } -
Generated on Wed May 25 22:02:04 2005 for InspIRCd by +
Generated on Mon May 30 05:15:18 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 fc9858165..4d76c273f 100644 --- a/docs/module-doc/channels_8cpp.html +++ b/docs/module-doc/channels_8cpp.html @@ -5,10 +5,10 @@ -

channels.cpp File Reference

#include "inspircd.h"
+

channels.cpp File Reference

#include "inspircd_config.h"
+#include "inspircd.h"
#include "inspircd_io.h"
#include "inspircd_util.h"
-#include "inspircd_config.h"
#include <unistd.h>
#include <sys/errno.h>
#include <sys/ioctl.h>
@@ -37,12 +37,12 @@

Include dependency graph for channels.cpp:

Include dependency graph
- - + + - + @@ -164,7 +164,7 @@ Definition at line 55 -
char AdminEmail[MAXBUF] + char AdminEmail[MAXBUF]
@@ -188,7 +188,7 @@ Definition at line 67 -
char AdminName[MAXBUF] + char AdminName[MAXBUF]
@@ -212,7 +212,7 @@ Definition at line 66 -
char AdminNick[MAXBUF] + char AdminNick[MAXBUF]
@@ -236,7 +236,7 @@ Definition at line 68 -
std::vector<long> auth_cookies + std::vector<long> auth_cookies
@@ -260,7 +260,7 @@ Definition at line 94 -
int boundPortCount + int boundPortCount
@@ -301,7 +301,7 @@ Definition at line 88

Definition at line 95 of file channels.cpp.

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

@@ -336,7 +336,7 @@ Referenced by chanrec::Get -
int debugging + int debugging
@@ -360,7 +360,7 @@ Definition at line
77 -
int defaultRoute + int defaultRoute
@@ -384,7 +384,7 @@ Definition at line 92 -
int DieDelay + int DieDelay
@@ -408,7 +408,7 @@ Definition at line 80 -
char diepass[MAXBUF] + char diepass[MAXBUF]
@@ -432,7 +432,7 @@ Definition at line 69 -
char DieValue[MAXBUF] + char DieValue[MAXBUF]
@@ -480,7 +480,7 @@ Definition at line 60 -
char list[MAXBUF] + char list[MAXBUF]
@@ -497,7 +497,7 @@ Definition at line 60

Definition at line 73 of file channels.cpp.

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

@@ -506,7 +506,7 @@ Referenced by Server::GetUs -
FILE* log_file + FILE* log_file
@@ -530,7 +530,7 @@ Definition at line
99 -
int LogLevel + int LogLevel
@@ -554,7 +554,7 @@ Definition at line 62 -
int MaxWhoResults + int MaxWhoResults
@@ -619,9 +619,9 @@ Referenced by IsRoutable()<

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

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

@@ -630,7 +630,7 @@ Referenced by Server::FindM -
std::vector<std::string> module_names + std::vector<std::string> module_names
@@ -647,7 +647,7 @@ Referenced by
Server::FindM

Definition at line 86 of file channels.cpp.

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

@@ -673,7 +673,7 @@ Referenced by Server::FindM

Definition at line 59 of file channels.cpp.

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

@@ -682,7 +682,7 @@ Referenced by Server::FindM -
char motd[MAXBUF] + char motd[MAXBUF]
@@ -706,7 +706,7 @@ Definition at line
71 -
time_t nb_start + time_t nb_start
@@ -730,7 +730,7 @@ Definition at line 84 -
int NetBufferSize + int NetBufferSize
@@ -754,7 +754,7 @@ Definition at line 82 -
char Network[MAXBUF] + char Network[MAXBUF]
@@ -778,7 +778,7 @@ Definition at line 64 -
int portCount + int portCount
@@ -802,7 +802,7 @@ Definition at line 89 -
int ports[MAXSOCKS] + int ports[MAXSOCKS]
@@ -826,7 +826,7 @@ Definition at line 91 -
char PrefixQuit[MAXBUF] + char PrefixQuit[MAXBUF]
@@ -850,7 +850,7 @@ Definition at line 74 -
char restartpass[MAXBUF] + char restartpass[MAXBUF]
@@ -874,7 +874,7 @@ Definition at line 70 -
char rules[MAXBUF] + char rules[MAXBUF]
@@ -898,7 +898,7 @@ Definition at line 72 -
char ServerDesc[MAXBUF] + char ServerDesc[MAXBUF]
@@ -922,7 +922,7 @@ Definition at line 65 -
char ServerName[MAXBUF] + char ServerName[MAXBUF]
@@ -937,7 +937,9 @@ Definition at line 65

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

+Referenced by userrec::userrec().

@@ -946,7 +948,7 @@ Definition at line 63 -
int SERVERportCount + int SERVERportCount
@@ -970,7 +972,7 @@ Definition at line 90 -
time_t startup_time + time_t startup_time
@@ -994,7 +996,7 @@ Definition at line 81 -
time_t TIME + time_t TIME
@@ -1011,7 +1013,7 @@ Definition at line 81

Definition at line 101 of file channels.cpp.

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

@@ -1020,7 +1022,7 @@ Referenced by serverrec::Fl -
int WHOWAS_MAX + int WHOWAS_MAX
@@ -1044,7 +1046,7 @@ Definition at line
79 -
int WHOWAS_STALE + int WHOWAS_STALE
@@ -1062,7 +1064,7 @@ Definition at line 79 Definition at line 78 of file channels.cpp. -


Generated on Wed May 25 22:02:14 2005 for InspIRCd by +
Generated on Mon May 30 05:15:35 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 73931eed5..34da8c3ad 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 155b638f8..ed610b7f6 100644 --- a/docs/module-doc/channels_8h-source.html +++ b/docs/module-doc/channels_8h-source.html @@ -146,7 +146,7 @@ 00257 00258 #endif 00259 -
Generated on Wed May 25 22:02:04 2005 for InspIRCd by +
Generated on Mon May 30 05:15:19 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 ab68ff5a9..6ecb753de 100644 --- a/docs/module-doc/channels_8h.html +++ b/docs/module-doc/channels_8h.html @@ -433,7 +433,7 @@ Holds a complete invite list. Definition at line 95 of file channels.h. -
Generated on Wed May 25 22:02:16 2005 for InspIRCd by +
Generated on Mon May 30 05:15:38 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 826d1605d..f41a63688 100644 --- a/docs/module-doc/classAdmin-members.html +++ b/docs/module-doc/classAdmin-members.html @@ -13,7 +13,7 @@ NameAdmin NickAdmin ~classbase()classbase [inline] -
Generated on Wed May 25 22:02:45 2005 for InspIRCd by +
Generated on Mon May 30 05:16:26 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classAdmin.html b/docs/module-doc/classAdmin.html index 462bd13e0..e8c844063 100644 --- a/docs/module-doc/classAdmin.html +++ b/docs/module-doc/classAdmin.html @@ -82,9 +82,9 @@ Definition at line 123 of

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

-

00247 : Name(name), Email(email), Nick(nick) { };
+
00249 : 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 Wed May 25 22:02:45 2005 for InspIRCd by +
Generated on Mon May 30 05:16:26 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 7b99d4f01..8a0df5530 100644 --- a/docs/module-doc/classBanItem-members.html +++ b/docs/module-doc/classBanItem-members.html @@ -14,7 +14,7 @@ set_timeHostItem ~classbase()classbase [inline] ~HostItem()HostItem [inline, virtual] -
Generated on Wed May 25 22:02:46 2005 for InspIRCd by +
Generated on Mon May 30 05:16:28 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classBanItem.html b/docs/module-doc/classBanItem.html index 9cd0b9efe..96853c0d3 100644 --- a/docs/module-doc/classBanItem.html +++ b/docs/module-doc/classBanItem.html @@ -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 Wed May 25 22:02:46 2005 for InspIRCd by +
Generated on Mon May 30 05:16:28 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classBoolSet-members.html b/docs/module-doc/classBoolSet-members.html new file mode 100644 index 000000000..1a61e76c7 --- /dev/null +++ b/docs/module-doc/classBoolSet-members.html @@ -0,0 +1,25 @@ + + +InspIRCd: Member List + + + + +

BoolSet Member List

This is the complete list of members for BoolSet, including all inherited members. + + + + + + + + + + + +
bitsBoolSet [private]
BoolSet()BoolSet
BoolSet(char bitmask)BoolSet
Get(int number)BoolSet
Invert(int number)BoolSet
operator &(BoolSet other)BoolSet
operator=(BoolSet other)BoolSet
operator==(BoolSet other)BoolSet
operator|(BoolSet other)BoolSet
Set(int number)BoolSet
Unset(int number)BoolSet

Generated on Mon May 30 05:16:29 2005 for InspIRCd by + +doxygen +1.3.3
+ + diff --git a/docs/module-doc/classBoolSet.html b/docs/module-doc/classBoolSet.html new file mode 100644 index 000000000..bf356dabe --- /dev/null +++ b/docs/module-doc/classBoolSet.html @@ -0,0 +1,422 @@ + + +InspIRCd: BoolSet class Reference + + + + +

BoolSet Class Reference

BoolSet is a utility class designed to hold eight bools in a bitmask. +More... +

+#include <base.h> +

+Collaboration diagram for BoolSet:

Collaboration graph
+
[legend]
List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Member Functions

 BoolSet ()
 The default constructor initializes the BoolSet to all values unset.

 BoolSet (char bitmask)
 This constructor copies the default bitmask from a char.

void Set (int number)
 The Set method sets one bool in the set.

bool Get (int number)
 The Get method returns the value of one bool in the set.

void Unset (int number)
 The Unset method unsets one value in the set.

void Invert (int number)
 The Unset method inverts (flips) one value in the set.

bool operator== (BoolSet other)
 Compare two BoolSets.

BoolSet operator| (BoolSet other)
 OR two BoolSets together.

BoolSet operator & (BoolSet other)
 AND two BoolSets together.

bool operator= (BoolSet other)
 Assign one BoolSet to another.


Private Attributes

char bits
+

Detailed Description

+BoolSet is a utility class designed to hold eight bools in a bitmask. +

+Use BoolSet::Set and BoolSet::Get to set and get bools in the bitmask, and Unset and Invert for special operations upon them. +

+ +

+Definition at line 98 of file base.h.


Constructor & Destructor Documentation

+

+ + + + +
+ + + + + + + + + +
BoolSet::BoolSet  ) 
+
+ + + + + +
+   + + +

+The default constructor initializes the BoolSet to all values unset. +

+

+

+ + + + +
+ + + + + + + + + + +
BoolSet::BoolSet char  bitmask  ) 
+
+ + + + + +
+   + + +

+This constructor copies the default bitmask from a char. +

+

+


Member Function Documentation

+

+ + + + +
+ + + + + + + + + + +
bool BoolSet::Get int  number  ) 
+
+ + + + + +
+   + + +

+The Get method returns the value of one bool in the set. +

+

Parameters:
+ + +
number The number of the item to retrieve. This must be between 0 and 7.
+
+
Returns:
True if the item is set, false if it is unset.
+
+

+ + + + +
+ + + + + + + + + + +
void BoolSet::Invert int  number  ) 
+
+ + + + + +
+   + + +

+The Unset method inverts (flips) one value in the set. +

+

Parameters:
+ + +
number The number of the item to invert. This must be between 0 and 7.
+
+
+

+ + + + +
+ + + + + + + + + + +
BoolSet BoolSet::operator & BoolSet  other  ) 
+
+ + + + + +
+   + + +

+AND two BoolSets together. +

+

+

+ + + + +
+ + + + + + + + + + +
bool BoolSet::operator= BoolSet  other  ) 
+
+ + + + + +
+   + + +

+Assign one BoolSet to another. +

+

+

+ + + + +
+ + + + + + + + + + +
bool BoolSet::operator== BoolSet  other  ) 
+
+ + + + + +
+   + + +

+Compare two BoolSets. +

+

+

+ + + + +
+ + + + + + + + + + +
BoolSet BoolSet::operator| BoolSet  other  ) 
+
+ + + + + +
+   + + +

+OR two BoolSets together. +

+

+

+ + + + +
+ + + + + + + + + + +
void BoolSet::Set int  number  ) 
+
+ + + + + +
+   + + +

+The Set method sets one bool in the set. +

+

Parameters:
+ + +
number The number of the item to set. This must be between 0 and 7.
+
+
+

+ + + + +
+ + + + + + + + + + +
void BoolSet::Unset int  number  ) 
+
+ + + + + +
+   + + +

+The Unset method unsets one value in the set. +

+

Parameters:
+ + +
number The number of the item to set. This must be between 0 and 7.
+
+
+


Member Data Documentation

+

+ + + + +
+ + +
char BoolSet::bits [private] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 100 of file base.h.

+


The documentation for this class was generated from the following file: +
Generated on Mon May 30 05:16:29 2005 for InspIRCd by + +doxygen +1.3.3
+ + diff --git a/docs/module-doc/classBoolSet__coll__graph.gif b/docs/module-doc/classBoolSet__coll__graph.gif new file mode 100644 index 000000000..044a9d4a5 Binary files /dev/null and b/docs/module-doc/classBoolSet__coll__graph.gif differ diff --git a/docs/module-doc/classConfigReader-members.html b/docs/module-doc/classConfigReader-members.html index c22caeae3..4b1de8e41 100644 --- a/docs/module-doc/classConfigReader-members.html +++ b/docs/module-doc/classConfigReader-members.html @@ -24,7 +24,7 @@ Verify()ConfigReader ~classbase()classbase [inline] ~ConfigReader()ConfigReader -
Generated on Wed May 25 22:02:53 2005 for InspIRCd by +
Generated on Mon May 30 05:16:42 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classConfigReader.html b/docs/module-doc/classConfigReader.html index afb91f03a..8c0b0a5f1 100644 --- a/docs/module-doc/classConfigReader.html +++ b/docs/module-doc/classConfigReader.html @@ -103,17 +103,18 @@ Default constructor.

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

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

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

-

00820 {
-00821         this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
-00822         this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
-00823         this->readerror = LoadConf(CONFIG_FILE,this->cache,this->errorlog);
-00824         if (!this->readerror)
-00825                 this->error = CONF_FILE_NOT_FOUND;
-00826 }
+Definition at line 821 of file modules.cpp.
+

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

+

00822 {
+00823         include_stack.clear();
+00824         this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
+00825         this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
+00826         this->readerror = LoadConf(CONFIG_FILE,this->cache,this->errorlog);
+00827         if (!this->readerror)
+00828                 this->error = CONF_FILE_NOT_FOUND;
+00829 }
 
@@ -147,17 +148,17 @@ Overloaded constructor.

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

-Definition at line 838 of file modules.cpp. +Definition at line 841 of file modules.cpp.

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

-

00839 {
-00840         this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
-00841         this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
-00842         this->readerror = LoadConf(filename.c_str(),this->cache,this->errorlog);
-00843         if (!this->readerror)
-00844                 this->error = CONF_FILE_NOT_FOUND;
-00845 };
+
00842 {
+00843         this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
+00844         this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
+00845         this->readerror = LoadConf(filename.c_str(),this->cache,this->errorlog);
+00846         if (!this->readerror)
+00847                 this->error = CONF_FILE_NOT_FOUND;
+00848 };
 
@@ -190,16 +191,16 @@ Default destructor.

This method destroys the ConfigReader class.

-Definition at line 829 of file modules.cpp. +Definition at line 832 of file modules.cpp.

References cache, and errorlog.

-

00830 {
-00831         if (this->cache)
-00832                 delete this->cache;
-00833         if (this->errorlog)
-00834                 delete this->errorlog;
-00835 }
+
00833 {
+00834         if (this->cache)
+00835                 delete this->cache;
+00836         if (this->errorlog)
+00837                 delete this->errorlog;
+00838 }
 
@@ -243,40 +244,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 916 of file modules.cpp. +Definition at line 919 of file modules.cpp.

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

-

00917 {
-00918         if (bail)
-00919         {
-00920                 printf("There were errors in your configuration:\n%s",errorlog->str().c_str());
-00921                 exit(0);
-00922         }
-00923         else
-00924         {
-00925                 char dataline[1024];
-00926                 if (user)
-00927                 {
-00928                         WriteServ(user->fd,"NOTICE %s :There were errors in the configuration file:",user->nick);
-00929                         while (!errorlog->eof())
-00930                         {
-00931                                 errorlog->getline(dataline,1024);
-00932                                 WriteServ(user->fd,"NOTICE %s :%s",user->nick,dataline);
-00933                         }
-00934                 }
-00935                 else
-00936                 {
-00937                         WriteOpers("There were errors in the configuration file:",user->nick);
-00938                         while (!errorlog->eof())
-00939                         {
-00940                                 errorlog->getline(dataline,1024);
-00941                                 WriteOpers(dataline);
-00942                         }
-00943                 }
-00944                 return;
-00945         }
-00946 }
+
00920 {
+00921         if (bail)
+00922         {
+00923                 printf("There were errors in your configuration:\n%s",errorlog->str().c_str());
+00924                 exit(0);
+00925         }
+00926         else
+00927         {
+00928                 char dataline[1024];
+00929                 if (user)
+00930                 {
+00931                         WriteServ(user->fd,"NOTICE %s :There were errors in the configuration file:",user->nick);
+00932                         while (!errorlog->eof())
+00933                         {
+00934                                 errorlog->getline(dataline,1024);
+00935                                 WriteServ(user->fd,"NOTICE %s :%s",user->nick,dataline);
+00936                         }
+00937                 }
+00938                 else
+00939                 {
+00940                         WriteOpers("There were errors in the configuration file:",user->nick);
+00941                         while (!errorlog->eof())
+00942                         {
+00943                                 errorlog->getline(dataline,1024);
+00944                                 WriteOpers(dataline);
+00945                         }
+00946                 }
+00947                 return;
+00948         }
+00949 }
 
@@ -310,13 +311,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 949 of file modules.cpp. +Definition at line 952 of file modules.cpp.

References cache.

-

00950 {
-00951         return EnumConf(cache,tag.c_str());
-00952 }
+
00953 {
+00954         return EnumConf(cache,tag.c_str());
+00955 }
 
@@ -359,13 +360,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 954 of file modules.cpp. +Definition at line 957 of file modules.cpp.

References cache.

-

00955 {
-00956         return EnumValues(cache, tag.c_str(), index);
-00957 }
+
00958 {
+00959         return EnumValues(cache, tag.c_str(), index);
+00960 }
 
@@ -398,15 +399,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 909 of file modules.cpp. +Definition at line 912 of file modules.cpp.

References error.

-

00910 {
-00911         long olderr = this->error;
-00912         this->error = 0;
-00913         return olderr;
-00914 }
+
00913 {
+00914         long olderr = this->error;
+00915         this->error = 0;
+00916         return olderr;
+00917 }
 
@@ -455,25 +456,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 863 of file modules.cpp. +Definition at line 866 of file modules.cpp.

References cache, CONF_VALUE_NOT_FOUND, and error.

-

00864 {
-00865         char val[MAXBUF];
-00866         char t[MAXBUF];
-00867         char n[MAXBUF];
-00868         strlcpy(t,tag.c_str(),MAXBUF);
-00869         strlcpy(n,name.c_str(),MAXBUF);
-00870         int res = ReadConf(cache,t,n,index,val);
-00871         if (!res)
-00872         {
-00873                 this->error = CONF_VALUE_NOT_FOUND;
-00874                 return false;
-00875         }
-00876         std::string s = val;
-00877         return ((s == "yes") || (s == "YES") || (s == "true") || (s == "TRUE") || (s == "1"));
-00878 }
+
00867 {
+00868         char val[MAXBUF];
+00869         char t[MAXBUF];
+00870         char n[MAXBUF];
+00871         strlcpy(t,tag.c_str(),MAXBUF);
+00872         strlcpy(n,name.c_str(),MAXBUF);
+00873         int res = ReadConf(cache,t,n,index,val);
+00874         if (!res)
+00875         {
+00876                 this->error = CONF_VALUE_NOT_FOUND;
+00877                 return false;
+00878         }
+00879         std::string s = val;
+00880         return ((s == "yes") || (s == "YES") || (s == "true") || (s == "TRUE") || (s == "1"));
+00881 }
 
@@ -528,37 +529,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 880 of file modules.cpp. +Definition at line 883 of file modules.cpp.

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

-

00881 {
-00882         char val[MAXBUF];
-00883         char t[MAXBUF];
-00884         char n[MAXBUF];
-00885         strlcpy(t,tag.c_str(),MAXBUF);
-00886         strlcpy(n,name.c_str(),MAXBUF);
-00887         int res = ReadConf(cache,t,n,index,val);
-00888         if (!res)
-00889         {
-00890                 this->error = CONF_VALUE_NOT_FOUND;
-00891                 return 0;
-00892         }
-00893         for (int i = 0; i < strlen(val); i++)
-00894         {
-00895                 if (!isdigit(val[i]))
-00896                 {
-00897                         this->error = CONF_NOT_A_NUMBER;
-00898                         return 0;
-00899                 }
-00900         }
-00901         if ((needs_unsigned) && (atoi(val)<0))
-00902         {
-00903                 this->error = CONF_NOT_UNSIGNED;
-00904                 return 0;
-00905         }
-00906         return atoi(val);
-00907 }
+
00884 {
+00885         char val[MAXBUF];
+00886         char t[MAXBUF];
+00887         char n[MAXBUF];
+00888         strlcpy(t,tag.c_str(),MAXBUF);
+00889         strlcpy(n,name.c_str(),MAXBUF);
+00890         int res = ReadConf(cache,t,n,index,val);
+00891         if (!res)
+00892         {
+00893                 this->error = CONF_VALUE_NOT_FOUND;
+00894                 return 0;
+00895         }
+00896         for (int i = 0; i < strlen(val); i++)
+00897         {
+00898                 if (!isdigit(val[i]))
+00899                 {
+00900                         this->error = CONF_NOT_A_NUMBER;
+00901                         return 0;
+00902                 }
+00903         }
+00904         if ((needs_unsigned) && (atoi(val)<0))
+00905         {
+00906                 this->error = CONF_NOT_UNSIGNED;
+00907                 return 0;
+00908         }
+00909         return atoi(val);
+00910 }
 
@@ -607,24 +608,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 847 of file modules.cpp. +Definition at line 850 of file modules.cpp.

References cache, CONF_VALUE_NOT_FOUND, and error.

-

00848 {
-00849         char val[MAXBUF];
-00850         char t[MAXBUF];
-00851         char n[MAXBUF];
-00852         strlcpy(t,tag.c_str(),MAXBUF);
-00853         strlcpy(n,name.c_str(),MAXBUF);
-00854         int res = ReadConf(cache,t,n,index,val);
-00855         if (!res)
-00856         {
-00857                 this->error = CONF_VALUE_NOT_FOUND;
-00858                 return "";
-00859         }
-00860         return val;
-00861 }
+
00851 {
+00852         char val[MAXBUF];
+00853         char t[MAXBUF];
+00854         char n[MAXBUF];
+00855         strlcpy(t,tag.c_str(),MAXBUF);
+00856         strlcpy(n,name.c_str(),MAXBUF);
+00857         int res = ReadConf(cache,t,n,index,val);
+00858         if (!res)
+00859         {
+00860                 this->error = CONF_VALUE_NOT_FOUND;
+00861                 return "";
+00862         }
+00863         return val;
+00864 }
 
@@ -657,13 +658,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 959 of file modules.cpp. +Definition at line 962 of file modules.cpp.

References readerror.

-

00960 {
-00961         return this->readerror;
-00962 }
+
00963 {
+00964         return this->readerror;
+00965 }
 
@@ -693,7 +694,7 @@ It will contain a pointer to the configuration file data with unneeded data (suc

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().

@@ -719,7 +720,7 @@ Referenced by ConfigReader(

Definition at line 1163 of file modules.h.

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

@@ -745,7 +746,7 @@ Referenced by ConfigReader(

Definition at line 1159 of file modules.h.

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

@@ -773,12 +774,12 @@ Used to store errors.

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 Wed May 25 22:02:53 2005 for InspIRCd by +
Generated on Mon May 30 05:16:42 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 a1be28204..c47a70089 100644 --- a/docs/module-doc/classConnectClass-members.html +++ b/docs/module-doc/classConnectClass-members.html @@ -19,7 +19,7 @@ thresholdConnectClass typeConnectClass ~classbase()classbase [inline] -
Generated on Wed May 25 22:02:54 2005 for InspIRCd by +
Generated on Mon May 30 05:16:44 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classConnectClass.html b/docs/module-doc/classConnectClass.html index 02f3ef51e..a429cb11e 100644 --- a/docs/module-doc/classConnectClass.html +++ b/docs/module-doc/classConnectClass.html @@ -355,7 +355,7 @@ Definition at line 50 of fi
The documentation for this class was generated from the following file: -
Generated on Wed May 25 22:02:54 2005 for InspIRCd by +
Generated on Mon May 30 05:16:44 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 5856f173e..7aa9cc2ab 100644 --- a/docs/module-doc/classDNS-members.html +++ b/docs/module-doc/classDNS-members.html @@ -33,7 +33,7 @@ SetNS(std::string dnsserver)DNS tDNS [private] ~DNS()DNS -
Generated on Wed May 25 22:02:57 2005 for InspIRCd by +
Generated on Mon May 30 05:16:48 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classDNS.html b/docs/module-doc/classDNS.html index 91124de7c..13a0af42f 100644 --- a/docs/module-doc/classDNS.html +++ b/docs/module-doc/classDNS.html @@ -891,7 +891,7 @@ Definition at line 40 of file
The documentation for this class was generated from the following file: -
Generated on Wed May 25 22:02:57 2005 for InspIRCd by +
Generated on Mon May 30 05:16:48 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 f52473cc2..2599c52ed 100644 --- a/docs/module-doc/classELine-members.html +++ b/docs/module-doc/classELine-members.html @@ -15,7 +15,7 @@ set_timeXLine sourceXLine ~classbase()classbase [inline] -
Generated on Wed May 25 22:02:59 2005 for InspIRCd by +
Generated on Mon May 30 05:16:50 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classELine.html b/docs/module-doc/classELine.html index 0b8153222..9d654b0fa 100644 --- a/docs/module-doc/classELine.html +++ b/docs/module-doc/classELine.html @@ -53,7 +53,7 @@ Definition at line 88 of fi
The documentation for this class was generated from the following file: -
Generated on Wed May 25 22:02:59 2005 for InspIRCd by +
Generated on Mon May 30 05:16:50 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 5def1e1b8..048949ae5 100644 --- a/docs/module-doc/classEvent-members.html +++ b/docs/module-doc/classEvent-members.html @@ -17,7 +17,7 @@ Send()Event [virtual] sourceEvent [protected] ~classbase()classbase [inline] -
Generated on Wed May 25 22:03:00 2005 for InspIRCd by +
Generated on Mon May 30 05:16:52 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classEvent.html b/docs/module-doc/classEvent.html index 79eb1d117..f16ad64ed 100644 --- a/docs/module-doc/classEvent.html +++ b/docs/module-doc/classEvent.html @@ -103,9 +103,9 @@ Create a new Event.

-Definition at line 278 of file modules.cpp. +Definition at line 280 of file modules.cpp.

-

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

-Definition at line 280 of file modules.cpp. +Definition at line 282 of file modules.cpp.

References data.

-

00281 {
-00282         return this->data;
-00283 }
+
00283 {
+00284         return this->data;
+00285 }
 
@@ -178,13 +178,13 @@ Get the event ID.

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

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

References id.

-

00297 {
-00298         return this->id;
-00299 }
+
00299 {
+00300         return this->id;
+00301 }
 
@@ -217,13 +217,13 @@ Get the event Source.

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

References source.

-

00286 {
-00287         return this->source;
-00288 }
+
00288 {
+00289         return this->source;
+00290 }
 
@@ -258,14 +258,14 @@ The return result of an Event::Send() Implements ModuleMessage.

-Definition at line 290 of file modules.cpp. +Definition at line 292 of file modules.cpp.

References FOREACH_MOD.

-

00291 {
-00292         FOREACH_MOD OnEvent(this);
-00293         return NULL;
-00294 }
+
00293 {
+00294         FOREACH_MOD OnEvent(this);
+00295         return NULL;
+00296 }
 
@@ -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 Wed May 25 22:03:00 2005 for InspIRCd by +
Generated on Mon May 30 05:16:52 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 39d97f34b..5e573def7 100644 --- a/docs/module-doc/classExemptItem-members.html +++ b/docs/module-doc/classExemptItem-members.html @@ -14,7 +14,7 @@ set_timeHostItem ~classbase()classbase [inline] ~HostItem()HostItem [inline, virtual] -
Generated on Wed May 25 22:03:01 2005 for InspIRCd by +
Generated on Mon May 30 05:16:54 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classExemptItem.html b/docs/module-doc/classExemptItem.html index d9347f45d..d5c04bee2 100644 --- a/docs/module-doc/classExemptItem.html +++ b/docs/module-doc/classExemptItem.html @@ -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 Wed May 25 22:03:01 2005 for InspIRCd by +
Generated on Mon May 30 05:16:54 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 20dbe8f53..5b0dae396 100644 --- a/docs/module-doc/classExtMode-members.html +++ b/docs/module-doc/classExtMode-members.html @@ -16,7 +16,7 @@ params_when_onExtMode typeExtMode ~classbase()classbase [inline] -
Generated on Wed May 25 22:03:03 2005 for InspIRCd by +
Generated on Mon May 30 05:16:58 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classExtMode.html b/docs/module-doc/classExtMode.html index c76a78bb2..07e1602c6 100644 --- a/docs/module-doc/classExtMode.html +++ b/docs/module-doc/classExtMode.html @@ -88,11 +88,11 @@

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

-

00145 : modechar(mc), type(ty), needsoper(oper), params_when_on(p_on), params_when_off(p_off) { };
+
00147 : 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 144 of file modules.cpp. +Definition at line 146 of file modules.cpp.

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

-Definition at line 139 of file modules.cpp. +Definition at line 141 of file modules.cpp.

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

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

-Definition at line 143 of file modules.cpp. +Definition at line 145 of file modules.cpp.

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

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

-Definition at line 142 of file modules.cpp. +Definition at line 144 of file modules.cpp.

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

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

-Definition at line 141 of file modules.cpp. +Definition at line 143 of file modules.cpp.

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

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

-Definition at line 140 of file modules.cpp. +Definition at line 142 of file modules.cpp.

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


The documentation for this class was generated from the following file: -
Generated on Wed May 25 22:03:03 2005 for InspIRCd by +
Generated on Mon May 30 05:16:58 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 e7a18bf0e..35c799bd6 100644 --- a/docs/module-doc/classExtensible-members.html +++ b/docs/module-doc/classExtensible-members.html @@ -13,7 +13,7 @@ GetExt(std::string key)Extensible Shrink(std::string key)Extensible ~classbase()classbase [inline] -
Generated on Wed May 25 22:03:02 2005 for InspIRCd by +
Generated on Mon May 30 05:16:57 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classExtensible.html b/docs/module-doc/classExtensible.html index c570da923..516f0bf3a 100644 --- a/docs/module-doc/classExtensible.html +++ b/docs/module-doc/classExtensible.html @@ -201,7 +201,7 @@ Definition at line 54 of fil
The documentation for this class was generated from the following file: -
Generated on Wed May 25 22:03:02 2005 for InspIRCd by +
Generated on Mon May 30 05:16:57 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 82c1fd1ac..377da9995 100644 --- a/docs/module-doc/classFileReader-members.html +++ b/docs/module-doc/classFileReader-members.html @@ -17,7 +17,7 @@ LoadFile(std::string filename)FileReader ~classbase()classbase [inline] ~FileReader()FileReader -
Generated on Wed May 25 22:03:05 2005 for InspIRCd by +
Generated on Mon May 30 05:17:01 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classFileReader.html b/docs/module-doc/classFileReader.html index 6637ee208..3e69fe2d0 100644 --- a/docs/module-doc/classFileReader.html +++ b/docs/module-doc/classFileReader.html @@ -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 972 of file modules.cpp. +Definition at line 975 of file modules.cpp.

-

00973 {
-00974 }
+
00976 {
+00977 }
 
@@ -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 965 of file modules.cpp. +Definition at line 968 of file modules.cpp.

References fc, and file_cache.

-

00966 {
-00967         file_cache c;
-00968         readfile(c,filename.c_str());
-00969         this->fc = c;
-00970 }
+
00969 {
+00970         file_cache c;
+00971         readfile(c,filename.c_str());
+00972         this->fc = c;
+00973 }
 
@@ -161,10 +161,10 @@ Default destructor.

This deletes the memory allocated to the file.

-Definition at line 984 of file modules.cpp. +Definition at line 987 of file modules.cpp.

-

00985 {
-00986 }
+
00988 {
+00989 }
 
@@ -198,20 +198,20 @@ Returns true if the file exists This function will return false if the file coul

-Definition at line 988 of file modules.cpp. +Definition at line 991 of file modules.cpp.

References fc.

-

00989 {
-00990         if (fc.size() == 0)
-00991         {
-00992                 return(false);
-00993         }
-00994         else
-00995         {
-00996                 return(true);
-00997         }
-00998 }
+
00992 {
+00993         if (fc.size() == 0)
+00994         {
+00995                 return(false);
+00996         }
+00997         else
+00998         {
+00999                 return(true);
+01000         }
+01001 }
 
@@ -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 1007 of file modules.cpp. +Definition at line 1010 of file modules.cpp.

References fc.

-

01008 {
-01009         return fc.size();
-01010 }
+
01011 {
+01012         return fc.size();
+01013 }
 
@@ -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 1000 of file modules.cpp. +Definition at line 1003 of file modules.cpp.

References fc.

-

01001 {
-01002         if ((x<0) || (x>fc.size()))
-01003                 return "";
-01004         return fc[x];
-01005 }
+
01004 {
+01005         if ((x<0) || (x>fc.size()))
+01006                 return "";
+01007         return fc[x];
+01008 }
 
@@ -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 976 of file modules.cpp. +Definition at line 979 of file modules.cpp.

References fc, and file_cache.

-

00977 {
-00978         file_cache c;
-00979         readfile(c,filename.c_str());
-00980         this->fc = c;
-00981 }
+
00980 {
+00981         file_cache c;
+00982         readfile(c,filename.c_str());
+00983         this->fc = c;
+00984 }
 
@@ -362,12 +362,12 @@ References fc, and 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 Wed May 25 22:03:05 2005 for InspIRCd by +
Generated on Mon May 30 05:17:01 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 70b191605..2a6dc8ca5 100644 --- a/docs/module-doc/classGLine-members.html +++ b/docs/module-doc/classGLine-members.html @@ -15,7 +15,7 @@ set_timeXLine sourceXLine ~classbase()classbase [inline] -
Generated on Wed May 25 22:03:06 2005 for InspIRCd by +
Generated on Mon May 30 05:17:03 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classGLine.html b/docs/module-doc/classGLine.html index a64fb3739..2fc15a0bd 100644 --- a/docs/module-doc/classGLine.html +++ b/docs/module-doc/classGLine.html @@ -61,7 +61,7 @@ Definition at line 79 of fi
The documentation for this class was generated from the following file: -
Generated on Wed May 25 22:03:06 2005 for InspIRCd by +
Generated on Mon May 30 05:17:03 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 54654ce72..dcf02f5bd 100644 --- a/docs/module-doc/classHostItem-members.html +++ b/docs/module-doc/classHostItem-members.html @@ -14,7 +14,7 @@ set_timeHostItem ~classbase()classbase [inline] ~HostItem()HostItem [inline, virtual] -
Generated on Wed May 25 22:03:07 2005 for InspIRCd by +
Generated on Mon May 30 05:17:07 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classHostItem.html b/docs/module-doc/classHostItem.html index a55562d50..61c4ee368 100644 --- a/docs/module-doc/classHostItem.html +++ b/docs/module-doc/classHostItem.html @@ -185,7 +185,7 @@ Definition at line 39 of
The documentation for this class was generated from the following file: -
Generated on Wed May 25 22:03:07 2005 for InspIRCd by +
Generated on Mon May 30 05:17:07 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 508ac308c..5a11ce16f 100644 --- a/docs/module-doc/classInviteItem-members.html +++ b/docs/module-doc/classInviteItem-members.html @@ -14,7 +14,7 @@ set_timeHostItem ~classbase()classbase [inline] ~HostItem()HostItem [inline, virtual] -
Generated on Wed May 25 22:03:09 2005 for InspIRCd by +
Generated on Mon May 30 05:17:12 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classInviteItem.html b/docs/module-doc/classInviteItem.html index 0238cd82a..36fbb00c2 100644 --- a/docs/module-doc/classInviteItem.html +++ b/docs/module-doc/classInviteItem.html @@ -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 Wed May 25 22:03:09 2005 for InspIRCd by +
Generated on Mon May 30 05:17:12 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 786935711..c392fc408 100644 --- a/docs/module-doc/classInvited-members.html +++ b/docs/module-doc/classInvited-members.html @@ -10,7 +10,7 @@ channelInvited classbase()classbase [inline] ~classbase()classbase [inline] -
Generated on Wed May 25 22:03:08 2005 for InspIRCd by +
Generated on Mon May 30 05:17:09 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classInvited.html b/docs/module-doc/classInvited.html index daaa94bfe..eebe80fee 100644 --- a/docs/module-doc/classInvited.html +++ b/docs/module-doc/classInvited.html @@ -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 Wed May 25 22:03:08 2005 for InspIRCd by +
Generated on Mon May 30 05:17:09 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 073f87710..9d056eff9 100644 --- a/docs/module-doc/classKLine-members.html +++ b/docs/module-doc/classKLine-members.html @@ -15,7 +15,7 @@ set_timeXLine sourceXLine ~classbase()classbase [inline] -
Generated on Wed May 25 22:03:13 2005 for InspIRCd by +
Generated on Mon May 30 05:17:20 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classKLine.html b/docs/module-doc/classKLine.html index 6be07650b..88b799a87 100644 --- a/docs/module-doc/classKLine.html +++ b/docs/module-doc/classKLine.html @@ -61,7 +61,7 @@ Definition at line 68 of fi
The documentation for this class was generated from the following file: -
Generated on Wed May 25 22:03:13 2005 for InspIRCd by +
Generated on Mon May 30 05:17:20 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 c19dd9faa..41ce56aed 100644 --- a/docs/module-doc/classModeParameter-members.html +++ b/docs/module-doc/classModeParameter-members.html @@ -12,7 +12,7 @@ modeModeParameter parameterModeParameter ~classbase()classbase [inline] -
Generated on Wed May 25 22:03:14 2005 for InspIRCd by +
Generated on Mon May 30 05:17:21 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classModeParameter.html b/docs/module-doc/classModeParameter.html index f53c70d11..94e160da6 100644 --- a/docs/module-doc/classModeParameter.html +++ b/docs/module-doc/classModeParameter.html @@ -116,7 +116,7 @@ Referenced by chanrec::Set
The documentation for this class was generated from the following file:
-
Generated on Wed May 25 22:03:14 2005 for InspIRCd by +
Generated on Mon May 30 05:17:21 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 79bf18918..05928e607 100644 --- a/docs/module-doc/classModule-members.html +++ b/docs/module-doc/classModule-members.html @@ -65,7 +65,7 @@ OnWhois(userrec *source, userrec *dest)Module [virtual] ~classbase()classbase [inline] ~Module()Module [virtual] -
Generated on Wed May 25 22:03:16 2005 for InspIRCd by +
Generated on Mon May 30 05:17:24 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classModule.html b/docs/module-doc/classModule.html index 25df9c3b6..4c034d0d2 100644 --- a/docs/module-doc/classModule.html +++ b/docs/module-doc/classModule.html @@ -227,9 +227,9 @@ Default constructor creates a module class.

-Definition at line 303 of file modules.cpp. +Definition at line 305 of file modules.cpp.

-

00303 { }
+
00305 { }
 
@@ -262,9 +262,9 @@ Default destructor destroys a module class.

-Definition at line 304 of file modules.cpp. +Definition at line 306 of file modules.cpp.

-

00304 { }
+
00306 { }
 
@@ -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 316 of file modules.cpp. +Definition at line 318 of file modules.cpp.

References VF_VENDOR.

-

00316 { return Version(1,0,0,0,VF_VENDOR); }
+
00318 { 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 328 of file modules.cpp. +Definition at line 330 of file modules.cpp.

-

00328 { };
+
00330 { };
 
@@ -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 325 of file modules.cpp. +Definition at line 327 of file modules.cpp.

References ACR_DEFAULT.

-

00325 { return ACR_DEFAULT; };
+
00327 { 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 353 of file modules.cpp. +Definition at line 355 of file modules.cpp.

-

00353 { return 0; };
+
00355 { 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 331 of file modules.cpp. +Definition at line 333 of file modules.cpp.

-

00331 { };
+
00333 { };
 
@@ -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 345 of file modules.cpp. +Definition at line 347 of file modules.cpp.

-

00345 { return 0; };
+
00347 { 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 344 of file modules.cpp. +Definition at line 346 of file modules.cpp.

-

00344 { return 0; };
+
00346 { 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 327 of file modules.cpp. +Definition at line 329 of file modules.cpp.

References string_list.

-

00327 { string_list empty; return empty; }
+
00329 { 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 342 of file modules.cpp. +Definition at line 344 of file modules.cpp.

-

00342 { return 0; };
+
00344 { 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 339 of file modules.cpp. +Definition at line 341 of file modules.cpp.

-

00339 { return 0; };
+
00341 { 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 340 of file modules.cpp. +Definition at line 342 of file modules.cpp.

-

00340 { return 0; };
+
00342 { 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 341 of file modules.cpp. +Definition at line 343 of file modules.cpp.

-

00341 { return 0; };
+
00343 { 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 334 of file modules.cpp. +Definition at line 336 of file modules.cpp.

-

00334 { return true; };
+
00336 { 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 354 of file modules.cpp. +Definition at line 356 of file modules.cpp.

-

00354 { return 0; };
+
00356 { 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 348 of file modules.cpp. +Definition at line 350 of file modules.cpp.

-

00348 { return; };
+
00350 { return; };
 
@@ -1000,9 +1000,9 @@ 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.

-Definition at line 315 of file modules.cpp. +Definition at line 317 of file modules.cpp.

-

00315 { return false; }
+
00317 { 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 352 of file modules.cpp. +Definition at line 354 of file modules.cpp.

-

00352 { };
+
00354 { };
 
@@ -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 351 of file modules.cpp. +Definition at line 353 of file modules.cpp.

-

00351 { };
+
00353 { };
 
@@ -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 318 of file modules.cpp. +Definition at line 320 of file modules.cpp.

-

00318 { };
+
00320 { };
 
@@ -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 329 of file modules.cpp. +Definition at line 331 of file modules.cpp.

-

00329 { return 0; };
+
00331 { 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 330 of file modules.cpp. +Definition at line 332 of file modules.cpp.

-

00330 { };
+
00332 { };
 
@@ -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 346 of file modules.cpp. +Definition at line 348 of file modules.cpp.

-

00346 { return 0; };
+
00348 { 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 347 of file modules.cpp. +Definition at line 349 of file modules.cpp.

-

00347 { return 0; };
+
00349 { 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 317 of file modules.cpp. +Definition at line 319 of file modules.cpp.

-

00317 { };
+
00319 { };
 
@@ -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 350 of file modules.cpp. +Definition at line 352 of file modules.cpp.

-

00350 { return 0; };
+
00352 { 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 311 of file modules.cpp. +Definition at line 313 of file modules.cpp.

-

00311 { }
+
00313 { }
 
@@ -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 310 of file modules.cpp. +Definition at line 312 of file modules.cpp.

-

00310 { }
+
00312 { }
 
@@ -1559,9 +1559,9 @@ 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!)

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

-

00333 { return 0; };
+
00335 { 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 338 of file modules.cpp. +Definition at line 340 of file modules.cpp.

-

00338 { return 0; };
+
00340 { 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 355 of file modules.cpp. +Definition at line 357 of file modules.cpp.

-

00355 { };
+
00357 { };
 
@@ -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 357 of file modules.cpp. +Definition at line 359 of file modules.cpp.

-

00357 { };
+
00359 { };
 
@@ -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 358 of file modules.cpp. +Definition at line 360 of file modules.cpp.

-

00358 { return 0; };
+
00360 { 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 356 of file modules.cpp. +Definition at line 358 of file modules.cpp.

-

00356 { return 0; };
+
00358 { 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 312 of file modules.cpp. +Definition at line 314 of file modules.cpp.

-

00312 { }
+
00314 { }
 
@@ -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 349 of file modules.cpp. +Definition at line 351 of file modules.cpp.

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

-

00349 { return NULL; };
+
00351 { 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 332 of file modules.cpp. +Definition at line 334 of file modules.cpp.

-

00332 { };
+
00334 { };
 
@@ -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 313 of file modules.cpp. +Definition at line 315 of file modules.cpp.

-

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

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

-

00343 { };
+
00345 { };
 
@@ -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 305 of file modules.cpp. +Definition at line 307 of file modules.cpp.

-

00305 { }
+
00307 { }
 
@@ -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 307 of file modules.cpp. +Definition at line 309 of file modules.cpp.

-

00307 { }
+
00309 { }
 
@@ -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 308 of file modules.cpp. +Definition at line 310 of file modules.cpp.

-

00308 { }
+
00310 { }
 
@@ -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 337 of file modules.cpp. +Definition at line 339 of file modules.cpp.

-

00337 { };
+
00339 { };
 
@@ -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 309 of file modules.cpp. +Definition at line 311 of file modules.cpp.

-

00309 { }
+
00311 { }
 
@@ -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 324 of file modules.cpp. +Definition at line 326 of file modules.cpp.

-

00324 { };
+
00326 { };
 
@@ -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 320 of file modules.cpp. +Definition at line 322 of file modules.cpp.

-

00320 { return 0; };
+
00322 { 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 314 of file modules.cpp. +Definition at line 316 of file modules.cpp.

-

00314 { return 0; }
+
00316 { 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 336 of file modules.cpp. +Definition at line 338 of file modules.cpp.

-

00336 { return 0; };
+
00338 { 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 321 of file modules.cpp. +Definition at line 323 of file modules.cpp.

-

00321 { return 0; };
+
00323 { 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 323 of file modules.cpp. +Definition at line 325 of file modules.cpp.

-

00323 { return 0; };
+
00325 { 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 322 of file modules.cpp. +Definition at line 324 of file modules.cpp.

-

00322 { return 0; };
+
00324 { 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 306 of file modules.cpp. +Definition at line 308 of file modules.cpp.

-

00306 { }
+
00308 { }
 
@@ -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 335 of file modules.cpp. +Definition at line 337 of file modules.cpp.

-

00335 { };
+
00337 { };
 
@@ -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 326 of file modules.cpp. +Definition at line 328 of file modules.cpp.

References string_list.

-

00326 { string_list empty; return empty; }
+
00328 { 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 319 of file modules.cpp. +Definition at line 321 of file modules.cpp.

-

00319 { };
+
00321 { };
 

The documentation for this class was generated from the following files: -
Generated on Wed May 25 22:03:16 2005 for InspIRCd by +
Generated on Mon May 30 05:17:24 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 838f4a443..c9066625b 100644 --- a/docs/module-doc/classModuleFactory-members.html +++ b/docs/module-doc/classModuleFactory-members.html @@ -12,7 +12,7 @@ ModuleFactory()ModuleFactory [inline] ~classbase()classbase [inline] ~ModuleFactory()ModuleFactory [inline, virtual] -
Generated on Wed May 25 22:03:16 2005 for InspIRCd by +
Generated on Mon May 30 05:17:25 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classModuleFactory.html b/docs/module-doc/classModuleFactory.html index 4f0d5ba4f..5696482fb 100644 --- a/docs/module-doc/classModuleFactory.html +++ b/docs/module-doc/classModuleFactory.html @@ -136,7 +136,7 @@ Your inherited class of ModuleFactory must return a pointer to your modules.h -
Generated on Wed May 25 22:03:16 2005 for InspIRCd by +
Generated on Mon May 30 05:17:25 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 fd297c619..4249074f2 100644 --- a/docs/module-doc/classModuleMessage-members.html +++ b/docs/module-doc/classModuleMessage-members.html @@ -10,7 +10,7 @@ classbase()classbase [inline] Send()=0ModuleMessage [pure virtual] ~classbase()classbase [inline] -
Generated on Wed May 25 22:03:17 2005 for InspIRCd by +
Generated on Mon May 30 05:17:27 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classModuleMessage.html b/docs/module-doc/classModuleMessage.html index 05f108e79..d194e7af9 100644 --- a/docs/module-doc/classModuleMessage.html +++ b/docs/module-doc/classModuleMessage.html @@ -67,7 +67,7 @@ Implemented in Request, and
The documentation for this class was generated from the following file:
-
Generated on Wed May 25 22:03:17 2005 for InspIRCd by +
Generated on Mon May 30 05:17:27 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 868bbbdce..a03e71840 100644 --- a/docs/module-doc/classQLine-members.html +++ b/docs/module-doc/classQLine-members.html @@ -16,7 +16,7 @@ set_timeXLine sourceXLine ~classbase()classbase [inline] -
Generated on Wed May 25 22:03:19 2005 for InspIRCd by +
Generated on Mon May 30 05:17:28 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classQLine.html b/docs/module-doc/classQLine.html index bcd2d68b3..a6cf3b6fa 100644 --- a/docs/module-doc/classQLine.html +++ b/docs/module-doc/classQLine.html @@ -90,7 +90,7 @@ Definition at line 114 of f
The documentation for this class was generated from the following file: -
Generated on Wed May 25 22:03:19 2005 for InspIRCd by +
Generated on Mon May 30 05:17:28 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 e65b772a6..bad7f7120 100644 --- a/docs/module-doc/classRequest-members.html +++ b/docs/module-doc/classRequest-members.html @@ -17,7 +17,7 @@ Send()Request [virtual] sourceRequest [protected] ~classbase()classbase [inline] -
Generated on Wed May 25 22:03:20 2005 for InspIRCd by +
Generated on Mon May 30 05:17:30 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classRequest.html b/docs/module-doc/classRequest.html index 17f49f7cc..be396252c 100644 --- a/docs/module-doc/classRequest.html +++ b/docs/module-doc/classRequest.html @@ -103,9 +103,9 @@ Create a new Request.

-Definition at line 249 of file modules.cpp. +Definition at line 251 of file modules.cpp.

-

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

-Definition at line 251 of file modules.cpp. +Definition at line 253 of file modules.cpp.

References data.

-

00252 {
-00253         return this->data;
-00254 }
+
00254 {
+00255         return this->data;
+00256 }
 
@@ -178,13 +178,13 @@ Fetch the request destination (should be 'this' in the receiving module).

-Definition at line 261 of file modules.cpp. +Definition at line 263 of file modules.cpp.

References dest.

-

00262 {
-00263         return this->dest;
-00264 }
+
00264 {
+00265         return this->dest;
+00266 }
 
@@ -217,13 +217,13 @@ Fetch the request source.

-Definition at line 256 of file modules.cpp. +Definition at line 258 of file modules.cpp.

References source.

-

00257 {
-00258         return this->source;
-00259 }
+
00259 {
+00260         return this->source;
+00261 }
 
@@ -258,20 +258,20 @@ Upon returning the result will be arbitary data returned by the module you sent

Implements ModuleMessage.

-Definition at line 266 of file modules.cpp. +Definition at line 268 of file modules.cpp.

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

-

00267 {
-00268         if (this->dest)
-00269         {
-00270                 return dest->OnRequest(this);
-00271         }
-00272         else
-00273         {
-00274                 return NULL;
-00275         }
-00276 }
+
00269 {
+00270         if (this->dest)
+00271         {
+00272                 return dest->OnRequest(this);
+00273         }
+00274         else
+00275         {
+00276                 return NULL;
+00277         }
+00278 }
 
@@ -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 Wed May 25 22:03:20 2005 for InspIRCd by +
Generated on Mon May 30 05:17:30 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 c29f89c05..3556406cd 100644 --- a/docs/module-doc/classServer-members.html +++ b/docs/module-doc/classServer-members.html @@ -70,7 +70,7 @@ UserToPseudo(userrec *user, std::string message)Server [virtual] ~classbase()classbase [inline] ~Server()Server [virtual] -
Generated on Wed May 25 22:03:22 2005 for InspIRCd by +
Generated on Mon May 30 05:17:33 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classServer.html b/docs/module-doc/classServer.html index 3c3059c44..b53879f8d 100644 --- a/docs/module-doc/classServer.html +++ b/docs/module-doc/classServer.html @@ -242,10 +242,10 @@ Default constructor.

Creates a Server object.

-Definition at line 364 of file modules.cpp. +Definition at line 366 of file modules.cpp.

-

00365 {
-00366 }
+
00367 {
+00368 }
 
@@ -278,10 +278,10 @@ Default destructor.

Destroys a Server object.

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

-

00369 {
-00370 }
+
00371 {
+00372 }
 
@@ -345,13 +345,13 @@ 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 437 of file modules.cpp. +Definition at line 439 of file modules.cpp.

References createcommand().

-

00438 {
-00439         createcommand(cmd,f,flags,minparams,source);
-00440 }
+
00440 {
+00441         createcommand(cmd,f,flags,minparams,source);
+00442 }
 
@@ -406,13 +406,13 @@ 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.

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

References add_eline(), and duration().

-

00700 {
-00701         add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
-00702 }
+
00702 {
+00703         add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
+00704 }
 
@@ -451,16 +451,16 @@ 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 605 of file modules.cpp. +Definition at line 607 of file modules.cpp.

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

-

00606 {
-00607         bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1);
-00608         if (res)
-00609                 ModeMakeList(modechar);
-00610         return res;
-00611 }
+
00608 {
+00609         bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1);
+00610         if (res)
+00611                 ModeMakeList(modechar);
+00612         return res;
+00613 }
 
@@ -521,36 +521,36 @@ Adds an extended mode letter which is parsed by a module.

This allows modules to add extra mode letters, e.g. +x for hostcloak. the "type" parameter is either MT_CHANNEL, MT_CLIENT, or MT_SERVER, to indicate wether the mode is a channel mode, a client mode, or a server mode. requires_oper is used with MT_CLIENT type modes only to indicate the mode can only be set or unset by an oper. If this is used for MT_CHANNEL type modes it is ignored. params_when_on is the number of modes to expect when the mode is turned on (for type MT_CHANNEL only), e.g. with mode +k, this would have a value of 1. the params_when_off value has a similar value to params_when_on, except it indicates the number of parameters to expect when the mode is disabled. Modes which act in a similar way to channel mode +l (e.g. require a parameter to enable, but not to disable) should use this parameter. The function returns false if the mode is unavailable, and will not attempt to allocate another character, as this will confuse users. This also means that as only one module can claim a specific mode character, the core does not need to keep track of which modules own which modes, which speeds up operation of the server. In this version, a mode can have at most one parameter, attempting to use more parameters will have undefined effects.

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

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

-

00578 {
-00579         if (((modechar >= 'A') && (modechar <= 'Z')) || ((modechar >= 'a') && (modechar <= 'z')))
-00580         {
-00581                 if (type == MT_SERVER)
-00582                 {
-00583                         log(DEBUG,"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion");
-00584                         return false;
-00585                 }
-00586                 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT))
-00587                 {
-00588                         log(DEBUG,"*** API ERROR *** Parameters on MT_CLIENT modes are not supported");
-00589                         return false;
-00590                 }
-00591                 if ((params_when_on>1) || (params_when_off>1))
-00592                 {
-00593                         log(DEBUG,"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported");
-00594                         return false;
-00595                 }
-00596                 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off);
-00597         }
-00598         else
-00599         {
-00600                 log(DEBUG,"*** API ERROR *** Muppet modechar detected.");
-00601         }
-00602         return false;
-00603 }
+Definition at line 579 of file modules.cpp.
+

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

+

00580 {
+00581         if (((modechar >= 'A') && (modechar <= 'Z')) || ((modechar >= 'a') && (modechar <= 'z')))
+00582         {
+00583                 if (type == MT_SERVER)
+00584                 {
+00585                         log(DEBUG,"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion");
+00586                         return false;
+00587                 }
+00588                 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT))
+00589                 {
+00590                         log(DEBUG,"*** API ERROR *** Parameters on MT_CLIENT modes are not supported");
+00591                         return false;
+00592                 }
+00593                 if ((params_when_on>1) || (params_when_off>1))
+00594                 {
+00595                         log(DEBUG,"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported");
+00596                         return false;
+00597                 }
+00598                 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off);
+00599         }
+00600         else
+00601         {
+00602                 log(DEBUG,"*** API ERROR *** Muppet modechar detected.");
+00603         }
+00604         return false;
+00605 }
 
@@ -605,13 +605,13 @@ Adds a G-line The G-line is propogated to all of the servers in the mesh and enf

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

References add_gline(), and duration().

-

00680 {
-00681         add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
-00682 }
+
00682 {
+00683         add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
+00684 }
 
@@ -666,13 +666,13 @@ 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 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 694 of file modules.cpp. +Definition at line 696 of file modules.cpp.

References add_kline(), and duration().

-

00695 {
-00696         add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
-00697 }
+
00697 {
+00698         add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
+00699 }
 
@@ -727,13 +727,13 @@ Adds a Q-line The Q-line is propogated to all of the servers in the mesh and enf

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

References add_qline(), and duration().

-

00685 {
-00686         add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str());
-00687 }
+
00687 {
+00688         add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str());
+00689 }
 
@@ -788,13 +788,13 @@ Adds a Z-line The Z-line is propogated to all of the servers in the mesh and enf

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

References add_zline(), and duration().

-

00690 {
-00691         add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str());
-00692 }
+
00692 {
+00693         add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str());
+00694 }
 
@@ -828,13 +828,13 @@ 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 729 of file modules.cpp. +Definition at line 731 of file modules.cpp.

References duration().

-

00730 {
-00731         return duration(delta.c_str());
-00732 }
+
00732 {
+00733         return duration(delta.c_str());
+00734 }
 
@@ -890,11 +890,11 @@ Calls the handler for a command, either implemented by the core or by another mo 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.

-Definition at line 427 of file modules.cpp. +Definition at line 429 of file modules.cpp.

-

00428 {
-00429         call_handler(commandname.c_str(),parameters,pcnt,user);
-00430 }
+
00430 {
+00431         call_handler(commandname.c_str(),parameters,pcnt,user);
+00432 }
 
@@ -937,13 +937,13 @@ Change GECOS (fullname) of a user.

You should always call this method to change a user's GECOS rather than writing directly to the fullname member of userrec, as any change applied via this method will be propogated to any linked servers.

-Definition at line 520 of file modules.cpp. +Definition at line 522 of file modules.cpp.

References ChangeName().

-

00521 {
-00522         ChangeName(user,gecos.c_str());
-00523 }
+
00523 {
+00524         ChangeName(user,gecos.c_str());
+00525 }
 
@@ -986,13 +986,13 @@ Change displayed hostname of a user.

You should always call this method to change a user's host rather than writing directly to the dhost member of userrec, as any change applied via this method will be propogated to any linked servers.

-Definition at line 515 of file modules.cpp. +Definition at line 517 of file modules.cpp.

References ChangeDisplayedHost().

-

00516 {
-00517         ChangeDisplayedHost(user,host.c_str());
-00518 }
+
00518 {
+00519         ChangeDisplayedHost(user,host.c_str());
+00520 }
 
@@ -1035,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 412 of file modules.cpp. +Definition at line 414 of file modules.cpp.

-

00413 {
-00414         force_nickchange(user,nickname.c_str());
-00415 }
+
00415 {
+00416         force_nickchange(user,nickname.c_str());
+00417 }
 
@@ -1082,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 545 of file modules.cpp. +Definition at line 547 of file modules.cpp.

References cmode().

-

00546 {
-00547         return cmode(User,Chan);
-00548 }
+
00548 {
+00549         return cmode(User,Chan);
+00550 }
 
@@ -1131,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 493 of file modules.cpp. +Definition at line 495 of file modules.cpp.

References common_channels().

-

00494 {
-00495         return (common_channels(u1,u2) != 0);
-00496 }
+
00496 {
+00497         return (common_channels(u1,u2) != 0);
+00498 }
 
@@ -1171,11 +1171,11 @@ Returns a count of the number of users on a channel.

This will NEVER be 0, as if the chanrec exists, it will have at least one user in the channel.

-Definition at line 613 of file modules.cpp. +Definition at line 615 of file modules.cpp.

-

00614 {
-00615         return usercount(c);
-00616 }
+
00616 {
+00617         return usercount(c);
+00618 }
 
@@ -1209,13 +1209,13 @@ Deletes a local E-Line.

-Definition at line 724 of file modules.cpp. +Definition at line 726 of file modules.cpp.

References del_eline().

-

00725 {
-00726         del_eline(hostmask.c_str());
-00727 }
+
00727 {
+00728         del_eline(hostmask.c_str());
+00729 }
 
@@ -1249,13 +1249,13 @@ Deletes a G-Line from all servers on the mesh.

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

References del_gline().

-

00705 {
-00706         del_gline(hostmask.c_str());
-00707 }
+
00707 {
+00708         del_gline(hostmask.c_str());
+00709 }
 
@@ -1289,13 +1289,13 @@ Deletes a local K-Line.

-Definition at line 719 of file modules.cpp. +Definition at line 721 of file modules.cpp.

References del_kline().

-

00720 {
-00721         del_kline(hostmask.c_str());
-00722 }
+
00722 {
+00723         del_kline(hostmask.c_str());
+00724 }
 
@@ -1329,13 +1329,13 @@ Deletes a Q-Line from all servers on the mesh.

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

References del_qline().

-

00710 {
-00711         del_qline(nickname.c_str());
-00712 }
+
00712 {
+00713         del_qline(nickname.c_str());
+00714 }
 
@@ -1369,13 +1369,13 @@ Deletes a Z-Line from all servers on the mesh.

-Definition at line 714 of file modules.cpp. +Definition at line 716 of file modules.cpp.

References del_zline().

-

00715 {
-00716         del_zline(ipaddr.c_str());
-00717 }
+
00717 {
+00718         del_zline(ipaddr.c_str());
+00719 }
 
@@ -1409,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 540 of file modules.cpp. +Definition at line 542 of file modules.cpp.

-

00541 {
-00542         return FindChan(channel.c_str());
-00543 }
+
00543 {
+00544         return FindChan(channel.c_str());
+00545 }
 
@@ -1447,13 +1447,13 @@ Attempts to look up a nick using the file descriptor associated with that nick.

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

-Definition at line 535 of file modules.cpp. +Definition at line 537 of file modules.cpp.

-References fd_ref_table. +References fd_ref_table.

-

00536 {
-00537         return (socket < 65536 ? fd_ref_table[socket] : NULL);
-00538 }
+
00538 {
+00539         return (socket < 65536 ? fd_ref_table[socket] : NULL);
+00540 }
 
@@ -1487,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 807 of file modules.cpp. +Definition at line 809 of file modules.cpp.

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

-

00808 {
-00809         for (int i = 0; i <= MODCOUNT; i++)
-00810         {
-00811                 if (module_names[i] == name)
-00812                 {
-00813                         return modules[i];
-00814                 }
-00815         }
-00816         return NULL;
-00817 }
+
00810 {
+00811         for (int i = 0; i <= MODCOUNT; i++)
+00812         {
+00813                 if (module_names[i] == name)
+00814                 {
+00815                         return modules[i];
+00816                 }
+00817         }
+00818         return NULL;
+00819 }
 
@@ -1534,11 +1534,11 @@ Attempts to look up a nick and return a pointer to it.

This function will return NULL if the nick does not exist.

-Definition at line 530 of file modules.cpp. +Definition at line 532 of file modules.cpp.

-

00531 {
-00532         return Find(nick);
-00533 }
+
00533 {
+00534         return Find(nick);
+00535 }
 
@@ -1571,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 570 of file modules.cpp. +Definition at line 572 of file modules.cpp.

-

00571 {
-00572         return Admin(getadminname(),getadminemail(),getadminnick());
-00573 }
+
00573 {
+00574         return Admin(getadminname(),getadminemail(),getadminnick());
+00575 }
 
@@ -1608,11 +1608,11 @@ Returns the network name, global to all linked servers.

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

-

00561 {
-00562         return getnetworkname();
-00563 }
+
00563 {
+00564         return getnetworkname();
+00565 }
 
@@ -1645,11 +1645,11 @@ Returns the server description string of the local server.

-Definition at line 565 of file modules.cpp. +Definition at line 567 of file modules.cpp.

-

00566 {
-00567         return getserverdesc();
-00568 }
+
00568 {
+00569         return getserverdesc();
+00570 }
 
@@ -1682,11 +1682,11 @@ Returns the server name of the server where the module is loaded.

-Definition at line 555 of file modules.cpp. +Definition at line 557 of file modules.cpp.

-

00556 {
-00557         return getservername();
-00558 }
+
00558 {
+00559         return getservername();
+00560 }
 
@@ -1720,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 400 of file modules.cpp. +Definition at line 402 of file modules.cpp.

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

-

00401 {
-00402         chanuserlist userl;
-00403         userl.clear();
-00404         std::vector<char*> *list = chan->GetUsers();
-00405         for (std::vector<char*>::iterator i = list->begin(); i != list->end(); i++)
-00406         {
-00407                 char* o = *i;
-00408                 userl.push_back((userrec*)o);
-00409         }
-00410         return userl;
-00411 }
+
00403 {
+00404         chanuserlist userl;
+00405         userl.clear();
+00406         std::vector<char*> *list = chan->GetUsers();
+00407         for (std::vector<char*>::iterator i = list->begin(); i != list->end(); i++)
+00408         {
+00409                 char* o = *i;
+00410                 userl.push_back((userrec*)o);
+00411         }
+00412         return userl;
+00413 }
 
@@ -1768,13 +1768,13 @@ Returns true if a nick is valid.

Nicks for unregistered connections will return false.

-Definition at line 525 of file modules.cpp. +Definition at line 527 of file modules.cpp.

References isnick().

-

00526 {
-00527         return (isnick(nick.c_str()) != 0);
-00528 }
+
00528 {
+00529         return (isnick(nick.c_str()) != 0);
+00530 }
 
@@ -1817,13 +1817,13 @@ Checks if a user is on a channel.

This function will return true or false to indicate if user 'User' is on channel 'Chan'.

-Definition at line 550 of file modules.cpp. +Definition at line 552 of file modules.cpp.

References has_channel().

-

00551 {
-00552         return has_channel(User,Chan);
-00553 }
+
00553 {
+00554         return has_channel(User,Chan);
+00555 }
 
@@ -1857,13 +1857,13 @@ Returns true if the servername you give is ulined.

ULined servers have extra privilages. They are allowed to change nicknames on remote servers, change modes of clients which are on remote servers and set modes of channels where there are no channel operators for that channel on the ulined server, amongst other things. Ulined server data is also broadcast across the mesh at all times as opposed to selectively messaged in the case of normal servers, as many ulined server types (such as services) do not support meshed links and must operate in this manner.

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

References is_uline().

-

00423 {
-00424         return is_uline(server.c_str());
-00425 }
+
00425 {
+00426         return is_uline(server.c_str());
+00427 }
 
@@ -1897,35 +1897,35 @@ Returns true if a nick!ident string is correctly formatted, false if otherwise.

-Definition at line 734 of file modules.cpp. +Definition at line 736 of file modules.cpp.

-

00735 {
-00736         const char* dest = mask.c_str();
-00737         if (strchr(dest,'!')==0)
-00738                 return false;
-00739         if (strchr(dest,'@')==0)
+
00737 {
+00738         const char* dest = mask.c_str();
+00739         if (strchr(dest,'!')==0)
 00740                 return false;
-00741         for (int i = 0; i < strlen(dest); i++)
-00742                 if (dest[i] < 32)
-00743                         return false;
-00744         for (int i = 0; i < strlen(dest); i++)
-00745                 if (dest[i] > 126)
-00746                         return false;
-00747         int c = 0;
-00748         for (int i = 0; i < strlen(dest); i++)
-00749                 if (dest[i] == '!')
-00750                         c++;
-00751         if (c>1)
-00752                 return false;
-00753         c = 0;
-00754         for (int i = 0; i < strlen(dest); i++)
-00755                 if (dest[i] == '@')
-00756                         c++;
-00757         if (c>1)
-00758                 return false;
-00759 
-00760         return true;
-00761 }
+00741         if (strchr(dest,'@')==0)
+00742                 return false;
+00743         for (int i = 0; i < strlen(dest); i++)
+00744                 if (dest[i] < 32)
+00745                         return false;
+00746         for (int i = 0; i < strlen(dest); i++)
+00747                 if (dest[i] > 126)
+00748                         return false;
+00749         int c = 0;
+00750         for (int i = 0; i < strlen(dest); i++)
+00751                 if (dest[i] == '!')
+00752                         c++;
+00753         if (c>1)
+00754                 return false;
+00755         c = 0;
+00756         for (int i = 0; i < strlen(dest); i++)
+00757                 if (dest[i] == '@')
+00758                         c++;
+00759         if (c>1)
+00760                 return false;
+00761 
+00762         return true;
+00763 }
 
@@ -1974,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 390 of file modules.cpp. +Definition at line 392 of file modules.cpp.

-

00391 {
-00392         return add_channel(user,cname.c_str(),key.c_str(),false);
-00393 }
+
00393 {
+00394         return add_channel(user,cname.c_str(),key.c_str(),false);
+00395 }
 
@@ -2021,11 +2021,11 @@ Writes a log string.

This method writes a line of text to the log. If the level given is lower than the level given in the configuration, this command has no effect.

-Definition at line 432 of file modules.cpp. +Definition at line 434 of file modules.cpp.

-

00433 {
-00434         log(level,"%s",s.c_str());
-00435 }
+
00435 {
+00436         log(level,"%s",s.c_str());
+00437 }
 
@@ -2068,14 +2068,14 @@ Matches text against a glob pattern.

Uses the ircd's internal matching function to match string against a globbing pattern, e.g. *!*@*.com Returns true if the literal successfully matches the pattern, false if otherwise.

-Definition at line 377 of file modules.cpp. +Definition at line 379 of file modules.cpp.

-

00378 {
-00379         char literal[MAXBUF],pattern[MAXBUF];
-00380         strlcpy(literal,sliteral.c_str(),MAXBUF);
-00381         strlcpy(pattern,spattern.c_str(),MAXBUF);
-00382         return match(literal,pattern);
-00383 }
+
00380 {
+00381         char literal[MAXBUF],pattern[MAXBUF];
+00382         strlcpy(literal,sliteral.c_str(),MAXBUF);
+00383         strlcpy(pattern,spattern.c_str(),MAXBUF);
+00384         return match(literal,pattern);
+00385 }
 
@@ -2118,15 +2118,15 @@ 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 789 of file modules.cpp. +Definition at line 791 of file modules.cpp.

-

00790 {
-00791         if (c)
-00792         {
-00793                 return ChanAnyOnThisServer(c,(char*)servername.c_str());
-00794         }
-00795         else return false;
-00796 }
+
00792 {
+00793         if (c)
+00794         {
+00795                 return ChanAnyOnThisServer(c,(char*)servername.c_str());
+00796         }
+00797         else return false;
+00798 }
 
@@ -2169,15 +2169,15 @@ This function is used to check if user u has any channels in common with users o

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

-Definition at line 798 of file modules.cpp. +Definition at line 800 of file modules.cpp.

-

00799 {
-00800         if (u)
-00801         {
-00802                 return CommonOnThisServer(u,(char*)servername.c_str());
-00803         }
-00804         else return false;
-00805 }
+
00801 {
+00802         if (u)
+00803         {
+00804                 return CommonOnThisServer(u,(char*)servername.c_str());
+00805         }
+00806         else return false;
+00807 }
 
@@ -2211,11 +2211,11 @@ Sends a line of text to all connected servers.

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

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

-

00764 {
-00765         NetSendToAll((char*)text.c_str());
-00766 }
+
00766 {
+00767         NetSendToAll((char*)text.c_str());
+00768 }
 
@@ -2249,11 +2249,11 @@ This function is equivalent to Server::MeshSendToAll except it will only route t

-Definition at line 774 of file modules.cpp. +Definition at line 776 of file modules.cpp.

-

00775 {
-00776         NetSendToAllAlive((char*)text.c_str());
-00777 }
+
00777 {
+00778         NetSendToAllAlive((char*)text.c_str());
+00779 }
 
@@ -2296,11 +2296,11 @@ This function sends to all servers EXCEPT the one you specify.

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

-Definition at line 784 of file modules.cpp. +Definition at line 786 of file modules.cpp.

-

00785 {
-00786         NetSendToAllExcept(target.c_str(),(char*)text.c_str());
-00787 }
+
00787 {
+00788         NetSendToAllExcept(target.c_str(),(char*)text.c_str());
+00789 }
 
@@ -2343,12 +2343,12 @@ 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 768 of file modules.cpp. +Definition at line 770 of file modules.cpp.

-

00769 {
-00770         if (user)
-00771                 NetSendToCommon(user,(char*)text.c_str());
-00772 }
+
00771 {
+00772         if (user)
+00773                 NetSendToCommon(user,(char*)text.c_str());
+00774 }
 
@@ -2391,11 +2391,11 @@ This function sends a line of text directly to a server.

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

-Definition at line 779 of file modules.cpp. +Definition at line 781 of file modules.cpp.

-

00780 {
-00781         NetSendToOne((char*)destination.c_str(),(char*)text.c_str());
-00782 }
+
00782 {
+00783         NetSendToOne((char*)destination.c_str(),(char*)text.c_str());
+00784 }
 
@@ -2444,11 +2444,11 @@ Forces a user to part a channel.

This is similar to svspart and can be used to implement redirection, etc. Although the return value of this function is a pointer to a channel record, the returned data is undefined and should not be read or written to. This behaviour may be changed in a future version.

-Definition at line 395 of file modules.cpp. +Definition at line 397 of file modules.cpp.

-

00396 {
-00397         return del_channel(user,cname.c_str(),reason.c_str(),false);
-00398 }
+
00398 {
+00399         return del_channel(user,cname.c_str(),reason.c_str(),false);
+00400 }
 
@@ -2497,38 +2497,38 @@ 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 649 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. -

-

00650 {
-00651         zombie->fd = alive->fd;
-00652         alive->fd = FD_MAGIC_NUMBER;
-00653         alive->ClearBuffer();
-00654         Write(zombie->fd,":%s!%s@%s NICK %s",alive->nick,alive->ident,alive->host,zombie->nick);
-00655         kill_link(alive,message.c_str());
-00656         fd_ref_table[zombie->fd] = zombie;
-00657         for (int i = 0; i != MAXCHANS; i++)
-00658         {
-00659                 if (zombie->chans[i].channel != NULL)
-00660                 {
-00661                         if (zombie->chans[i].channel->name)
-00662                         {
-00663                                 chanrec* Ptr = zombie->chans[i].channel;
-00664                                 WriteFrom(zombie->fd,zombie,"JOIN %s",Ptr->name);
-00665                                 if (Ptr->topicset)
-00666                                 {
-00667                                         WriteServ(zombie->fd,"332 %s %s :%s", zombie->nick, Ptr->name, Ptr->topic);
-00668                                         WriteServ(zombie->fd,"333 %s %s %s %d", zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset);
-00669                                 }
-00670                                 userlist(zombie,Ptr);
-00671                                 WriteServ(zombie->fd,"366 %s %s :End of /NAMES list.", zombie->nick, Ptr->name);
-00672 
-00673                         }
-00674                 }
-00675         }
-00676 
-00677 }
+Definition at line 651 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. +

+

00652 {
+00653         zombie->fd = alive->fd;
+00654         alive->fd = FD_MAGIC_NUMBER;
+00655         alive->ClearBuffer();
+00656         Write(zombie->fd,":%s!%s@%s NICK %s",alive->nick,alive->ident,alive->host,zombie->nick);
+00657         kill_link(alive,message.c_str());
+00658         fd_ref_table[zombie->fd] = zombie;
+00659         for (int i = 0; i != MAXCHANS; i++)
+00660         {
+00661                 if (zombie->chans[i].channel != NULL)
+00662                 {
+00663                         if (zombie->chans[i].channel->name)
+00664                         {
+00665                                 chanrec* Ptr = zombie->chans[i].channel;
+00666                                 WriteFrom(zombie->fd,zombie,"JOIN %s",Ptr->name);
+00667                                 if (Ptr->topicset)
+00668                                 {
+00669                                         WriteServ(zombie->fd,"332 %s %s :%s", zombie->nick, Ptr->name, Ptr->topic);
+00670                                         WriteServ(zombie->fd,"333 %s %s %s %d", zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset);
+00671                                 }
+00672                                 userlist(zombie,Ptr);
+00673                                 WriteServ(zombie->fd,"366 %s %s :End of /NAMES list.", zombie->nick, Ptr->name);
+00674 
+00675                         }
+00676                 }
+00677         }
+00678 
+00679 }
 
@@ -2573,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 417 of file modules.cpp. +Definition at line 419 of file modules.cpp.

-

00418 {
-00419         kill_link(user,reason.c_str());
-00420 }
+
00420 {
+00421         kill_link(user,reason.c_str());
+00422 }
 
@@ -2620,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 447 of file modules.cpp. +Definition at line 449 of file modules.cpp.

-

00448 {
-00449         Write(Socket,"%s",s.c_str());
-00450 }
+
00450 {
+00451         Write(Socket,"%s",s.c_str());
+00452 }
 
@@ -2679,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 481 of file modules.cpp. -

-

00482 {
-00483         if (IncludeSender)
-00484         {
-00485                 WriteChannel(Channel,User,"%s",s.c_str());
-00486         }
-00487         else
-00488         {
-00489                 ChanExceptSender(Channel,User,"%s",s.c_str());
-00490         }
-00491 }
+Definition at line 483 of file modules.cpp.
+

+

00484 {
+00485         if (IncludeSender)
+00486         {
+00487                 WriteChannel(Channel,User,"%s",s.c_str());
+00488         }
+00489         else
+00490         {
+00491                 ChanExceptSender(Channel,User,"%s",s.c_str());
+00492         }
+00493 }
 
@@ -2739,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 476 of file modules.cpp. +Definition at line 478 of file modules.cpp.

-

00477 {
-00478         WriteChannelWithServ((char*)ServName.c_str(), Channel, "%s", text.c_str());
-00479 }
+
00479 {
+00480         WriteChannelWithServ((char*)ServName.c_str(), Channel, "%s", text.c_str());
+00481 }
 
@@ -2792,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 498 of file modules.cpp. -

-

00499 {
-00500         if (IncludeSender)
-00501         {
-00502                 WriteCommon(User,"%s",text.c_str());
-00503         }
-00504         else
-00505         {
-00506                 WriteCommonExcept(User,"%s",text.c_str());
-00507         }
-00508 }
+Definition at line 500 of file modules.cpp.
+

+

00501 {
+00502         if (IncludeSender)
+00503         {
+00504                 WriteCommon(User,"%s",text.c_str());
+00505         }
+00506         else
+00507         {
+00508                 WriteCommonExcept(User,"%s",text.c_str());
+00509         }
+00510 }
 
@@ -2852,11 +2852,11 @@ Sends text from a user to a socket.

This method writes a line of text to an established socket, with the given user's nick/ident /host combination prepended, as used in PRIVSG etc commands (see RFC 1459)

-Definition at line 457 of file modules.cpp. +Definition at line 459 of file modules.cpp.

-

00458 {
-00459         WriteFrom(Socket,User,"%s",s.c_str());
-00460 }
+
00460 {
+00461         WriteFrom(Socket,User,"%s",s.c_str());
+00462 }
 
@@ -2912,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 442 of file modules.cpp. +Definition at line 444 of file modules.cpp.

References server_mode().

-

00443 {
-00444         server_mode(parameters,pcnt,user);
-00445 }
+
00445 {
+00446         server_mode(parameters,pcnt,user);
+00447 }
 
@@ -2952,11 +2952,11 @@ Sends text to all opers.

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

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

-

00373 {
-00374         WriteOpers("%s",s.c_str());
-00375 }
+
00375 {
+00376         WriteOpers("%s",s.c_str());
+00377 }
 
@@ -2999,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 452 of file modules.cpp. +Definition at line 454 of file modules.cpp.

-

00453 {
-00454         WriteServ(Socket,"%s",s.c_str());
-00455 }
+
00455 {
+00456         WriteServ(Socket,"%s",s.c_str());
+00457 }
 
@@ -3056,22 +3056,22 @@ The format will become:

:localserver TEXT

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

-Definition at line 462 of file modules.cpp. +Definition at line 464 of file modules.cpp.

References connection::fd.

-

00463 {
-00464         if (!Source)
-00465         {
-00466                 // if source is NULL, then the message originates from the local server
-00467                 Write(Dest->fd,":%s %s",this->GetServerName().c_str(),s.c_str());
-00468         }
-00469         else
-00470         {
-00471                 // otherwise it comes from the user specified
-00472                 WriteTo(Source,Dest,"%s",s.c_str());
-00473         }
-00474 }
+
00465 {
+00466         if (!Source)
+00467         {
+00468                 // if source is NULL, then the message originates from the local server
+00469                 Write(Dest->fd,":%s %s",this->GetServerName().c_str(),s.c_str());
+00470         }
+00471         else
+00472         {
+00473                 // otherwise it comes from the user specified
+00474                 WriteTo(Source,Dest,"%s",s.c_str());
+00475         }
+00476 }
 
@@ -3122,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 385 of file modules.cpp. +Definition at line 387 of file modules.cpp.

-

00386 {
-00387         WriteMode(modes.c_str(),flags,"%s",text.c_str());
-00388 }
+
00388 {
+00389         WriteMode(modes.c_str(),flags,"%s",text.c_str());
+00390 }
 
@@ -3169,11 +3169,11 @@ Sends a WALLOPS message.

This method writes a WALLOPS message to all users with the +w flag, originating from the specified user.

-Definition at line 510 of file modules.cpp. +Definition at line 512 of file modules.cpp.

-

00511 {
-00512         WriteWallOps(User,false,"%s",text.c_str());
-00513 }
+
00513 {
+00514         WriteWallOps(User,false,"%s",text.c_str());
+00515 }
 
@@ -3216,44 +3216,44 @@ 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 619 of file modules.cpp. -

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

-

00620 {
-00621         unsigned int old_fd = user->fd;
-00622         user->fd = FD_MAGIC_NUMBER;
-00623         user->ClearBuffer();
-00624         Write(old_fd,"ERROR :Closing link (%s@%s) [%s]",user->ident,user->host,message.c_str());
-00625 #ifdef USE_KQUEUE
-00626         struct kevent ke;
-00627         EV_SET(&ke, old_fd, EVFILT_READ, EV_DELETE, 0, 0, NULL);
-00628         int i = kevent(kq, &ke, 1, 0, 0, NULL);
-00629         if (i == -1)
-00630         {
-00631                 log(DEBUG,"kqueue: Failed to remove user from queue!");
-00632         }
-00633 #endif
-00634 #ifdef USE_EPOLL
-00635         struct epoll_event ev;
-00636         ev.events = EPOLLIN | EPOLLET;
-00637         ev.data.fd = old_fd;
-00638         int i = epoll_ctl(ep, EPOLL_CTL_DEL, old_fd, &ev);
-00639         if (i < 0)
-00640         {
-00641                 log(DEBUG,"epoll: List deletion failure!");
-00642         }
-00643 #endif
-00644 
-00645         shutdown(old_fd,2);
-00646         close(old_fd);
-00647 }
+Definition at line 621 of file modules.cpp.
+

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

+

00622 {
+00623         unsigned int old_fd = user->fd;
+00624         user->fd = FD_MAGIC_NUMBER;
+00625         user->ClearBuffer();
+00626         Write(old_fd,"ERROR :Closing link (%s@%s) [%s]",user->ident,user->host,message.c_str());
+00627 #ifdef USE_KQUEUE
+00628         struct kevent ke;
+00629         EV_SET(&ke, old_fd, EVFILT_READ, EV_DELETE, 0, 0, NULL);
+00630         int i = kevent(kq, &ke, 1, 0, 0, NULL);
+00631         if (i == -1)
+00632         {
+00633                 log(DEBUG,"kqueue: Failed to remove user from queue!");
+00634         }
+00635 #endif
+00636 #ifdef USE_EPOLL
+00637         struct epoll_event ev;
+00638         ev.events = EPOLLIN | EPOLLET;
+00639         ev.data.fd = old_fd;
+00640         int i = epoll_ctl(ep, EPOLL_CTL_DEL, old_fd, &ev);
+00641         if (i < 0)
+00642         {
+00643                 log(DEBUG,"epoll: List deletion failure!");
+00644         }
+00645 #endif
+00646 
+00647         shutdown(old_fd,2);
+00648         close(old_fd);
+00649 }
 

The documentation for this class was generated from the following files: -
Generated on Wed May 25 22:03:22 2005 for InspIRCd by +
Generated on Mon May 30 05:17:32 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 997bb97f4..e4a6ab61b 100644 --- a/docs/module-doc/classVersion-members.html +++ b/docs/module-doc/classVersion-members.html @@ -15,7 +15,7 @@ RevisionVersion Version(int major, int minor, int revision, int build, int flags)Version ~classbase()classbase [inline] -
Generated on Wed May 25 22:03:31 2005 for InspIRCd by +
Generated on Mon May 30 05:17:45 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classVersion.html b/docs/module-doc/classVersion.html index 21041ae69..712ebc942 100644 --- a/docs/module-doc/classVersion.html +++ b/docs/module-doc/classVersion.html @@ -98,9 +98,9 @@ Definition at line 111 of

-Definition at line 243 of file modules.cpp. +Definition at line 245 of file modules.cpp.

-

00243 : Major(major), Minor(minor), Revision(revision), Build(build), Flags(flags) { };
+
00245 : 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 Wed May 25 22:03:31 2005 for InspIRCd by +
Generated on Mon May 30 05:17:45 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 4c1504a3d..59188e399 100644 --- a/docs/module-doc/classWhoWasUser-members.html +++ b/docs/module-doc/classWhoWasUser-members.html @@ -13,7 +13,7 @@ nickWhoWasUser serverWhoWasUser signonWhoWasUser -
Generated on Wed May 25 22:03:31 2005 for InspIRCd by +
Generated on Mon May 30 05:17:45 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classWhoWasUser.html b/docs/module-doc/classWhoWasUser.html index 67bd7ae11..726707548 100644 --- a/docs/module-doc/classWhoWasUser.html +++ b/docs/module-doc/classWhoWasUser.html @@ -16,13 +16,13 @@ Collaboration diagram for WhoWasUser:

char nick [NICKMAX] -char ident [16] +char ident [IDENTMAX+1] char dhost [160] char host [160] -char fullname [128] +char fullname [MAXGECOS+1] char server [256] @@ -34,7 +34,7 @@ A lightweight userrec used by WHOWAS.

-Definition at line 326 of file users.h.


Member Data Documentation

+Definition at line 325 of file users.h.

Member Data Documentation

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

-Definition at line 331 of file users.h. +Definition at line 330 of file users.h.

@@ -65,7 +65,7 @@ Definition at line 331 of f -
char WhoWasUser::fullname[128] + char WhoWasUser::fullname[MAXGECOS+1]
@@ -80,7 +80,7 @@ Definition at line 331 of f

-Definition at line 333 of file users.h. +Definition at line 332 of file users.h.

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

-Definition at line 332 of file users.h. +Definition at line 331 of file users.h.

@@ -113,7 +113,7 @@ Definition at line 332 of f -
char WhoWasUser::ident[16] + char WhoWasUser::ident[IDENTMAX+1]
@@ -128,7 +128,7 @@ Definition at line 332 of f

-Definition at line 330 of file users.h. +Definition at line 329 of file users.h.

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

-Definition at line 329 of file users.h. +Definition at line 328 of file users.h.

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

-Definition at line 334 of file users.h. +Definition at line 333 of file users.h.

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

-Definition at line 335 of file users.h. +Definition at line 334 of file users.h.


The documentation for this class was generated from the following file: -
Generated on Wed May 25 22:03:31 2005 for InspIRCd by +
Generated on Mon May 30 05:17:45 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 d5e86b274..159aeda02 100644 --- a/docs/module-doc/classXLine-members.html +++ b/docs/module-doc/classXLine-members.html @@ -14,7 +14,7 @@ set_timeXLine sourceXLine ~classbase()classbase [inline] -
Generated on Wed May 25 22:03:33 2005 for InspIRCd by +
Generated on Mon May 30 05:17:47 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classXLine.html b/docs/module-doc/classXLine.html index cbe5c5075..2c470752c 100644 --- a/docs/module-doc/classXLine.html +++ b/docs/module-doc/classXLine.html @@ -180,7 +180,7 @@ Definition at line 48 of fi
The documentation for this class was generated from the following file: -
Generated on Wed May 25 22:03:33 2005 for InspIRCd by +
Generated on Mon May 30 05:17:47 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 727b80138..9718d503f 100644 --- a/docs/module-doc/classZLine-members.html +++ b/docs/module-doc/classZLine-members.html @@ -16,7 +16,7 @@ set_timeXLine sourceXLine ~classbase()classbase [inline] -
Generated on Wed May 25 22:03:34 2005 for InspIRCd by +
Generated on Mon May 30 05:17:49 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classZLine.html b/docs/module-doc/classZLine.html index 50152b417..c30da86a9 100644 --- a/docs/module-doc/classZLine.html +++ b/docs/module-doc/classZLine.html @@ -90,7 +90,7 @@ Definition at line 103 of f
The documentation for this class was generated from the following file: -
Generated on Wed May 25 22:03:34 2005 for InspIRCd by +
Generated on Mon May 30 05:17:49 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 675be41bf..2e2a013ca 100644 --- a/docs/module-doc/classchanrec-members.html +++ b/docs/module-doc/classchanrec-members.html @@ -33,7 +33,7 @@ topicsetchanrec ~chanrec()chanrec [inline, virtual] ~classbase()classbase [inline] -
Generated on Wed May 25 22:02:48 2005 for InspIRCd by +
Generated on Mon May 30 05:16:32 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classchanrec.html b/docs/module-doc/classchanrec.html index 412bde3bb..610a0043e 100644 --- a/docs/module-doc/classchanrec.html +++ b/docs/module-doc/classchanrec.html @@ -407,7 +407,7 @@ Definition at line 221

References internal_userlist.

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

00222 {
 00223         return &internal_userlist;
@@ -846,7 +846,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().

@@ -874,7 +874,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().

@@ -902,7 +902,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().

@@ -930,12 +930,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 Wed May 25 22:02:48 2005 for InspIRCd by +
Generated on Mon May 30 05:16:32 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 16eb0a02b..0b2f5cf09 100644 --- a/docs/module-doc/classclassbase-members.html +++ b/docs/module-doc/classclassbase-members.html @@ -9,7 +9,7 @@ ageclassbase classbase()classbase [inline] ~classbase()classbase [inline] -
Generated on Wed May 25 22:02:50 2005 for InspIRCd by +
Generated on Mon May 30 05:16:37 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classclassbase.html b/docs/module-doc/classclassbase.html index 5bef9e6a2..ab2130a72 100644 --- a/docs/module-doc/classclassbase.html +++ b/docs/module-doc/classclassbase.html @@ -150,7 +150,7 @@ Referenced by classbase().
The documentation for this class was generated from the following file: -
Generated on Wed May 25 22:02:50 2005 for InspIRCd by +
Generated on Mon May 30 05:16:37 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 a03a3ff36..8fe5098a1 100644 --- a/docs/module-doc/classcommand__t-members.html +++ b/docs/module-doc/classcommand__t-members.html @@ -19,7 +19,7 @@ total_bytescommand_t use_countcommand_t ~classbase()classbase [inline] -
Generated on Wed May 25 22:02:52 2005 for InspIRCd by +
Generated on Mon May 30 05:16:40 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 5833c1fd2..81278b3ca 100644 --- a/docs/module-doc/classcommand__t.html +++ b/docs/module-doc/classcommand__t.html @@ -235,7 +235,7 @@ Definition at line 43 of
The documentation for this class was generated from the following file: -
Generated on Wed May 25 22:02:52 2005 for InspIRCd by +
Generated on Mon May 30 05:16:39 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 baffa2fba..1ff85057d 100644 --- a/docs/module-doc/classconnection-members.html +++ b/docs/module-doc/classconnection-members.html @@ -27,7 +27,7 @@ Shrink(std::string key)Extensible signonconnection ~classbase()classbase [inline] -
Generated on Wed May 25 22:02:56 2005 for InspIRCd by +
Generated on Mon May 30 05:16:47 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classconnection.html b/docs/module-doc/classconnection.html index ff5c952db..36140e975 100644 --- a/docs/module-doc/classconnection.html +++ b/docs/module-doc/classconnection.html @@ -134,7 +134,7 @@ Stats counter for bytes inbound.

Definition at line 313 of file connection.h.

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

@@ -162,7 +162,7 @@ Stats counter for bytes outbound.

Definition at line 317 of file connection.h.

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

@@ -190,7 +190,7 @@ Stats counter for commands inbound.

Definition at line 321 of file connection.h.

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

@@ -218,7 +218,7 @@ Stats counter for commands outbound.

Definition at line 325 of file connection.h.

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

@@ -246,7 +246,7 @@ File descriptor of the connection.

Definition at line 301 of file connection.h.

-Referenced by serverrec::BeginLink(), serverrec::CreateListener(), ConfigReader::DumpErrors(), serverrec::MeshCookie(), Server::PseudoToUser(), userrec::ReadData(), Server::SendTo(), serverrec::serverrec(), userrec::userrec(), and Server::UserToPseudo(). +Referenced by serverrec::BeginLink(), serverrec::CreateListener(), ConfigReader::DumpErrors(), serverrec::MeshCookie(), Server::PseudoToUser(), userrec::ReadData(), Server::SendTo(), serverrec::serverrec(), userrec::userrec(), and Server::UserToPseudo().

@@ -274,7 +274,7 @@ True if server/user has authenticated, false if otherwise.

Definition at line 329 of file connection.h.

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

@@ -302,7 +302,7 @@ Not used if this is a serverrec

Definition at line 305 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().

@@ -330,7 +330,7 @@ Time that the connection last sent data, used to calculate idle time.

Definition at line 351 of file connection.h.

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

@@ -358,7 +358,7 @@ IP of connection.

Definition at line 309 of file connection.h.

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

@@ -386,7 +386,7 @@ Time the connection was last pinged.

Definition at line 343 of file connection.h.

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

@@ -414,7 +414,7 @@ Used by PING checks with clients.

Definition at line 355 of file connection.h.

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

@@ -442,7 +442,7 @@ For a serverrec this is the current listening port of the serverrec object.

Definition at line 335 of file connection.h.

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

@@ -470,7 +470,7 @@ Used by userrec to indicate the registration status of the connection.

Definition at line 339 of file connection.h.

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

@@ -498,12 +498,12 @@ Time the connection was created, set in the constructor.

Definition at line 347 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 Wed May 25 22:02:56 2005 for InspIRCd by +
Generated on Mon May 30 05:16:47 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classes.html b/docs/module-doc/classes.html index 861b69bd6..718291856 100644 --- a/docs/module-doc/classes.html +++ b/docs/module-doc/classes.html @@ -7,26 +7,26 @@

InspIRCd Compound Index

  A  
-
DNS   HostItem   ModuleFactory   StrHashComp (irc)   
Admin   dns_ip4list   
  I  
-
ModuleMessage   
  U  
-
  B  
-
  E  
-
InAddr_HashComp (irc)   
  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   
command_t   
  F  
-
KLine   Request   
  X  
-
ConfigReader   FileReader   
  M  
-
  S  
-
XLine   
ConnectClass   
  G  
-
ModeParameter   Server   
  Z  
-
connection   GLine   Module   serverrec   ZLine   
  D  
+
  D  
  H  
-

Generated on Wed May 25 22:02:44 2005 for InspIRCd by +ModuleFactory   StrHashComp (irc)   Admin   DNS   HostItem   ModuleMessage   
  U  
+
  B  
+dns_ip4list   
  I  
+
  N  
+ucrec   BanItem   
  E  
+InAddr_HashComp (irc)   nspace::hash< in_addr > (nspace)   userrec   BoolSet   ELine   Invited   nspace::hash< string > (nspace)   
  V  
+
  C  
+Event   InviteItem   
  Q  
+Version   chanrec   ExemptItem   irc_char_traits (irc)   QLine   
  W  
+char_traits (std)   Extensible   ircd_connector   
  R  
+WhoWasUser   classbase   ExtMode   
  K  
+Request   
  X  
+command_t   
  F  
+KLine   
  S  
+XLine   ConfigReader   FileReader   
  M  
+Server   
  Z  
+ConnectClass   
  G  
+ModeParameter   serverrec   ZLine   connection   GLine   Module   
Generated on Mon May 30 05:16:22 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 ccb7798f5..8d838171f 100644 --- a/docs/module-doc/classircd__connector-members.html +++ b/docs/module-doc/classircd__connector-members.html @@ -55,7 +55,7 @@ versionircd_connector [private] WriteErrorircd_connector [private] ~classbase()classbase [inline] -
Generated on Wed May 25 22:03:11 2005 for InspIRCd by +
Generated on Mon May 30 05:17:18 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 047c68bdd..930a30da1 100644 --- a/docs/module-doc/classircd__connector.html +++ b/docs/module-doc/classircd__connector.html @@ -270,7 +270,7 @@ Fails if there is an error pending on the connection.

Returns:
True on success, false if the connection is down or the buffer is full

-Referenced by serverrec::SendPacket(). +Referenced by serverrec::SendPacket().

@@ -395,7 +395,7 @@ Close the connection by calling close() on its file descriptor This function cal

-Referenced by serverrec::SendPacket(). +Referenced by serverrec::SendPacket().

@@ -428,7 +428,7 @@ Flushes as much of the data from the buffer as possible, and advances the queue

Returns:
True if the flush succeeded, false if the connection is down

-Referenced by serverrec::SendPacket(). +Referenced by serverrec::SendPacket().

@@ -584,7 +584,7 @@ Return the servername on this established connection.

-Referenced by serverrec::SendPacket(). +Referenced by serverrec::SendPacket().

@@ -648,7 +648,7 @@ Get the state flags for this connection.

Returns:
The state flags associated with this connection

-Referenced by IsRoutable(), and serverrec::SendPacket(). +Referenced by serverrec::SendPacket().

@@ -713,7 +713,7 @@ Gets the error string for this connection.

Returns:
The last error to occur or an empty string

-Referenced by serverrec::SendPacket(). +Referenced by serverrec::SendPacket().

@@ -1091,7 +1091,7 @@ Set the state flags for this connection.

-Referenced by serverrec::AddIncoming(), serverrec::BeginLink(), serverrec::MeshCookie(), and serverrec::SendPacket(). +Referenced by serverrec::AddIncoming(), serverrec::BeginLink(), serverrec::MeshCookie(), and serverrec::SendPacket().

@@ -1534,7 +1534,7 @@ Definition at line 94


The documentation for this class was generated from the following file: -
Generated on Wed May 25 22:03:11 2005 for InspIRCd by +
Generated on Mon May 30 05:17:18 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 549e78433..c2bf7d4d3 100644 --- a/docs/module-doc/classserverrec-members.html +++ b/docs/module-doc/classserverrec-members.html @@ -51,7 +51,7 @@ versionserverrec ~classbase()classbase [inline] ~serverrec()serverrec -
Generated on Wed May 25 22:03:25 2005 for InspIRCd by +
Generated on Mon May 30 05:17:37 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classserverrec.html b/docs/module-doc/classserverrec.html index 4eab4d420..87775403b 100644 --- a/docs/module-doc/classserverrec.html +++ b/docs/module-doc/classserverrec.html @@ -384,7 +384,7 @@ Begin an outbound link to another ircd at targethost.

Definition at line 142 of file servers.cpp.

-References connectors, connection::fd, FindHost(), ircd_connector::MakeOutboundConnection(), SendPacket(), ircd_connector::SetHostAndPort(), ircd_connector::SetServerName(), ircd_connector::SetState(), STATE_DISCONNECTED, and STATE_NOAUTH_OUTBOUND. +References connectors, connection::fd, FindHost(), ircd_connector::MakeOutboundConnection(), SendPacket(), ircd_connector::SetHostAndPort(), ircd_connector::SetServerName(), ircd_connector::SetState(), STATE_DISCONNECTED, and STATE_NOAUTH_OUTBOUND.

00143 {
 00144         char connect[MAXBUF];
@@ -564,7 +564,7 @@ Definition at line 242
 

References connectors.

-Referenced by BeginLink(), IsRoutable(), and SendPacket(). +Referenced by BeginLink(), and SendPacket().

00243 {
 00244         for (int i = 0; i < this->connectors.size(); i++)
@@ -608,60 +608,84 @@ Flushes all data waiting to be written for all of this server's connections.
 

-Definition at line 284 of file servers.cpp. +Definition at line 274 of file servers.cpp.

References connectors, has_been_netsplit, IsRoutable(), STATE_DISCONNECTED, STATE_NOAUTH_INBOUND, STATE_NOAUTH_OUTBOUND, and TIME.

-

00285 {
-00286         for (int i = 0; i < this->connectors.size(); i++)
-00287         {
-00288                 // don't try and ping a NOAUTH_OUTBOUND state, its not authed yet!
-00289                 if ((this->connectors[i].GetState() == STATE_NOAUTH_OUTBOUND) && (TIME > this->connectors[i].age+30))
+
00275 {
+00276         char buffer[MAXBUF];
+00277         for (int i = 0; i < this->connectors.size(); i++)
+00278         {
+00279                 // don't try and ping a NOAUTH_OUTBOUND state, its not authed yet!
+00280                 if ((this->connectors[i].GetState() == STATE_NOAUTH_OUTBOUND) && (TIME > this->connectors[i].age+30))
+00281                 {
+00282                         // however if we reach this timer its connected timed out :)
+00283                         WriteOpers("*** Connection to %s timed out",this->connectors[i].GetServerName().c_str());
+00284                         snprintf(buffer,MAXBUF,"& %s",this->connectors[i].GetServerName().c_str());
+00285                         NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer);
+00286                         DoSplit(this->connectors[i].GetServerName().c_str());
+00287                         return;
+00288                 }
+00289                 if ((this->connectors[i].GetState() == STATE_NOAUTH_INBOUND) && (TIME > this->connectors[i].age+30))
 00290                 {
-00291                         // however if we reach this timer its connected timed out :)
-00292                         WriteOpers("*** Connection to %s timed out",this->connectors[i].GetServerName().c_str());
-00293                         DoSplit(this->connectors[i].GetServerName().c_str());
-00294                         return;
-00295                 }
-00296                 else if ((this->connectors[i].GetState() == STATE_NOAUTH_INBOUND) && (TIME > this->connectors[i].age+30))
-00297                 {
-00298                         WriteOpers("*** Connection from %s timed out",this->connectors[i].GetServerName().c_str());
-00299                         DoSplit(this->connectors[i].GetServerName().c_str());
-00300                         return;
-00301                 }
-00302                 else if (this->connectors[i].GetState() != STATE_DISCONNECTED)
-00303                 {
-00304                         if (!this->connectors[i].CheckPing())
-00305                         {
-00306                                 WriteOpers("*** Lost single connection to %s: Ping timeout",this->connectors[i].GetServerName().c_str());
-00307                                 this->connectors[i].CloseConnection();
-00308                                 this->connectors[i].SetState(STATE_DISCONNECTED);
-00309                                 if (!IsRoutable(this->connectors[i].GetServerName()))
-00310                                 {
-00311                                         WriteOpers("*** Server %s is no longer routable, disconnecting.",this->connectors[i].GetServerName().c_str());
-00312                                         DoSplit(this->connectors[i].GetServerName().c_str());
-00313                                 }
-00314                                 has_been_netsplit = true;
-00315                         }
-00316                 }
-00317                 if (this->connectors[i].HasBufferedOutput())
-00318                 {
-00319                         if (!this->connectors[i].FlushWriteBuf())
-00320                         {
-00321                                 // if we're here the write() caused an error, we cannot proceed
-00322                                 WriteOpers("*** Lost single connection to %s, link inactive and retrying: %s",this->connectors[i].GetServerName().c_str(),this->connectors[i].GetWriteError().c_str());
-00323                                 this->connectors[i].CloseConnection();
-00324                                 this->connectors[i].SetState(STATE_DISCONNECTED);
-00325                                 if (!IsRoutable(this->connectors[i].GetServerName()))
-00326                                 {
-00327                                         WriteOpers("*** Server %s is no longer routable, disconnecting.",this->connectors[i].GetServerName().c_str());
-00328                                         DoSplit(this->connectors[i].GetServerName().c_str());
-00329                                 }
-00330                                 has_been_netsplit = true;
-00331                         }
-00332                 }
-00333         }
-00334 }
+00291                         WriteOpers("*** Connection from %s timed out",this->connectors[i].GetServerName().c_str());
+00292                         snprintf(buffer,MAXBUF,"& %s",this->connectors[i].GetServerName().c_str());
+00293                         NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer);
+00294                         DoSplit(this->connectors[i].GetServerName().c_str());
+00295                         return;
+00296                 }
+00297                 if (this->connectors[i].GetState() != STATE_DISCONNECTED)
+00298                 {
+00299                         if (!this->connectors[i].CheckPing())
+00300                         {
+00301                                 WriteOpers("*** Lost single connection to %s: Ping timeout",this->connectors[i].GetServerName().c_str());
+00302                                 this->connectors[i].CloseConnection();
+00303                                 this->connectors[i].SetState(STATE_DISCONNECTED);
+00304                                 if (!IsRoutable(this->connectors[i].GetServerName()))
+00305                                 {
+00306                                         WriteOpers("*** Server %s is no longer routable, disconnecting.",this->connectors[i].GetServerName().c_str());
+00307                                         snprintf(buffer,MAXBUF,"& %s",this->connectors[i].GetServerName().c_str());
+00308                                         NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer);
+00309                                         DoSplit(this->connectors[i].GetServerName().c_str());
+00310                                 }
+00311                                 has_been_netsplit = true;
+00312                         }
+00313                 }
+00314                 if ((this->connectors[i].GetWriteError() !="") && (this->connectors[i].GetState() != STATE_DISCONNECTED))
+00315                 {
+00316                         // if we're here the write() caused an error, we cannot proceed
+00317                         WriteOpers("*** Lost single connection to %s, link inactive and retrying: %s",this->connectors[i].GetServerName().c_str(),this->connectors[i].GetWriteError().c_str());
+00318                         this->connectors[i].CloseConnection();
+00319                         this->connectors[i].SetState(STATE_DISCONNECTED);
+00320                         if (!IsRoutable(this->connectors[i].GetServerName()))
+00321                         {
+00322                                 WriteOpers("*** Server %s is no longer routable, disconnecting.",this->connectors[i].GetServerName().c_str());
+00323                                 snprintf(buffer,MAXBUF,"& %s",this->connectors[i].GetServerName().c_str());
+00324                                 NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer);
+00325                                 DoSplit(this->connectors[i].GetServerName().c_str());
+00326                         }
+00327                         has_been_netsplit = true;
+00328                 }
+00329                 if ((this->connectors[i].HasBufferedOutput()) && (this->connectors[i].GetState() != STATE_DISCONNECTED))
+00330                 {
+00331                         if (!this->connectors[i].FlushWriteBuf())
+00332                         {
+00333                                 // if we're here the write() caused an error, we cannot proceed
+00334                                 WriteOpers("*** Lost single connection to %s, link inactive and retrying: %s",this->connectors[i].GetServerName().c_str(),this->connectors[i].GetWriteError().c_str());
+00335                                 this->connectors[i].CloseConnection();
+00336                                 this->connectors[i].SetState(STATE_DISCONNECTED);
+00337                                 if (!IsRoutable(this->connectors[i].GetServerName()))
+00338                                 {
+00339                                         WriteOpers("*** Server %s is no longer routable, disconnecting.",this->connectors[i].GetServerName().c_str());
+00340                                         snprintf(buffer,MAXBUF,"& %s",this->connectors[i].GetServerName().c_str());
+00341                                         NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer);
+00342                                         DoSplit(this->connectors[i].GetServerName().c_str());
+00343                                 }
+00344                                 has_been_netsplit = true;
+00345                         }
+00346                 }
+00347         }
+00348 }
 
@@ -718,7 +742,7 @@ Begin an outbound mesh link to another ircd on a network you are already an auth

Definition at line 182 of file servers.cpp.

-References connectors, connection::fd, ircd_connector::MakeOutboundConnection(), SendPacket(), ircd_connector::SetHostAndPort(), ircd_connector::SetServerName(), ircd_connector::SetState(), STATE_DISCONNECTED, and STATE_NOAUTH_OUTBOUND. +References connectors, connection::fd, ircd_connector::MakeOutboundConnection(), SendPacket(), ircd_connector::SetHostAndPort(), ircd_connector::SetServerName(), ircd_connector::SetState(), STATE_DISCONNECTED, and STATE_NOAUTH_OUTBOUND.

00183 {
 00184         char connect[MAXBUF];
@@ -796,107 +820,126 @@ Returns the next available packet and returns true if data is available.
 

Writes the servername the data came from to 'host'. If no data is available this function returns false. This function will automatically close broken links and reroute pathways, generating split messages on the network.

-Definition at line 431 of file servers.cpp. -

-References already_have_sum(), connectors, DEBUG, has_been_netsplit, IsRoutable(), and STATE_DISCONNECTED. -

-

00432 {
-00433         char data[65536];
-00434         memset(data, 0, 65536);
-00435         for (int i = 0; i < this->connectors.size(); i++)
-00436         {
-00437                 if (this->connectors[i].GetState() != STATE_DISCONNECTED)
-00438                 {
-00439                         // returns false if the packet could not be sent (e.g. target host down)
-00440                         int rcvsize = 0;
-00441 
-00442                         // check if theres any data on this socket
-00443                         // if not, continue onwards to the next.
-00444                         pollfd polls;
-00445                         polls.fd = this->connectors[i].GetDescriptor();
-00446                         polls.events = POLLIN;
-00447                         int ret = poll(&polls,1,1);
-00448                         if (ret <= 0) continue;
-00449 
-00450                         rcvsize = recv(this->connectors[i].GetDescriptor(),data,65000,0);
-00451                         data[rcvsize] = '\0';
-00452                         if (rcvsize == -1)
-00453                         {
-00454                                 if (errno != EAGAIN)
-00455                                 {
-00456                                         log(DEBUG,"recv() failed for serverrec::RecvPacket(): %s",strerror(errno));
-00457                                         log(DEBUG,"Disabling connector: %s",this->connectors[i].GetServerName().c_str());
-00458                                         this->connectors[i].CloseConnection();
-00459                                         this->connectors[i].SetState(STATE_DISCONNECTED);
-00460                                         if (!IsRoutable(this->connectors[i].GetServerName()))
-00461                                         {
-00462                                                 WriteOpers("*** Server %s is no longer routable, disconnecting.",this->connectors[i].GetServerName().c_str());
-00463                                                 DoSplit(this->connectors[i].GetServerName().c_str());
-00464                                         }
-00465                                         has_been_netsplit = true;
-00466                                 }
-00467                         }
-00468                         int pushed = 0;
-00469                         if (rcvsize > 0)
-00470                         {
-00471                                 if (!this->connectors[i].AddBuffer(data))
-00472                                 {
-00473                                         WriteOpers("*** Read buffer for %s exceeds maximum, closing connection!",this->connectors[i].GetServerName().c_str());
-00474                                         this->connectors[i].CloseConnection();
-00475                                         this->connectors[i].SetState(STATE_DISCONNECTED);
-00476                                         if (!IsRoutable(this->connectors[i].GetServerName()))
-00477                                         {
-00478                                                 WriteOpers("*** Server %s is no longer routable, disconnecting.",this->connectors[i].GetServerName().c_str());
-00479                                                 DoSplit(this->connectors[i].GetServerName().c_str());
-00480                                         }
-00481                                         has_been_netsplit = true;
-00482                                 }
-00483                                 if (this->connectors[i].BufferIsComplete())
+Definition at line 445 of file servers.cpp.
+

+References already_have_sum(), connectors, DEBUG, has_been_netsplit, IsRoutable(), and STATE_DISCONNECTED. +

+

00446 {
+00447         char data[65536],buffer[MAXBUF];
+00448         memset(data, 0, 65536);
+00449         for (int i = 0; i < this->connectors.size(); i++)
+00450         {
+00451                 if (this->connectors[i].GetState() != STATE_DISCONNECTED)
+00452                 {
+00453                         // returns false if the packet could not be sent (e.g. target host down)
+00454                         int rcvsize = 0;
+00455 
+00456                         // check if theres any data on this socket
+00457                         // if not, continue onwards to the next.
+00458                         pollfd polls;
+00459                         polls.fd = this->connectors[i].GetDescriptor();
+00460                         polls.events = POLLIN;
+00461                         int ret = poll(&polls,1,1);
+00462                         if (ret <= 0) continue;
+00463 
+00464                         rcvsize = recv(this->connectors[i].GetDescriptor(),data,65000,0);
+00465                         data[rcvsize] = '\0';
+00466                         if (rcvsize == 0)
+00467                         {
+00468                                 log(DEBUG,"recv() failed for serverrec::RecvPacket(): EOF");
+00469                                 log(DEBUG,"Disabling connector: %s",this->connectors[i].GetServerName().c_str());
+00470                                 this->connectors[i].CloseConnection();
+00471                                 this->connectors[i].SetState(STATE_DISCONNECTED);
+00472                                 if (!IsRoutable(this->connectors[i].GetServerName()))
+00473                                 {
+00474                                         WriteOpers("*** Server %s is no longer routable, disconnecting (EOF)",this->connectors[i].GetServerName().c_str());
+00475                                         snprintf(buffer,MAXBUF,"& %s",this->connectors[i].GetServerName().c_str());
+00476                                         NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer);
+00477                                         DoSplit(this->connectors[i].GetServerName().c_str());
+00478                                 }
+00479                                 has_been_netsplit = true;
+00480                         }
+00481                         if (rcvsize == -1)
+00482                         {
+00483                                 if (errno != EAGAIN)
 00484                                 {
-00485                                         this->connectors[i].ResetPing();
-00486                                         while (this->connectors[i].BufferIsComplete())
-00487                                         {
-00488                                                 std::string text = this->connectors[i].GetBuffer();
-00489                                                 if (text != "")
-00490                                                 {
-00491                                                         if ((text[0] == ':') && (text.find(" ") != std::string::npos))
-00492                                                         {
-00493                                                                 std::string orig = text;
-00494                                                                 log(DEBUG,"Original: %s",text.c_str());
-00495                                                                 std::string sum = text.substr(1,text.find(" ")-1);
-00496                                                                 text = text.substr(text.find(" ")+1,text.length());
-00497                                                                 std::string possible_token = text.substr(1,text.find(" ")-1);
-00498                                                                 if (possible_token.length() > 1)
-00499                                                                 {
-00500                                                                         sums.push_back("*");
-00501                                                                         text = orig;
-00502                                                                         log(DEBUG,"Non-mesh, non-tokenized string passed up the chain");
-00503                                                                 }
-00504                                                                 else
-00505                                                                 {
-00506                                                                         log(DEBUG,"Packet sum: '%s'",sum.c_str());
-00507                                                                         if ((already_have_sum(sum)) && (sum != "*"))
-00508                                                                         {
-00509                                                                                 // we don't accept dupes
-00510                                                                                 continue;
-00511                                                                         }
-00512                                                                         sums.push_back(sum.c_str());
-00513                                                                 }
-00514                                                         }
-00515                                                         else sums.push_back("*");
-00516                                                         messages.push_back(text.c_str());
-00517                                                         strlcpy(recvhost,this->connectors[i].GetServerName().c_str(),160);
-00518                                                         log(DEBUG,"serverrec::RecvPacket() %d:%s->%s",pushed++,recvhost,text.c_str());
-00519                                                 }
-00520                                         }
-00521                                         return true;
-00522                                 }
-00523                         }
-00524                 }
-00525         }
-00526         // nothing new yet -- message and host will be undefined
-00527         return false;
-00528 }
+00485                                         log(DEBUG,"recv() failed for serverrec::RecvPacket(): %s",strerror(errno));
+00486                                         log(DEBUG,"Disabling connector: %s",this->connectors[i].GetServerName().c_str());
+00487                                         this->connectors[i].CloseConnection();
+00488                                         this->connectors[i].SetState(STATE_DISCONNECTED);
+00489                                         if (!IsRoutable(this->connectors[i].GetServerName()))
+00490                                         {
+00491                                                 WriteOpers("*** Server %s is no longer routable, disconnecting.",this->connectors[i].GetServerName().c_str());
+00492                                                 snprintf(buffer,MAXBUF,"& %s",this->connectors[i].GetServerName().c_str());
+00493                                                 NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer);
+00494                                                 DoSplit(this->connectors[i].GetServerName().c_str());
+00495                                         }
+00496                                         has_been_netsplit = true;
+00497                                 }
+00498                         }
+00499                         int pushed = 0;
+00500                         if (rcvsize > 0)
+00501                         {
+00502                                 if (!this->connectors[i].AddBuffer(data))
+00503                                 {
+00504                                         WriteOpers("*** Read buffer for %s exceeds maximum, closing connection!",this->connectors[i].GetServerName().c_str());
+00505                                         this->connectors[i].CloseConnection();
+00506                                         this->connectors[i].SetState(STATE_DISCONNECTED);
+00507                                         if (!IsRoutable(this->connectors[i].GetServerName()))
+00508                                         {
+00509                                                 WriteOpers("*** Server %s is no longer routable, disconnecting.",this->connectors[i].GetServerName().c_str());
+00510                                                 snprintf(buffer,MAXBUF,"& %s",this->connectors[i].GetServerName().c_str());
+00511                                                 NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer);
+00512                                                 DoSplit(this->connectors[i].GetServerName().c_str());
+00513                                         }
+00514                                         has_been_netsplit = true;
+00515                                 }
+00516                                 if (this->connectors[i].BufferIsComplete())
+00517                                 {
+00518                                         this->connectors[i].ResetPing();
+00519                                         while (this->connectors[i].BufferIsComplete())
+00520                                         {
+00521                                                 std::string text = this->connectors[i].GetBuffer();
+00522                                                 if (text != "")
+00523                                                 {
+00524                                                         if ((text[0] == ':') && (text.find(" ") != std::string::npos))
+00525                                                         {
+00526                                                                 std::string orig = text;
+00527                                                                 log(DEBUG,"Original: %s",text.c_str());
+00528                                                                 std::string sum = text.substr(1,text.find(" ")-1);
+00529                                                                 text = text.substr(text.find(" ")+1,text.length());
+00530                                                                 std::string possible_token = text.substr(1,text.find(" ")-1);
+00531                                                                 if (possible_token.length() > 1)
+00532                                                                 {
+00533                                                                         sums.push_back("*");
+00534                                                                         text = orig;
+00535                                                                         log(DEBUG,"Non-mesh, non-tokenized string passed up the chain");
+00536                                                                 }
+00537                                                                 else
+00538                                                                 {
+00539                                                                         log(DEBUG,"Packet sum: '%s'",sum.c_str());
+00540                                                                         if ((already_have_sum(sum)) && (sum != "*"))
+00541                                                                         {
+00542                                                                                 // we don't accept dupes
+00543                                                                                 continue;
+00544                                                                         }
+00545                                                                         sums.push_back(sum.c_str());
+00546                                                                 }
+00547                                                         }
+00548                                                         else sums.push_back("*");
+00549                                                         messages.push_back(text.c_str());
+00550                                                         strlcpy(recvhost,this->connectors[i].GetServerName().c_str(),160);
+00551                                                         log(DEBUG,"serverrec::RecvPacket() %d:%s->%s",pushed++,recvhost,text.c_str());
+00552                                                 }
+00553                                         }
+00554                                         return true;
+00555                                 }
+00556                         }
+00557                 }
+00558         }
+00559         // nothing new yet -- message and host will be undefined
+00560         return false;
+00561 }
 
@@ -939,85 +982,85 @@ Send a message to a server by name, if the server is unavailable directly route

-Definition at line 336 of file servers.cpp. +Definition at line 350 of file servers.cpp.

References ircd_connector::AddWriteBuf(), ircd_connector::CloseConnection(), connectors, DEBUG, FindHost(), ircd_connector::FlushWriteBuf(), ircd_connector::GetServerName(), ircd_connector::GetState(), ircd_connector::GetWriteError(), ircd_connector::SetState(), and STATE_DISCONNECTED.

Referenced by BeginLink(), and MeshCookie().

-

00337 {
-00338         if ((!message) || (!sendhost))
-00339                 return true;
-00340 
-00341         ircd_connector* cn = this->FindHost(sendhost);
-00342 
-00343         if (!strchr(message,'\n'))
-00344         {
-00345                 strlcat(message,"\n",MAXBUF);
-00346         }
-00347 
-00348         if (cn)
-00349         {
-00350                 log(DEBUG,"main: serverrec::SendPacket() sent '%s' to %s",message,cn->GetServerName().c_str());
-00351 
-00352                 if (cn->GetState() == STATE_DISCONNECTED)
-00353                 {
-00354                         // fix: can only route one hop to avoid a loop
-00355                         if (strncmp(message,"R ",2))
-00356                         {
-00357                                 log(DEBUG,"Not a double reroute");
-00358                                 // this route is down, we must re-route the packet through an available point in the mesh.
-00359                                 for (int k = 0; k < this->connectors.size(); k++)
-00360                                 {
-00361                                         log(DEBUG,"Check connector %d: %s",k,this->connectors[k].GetServerName().c_str());
-00362                                         // search for another point in the mesh which can 'reach' where we want to go
-00363                                         for (int m = 0; m < this->connectors[k].routes.size(); m++)
-00364                                         {
-00365                                                 if (!strcasecmp(this->connectors[k].routes[m].c_str(),sendhost))
-00366                                                 {
-00367                                                         log(DEBUG,"Found alternative route for packet: %s",this->connectors[k].GetServerName().c_str());
-00368                                                         char buffer[MAXBUF];
-00369                                                         snprintf(buffer,MAXBUF,"R %s %s",sendhost,message);
-00370                                                         this->SendPacket(buffer,this->connectors[k].GetServerName().c_str());
-00371                                                         return true;
-00372                                                 }
-00373                                         }
-00374                                 }
-00375                         }
-00376                         char buffer[MAXBUF];
-00377                         snprintf(buffer,MAXBUF,"& %s",sendhost);
-00378                         WriteOpers("*** All connections to %s lost.",sendhost);
-00379                         NetSendToAllExcept(sendhost,buffer);
-00380                         DoSplit(sendhost);
-00381                         return false;
-00382                 }
-00383 
-00384                 // returns false if the packet could not be sent (e.g. target host down)
-00385                 if (!cn->AddWriteBuf(message))
-00386                 {
-00387                         // if we're here, there was an error pending, and the send cannot proceed
-00388                         log(DEBUG,"cn->AddWriteBuf() failed for serverrec::SendPacket(): %s",cn->GetWriteError().c_str());
-00389                         log(DEBUG,"Disabling connector: %s",cn->GetServerName().c_str());
-00390                         cn->CloseConnection();
-00391                         cn->SetState(STATE_DISCONNECTED);
-00392                         WriteOpers("*** Lost single connection to %s, link inactive and retrying: %s",cn->GetServerName().c_str(),cn->GetWriteError().c_str());
-00393                         // retry the packet along a new route so either arrival OR failure are gauranteed (bugfix)
-00394                         return this->SendPacket(message,sendhost);
-00395                 }
-00396                 if (!cn->FlushWriteBuf())
-00397                 {
-00398                         // if we're here the write() caused an error, we cannot proceed
-00399                         log(DEBUG,"cn->FlushWriteBuf() failed for serverrec::SendPacket(): %s",cn->GetWriteError().c_str());
-00400                         log(DEBUG,"Disabling connector: %s",cn->GetServerName().c_str());
-00401                         cn->CloseConnection();
-00402                         cn->SetState(STATE_DISCONNECTED);
-00403                         WriteOpers("*** Lost single connection to %s, link inactive and retrying: %s",cn->GetServerName().c_str(),cn->GetWriteError().c_str());
-00404                         // retry the packet along a new route so either arrival OR failure are gauranteed
-00405                         return this->SendPacket(message,sendhost);
-00406                 }
-00407                 return true;
-00408         }
-00409 }
+
00351 {
+00352         if ((!message) || (!sendhost))
+00353                 return true;
+00354 
+00355         ircd_connector* cn = this->FindHost(sendhost);
+00356 
+00357         if (!strchr(message,'\n'))
+00358         {
+00359                 strlcat(message,"\n",MAXBUF);
+00360         }
+00361 
+00362         if (cn)
+00363         {
+00364                 log(DEBUG,"main: serverrec::SendPacket() sent '%s' to %s",message,cn->GetServerName().c_str());
+00365 
+00366                 if (cn->GetState() == STATE_DISCONNECTED)
+00367                 {
+00368                         // fix: can only route one hop to avoid a loop
+00369                         if (strncmp(message,"R ",2))
+00370                         {
+00371                                 log(DEBUG,"Not a double reroute");
+00372                                 // this route is down, we must re-route the packet through an available point in the mesh.
+00373                                 for (int k = 0; k < this->connectors.size(); k++)
+00374                                 {
+00375                                         log(DEBUG,"Check connector %d: %s",k,this->connectors[k].GetServerName().c_str());
+00376                                         // search for another point in the mesh which can 'reach' where we want to go
+00377                                         for (int m = 0; m < this->connectors[k].routes.size(); m++)
+00378                                         {
+00379                                                 if (!strcasecmp(this->connectors[k].routes[m].c_str(),sendhost))
+00380                                                 {
+00381                                                         log(DEBUG,"Found alternative route for packet: %s",this->connectors[k].GetServerName().c_str());
+00382                                                         char buffer[MAXBUF];
+00383                                                         snprintf(buffer,MAXBUF,"R %s %s",sendhost,message);
+00384                                                         this->SendPacket(buffer,this->connectors[k].GetServerName().c_str());
+00385                                                         return true;
+00386                                                 }
+00387                                         }
+00388                                 }
+00389                         }
+00390                         char buffer[MAXBUF];
+00391                         snprintf(buffer,MAXBUF,"& %s",sendhost);
+00392                         WriteOpers("*** All connections to %s lost.",sendhost);
+00393                         NetSendToAllExcept(sendhost,buffer);
+00394                         DoSplit(sendhost);
+00395                         return false;
+00396                 }
+00397 
+00398                 // returns false if the packet could not be sent (e.g. target host down)
+00399                 if (!cn->AddWriteBuf(message))
+00400                 {
+00401                         // if we're here, there was an error pending, and the send cannot proceed
+00402                         log(DEBUG,"cn->AddWriteBuf() failed for serverrec::SendPacket(): %s",cn->GetWriteError().c_str());
+00403                         log(DEBUG,"Disabling connector: %s",cn->GetServerName().c_str());
+00404                         cn->CloseConnection();
+00405                         cn->SetState(STATE_DISCONNECTED);
+00406                         WriteOpers("*** Lost single connection to %s, link inactive and retrying: %s",cn->GetServerName().c_str(),cn->GetWriteError().c_str());
+00407                         // retry the packet along a new route so either arrival OR failure are gauranteed (bugfix)
+00408                         return this->SendPacket(message,sendhost);
+00409                 }
+00410                 if (!cn->FlushWriteBuf())
+00411                 {
+00412                         // if we're here the write() caused an error, we cannot proceed
+00413                         log(DEBUG,"cn->FlushWriteBuf() failed for serverrec::SendPacket(): %s",cn->GetWriteError().c_str());
+00414                         log(DEBUG,"Disabling connector: %s",cn->GetServerName().c_str());
+00415                         cn->CloseConnection();
+00416                         cn->SetState(STATE_DISCONNECTED);
+00417                         WriteOpers("*** Lost single connection to %s, link inactive and retrying: %s",cn->GetServerName().c_str(),cn->GetWriteError().c_str());
+00418                         // retry the packet along a new route so either arrival OR failure are gauranteed
+00419                         return this->SendPacket(message,sendhost);
+00420                 }
+00421                 return true;
+00422         }
+00423 }
 
@@ -1087,7 +1130,7 @@ With a serverrec, this is a list of all established server connections.

Definition at line 81 of file servers.h.

-Referenced by AddIncoming(), BeginLink(), FindHost(), FlushWriteBuffers(), IsRoutable(), MeshCookie(), RecvPacket(), SendPacket(), and serverrec(). +Referenced by AddIncoming(), BeginLink(), FindHost(), FlushWriteBuffers(), IsRoutable(), MeshCookie(), RecvPacket(), SendPacket(), and serverrec().

@@ -1396,7 +1439,7 @@ Referenced by serverrec()


The documentation for this class was generated from the following files: -
Generated on Wed May 25 22:03:25 2005 for InspIRCd by +
Generated on Mon May 30 05:17:37 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 index 76d5faf9b..198368101 100644 --- a/docs/module-doc/classstd_1_1char__traits.html +++ b/docs/module-doc/classstd_1_1char__traits.html @@ -14,7 +14,7 @@
The documentation for this class was generated from the following file: -
Generated on Wed May 25 22:02:49 2005 for InspIRCd by +
Generated on Mon May 30 05:16:33 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classucrec-members.html b/docs/module-doc/classucrec-members.html index 05c869dd8..3eb9e08bf 100644 --- a/docs/module-doc/classucrec-members.html +++ b/docs/module-doc/classucrec-members.html @@ -13,7 +13,7 @@ ucrec()ucrec [inline] ~classbase()classbase [inline] ~ucrec()ucrec [inline, virtual] -
Generated on Wed May 25 22:03:26 2005 for InspIRCd by +
Generated on Mon May 30 05:17:38 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classucrec.html b/docs/module-doc/classucrec.html index bd40b4b66..000120d15 100644 --- a/docs/module-doc/classucrec.html +++ b/docs/module-doc/classucrec.html @@ -134,7 +134,7 @@ If the record is not in use, this value will be NULL.

Definition at line 252 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 247 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 Wed May 25 22:03:26 2005 for InspIRCd by +
Generated on Mon May 30 05:17:38 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 ed3a8add4..8e2584e0c 100644 --- a/docs/module-doc/classuserrec-members.html +++ b/docs/module-doc/classuserrec-members.html @@ -21,10 +21,10 @@ cmds_outconnection connection()connection dhostuserrec - dns_doneuserrec + dns_doneuserrec Extend(std::string key, char *p)Extensible fdconnection - flooduserrec + flooduserrec FlushWriteBuf()userrec fullnameuserrec GetBuffer()userrec @@ -43,34 +43,33 @@ ipconnection IsInvited(char *channel)userrec [virtual] lastpingconnection - lines_inuserrec + lines_inuserrec modesuserrec nickuserrec npingconnection - operuserrec - passworduserrec - pingmaxuserrec + operuserrec + passworduserrec + pingmaxuserrec portconnection ReadData(void *buffer, size_t size)userrec - recvquserrec - recvqmaxuserrec + recvquserrec + recvqmaxuserrec registeredconnection RemoveInvite(char *channel)userrec [virtual] - reset_dueuserrec - resultuserrec - sendquserrec - sendqmaxuserrec + reset_dueuserrec + sendquserrec + sendqmaxuserrec serveruserrec SetWriteError(std::string error)userrec Shrink(std::string key)Extensible signonconnection - thresholduserrec - timeoutuserrec + thresholduserrec + timeoutuserrec userrec()userrec - WriteErroruserrec + WriteErroruserrec ~classbase()classbase [inline] ~userrec()userrec [inline, virtual] -
Generated on Wed May 25 22:03:30 2005 for InspIRCd by +
Generated on Mon May 30 05:17:43 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classuserrec.html b/docs/module-doc/classuserrec.html index e67ee6fd5..c96dc5009 100644 --- a/docs/module-doc/classuserrec.html +++ b/docs/module-doc/classuserrec.html @@ -18,8 +18,8 @@ Inheritance diagram for userrec:

[legend]
Collaboration diagram for userrec:

Collaboration graph
- - + +
[legend]
List of all members. @@ -83,68 +83,65 @@ Inheritance diagram for userrec:

char 
- + - + - + - + - + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + - + - + - + + - - - - + @@ -185,32 +182,31 @@ Definition at line 108 of f

-Definition at line 31 of file users.cpp. +Definition at line 32 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. +References awaymsg, connection::bytes_in, connection::bytes_out, ucrec::channel, chans, connection::cmds_in, connection::cmds_out, dhost, dns_done, connection::fd, flood, fullname, connection::haspassed, connection::host, ident, connection::idle_lastmsg, invites, connection::ip, connection::lastping, lines_in, modes, nick, connection::nping, oper, connection::port, recvq, connection::registered, reset_due, sendq, server, ServerName, connection::signon, TIME, timeout, and ucrec::uc_modes.

-

00032 {
-00033         // the PROPER way to do it, AVOID bzero at *ALL* costs
-00034         strcpy(nick,"");
-00035         strcpy(ip,"127.0.0.1");
-00036         timeout = 0;
-00037         strcpy(ident,"");
-00038         strcpy(host,"");
-00039         strcpy(dhost,"");
-00040         strcpy(fullname,"");
-00041         strcpy(modes,"");
-00042         strcpy(server,"");
-00043         strcpy(awaymsg,"");
-00044         strcpy(oper,"");
-00045         reset_due = TIME;
-00046         lines_in = 0;
-00047         fd = lastping = signon = idle_lastmsg = nping = registered = 0;
-00048         flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0;
-00049         haspassed = false;
-00050         dns_done = false;
-00051         recvq = "";
-00052         sendq = "";
-00053         strcpy(result,"");
+
00033 {
+00034         // the PROPER way to do it, AVOID bzero at *ALL* costs
+00035         strcpy(nick,"");
+00036         strcpy(ip,"127.0.0.1");
+00037         timeout = 0;
+00038         strcpy(ident,"");
+00039         strcpy(host,"");
+00040         strcpy(dhost,"");
+00041         strcpy(fullname,"");
+00042         strcpy(modes,"");
+00043         server = (char*)FindServerNamePtr(ServerName);
+00044         strcpy(awaymsg,"");
+00045         strcpy(oper,"");
+00046         reset_due = TIME;
+00047         lines_in = 0;
+00048         fd = lastping = signon = idle_lastmsg = nping = registered = 0;
+00049         flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0;
+00050         haspassed = false;
+00051         dns_done = false;
+00052         recvq = "";
+00053         sendq = "";
 00054         for (int i = 0; i < MAXCHANS; i++)
 00055         {
 00056                 this->chans[i].channel = NULL;
@@ -248,9 +244,9 @@ References awaymsg, 
 
 

-Definition at line 222 of file users.h. +Definition at line 221 of file users.h.

-

00222 {  }
+
00221 {  }
 
nick [NICKMAX]
 The users nickname.

char ident [16]
char ident [IDENTMAX+2]
 The users ident reply.

char dhost [160]
 The host displayed to non-opers (used for cloaking etc).

char fullname [128]
char fullname [MAXGECOS+1]
 The users full name.

char modes [MAXBUF]
char modes [54]
 The user's mode string.

ucrec chans [MAXCHANS]
char server [256]
char * server
 The server the user is connected to.

char awaymsg [512]
char awaymsg [MAXAWAY+1]
 The user's away message.

char result [256]
int flood
 Stores the result of the last GetFullHost or GetRealHost call.

int flood
 Number of lines the user can place into the buffer (up to the global NetBufferSize bytes) before they are disconnected for excess flood.

unsigned int timeout
 Number of lines the user can place into the buffer (up to the global NetBufferSize bytes) before they are disconnected for excess flood.

unsigned int timeout
 Number of seconds this user is given to send USER/NICK If they do not send their details in this time limit they will be disconnected.

char oper [NICKMAX]
 Number of seconds this user is given to send USER/NICK If they do not send their details in this time limit they will be disconnected.

char oper [NICKMAX]
 The oper type they logged in as, if they are an oper.

bool dns_done
 The oper type they logged in as, if they are an oper.

bool dns_done
 True when DNS lookups are completed.

unsigned int pingmax
 True when DNS lookups are completed.

unsigned int pingmax
 Number of seconds between PINGs for this user (set from <connect:allow> tag.

char password [MAXBUF]
 Number of seconds between PINGs for this user (set from <connect:allow> tag.

char password [MAXBUF]
 Password specified by the user when they registered.

std::string recvq
 Password specified by the user when they registered.

std::string recvq
 User's receive queue.

std::string sendq
 User's receive queue.

std::string sendq
 User's send queue.

int lines_in
 User's send queue.

int lines_in
 Flood counters.

time_t reset_due
 Flood counters.

time_t reset_due
long threshold
long threshold
std::string WriteError
std::string WriteError
long sendqmax
long sendqmax
 Maximum size this user's sendq can become.

long recvqmax
 Maximum size this user's sendq can become.

long recvqmax
 Maximum size this user's recvq can become.

 Maximum size this user's recvq can become.


Private Attributes

InvitedList invites
@@ -285,34 +281,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 190 of file users.cpp. -

-References recvq, recvqmax, and SetWriteError(). -

-

00191 {
-00192         std::string b = "";
-00193         for (int i = 0; i < a.length(); i++)
-00194                 if ((a[i] != '\r') && (a[i] != '\0') && (a[i] != 7))
-00195                         b = b + a[i];
-00196         std::stringstream stream(recvq);
-00197         stream << b;
-00198         recvq = stream.str();
-00199         int i = 0;
-00200         // count the size of the first line in the buffer.
-00201         while (i < recvq.length())
-00202         {
-00203                 if (recvq[i++] == '\n')
-00204                         break;
-00205         }
-00206         if (recvq.length() > this->recvqmax)
-00207         {
-00208                 this->SetWriteError("RecvQ exceeded");
-00209                 WriteOpers("*** User %s RecvQ of %d exceeds connect class maximum of %d",this->nick,recvq.length(),this->recvqmax);
-00210         }
-00211         // return false if we've had more than 600 characters WITHOUT
-00212         // a carriage return (this is BAD, drop the socket)
-00213         return (i < 600);
-00214 }
+Definition at line 192 of file users.cpp.
+

+References recvq, recvqmax, and SetWriteError(). +

+

00193 {
+00194         std::string b = "";
+00195         for (int i = 0; i < a.length(); i++)
+00196                 if ((a[i] != '\r') && (a[i] != '\0') && (a[i] != 7))
+00197                         b = b + a[i];
+00198         std::stringstream stream(recvq);
+00199         stream << b;
+00200         recvq = stream.str();
+00201         int i = 0;
+00202         // count the size of the first line in the buffer.
+00203         while (i < recvq.length())
+00204         {
+00205                 if (recvq[i++] == '\n')
+00206                         break;
+00207         }
+00208         if (recvq.length() > this->recvqmax)
+00209         {
+00210                 this->SetWriteError("RecvQ exceeded");
+00211                 WriteOpers("*** User %s RecvQ of %d exceeds connect class maximum of %d",this->nick,recvq.length(),this->recvqmax);
+00212         }
+00213         // return false if we've had more than 600 characters WITHOUT
+00214         // a carriage return (this is BAD, drop the socket)
+00215         return (i < 600);
+00216 }
 
@@ -346,23 +342,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 246 of file users.cpp. -

-References GetWriteError(), sendq, sendqmax, and SetWriteError(). -

-

00247 {
-00248         if (this->GetWriteError() != "")
-00249                 return;
-00250         if (sendq.length() + data.length() > this->sendqmax)
-00251         {
-00252                 WriteOpers("*** User %s SendQ of %d exceeds connect class maximum of %d",this->nick,sendq.length() + data.length(),this->sendqmax);
-00253                 this->SetWriteError("SendQ exceeded");
-00254                 return;
-00255         }
-00256         std::stringstream stream;
-00257         stream << sendq << data;
-00258         sendq = stream.str();
-00259 }
+Definition at line 248 of file users.cpp.
+

+References GetWriteError(), sendq, sendqmax, and SetWriteError(). +

+

00249 {
+00250         if (this->GetWriteError() != "")
+00251                 return;
+00252         if (sendq.length() + data.length() > this->sendqmax)
+00253         {
+00254                 WriteOpers("*** User %s SendQ of %d exceeds connect class maximum of %d",this->nick,sendq.length() + data.length(),this->sendqmax);
+00255                 this->SetWriteError("SendQ exceeded");
+00256                 return;
+00257         }
+00258         std::stringstream stream;
+00259         stream << sendq << data;
+00260         sendq = stream.str();
+00261 }
 
@@ -395,16 +391,16 @@ This method returns true if the buffer contains at least one carriage return cha

one complete line may be read)

-Definition at line 216 of file users.cpp. +Definition at line 218 of file users.cpp.

-References recvq. +References recvq.

-

00217 {
-00218         for (int i = 0; i < recvq.length(); i++)
-00219                 if (recvq[i] == '\n')
-00220                         return true;
-00221         return false;
-00222 }
+
00219 {
+00220         for (int i = 0; i < recvq.length(); i++)
+00221                 if (recvq[i] == '\n')
+00222                         return true;
+00223         return false;
+00224 }
 
@@ -437,15 +433,15 @@ This function clears the entire buffer by setting it to an empty string.

-Definition at line 224 of file users.cpp. +Definition at line 226 of file users.cpp.

-References recvq. +References recvq.

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

-

00225 {
-00226         recvq = "";
-00227 }
+
00227 {
+00228         recvq = "";
+00229 }
 
@@ -516,30 +512,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 262 of file users.cpp. -

-References connection::bytes_out, connection::cmds_out, sendq, and SetWriteError(). -

-

00263 {
-00264         if (sendq.length())
-00265         {
-00266                 char* tb = (char*)this->sendq.c_str();
-00267                 int n_sent = write(this->fd,tb,this->sendq.length());
-00268                 if (n_sent == -1)
-00269                 {
-00270                         this->SetWriteError(strerror(errno));
-00271                 }
-00272                 else
-00273                 {
-00274                         // advance the queue
-00275                         tb += n_sent;
-00276                         this->sendq = tb;
-00277                         // update the user's stats counters
-00278                         this->bytes_out += n_sent;
-00279                         this->cmds_out++;
-00280                 }
-00281         }
-00282 }
+Definition at line 264 of file users.cpp.
+

+References connection::bytes_out, connection::cmds_out, sendq, and SetWriteError(). +

+

00265 {
+00266         if (sendq.length())
+00267         {
+00268                 char* tb = (char*)this->sendq.c_str();
+00269                 int n_sent = write(this->fd,tb,this->sendq.length());
+00270                 if (n_sent == -1)
+00271                 {
+00272                         this->SetWriteError(strerror(errno));
+00273                 }
+00274                 else
+00275                 {
+00276                         // advance the queue
+00277                         tb += n_sent;
+00278                         this->sendq = tb;
+00279                         // update the user's stats counters
+00280                         this->bytes_out += n_sent;
+00281                         this->cmds_out++;
+00282                 }
+00283         }
+00284 }
 
@@ -572,25 +568,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 229 of file users.cpp. -

-References recvq. -

-

00230 {
-00231         if (recvq == "")
-00232                 return "";
-00233         char* line = (char*)recvq.c_str();
-00234         std::string ret = "";
-00235         while ((*line != '\n') && (strlen(line)))
-00236         {
-00237                 ret = ret + *line;
-00238                 line++;
-00239         }
-00240         if ((*line == '\n') || (*line == '\r'))
-00241                 line++;
-00242         recvq = line;
-00243         return ret;
-00244 }
+Definition at line 231 of file users.cpp.
+

+References recvq. +

+

00232 {
+00233         if (recvq == "")
+00234                 return "";
+00235         char* line = (char*)recvq.c_str();
+00236         std::string ret = "";
+00237         while ((*line != '\n') && (strlen(line)))
+00238         {
+00239                 ret = ret + *line;
+00240                 line++;
+00241         }
+00242         if ((*line == '\n') || (*line == '\r'))
+00243                 line++;
+00244         recvq = line;
+00245         return ret;
+00246 }
 
@@ -625,12 +621,13 @@ Returns the full displayed host of the user This member function returns the hos

Definition at line 68 of file users.cpp.

-References dhost, ident, nick, and result. +References dhost, ident, and nick.

00069 {
-00070         snprintf(result,MAXBUF,"%s!%s@%s",nick,ident,dhost);
-00071         return result;
-00072 }
+00070         static char result[MAXBUF];
+00071         snprintf(result,MAXBUF,"%s!%s@%s",nick,ident,dhost);
+00072         return result;
+00073 }
 
@@ -663,14 +660,15 @@ 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 84 of file users.cpp. +Definition at line 85 of file users.cpp.

-References connection::host, ident, nick, and result. +References connection::host, ident, and nick.

-

00085 {
-00086         snprintf(result,MAXBUF,"%s!%s@%s",nick,ident,host);
-00087         return result;
-00088 }
+
00086 {
+00087         static char fresult[MAXBUF];
+00088         snprintf(fresult,MAXBUF,"%s!%s@%s",nick,ident,host);
+00089         return fresult;
+00090 }
 
@@ -703,13 +701,13 @@ Returns the list of channels this user has been invited to but has not yet joine

-Definition at line 104 of file users.cpp. +Definition at line 106 of file users.cpp.

References InvitedList, and invites.

-

00105 {
-00106         return &invites;
-00107 }
+
00107 {
+00108         return &invites;
+00109 }
 
@@ -742,15 +740,15 @@ Returns the write error which last occured on this connection or an empty string

-Definition at line 292 of file users.cpp. +Definition at line 294 of file users.cpp.

-References WriteError. +References WriteError.

-Referenced by AddWriteBuf(). +Referenced by AddWriteBuf().

-

00293 {
-00294         return this->WriteError;
-00295 }
+
00295 {
+00296         return this->WriteError;
+00297 }
 
@@ -782,61 +780,61 @@ Referenced by AddWriteBuf() 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. +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 138 of file users.cpp. +Definition at line 140 of file users.cpp.

References config_f, and DEBUG.

-

00139 {
-00140         char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF];
-00141         char* mycmd;
-00142         char* savept;
-00143         char* savept2;
-00144         
-00145         // are they even an oper at all?
-00146         if (strchr(this->modes,'o'))
-00147         {
-00148                 log(DEBUG,"*** HasPermission: %s is an oper",this->nick);
-00149                 for (int j =0; j < ConfValueEnum("type",&config_f); j++)
-00150                 {
-00151                         ConfValue("type","name",j,TypeName,&config_f);
-00152                         if (!strcmp(TypeName,this->oper))
-00153                         {
-00154                                 log(DEBUG,"*** HasPermission: %s is an oper of type '%s'",this->nick,this->oper);
-00155                                 ConfValue("type","classes",j,Classes,&config_f);
-00156                                 char* myclass = strtok_r(Classes," ",&savept);
-00157                                 while (myclass)
-00158                                 {
-00159                                         log(DEBUG,"*** HasPermission: checking classtype '%s'",myclass);
-00160                                         for (int k =0; k < ConfValueEnum("class",&config_f); k++)
-00161                                         {
-00162                                                 ConfValue("class","name",k,ClassName,&config_f);
-00163                                                 if (!strcmp(ClassName,myclass))
-00164                                                 {
-00165                                                         ConfValue("class","commands",k,CommandList,&config_f);
-00166                                                         log(DEBUG,"*** HasPermission: found class named %s with commands: '%s'",ClassName,CommandList);
-00167                                                         
-00168                                                         
-00169                                                         mycmd = strtok_r(CommandList," ",&savept2);
-00170                                                         while (mycmd)
-00171                                                         {
-00172                                                                 if (!strcasecmp(mycmd,command))
-00173                                                                 {
-00174                                                                         log(DEBUG,"*** Command %s found, returning true",command);
-00175                                                                         return true;
-00176                                                                 }
-00177                                                                 mycmd = strtok_r(NULL," ",&savept2);
-00178                                                         }
-00179                                                 }
-00180                                         }
-00181                                         myclass = strtok_r(NULL," ",&savept);
-00182                                 }
-00183                         }
-00184                 }
-00185         }
-00186         return false;
-00187 }
+
00141 {
+00142         char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF];
+00143         char* mycmd;
+00144         char* savept;
+00145         char* savept2;
+00146         
+00147         // are they even an oper at all?
+00148         if (strchr(this->modes,'o'))
+00149         {
+00150                 log(DEBUG,"*** HasPermission: %s is an oper",this->nick);
+00151                 for (int j =0; j < ConfValueEnum("type",&config_f); j++)
+00152                 {
+00153                         ConfValue("type","name",j,TypeName,&config_f);
+00154                         if (!strcmp(TypeName,this->oper))
+00155                         {
+00156                                 log(DEBUG,"*** HasPermission: %s is an oper of type '%s'",this->nick,this->oper);
+00157                                 ConfValue("type","classes",j,Classes,&config_f);
+00158                                 char* myclass = strtok_r(Classes," ",&savept);
+00159                                 while (myclass)
+00160                                 {
+00161                                         log(DEBUG,"*** HasPermission: checking classtype '%s'",myclass);
+00162                                         for (int k =0; k < ConfValueEnum("class",&config_f); k++)
+00163                                         {
+00164                                                 ConfValue("class","name",k,ClassName,&config_f);
+00165                                                 if (!strcmp(ClassName,myclass))
+00166                                                 {
+00167                                                         ConfValue("class","commands",k,CommandList,&config_f);
+00168                                                         log(DEBUG,"*** HasPermission: found class named %s with commands: '%s'",ClassName,CommandList);
+00169                                                         
+00170                                                         
+00171                                                         mycmd = strtok_r(CommandList," ",&savept2);
+00172                                                         while (mycmd)
+00173                                                         {
+00174                                                                 if (!strcasecmp(mycmd,command))
+00175                                                                 {
+00176                                                                         log(DEBUG,"*** Command %s found, returning true",command);
+00177                                                                         return true;
+00178                                                                 }
+00179                                                                 mycmd = strtok_r(NULL," ",&savept2);
+00180                                                         }
+00181                                                 }
+00182                                         }
+00183                                         myclass = strtok_r(NULL," ",&savept);
+00184                                 }
+00185                         }
+00186                 }
+00187         }
+00188         return false;
+00189 }
 
@@ -870,15 +868,15 @@ Adds a channel to a users invite list (invites them to a channel).

-Definition at line 109 of file users.cpp. +Definition at line 111 of file users.cpp.

References Invited::channel, and invites.

-

00110 {
-00111         Invited i;
-00112         strlcpy(i.channel,channel,CHANMAX);
-00113         invites.push_back(i);
-00114 }
+
00112 {
+00113         Invited i;
+00114         strlcpy(i.channel,channel,CHANMAX);
+00115         invites.push_back(i);
+00116 }
 
@@ -912,22 +910,22 @@ Returns true if a user is invited to a channel.

-Definition at line 90 of file users.cpp. +Definition at line 92 of file users.cpp.

References invites.

-

00091 {
-00092         for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
-00093         {
-00094                 if (i->channel) {
-00095                         if (!strcasecmp(i->channel,channel))
-00096                         {
-00097                                 return true;
-00098                         }
-00099                 }
-00100         }
-00101         return false;
-00102 }
+
00093 {
+00094         for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
+00095         {
+00096                 if (i->channel) {
+00097                         if (!strcasecmp(i->channel,channel))
+00098                         {
+00099                                 return true;
+00100                         }
+00101                 }
+00102         }
+00103         return false;
+00104 }
 
@@ -970,17 +968,17 @@ Calls read() to read some data for this user using their fd.

-Definition at line 74 of file users.cpp. +Definition at line 75 of file users.cpp.

References connection::fd.

-

00075 {
-00076         if (this->fd > -1)
-00077         {
-00078                 return read(this->fd, buffer, size);
-00079         }
-00080         else return 0;
-00081 }
+
00076 {
+00077         if (this->fd > -1)
+00078         {
+00079                 return read(this->fd, buffer, size);
+00080         }
+00081         else return 0;
+00082 }
 
@@ -1014,30 +1012,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 116 of file users.cpp. +Definition at line 118 of file users.cpp.

References DEBUG, and invites.

-

00117 {
-00118         log(DEBUG,"Removing invites");
-00119         if (channel)
-00120         {
-00121                 if (invites.size())
-00122                 {
-00123                         for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
-00124                         {
-00125                                 if (i->channel)
-00126                                 {
-00127                                         if (!strcasecmp(i->channel,channel))
-00128                                         {
-00129                                                 invites.erase(i);
-00130                                                 return;
-00131                                         }
-00132                                 }
-00133                         }
-00134                 }
-00135         }
-00136 }
+
00119 {
+00120         log(DEBUG,"Removing invites");
+00121         if (channel)
+00122         {
+00123                 if (invites.size())
+00124                 {
+00125                         for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
+00126                         {
+00127                                 if (i->channel)
+00128                                 {
+00129                                         if (!strcasecmp(i->channel,channel))
+00130                                         {
+00131                                                 invites.erase(i);
+00132                                                 return;
+00133                                         }
+00134                                 }
+00135                         }
+00136                 }
+00137         }
+00138 }
 
@@ -1071,18 +1069,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 284 of file users.cpp. +Definition at line 286 of file users.cpp.

-References DEBUG, and WriteError. +References DEBUG, and WriteError.

-Referenced by AddBuffer(), AddWriteBuf(), and FlushWriteBuf(). +Referenced by AddBuffer(), AddWriteBuf(), and FlushWriteBuf().

-

00285 {
-00286         log(DEBUG,"Setting error string for %s to '%s'",this->nick,error.c_str());
-00287         // don't try to set the error twice, its already set take the first string.
-00288         if (this->WriteError == "")
-00289                 this->WriteError = error;
-00290 }
+
00287 {
+00288         log(DEBUG,"Setting error string for %s to '%s'",this->nick,error.c_str());
+00289         // don't try to set the error twice, its already set take the first string.
+00290         if (this->WriteError == "")
+00291                 this->WriteError = error;
+00292 }
 
@@ -1093,7 +1091,7 @@ Referenced by AddBuffer() -
char userrec::awaymsg[512] + char userrec::awaymsg[MAXAWAY+1]
@@ -1110,9 +1108,9 @@ The user's away message.

If this string is empty, the user is not marked as away.

-Definition at line 151 of file users.h. +Definition at line 155 of file users.h.

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

@@ -1136,9 +1134,9 @@ Referenced by userrec().

-Definition at line 142 of file users.h. +Definition at line 146 of file users.h.

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

@@ -1164,18 +1162,18 @@ The host displayed to non-opers (used for cloaking etc).

This usually matches the value of userrec::host.

-Definition at line 130 of file users.h. +Definition at line 131 of file users.h.

-Referenced by GetFullHost(), and userrec(). +Referenced by GetFullHost(), and userrec(). -

+

@@ -1192,18 +1190,18 @@ True when DNS lookups are completed.

-Definition at line 179 of file users.h. +Definition at line 178 of file users.h.

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

-
bool userrec::dns_done + bool userrec::dns_done
-

+

@@ -1220,9 +1218,9 @@ Number of lines the user can place into the buffer (up to the global NetBufferSi

-Definition at line 162 of file users.h. +Definition at line 161 of file users.h.

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

-
int userrec::flood + int userrec::flood

@@ -1231,7 +1229,7 @@ Referenced by userrec(). -
char userrec::fullname[128] + char userrec::fullname[MAXGECOS+1]
@@ -1248,9 +1246,9 @@ The users full name.

-Definition at line 134 of file users.h. +Definition at line 135 of file users.h.

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

@@ -1259,7 +1257,7 @@ Referenced by userrec(). -
char userrec::ident[16] + char userrec::ident[IDENTMAX+2]
@@ -1274,11 +1272,11 @@ Referenced by userrec().

The users ident reply.

- +Two characters are added to the user-defined limit to compensate for the tilde etc.

-Definition at line 125 of file users.h. +Definition at line 126 of file users.h.

-Referenced by GetFullHost(), GetFullRealHost(), Server::PseudoToUser(), userrec(), and Server::UserToPseudo(). +Referenced by GetFullHost(), GetFullRealHost(), Server::PseudoToUser(), userrec(), and Server::UserToPseudo().

@@ -1306,16 +1304,16 @@ A list of channels the user has a pending invite to.

Definition at line 114 of file users.h.

-Referenced by GetInviteList(), InviteTo(), IsInvited(), RemoveInvite(), and userrec(). +Referenced by GetInviteList(), InviteTo(), IsInvited(), RemoveInvite(), and userrec(). -

+

@@ -1332,9 +1330,9 @@ Flood counters.

-Definition at line 204 of file users.h. +Definition at line 203 of file users.h.

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

-
int userrec::lines_in + int userrec::lines_in

@@ -1343,7 +1341,7 @@ Referenced by userrec(). -
char userrec::modes[MAXBUF] + char userrec::modes[54]
@@ -1358,11 +1356,11 @@ Referenced by userrec().

The user's mode string.

-This may contain any of the following RFC characters: o, w, s, i Your module may define other mode characters as it sees fit. +This may contain any of the following RFC characters: o, w, s, i Your module may define other mode characters as it sees fit. it is limited to length 54, as there can only be a maximum of 52 user modes (26 upper, 26 lower case) a null terminating char, and an optional + character.

-Definition at line 140 of file users.h. +Definition at line 144 of file users.h.

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

@@ -1390,16 +1388,16 @@ 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(). -

+

@@ -1416,18 +1414,18 @@ The oper type they logged in as, if they are an oper.

This is used to check permissions in operclasses, so that we can say 'yay' or 'nay' to any commands they issue. The value of this is the value of a valid 'type name=' tag.

-Definition at line 175 of file users.h. +Definition at line 174 of file users.h.

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

-
char userrec::oper[NICKMAX] + char userrec::oper[NICKMAX]
-

+

@@ -1444,16 +1442,16 @@ Password specified by the user when they registered.

This is stored even if the block doesnt need a password, so that modules may check it.

-Definition at line 189 of file users.h. +Definition at line 188 of file users.h.

-
char userrec::password[MAXBUF] + char userrec::password[MAXBUF]
-

+

@@ -1470,16 +1468,16 @@ Number of seconds between PINGs for this user (set from <connect:allow> ta

-Definition at line 183 of file users.h. +Definition at line 182 of file users.h.

-
unsigned int userrec::pingmax + unsigned int userrec::pingmax
-

+

@@ -1496,18 +1494,18 @@ User's receive queue.

Lines from the IRCd awaiting processing are stored here. Upgraded april 2005, old system a bit hairy.

-Definition at line 195 of file users.h. +Definition at line 194 of file users.h.

-Referenced by AddBuffer(), BufferIsReady(), ClearBuffer(), GetBuffer(), and userrec(). +Referenced by AddBuffer(), BufferIsReady(), ClearBuffer(), GetBuffer(), and userrec().

-
std::string userrec::recvq + std::string userrec::recvq
-

+

@@ -1524,18 +1522,18 @@ Maximum size this user's recvq can become.

-Definition at line 218 of file users.h. +Definition at line 217 of file users.h.

-Referenced by AddBuffer(). +Referenced by AddBuffer().

-
long userrec::recvqmax + long userrec::recvqmax
-

+

@@ -1550,46 +1548,18 @@ Referenced by AddBuffer()

-Definition at line 205 of file users.h. -

-Referenced by userrec(). - -

-
time_t userrec::reset_due + time_t userrec::reset_due
-

- - - - -
- - -
char userrec::result[256] -
-
- - - - +Referenced by userrec().
-   - - -

-Stores the result of the last GetFullHost or GetRealHost call. -

-You may use this to increase the speed of use of this class. -

-Definition at line 156 of file users.h. +Definition at line 204 of file users.h.

-Referenced by GetFullHost(), GetFullRealHost(), and userrec().

-

+

@@ -1606,18 +1576,18 @@ User's send queue.

Lines waiting to be sent are stored here until their buffer is flushed.

-Definition at line 200 of file users.h. +Definition at line 199 of file users.h.

-Referenced by AddWriteBuf(), FlushWriteBuf(), and userrec(). +Referenced by AddWriteBuf(), FlushWriteBuf(), and userrec().

-
std::string userrec::sendq + std::string userrec::sendq
-

+

@@ -1634,9 +1604,9 @@ Maximum size this user's sendq can become.

-Definition at line 214 of file users.h. +Definition at line 213 of file users.h.

-Referenced by AddWriteBuf(). +Referenced by AddWriteBuf().

-
long userrec::sendqmax + long userrec::sendqmax

@@ -1645,7 +1615,7 @@ Referenced by AddWriteBuf() -
char userrec::server[256] + char* userrec::server
@@ -1662,18 +1632,18 @@ The server the user is connected to.

-Definition at line 146 of file users.h. +Definition at line 150 of file users.h.

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

+

@@ -1688,16 +1658,16 @@ Referenced by userrec().

-Definition at line 206 of file users.h. +Definition at line 205 of file users.h.

-
long userrec::threshold + long userrec::threshold
-

+

@@ -1714,18 +1684,18 @@ 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. +Definition at line 167 of file users.h.

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

-
unsigned int userrec::timeout + unsigned int userrec::timeout
-

+

@@ -1740,14 +1710,14 @@ Referenced by userrec().

-Definition at line 210 of file users.h. +Definition at line 209 of file users.h.

-Referenced by GetWriteError(), and SetWriteError(). +Referenced by GetWriteError(), and SetWriteError().

-
std::string userrec::WriteError + std::string userrec::WriteError


The documentation for this class was generated from the following files: -
Generated on Wed May 25 22:03:30 2005 for InspIRCd by +
Generated on Mon May 30 05:17:43 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/classuserrec__coll__graph.gif b/docs/module-doc/classuserrec__coll__graph.gif index 60ce17f24..0ad5e4f3c 100644 Binary files a/docs/module-doc/classuserrec__coll__graph.gif and b/docs/module-doc/classuserrec__coll__graph.gif differ diff --git a/docs/module-doc/commands_8h-source.html b/docs/module-doc/commands_8h-source.html index 6164f1b27..13f8808b6 100644 --- a/docs/module-doc/commands_8h-source.html +++ b/docs/module-doc/commands_8h-source.html @@ -121,7 +121,7 @@ 00126 void ConnectServer(char* servermask, userrec* user); 00127 00128 #endif -

Generated on Wed May 25 22:02:04 2005 for InspIRCd by +

Generated on Mon May 30 05:15:19 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 729507cbf..4b0bab91c 100644 --- a/docs/module-doc/commands_8h.html +++ b/docs/module-doc/commands_8h.html @@ -265,7 +265,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().

@@ -3962,7 +3962,7 @@ Functions for u:lined servers.

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

@@ -4039,7 +4039,7 @@ Referenced by Server::IsUli -


Generated on Wed May 25 22:02:18 2005 for InspIRCd by +
Generated on Mon May 30 05:15:41 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 d4a476e54..5cdf3e511 100644 --- a/docs/module-doc/connection_8h-source.html +++ b/docs/module-doc/connection_8h-source.html @@ -178,7 +178,7 @@ 00361 00362 00363 #endif -

Generated on Wed May 25 22:02:04 2005 for InspIRCd by +

Generated on Mon May 30 05:15:19 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 4cc0463e3..e1be7b23c 100644 --- a/docs/module-doc/connection_8h.html +++ b/docs/module-doc/connection_8h.html @@ -111,7 +111,7 @@ Definition at line 36

Definition at line 35 of file connection.h.

-Referenced by serverrec::BeginLink(), serverrec::FlushWriteBuffers(), IsRoutable(), serverrec::MeshCookie(), serverrec::RecvPacket(), and serverrec::SendPacket(). +Referenced by serverrec::BeginLink(), serverrec::FlushWriteBuffers(), IsRoutable(), serverrec::MeshCookie(), serverrec::RecvPacket(), and serverrec::SendPacket().

@@ -137,7 +137,7 @@ Referenced by serverrec::Be

Definition at line 38 of file connection.h.

-Referenced by serverrec::AddIncoming(), and serverrec::FlushWriteBuffers(). +Referenced by serverrec::AddIncoming(), and serverrec::FlushWriteBuffers().

@@ -163,7 +163,7 @@ Referenced by serverrec::Ad

Definition at line 39 of file connection.h.

-Referenced by serverrec::BeginLink(), serverrec::FlushWriteBuffers(), and serverrec::MeshCookie(). +Referenced by serverrec::BeginLink(), serverrec::FlushWriteBuffers(), and serverrec::MeshCookie().

@@ -243,7 +243,7 @@ Definition at line 37 -


Generated on Wed May 25 22:02:20 2005 for InspIRCd by +
Generated on Mon May 30 05:15:44 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 8ef70afa8..bee8c71b5 100644 --- a/docs/module-doc/ctables_8h-source.html +++ b/docs/module-doc/ctables_8h-source.html @@ -42,7 +42,7 @@ 00051 00052 #endif 00053 -

Generated on Wed May 25 22:02:04 2005 for InspIRCd by +

Generated on Mon May 30 05:15:19 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 641d0fb1a..595e4ab7b 100644 --- a/docs/module-doc/ctables_8h.html +++ b/docs/module-doc/ctables_8h.html @@ -31,7 +31,7 @@ This graph shows which files directly or indirectly include this file:

 A structure that defines a command. More...

-
Generated on Wed May 25 22:02:22 2005 for InspIRCd by +
Generated on Mon May 30 05:15:46 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 f9851d2f4..345e37b57 100644 --- a/docs/module-doc/dns_8h-source.html +++ b/docs/module-doc/dns_8h-source.html @@ -70,7 +70,7 @@ 00093 }; 00094 00095 #endif -

Generated on Wed May 25 22:02:04 2005 for InspIRCd by +

Generated on Mon May 30 05:15:19 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 4dab8de41..5a8a4b150 100644 --- a/docs/module-doc/dns_8h.html +++ b/docs/module-doc/dns_8h.html @@ -23,7 +23,7 @@ Include dependency graph for dns.h:

struct  dns_ip4list -
Generated on Wed May 25 22:02:22 2005 for InspIRCd by +
Generated on Mon May 30 05:15:47 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/files.html b/docs/module-doc/files.html index a8911db1a..b3b6ba61c 100644 --- a/docs/module-doc/files.html +++ b/docs/module-doc/files.html @@ -24,7 +24,7 @@ users.h [code] xline.h [code] -
Generated on Wed May 25 22:02:04 2005 for InspIRCd by +
Generated on Mon May 30 05:15:18 2005 for InspIRCd by doxygen 1.3.3
diff --git a/docs/module-doc/functions.html b/docs/module-doc/functions.html index 6b9b0a945..09463bc62 100644 --- a/docs/module-doc/functions.html +++ b/docs/module-doc/functions.html @@ -36,7 +36,9 @@ Here is a list of all class members with links to the classes they belong to:

chanrec
  • BeginLink() : serverrec
  • binarymodes : chanrec
  • binip -: DNS
  • BufferIsComplete() +: DNS
  • bits +: BoolSet
  • BoolSet() +: BoolSet
  • BufferIsComplete() : ircd_connector
  • BufferIsReady() : userrec
  • Build : Version
  • bytes_in @@ -91,7 +93,7 @@ Here is a list of all class members with links to the classes they belong to:

    DNS
  • dns_aton4_r() : DNS
  • dns_aton4_s() : DNS
  • dns_done -: userrec
  • dns_getip4() +: userrec
  • dns_getip4() : DNS
  • dns_getip4list() : DNS
  • dns_getname4() : DNS
  • dns_getresult() @@ -134,14 +136,15 @@ Here is a list of all class members with links to the classes they belong to:

    Server
  • Flags : Version
  • flags_needed : command_t
  • flood -: userrec, ConnectClass
  • FlushWriteBuf() +: userrec, ConnectClass
  • FlushWriteBuf() : userrec, ircd_connector
  • FlushWriteBuffers() : serverrec
  • ForwardLookup() : DNS
  • fullname : WhoWasUser, userrec

    - g -

    @@ -366,8 +374,8 @@ Here is a list of all class members with links to the classes they belong to:

    Server
  • SendOpers() : Server
  • SendPacket() : serverrec
  • sendq -: userrec, ircd_connector
  • sendqmax -: userrec, ConnectClass
  • SendServ() +: userrec, ircd_connector
  • sendqmax +: userrec, ConnectClass
  • SendServ() : Server
  • SendTo() : Server
  • SendToModeMask() : Server
  • SendWallops() @@ -375,7 +383,8 @@ Here is a list of all class members with links to the classes they belong to:

    Server
  • server : WhoWasUser, userrec
  • servername : ircd_connector
  • serverrec() -: serverrec
  • set_by +: serverrec
  • Set() +: BoolSet
  • set_by : HostItem
  • set_time : XLine, HostItem
  • setby : chanrec
  • SetCustomMode() @@ -401,8 +410,8 @@ Here is a list of all class members with links to the classes they belong to:

    t : DNS
  • TerminateLink() : serverrec
  • threshold -: userrec, ConnectClass
  • timeout -: userrec
  • topic +: userrec, ConnectClass
  • timeout +: userrec
  • topic : chanrec
  • topicset : chanrec
  • total_bytes : command_t
  • type @@ -411,7 +420,8 @@ Here is a list of all class members with links to the classes they belong to:

    - ~ -

    • ~chanrec() @@ -442,7 +452,7 @@ Here is a list of all class members with links to the classes they belong to:

      serverrec
    • ~ucrec() : ucrec
    • ~userrec() : userrec
    -
    Generated on Wed May 25 22:02:44 2005 for InspIRCd by +
    Generated on Mon May 30 05:16:22 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 a64a27354..e50d53891 100644 --- a/docs/module-doc/functions_func.html +++ b/docs/module-doc/functions_func.html @@ -30,7 +30,8 @@

    - b -

    - c - @@ -107,7 +108,8 @@ : DNS

    - g -

    - i -

    +: Module
  • operator &() +: BoolSet
  • operator()() +: irc::InAddr_HashComp, irc::StrHashComp, nspace::hash< string >, nspace::hash< in_addr >
  • operator=() +: BoolSet
  • operator==() +: BoolSet
  • operator|() +: BoolSet

    - p -

    -
    Generated on Wed May 25 22:02:44 2005 for InspIRCd by +
    Generated on Mon May 30 05:16:22 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 62f7166a3..ab822c58f 100644 --- a/docs/module-doc/functions_vars.html +++ b/docs/module-doc/functions_vars.html @@ -22,7 +22,8 @@
  • bans : chanrec
  • binarymodes : chanrec
  • binip -: DNS
  • Build +: DNS
  • bits +: BoolSet
  • Build : Version
  • bytes_in : connection
  • bytes_out : connection @@ -45,7 +46,7 @@ : serverrec, ircd_connector
  • dest : Request
  • dhost : WhoWasUser, userrec
  • dns_done -: userrec
  • duration +: userrec
  • duration : XLine

    - e -

    - h -

    - m -

  • +
    Generated on Mon May 30 05:16:22 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/globals.html b/docs/module-doc/globals.html index 94f33e685..f0bafa43d 100644 --- a/docs/module-doc/globals.html +++ b/docs/module-doc/globals.html @@ -32,51 +32,52 @@ 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
  • already_have_sum() : servers.cpp
  • apply_lines() : xline.h
  • auth_cookies -: modules.cpp, channels.cpp +: modules.cpp, channels.cpp

    - b -

    +: modules.cpp, channels.cpp

    - c -

    - f -

    @@ -155,9 +156,9 @@ Here is a list of all file members with links to the files they belong to:

    commands.h
  • handle_list() : commands.h
  • handle_loadmodule() : commands.h
  • handle_lusers() -: commands.h
  • handle_M() -: commands.h
  • handle_m() -: commands.h
  • handle_map() +: commands.h
  • handle_m() +: commands.h
  • handle_M() +: commands.h
  • handle_map() : commands.h
  • handle_mode() : mode.h
  • handle_modules() : commands.h
  • handle_motd() @@ -185,9 +186,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() @@ -206,10 +207,12 @@ Here is a list of all file members with links to the files they belong to:

    message.h

    - i -

    +: modules.cpp, channels.cpp
  • log_file +: modules.cpp, channels.cpp
  • LogLevel +: modules.cpp, channels.cpp

    - m -

    - n -

    - p -

    @@ -277,19 +280,19 @@ 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 -

    - x -

    -
    Generated on Wed May 25 22:03:35 2005 for InspIRCd by +
    Generated on Mon May 30 05:17:51 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 6ae018be0..8d0992220 100644 --- a/docs/module-doc/globals_defs.html +++ b/docs/module-doc/globals_defs.html @@ -98,7 +98,7 @@ : modules.h
  • VF_STATIC : modules.h
  • VF_VENDOR : modules.h -
    Generated on Wed May 25 22:03:35 2005 for InspIRCd by +
    Generated on Mon May 30 05:17:51 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 c7c0247bb..981d5daed 100644 --- a/docs/module-doc/globals_func.html +++ b/docs/module-doc/globals_func.html @@ -50,7 +50,7 @@ : xline.h
  • del_qline() : xline.h
  • del_zline() : xline.h
  • DoAddExtendedMode() -: modules.cpp
  • duration() +: modules.cpp
  • duration() : commands.h

    - 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() @@ -215,7 +215,7 @@
    • zline_make_global() : xline.h
    • zline_set_creation_time() : xline.h
    -
    Generated on Wed May 25 22:03:35 2005 for InspIRCd by +
    Generated on Mon May 30 05:17:51 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 b3fab91a1..df2fab38b 100644 --- a/docs/module-doc/globals_type.html +++ b/docs/module-doc/globals_type.html @@ -10,24 +10,24 @@

    -
    Generated on Wed May 25 22:03:35 2005 for InspIRCd by +: modules.cpp +
    Generated on Mon May 30 05:17:51 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 0f18413e7..a9d64c70a 100644 --- a/docs/module-doc/globals_vars.html +++ b/docs/module-doc/globals_vars.html @@ -14,104 +14,107 @@

    - a -

    +: modules.cpp, channels.cpp
  • AdminName +: modules.cpp, channels.cpp
  • AdminNick +: modules.cpp, channels.cpp
  • auth_cookies +: modules.cpp, channels.cpp

    - b -

    +
  • bitfields +: base.h
  • boundPortCount +: 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_ref_table +: modules.cpp

    - h -

    - i -

    +
  • include_stack +: modules.cpp
  • inverted_bitfields +: base.h
  • IP +: modules.cpp

    - l -

    +: modules.cpp, channels.cpp
  • log_file +: modules.cpp, channels.cpp
  • LogLevel +: modules.cpp, channels.cpp

    - m -

    +: 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 +: users.cpp, 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 -

    +: modules.cpp
  • WHOWAS_MAX +: modules.cpp, channels.cpp
  • WHOWAS_STALE +: modules.cpp, channels.cpp

    - x -

    -
    Generated on Wed May 25 22:03:35 2005 for InspIRCd by +
    Generated on Mon May 30 05:17:51 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 a244aef95..c8f5acbd1 100644 --- a/docs/module-doc/graph_legend.html +++ b/docs/module-doc/graph_legend.html @@ -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 Wed May 25 22:03:35 2005 for InspIRCd by +
    Generated on Mon May 30 05:17:51 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 index ccda92bd1..84f243c94 100644 --- a/docs/module-doc/hashcomp_8h-source.html +++ b/docs/module-doc/hashcomp_8h-source.html @@ -107,7 +107,7 @@ 00130 } 00131 00132 #endif -


  • Generated on Wed May 25 22:02:04 2005 for InspIRCd by +

    Generated on Mon May 30 05:15:19 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/hashcomp_8h.html b/docs/module-doc/hashcomp_8h.html index 586fd0266..37cefd163 100644 --- a/docs/module-doc/hashcomp_8h.html +++ b/docs/module-doc/hashcomp_8h.html @@ -54,7 +54,7 @@ This graph shows which files directly or indirectly include this file:

    44 of file hashcomp.h. -
    Generated on Wed May 25 22:02:23 2005 for InspIRCd by +
    Generated on Mon May 30 05:15:48 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/hierarchy.html b/docs/module-doc/hierarchy.html index 254ac1423..c40919099 100644 --- a/docs/module-doc/hierarchy.html +++ b/docs/module-doc/hierarchy.html @@ -8,6 +8,7 @@

    InspIRCd Class Hierarchy

    Go to the graphical class hierarchy

    This inheritance list is sorted roughly, but not completely, alphabetically:

      +
    • BoolSet
    • char_traits
      • irc::irc_char_traits @@ -65,7 +66,7 @@ This inheritance list is sorted roughly, but not completely, alphabetically: -
        Generated on Wed May 25 22:02:44 2005 for InspIRCd by +
        Generated on Mon May 30 05:16:22 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 397bfc922..2e31b9795 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 a434ea0a7..397bfc922 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 992d6ed85..a434ea0a7 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 224232736..992d6ed85 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 3ae3517db..224232736 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 8ad8a7b50..3ae3517db 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 d85abdb1b..8ad8a7b50 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 516567cb0..d85abdb1b 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 index a7d4324c4..516567cb0 100644 Binary files a/docs/module-doc/inherit__graph__8.gif and b/docs/module-doc/inherit__graph__8.gif differ diff --git a/docs/module-doc/inherit__graph__9.gif b/docs/module-doc/inherit__graph__9.gif new file mode 100644 index 000000000..a7d4324c4 Binary files /dev/null and b/docs/module-doc/inherit__graph__9.gif differ diff --git a/docs/module-doc/inherits.html b/docs/module-doc/inherits.html index 8b434de2b..7ab174b01 100644 --- a/docs/module-doc/inherits.html +++ b/docs/module-doc/inherits.html @@ -8,12 +8,16 @@

        InspIRCd Graphical Class Hierarchy

        Go to the textual class hierarchy

        - + - - - - - - - -
        +
        + + +
        +
        @@ -49,36 +53,36 @@
        +
        +
        +
        +
        +
        +
        +
        -


        Generated on Wed May 25 22:03:38 2005 for InspIRCd by +
        Generated on Mon May 30 05:17:55 2005 for InspIRCd by doxygen 1.3.3
        diff --git a/docs/module-doc/main.html b/docs/module-doc/main.html index c1b4ad9bb..20bf96001 100644 --- a/docs/module-doc/main.html +++ b/docs/module-doc/main.html @@ -7,7 +7,7 @@

        InspIRCd Documentation

        -

        1.0Betareleases


        Generated on Wed May 25 22:02:04 2005 for InspIRCd by +

        1.0Betareleases


        Generated on Mon May 30 05:15:18 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 eae99e138..9f7777694 100644 --- a/docs/module-doc/message_8h-source.html +++ b/docs/module-doc/message_8h-source.html @@ -55,7 +55,7 @@ 00048 void send_network_quit(const char* nick, const char* reason); 00049 00050 #endif -

    Generated on Wed May 25 22:02:04 2005 for InspIRCd by +

    Generated on Mon May 30 05:15:19 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 9a5e99355..4b37ebd9b 100644 --- a/docs/module-doc/message_8h.html +++ b/docs/module-doc/message_8h.html @@ -165,7 +165,7 @@ This graph shows which files directly or indirectly include this file:

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

    @@ -205,7 +205,7 @@ Referenced by Server::Chang

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

    @@ -350,7 +350,7 @@ Referenced by Server::Chang

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

    @@ -390,7 +390,7 @@ Referenced by Server::ChanM

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

    @@ -468,7 +468,7 @@ Referenced by Server::Commo

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

    @@ -566,7 +566,7 @@ Referenced by Server::IsOnC

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

    @@ -694,7 +694,7 @@ Referenced by Server::IsNic -


    Generated on Wed May 25 22:02:24 2005 for InspIRCd by +
    Generated on Mon May 30 05:15:51 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 270319362..7c422c413 100644 --- a/docs/module-doc/mode_8h-source.html +++ b/docs/module-doc/mode_8h-source.html @@ -53,7 +53,7 @@ 00046 00047 00048 #endif -

    Generated on Wed May 25 22:02:04 2005 for InspIRCd by +

    Generated on Mon May 30 05:15:19 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 82fa55758..d8d40dfdf 100644 --- a/docs/module-doc/mode_8h.html +++ b/docs/module-doc/mode_8h.html @@ -802,7 +802,7 @@ This graph shows which files directly or indirectly include this file:

    -
    Generated on Wed May 25 22:02:26 2005 for InspIRCd by +
    Generated on Mon May 30 05:15:53 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 17f4bbe57..51b7ddda5 100644 --- a/docs/module-doc/modules_8cpp-source.html +++ b/docs/module-doc/modules_8cpp-source.html @@ -23,10 +23,10 @@ 00016 00017 using namespace std; 00018 -00019 #include "inspircd.h" -00020 #include "inspircd_io.h" -00021 #include "inspircd_util.h" -00022 #include "inspircd_config.h" +00019 #include "inspircd_config.h" +00020 #include "inspircd.h" +00021 #include "inspircd_io.h" +00022 #include "inspircd_util.h" 00023 #include <unistd.h> 00024 #include <sys/errno.h> 00025 @@ -79,951 +79,954 @@ 00072 extern std::vector<Module*> modules; 00073 extern std::vector<ircd_module*> factory; 00074 -00075 extern time_t TIME; +00075 extern std::vector<std::string> include_stack; 00076 -00077 extern int LogLevel; -00078 extern char ServerName[MAXBUF]; -00079 extern char Network[MAXBUF]; -00080 extern char ServerDesc[MAXBUF]; -00081 extern char AdminName[MAXBUF]; -00082 extern char AdminEmail[MAXBUF]; -00083 extern char AdminNick[MAXBUF]; -00084 extern char diepass[MAXBUF]; -00085 extern char restartpass[MAXBUF]; -00086 extern char motd[MAXBUF]; -00087 extern char rules[MAXBUF]; -00088 extern char list[MAXBUF]; -00089 extern char PrefixQuit[MAXBUF]; -00090 extern char DieValue[MAXBUF]; -00091 -00092 extern int debugging; -00093 extern int WHOWAS_STALE; -00094 extern int WHOWAS_MAX; -00095 extern int DieDelay; -00096 extern time_t startup_time; -00097 extern int NetBufferSize; -00098 extern int MaxWhoResults; -00099 extern time_t nb_start; -00100 -00101 extern std::vector<std::string> module_names; +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]; +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; 00102 -00103 extern int boundPortCount; -00104 extern int portCount; -00105 extern int SERVERportCount; -00106 extern int ports[MAXSOCKS]; -00107 extern int defaultRoute; -00108 -00109 extern std::vector<long> auth_cookies; -00110 extern std::stringstream config_f; -00111 -00112 extern serverrec* me[32]; +00103 extern std::vector<std::string> module_names; +00104 +00105 extern int boundPortCount; +00106 extern int portCount; +00107 extern int SERVERportCount; +00108 extern int ports[MAXSOCKS]; +00109 extern int defaultRoute; +00110 +00111 extern std::vector<long> auth_cookies; +00112 extern std::stringstream config_f; 00113 -00114 extern FILE *log_file; +00114 extern serverrec* me[32]; 00115 -00116 extern userrec* fd_ref_table[65536]; +00116 extern FILE *log_file; 00117 -00118 typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> user_hash; -00119 typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp> chan_hash; -00120 typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp> address_cache; -00121 typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp> whowas_hash; -00122 typedef std::deque<command_t> command_table; -00123 -00124 -00125 extern user_hash clientlist; -00126 extern chan_hash chanlist; -00127 extern whowas_hash whowas; -00128 extern command_table cmdlist; -00129 extern file_cache MOTD; -00130 extern file_cache RULES; -00131 extern address_cache IP; -00132 -00133 -00134 // class type for holding an extended mode character - internal to core +00118 extern userrec* fd_ref_table[65536]; +00119 +00120 typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> user_hash; +00121 typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp> chan_hash; +00122 typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp> address_cache; +00123 typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp> whowas_hash; +00124 typedef std::deque<command_t> command_table; +00125 +00126 +00127 extern user_hash clientlist; +00128 extern chan_hash chanlist; +00129 extern whowas_hash whowas; +00130 extern command_table cmdlist; +00131 extern file_cache MOTD; +00132 extern file_cache RULES; +00133 extern address_cache IP; +00134 00135 -00136 class ExtMode : public classbase -00137 { -00138 public: -00139 char modechar; -00140 int type; -00141 int params_when_on; -00142 int params_when_off; -00143 bool needsoper; -00144 bool list; -00145 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) { }; -00146 }; -00147 -00148 typedef std::vector<ExtMode> ExtModeList; -00149 typedef ExtModeList::iterator ExtModeListIter; -00150 -00151 -00152 ExtModeList EMode; +00136 // class type for holding an extended mode character - internal to core +00137 +00138 class ExtMode : public classbase +00139 { +00140 public: +00141 char modechar; +00142 int type; +00143 int params_when_on; +00144 int params_when_off; +00145 bool needsoper; +00146 bool list; +00147 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) { }; +00148 }; +00149 +00150 typedef std::vector<ExtMode> ExtModeList; +00151 typedef ExtModeList::iterator ExtModeListIter; +00152 00153 -00154 // returns true if an extended mode character is in use -00155 bool ModeDefined(char modechar, int type) -00156 { -00157 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -00158 { -00159 if ((i->modechar == modechar) && (i->type == type)) -00160 { -00161 return true; -00162 } -00163 } -00164 return false; -00165 } -00166 -00167 bool ModeIsListMode(char modechar, int type) -00168 { -00169 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -00170 { -00171 if ((i->modechar == modechar) && (i->type == type) && (i->list == true)) -00172 { -00173 return true; -00174 } -00175 } -00176 return false; -00177 } -00178 -00179 bool ModeDefinedOper(char modechar, int type) -00180 { -00181 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -00182 { -00183 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true)) -00184 { -00185 return true; -00186 } -00187 } -00188 return false; -00189 } -00190 -00191 // returns number of parameters for a custom mode when it is switched on -00192 int ModeDefinedOn(char modechar, int type) -00193 { -00194 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -00195 { -00196 if ((i->modechar == modechar) && (i->type == type)) -00197 { -00198 return i->params_when_on; -00199 } -00200 } -00201 return 0; -00202 } -00203 -00204 // returns number of parameters for a custom mode when it is switched on -00205 int ModeDefinedOff(char modechar, int type) -00206 { -00207 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -00208 { -00209 if ((i->modechar == modechar) && (i->type == type)) -00210 { -00211 return i->params_when_off; -00212 } -00213 } -00214 return 0; -00215 } -00216 -00217 // returns true if an extended mode character is in use -00218 bool DoAddExtendedMode(char modechar, int type, bool requires_oper, int params_on, int params_off) -00219 { -00220 if (ModeDefined(modechar,type)) { -00221 return false; -00222 } -00223 EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off)); -00224 return true; -00225 } -00226 -00227 // turns a mode into a listmode -00228 void ModeMakeList(char modechar) -00229 { -00230 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) -00231 { -00232 if ((i->modechar == modechar) && (i->type == MT_CHANNEL)) -00233 { -00234 i->list = true; -00235 return; -00236 } -00237 } -00238 return; -00239 } -00240 -00241 // version is a simple class for holding a modules version number +00154 ExtModeList EMode; +00155 +00156 // returns true if an extended mode character is in use +00157 bool ModeDefined(char modechar, int type) +00158 { +00159 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +00160 { +00161 if ((i->modechar == modechar) && (i->type == type)) +00162 { +00163 return true; +00164 } +00165 } +00166 return false; +00167 } +00168 +00169 bool ModeIsListMode(char modechar, int type) +00170 { +00171 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +00172 { +00173 if ((i->modechar == modechar) && (i->type == type) && (i->list == true)) +00174 { +00175 return true; +00176 } +00177 } +00178 return false; +00179 } +00180 +00181 bool ModeDefinedOper(char modechar, int type) +00182 { +00183 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +00184 { +00185 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true)) +00186 { +00187 return true; +00188 } +00189 } +00190 return false; +00191 } +00192 +00193 // returns number of parameters for a custom mode when it is switched on +00194 int ModeDefinedOn(char modechar, int type) +00195 { +00196 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +00197 { +00198 if ((i->modechar == modechar) && (i->type == type)) +00199 { +00200 return i->params_when_on; +00201 } +00202 } +00203 return 0; +00204 } +00205 +00206 // returns number of parameters for a custom mode when it is switched on +00207 int ModeDefinedOff(char modechar, int type) +00208 { +00209 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +00210 { +00211 if ((i->modechar == modechar) && (i->type == type)) +00212 { +00213 return i->params_when_off; +00214 } +00215 } +00216 return 0; +00217 } +00218 +00219 // returns true if an extended mode character is in use +00220 bool DoAddExtendedMode(char modechar, int type, bool requires_oper, int params_on, int params_off) +00221 { +00222 if (ModeDefined(modechar,type)) { +00223 return false; +00224 } +00225 EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off)); +00226 return true; +00227 } +00228 +00229 // turns a mode into a listmode +00230 void ModeMakeList(char modechar) +00231 { +00232 for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++) +00233 { +00234 if ((i->modechar == modechar) && (i->type == MT_CHANNEL)) +00235 { +00236 i->list = true; +00237 return; +00238 } +00239 } +00240 return; +00241 } 00242 -00243 Version::Version(int major, int minor, int revision, int build, int flags) : Major(major), Minor(minor), Revision(revision), Build(build), Flags(flags) { }; +00243 // version is a simple class for holding a modules version number 00244 -00245 // admin is a simple class for holding a server's administrative info +00245 Version::Version(int major, int minor, int revision, int build, int flags) : Major(major), Minor(minor), Revision(revision), Build(build), Flags(flags) { }; 00246 -00247 Admin::Admin(std::string name, std::string email, std::string nick) : Name(name), Email(email), Nick(nick) { }; +00247 // admin is a simple class for holding a server's administrative info 00248 -00249 Request::Request(char* anydata, Module* src, Module* dst) : data(anydata), source(src), dest(dst) { }; +00249 Admin::Admin(std::string name, std::string email, std::string nick) : Name(name), Email(email), Nick(nick) { }; 00250 -00251 char* Request::GetData() -00252 { -00253 return this->data; -00254 } -00255 -00256 Module* Request::GetSource() -00257 { -00258 return this->source; -00259 } -00260 -00261 Module* Request::GetDest() -00262 { -00263 return this->dest; -00264 } -00265 -00266 char* Request::Send() -00267 { -00268 if (this->dest) -00269 { -00270 return dest->OnRequest(this); -00271 } -00272 else -00273 { -00274 return NULL; -00275 } -00276 } -00277 -00278 Event::Event(char* anydata, Module* src, std::string eventid) : data(anydata), source(src), id(eventid) { }; +00251 Request::Request(char* anydata, Module* src, Module* dst) : data(anydata), source(src), dest(dst) { }; +00252 +00253 char* Request::GetData() +00254 { +00255 return this->data; +00256 } +00257 +00258 Module* Request::GetSource() +00259 { +00260 return this->source; +00261 } +00262 +00263 Module* Request::GetDest() +00264 { +00265 return this->dest; +00266 } +00267 +00268 char* Request::Send() +00269 { +00270 if (this->dest) +00271 { +00272 return dest->OnRequest(this); +00273 } +00274 else +00275 { +00276 return NULL; +00277 } +00278 } 00279 -00280 char* Event::GetData() -00281 { -00282 return this->data; -00283 } -00284 -00285 Module* Event::GetSource() -00286 { -00287 return this->source; -00288 } -00289 -00290 char* Event::Send() -00291 { -00292 FOREACH_MOD OnEvent(this); -00293 return NULL; -00294 } -00295 -00296 std::string Event::GetEventID() -00297 { -00298 return this->id; -00299 } -00300 -00301 -00302 // These declarations define the behavours of the base class Module (which does nothing at all) -00303 Module::Module() { } -00304 Module::~Module() { } -00305 void Module::OnUserConnect(userrec* user) { } -00306 void Module::OnUserQuit(userrec* user) { } -00307 void Module::OnUserDisconnect(userrec* user) { } -00308 void Module::OnUserJoin(userrec* user, chanrec* channel) { } -00309 void Module::OnUserPart(userrec* user, chanrec* channel) { } -00310 void Module::OnPacketTransmit(std::string &data, std::string serv) { } -00311 void Module::OnPacketReceive(std::string &data, std::string serv) { } -00312 void Module::OnRehash() { } -00313 void Module::OnServerRaw(std::string &raw, bool inbound, userrec* user) { } -00314 int Module::OnUserPreJoin(userrec* user, chanrec* chan, const char* cname) { return 0; } -00315 int Module::OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params) { return false; } -00316 Version Module::GetVersion() { return Version(1,0,0,0,VF_VENDOR); } -00317 void Module::OnOper(userrec* user) { }; -00318 void Module::OnInfo(userrec* user) { }; -00319 void Module::OnWhois(userrec* source, userrec* dest) { }; -00320 int Module::OnUserPreInvite(userrec* source,userrec* dest,chanrec* channel) { return 0; }; -00321 int Module::OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text) { return 0; }; -00322 int Module::OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text) { return 0; }; -00323 int Module::OnUserPreNick(userrec* user, std::string newnick) { return 0; }; -00324 void Module::OnUserPostNick(userrec* user, std::string oldnick) { }; -00325 int Module::OnAccessCheck(userrec* source,userrec* dest,chanrec* channel,int access_type) { return ACR_DEFAULT; }; -00326 string_list Module::OnUserSync(userrec* user) { string_list empty; return empty; } -00327 string_list Module::OnChannelSync(chanrec* chan) { string_list empty; return empty; } -00328 void Module::On005Numeric(std::string &output) { }; -00329 int Module::OnKill(userrec* source, userrec* dest, std::string reason) { return 0; }; -00330 void Module::OnLoadModule(Module* mod,std::string name) { }; -00331 void Module::OnBackgroundTimer(time_t curtime) { }; -00332 void Module::OnSendList(userrec* user, chanrec* channel, char mode) { }; -00333 int Module::OnPreCommand(std::string command, char **parameters, int pcnt, userrec *user) { return 0; }; -00334 bool Module::OnCheckReady(userrec* user) { return true; }; -00335 void Module::OnUserRegister(userrec* user) { }; -00336 int Module::OnUserPreKick(userrec* source, userrec* user, chanrec* chan, std::string reason) { return 0; }; -00337 void Module::OnUserKick(userrec* source, userrec* user, chanrec* chan, std::string reason) { }; -00338 int Module::OnRawMode(userrec* user, chanrec* chan, char mode, std::string param, bool adding, int pcnt) { return 0; }; -00339 int Module::OnCheckInvite(userrec* user, chanrec* chan) { return 0; }; -00340 int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven) { return 0; }; -00341 int Module::OnCheckLimit(userrec* user, chanrec* chan) { return 0; }; -00342 int Module::OnCheckBan(userrec* user, chanrec* chan) { return 0; }; -00343 void Module::OnStats(char symbol) { }; -00344 int Module::OnChangeLocalUserHost(userrec* user, std::string newhost) { return 0; }; -00345 int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost) { return 0; }; -00346 int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic) { return 0; }; -00347 int Module::OnMeshToken(char token,string_list params,serverrec* source,serverrec* reply, std::string tcp_host,std::string ipaddr,int port) { return 0; }; -00348 void Module::OnEvent(Event* event) { return; }; -00349 char* Module::OnRequest(Request* request) { return NULL; }; -00350 int Module::OnOperCompare(std::string password, std::string input) { return 0; }; -00351 void Module::OnGlobalOper(userrec* user) { }; -00352 void Module::OnGlobalConnect(userrec* user) { }; -00353 int Module::OnAddBan(userrec* source, chanrec* channel,std::string banmask) { return 0; }; -00354 int Module::OnDelBan(userrec* source, chanrec* channel,std::string banmask) { return 0; }; -00355 void Module::OnRawSocketAccept(int fd, std::string ip, int localport) { }; -00356 int Module::OnRawSocketWrite(int fd, char* buffer, int count) { return 0; }; -00357 void Module::OnRawSocketClose(int fd) { }; -00358 int Module::OnRawSocketRead(int fd, char* buffer, unsigned int count, int &readresult) { return 0; }; -00359 -00360 // server is a wrapper class that provides methods to all of the C-style -00361 // exports in the core -00362 // -00363 -00364 Server::Server() -00365 { -00366 } -00367 -00368 Server::~Server() -00369 { -00370 } -00371 -00372 void Server::SendOpers(std::string s) -00373 { -00374 WriteOpers("%s",s.c_str()); -00375 } -00376 -00377 bool Server::MatchText(std::string sliteral, std::string spattern) -00378 { -00379 char literal[MAXBUF],pattern[MAXBUF]; -00380 strlcpy(literal,sliteral.c_str(),MAXBUF); -00381 strlcpy(pattern,spattern.c_str(),MAXBUF); -00382 return match(literal,pattern); -00383 } -00384 -00385 void Server::SendToModeMask(std::string modes, int flags, std::string text) -00386 { -00387 WriteMode(modes.c_str(),flags,"%s",text.c_str()); -00388 } -00389 -00390 chanrec* Server::JoinUserToChannel(userrec* user, std::string cname, std::string key) -00391 { -00392 return add_channel(user,cname.c_str(),key.c_str(),false); -00393 } -00394 -00395 chanrec* Server::PartUserFromChannel(userrec* user, std::string cname, std::string reason) -00396 { -00397 return del_channel(user,cname.c_str(),reason.c_str(),false); -00398 } -00399 -00400 chanuserlist Server::GetUsers(chanrec* chan) -00401 { -00402 chanuserlist userl; -00403 userl.clear(); -00404 std::vector<char*> *list = chan->GetUsers(); -00405 for (std::vector<char*>::iterator i = list->begin(); i != list->end(); i++) -00406 { -00407 char* o = *i; -00408 userl.push_back((userrec*)o); -00409 } -00410 return userl; -00411 } -00412 void Server::ChangeUserNick(userrec* user, std::string nickname) -00413 { -00414 force_nickchange(user,nickname.c_str()); -00415 } -00416 -00417 void Server::QuitUser(userrec* user, std::string reason) -00418 { -00419 kill_link(user,reason.c_str()); -00420 } -00421 -00422 bool Server::IsUlined(std::string server) -00423 { -00424 return is_uline(server.c_str()); -00425 } -00426 -00427 void Server::CallCommandHandler(std::string commandname, char** parameters, int pcnt, userrec* user) -00428 { -00429 call_handler(commandname.c_str(),parameters,pcnt,user); -00430 } -00431 -00432 void Server::Log(int level, std::string s) -00433 { -00434 log(level,"%s",s.c_str()); -00435 } -00436 -00437 void Server::AddCommand(char* cmd, handlerfunc f, char flags, int minparams, char* source) -00438 { -00439 createcommand(cmd,f,flags,minparams,source); -00440 } -00441 -00442 void Server::SendMode(char **parameters, int pcnt, userrec *user) -00443 { -00444 server_mode(parameters,pcnt,user); -00445 } -00446 -00447 void Server::Send(int Socket, std::string s) -00448 { -00449 Write(Socket,"%s",s.c_str()); -00450 } -00451 -00452 void Server::SendServ(int Socket, std::string s) -00453 { -00454 WriteServ(Socket,"%s",s.c_str()); -00455 } -00456 -00457 void Server::SendFrom(int Socket, userrec* User, std::string s) -00458 { -00459 WriteFrom(Socket,User,"%s",s.c_str()); -00460 } -00461 -00462 void Server::SendTo(userrec* Source, userrec* Dest, std::string s) -00463 { -00464 if (!Source) -00465 { -00466 // if source is NULL, then the message originates from the local server -00467 Write(Dest->fd,":%s %s",this->GetServerName().c_str(),s.c_str()); -00468 } -00469 else -00470 { -00471 // otherwise it comes from the user specified -00472 WriteTo(Source,Dest,"%s",s.c_str()); -00473 } -00474 } -00475 -00476 void Server::SendChannelServerNotice(std::string ServName, chanrec* Channel, std::string text) -00477 { -00478 WriteChannelWithServ((char*)ServName.c_str(), Channel, "%s", text.c_str()); -00479 } -00480 -00481 void Server::SendChannel(userrec* User, chanrec* Channel, std::string s,bool IncludeSender) -00482 { -00483 if (IncludeSender) -00484 { -00485 WriteChannel(Channel,User,"%s",s.c_str()); -00486 } -00487 else -00488 { -00489 ChanExceptSender(Channel,User,"%s",s.c_str()); -00490 } -00491 } -00492 -00493 bool Server::CommonChannels(userrec* u1, userrec* u2) -00494 { -00495 return (common_channels(u1,u2) != 0); -00496 } -00497 -00498 void Server::SendCommon(userrec* User, std::string text,bool IncludeSender) -00499 { -00500 if (IncludeSender) -00501 { -00502 WriteCommon(User,"%s",text.c_str()); -00503 } -00504 else -00505 { -00506 WriteCommonExcept(User,"%s",text.c_str()); -00507 } -00508 } -00509 -00510 void Server::SendWallops(userrec* User, std::string text) -00511 { -00512 WriteWallOps(User,false,"%s",text.c_str()); -00513 } -00514 -00515 void Server::ChangeHost(userrec* user, std::string host) -00516 { -00517 ChangeDisplayedHost(user,host.c_str()); -00518 } -00519 -00520 void Server::ChangeGECOS(userrec* user, std::string gecos) -00521 { -00522 ChangeName(user,gecos.c_str()); -00523 } -00524 -00525 bool Server::IsNick(std::string nick) -00526 { -00527 return (isnick(nick.c_str()) != 0); -00528 } -00529 -00530 userrec* Server::FindNick(std::string nick) -00531 { -00532 return Find(nick); -00533 } -00534 -00535 userrec* Server::FindDescriptor(int socket) -00536 { -00537 return (socket < 65536 ? fd_ref_table[socket] : NULL); -00538 } -00539 -00540 chanrec* Server::FindChannel(std::string channel) -00541 { -00542 return FindChan(channel.c_str()); -00543 } -00544 -00545 std::string Server::ChanMode(userrec* User, chanrec* Chan) -00546 { -00547 return cmode(User,Chan); -00548 } -00549 -00550 bool Server::IsOnChannel(userrec* User, chanrec* Chan) -00551 { -00552 return has_channel(User,Chan); -00553 } -00554 -00555 std::string Server::GetServerName() -00556 { -00557 return getservername(); -00558 } -00559 -00560 std::string Server::GetNetworkName() -00561 { -00562 return getnetworkname(); -00563 } -00564 -00565 std::string Server::GetServerDescription() -00566 { -00567 return getserverdesc(); -00568 } -00569 -00570 Admin Server::GetAdmin() -00571 { -00572 return Admin(getadminname(),getadminemail(),getadminnick()); -00573 } -00574 -00575 +00280 Event::Event(char* anydata, Module* src, std::string eventid) : data(anydata), source(src), id(eventid) { }; +00281 +00282 char* Event::GetData() +00283 { +00284 return this->data; +00285 } +00286 +00287 Module* Event::GetSource() +00288 { +00289 return this->source; +00290 } +00291 +00292 char* Event::Send() +00293 { +00294 FOREACH_MOD OnEvent(this); +00295 return NULL; +00296 } +00297 +00298 std::string Event::GetEventID() +00299 { +00300 return this->id; +00301 } +00302 +00303 +00304 // These declarations define the behavours of the base class Module (which does nothing at all) +00305 Module::Module() { } +00306 Module::~Module() { } +00307 void Module::OnUserConnect(userrec* user) { } +00308 void Module::OnUserQuit(userrec* user) { } +00309 void Module::OnUserDisconnect(userrec* user) { } +00310 void Module::OnUserJoin(userrec* user, chanrec* channel) { } +00311 void Module::OnUserPart(userrec* user, chanrec* channel) { } +00312 void Module::OnPacketTransmit(std::string &data, std::string serv) { } +00313 void Module::OnPacketReceive(std::string &data, std::string serv) { } +00314 void Module::OnRehash() { } +00315 void Module::OnServerRaw(std::string &raw, bool inbound, userrec* user) { } +00316 int Module::OnUserPreJoin(userrec* user, chanrec* chan, const char* cname) { return 0; } +00317 int Module::OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params) { return false; } +00318 Version Module::GetVersion() { return Version(1,0,0,0,VF_VENDOR); } +00319 void Module::OnOper(userrec* user) { }; +00320 void Module::OnInfo(userrec* user) { }; +00321 void Module::OnWhois(userrec* source, userrec* dest) { }; +00322 int Module::OnUserPreInvite(userrec* source,userrec* dest,chanrec* channel) { return 0; }; +00323 int Module::OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text) { return 0; }; +00324 int Module::OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text) { return 0; }; +00325 int Module::OnUserPreNick(userrec* user, std::string newnick) { return 0; }; +00326 void Module::OnUserPostNick(userrec* user, std::string oldnick) { }; +00327 int Module::OnAccessCheck(userrec* source,userrec* dest,chanrec* channel,int access_type) { return ACR_DEFAULT; }; +00328 string_list Module::OnUserSync(userrec* user) { string_list empty; return empty; } +00329 string_list Module::OnChannelSync(chanrec* chan) { string_list empty; return empty; } +00330 void Module::On005Numeric(std::string &output) { }; +00331 int Module::OnKill(userrec* source, userrec* dest, std::string reason) { return 0; }; +00332 void Module::OnLoadModule(Module* mod,std::string name) { }; +00333 void Module::OnBackgroundTimer(time_t curtime) { }; +00334 void Module::OnSendList(userrec* user, chanrec* channel, char mode) { }; +00335 int Module::OnPreCommand(std::string command, char **parameters, int pcnt, userrec *user) { return 0; }; +00336 bool Module::OnCheckReady(userrec* user) { return true; }; +00337 void Module::OnUserRegister(userrec* user) { }; +00338 int Module::OnUserPreKick(userrec* source, userrec* user, chanrec* chan, std::string reason) { return 0; }; +00339 void Module::OnUserKick(userrec* source, userrec* user, chanrec* chan, std::string reason) { }; +00340 int Module::OnRawMode(userrec* user, chanrec* chan, char mode, std::string param, bool adding, int pcnt) { return 0; }; +00341 int Module::OnCheckInvite(userrec* user, chanrec* chan) { return 0; }; +00342 int Module::OnCheckKey(userrec* user, chanrec* chan, std::string keygiven) { return 0; }; +00343 int Module::OnCheckLimit(userrec* user, chanrec* chan) { return 0; }; +00344 int Module::OnCheckBan(userrec* user, chanrec* chan) { return 0; }; +00345 void Module::OnStats(char symbol) { }; +00346 int Module::OnChangeLocalUserHost(userrec* user, std::string newhost) { return 0; }; +00347 int Module::OnChangeLocalUserGECOS(userrec* user, std::string newhost) { return 0; }; +00348 int Module::OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic) { return 0; }; +00349 int Module::OnMeshToken(char token,string_list params,serverrec* source,serverrec* reply, std::string tcp_host,std::string ipaddr,int port) { return 0; }; +00350 void Module::OnEvent(Event* event) { return; }; +00351 char* Module::OnRequest(Request* request) { return NULL; }; +00352 int Module::OnOperCompare(std::string password, std::string input) { return 0; }; +00353 void Module::OnGlobalOper(userrec* user) { }; +00354 void Module::OnGlobalConnect(userrec* user) { }; +00355 int Module::OnAddBan(userrec* source, chanrec* channel,std::string banmask) { return 0; }; +00356 int Module::OnDelBan(userrec* source, chanrec* channel,std::string banmask) { return 0; }; +00357 void Module::OnRawSocketAccept(int fd, std::string ip, int localport) { }; +00358 int Module::OnRawSocketWrite(int fd, char* buffer, int count) { return 0; }; +00359 void Module::OnRawSocketClose(int fd) { }; +00360 int Module::OnRawSocketRead(int fd, char* buffer, unsigned int count, int &readresult) { return 0; }; +00361 +00362 // server is a wrapper class that provides methods to all of the C-style +00363 // exports in the core +00364 // +00365 +00366 Server::Server() +00367 { +00368 } +00369 +00370 Server::~Server() +00371 { +00372 } +00373 +00374 void Server::SendOpers(std::string s) +00375 { +00376 WriteOpers("%s",s.c_str()); +00377 } +00378 +00379 bool Server::MatchText(std::string sliteral, std::string spattern) +00380 { +00381 char literal[MAXBUF],pattern[MAXBUF]; +00382 strlcpy(literal,sliteral.c_str(),MAXBUF); +00383 strlcpy(pattern,spattern.c_str(),MAXBUF); +00384 return match(literal,pattern); +00385 } +00386 +00387 void Server::SendToModeMask(std::string modes, int flags, std::string text) +00388 { +00389 WriteMode(modes.c_str(),flags,"%s",text.c_str()); +00390 } +00391 +00392 chanrec* Server::JoinUserToChannel(userrec* user, std::string cname, std::string key) +00393 { +00394 return add_channel(user,cname.c_str(),key.c_str(),false); +00395 } +00396 +00397 chanrec* Server::PartUserFromChannel(userrec* user, std::string cname, std::string reason) +00398 { +00399 return del_channel(user,cname.c_str(),reason.c_str(),false); +00400 } +00401 +00402 chanuserlist Server::GetUsers(chanrec* chan) +00403 { +00404 chanuserlist userl; +00405 userl.clear(); +00406 std::vector<char*> *list = chan->GetUsers(); +00407 for (std::vector<char*>::iterator i = list->begin(); i != list->end(); i++) +00408 { +00409 char* o = *i; +00410 userl.push_back((userrec*)o); +00411 } +00412 return userl; +00413 } +00414 void Server::ChangeUserNick(userrec* user, std::string nickname) +00415 { +00416 force_nickchange(user,nickname.c_str()); +00417 } +00418 +00419 void Server::QuitUser(userrec* user, std::string reason) +00420 { +00421 kill_link(user,reason.c_str()); +00422 } +00423 +00424 bool Server::IsUlined(std::string server) +00425 { +00426 return is_uline(server.c_str()); +00427 } +00428 +00429 void Server::CallCommandHandler(std::string commandname, char** parameters, int pcnt, userrec* user) +00430 { +00431 call_handler(commandname.c_str(),parameters,pcnt,user); +00432 } +00433 +00434 void Server::Log(int level, std::string s) +00435 { +00436 log(level,"%s",s.c_str()); +00437 } +00438 +00439 void Server::AddCommand(char* cmd, handlerfunc f, char flags, int minparams, char* source) +00440 { +00441 createcommand(cmd,f,flags,minparams,source); +00442 } +00443 +00444 void Server::SendMode(char **parameters, int pcnt, userrec *user) +00445 { +00446 server_mode(parameters,pcnt,user); +00447 } +00448 +00449 void Server::Send(int Socket, std::string s) +00450 { +00451 Write(Socket,"%s",s.c_str()); +00452 } +00453 +00454 void Server::SendServ(int Socket, std::string s) +00455 { +00456 WriteServ(Socket,"%s",s.c_str()); +00457 } +00458 +00459 void Server::SendFrom(int Socket, userrec* User, std::string s) +00460 { +00461 WriteFrom(Socket,User,"%s",s.c_str()); +00462 } +00463 +00464 void Server::SendTo(userrec* Source, userrec* Dest, std::string s) +00465 { +00466 if (!Source) +00467 { +00468 // if source is NULL, then the message originates from the local server +00469 Write(Dest->fd,":%s %s",this->GetServerName().c_str(),s.c_str()); +00470 } +00471 else +00472 { +00473 // otherwise it comes from the user specified +00474 WriteTo(Source,Dest,"%s",s.c_str()); +00475 } +00476 } +00477 +00478 void Server::SendChannelServerNotice(std::string ServName, chanrec* Channel, std::string text) +00479 { +00480 WriteChannelWithServ((char*)ServName.c_str(), Channel, "%s", text.c_str()); +00481 } +00482 +00483 void Server::SendChannel(userrec* User, chanrec* Channel, std::string s,bool IncludeSender) +00484 { +00485 if (IncludeSender) +00486 { +00487 WriteChannel(Channel,User,"%s",s.c_str()); +00488 } +00489 else +00490 { +00491 ChanExceptSender(Channel,User,"%s",s.c_str()); +00492 } +00493 } +00494 +00495 bool Server::CommonChannels(userrec* u1, userrec* u2) +00496 { +00497 return (common_channels(u1,u2) != 0); +00498 } +00499 +00500 void Server::SendCommon(userrec* User, std::string text,bool IncludeSender) +00501 { +00502 if (IncludeSender) +00503 { +00504 WriteCommon(User,"%s",text.c_str()); +00505 } +00506 else +00507 { +00508 WriteCommonExcept(User,"%s",text.c_str()); +00509 } +00510 } +00511 +00512 void Server::SendWallops(userrec* User, std::string text) +00513 { +00514 WriteWallOps(User,false,"%s",text.c_str()); +00515 } +00516 +00517 void Server::ChangeHost(userrec* user, std::string host) +00518 { +00519 ChangeDisplayedHost(user,host.c_str()); +00520 } +00521 +00522 void Server::ChangeGECOS(userrec* user, std::string gecos) +00523 { +00524 ChangeName(user,gecos.c_str()); +00525 } +00526 +00527 bool Server::IsNick(std::string nick) +00528 { +00529 return (isnick(nick.c_str()) != 0); +00530 } +00531 +00532 userrec* Server::FindNick(std::string nick) +00533 { +00534 return Find(nick); +00535 } +00536 +00537 userrec* Server::FindDescriptor(int socket) +00538 { +00539 return (socket < 65536 ? fd_ref_table[socket] : NULL); +00540 } +00541 +00542 chanrec* Server::FindChannel(std::string channel) +00543 { +00544 return FindChan(channel.c_str()); +00545 } +00546 +00547 std::string Server::ChanMode(userrec* User, chanrec* Chan) +00548 { +00549 return cmode(User,Chan); +00550 } +00551 +00552 bool Server::IsOnChannel(userrec* User, chanrec* Chan) +00553 { +00554 return has_channel(User,Chan); +00555 } +00556 +00557 std::string Server::GetServerName() +00558 { +00559 return getservername(); +00560 } +00561 +00562 std::string Server::GetNetworkName() +00563 { +00564 return getnetworkname(); +00565 } +00566 +00567 std::string Server::GetServerDescription() +00568 { +00569 return getserverdesc(); +00570 } +00571 +00572 Admin Server::GetAdmin() +00573 { +00574 return Admin(getadminname(),getadminemail(),getadminnick()); +00575 } 00576 -00577 bool Server::AddExtendedMode(char modechar, int type, bool requires_oper, int params_when_on, int params_when_off) -00578 { -00579 if (((modechar >= 'A') && (modechar <= 'Z')) || ((modechar >= 'a') && (modechar <= 'z'))) -00580 { -00581 if (type == MT_SERVER) -00582 { -00583 log(DEBUG,"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion"); -00584 return false; -00585 } -00586 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT)) -00587 { -00588 log(DEBUG,"*** API ERROR *** Parameters on MT_CLIENT modes are not supported"); -00589 return false; -00590 } -00591 if ((params_when_on>1) || (params_when_off>1)) -00592 { -00593 log(DEBUG,"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported"); -00594 return false; -00595 } -00596 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off); -00597 } -00598 else -00599 { -00600 log(DEBUG,"*** API ERROR *** Muppet modechar detected."); -00601 } -00602 return false; -00603 } -00604 -00605 bool Server::AddExtendedListMode(char modechar) -00606 { -00607 bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1); -00608 if (res) -00609 ModeMakeList(modechar); -00610 return res; -00611 } -00612 -00613 int Server::CountUsers(chanrec* c) -00614 { -00615 return usercount(c); -00616 } -00617 -00618 -00619 bool Server::UserToPseudo(userrec* user,std::string message) -00620 { -00621 unsigned int old_fd = user->fd; -00622 user->fd = FD_MAGIC_NUMBER; -00623 user->ClearBuffer(); -00624 Write(old_fd,"ERROR :Closing link (%s@%s) [%s]",user->ident,user->host,message.c_str()); -00625 #ifdef USE_KQUEUE -00626 struct kevent ke; -00627 EV_SET(&ke, old_fd, EVFILT_READ, EV_DELETE, 0, 0, NULL); -00628 int i = kevent(kq, &ke, 1, 0, 0, NULL); -00629 if (i == -1) -00630 { -00631 log(DEBUG,"kqueue: Failed to remove user from queue!"); -00632 } -00633 #endif -00634 #ifdef USE_EPOLL -00635 struct epoll_event ev; -00636 ev.events = EPOLLIN | EPOLLET; -00637 ev.data.fd = old_fd; -00638 int i = epoll_ctl(ep, EPOLL_CTL_DEL, old_fd, &ev); -00639 if (i < 0) -00640 { -00641 log(DEBUG,"epoll: List deletion failure!"); -00642 } -00643 #endif -00644 -00645 shutdown(old_fd,2); -00646 close(old_fd); -00647 } -00648 -00649 bool Server::PseudoToUser(userrec* alive,userrec* zombie,std::string message) -00650 { -00651 zombie->fd = alive->fd; -00652 alive->fd = FD_MAGIC_NUMBER; -00653 alive->ClearBuffer(); -00654 Write(zombie->fd,":%s!%s@%s NICK %s",alive->nick,alive->ident,alive->host,zombie->nick); -00655 kill_link(alive,message.c_str()); -00656 fd_ref_table[zombie->fd] = zombie; -00657 for (int i = 0; i != MAXCHANS; i++) -00658 { -00659 if (zombie->chans[i].channel != NULL) -00660 { -00661 if (zombie->chans[i].channel->name) -00662 { -00663 chanrec* Ptr = zombie->chans[i].channel; -00664 WriteFrom(zombie->fd,zombie,"JOIN %s",Ptr->name); -00665 if (Ptr->topicset) -00666 { -00667 WriteServ(zombie->fd,"332 %s %s :%s", zombie->nick, Ptr->name, Ptr->topic); -00668 WriteServ(zombie->fd,"333 %s %s %s %d", zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset); -00669 } -00670 userlist(zombie,Ptr); -00671 WriteServ(zombie->fd,"366 %s %s :End of /NAMES list.", zombie->nick, Ptr->name); -00672 -00673 } -00674 } -00675 } -00676 -00677 } +00577 +00578 +00579 bool Server::AddExtendedMode(char modechar, int type, bool requires_oper, int params_when_on, int params_when_off) +00580 { +00581 if (((modechar >= 'A') && (modechar <= 'Z')) || ((modechar >= 'a') && (modechar <= 'z'))) +00582 { +00583 if (type == MT_SERVER) +00584 { +00585 log(DEBUG,"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion"); +00586 return false; +00587 } +00588 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT)) +00589 { +00590 log(DEBUG,"*** API ERROR *** Parameters on MT_CLIENT modes are not supported"); +00591 return false; +00592 } +00593 if ((params_when_on>1) || (params_when_off>1)) +00594 { +00595 log(DEBUG,"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported"); +00596 return false; +00597 } +00598 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off); +00599 } +00600 else +00601 { +00602 log(DEBUG,"*** API ERROR *** Muppet modechar detected."); +00603 } +00604 return false; +00605 } +00606 +00607 bool Server::AddExtendedListMode(char modechar) +00608 { +00609 bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1); +00610 if (res) +00611 ModeMakeList(modechar); +00612 return res; +00613 } +00614 +00615 int Server::CountUsers(chanrec* c) +00616 { +00617 return usercount(c); +00618 } +00619 +00620 +00621 bool Server::UserToPseudo(userrec* user,std::string message) +00622 { +00623 unsigned int old_fd = user->fd; +00624 user->fd = FD_MAGIC_NUMBER; +00625 user->ClearBuffer(); +00626 Write(old_fd,"ERROR :Closing link (%s@%s) [%s]",user->ident,user->host,message.c_str()); +00627 #ifdef USE_KQUEUE +00628 struct kevent ke; +00629 EV_SET(&ke, old_fd, EVFILT_READ, EV_DELETE, 0, 0, NULL); +00630 int i = kevent(kq, &ke, 1, 0, 0, NULL); +00631 if (i == -1) +00632 { +00633 log(DEBUG,"kqueue: Failed to remove user from queue!"); +00634 } +00635 #endif +00636 #ifdef USE_EPOLL +00637 struct epoll_event ev; +00638 ev.events = EPOLLIN | EPOLLET; +00639 ev.data.fd = old_fd; +00640 int i = epoll_ctl(ep, EPOLL_CTL_DEL, old_fd, &ev); +00641 if (i < 0) +00642 { +00643 log(DEBUG,"epoll: List deletion failure!"); +00644 } +00645 #endif +00646 +00647 shutdown(old_fd,2); +00648 close(old_fd); +00649 } +00650 +00651 bool Server::PseudoToUser(userrec* alive,userrec* zombie,std::string message) +00652 { +00653 zombie->fd = alive->fd; +00654 alive->fd = FD_MAGIC_NUMBER; +00655 alive->ClearBuffer(); +00656 Write(zombie->fd,":%s!%s@%s NICK %s",alive->nick,alive->ident,alive->host,zombie->nick); +00657 kill_link(alive,message.c_str()); +00658 fd_ref_table[zombie->fd] = zombie; +00659 for (int i = 0; i != MAXCHANS; i++) +00660 { +00661 if (zombie->chans[i].channel != NULL) +00662 { +00663 if (zombie->chans[i].channel->name) +00664 { +00665 chanrec* Ptr = zombie->chans[i].channel; +00666 WriteFrom(zombie->fd,zombie,"JOIN %s",Ptr->name); +00667 if (Ptr->topicset) +00668 { +00669 WriteServ(zombie->fd,"332 %s %s :%s", zombie->nick, Ptr->name, Ptr->topic); +00670 WriteServ(zombie->fd,"333 %s %s %s %d", zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset); +00671 } +00672 userlist(zombie,Ptr); +00673 WriteServ(zombie->fd,"366 %s %s :End of /NAMES list.", zombie->nick, Ptr->name); +00674 +00675 } +00676 } +00677 } 00678 -00679 void Server::AddGLine(long duration, std::string source, std::string reason, std::string hostmask) -00680 { -00681 add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); -00682 } -00683 -00684 void Server::AddQLine(long duration, std::string source, std::string reason, std::string nickname) -00685 { -00686 add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str()); -00687 } -00688 -00689 void Server::AddZLine(long duration, std::string source, std::string reason, std::string ipaddr) -00690 { -00691 add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str()); -00692 } -00693 -00694 void Server::AddKLine(long duration, std::string source, std::string reason, std::string hostmask) -00695 { -00696 add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); -00697 } -00698 -00699 void Server::AddELine(long duration, std::string source, std::string reason, std::string hostmask) -00700 { -00701 add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); -00702 } -00703 -00704 bool Server::DelGLine(std::string hostmask) -00705 { -00706 del_gline(hostmask.c_str()); -00707 } -00708 -00709 bool Server::DelQLine(std::string nickname) -00710 { -00711 del_qline(nickname.c_str()); -00712 } -00713 -00714 bool Server::DelZLine(std::string ipaddr) -00715 { -00716 del_zline(ipaddr.c_str()); -00717 } -00718 -00719 bool Server::DelKLine(std::string hostmask) -00720 { -00721 del_kline(hostmask.c_str()); -00722 } -00723 -00724 bool Server::DelELine(std::string hostmask) -00725 { -00726 del_eline(hostmask.c_str()); -00727 } -00728 -00729 long Server::CalcDuration(std::string delta) -00730 { -00731 return duration(delta.c_str()); -00732 } -00733 -00734 bool Server::IsValidMask(std::string mask) -00735 { -00736 const char* dest = mask.c_str(); -00737 if (strchr(dest,'!')==0) -00738 return false; -00739 if (strchr(dest,'@')==0) +00679 } +00680 +00681 void Server::AddGLine(long duration, std::string source, std::string reason, std::string hostmask) +00682 { +00683 add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); +00684 } +00685 +00686 void Server::AddQLine(long duration, std::string source, std::string reason, std::string nickname) +00687 { +00688 add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str()); +00689 } +00690 +00691 void Server::AddZLine(long duration, std::string source, std::string reason, std::string ipaddr) +00692 { +00693 add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str()); +00694 } +00695 +00696 void Server::AddKLine(long duration, std::string source, std::string reason, std::string hostmask) +00697 { +00698 add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); +00699 } +00700 +00701 void Server::AddELine(long duration, std::string source, std::string reason, std::string hostmask) +00702 { +00703 add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); +00704 } +00705 +00706 bool Server::DelGLine(std::string hostmask) +00707 { +00708 del_gline(hostmask.c_str()); +00709 } +00710 +00711 bool Server::DelQLine(std::string nickname) +00712 { +00713 del_qline(nickname.c_str()); +00714 } +00715 +00716 bool Server::DelZLine(std::string ipaddr) +00717 { +00718 del_zline(ipaddr.c_str()); +00719 } +00720 +00721 bool Server::DelKLine(std::string hostmask) +00722 { +00723 del_kline(hostmask.c_str()); +00724 } +00725 +00726 bool Server::DelELine(std::string hostmask) +00727 { +00728 del_eline(hostmask.c_str()); +00729 } +00730 +00731 long Server::CalcDuration(std::string delta) +00732 { +00733 return duration(delta.c_str()); +00734 } +00735 +00736 bool Server::IsValidMask(std::string mask) +00737 { +00738 const char* dest = mask.c_str(); +00739 if (strchr(dest,'!')==0) 00740 return false; -00741 for (int i = 0; i < strlen(dest); i++) -00742 if (dest[i] < 32) -00743 return false; -00744 for (int i = 0; i < strlen(dest); i++) -00745 if (dest[i] > 126) -00746 return false; -00747 int c = 0; -00748 for (int i = 0; i < strlen(dest); i++) -00749 if (dest[i] == '!') -00750 c++; -00751 if (c>1) -00752 return false; -00753 c = 0; -00754 for (int i = 0; i < strlen(dest); i++) -00755 if (dest[i] == '@') -00756 c++; -00757 if (c>1) -00758 return false; -00759 -00760 return true; -00761 } -00762 -00763 void Server::MeshSendAll(std::string text) -00764 { -00765 NetSendToAll((char*)text.c_str()); -00766 } -00767 -00768 void Server::MeshSendCommon(userrec* user, std::string text) -00769 { -00770 if (user) -00771 NetSendToCommon(user,(char*)text.c_str()); -00772 } -00773 -00774 void Server::MeshSendAllAlive(std::string text) -00775 { -00776 NetSendToAllAlive((char*)text.c_str()); -00777 } -00778 -00779 void Server::MeshSendUnicast(std::string destination, std::string text) -00780 { -00781 NetSendToOne((char*)destination.c_str(),(char*)text.c_str()); -00782 } -00783 -00784 void Server::MeshSendAllExcept(std::string target, std::string text) -00785 { -00786 NetSendToAllExcept(target.c_str(),(char*)text.c_str()); -00787 } -00788 -00789 bool Server::MeshCheckChan(chanrec *c,std::string servername) -00790 { -00791 if (c) -00792 { -00793 return ChanAnyOnThisServer(c,(char*)servername.c_str()); -00794 } -00795 else return false; -00796 } -00797 -00798 bool Server::MeshCheckCommon(userrec* u,std::string servername) -00799 { -00800 if (u) -00801 { -00802 return CommonOnThisServer(u,(char*)servername.c_str()); -00803 } -00804 else return false; -00805 } -00806 -00807 Module* Server::FindModule(std::string name) -00808 { -00809 for (int i = 0; i <= MODCOUNT; i++) -00810 { -00811 if (module_names[i] == name) -00812 { -00813 return modules[i]; -00814 } -00815 } -00816 return NULL; -00817 } -00818 -00819 ConfigReader::ConfigReader() -00820 { -00821 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); -00822 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out); -00823 this->readerror = LoadConf(CONFIG_FILE,this->cache,this->errorlog); -00824 if (!this->readerror) -00825 this->error = CONF_FILE_NOT_FOUND; -00826 } -00827 -00828 -00829 ConfigReader::~ConfigReader() -00830 { -00831 if (this->cache) -00832 delete this->cache; -00833 if (this->errorlog) -00834 delete this->errorlog; -00835 } -00836 -00837 -00838 ConfigReader::ConfigReader(std::string filename) -00839 { -00840 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); -00841 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out); -00842 this->readerror = LoadConf(filename.c_str(),this->cache,this->errorlog); -00843 if (!this->readerror) -00844 this->error = CONF_FILE_NOT_FOUND; -00845 }; -00846 -00847 std::string ConfigReader::ReadValue(std::string tag, std::string name, int index) -00848 { -00849 char val[MAXBUF]; -00850 char t[MAXBUF]; -00851 char n[MAXBUF]; -00852 strlcpy(t,tag.c_str(),MAXBUF); -00853 strlcpy(n,name.c_str(),MAXBUF); -00854 int res = ReadConf(cache,t,n,index,val); -00855 if (!res) -00856 { -00857 this->error = CONF_VALUE_NOT_FOUND; -00858 return ""; -00859 } -00860 return val; -00861 } -00862 -00863 bool ConfigReader::ReadFlag(std::string tag, std::string name, int index) -00864 { -00865 char val[MAXBUF]; -00866 char t[MAXBUF]; -00867 char n[MAXBUF]; -00868 strlcpy(t,tag.c_str(),MAXBUF); -00869 strlcpy(n,name.c_str(),MAXBUF); -00870 int res = ReadConf(cache,t,n,index,val); -00871 if (!res) -00872 { -00873 this->error = CONF_VALUE_NOT_FOUND; -00874 return false; -00875 } -00876 std::string s = val; -00877 return ((s == "yes") || (s == "YES") || (s == "true") || (s == "TRUE") || (s == "1")); -00878 } -00879 -00880 long ConfigReader::ReadInteger(std::string tag, std::string name, int index, bool needs_unsigned) -00881 { -00882 char val[MAXBUF]; -00883 char t[MAXBUF]; -00884 char n[MAXBUF]; -00885 strlcpy(t,tag.c_str(),MAXBUF); -00886 strlcpy(n,name.c_str(),MAXBUF); -00887 int res = ReadConf(cache,t,n,index,val); -00888 if (!res) -00889 { -00890 this->error = CONF_VALUE_NOT_FOUND; -00891 return 0; -00892 } -00893 for (int i = 0; i < strlen(val); i++) -00894 { -00895 if (!isdigit(val[i])) -00896 { -00897 this->error = CONF_NOT_A_NUMBER; -00898 return 0; -00899 } -00900 } -00901 if ((needs_unsigned) && (atoi(val)<0)) -00902 { -00903 this->error = CONF_NOT_UNSIGNED; -00904 return 0; -00905 } -00906 return atoi(val); -00907 } -00908 -00909 long ConfigReader::GetError() -00910 { -00911 long olderr = this->error; -00912 this->error = 0; -00913 return olderr; -00914 } -00915 -00916 void ConfigReader::DumpErrors(bool bail, userrec* user) -00917 { -00918 if (bail) -00919 { -00920 printf("There were errors in your configuration:\n%s",errorlog->str().c_str()); -00921 exit(0); -00922 } -00923 else -00924 { -00925 char dataline[1024]; -00926 if (user) -00927 { -00928 WriteServ(user->fd,"NOTICE %s :There were errors in the configuration file:",user->nick); -00929 while (!errorlog->eof()) -00930 { -00931 errorlog->getline(dataline,1024); -00932 WriteServ(user->fd,"NOTICE %s :%s",user->nick,dataline); -00933 } -00934 } -00935 else -00936 { -00937 WriteOpers("There were errors in the configuration file:",user->nick); -00938 while (!errorlog->eof()) -00939 { -00940 errorlog->getline(dataline,1024); -00941 WriteOpers(dataline); -00942 } -00943 } -00944 return; -00945 } -00946 } -00947 -00948 -00949 int ConfigReader::Enumerate(std::string tag) -00950 { -00951 return EnumConf(cache,tag.c_str()); -00952 } -00953 -00954 int ConfigReader::EnumerateValues(std::string tag, int index) -00955 { -00956 return EnumValues(cache, tag.c_str(), index); -00957 } -00958 -00959 bool ConfigReader::Verify() -00960 { -00961 return this->readerror; -00962 } -00963 -00964 -00965 FileReader::FileReader(std::string filename) -00966 { -00967 file_cache c; -00968 readfile(c,filename.c_str()); -00969 this->fc = c; -00970 } -00971 -00972 FileReader::FileReader() -00973 { -00974 } -00975 -00976 void FileReader::LoadFile(std::string filename) -00977 { -00978 file_cache c; -00979 readfile(c,filename.c_str()); -00980 this->fc = c; -00981 } -00982 -00983 -00984 FileReader::~FileReader() -00985 { -00986 } -00987 -00988 bool FileReader::Exists() -00989 { -00990 if (fc.size() == 0) -00991 { -00992 return(false); -00993 } -00994 else -00995 { -00996 return(true); -00997 } -00998 } -00999 -01000 std::string FileReader::GetLine(int x) -01001 { -01002 if ((x<0) || (x>fc.size())) -01003 return ""; -01004 return fc[x]; -01005 } -01006 -01007 int FileReader::FileSize() -01008 { -01009 return fc.size(); -01010 } -01011 -01012 -01013 std::vector<Module*> modules(255); -01014 std::vector<ircd_module*> factory(255); +00741 if (strchr(dest,'@')==0) +00742 return false; +00743 for (int i = 0; i < strlen(dest); i++) +00744 if (dest[i] < 32) +00745 return false; +00746 for (int i = 0; i < strlen(dest); i++) +00747 if (dest[i] > 126) +00748 return false; +00749 int c = 0; +00750 for (int i = 0; i < strlen(dest); i++) +00751 if (dest[i] == '!') +00752 c++; +00753 if (c>1) +00754 return false; +00755 c = 0; +00756 for (int i = 0; i < strlen(dest); i++) +00757 if (dest[i] == '@') +00758 c++; +00759 if (c>1) +00760 return false; +00761 +00762 return true; +00763 } +00764 +00765 void Server::MeshSendAll(std::string text) +00766 { +00767 NetSendToAll((char*)text.c_str()); +00768 } +00769 +00770 void Server::MeshSendCommon(userrec* user, std::string text) +00771 { +00772 if (user) +00773 NetSendToCommon(user,(char*)text.c_str()); +00774 } +00775 +00776 void Server::MeshSendAllAlive(std::string text) +00777 { +00778 NetSendToAllAlive((char*)text.c_str()); +00779 } +00780 +00781 void Server::MeshSendUnicast(std::string destination, std::string text) +00782 { +00783 NetSendToOne((char*)destination.c_str(),(char*)text.c_str()); +00784 } +00785 +00786 void Server::MeshSendAllExcept(std::string target, std::string text) +00787 { +00788 NetSendToAllExcept(target.c_str(),(char*)text.c_str()); +00789 } +00790 +00791 bool Server::MeshCheckChan(chanrec *c,std::string servername) +00792 { +00793 if (c) +00794 { +00795 return ChanAnyOnThisServer(c,(char*)servername.c_str()); +00796 } +00797 else return false; +00798 } +00799 +00800 bool Server::MeshCheckCommon(userrec* u,std::string servername) +00801 { +00802 if (u) +00803 { +00804 return CommonOnThisServer(u,(char*)servername.c_str()); +00805 } +00806 else return false; +00807 } +00808 +00809 Module* Server::FindModule(std::string name) +00810 { +00811 for (int i = 0; i <= MODCOUNT; i++) +00812 { +00813 if (module_names[i] == name) +00814 { +00815 return modules[i]; +00816 } +00817 } +00818 return NULL; +00819 } +00820 +00821 ConfigReader::ConfigReader() +00822 { +00823 include_stack.clear(); +00824 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); +00825 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out); +00826 this->readerror = LoadConf(CONFIG_FILE,this->cache,this->errorlog); +00827 if (!this->readerror) +00828 this->error = CONF_FILE_NOT_FOUND; +00829 } +00830 +00831 +00832 ConfigReader::~ConfigReader() +00833 { +00834 if (this->cache) +00835 delete this->cache; +00836 if (this->errorlog) +00837 delete this->errorlog; +00838 } +00839 +00840 +00841 ConfigReader::ConfigReader(std::string filename) +00842 { +00843 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); +00844 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out); +00845 this->readerror = LoadConf(filename.c_str(),this->cache,this->errorlog); +00846 if (!this->readerror) +00847 this->error = CONF_FILE_NOT_FOUND; +00848 }; +00849 +00850 std::string ConfigReader::ReadValue(std::string tag, std::string name, int index) +00851 { +00852 char val[MAXBUF]; +00853 char t[MAXBUF]; +00854 char n[MAXBUF]; +00855 strlcpy(t,tag.c_str(),MAXBUF); +00856 strlcpy(n,name.c_str(),MAXBUF); +00857 int res = ReadConf(cache,t,n,index,val); +00858 if (!res) +00859 { +00860 this->error = CONF_VALUE_NOT_FOUND; +00861 return ""; +00862 } +00863 return val; +00864 } +00865 +00866 bool ConfigReader::ReadFlag(std::string tag, std::string name, int index) +00867 { +00868 char val[MAXBUF]; +00869 char t[MAXBUF]; +00870 char n[MAXBUF]; +00871 strlcpy(t,tag.c_str(),MAXBUF); +00872 strlcpy(n,name.c_str(),MAXBUF); +00873 int res = ReadConf(cache,t,n,index,val); +00874 if (!res) +00875 { +00876 this->error = CONF_VALUE_NOT_FOUND; +00877 return false; +00878 } +00879 std::string s = val; +00880 return ((s == "yes") || (s == "YES") || (s == "true") || (s == "TRUE") || (s == "1")); +00881 } +00882 +00883 long ConfigReader::ReadInteger(std::string tag, std::string name, int index, bool needs_unsigned) +00884 { +00885 char val[MAXBUF]; +00886 char t[MAXBUF]; +00887 char n[MAXBUF]; +00888 strlcpy(t,tag.c_str(),MAXBUF); +00889 strlcpy(n,name.c_str(),MAXBUF); +00890 int res = ReadConf(cache,t,n,index,val); +00891 if (!res) +00892 { +00893 this->error = CONF_VALUE_NOT_FOUND; +00894 return 0; +00895 } +00896 for (int i = 0; i < strlen(val); i++) +00897 { +00898 if (!isdigit(val[i])) +00899 { +00900 this->error = CONF_NOT_A_NUMBER; +00901 return 0; +00902 } +00903 } +00904 if ((needs_unsigned) && (atoi(val)<0)) +00905 { +00906 this->error = CONF_NOT_UNSIGNED; +00907 return 0; +00908 } +00909 return atoi(val); +00910 } +00911 +00912 long ConfigReader::GetError() +00913 { +00914 long olderr = this->error; +00915 this->error = 0; +00916 return olderr; +00917 } +00918 +00919 void ConfigReader::DumpErrors(bool bail, userrec* user) +00920 { +00921 if (bail) +00922 { +00923 printf("There were errors in your configuration:\n%s",errorlog->str().c_str()); +00924 exit(0); +00925 } +00926 else +00927 { +00928 char dataline[1024]; +00929 if (user) +00930 { +00931 WriteServ(user->fd,"NOTICE %s :There were errors in the configuration file:",user->nick); +00932 while (!errorlog->eof()) +00933 { +00934 errorlog->getline(dataline,1024); +00935 WriteServ(user->fd,"NOTICE %s :%s",user->nick,dataline); +00936 } +00937 } +00938 else +00939 { +00940 WriteOpers("There were errors in the configuration file:",user->nick); +00941 while (!errorlog->eof()) +00942 { +00943 errorlog->getline(dataline,1024); +00944 WriteOpers(dataline); +00945 } +00946 } +00947 return; +00948 } +00949 } +00950 +00951 +00952 int ConfigReader::Enumerate(std::string tag) +00953 { +00954 return EnumConf(cache,tag.c_str()); +00955 } +00956 +00957 int ConfigReader::EnumerateValues(std::string tag, int index) +00958 { +00959 return EnumValues(cache, tag.c_str(), index); +00960 } +00961 +00962 bool ConfigReader::Verify() +00963 { +00964 return this->readerror; +00965 } +00966 +00967 +00968 FileReader::FileReader(std::string filename) +00969 { +00970 file_cache c; +00971 readfile(c,filename.c_str()); +00972 this->fc = c; +00973 } +00974 +00975 FileReader::FileReader() +00976 { +00977 } +00978 +00979 void FileReader::LoadFile(std::string filename) +00980 { +00981 file_cache c; +00982 readfile(c,filename.c_str()); +00983 this->fc = c; +00984 } +00985 +00986 +00987 FileReader::~FileReader() +00988 { +00989 } +00990 +00991 bool FileReader::Exists() +00992 { +00993 if (fc.size() == 0) +00994 { +00995 return(false); +00996 } +00997 else +00998 { +00999 return(true); +01000 } +01001 } +01002 +01003 std::string FileReader::GetLine(int x) +01004 { +01005 if ((x<0) || (x>fc.size())) +01006 return ""; +01007 return fc[x]; +01008 } +01009 +01010 int FileReader::FileSize() +01011 { +01012 return fc.size(); +01013 } +01014 01015 -01016 int MODCOUNT = -1; -01017 +01016 std::vector<Module*> modules(255); +01017 std::vector<ircd_module*> factory(255); 01018 -

    Generated on Wed May 25 22:02:05 2005 for InspIRCd by +01019 int MODCOUNT = -1; +01020 +01021 +

    Generated on Mon May 30 05:15:20 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 a8ec1be39..97b101a7f 100644 --- a/docs/module-doc/modules_8cpp.html +++ b/docs/module-doc/modules_8cpp.html @@ -5,10 +5,10 @@ -

    modules.cpp File Reference

    #include "inspircd.h"
    +

    modules.cpp File Reference

    #include "inspircd_config.h"
    +#include "inspircd.h"
    #include "inspircd_io.h"
    #include "inspircd_util.h"
    -#include "inspircd_config.h"
    #include <unistd.h>
    #include <sys/errno.h>
    #include <time.h>
    @@ -37,16 +37,16 @@

    Include dependency graph for modules.cpp:

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

    @@ -58,44 +58,44 @@ Include dependency graph for modules.cpp:

    typedef nspace::hash_map<
    std::string, userrec *, nspace::hash<
    - string >, irc::StrHashCompuser_hash + string >, irc::StrHashCompuser_hash typedef nspace::hash_map<
    std::string, chanrec *, nspace::hash<
    - string >, irc::StrHashCompchan_hash + string >, irc::StrHashCompchan_hash typedef nspace::hash_map<
    in_addr, string *, nspace::hash<
    - in_addr >, irc::InAddr_HashCompaddress_cache + in_addr >, irc::InAddr_HashCompaddress_cache typedef nspace::hash_map<
    std::string, WhoWasUser *,
    - nspace::hash< string >, irc::StrHashCompwhowas_hash + nspace::hash< string >, irc::StrHashCompwhowas_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 @@ -104,99 +104,101 @@ Include dependency graph for modules.cpp:

    std::vector< ircd_module * > factory -time_t TIME +std::vector< std::string > include_stack -int LogLevel +time_t TIME -char ServerName [MAXBUF] +int LogLevel -char Network [MAXBUF] +char ServerName [MAXBUF] -char ServerDesc [MAXBUF] +char Network [MAXBUF] -char AdminName [MAXBUF] +char ServerDesc [MAXBUF] -char AdminEmail [MAXBUF] +char AdminName [MAXBUF] -char AdminNick [MAXBUF] +char AdminEmail [MAXBUF] -char diepass [MAXBUF] +char AdminNick [MAXBUF] -char restartpass [MAXBUF] +char diepass [MAXBUF] -char motd [MAXBUF] +char restartpass [MAXBUF] -char rules [MAXBUF] +char motd [MAXBUF] -char list [MAXBUF] +char rules [MAXBUF] -char PrefixQuit [MAXBUF] +char list [MAXBUF] -char DieValue [MAXBUF] +char PrefixQuit [MAXBUF] -int debugging +char DieValue [MAXBUF] -int WHOWAS_STALE +int debugging -int WHOWAS_MAX +int WHOWAS_STALE -int DieDelay +int WHOWAS_MAX -time_t startup_time +int DieDelay -int NetBufferSize +time_t startup_time -int MaxWhoResults +int NetBufferSize -time_t nb_start +int MaxWhoResults -std::vector< std::string > module_names +time_t nb_start -int boundPortCount +std::vector< std::string > module_names -int portCount +int boundPortCount -int SERVERportCount +int portCount -int ports [MAXSOCKS] +int SERVERportCount -int defaultRoute +int ports [MAXSOCKS] -std::vector< long > auth_cookies +int defaultRoute -std::stringstream config_f +std::vector< long > auth_cookies -serverrecme [32] +std::stringstream config_f -FILE * log_file +serverrecme [32] -userrecfd_ref_table [65536] +FILE * log_file -user_hash clientlist +userrecfd_ref_table [65536] -chan_hash chanlist +user_hash clientlist -whowas_hash whowas +chan_hash chanlist -command_table cmdlist +whowas_hash whowas -file_cache MOTD +command_table cmdlist -file_cache RULES +file_cache MOTD -address_cache IP +file_cache RULES -ExtModeList EMode +address_cache IP + +ExtModeList EMode

    Typedef Documentation

    -

    +

    @@ -211,16 +213,16 @@ Include dependency graph for modules.cpp:

    120 of file modules.cpp. +Definition at line 122 of file modules.cpp.
    -
    typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp> address_cache + typedef nspace::hash_map<in_addr,string*, nspace::hash<in_addr>, irc::InAddr_HashComp> address_cache
    -

    +

    @@ -235,16 +237,16 @@ Definition at line 120

    -Definition at line 119 of file modules.cpp. +Definition at line 121 of file modules.cpp.

    -
    typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp> chan_hash + typedef nspace::hash_map<std::string, chanrec*, nspace::hash<string>, irc::StrHashComp> chan_hash
    -

    +

    @@ -259,16 +261,16 @@ Definition at line 119

    -Definition at line 122 of file modules.cpp. +Definition at line 124 of file modules.cpp.

    -
    typedef std::deque<command_t> command_table + typedef std::deque<command_t> command_table
    -

    +

    @@ -283,16 +285,16 @@ Definition at line 122

    -Definition at line 148 of file modules.cpp. +Definition at line 150 of file modules.cpp.

    -
    typedef std::vector<ExtMode> ExtModeList + typedef std::vector<ExtMode> ExtModeList
    -

    +

    @@ -307,18 +309,18 @@ Definition at line 148

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

    +

    @@ -333,16 +335,16 @@ Referenced by ModeDefined()

    -Definition at line 118 of file modules.cpp. +Definition at line 120 of file modules.cpp.

    -
    typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> user_hash + typedef nspace::hash_map<std::string, userrec*, nspace::hash<string>, irc::StrHashComp> user_hash
    -

    +

    @@ -357,11 +359,11 @@ Definition at line 118

    -Definition at line 121 of file modules.cpp. +Definition at line 123 of file modules.cpp.

    -
    typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp> whowas_hash + typedef nspace::hash_map<std::string, WhoWasUser*, nspace::hash<string>, irc::StrHashComp> whowas_hash


    Function Documentation

    -

    +

    @@ -416,23 +418,23 @@ Definition at line 121

    -Definition at line 218 of file modules.cpp. +Definition at line 220 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().

    -

    00219 {
    -00220         if (ModeDefined(modechar,type)) {
    -00221                 return false;
    -00222         }
    -00223         EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off));
    -00224         return true;
    -00225 }
    +
    00221 {
    +00222         if (ModeDefined(modechar,type)) {
    +00223                 return false;
    +00224         }
    +00225         EMode.push_back(ExtMode(modechar,type,requires_oper,params_on,params_off));
    +00226         return true;
    +00227 }
     
    -

    +

    @@ -461,7 +463,7 @@ Referenced by Server::AddEx
    -

    +

    @@ -498,26 +500,26 @@ Referenced by Server::AddEx

    -Definition at line 155 of file modules.cpp. +Definition at line 157 of file modules.cpp.

    -References EMode, and ExtModeListIter. +References EMode, and ExtModeListIter.

    -Referenced by DoAddExtendedMode(). +Referenced by DoAddExtendedMode().

    -

    00156 {
    -00157         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    -00158         {
    -00159                 if ((i->modechar == modechar) && (i->type == type))
    -00160                 {
    -00161                         return true;
    -00162                 }
    -00163         }
    -00164         return false;
    -00165 }
    +
    00158 {
    +00159         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    +00160         {
    +00161                 if ((i->modechar == modechar) && (i->type == type))
    +00162                 {
    +00163                         return true;
    +00164                 }
    +00165         }
    +00166         return false;
    +00167 }
     
    -

    +

    @@ -554,24 +556,24 @@ Referenced by DoAddExtended

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

    -References EMode, and ExtModeListIter. +References EMode, and ExtModeListIter.

    -

    00206 {
    -00207         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    -00208         {
    -00209                 if ((i->modechar == modechar) && (i->type == type))
    -00210                 {
    -00211                         return i->params_when_off;
    -00212                 }
    -00213         }
    -00214         return 0;
    -00215 }
    +
    00208 {
    +00209         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    +00210         {
    +00211                 if ((i->modechar == modechar) && (i->type == type))
    +00212                 {
    +00213                         return i->params_when_off;
    +00214                 }
    +00215         }
    +00216         return 0;
    +00217 }
     
    -

    +

    @@ -608,24 +610,24 @@ References EMode, and <

    -Definition at line 192 of file modules.cpp. +Definition at line 194 of file modules.cpp.

    -References EMode, and ExtModeListIter. +References EMode, and ExtModeListIter.

    -

    00193 {
    -00194         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    -00195         {
    -00196                 if ((i->modechar == modechar) && (i->type == type))
    -00197                 {
    -00198                         return i->params_when_on;
    -00199                 }
    -00200         }
    -00201         return 0;
    -00202 }
    +
    00195 {
    +00196         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    +00197         {
    +00198                 if ((i->modechar == modechar) && (i->type == type))
    +00199                 {
    +00200                         return i->params_when_on;
    +00201                 }
    +00202         }
    +00203         return 0;
    +00204 }
     
    -

    +

    @@ -662,24 +664,24 @@ References EMode, and <

    -Definition at line 179 of file modules.cpp. +Definition at line 181 of file modules.cpp.

    -References EMode, and ExtModeListIter. +References EMode, and ExtModeListIter.

    -

    00180 {
    -00181         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    -00182         {
    -00183                 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true))
    -00184                 {
    -00185                         return true;
    -00186                 }
    -00187         }
    -00188         return false;
    -00189 }
    +
    00182 {
    +00183         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    +00184         {
    +00185                 if ((i->modechar == modechar) && (i->type == type) && (i->needsoper == true))
    +00186                 {
    +00187                         return true;
    +00188                 }
    +00189         }
    +00190         return false;
    +00191 }
     
    -

    +

    @@ -716,24 +718,24 @@ References EMode, and <

    -Definition at line 167 of file modules.cpp. +Definition at line 169 of file modules.cpp.

    -References EMode, and ExtModeListIter. +References EMode, and ExtModeListIter.

    -

    00168 {
    -00169         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    -00170         {
    -00171                 if ((i->modechar == modechar) && (i->type == type) && (i->list == true))
    -00172                 {
    -00173                         return true;
    -00174                 }
    -00175         }
    -00176         return false;
    -00177 }
    +
    00170 {
    +00171         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    +00172         {
    +00173                 if ((i->modechar == modechar) && (i->type == type) && (i->list == true))
    +00174                 {
    +00175                         return true;
    +00176                 }
    +00177         }
    +00178         return false;
    +00179 }
     
    -

    +

    @@ -761,27 +763,27 @@ References EMode, and <

    -Definition at line 228 of file modules.cpp. +Definition at line 230 of file modules.cpp.

    -References EMode, ExtModeListIter, and MT_CHANNEL. +References EMode, ExtModeListIter, and MT_CHANNEL.

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

    -

    00229 {
    -00230         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    -00231         {
    -00232                 if ((i->modechar == modechar) && (i->type == MT_CHANNEL))
    -00233                 {
    -00234                         i->list = true;
    -00235                         return;
    -00236                 }
    -00237         }
    -00238         return;
    -00239 }
    +
    00231 {
    +00232         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
    +00233         {
    +00234                 if ((i->modechar == modechar) && (i->type == MT_CHANNEL))
    +00235                 {
    +00236                         i->list = true;
    +00237                         return;
    +00238                 }
    +00239         }
    +00240         return;
    +00241 }
     
    -

    +

    @@ -811,13 +813,13 @@ Referenced by Server::AddEx


    Variable Documentation

    -

    +

    @@ -832,16 +834,16 @@ Referenced by Server::AddEx

    -Definition at line 82 of file modules.cpp. +Definition at line 84 of file modules.cpp.

    -
    char AdminEmail[MAXBUF] + char AdminEmail[MAXBUF]
    -

    +

    @@ -856,16 +858,16 @@ Definition at line 82 o

    -Definition at line 81 of file modules.cpp. +Definition at line 83 of file modules.cpp.

    -
    char AdminName[MAXBUF] + char AdminName[MAXBUF]
    -

    +

    @@ -880,16 +882,16 @@ Definition at line 81 o

    -Definition at line 83 of file modules.cpp. +Definition at line 85 of file modules.cpp.

    -
    char AdminNick[MAXBUF] + char AdminNick[MAXBUF]
    -

    +

    @@ -904,16 +906,16 @@ Definition at line 83 o

    -Definition at line 109 of file modules.cpp. +Definition at line 111 of file modules.cpp.

    -
    std::vector<long> auth_cookies + std::vector<long> auth_cookies
    -

    +

    @@ -928,16 +930,16 @@ Definition at line 109

    -Definition at line 103 of file modules.cpp. +Definition at line 105 of file modules.cpp.

    -
    int boundPortCount + int boundPortCount
    -

    +

    @@ -952,16 +954,16 @@ Definition at line 103

    -Definition at line 126 of file modules.cpp. +Definition at line 128 of file modules.cpp.

    -
    chan_hash chanlist + chan_hash chanlist
    -

    +

    @@ -976,16 +978,16 @@ Definition at line 126

    -Definition at line 125 of file modules.cpp. +Definition at line 127 of file modules.cpp.

    -
    user_hash clientlist + user_hash clientlist
    -

    +

    @@ -1000,10 +1002,10 @@ Definition at line 125

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

    -
    command_table cmdlist + command_table cmdlist
    -

    +

    +Definition at line 112 of file modules.cpp.
    @@ -1024,16 +1026,16 @@ Definition at line 128

    -Definition at line 110 of file modules.cpp.

    -

    +

    @@ -1048,16 +1050,16 @@ Definition at line 110

    -Definition at line 92 of file modules.cpp. +Definition at line 94 of file modules.cpp.

    -
    int debugging + int debugging
    -

    +

    @@ -1072,16 +1074,16 @@ Definition at line 92 o

    -Definition at line 107 of file modules.cpp. +Definition at line 109 of file modules.cpp.

    -
    int defaultRoute + int defaultRoute
    -

    +

    @@ -1096,16 +1098,16 @@ Definition at line 107

    -Definition at line 95 of file modules.cpp. +Definition at line 97 of file modules.cpp.

    -
    int DieDelay + int DieDelay
    -

    +

    @@ -1120,16 +1122,16 @@ Definition at line 95 o

    -Definition at line 84 of file modules.cpp. +Definition at line 86 of file modules.cpp.

    -
    char diepass[MAXBUF] + char diepass[MAXBUF]
    -

    +

    @@ -1144,16 +1146,16 @@ Definition at line 84 o

    -Definition at line 90 of file modules.cpp. +Definition at line 92 of file modules.cpp.

    -
    char DieValue[MAXBUF] + char DieValue[MAXBUF]
    -

    +

    @@ -1168,9 +1170,9 @@ Definition at line 90 o

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

    @@ -1197,13 +1199,13 @@ Referenced by DoAddExtended Definition at line 73 of file modules.cpp. -

    +

    @@ -1218,18 +1220,18 @@ Definition at line 73 o

    -Definition at line 116 of file modules.cpp. +Definition at line 118 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]
    -

    +

    @@ -1244,16 +1246,18 @@ Referenced by Server::FindD

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

    +Referenced by ConfigReader::ConfigReader().

    -
    address_cache IP + std::vector<std::string> include_stack
    -

    +

    @@ -1268,16 +1272,16 @@ Definition at line 131

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

    -
    char list[MAXBUF] + address_cache IP
    -

    +

    @@ -1292,16 +1296,16 @@ Definition at line 88 o

    -Definition at line 114 of file modules.cpp. +Definition at line 90 of file modules.cpp.

    -
    FILE* log_file + char list[MAXBUF]
    -

    +

    @@ -1316,16 +1320,16 @@ Definition at line 114

    -Definition at line 77 of file modules.cpp. +Definition at line 116 of file modules.cpp.

    -
    int LogLevel + FILE* log_file
    -

    +

    @@ -1340,10 +1344,34 @@ Definition at line 77 o

    -Definition at line 98 of file modules.cpp. +Definition at line 79 of file modules.cpp.

    -
    int MaxWhoResults + int LogLevel
    -

    +

    + + + + +
    + + +
    int MaxWhoResults +
    +
    + + + + + +
    +   + + +

    + +

    +Definition at line 100 of file modules.cpp.

    +

    +Definition at line 114 of file modules.cpp.
    @@ -1364,7 +1392,7 @@ Definition at line 98 o

    -Definition at line 112 of file modules.cpp.

    @@ -1388,16 +1416,16 @@ Definition at line 112

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

    +

    @@ -1412,7 +1440,7 @@ Definition at line 1016

    -Definition at line 101 of file modules.cpp. +Definition at line 103 of file modules.cpp.

    -
    std::vector<std::string> module_names + std::vector<std::string> module_names

    @@ -1439,13 +1467,13 @@ Definition at line 101 Definition at line 72 of file modules.cpp. -

    +

    @@ -1460,16 +1488,16 @@ Definition at line 72 o

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

    -
    file_cache MOTD + file_cache MOTD
    -

    +

    @@ -1484,16 +1512,16 @@ Definition at line 129

    -Definition at line 86 of file modules.cpp. +Definition at line 88 of file modules.cpp.

    -
    char motd[MAXBUF] + char motd[MAXBUF]
    -

    +

    @@ -1508,16 +1536,16 @@ Definition at line 86 o

    -Definition at line 99 of file modules.cpp. +Definition at line 101 of file modules.cpp.

    -
    time_t nb_start + time_t nb_start
    -

    +

    @@ -1532,16 +1560,16 @@ Definition at line 99 o

    -Definition at line 97 of file modules.cpp. +Definition at line 99 of file modules.cpp.

    -
    int NetBufferSize + int NetBufferSize
    -

    +

    @@ -1556,16 +1584,16 @@ Definition at line 97 o

    -Definition at line 79 of file modules.cpp. +Definition at line 81 of file modules.cpp.

    -
    char Network[MAXBUF] + char Network[MAXBUF]
    -

    +

    @@ -1580,16 +1608,16 @@ Definition at line 79 o

    -Definition at line 104 of file modules.cpp. +Definition at line 106 of file modules.cpp.

    -
    int portCount + int portCount
    -

    +

    @@ -1604,16 +1632,16 @@ Definition at line 104

    -Definition at line 106 of file modules.cpp. +Definition at line 108 of file modules.cpp.

    -
    int ports[MAXSOCKS] + int ports[MAXSOCKS]
    -

    +

    @@ -1628,16 +1656,16 @@ Definition at line 106

    -Definition at line 89 of file modules.cpp. +Definition at line 91 of file modules.cpp.

    -
    char PrefixQuit[MAXBUF] + char PrefixQuit[MAXBUF]
    -

    +

    @@ -1652,16 +1680,16 @@ Definition at line 89 o

    -Definition at line 85 of file modules.cpp. +Definition at line 87 of file modules.cpp.

    -
    char restartpass[MAXBUF] + char restartpass[MAXBUF]
    -

    +

    @@ -1676,16 +1704,16 @@ Definition at line 85 o

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

    -
    file_cache RULES + file_cache RULES
    -

    +

    @@ -1700,16 +1728,16 @@ Definition at line 130

    -Definition at line 87 of file modules.cpp. +Definition at line 89 of file modules.cpp.

    -
    char rules[MAXBUF] + char rules[MAXBUF]
    -

    +

    @@ -1724,16 +1752,16 @@ Definition at line 87 o

    -Definition at line 80 of file modules.cpp. +Definition at line 82 of file modules.cpp.

    -
    char ServerDesc[MAXBUF] + char ServerDesc[MAXBUF]
    -

    +

    @@ -1748,16 +1776,16 @@ Definition at line 80 o

    -Definition at line 78 of file modules.cpp. +Definition at line 80 of file modules.cpp.

    -
    char ServerName[MAXBUF] + char ServerName[MAXBUF]
    -

    +

    @@ -1772,16 +1800,16 @@ Definition at line 78 o

    -Definition at line 105 of file modules.cpp. +Definition at line 107 of file modules.cpp.

    -
    int SERVERportCount + int SERVERportCount
    -

    +

    @@ -1796,16 +1824,16 @@ Definition at line 105

    -Definition at line 96 of file modules.cpp. +Definition at line 98 of file modules.cpp.

    -
    time_t startup_time + time_t startup_time
    -

    +

    @@ -1820,16 +1848,16 @@ Definition at line 96 o

    -Definition at line 75 of file modules.cpp. +Definition at line 77 of file modules.cpp.

    -
    time_t TIME + time_t TIME
    -

    +

    @@ -1844,16 +1872,16 @@ Definition at line 75 o

    -Definition at line 127 of file modules.cpp. +Definition at line 129 of file modules.cpp.

    -
    whowas_hash whowas + whowas_hash whowas
    -

    +

    @@ -1868,16 +1896,16 @@ Definition at line 127

    -Definition at line 94 of file modules.cpp. +Definition at line 96 of file modules.cpp.

    -
    int WHOWAS_MAX + int WHOWAS_MAX
    -

    +

    @@ -1892,10 +1920,10 @@ Definition at line 94 o

    -Definition at line 93 of file modules.cpp. +Definition at line 95 of file modules.cpp.

    -
    int WHOWAS_STALE + int WHOWAS_STALE
    -


    Generated on Wed May 25 22:02:33 2005 for InspIRCd by +
    Generated on Mon May 30 05:16:04 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 b041fb6b8..f603ade24 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 e73c3c739..9e01f90aa 100644 --- a/docs/module-doc/modules_8h-source.html +++ b/docs/module-doc/modules_8h-source.html @@ -450,7 +450,7 @@ 01307 typedef DLLFactory<ModuleFactory> ircd_module; 01308 01309 #endif -

    Generated on Wed May 25 22:02:05 2005 for InspIRCd by +

    Generated on Mon May 30 05:15:20 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 1cb2966a1..872327ad6 100644 --- a/docs/module-doc/modules_8h.html +++ b/docs/module-doc/modules_8h.html @@ -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().

    @@ -454,7 +454,7 @@ Definition at line 38 of

    Definition at line 1141 of file modules.h.

    -Referenced by ConfigReader::ConfigReader(). +Referenced by ConfigReader::ConfigReader().

    @@ -480,7 +480,7 @@ Referenced by ConfigReader:

    Definition at line 1138 of file modules.h.

    -Referenced by ConfigReader::ReadInteger(). +Referenced by ConfigReader::ReadInteger().

    @@ -506,7 +506,7 @@ Referenced by ConfigReader:

    Definition at line 1139 of file modules.h.

    -Referenced by ConfigReader::ReadInteger(). +Referenced by ConfigReader::ReadInteger().

    @@ -532,7 +532,7 @@ Referenced by ConfigReader:

    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(), serverrec::AddIncoming(), chanrec::AddUser(), chanrec::DelUser(), userrec::HasPermission(), chanrec::IsCustomModeSet(), serverrec::RecvPacket(), userrec::RemoveInvite(), serverrec::SendPacket(), chanrec::SetCustomMode(), chanrec::SetCustomModeParam(), userrec::SetWriteError(), and Server::UserToPseudo(). +Referenced by Server::AddExtendedMode(), serverrec::AddIncoming(), chanrec::AddUser(), chanrec::DelUser(), userrec::HasPermission(), chanrec::IsCustomModeSet(), serverrec::RecvPacket(), userrec::RemoveInvite(), serverrec::SendPacket(), 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().

    @@ -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().

    @@ -1027,7 +1027,7 @@ Definition at line 1307 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 Wed May 25 22:02:35 2005 for InspIRCd by +
    Generated on Mon May 30 05:16:07 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/namespaceirc.html b/docs/module-doc/namespaceirc.html index e60cd6356..47f0d4f5b 100644 --- a/docs/module-doc/namespaceirc.html +++ b/docs/module-doc/namespaceirc.html @@ -55,7 +55,7 @@ This typedef declares irc::string Definition at line 129 of file hashcomp.h. -
    Generated on Wed May 25 22:03:34 2005 for InspIRCd by +
    Generated on Mon May 30 05:17:49 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/namespacemembers.html b/docs/module-doc/namespacemembers.html index 20d41958d..6f45cfcc7 100644 --- a/docs/module-doc/namespacemembers.html +++ b/docs/module-doc/namespacemembers.html @@ -11,7 +11,7 @@ Here is a list of all namespace members with links to the namespace documentation for each member: -
    Generated on Wed May 25 22:03:35 2005 for InspIRCd by +
    Generated on Mon May 30 05:17:51 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/namespacemembers_type.html b/docs/module-doc/namespacemembers_type.html index ca5bbac62..73b7d247d 100644 --- a/docs/module-doc/namespacemembers_type.html +++ b/docs/module-doc/namespacemembers_type.html @@ -11,7 +11,7 @@ -
    Generated on Wed May 25 22:03:35 2005 for InspIRCd by +
    Generated on Mon May 30 05:17:51 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/namespacenspace.html b/docs/module-doc/namespacenspace.html index e0e274198..af8ef2b4b 100644 --- a/docs/module-doc/namespacenspace.html +++ b/docs/module-doc/namespacenspace.html @@ -15,7 +15,7 @@ struct  nspace.hash< string > -
    Generated on Wed May 25 22:03:35 2005 for InspIRCd by +
    Generated on Mon May 30 05:17:50 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/namespaces.html b/docs/module-doc/namespaces.html index 8d103848c..3d097df49 100644 --- a/docs/module-doc/namespaces.html +++ b/docs/module-doc/namespaces.html @@ -10,7 +10,7 @@ nspace std -
    Generated on Wed May 25 22:03:34 2005 for InspIRCd by +
    Generated on Mon May 30 05:17:49 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/namespacestd.html b/docs/module-doc/namespacestd.html index 956df240e..0224b440b 100644 --- a/docs/module-doc/namespacestd.html +++ b/docs/module-doc/namespacestd.html @@ -10,7 +10,7 @@
    -
    Generated on Wed May 25 22:03:35 2005 for InspIRCd by +
    Generated on Mon May 30 05:17:50 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 7b6994181..297f887fa 100644 --- a/docs/module-doc/servers_8cpp-source.html +++ b/docs/module-doc/servers_8cpp-source.html @@ -262,279 +262,312 @@ 00255 // Checks to see if we can still reach a server at all (e.g. is it in ANY routing table?) 00256 bool IsRoutable(std::string servername) 00257 { -00258 for (int x = 0; x < 32; x++) if (me[x]) -00259 { -00260 ircd_connector* cn = me[x]->FindHost(servername.c_str()); -00261 if (cn) -00262 { -00263 if (cn->GetState() == STATE_DISCONNECTED) -00264 { -00265 for (int k = 0; k < me[x]->connectors.size(); k++) -00266 { -00267 for (int m = 0; m < me[x]->connectors[k].routes.size(); m++) -00268 { -00269 if (!strcasecmp(me[x]->connectors[k].routes[m].c_str(),servername.c_str())) -00270 { -00271 return true; -00272 } -00273 } -00274 } -00275 return false; -00276 } -00277 else return true; -00278 } -00279 } -00280 return false; -00281 } -00282 -00283 -00284 void serverrec::FlushWriteBuffers() -00285 { -00286 for (int i = 0; i < this->connectors.size(); i++) -00287 { -00288 // don't try and ping a NOAUTH_OUTBOUND state, its not authed yet! -00289 if ((this->connectors[i].GetState() == STATE_NOAUTH_OUTBOUND) && (TIME > this->connectors[i].age+30)) +00258 int c = 0; +00259 for (int x = 0; x < 32; x++) +00260 if (me[x]) +00261 { +00262 for (int i = 0; i < me[x]->connectors.size(); i++) +00263 { +00264 if ((me[x]->connectors[i].GetServerName() == servername) && (me[x]->connectors[i].GetState() != STATE_DISCONNECTED)) +00265 { +00266 c++; +00267 } +00268 } +00269 } +00270 return (c != 0); +00271 } +00272 +00273 +00274 void serverrec::FlushWriteBuffers() +00275 { +00276 char buffer[MAXBUF]; +00277 for (int i = 0; i < this->connectors.size(); i++) +00278 { +00279 // don't try and ping a NOAUTH_OUTBOUND state, its not authed yet! +00280 if ((this->connectors[i].GetState() == STATE_NOAUTH_OUTBOUND) && (TIME > this->connectors[i].age+30)) +00281 { +00282 // however if we reach this timer its connected timed out :) +00283 WriteOpers("*** Connection to %s timed out",this->connectors[i].GetServerName().c_str()); +00284 snprintf(buffer,MAXBUF,"& %s",this->connectors[i].GetServerName().c_str()); +00285 NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer); +00286 DoSplit(this->connectors[i].GetServerName().c_str()); +00287 return; +00288 } +00289 if ((this->connectors[i].GetState() == STATE_NOAUTH_INBOUND) && (TIME > this->connectors[i].age+30)) 00290 { -00291 // however if we reach this timer its connected timed out :) -00292 WriteOpers("*** Connection to %s timed out",this->connectors[i].GetServerName().c_str()); -00293 DoSplit(this->connectors[i].GetServerName().c_str()); -00294 return; -00295 } -00296 else if ((this->connectors[i].GetState() == STATE_NOAUTH_INBOUND) && (TIME > this->connectors[i].age+30)) -00297 { -00298 WriteOpers("*** Connection from %s timed out",this->connectors[i].GetServerName().c_str()); -00299 DoSplit(this->connectors[i].GetServerName().c_str()); -00300 return; -00301 } -00302 else if (this->connectors[i].GetState() != STATE_DISCONNECTED) -00303 { -00304 if (!this->connectors[i].CheckPing()) -00305 { -00306 WriteOpers("*** Lost single connection to %s: Ping timeout",this->connectors[i].GetServerName().c_str()); -00307 this->connectors[i].CloseConnection(); -00308 this->connectors[i].SetState(STATE_DISCONNECTED); -00309 if (!IsRoutable(this->connectors[i].GetServerName())) -00310 { -00311 WriteOpers("*** Server %s is no longer routable, disconnecting.",this->connectors[i].GetServerName().c_str()); -00312 DoSplit(this->connectors[i].GetServerName().c_str()); -00313 } -00314 has_been_netsplit = true; -00315 } -00316 } -00317 if (this->connectors[i].HasBufferedOutput()) -00318 { -00319 if (!this->connectors[i].FlushWriteBuf()) -00320 { -00321 // if we're here the write() caused an error, we cannot proceed -00322 WriteOpers("*** Lost single connection to %s, link inactive and retrying: %s",this->connectors[i].GetServerName().c_str(),this->connectors[i].GetWriteError().c_str()); -00323 this->connectors[i].CloseConnection(); -00324 this->connectors[i].SetState(STATE_DISCONNECTED); -00325 if (!IsRoutable(this->connectors[i].GetServerName())) -00326 { -00327 WriteOpers("*** Server %s is no longer routable, disconnecting.",this->connectors[i].GetServerName().c_str()); -00328 DoSplit(this->connectors[i].GetServerName().c_str()); -00329 } -00330 has_been_netsplit = true; -00331 } -00332 } -00333 } -00334 } -00335 -00336 bool serverrec::SendPacket(char *message, const char* sendhost) -00337 { -00338 if ((!message) || (!sendhost)) -00339 return true; -00340 -00341 ircd_connector* cn = this->FindHost(sendhost); -00342 -00343 if (!strchr(message,'\n')) -00344 { -00345 strlcat(message,"\n",MAXBUF); -00346 } -00347 -00348 if (cn) -00349 { -00350 log(DEBUG,"main: serverrec::SendPacket() sent '%s' to %s",message,cn->GetServerName().c_str()); -00351 -00352 if (cn->GetState() == STATE_DISCONNECTED) -00353 { -00354 // fix: can only route one hop to avoid a loop -00355 if (strncmp(message,"R ",2)) -00356 { -00357 log(DEBUG,"Not a double reroute"); -00358 // this route is down, we must re-route the packet through an available point in the mesh. -00359 for (int k = 0; k < this->connectors.size(); k++) -00360 { -00361 log(DEBUG,"Check connector %d: %s",k,this->connectors[k].GetServerName().c_str()); -00362 // search for another point in the mesh which can 'reach' where we want to go -00363 for (int m = 0; m < this->connectors[k].routes.size(); m++) -00364 { -00365 if (!strcasecmp(this->connectors[k].routes[m].c_str(),sendhost)) -00366 { -00367 log(DEBUG,"Found alternative route for packet: %s",this->connectors[k].GetServerName().c_str()); -00368 char buffer[MAXBUF]; -00369 snprintf(buffer,MAXBUF,"R %s %s",sendhost,message); -00370 this->SendPacket(buffer,this->connectors[k].GetServerName().c_str()); -00371 return true; -00372 } -00373 } -00374 } -00375 } -00376 char buffer[MAXBUF]; -00377 snprintf(buffer,MAXBUF,"& %s",sendhost); -00378 WriteOpers("*** All connections to %s lost.",sendhost); -00379 NetSendToAllExcept(sendhost,buffer); -00380 DoSplit(sendhost); -00381 return false; -00382 } -00383 -00384 // returns false if the packet could not be sent (e.g. target host down) -00385 if (!cn->AddWriteBuf(message)) -00386 { -00387 // if we're here, there was an error pending, and the send cannot proceed -00388 log(DEBUG,"cn->AddWriteBuf() failed for serverrec::SendPacket(): %s",cn->GetWriteError().c_str()); -00389 log(DEBUG,"Disabling connector: %s",cn->GetServerName().c_str()); -00390 cn->CloseConnection(); -00391 cn->SetState(STATE_DISCONNECTED); -00392 WriteOpers("*** Lost single connection to %s, link inactive and retrying: %s",cn->GetServerName().c_str(),cn->GetWriteError().c_str()); -00393 // retry the packet along a new route so either arrival OR failure are gauranteed (bugfix) -00394 return this->SendPacket(message,sendhost); -00395 } -00396 if (!cn->FlushWriteBuf()) -00397 { -00398 // if we're here the write() caused an error, we cannot proceed -00399 log(DEBUG,"cn->FlushWriteBuf() failed for serverrec::SendPacket(): %s",cn->GetWriteError().c_str()); -00400 log(DEBUG,"Disabling connector: %s",cn->GetServerName().c_str()); -00401 cn->CloseConnection(); -00402 cn->SetState(STATE_DISCONNECTED); -00403 WriteOpers("*** Lost single connection to %s, link inactive and retrying: %s",cn->GetServerName().c_str(),cn->GetWriteError().c_str()); -00404 // retry the packet along a new route so either arrival OR failure are gauranteed -00405 return this->SendPacket(message,sendhost); -00406 } -00407 return true; -00408 } -00409 } -00410 -00411 bool already_have_sum(std::string sum) -00412 { -00413 for (int i = 0; i < xsums.size(); i++) -00414 { -00415 if (xsums[i] == sum) -00416 { -00417 return true; -00418 } -00419 } -00420 if (xsums.size() >= 128) -00421 { -00422 xsums.pop_front(); -00423 } -00424 xsums.push_back(sum); -00425 return false; -00426 } -00427 -00428 // receives a packet from any where there is data waiting, first come, first served -00429 // fills the message and host values with the host where the data came from. -00430 -00431 bool serverrec::RecvPacket(std::deque<std::string> &messages, char* recvhost,std::deque<std::string> &sums) -00432 { -00433 char data[65536]; -00434 memset(data, 0, 65536); -00435 for (int i = 0; i < this->connectors.size(); i++) -00436 { -00437 if (this->connectors[i].GetState() != STATE_DISCONNECTED) -00438 { -00439 // returns false if the packet could not be sent (e.g. target host down) -00440 int rcvsize = 0; +00291 WriteOpers("*** Connection from %s timed out",this->connectors[i].GetServerName().c_str()); +00292 snprintf(buffer,MAXBUF,"& %s",this->connectors[i].GetServerName().c_str()); +00293 NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer); +00294 DoSplit(this->connectors[i].GetServerName().c_str()); +00295 return; +00296 } +00297 if (this->connectors[i].GetState() != STATE_DISCONNECTED) +00298 { +00299 if (!this->connectors[i].CheckPing()) +00300 { +00301 WriteOpers("*** Lost single connection to %s: Ping timeout",this->connectors[i].GetServerName().c_str()); +00302 this->connectors[i].CloseConnection(); +00303 this->connectors[i].SetState(STATE_DISCONNECTED); +00304 if (!IsRoutable(this->connectors[i].GetServerName())) +00305 { +00306 WriteOpers("*** Server %s is no longer routable, disconnecting.",this->connectors[i].GetServerName().c_str()); +00307 snprintf(buffer,MAXBUF,"& %s",this->connectors[i].GetServerName().c_str()); +00308 NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer); +00309 DoSplit(this->connectors[i].GetServerName().c_str()); +00310 } +00311 has_been_netsplit = true; +00312 } +00313 } +00314 if ((this->connectors[i].GetWriteError() !="") && (this->connectors[i].GetState() != STATE_DISCONNECTED)) +00315 { +00316 // if we're here the write() caused an error, we cannot proceed +00317 WriteOpers("*** Lost single connection to %s, link inactive and retrying: %s",this->connectors[i].GetServerName().c_str(),this->connectors[i].GetWriteError().c_str()); +00318 this->connectors[i].CloseConnection(); +00319 this->connectors[i].SetState(STATE_DISCONNECTED); +00320 if (!IsRoutable(this->connectors[i].GetServerName())) +00321 { +00322 WriteOpers("*** Server %s is no longer routable, disconnecting.",this->connectors[i].GetServerName().c_str()); +00323 snprintf(buffer,MAXBUF,"& %s",this->connectors[i].GetServerName().c_str()); +00324 NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer); +00325 DoSplit(this->connectors[i].GetServerName().c_str()); +00326 } +00327 has_been_netsplit = true; +00328 } +00329 if ((this->connectors[i].HasBufferedOutput()) && (this->connectors[i].GetState() != STATE_DISCONNECTED)) +00330 { +00331 if (!this->connectors[i].FlushWriteBuf()) +00332 { +00333 // if we're here the write() caused an error, we cannot proceed +00334 WriteOpers("*** Lost single connection to %s, link inactive and retrying: %s",this->connectors[i].GetServerName().c_str(),this->connectors[i].GetWriteError().c_str()); +00335 this->connectors[i].CloseConnection(); +00336 this->connectors[i].SetState(STATE_DISCONNECTED); +00337 if (!IsRoutable(this->connectors[i].GetServerName())) +00338 { +00339 WriteOpers("*** Server %s is no longer routable, disconnecting.",this->connectors[i].GetServerName().c_str()); +00340 snprintf(buffer,MAXBUF,"& %s",this->connectors[i].GetServerName().c_str()); +00341 NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer); +00342 DoSplit(this->connectors[i].GetServerName().c_str()); +00343 } +00344 has_been_netsplit = true; +00345 } +00346 } +00347 } +00348 } +00349 +00350 bool serverrec::SendPacket(char *message, const char* sendhost) +00351 { +00352 if ((!message) || (!sendhost)) +00353 return true; +00354 +00355 ircd_connector* cn = this->FindHost(sendhost); +00356 +00357 if (!strchr(message,'\n')) +00358 { +00359 strlcat(message,"\n",MAXBUF); +00360 } +00361 +00362 if (cn) +00363 { +00364 log(DEBUG,"main: serverrec::SendPacket() sent '%s' to %s",message,cn->GetServerName().c_str()); +00365 +00366 if (cn->GetState() == STATE_DISCONNECTED) +00367 { +00368 // fix: can only route one hop to avoid a loop +00369 if (strncmp(message,"R ",2)) +00370 { +00371 log(DEBUG,"Not a double reroute"); +00372 // this route is down, we must re-route the packet through an available point in the mesh. +00373 for (int k = 0; k < this->connectors.size(); k++) +00374 { +00375 log(DEBUG,"Check connector %d: %s",k,this->connectors[k].GetServerName().c_str()); +00376 // search for another point in the mesh which can 'reach' where we want to go +00377 for (int m = 0; m < this->connectors[k].routes.size(); m++) +00378 { +00379 if (!strcasecmp(this->connectors[k].routes[m].c_str(),sendhost)) +00380 { +00381 log(DEBUG,"Found alternative route for packet: %s",this->connectors[k].GetServerName().c_str()); +00382 char buffer[MAXBUF]; +00383 snprintf(buffer,MAXBUF,"R %s %s",sendhost,message); +00384 this->SendPacket(buffer,this->connectors[k].GetServerName().c_str()); +00385 return true; +00386 } +00387 } +00388 } +00389 } +00390 char buffer[MAXBUF]; +00391 snprintf(buffer,MAXBUF,"& %s",sendhost); +00392 WriteOpers("*** All connections to %s lost.",sendhost); +00393 NetSendToAllExcept(sendhost,buffer); +00394 DoSplit(sendhost); +00395 return false; +00396 } +00397 +00398 // returns false if the packet could not be sent (e.g. target host down) +00399 if (!cn->AddWriteBuf(message)) +00400 { +00401 // if we're here, there was an error pending, and the send cannot proceed +00402 log(DEBUG,"cn->AddWriteBuf() failed for serverrec::SendPacket(): %s",cn->GetWriteError().c_str()); +00403 log(DEBUG,"Disabling connector: %s",cn->GetServerName().c_str()); +00404 cn->CloseConnection(); +00405 cn->SetState(STATE_DISCONNECTED); +00406 WriteOpers("*** Lost single connection to %s, link inactive and retrying: %s",cn->GetServerName().c_str(),cn->GetWriteError().c_str()); +00407 // retry the packet along a new route so either arrival OR failure are gauranteed (bugfix) +00408 return this->SendPacket(message,sendhost); +00409 } +00410 if (!cn->FlushWriteBuf()) +00411 { +00412 // if we're here the write() caused an error, we cannot proceed +00413 log(DEBUG,"cn->FlushWriteBuf() failed for serverrec::SendPacket(): %s",cn->GetWriteError().c_str()); +00414 log(DEBUG,"Disabling connector: %s",cn->GetServerName().c_str()); +00415 cn->CloseConnection(); +00416 cn->SetState(STATE_DISCONNECTED); +00417 WriteOpers("*** Lost single connection to %s, link inactive and retrying: %s",cn->GetServerName().c_str(),cn->GetWriteError().c_str()); +00418 // retry the packet along a new route so either arrival OR failure are gauranteed +00419 return this->SendPacket(message,sendhost); +00420 } +00421 return true; +00422 } +00423 } +00424 +00425 bool already_have_sum(std::string sum) +00426 { +00427 for (int i = 0; i < xsums.size(); i++) +00428 { +00429 if (xsums[i] == sum) +00430 { +00431 return true; +00432 } +00433 } +00434 if (xsums.size() >= 128) +00435 { +00436 xsums.pop_front(); +00437 } +00438 xsums.push_back(sum); +00439 return false; +00440 } 00441 -00442 // check if theres any data on this socket -00443 // if not, continue onwards to the next. -00444 pollfd polls; -00445 polls.fd = this->connectors[i].GetDescriptor(); -00446 polls.events = POLLIN; -00447 int ret = poll(&polls,1,1); -00448 if (ret <= 0) continue; -00449 -00450 rcvsize = recv(this->connectors[i].GetDescriptor(),data,65000,0); -00451 data[rcvsize] = '\0'; -00452 if (rcvsize == -1) -00453 { -00454 if (errno != EAGAIN) -00455 { -00456 log(DEBUG,"recv() failed for serverrec::RecvPacket(): %s",strerror(errno)); -00457 log(DEBUG,"Disabling connector: %s",this->connectors[i].GetServerName().c_str()); -00458 this->connectors[i].CloseConnection(); -00459 this->connectors[i].SetState(STATE_DISCONNECTED); -00460 if (!IsRoutable(this->connectors[i].GetServerName())) -00461 { -00462 WriteOpers("*** Server %s is no longer routable, disconnecting.",this->connectors[i].GetServerName().c_str()); -00463 DoSplit(this->connectors[i].GetServerName().c_str()); -00464 } -00465 has_been_netsplit = true; -00466 } -00467 } -00468 int pushed = 0; -00469 if (rcvsize > 0) -00470 { -00471 if (!this->connectors[i].AddBuffer(data)) -00472 { -00473 WriteOpers("*** Read buffer for %s exceeds maximum, closing connection!",this->connectors[i].GetServerName().c_str()); -00474 this->connectors[i].CloseConnection(); -00475 this->connectors[i].SetState(STATE_DISCONNECTED); -00476 if (!IsRoutable(this->connectors[i].GetServerName())) -00477 { -00478 WriteOpers("*** Server %s is no longer routable, disconnecting.",this->connectors[i].GetServerName().c_str()); -00479 DoSplit(this->connectors[i].GetServerName().c_str()); -00480 } -00481 has_been_netsplit = true; -00482 } -00483 if (this->connectors[i].BufferIsComplete()) +00442 // receives a packet from any where there is data waiting, first come, first served +00443 // fills the message and host values with the host where the data came from. +00444 +00445 bool serverrec::RecvPacket(std::deque<std::string> &messages, char* recvhost,std::deque<std::string> &sums) +00446 { +00447 char data[65536],buffer[MAXBUF]; +00448 memset(data, 0, 65536); +00449 for (int i = 0; i < this->connectors.size(); i++) +00450 { +00451 if (this->connectors[i].GetState() != STATE_DISCONNECTED) +00452 { +00453 // returns false if the packet could not be sent (e.g. target host down) +00454 int rcvsize = 0; +00455 +00456 // check if theres any data on this socket +00457 // if not, continue onwards to the next. +00458 pollfd polls; +00459 polls.fd = this->connectors[i].GetDescriptor(); +00460 polls.events = POLLIN; +00461 int ret = poll(&polls,1,1); +00462 if (ret <= 0) continue; +00463 +00464 rcvsize = recv(this->connectors[i].GetDescriptor(),data,65000,0); +00465 data[rcvsize] = '\0'; +00466 if (rcvsize == 0) +00467 { +00468 log(DEBUG,"recv() failed for serverrec::RecvPacket(): EOF"); +00469 log(DEBUG,"Disabling connector: %s",this->connectors[i].GetServerName().c_str()); +00470 this->connectors[i].CloseConnection(); +00471 this->connectors[i].SetState(STATE_DISCONNECTED); +00472 if (!IsRoutable(this->connectors[i].GetServerName())) +00473 { +00474 WriteOpers("*** Server %s is no longer routable, disconnecting (EOF)",this->connectors[i].GetServerName().c_str()); +00475 snprintf(buffer,MAXBUF,"& %s",this->connectors[i].GetServerName().c_str()); +00476 NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer); +00477 DoSplit(this->connectors[i].GetServerName().c_str()); +00478 } +00479 has_been_netsplit = true; +00480 } +00481 if (rcvsize == -1) +00482 { +00483 if (errno != EAGAIN) 00484 { -00485 this->connectors[i].ResetPing(); -00486 while (this->connectors[i].BufferIsComplete()) -00487 { -00488 std::string text = this->connectors[i].GetBuffer(); -00489 if (text != "") -00490 { -00491 if ((text[0] == ':') && (text.find(" ") != std::string::npos)) -00492 { -00493 std::string orig = text; -00494 log(DEBUG,"Original: %s",text.c_str()); -00495 std::string sum = text.substr(1,text.find(" ")-1); -00496 text = text.substr(text.find(" ")+1,text.length()); -00497 std::string possible_token = text.substr(1,text.find(" ")-1); -00498 if (possible_token.length() > 1) -00499 { -00500 sums.push_back("*"); -00501 text = orig; -00502 log(DEBUG,"Non-mesh, non-tokenized string passed up the chain"); -00503 } -00504 else -00505 { -00506 log(DEBUG,"Packet sum: '%s'",sum.c_str()); -00507 if ((already_have_sum(sum)) && (sum != "*")) -00508 { -00509 // we don't accept dupes -00510 continue; -00511 } -00512 sums.push_back(sum.c_str()); -00513 } -00514 } -00515 else sums.push_back("*"); -00516 messages.push_back(text.c_str()); -00517 strlcpy(recvhost,this->connectors[i].GetServerName().c_str(),160); -00518 log(DEBUG,"serverrec::RecvPacket() %d:%s->%s",pushed++,recvhost,text.c_str()); -00519 } -00520 } -00521 return true; -00522 } -00523 } -00524 } -00525 } -00526 // nothing new yet -- message and host will be undefined -00527 return false; -00528 } -00529 -

    Generated on Wed May 25 22:02:05 2005 for InspIRCd by +00485 log(DEBUG,"recv() failed for serverrec::RecvPacket(): %s",strerror(errno)); +00486 log(DEBUG,"Disabling connector: %s",this->connectors[i].GetServerName().c_str()); +00487 this->connectors[i].CloseConnection(); +00488 this->connectors[i].SetState(STATE_DISCONNECTED); +00489 if (!IsRoutable(this->connectors[i].GetServerName())) +00490 { +00491 WriteOpers("*** Server %s is no longer routable, disconnecting.",this->connectors[i].GetServerName().c_str()); +00492 snprintf(buffer,MAXBUF,"& %s",this->connectors[i].GetServerName().c_str()); +00493 NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer); +00494 DoSplit(this->connectors[i].GetServerName().c_str()); +00495 } +00496 has_been_netsplit = true; +00497 } +00498 } +00499 int pushed = 0; +00500 if (rcvsize > 0) +00501 { +00502 if (!this->connectors[i].AddBuffer(data)) +00503 { +00504 WriteOpers("*** Read buffer for %s exceeds maximum, closing connection!",this->connectors[i].GetServerName().c_str()); +00505 this->connectors[i].CloseConnection(); +00506 this->connectors[i].SetState(STATE_DISCONNECTED); +00507 if (!IsRoutable(this->connectors[i].GetServerName())) +00508 { +00509 WriteOpers("*** Server %s is no longer routable, disconnecting.",this->connectors[i].GetServerName().c_str()); +00510 snprintf(buffer,MAXBUF,"& %s",this->connectors[i].GetServerName().c_str()); +00511 NetSendToAllExcept(this->connectors[i].GetServerName().c_str(),buffer); +00512 DoSplit(this->connectors[i].GetServerName().c_str()); +00513 } +00514 has_been_netsplit = true; +00515 } +00516 if (this->connectors[i].BufferIsComplete()) +00517 { +00518 this->connectors[i].ResetPing(); +00519 while (this->connectors[i].BufferIsComplete()) +00520 { +00521 std::string text = this->connectors[i].GetBuffer(); +00522 if (text != "") +00523 { +00524 if ((text[0] == ':') && (text.find(" ") != std::string::npos)) +00525 { +00526 std::string orig = text; +00527 log(DEBUG,"Original: %s",text.c_str()); +00528 std::string sum = text.substr(1,text.find(" ")-1); +00529 text = text.substr(text.find(" ")+1,text.length()); +00530 std::string possible_token = text.substr(1,text.find(" ")-1); +00531 if (possible_token.length() > 1) +00532 { +00533 sums.push_back("*"); +00534 text = orig; +00535 log(DEBUG,"Non-mesh, non-tokenized string passed up the chain"); +00536 } +00537 else +00538 { +00539 log(DEBUG,"Packet sum: '%s'",sum.c_str()); +00540 if ((already_have_sum(sum)) && (sum != "*")) +00541 { +00542 // we don't accept dupes +00543 continue; +00544 } +00545 sums.push_back(sum.c_str()); +00546 } +00547 } +00548 else sums.push_back("*"); +00549 messages.push_back(text.c_str()); +00550 strlcpy(recvhost,this->connectors[i].GetServerName().c_str(),160); +00551 log(DEBUG,"serverrec::RecvPacket() %d:%s->%s",pushed++,recvhost,text.c_str()); +00552 } +00553 } +00554 return true; +00555 } +00556 } +00557 } +00558 } +00559 // nothing new yet -- message and host will be undefined +00560 return false; +00561 } +00562 +

    Generated on Mon May 30 05:15:21 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 34ef6fb52..f13acac36 100644 --- a/docs/module-doc/servers_8cpp.html +++ b/docs/module-doc/servers_8cpp.html @@ -79,27 +79,27 @@ Include dependency graph for servers.cpp:

    411 of file servers.cpp. +Definition at line 425 of file servers.cpp.

    References xsums.

    -Referenced by serverrec::RecvPacket(). +Referenced by serverrec::RecvPacket().

    -

    00412 {
    -00413         for (int i = 0; i < xsums.size(); i++)
    -00414         {
    -00415                 if (xsums[i] == sum)
    -00416                 {
    -00417                         return true;
    -00418                 }
    -00419         }
    -00420         if (xsums.size() >= 128)
    -00421         {
    -00422                 xsums.pop_front();
    -00423         }
    -00424         xsums.push_back(sum);
    -00425         return false;
    -00426 }
    +
    00426 {
    +00427         for (int i = 0; i < xsums.size(); i++)
    +00428         {
    +00429                 if (xsums[i] == sum)
    +00430                 {
    +00431                         return true;
    +00432                 }
    +00433         }
    +00434         if (xsums.size() >= 128)
    +00435         {
    +00436                 xsums.pop_front();
    +00437         }
    +00438         xsums.push_back(sum);
    +00439         return false;
    +00440 }
     
    @@ -133,35 +133,25 @@ Referenced by serverrec::Re

    Definition at line 256 of file servers.cpp.

    -References serverrec::connectors, serverrec::FindHost(), ircd_connector::GetState(), me, and STATE_DISCONNECTED. +References serverrec::connectors, me, and STATE_DISCONNECTED.

    -Referenced by serverrec::FlushWriteBuffers(), and serverrec::RecvPacket(). +Referenced by serverrec::FlushWriteBuffers(), and serverrec::RecvPacket().

    00257 {
    -00258         for (int x = 0; x < 32; x++) if (me[x])
    -00259         {
    -00260                 ircd_connector* cn = me[x]->FindHost(servername.c_str());
    -00261                 if (cn)
    -00262                 {
    -00263                         if (cn->GetState() == STATE_DISCONNECTED)
    -00264                         {
    -00265                                 for (int k = 0; k < me[x]->connectors.size(); k++)
    -00266                                 {
    -00267                                         for (int m = 0; m < me[x]->connectors[k].routes.size(); m++)
    -00268                                         {
    -00269                                                 if (!strcasecmp(me[x]->connectors[k].routes[m].c_str(),servername.c_str()))
    -00270                                                 {
    -00271                                                         return true;
    -00272                                                 }
    -00273                                         }
    -00274                                 }
    -00275                                 return false;
    -00276                         }
    -00277                         else return true;
    -00278                 }
    -00279         }
    -00280         return false;
    -00281 }
    +00258         int c = 0;
    +00259         for (int x = 0; x < 32; x++)
    +00260         if (me[x])
    +00261         {
    +00262                 for (int i = 0; i < me[x]->connectors.size(); i++)
    +00263                 {
    +00264                         if ((me[x]->connectors[i].GetServerName() == servername) && (me[x]->connectors[i].GetState() != STATE_DISCONNECTED))
    +00265                         {
    +00266                                 c++;
    +00267                         }
    +00268                 }
    +00269         }
    +00270         return (c != 0);
    +00271 }
     
    @@ -189,7 +179,7 @@ Referenced by serverrec::Fl

    Definition at line 42 of file servers.cpp.

    -Referenced by serverrec::FlushWriteBuffers(), and serverrec::RecvPacket(). +Referenced by serverrec::FlushWriteBuffers(), and serverrec::RecvPacket().

    @@ -248,7 +238,7 @@ Definition at line 40 o -
    time_t TIME + time_t TIME
    @@ -289,10 +279,10 @@ Definition at line 37 o

    Definition at line 44 of file servers.cpp.

    -Referenced by already_have_sum(). +Referenced by already_have_sum(). -


    Generated on Wed May 25 22:02:38 2005 for InspIRCd by +
    Generated on Mon May 30 05:16:12 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/servers_8h-source.html b/docs/module-doc/servers_8h-source.html index 581826f44..fcd6e5a65 100644 --- a/docs/module-doc/servers_8h-source.html +++ b/docs/module-doc/servers_8h-source.html @@ -79,7 +79,7 @@ 00124 00125 #endif 00126 -

    Generated on Wed May 25 22:02:05 2005 for InspIRCd by +

    Generated on Mon May 30 05:15:21 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 f24199749..116bd61c4 100644 --- a/docs/module-doc/servers_8h.html +++ b/docs/module-doc/servers_8h.html @@ -86,7 +86,7 @@ Definition at line 25 of Definition at line 26 of file servers.h. -
    Generated on Wed May 25 22:02:39 2005 for InspIRCd by +
    Generated on Mon May 30 05:16:14 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 de88c9851..9465068a3 100644 --- a/docs/module-doc/structdns__ip4list-members.html +++ b/docs/module-doc/structdns__ip4list-members.html @@ -8,7 +8,7 @@

    dns_ip4list Member List

    This is the complete list of members for dns_ip4list, including all inherited members. -
    ipdns_ip4list
    nextdns_ip4list

    Generated on Wed May 25 22:02:57 2005 for InspIRCd by +
    Generated on Mon May 30 05:16:48 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 df67f051a..2a6f35905 100644 --- a/docs/module-doc/structdns__ip4list.html +++ b/docs/module-doc/structdns__ip4list.html @@ -67,7 +67,7 @@ Definition at line 28 of file
    The documentation for this struct was generated from the following file: -
    Generated on Wed May 25 22:02:57 2005 for InspIRCd by +
    Generated on Mon May 30 05:16:48 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/structirc_1_1InAddr__HashComp-members.html b/docs/module-doc/structirc_1_1InAddr__HashComp-members.html index 3a9644c7a..d40f6bf76 100644 --- a/docs/module-doc/structirc_1_1InAddr__HashComp-members.html +++ b/docs/module-doc/structirc_1_1InAddr__HashComp-members.html @@ -7,7 +7,7 @@

    irc::InAddr_HashComp Member List

    This is the complete list of members for irc::InAddr_HashComp, including all inherited members. -
    operator()(const in_addr &s1, const in_addr &s2) constirc::InAddr_HashComp

    Generated on Wed May 25 22:03:34 2005 for InspIRCd by +
    Generated on Mon May 30 05:17:49 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/structirc_1_1InAddr__HashComp.html b/docs/module-doc/structirc_1_1InAddr__HashComp.html index d60232d77..f288df35a 100644 --- a/docs/module-doc/structirc_1_1InAddr__HashComp.html +++ b/docs/module-doc/structirc_1_1InAddr__HashComp.html @@ -67,7 +67,7 @@ The operator () does the actual comparison in hash_map.
    The documentation for this struct was generated from the following file: -
    Generated on Wed May 25 22:03:34 2005 for InspIRCd by +
    Generated on Mon May 30 05:17:49 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/structirc_1_1StrHashComp-members.html b/docs/module-doc/structirc_1_1StrHashComp-members.html index cee147926..55f519ec1 100644 --- a/docs/module-doc/structirc_1_1StrHashComp-members.html +++ b/docs/module-doc/structirc_1_1StrHashComp-members.html @@ -7,7 +7,7 @@

    irc::StrHashComp Member List

    This is the complete list of members for irc::StrHashComp, including all inherited members. -
    operator()(const std::string &s1, const std::string &s2) constirc::StrHashComp

    Generated on Wed May 25 22:03:35 2005 for InspIRCd by +
    Generated on Mon May 30 05:17:50 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/structirc_1_1StrHashComp.html b/docs/module-doc/structirc_1_1StrHashComp.html index ca40b2195..f6bedcead 100644 --- a/docs/module-doc/structirc_1_1StrHashComp.html +++ b/docs/module-doc/structirc_1_1StrHashComp.html @@ -67,7 +67,7 @@ The operator () does the actual comparison in hash_map.
    The documentation for this struct was generated from the following file: -
    Generated on Wed May 25 22:03:35 2005 for InspIRCd by +
    Generated on Mon May 30 05:17:50 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 index abf038bf5..2d267f7c9 100644 --- a/docs/module-doc/structirc_1_1irc__char__traits-members.html +++ b/docs/module-doc/structirc_1_1irc__char__traits-members.html @@ -11,7 +11,7 @@ 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 Wed May 25 22:03:35 2005 for InspIRCd by +
    Generated on Mon May 30 05:17:50 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 index d3d3816bd..99c7ad995 100644 --- a/docs/module-doc/structirc_1_1irc__char__traits.html +++ b/docs/module-doc/structirc_1_1irc__char__traits.html @@ -259,7 +259,7 @@ Check if two chars do NOT match.
    The documentation for this struct was generated from the following file: -
    Generated on Wed May 25 22:03:35 2005 for InspIRCd by +
    Generated on Mon May 30 05:17:50 2005 for InspIRCd by doxygen 1.3.3
    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 a8ee41044..490602a5f 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 @@ -7,7 +7,7 @@

    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 >

    Generated on Wed May 25 22:03:35 2005 for InspIRCd by +
    Generated on Mon May 30 05:17:50 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 06ae258ac..40bf44d09 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 @@ -48,7 +48,7 @@
    The documentation for this struct was generated from the following file: -
    Generated on Wed May 25 22:03:35 2005 for InspIRCd by +
    Generated on Mon May 30 05:17:50 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 bfc86b822..9501b6c61 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 @@ -7,7 +7,7 @@

    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 >

    Generated on Wed May 25 22:03:35 2005 for InspIRCd by +
    Generated on Mon May 30 05:17:50 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 8f18e021c..b5995ec50 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 @@ -48,7 +48,7 @@
    The documentation for this struct was generated from the following file: -
    Generated on Wed May 25 22:03:35 2005 for InspIRCd by +
    Generated on Mon May 30 05:17:50 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/tree.html b/docs/module-doc/tree.html index 3eccb6439..cab4f4129 100644 --- a/docs/module-doc/tree.html +++ b/docs/module-doc/tree.html @@ -135,6 +135,7 @@

    o+Class Hierarchy

    +

    |o*BoolSet

    |o+char_traits

    ||\*irc::irc_char_traits

    diff --git a/docs/module-doc/users_8cpp-source.html b/docs/module-doc/users_8cpp-source.html index 05cc3cd9a..95ca9e0b8 100644 --- a/docs/module-doc/users_8cpp-source.html +++ b/docs/module-doc/users_8cpp-source.html @@ -32,32 +32,32 @@ 00025 #include "helperfuncs.h" 00026 00027 extern std::stringstream config_f; -00028 -00029 extern time_t TIME; -00030 -00031 userrec::userrec() -00032 { -00033 // the PROPER way to do it, AVOID bzero at *ALL* costs -00034 strcpy(nick,""); -00035 strcpy(ip,"127.0.0.1"); -00036 timeout = 0; -00037 strcpy(ident,""); -00038 strcpy(host,""); -00039 strcpy(dhost,""); -00040 strcpy(fullname,""); -00041 strcpy(modes,""); -00042 strcpy(server,""); -00043 strcpy(awaymsg,""); -00044 strcpy(oper,""); -00045 reset_due = TIME; -00046 lines_in = 0; -00047 fd = lastping = signon = idle_lastmsg = nping = registered = 0; -00048 flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0; -00049 haspassed = false; -00050 dns_done = false; -00051 recvq = ""; -00052 sendq = ""; -00053 strcpy(result,""); +00028 extern char ServerName[MAXBUF]; +00029 +00030 extern time_t TIME; +00031 +00032 userrec::userrec() +00033 { +00034 // the PROPER way to do it, AVOID bzero at *ALL* costs +00035 strcpy(nick,""); +00036 strcpy(ip,"127.0.0.1"); +00037 timeout = 0; +00038 strcpy(ident,""); +00039 strcpy(host,""); +00040 strcpy(dhost,""); +00041 strcpy(fullname,""); +00042 strcpy(modes,""); +00043 server = (char*)FindServerNamePtr(ServerName); +00044 strcpy(awaymsg,""); +00045 strcpy(oper,""); +00046 reset_due = TIME; +00047 lines_in = 0; +00048 fd = lastping = signon = idle_lastmsg = nping = registered = 0; +00049 flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0; +00050 haspassed = false; +00051 dns_done = false; +00052 recvq = ""; +00053 sendq = ""; 00054 for (int i = 0; i < MAXCHANS; i++) 00055 { 00056 this->chans[i].channel = NULL; @@ -74,233 +74,235 @@ 00067 00068 char* userrec::GetFullHost() 00069 { -00070 snprintf(result,MAXBUF,"%s!%s@%s",nick,ident,dhost); -00071 return result; -00072 } -00073 -00074 int userrec::ReadData(void* buffer, size_t size) -00075 { -00076 if (this->fd > -1) -00077 { -00078 return read(this->fd, buffer, size); -00079 } -00080 else return 0; -00081 } -00082 +00070 static char result[MAXBUF]; +00071 snprintf(result,MAXBUF,"%s!%s@%s",nick,ident,dhost); +00072 return result; +00073 } +00074 +00075 int userrec::ReadData(void* buffer, size_t size) +00076 { +00077 if (this->fd > -1) +00078 { +00079 return read(this->fd, buffer, size); +00080 } +00081 else return 0; +00082 } 00083 -00084 char* userrec::GetFullRealHost() -00085 { -00086 snprintf(result,MAXBUF,"%s!%s@%s",nick,ident,host); -00087 return result; -00088 } -00089 -00090 bool userrec::IsInvited(char* channel) -00091 { -00092 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) -00093 { -00094 if (i->channel) { -00095 if (!strcasecmp(i->channel,channel)) -00096 { -00097 return true; -00098 } -00099 } -00100 } -00101 return false; -00102 } -00103 -00104 InvitedList* userrec::GetInviteList() -00105 { -00106 return &invites; -00107 } -00108 -00109 void userrec::InviteTo(char* channel) -00110 { -00111 Invited i; -00112 strlcpy(i.channel,channel,CHANMAX); -00113 invites.push_back(i); -00114 } -00115 -00116 void userrec::RemoveInvite(char* channel) -00117 { -00118 log(DEBUG,"Removing invites"); -00119 if (channel) -00120 { -00121 if (invites.size()) -00122 { -00123 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) -00124 { -00125 if (i->channel) -00126 { -00127 if (!strcasecmp(i->channel,channel)) -00128 { -00129 invites.erase(i); -00130 return; -00131 } -00132 } -00133 } -00134 } -00135 } -00136 } -00137 -00138 bool userrec::HasPermission(char* command) -00139 { -00140 char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF]; -00141 char* mycmd; -00142 char* savept; -00143 char* savept2; -00144 -00145 // are they even an oper at all? -00146 if (strchr(this->modes,'o')) -00147 { -00148 log(DEBUG,"*** HasPermission: %s is an oper",this->nick); -00149 for (int j =0; j < ConfValueEnum("type",&config_f); j++) -00150 { -00151 ConfValue("type","name",j,TypeName,&config_f); -00152 if (!strcmp(TypeName,this->oper)) -00153 { -00154 log(DEBUG,"*** HasPermission: %s is an oper of type '%s'",this->nick,this->oper); -00155 ConfValue("type","classes",j,Classes,&config_f); -00156 char* myclass = strtok_r(Classes," ",&savept); -00157 while (myclass) -00158 { -00159 log(DEBUG,"*** HasPermission: checking classtype '%s'",myclass); -00160 for (int k =0; k < ConfValueEnum("class",&config_f); k++) -00161 { -00162 ConfValue("class","name",k,ClassName,&config_f); -00163 if (!strcmp(ClassName,myclass)) -00164 { -00165 ConfValue("class","commands",k,CommandList,&config_f); -00166 log(DEBUG,"*** HasPermission: found class named %s with commands: '%s'",ClassName,CommandList); -00167 -00168 -00169 mycmd = strtok_r(CommandList," ",&savept2); -00170 while (mycmd) -00171 { -00172 if (!strcasecmp(mycmd,command)) -00173 { -00174 log(DEBUG,"*** Command %s found, returning true",command); -00175 return true; -00176 } -00177 mycmd = strtok_r(NULL," ",&savept2); -00178 } -00179 } -00180 } -00181 myclass = strtok_r(NULL," ",&savept); -00182 } -00183 } -00184 } -00185 } -00186 return false; -00187 } -00188 -00189 -00190 bool userrec::AddBuffer(std::string a) -00191 { -00192 std::string b = ""; -00193 for (int i = 0; i < a.length(); i++) -00194 if ((a[i] != '\r') && (a[i] != '\0') && (a[i] != 7)) -00195 b = b + a[i]; -00196 std::stringstream stream(recvq); -00197 stream << b; -00198 recvq = stream.str(); -00199 int i = 0; -00200 // count the size of the first line in the buffer. -00201 while (i < recvq.length()) -00202 { -00203 if (recvq[i++] == '\n') -00204 break; -00205 } -00206 if (recvq.length() > this->recvqmax) -00207 { -00208 this->SetWriteError("RecvQ exceeded"); -00209 WriteOpers("*** User %s RecvQ of %d exceeds connect class maximum of %d",this->nick,recvq.length(),this->recvqmax); -00210 } -00211 // return false if we've had more than 600 characters WITHOUT -00212 // a carriage return (this is BAD, drop the socket) -00213 return (i < 600); -00214 } -00215 -00216 bool userrec::BufferIsReady() -00217 { -00218 for (int i = 0; i < recvq.length(); i++) -00219 if (recvq[i] == '\n') -00220 return true; -00221 return false; -00222 } -00223 -00224 void userrec::ClearBuffer() -00225 { -00226 recvq = ""; -00227 } -00228 -00229 std::string userrec::GetBuffer() -00230 { -00231 if (recvq == "") -00232 return ""; -00233 char* line = (char*)recvq.c_str(); -00234 std::string ret = ""; -00235 while ((*line != '\n') && (strlen(line))) -00236 { -00237 ret = ret + *line; -00238 line++; -00239 } -00240 if ((*line == '\n') || (*line == '\r')) -00241 line++; -00242 recvq = line; -00243 return ret; -00244 } -00245 -00246 void userrec::AddWriteBuf(std::string data) -00247 { -00248 if (this->GetWriteError() != "") -00249 return; -00250 if (sendq.length() + data.length() > this->sendqmax) -00251 { -00252 WriteOpers("*** User %s SendQ of %d exceeds connect class maximum of %d",this->nick,sendq.length() + data.length(),this->sendqmax); -00253 this->SetWriteError("SendQ exceeded"); -00254 return; -00255 } -00256 std::stringstream stream; -00257 stream << sendq << data; -00258 sendq = stream.str(); -00259 } -00260 -00261 // send AS MUCH OF THE USERS SENDQ as we are able to (might not be all of it) -00262 void userrec::FlushWriteBuf() -00263 { -00264 if (sendq.length()) -00265 { -00266 char* tb = (char*)this->sendq.c_str(); -00267 int n_sent = write(this->fd,tb,this->sendq.length()); -00268 if (n_sent == -1) -00269 { -00270 this->SetWriteError(strerror(errno)); -00271 } -00272 else -00273 { -00274 // advance the queue -00275 tb += n_sent; -00276 this->sendq = tb; -00277 // update the user's stats counters -00278 this->bytes_out += n_sent; -00279 this->cmds_out++; -00280 } -00281 } -00282 } -00283 -00284 void userrec::SetWriteError(std::string error) -00285 { -00286 log(DEBUG,"Setting error string for %s to '%s'",this->nick,error.c_str()); -00287 // don't try to set the error twice, its already set take the first string. -00288 if (this->WriteError == "") -00289 this->WriteError = error; -00290 } -00291 -00292 std::string userrec::GetWriteError() -00293 { -00294 return this->WriteError; -00295 } -

    Generated on Wed May 25 22:02:06 2005 for InspIRCd by +00084 +00085 char* userrec::GetFullRealHost() +00086 { +00087 static char fresult[MAXBUF]; +00088 snprintf(fresult,MAXBUF,"%s!%s@%s",nick,ident,host); +00089 return fresult; +00090 } +00091 +00092 bool userrec::IsInvited(char* channel) +00093 { +00094 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) +00095 { +00096 if (i->channel) { +00097 if (!strcasecmp(i->channel,channel)) +00098 { +00099 return true; +00100 } +00101 } +00102 } +00103 return false; +00104 } +00105 +00106 InvitedList* userrec::GetInviteList() +00107 { +00108 return &invites; +00109 } +00110 +00111 void userrec::InviteTo(char* channel) +00112 { +00113 Invited i; +00114 strlcpy(i.channel,channel,CHANMAX); +00115 invites.push_back(i); +00116 } +00117 +00118 void userrec::RemoveInvite(char* channel) +00119 { +00120 log(DEBUG,"Removing invites"); +00121 if (channel) +00122 { +00123 if (invites.size()) +00124 { +00125 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) +00126 { +00127 if (i->channel) +00128 { +00129 if (!strcasecmp(i->channel,channel)) +00130 { +00131 invites.erase(i); +00132 return; +00133 } +00134 } +00135 } +00136 } +00137 } +00138 } +00139 +00140 bool userrec::HasPermission(char* command) +00141 { +00142 char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF]; +00143 char* mycmd; +00144 char* savept; +00145 char* savept2; +00146 +00147 // are they even an oper at all? +00148 if (strchr(this->modes,'o')) +00149 { +00150 log(DEBUG,"*** HasPermission: %s is an oper",this->nick); +00151 for (int j =0; j < ConfValueEnum("type",&config_f); j++) +00152 { +00153 ConfValue("type","name",j,TypeName,&config_f); +00154 if (!strcmp(TypeName,this->oper)) +00155 { +00156 log(DEBUG,"*** HasPermission: %s is an oper of type '%s'",this->nick,this->oper); +00157 ConfValue("type","classes",j,Classes,&config_f); +00158 char* myclass = strtok_r(Classes," ",&savept); +00159 while (myclass) +00160 { +00161 log(DEBUG,"*** HasPermission: checking classtype '%s'",myclass); +00162 for (int k =0; k < ConfValueEnum("class",&config_f); k++) +00163 { +00164 ConfValue("class","name",k,ClassName,&config_f); +00165 if (!strcmp(ClassName,myclass)) +00166 { +00167 ConfValue("class","commands",k,CommandList,&config_f); +00168 log(DEBUG,"*** HasPermission: found class named %s with commands: '%s'",ClassName,CommandList); +00169 +00170 +00171 mycmd = strtok_r(CommandList," ",&savept2); +00172 while (mycmd) +00173 { +00174 if (!strcasecmp(mycmd,command)) +00175 { +00176 log(DEBUG,"*** Command %s found, returning true",command); +00177 return true; +00178 } +00179 mycmd = strtok_r(NULL," ",&savept2); +00180 } +00181 } +00182 } +00183 myclass = strtok_r(NULL," ",&savept); +00184 } +00185 } +00186 } +00187 } +00188 return false; +00189 } +00190 +00191 +00192 bool userrec::AddBuffer(std::string a) +00193 { +00194 std::string b = ""; +00195 for (int i = 0; i < a.length(); i++) +00196 if ((a[i] != '\r') && (a[i] != '\0') && (a[i] != 7)) +00197 b = b + a[i]; +00198 std::stringstream stream(recvq); +00199 stream << b; +00200 recvq = stream.str(); +00201 int i = 0; +00202 // count the size of the first line in the buffer. +00203 while (i < recvq.length()) +00204 { +00205 if (recvq[i++] == '\n') +00206 break; +00207 } +00208 if (recvq.length() > this->recvqmax) +00209 { +00210 this->SetWriteError("RecvQ exceeded"); +00211 WriteOpers("*** User %s RecvQ of %d exceeds connect class maximum of %d",this->nick,recvq.length(),this->recvqmax); +00212 } +00213 // return false if we've had more than 600 characters WITHOUT +00214 // a carriage return (this is BAD, drop the socket) +00215 return (i < 600); +00216 } +00217 +00218 bool userrec::BufferIsReady() +00219 { +00220 for (int i = 0; i < recvq.length(); i++) +00221 if (recvq[i] == '\n') +00222 return true; +00223 return false; +00224 } +00225 +00226 void userrec::ClearBuffer() +00227 { +00228 recvq = ""; +00229 } +00230 +00231 std::string userrec::GetBuffer() +00232 { +00233 if (recvq == "") +00234 return ""; +00235 char* line = (char*)recvq.c_str(); +00236 std::string ret = ""; +00237 while ((*line != '\n') && (strlen(line))) +00238 { +00239 ret = ret + *line; +00240 line++; +00241 } +00242 if ((*line == '\n') || (*line == '\r')) +00243 line++; +00244 recvq = line; +00245 return ret; +00246 } +00247 +00248 void userrec::AddWriteBuf(std::string data) +00249 { +00250 if (this->GetWriteError() != "") +00251 return; +00252 if (sendq.length() + data.length() > this->sendqmax) +00253 { +00254 WriteOpers("*** User %s SendQ of %d exceeds connect class maximum of %d",this->nick,sendq.length() + data.length(),this->sendqmax); +00255 this->SetWriteError("SendQ exceeded"); +00256 return; +00257 } +00258 std::stringstream stream; +00259 stream << sendq << data; +00260 sendq = stream.str(); +00261 } +00262 +00263 // send AS MUCH OF THE USERS SENDQ as we are able to (might not be all of it) +00264 void userrec::FlushWriteBuf() +00265 { +00266 if (sendq.length()) +00267 { +00268 char* tb = (char*)this->sendq.c_str(); +00269 int n_sent = write(this->fd,tb,this->sendq.length()); +00270 if (n_sent == -1) +00271 { +00272 this->SetWriteError(strerror(errno)); +00273 } +00274 else +00275 { +00276 // advance the queue +00277 tb += n_sent; +00278 this->sendq = tb; +00279 // update the user's stats counters +00280 this->bytes_out += n_sent; +00281 this->cmds_out++; +00282 } +00283 } +00284 } +00285 +00286 void userrec::SetWriteError(std::string error) +00287 { +00288 log(DEBUG,"Setting error string for %s to '%s'",this->nick,error.c_str()); +00289 // don't try to set the error twice, its already set take the first string. +00290 if (this->WriteError == "") +00291 this->WriteError = error; +00292 } +00293 +00294 std::string userrec::GetWriteError() +00295 { +00296 return this->WriteError; +00297 } +

    Generated on Mon May 30 05:15:21 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 a1d24c7be..d2d1039ad 100644 --- a/docs/module-doc/users_8cpp.html +++ b/docs/module-doc/users_8cpp.html @@ -26,7 +26,9 @@ Include dependency graph for users.cpp:

    std::stringstream config_f -time_t TIME +char ServerName [MAXBUF] + +time_t TIME

    Variable Documentation

    @@ -54,13 +56,37 @@ Include dependency graph for users.cpp:

    27 of file users.cpp. -

    +

    + + + + +
    + + +
    char ServerName[MAXBUF] +
    +
    + + + + + +
    +   + + +

    + +

    +Definition at line 28 of file users.cpp.

    +

    @@ -75,10 +101,10 @@ Definition at line 27 of

    -Definition at line 29 of file users.cpp. +Definition at line 30 of file users.cpp.

    -
    time_t TIME + time_t TIME
    -


    Generated on Wed May 25 22:02:40 2005 for InspIRCd by +
    Generated on Mon May 30 05:16:16 2005 for InspIRCd by doxygen 1.3.3
    diff --git a/docs/module-doc/users_8h-source.html b/docs/module-doc/users_8h-source.html index 494ce7d37..b07c91293 100644 --- a/docs/module-doc/users_8h-source.html +++ b/docs/module-doc/users_8h-source.html @@ -89,103 +89,101 @@ 00116 00121 char nick[NICKMAX]; 00122 -00125 char ident[16]; -00126 -00130 char dhost[160]; -00131 -00134 char fullname[128]; -00135 -00140 char modes[MAXBUF]; -00141 -00142 ucrec chans[MAXCHANS]; -00143 -00146 char server[256]; +00126 char ident[IDENTMAX+2]; +00127 +00131 char dhost[160]; +00132 +00135 char fullname[MAXGECOS+1]; +00136 +00144 char modes[54]; +00145 +00146 ucrec chans[MAXCHANS]; 00147 -00151 char awaymsg[512]; -00152 -00156 char result[256]; -00157 -00162 int flood; -00163 -00168 unsigned int timeout; -00169 -00175 char oper[NICKMAX]; -00176 -00179 bool dns_done; -00180 -00183 unsigned int pingmax; -00184 -00189 char password[MAXBUF]; -00190 -00195 std::string recvq; -00196 -00200 std::string sendq; -00201 -00204 int lines_in; -00205 time_t reset_due; -00206 long threshold; -00207 -00208 /* Write error string -00209 */ -00210 std::string WriteError; -00211 -00214 long sendqmax; -00215 -00218 long recvqmax; -00219 -00220 userrec(); -00221 -00222 virtual ~userrec() { } -00223 -00228 virtual char* GetFullHost(); -00229 -00235 virtual char* GetFullRealHost(); -00236 -00239 virtual bool IsInvited(char* channel); -00240 -00243 virtual void InviteTo(char* channel); -00244 -00249 virtual void RemoveInvite(char* channel); -00250 -00255 bool HasPermission(char* command); -00256 -00259 int ReadData(void* buffer, size_t size); -00260 -00268 bool AddBuffer(std::string a); -00269 -00273 bool BufferIsReady(); -00274 -00277 void ClearBuffer(); -00278 -00286 std::string GetBuffer(); -00287 -00293 void SetWriteError(std::string error); -00294 -00298 std::string GetWriteError(); -00299 -00305 void AddWriteBuf(std::string data); -00306 -00313 void FlushWriteBuf(); -00314 -00317 InvitedList* GetInviteList(); -00318 -00321 void CloseSocket(); -00322 }; -00323 -00326 class WhoWasUser -00327 { -00328 public: -00329 char nick[NICKMAX]; -00330 char ident[16]; -00331 char dhost[160]; -00332 char host[160]; -00333 char fullname[128]; -00334 char server[256]; -00335 time_t signon; -00336 }; -00337 -00338 #endif -

    Generated on Wed May 25 22:02:06 2005 for InspIRCd by +00150 char* server; +00151 +00155 char awaymsg[MAXAWAY+1]; +00156 +00161 int flood; +00162 +00167 unsigned int timeout; +00168 +00174 char oper[NICKMAX]; +00175 +00178 bool dns_done; +00179 +00182 unsigned int pingmax; +00183 +00188 char password[MAXBUF]; +00189 +00194 std::string recvq; +00195 +00199 std::string sendq; +00200 +00203 int lines_in; +00204 time_t reset_due; +00205 long threshold; +00206 +00207 /* Write error string +00208 */ +00209 std::string WriteError; +00210 +00213 long sendqmax; +00214 +00217 long recvqmax; +00218 +00219 userrec(); +00220 +00221 virtual ~userrec() { } +00222 +00227 virtual char* GetFullHost(); +00228 +00234 virtual char* GetFullRealHost(); +00235 +00238 virtual bool IsInvited(char* channel); +00239 +00242 virtual void InviteTo(char* channel); +00243 +00248 virtual void RemoveInvite(char* channel); +00249 +00254 bool HasPermission(char* command); +00255 +00258 int ReadData(void* buffer, size_t size); +00259 +00267 bool AddBuffer(std::string a); +00268 +00272 bool BufferIsReady(); +00273 +00276 void ClearBuffer(); +00277 +00285 std::string GetBuffer(); +00286 +00292 void SetWriteError(std::string error); +00293 +00297 std::string GetWriteError(); +00298 +00304 void AddWriteBuf(std::string data); +00305 +00312 void FlushWriteBuf(); +00313 +00316 InvitedList* GetInviteList(); +00317 +00320 void CloseSocket(); +00321 }; +00322 +00325 class WhoWasUser +00326 { +00327 public: +00328 char nick[NICKMAX]; +00329 char ident[IDENTMAX+1]; +00330 char dhost[160]; +00331 char host[160]; +00332 char fullname[MAXGECOS+1]; +00333 char server[256]; +00334 time_t signon; +00335 }; +00336 +00337 #endif +

    Generated on Mon May 30 05:15:21 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 907498601..5170f4fbb 100644 --- a/docs/module-doc/users_8h.html +++ b/docs/module-doc/users_8h.html @@ -264,10 +264,10 @@ 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.

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


    Generated on Wed May 25 22:02:42 2005 for InspIRCd by +
    Generated on Mon May 30 05:16:19 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 aa5a71685..1c81a5aed 100644 --- a/docs/module-doc/xline_8h-source.html +++ b/docs/module-doc/xline_8h-source.html @@ -123,7 +123,7 @@ 00157 void sync_xlines(serverrec* serv, char* tcp_host); 00158 00159 #endif -

    Generated on Wed May 25 22:02:06 2005 for InspIRCd by +

    Generated on Mon May 30 05:15:21 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 0ae55d2ab..30ed335e5 100644 --- a/docs/module-doc/xline_8h.html +++ b/docs/module-doc/xline_8h.html @@ -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 Wed May 25 22:02:44 2005 for InspIRCd by +
    Generated on Mon May 30 05:16:22 2005 for InspIRCd by doxygen 1.3.3
    -- cgit v1.2.3