From bab9f4b4bc0f6aa0e1377745fd216ef9874b3f27 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 9 Dec 2005 20:21:39 +0000 Subject: Added new module docs git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2301 e03df62e-2008-0410-955e-edbf42e46eb7 --- docs/man/man3/Admin.3 | 10 +- docs/man/man3/BanItem.3 | 2 +- docs/man/man3/BoolSet.3 | 6 +- docs/man/man3/ConfigReader.3 | 276 +- docs/man/man3/ConnectClass.3 | 44 +- docs/man/man3/DNS.3 | 27 +- docs/man/man3/ELine.3 | 2 +- docs/man/man3/Event.3 | 10 +- docs/man/man3/ExemptItem.3 | 2 +- docs/man/man3/ExtMode.3 | 2 +- docs/man/man3/Extensible.3 | 25 +- docs/man/man3/FileReader.3 | 84 +- docs/man/man3/GLine.3 | 2 +- docs/man/man3/HostItem.3 | 2 +- docs/man/man3/InspSocket.3 | 424 +-- docs/man/man3/InviteItem.3 | 2 +- docs/man/man3/Invited.3 | 6 +- docs/man/man3/KLine.3 | 2 +- docs/man/man3/ModeParameter.3 | 2 +- docs/man/man3/Module.3 | 1583 +++++++++-- docs/man/man3/ModuleFactory.3 | 16 +- docs/man/man3/ModuleMessage.3 | 8 +- docs/man/man3/QLine.3 | 2 +- docs/man/man3/Request.3 | 10 +- docs/man/man3/Server.3 | 773 +++--- docs/man/man3/Version.3 | 14 +- docs/man/man3/WhoWasUser.3 | 18 +- docs/man/man3/XLine.3 | 2 +- docs/man/man3/ZLine.3 | 2 +- docs/man/man3/_home_.3 | 2 +- docs/man/man3/_home_brain_.3 | 2 +- docs/man/man3/_home_brain_inspircd-cvs_.3 | 2 +- docs/man/man3/_home_brain_inspircd-cvs_inspircd_.3 | 2 +- .../_home_brain_inspircd-cvs_inspircd_include_.3 | 2 +- .../man3/_home_brain_inspircd-cvs_inspircd_src_.3 | 2 +- docs/man/man3/base.h.3 | 6 +- docs/man/man3/channels.cpp.3 | 4 +- docs/man/man3/channels.h.3 | 2 +- docs/man/man3/chanrec.3 | 2 +- docs/man/man3/classbase.3 | 14 +- docs/man/man3/command_t.3 | 2 +- docs/man/man3/commands.h.3 | 9 +- 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/message.h.3 | 2 +- docs/man/man3/mode.h.3 | 2 +- docs/man/man3/modules.cpp.3 | 4 +- docs/man/man3/modules.h.3 | 64 +- docs/man/man3/nspace.3 | 2 +- docs/man/man3/nspace_hash_ in_addr _.3 | 2 +- docs/man/man3/nspace_hash_ string _.3 | 2 +- docs/man/man3/socket.cpp.3 | 2 +- docs/man/man3/socket.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 | 561 ++-- docs/man/man3/users.cpp.3 | 4 +- docs/man/man3/users.h.3 | 18 +- docs/man/man3/xline.h.3 | 7 +- docs/module-doc/annotated.html | 2 +- docs/module-doc/base_8h-source.html | 115 +- docs/module-doc/base_8h.html | 29 +- docs/module-doc/base_8h__dep__incl.gif | Bin 8561 -> 9094 bytes docs/module-doc/base_8h__dep__incl.map | 24 +- docs/module-doc/base_8h__dep__incl.md5 | 2 +- docs/module-doc/base_8h__incl.gif | Bin 1795 -> 2133 bytes docs/module-doc/base_8h__incl.md5 | 2 +- docs/module-doc/channels_8cpp-source.html | 2 +- docs/module-doc/channels_8cpp.html | 18 +- docs/module-doc/channels_8cpp__incl.md5 | 2 +- docs/module-doc/channels_8h-source.html | 2 +- docs/module-doc/channels_8h.html | 18 +- docs/module-doc/channels_8h__dep__incl.gif | Bin 5188 -> 5660 bytes docs/module-doc/channels_8h__dep__incl.map | 16 +- docs/module-doc/channels_8h__dep__incl.md5 | 2 +- docs/module-doc/channels_8h__incl.gif | Bin 2912 -> 3207 bytes docs/module-doc/channels_8h__incl.md5 | 2 +- docs/module-doc/classAdmin-members.html | 2 +- docs/module-doc/classAdmin.html | 10 +- docs/module-doc/classBanItem-members.html | 2 +- docs/module-doc/classBanItem.html | 2 +- docs/module-doc/classBoolSet-members.html | 2 +- docs/module-doc/classBoolSet.html | 6 +- docs/module-doc/classConfigReader-members.html | 2 +- docs/module-doc/classConfigReader.html | 292 +- docs/module-doc/classConnectClass-members.html | 2 +- docs/module-doc/classConnectClass.html | 62 +- docs/module-doc/classDNS-members.html | 6 +- docs/module-doc/classDNS.html | 74 +- docs/module-doc/classDNS__coll__graph.gif | Bin 1691 -> 2216 bytes docs/module-doc/classDNS__coll__graph.md5 | 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 | 18 +- 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 | 2 +- docs/module-doc/classExtensible-members.html | 3 +- docs/module-doc/classExtensible.html | 45 +- docs/module-doc/classFileReader-members.html | 2 +- docs/module-doc/classFileReader.html | 84 +- 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/classInspSocket-members.html | 8 +- docs/module-doc/classInspSocket.html | 505 ++-- docs/module-doc/classInspSocket__coll__graph.gif | Bin 6744 -> 6814 bytes docs/module-doc/classInspSocket__coll__graph.md5 | 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 | 8 +- 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 | 42 +- docs/module-doc/classModule.html | 2874 ++++++++++++++++---- docs/module-doc/classModuleFactory-members.html | 4 +- docs/module-doc/classModuleFactory.html | 17 +- docs/module-doc/classModuleMessage-members.html | 2 +- docs/module-doc/classModuleMessage.html | 6 +- 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 | 18 +- docs/module-doc/classServer-members.html | 4 +- docs/module-doc/classServer.html | 793 +++--- docs/module-doc/classVersion-members.html | 2 +- docs/module-doc/classVersion.html | 14 +- docs/module-doc/classWhoWasUser-members.html | 2 +- docs/module-doc/classWhoWasUser.html | 18 +- 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 | 3 +- docs/module-doc/classchanrec.html | 12 +- docs/module-doc/classclassbase-members.html | 2 +- docs/module-doc/classclassbase.html | 14 +- docs/module-doc/classcommand__t-members.html | 3 +- docs/module-doc/classcommand__t.html | 2 +- docs/module-doc/classconnection-members.html | 3 +- docs/module-doc/classconnection.html | 30 +- docs/module-doc/classes.html | 2 +- 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 | 5 +- docs/module-doc/classuserrec.html | 613 ++--- docs/module-doc/commands_8h-source.html | 6 +- docs/module-doc/commands_8h.html | 66 +- docs/module-doc/commands_8h__dep__incl.gif | Bin 808 -> 1171 bytes docs/module-doc/commands_8h__dep__incl.map | 3 +- docs/module-doc/commands_8h__dep__incl.md5 | 2 +- docs/module-doc/commands_8h__incl.md5 | 2 +- docs/module-doc/connection_8h-source.html | 2 +- docs/module-doc/connection_8h.html | 18 +- docs/module-doc/connection_8h__dep__incl.gif | Bin 4540 -> 4779 bytes docs/module-doc/connection_8h__dep__incl.map | 16 +- docs/module-doc/connection_8h__dep__incl.md5 | 2 +- docs/module-doc/connection_8h__incl.gif | Bin 8137 -> 8400 bytes docs/module-doc/connection_8h__incl.md5 | 2 +- docs/module-doc/ctables_8h-source.html | 2 +- docs/module-doc/ctables_8h.html | 2 +- docs/module-doc/ctables_8h__incl.gif | Bin 2535 -> 2930 bytes docs/module-doc/ctables_8h__incl.md5 | 2 +- docs/module-doc/dir_000000.html | 2 +- docs/module-doc/dir_000001.html | 2 +- docs/module-doc/dir_000002.html | 2 +- docs/module-doc/dir_000003.html | 4 +- docs/module-doc/dir_000003_dep.gif | Bin 2115 -> 2121 bytes docs/module-doc/dir_000003_dep.map | 2 +- docs/module-doc/dir_000004.html | 2 +- docs/module-doc/dir_000005.html | 4 +- docs/module-doc/dir_000005_000004.html | 2 +- docs/module-doc/dir_000005_dep.gif | Bin 1343 -> 1347 bytes docs/module-doc/dir_000005_dep.map | 2 +- docs/module-doc/dirs.html | 2 +- docs/module-doc/dns_8h-source.html | 62 +- docs/module-doc/dns_8h.html | 2 +- docs/module-doc/files.html | 2 +- docs/module-doc/functions.html | 2 +- docs/module-doc/functions_0x62.html | 2 +- docs/module-doc/functions_0x63.html | 4 +- docs/module-doc/functions_0x64.html | 2 +- docs/module-doc/functions_0x65.html | 2 +- docs/module-doc/functions_0x66.html | 4 +- docs/module-doc/functions_0x67.html | 11 +- docs/module-doc/functions_0x68.html | 2 +- docs/module-doc/functions_0x69.html | 10 +- docs/module-doc/functions_0x6a.html | 2 +- docs/module-doc/functions_0x6b.html | 2 +- docs/module-doc/functions_0x6c.html | 5 +- docs/module-doc/functions_0x6d.html | 7 +- docs/module-doc/functions_0x6e.html | 2 +- docs/module-doc/functions_0x6f.html | 64 +- docs/module-doc/functions_0x70.html | 6 +- docs/module-doc/functions_0x71.html | 2 +- docs/module-doc/functions_0x72.html | 5 +- docs/module-doc/functions_0x73.html | 2 +- docs/module-doc/functions_0x74.html | 2 +- docs/module-doc/functions_0x75.html | 2 +- docs/module-doc/functions_0x76.html | 2 +- docs/module-doc/functions_0x77.html | 2 +- docs/module-doc/functions_0x7e.html | 2 +- docs/module-doc/functions_func.html | 2 +- docs/module-doc/functions_func_0x62.html | 2 +- docs/module-doc/functions_func_0x63.html | 4 +- docs/module-doc/functions_func_0x64.html | 2 +- docs/module-doc/functions_func_0x65.html | 2 +- docs/module-doc/functions_func_0x66.html | 2 +- docs/module-doc/functions_func_0x67.html | 11 +- docs/module-doc/functions_func_0x68.html | 2 +- docs/module-doc/functions_func_0x69.html | 5 +- docs/module-doc/functions_func_0x6a.html | 2 +- docs/module-doc/functions_func_0x6c.html | 2 +- docs/module-doc/functions_func_0x6d.html | 4 +- docs/module-doc/functions_func_0x6e.html | 2 +- docs/module-doc/functions_func_0x6f.html | 64 +- docs/module-doc/functions_func_0x70.html | 6 +- docs/module-doc/functions_func_0x71.html | 2 +- docs/module-doc/functions_func_0x72.html | 5 +- docs/module-doc/functions_func_0x73.html | 2 +- docs/module-doc/functions_func_0x75.html | 2 +- docs/module-doc/functions_func_0x76.html | 2 +- docs/module-doc/functions_func_0x77.html | 2 +- docs/module-doc/functions_func_0x7e.html | 2 +- docs/module-doc/functions_vars.html | 15 +- docs/module-doc/globals.html | 2 +- docs/module-doc/globals_0x62.html | 2 +- docs/module-doc/globals_0x63.html | 2 +- docs/module-doc/globals_0x64.html | 5 +- docs/module-doc/globals_0x65.html | 5 +- docs/module-doc/globals_0x66.html | 2 +- docs/module-doc/globals_0x67.html | 2 +- docs/module-doc/globals_0x68.html | 2 +- docs/module-doc/globals_0x69.html | 2 +- docs/module-doc/globals_0x6c.html | 2 +- docs/module-doc/globals_0x6d.html | 8 +- docs/module-doc/globals_0x6e.html | 2 +- docs/module-doc/globals_0x6f.html | 2 +- docs/module-doc/globals_0x70.html | 2 +- docs/module-doc/globals_0x71.html | 2 +- docs/module-doc/globals_0x72.html | 2 +- docs/module-doc/globals_0x73.html | 2 +- docs/module-doc/globals_0x74.html | 2 +- docs/module-doc/globals_0x75.html | 2 +- docs/module-doc/globals_0x76.html | 2 +- docs/module-doc/globals_0x77.html | 2 +- docs/module-doc/globals_0x7a.html | 2 +- docs/module-doc/globals_defs.html | 2 +- docs/module-doc/globals_enum.html | 2 +- docs/module-doc/globals_eval.html | 2 +- docs/module-doc/globals_func.html | 8 +- docs/module-doc/globals_type.html | 2 +- docs/module-doc/globals_vars.html | 8 +- 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 | 2 +- docs/module-doc/inherits.html | 2 +- docs/module-doc/main.html | 2 +- docs/module-doc/message_8h-source.html | 2 +- docs/module-doc/message_8h.html | 14 +- docs/module-doc/message_8h__incl.md5 | 2 +- docs/module-doc/mode_8h-source.html | 2 +- docs/module-doc/mode_8h.html | 4 +- docs/module-doc/mode_8h__incl.md5 | 2 +- docs/module-doc/modules_8cpp-source.html | 1350 ++++----- docs/module-doc/modules_8cpp.html | 12 +- docs/module-doc/modules_8cpp__incl.md5 | 2 +- docs/module-doc/modules_8h-source.html | 859 +++--- docs/module-doc/modules_8h.html | 92 +- docs/module-doc/modules_8h__incl.gif | Bin 7658 -> 7612 bytes docs/module-doc/modules_8h__incl.map | 6 +- docs/module-doc/modules_8h__incl.md5 | 2 +- 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/socket_8cpp-source.html | 410 +-- docs/module-doc/socket_8cpp.html | 2 +- docs/module-doc/socket_8h-source.html | 54 +- docs/module-doc/socket_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 +- ...ctnspace_1_1hash_3_01in__addr_01_4-members.html | 2 +- .../structnspace_1_1hash_3_01in__addr_01_4.html | 2 +- ...ructnspace_1_1hash_3_01string_01_4-members.html | 2 +- .../structnspace_1_1hash_3_01string_01_4.html | 2 +- docs/module-doc/users_8cpp-source.html | 561 ++-- docs/module-doc/users_8cpp.html | 10 +- docs/module-doc/users_8cpp__incl.gif | Bin 5014 -> 6230 bytes docs/module-doc/users_8cpp__incl.map | 7 +- docs/module-doc/users_8cpp__incl.md5 | 2 +- docs/module-doc/users_8h-source.html | 317 +-- docs/module-doc/users_8h.html | 22 +- docs/module-doc/users_8h__dep__incl.gif | Bin 3938 -> 4034 bytes docs/module-doc/users_8h__dep__incl.map | 4 +- docs/module-doc/users_8h__dep__incl.md5 | 2 +- docs/module-doc/users_8h__incl.md5 | 2 +- docs/module-doc/xline_8h-source.html | 13 +- docs/module-doc/xline_8h.html | 61 +- docs/module-doc/xline_8h__incl.md5 | 2 +- 325 files changed, 9176 insertions(+), 5304 deletions(-) (limited to 'docs') diff --git a/docs/man/man3/Admin.3 b/docs/man/man3/Admin.3 index 885903ffb..907f3d788 100644 --- a/docs/man/man3/Admin.3 +++ b/docs/man/man3/Admin.3 @@ -1,4 +1,4 @@ -.TH "Admin" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "Admin" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -38,7 +38,7 @@ Holds /ADMIN data This class contains the admin details of the local server. It is constructed by class \fBServer\fP, and has three read-only values, Name, Email and Nick that contain the specified values for the server where the module is running. .PP -Definition at line 124 of file modules.h. +Definition at line 125 of file modules.h. .SH "Constructor & Destructor Documentation" .PP .SS "Admin::Admin (\fBstd::string\fP name, \fBstd::string\fP email, \fBstd::string\fP nick)" @@ -53,13 +53,13 @@ Definition at line 250 of file modules.cpp. .PP .SS "const \fBstd::string\fP \fBAdmin::Email\fP" .PP -Definition at line 127 of file modules.h. +Definition at line 128 of file modules.h. .SS "const \fBstd::string\fP \fBAdmin::Name\fP" .PP -Definition at line 127 of file modules.h. +Definition at line 128 of file modules.h. .SS "const \fBstd::string\fP \fBAdmin::Nick\fP" .PP -Definition at line 127 of file modules.h. +Definition at line 128 of file modules.h. .SH "Author" .PP diff --git a/docs/man/man3/BanItem.3 b/docs/man/man3/BanItem.3 index db8e92a23..4ae2aa8a1 100644 --- a/docs/man/man3/BanItem.3 +++ b/docs/man/man3/BanItem.3 @@ -1,4 +1,4 @@ -.TH "BanItem" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "BanItem" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/BoolSet.3 b/docs/man/man3/BoolSet.3 index 56bb4b095..127f01c99 100644 --- a/docs/man/man3/BoolSet.3 +++ b/docs/man/man3/BoolSet.3 @@ -1,4 +1,4 @@ -.TH "BoolSet" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "BoolSet" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -67,7 +67,7 @@ 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 95 of file base.h. +Definition at line 104 of file base.h. .SH "Constructor & Destructor Documentation" .PP .SS "BoolSet::BoolSet ()" @@ -145,7 +145,7 @@ The Unset method unsets one value in the set. .PP .SS "char \fBBoolSet::bits\fP\fC [private]\fP" .PP -Definition at line 97 of file base.h. +Definition at line 106 of file base.h. .SH "Author" .PP diff --git a/docs/man/man3/ConfigReader.3 b/docs/man/man3/ConfigReader.3 index abbec6ef3..6edd9f6fa 100644 --- a/docs/man/man3/ConfigReader.3 +++ b/docs/man/man3/ConfigReader.3 @@ -1,4 +1,4 @@ -.TH "ConfigReader" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ConfigReader" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -84,7 +84,7 @@ Allows reading of values from configuration files This class allows a module to It may either be instantiated with one parameter or none. Constructing the class using one parameter allows you to specify a path to your own configuration file, otherwise, inspircd.conf is read. .PP -Definition at line 1121 of file modules.h. +Definition at line 1510 of file modules.h. .SH "Constructor & Destructor Documentation" .PP .SS "ConfigReader::ConfigReader ()" @@ -93,19 +93,19 @@ Default constructor. .PP This constructor initialises the ConfigReader class to read the inspircd.conf file as specified when running ./configure. .PP -Definition at line 796 of file modules.cpp. +Definition at line 834 of file modules.cpp. .PP References cache, CONF_FILE_NOT_FOUND, error, errorlog, include_stack, and readerror. .PP .nf -797 { -798 include_stack.clear(); -799 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); -800 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out); -801 this->readerror = LoadConf(CONFIG_FILE,this->cache,this->errorlog); -802 if (!this->readerror) -803 this->error = CONF_FILE_NOT_FOUND; -804 } +835 { +836 include_stack.clear(); +837 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); +838 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out); +839 this->readerror = LoadConf(CONFIG_FILE,this->cache,this->errorlog); +840 if (!this->readerror) +841 this->error = CONF_FILE_NOT_FOUND; +842 } .fi .PP .SS "ConfigReader::ConfigReader (\fBstd::string\fP filename)" @@ -114,18 +114,18 @@ Overloaded constructor. .PP This constructor initialises the ConfigReader class to read a user-specified config file .PP -Definition at line 816 of file modules.cpp. +Definition at line 854 of file modules.cpp. .PP References cache, CONF_FILE_NOT_FOUND, error, errorlog, and readerror. .PP .nf -817 { -818 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); -819 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out); -820 this->readerror = LoadConf(filename.c_str(),this->cache,this->errorlog); -821 if (!this->readerror) -822 this->error = CONF_FILE_NOT_FOUND; -823 }; +855 { +856 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); +857 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out); +858 this->readerror = LoadConf(filename.c_str(),this->cache,this->errorlog); +859 if (!this->readerror) +860 this->error = CONF_FILE_NOT_FOUND; +861 }; .fi .PP .SS "ConfigReader::~ConfigReader ()" @@ -134,17 +134,17 @@ Default destructor. .PP This method destroys the ConfigReader class. .PP -Definition at line 807 of file modules.cpp. +Definition at line 845 of file modules.cpp. .PP References cache, and errorlog. .PP .nf -808 { -809 if (this->cache) -810 delete this->cache; -811 if (this->errorlog) -812 delete this->errorlog; -813 } +846 { +847 if (this->cache) +848 delete this->cache; +849 if (this->errorlog) +850 delete this->errorlog; +851 } .fi .PP .SH "Member Function Documentation" @@ -155,41 +155,41 @@ Dumps the list of errors in a config file to an output location. .PP If bail is true, then the program will abort. If bail is false and user points to a valid user record, the error report will be spooled to the given user by means of NOTICE. if bool is false AND user is false, the error report will be spooled to all opers by means of a NOTICE to all opers. .PP -Definition at line 894 of file modules.cpp. +Definition at line 932 of file modules.cpp. .PP References errorlog, connection::fd, and userrec::nick. .PP .nf -895 { -896 if (bail) -897 { -898 printf('There were errors in your configuration:\n%s',errorlog->str().c_str()); -899 exit(0); -900 } -901 else -902 { -903 char dataline[1024]; -904 if (user) -905 { -906 WriteServ(user->fd,'NOTICE %s :There were errors in the configuration file:',user->nick); -907 while (!errorlog->eof()) -908 { -909 errorlog->getline(dataline,1024); -910 WriteServ(user->fd,'NOTICE %s :%s',user->nick,dataline); -911 } -912 } -913 else -914 { -915 WriteOpers('There were errors in the configuration file:',user->nick); -916 while (!errorlog->eof()) -917 { -918 errorlog->getline(dataline,1024); -919 WriteOpers(dataline); -920 } -921 } -922 return; -923 } -924 } +933 { +934 if (bail) +935 { +936 printf('There were errors in your configuration:\n%s',errorlog->str().c_str()); +937 exit(0); +938 } +939 else +940 { +941 char dataline[1024]; +942 if (user) +943 { +944 WriteServ(user->fd,'NOTICE %s :There were errors in the configuration file:',user->nick); +945 while (!errorlog->eof()) +946 { +947 errorlog->getline(dataline,1024); +948 WriteServ(user->fd,'NOTICE %s :%s',user->nick,dataline); +949 } +950 } +951 else +952 { +953 WriteOpers('There were errors in the configuration file:',user->nick); +954 while (!errorlog->eof()) +955 { +956 errorlog->getline(dataline,1024); +957 WriteOpers(dataline); +958 } +959 } +960 return; +961 } +962 } .fi .PP .SS "int ConfigReader::Enumerate (\fBstd::string\fP tag)" @@ -198,14 +198,14 @@ Counts the number of times a given tag appears in the config file. .PP This method counts the number of times a tag appears in a config file, for use where there are several tags of the same kind, e.g. with opers and connect types. It can be used with the index value of \fBConfigReader::ReadValue\fP to loop through all copies of a multiple instance tag. .PP -Definition at line 927 of file modules.cpp. +Definition at line 965 of file modules.cpp. .PP References cache. .PP .nf -928 { -929 return EnumConf(cache,tag.c_str()); -930 } +966 { +967 return EnumConf(cache,tag.c_str()); +968 } .fi .PP .SS "int ConfigReader::EnumerateValues (\fBstd::string\fP tag, int index)" @@ -214,14 +214,14 @@ Returns the number of items within a tag. .PP For example if the tag was then this function would return 2. Spaces and newlines both qualify as valid seperators between values. .PP -Definition at line 932 of file modules.cpp. +Definition at line 970 of file modules.cpp. .PP References cache. .PP .nf -933 { -934 return EnumValues(cache, tag.c_str(), index); -935 } +971 { +972 return EnumValues(cache, tag.c_str(), index); +973 } .fi .PP .SS "long ConfigReader::GetError ()" @@ -230,16 +230,16 @@ Returns the last error to occur. .PP Valid errors can be found by looking in \fBmodules.h\fP. Any nonzero value indicates an error condition. A call to \fBGetError()\fP resets the error flag back to 0. .PP -Definition at line 887 of file modules.cpp. +Definition at line 925 of file modules.cpp. .PP References error. .PP .nf -888 { -889 long olderr = this->error; -890 this->error = 0; -891 return olderr; -892 } +926 { +927 long olderr = this->error; +928 this->error = 0; +929 return olderr; +930 } .fi .PP .SS "bool ConfigReader::ReadFlag (\fBstd::string\fP tag, \fBstd::string\fP name, int index)" @@ -248,26 +248,26 @@ Retrieves a boolean value from the config file. .PP This method retrieves a boolean value from the config file. Where multiple copies of the tag exist in the config file, index indicates which of the values to retrieve. The values '1', 'yes' and 'true' in the config file count as true to ReadFlag, and any other value counts as false. .PP -Definition at line 841 of file modules.cpp. +Definition at line 879 of file modules.cpp. .PP References cache, CONF_VALUE_NOT_FOUND, and error. .PP .nf -842 { -843 char val[MAXBUF]; -844 char t[MAXBUF]; -845 char n[MAXBUF]; -846 strlcpy(t,tag.c_str(),MAXBUF); -847 strlcpy(n,name.c_str(),MAXBUF); -848 int res = ReadConf(cache,t,n,index,val); -849 if (!res) -850 { -851 this->error = CONF_VALUE_NOT_FOUND; -852 return false; -853 } -854 std::string s = val; -855 return ((s == 'yes') || (s == 'YES') || (s == 'true') || (s == 'TRUE') || (s == '1')); -856 } +880 { +881 char val[MAXBUF]; +882 char t[MAXBUF]; +883 char n[MAXBUF]; +884 strlcpy(t,tag.c_str(),MAXBUF); +885 strlcpy(n,name.c_str(),MAXBUF); +886 int res = ReadConf(cache,t,n,index,val); +887 if (!res) +888 { +889 this->error = CONF_VALUE_NOT_FOUND; +890 return false; +891 } +892 std::string s = val; +893 return ((s == 'yes') || (s == 'YES') || (s == 'true') || (s == 'TRUE') || (s == '1')); +894 } .fi .PP .SS "long ConfigReader::ReadInteger (\fBstd::string\fP tag, \fBstd::string\fP name, int index, bool needs_unsigned)" @@ -276,38 +276,38 @@ Retrieves an integer value from the config file. .PP This method retrieves an integer value from the config file. Where multiple copies of the tag exist in the config file, index indicates which of the values to retrieve. Any invalid integer values in the tag will cause the objects error value to be set, and any call to \fBGetError()\fP will return CONF_INVALID_NUMBER to be returned. needs_unsigned is set if the number must be unsigned. If a signed number is placed into a tag which is specified unsigned, 0 will be returned and \fBGetError()\fP will return CONF_NOT_UNSIGNED .PP -Definition at line 858 of file modules.cpp. +Definition at line 896 of file modules.cpp. .PP References cache, CONF_NOT_A_NUMBER, CONF_NOT_UNSIGNED, CONF_VALUE_NOT_FOUND, and error. .PP .nf -859 { -860 char val[MAXBUF]; -861 char t[MAXBUF]; -862 char n[MAXBUF]; -863 strlcpy(t,tag.c_str(),MAXBUF); -864 strlcpy(n,name.c_str(),MAXBUF); -865 int res = ReadConf(cache,t,n,index,val); -866 if (!res) -867 { -868 this->error = CONF_VALUE_NOT_FOUND; -869 return 0; -870 } -871 for (unsigned int i = 0; i < strlen(val); i++) -872 { -873 if (!isdigit(val[i])) -874 { -875 this->error = CONF_NOT_A_NUMBER; -876 return 0; -877 } -878 } -879 if ((needs_unsigned) && (atoi(val)<0)) -880 { -881 this->error = CONF_NOT_UNSIGNED; -882 return 0; -883 } -884 return atoi(val); -885 } +897 { +898 char val[MAXBUF]; +899 char t[MAXBUF]; +900 char n[MAXBUF]; +901 strlcpy(t,tag.c_str(),MAXBUF); +902 strlcpy(n,name.c_str(),MAXBUF); +903 int res = ReadConf(cache,t,n,index,val); +904 if (!res) +905 { +906 this->error = CONF_VALUE_NOT_FOUND; +907 return 0; +908 } +909 for (unsigned int i = 0; i < strlen(val); i++) +910 { +911 if (!isdigit(val[i])) +912 { +913 this->error = CONF_NOT_A_NUMBER; +914 return 0; +915 } +916 } +917 if ((needs_unsigned) && (atoi(val)<0)) +918 { +919 this->error = CONF_NOT_UNSIGNED; +920 return 0; +921 } +922 return atoi(val); +923 } .fi .PP .SS "\fBstd::string\fP ConfigReader::ReadValue (\fBstd::string\fP tag, \fBstd::string\fP name, int index)" @@ -316,25 +316,25 @@ Retrieves a value from the config file. .PP This method retrieves a value from the config file. Where multiple copies of the tag exist in the config file, index indicates which of the values to retrieve. .PP -Definition at line 825 of file modules.cpp. +Definition at line 863 of file modules.cpp. .PP References cache, CONF_VALUE_NOT_FOUND, and error. .PP .nf -826 { -827 char val[MAXBUF]; -828 char t[MAXBUF]; -829 char n[MAXBUF]; -830 strlcpy(t,tag.c_str(),MAXBUF); -831 strlcpy(n,name.c_str(),MAXBUF); -832 int res = ReadConf(cache,t,n,index,val); -833 if (!res) -834 { -835 this->error = CONF_VALUE_NOT_FOUND; -836 return ''; -837 } -838 return val; -839 } +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 ''; +875 } +876 return val; +877 } .fi .PP .SS "bool ConfigReader::Verify ()" @@ -343,14 +343,14 @@ Returns true if a config file is valid. .PP This method is partially implemented and will only return false if the config file does not exist or could not be opened. .PP -Definition at line 937 of file modules.cpp. +Definition at line 975 of file modules.cpp. .PP References readerror. .PP .nf -938 { -939 return this->readerror; -940 } +976 { +977 return this->readerror; +978 } .fi .PP .SH "Member Data Documentation" @@ -361,24 +361,24 @@ The contents of the configuration file This protected member should never be acc .PP It will contain a pointer to the configuration file data with unneeded data (such as comments) stripped from it. .PP -Definition at line 1129 of file modules.h. +Definition at line 1518 of file modules.h. .PP Referenced by ConfigReader(), Enumerate(), EnumerateValues(), ReadFlag(), ReadInteger(), ReadValue(), and ~ConfigReader(). .SS "long \fBConfigReader::error\fP\fC [protected]\fP" .PP -Definition at line 1134 of file modules.h. +Definition at line 1523 of file modules.h. .PP Referenced by ConfigReader(), GetError(), ReadFlag(), ReadInteger(), and ReadValue(). .SS "std::stringstream* \fBConfigReader::errorlog\fP\fC [protected]\fP" .PP -Definition at line 1130 of file modules.h. +Definition at line 1519 of file modules.h. .PP Referenced by ConfigReader(), DumpErrors(), and ~ConfigReader(). .SS "bool \fBConfigReader::readerror\fP\fC [protected]\fP" .PP Used to store errors. .PP -Definition at line 1133 of file modules.h. +Definition at line 1522 of file modules.h. .PP Referenced by ConfigReader(), and Verify(). diff --git a/docs/man/man3/ConnectClass.3 b/docs/man/man3/ConnectClass.3 index fe523ce7b..0d8ce0778 100644 --- a/docs/man/man3/ConnectClass.3 +++ b/docs/man/man3/ConnectClass.3 @@ -1,4 +1,4 @@ -.TH "ConnectClass" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ConnectClass" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -63,26 +63,26 @@ Inherits \fBclassbase\fP. .PP Holds information relevent to and tags in the config file. .PP -Definition at line 45 of file users.h. +Definition at line 48 of file users.h. .SH "Constructor & Destructor Documentation" .PP .SS "ConnectClass::ConnectClass ()\fC [inline]\fP" .PP -Definition at line 79 of file users.h. +Definition at line 82 of file users.h. .PP References flood, host, pass, pingtime, recvqmax, registration_timeout, sendqmax, and threshold. .PP .nf -80 { -81 registration_timeout = 0; -82 flood = 0; -83 pingtime = 0; -84 threshold = 0; -85 sendqmax = 0; -86 recvqmax = 0; -87 strlcpy(host,'',MAXBUF); -88 strlcpy(pass,'',MAXBUF); -89 } +83 { +84 registration_timeout = 0; +85 flood = 0; +86 pingtime = 0; +87 threshold = 0; +88 sendqmax = 0; +89 recvqmax = 0; +90 strlcpy(host,'',MAXBUF); +91 strlcpy(pass,'',MAXBUF); +92 } .fi .PP .SH "Member Data Documentation" @@ -91,63 +91,63 @@ References flood, host, pass, pingtime, recvqmax, registration_timeout, sendqmax .PP Number of lines in buffer before excess flood is triggered. .PP -Definition at line 56 of file users.h. +Definition at line 59 of file users.h. .PP Referenced by ConnectClass(). .SS "char \fBConnectClass::host\fP[MAXBUF]" .PP Host mask for this line. .PP -Definition at line 59 of file users.h. +Definition at line 62 of file users.h. .PP Referenced by ConnectClass(). .SS "char \fBConnectClass::pass\fP[MAXBUF]" .PP (Optional) Password for this line .PP -Definition at line 65 of file users.h. +Definition at line 68 of file users.h. .PP Referenced by ConnectClass(). .SS "int \fBConnectClass::pingtime\fP" .PP Number of seconds between pings for this line. .PP -Definition at line 62 of file users.h. +Definition at line 65 of file users.h. .PP Referenced by ConnectClass(). .SS "long \fBConnectClass::recvqmax\fP" .PP Maximum size of recvq for users in this class (bytes). .PP -Definition at line 77 of file users.h. +Definition at line 80 of file users.h. .PP Referenced by ConnectClass(). .SS "int \fBConnectClass::registration_timeout\fP" .PP Max time to register the connection in seconds. .PP -Definition at line 53 of file users.h. +Definition at line 56 of file users.h. .PP Referenced by ConnectClass(). .SS "long \fBConnectClass::sendqmax\fP" .PP Maximum size of sendq for users in this class (bytes). .PP -Definition at line 73 of file users.h. +Definition at line 76 of file users.h. .PP Referenced by ConnectClass(). .SS "int \fBConnectClass::threshold\fP" .PP Threshold value for flood disconnect. .PP -Definition at line 69 of file users.h. +Definition at line 72 of file users.h. .PP Referenced by ConnectClass(). .SS "char \fBConnectClass::type\fP" .PP Type of line, either CC_ALLOW or CC_DENY. .PP -Definition at line 50 of file users.h. +Definition at line 53 of file users.h. .SH "Author" .PP diff --git a/docs/man/man3/DNS.3 b/docs/man/man3/DNS.3 index a88a76ab1..95597b880 100644 --- a/docs/man/man3/DNS.3 +++ b/docs/man/man3/DNS.3 @@ -1,4 +1,4 @@ -.TH "DNS" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "DNS" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -42,6 +42,9 @@ DNS \- The DNS class allows fast nonblocking resolution of hostnames and ip addr .br .RI "\fIThis method returns the result of your query as a string, depending upon wether you called \fBDNS::ReverseLookup()\fP or \fBDNS::ForwardLookup\fP. \fP" .ti -1c +.RI "\fBstd::string\fP \fBGetResultIP\fP ()" +.br +.ti -1c .RI "int \fBGetFD\fP ()" .br .RI "\fIThis method returns the file handle used by the dns query socket or zero if the query is invalid for some reason, e.g. \fP" @@ -74,7 +77,7 @@ DNS \- The DNS class allows fast nonblocking resolution of hostnames and ip addr .RI "int \fBdns_getname4\fP (const in_addr *const ip)" .br .ti -1c -.RI "char * \fBdns_getresult\fP (const int \fBfd\fP)" +.RI "char * \fBdns_getresult\fP (const int fd)" .br .ti -1c .RI "in_addr * \fBdns_aton4_s\fP (const char *const ipstring, in_addr *const ip)" @@ -83,7 +86,7 @@ DNS \- The DNS class allows fast nonblocking resolution of hostnames and ip addr .RI "char * \fBdns_ntoa4_s\fP (const in_addr *const ip, char *const \fBresult\fP)" .br .ti -1c -.RI "char * \fBdns_getresult_s\fP (const int \fBfd\fP, char *const \fBresult\fP)" +.RI "char * \fBdns_getresult_s\fP (const int fd, char *const \fBresult\fP)" .br .ti -1c .RI "in_addr * \fBdns_aton4_r\fP (const char *const ipstring)" @@ -92,7 +95,7 @@ DNS \- The DNS class allows fast nonblocking resolution of hostnames and ip addr .RI "char * \fBdns_ntoa4_r\fP (const in_addr *const ip)" .br .ti -1c -.RI "char * \fBdns_getresult_r\fP (const int \fBfd\fP)" +.RI "char * \fBdns_getresult_r\fP (const int fd)" .br .in -1c .SS "Private Attributes" @@ -105,10 +108,13 @@ DNS \- The DNS class allows fast nonblocking resolution of hostnames and ip addr .RI "char * \fBresult\fP" .br .ti -1c +.RI "char \fBlocalbuf\fP [1024]" +.br +.ti -1c .RI "int \fBt\fP" .br .ti -1c -.RI "int \fBfd\fP" +.RI "int \fBmyfd\fP" .br .in -1c .SH "Detailed Description" @@ -178,6 +184,8 @@ the dns server not responding. .PP This method returns the result of your query as a string, depending upon wether you called \fBDNS::ReverseLookup()\fP or \fBDNS::ForwardLookup\fP. .PP +.SS "\fBstd::string\fP DNS::GetResultIP ()" +.PP .SS "bool DNS::HasResult ()" .PP This method will return true when the lookup is completed. @@ -195,15 +203,18 @@ This method will start the reverse lookup of an ip given in dotted decimal forma .SS "in_addr* \fBDNS::binip\fP\fC [private]\fP" .PP Definition at line 38 of file dns.h. -.SS "int \fBDNS::fd\fP\fC [private]\fP" +.SS "char \fBDNS::localbuf\fP[1024]\fC [private]\fP" +.PP +Definition at line 40 of file dns.h. +.SS "int \fBDNS::myfd\fP\fC [private]\fP" .PP -Definition at line 42 of file dns.h. +Definition at line 43 of file dns.h. .SS "char* \fBDNS::result\fP\fC [private]\fP" .PP Definition at line 39 of file dns.h. .SS "int \fBDNS::t\fP\fC [private]\fP" .PP -Definition at line 40 of file dns.h. +Definition at line 41 of file dns.h. .SH "Author" .PP diff --git a/docs/man/man3/ELine.3 b/docs/man/man3/ELine.3 index f40a92bd3..1b3b6c7a4 100644 --- a/docs/man/man3/ELine.3 +++ b/docs/man/man3/ELine.3 @@ -1,4 +1,4 @@ -.TH "ELine" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ELine" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/Event.3 b/docs/man/man3/Event.3 index 545ed1fdc..0105be0ae 100644 --- a/docs/man/man3/Event.3 +++ b/docs/man/man3/Event.3 @@ -1,4 +1,4 @@ -.TH "Event" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "Event" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -58,7 +58,7 @@ The Event class is a unicast message directed at all modules. When the class is properly instantiated it may be sent to all modules using the \fBSend()\fP method, which will trigger the OnEvent method in all modules passing the object as its parameter. .PP -Definition at line 196 of file modules.h. +Definition at line 197 of file modules.h. .SH "Constructor & Destructor Documentation" .PP .SS "Event::Event (char * anydata, \fBModule\fP * src, \fBstd::string\fP eventid)" @@ -142,7 +142,7 @@ References FOREACH_MOD. .PP This member holds a pointer to arbitary data set by the emitter of the message. .PP -Definition at line 201 of file modules.h. +Definition at line 202 of file modules.h. .PP Referenced by GetData(). .SS "\fBstd::string\fP \fBEvent::id\fP\fC [protected]\fP" @@ -151,14 +151,14 @@ The event identifier. .PP This is arbitary text which should be used to distinguish one type of event from another. .PP -Definition at line 210 of file modules.h. +Definition at line 211 of file modules.h. .PP Referenced by GetEventID(). .SS "\fBModule\fP* \fBEvent::source\fP\fC [protected]\fP" .PP This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply. .PP -Definition at line 205 of file modules.h. +Definition at line 206 of file modules.h. .PP Referenced by GetSource(). diff --git a/docs/man/man3/ExemptItem.3 b/docs/man/man3/ExemptItem.3 index 7f07d2075..17e67bdcf 100644 --- a/docs/man/man3/ExemptItem.3 +++ b/docs/man/man3/ExemptItem.3 @@ -1,4 +1,4 @@ -.TH "ExemptItem" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ExemptItem" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ExtMode.3 b/docs/man/man3/ExtMode.3 index 6b5905f8d..e63ace10d 100644 --- a/docs/man/man3/ExtMode.3 +++ b/docs/man/man3/ExtMode.3 @@ -1,4 +1,4 @@ -.TH "ExtMode" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ExtMode" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/Extensible.3 b/docs/man/man3/Extensible.3 index 4f918482c..6c291ce75 100644 --- a/docs/man/man3/Extensible.3 +++ b/docs/man/man3/Extensible.3 @@ -1,4 +1,4 @@ -.TH "Extensible" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "Extensible" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -29,6 +29,10 @@ Inherited by \fBchanrec\fP, \fBcommand_t\fP, and \fBconnection\fP. .RI "char * \fBGetExt\fP (\fBstd::string\fP key)" .br .RI "\fIGet an extension item. \fP" +.ti -1c +.RI "void \fBGetExtList\fP (std::deque< \fBstd::string\fP > &\fBlist\fP)" +.br +.RI "\fIGet a list of all extension items names. \fP" .in -1c .SS "Private Attributes" @@ -44,7 +48,7 @@ class Extensible is the parent class of many classes such as userrec and chanrec class Extensible implements a system which allows modules to 'extend' the class by attaching data within a map associated with the object. In this way modules can store their own custom information within user objects, channel objects and server objects, without breaking other modules (this is more sensible than using a flags variable, and each module defining bits within the flag as 'theirs' as it is less prone to conflict and supports arbitary data storage). .PP -Definition at line 50 of file base.h. +Definition at line 51 of file base.h. .SH "Member Function Documentation" .PP .SS "bool Extensible::Extend (\fBstd::string\fP key, char * p)" @@ -81,6 +85,21 @@ If you provide a non-existent key name, the function returns NULL, otherwise a p .RE .PP +.SS "void Extensible::GetExtList (std::deque< \fBstd::string\fP > & list)" +.PP +Get a list of all extension items names. +.PP +\fBParameters:\fP +.RS 4 +\fIlist\fP A deque of strings to receive the list +.RE +.PP +\fBReturns:\fP +.RS 4 +This function writes a list of all extension items stored in this object by name into the given deque and returns void. +.RE +.PP + .SS "bool Extensible::Shrink (\fBstd::string\fP key)" .PP Shrink an Extensible class. @@ -104,7 +123,7 @@ Returns true on success. .PP Private data store. .PP -Definition at line 54 of file base.h. +Definition at line 55 of file base.h. .SH "Author" .PP diff --git a/docs/man/man3/FileReader.3 b/docs/man/man3/FileReader.3 index c6111fde1..09067f8f8 100644 --- a/docs/man/man3/FileReader.3 +++ b/docs/man/man3/FileReader.3 @@ -1,4 +1,4 @@ -.TH "FileReader" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "FileReader" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -57,7 +57,7 @@ Caches a text file into memory and can be used to retrieve lines from it. This class contains methods for read-only manipulation of a text file in memory. Either use the constructor type with one parameter to load a file into memory at construction, or use the LoadFile method to load a file. .PP -Definition at line 1210 of file modules.h. +Definition at line 1599 of file modules.h. .SH "Constructor & Destructor Documentation" .PP .SS "FileReader::FileReader ()" @@ -66,11 +66,11 @@ Default constructor. .PP This method does not load any file into memory, you must use the LoadFile method after constructing the class this way. .PP -Definition at line 950 of file modules.cpp. +Definition at line 988 of file modules.cpp. .PP .nf -951 { -952 } +989 { +990 } .fi .PP .SS "FileReader::FileReader (\fBstd::string\fP filename)" @@ -79,16 +79,16 @@ Secondary constructor. .PP This method initialises the class with a file loaded into it ready for GetLine and and other methods to be called. If the file could not be loaded, \fBFileReader::FileSize\fP returns 0. .PP -Definition at line 943 of file modules.cpp. +Definition at line 981 of file modules.cpp. .PP References fc. .PP .nf -944 { -945 file_cache c; -946 readfile(c,filename.c_str()); -947 this->fc = c; -948 } +982 { +983 file_cache c; +984 readfile(c,filename.c_str()); +985 this->fc = c; +986 } .fi .PP .SS "FileReader::~FileReader ()" @@ -97,11 +97,11 @@ Default destructor. .PP This deletes the memory allocated to the file. .PP -Definition at line 962 of file modules.cpp. +Definition at line 1000 of file modules.cpp. .PP .nf -963 { -964 } +1001 { +1002 } .fi .PP .SH "Member Function Documentation" @@ -110,21 +110,21 @@ Definition at line 962 of file modules.cpp. .PP Returns true if the file exists This function will return false if the file could not be opened. .PP -Definition at line 966 of file modules.cpp. +Definition at line 1004 of file modules.cpp. .PP References fc. .PP .nf -967 { -968 if (fc.size() == 0) -969 { -970 return(false); -971 } -972 else -973 { -974 return(true); -975 } -976 } +1005 { +1006 if (fc.size() == 0) +1007 { +1008 return(false); +1009 } +1010 else +1011 { +1012 return(true); +1013 } +1014 } .fi .PP .SS "int FileReader::FileSize ()" @@ -133,14 +133,14 @@ Returns the size of the file in lines. .PP This method returns the number of lines in the read file. If it is 0, no lines have been read into memory, either because the file is empty or it does not exist, or cannot be opened due to permission problems. .PP -Definition at line 985 of file modules.cpp. +Definition at line 1023 of file modules.cpp. .PP References fc. .PP .nf -986 { -987 return fc.size(); -988 } +1024 { +1025 return fc.size(); +1026 } .fi .PP .SS "\fBstd::string\fP FileReader::GetLine (int x)" @@ -149,16 +149,16 @@ Retrieve one line from the file. .PP This method retrieves one line from the text file. If an empty non-NULL string is returned, the index was out of bounds, or the line had no data on it. .PP -Definition at line 978 of file modules.cpp. +Definition at line 1016 of file modules.cpp. .PP References fc. .PP .nf -979 { -980 if ((x<0) || ((unsigned)x>fc.size())) -981 return ''; -982 return fc[x]; -983 } +1017 { +1018 if ((x<0) || ((unsigned)x>fc.size())) +1019 return ''; +1020 return fc[x]; +1021 } .fi .PP .SS "void FileReader::LoadFile (\fBstd::string\fP filename)" @@ -167,23 +167,23 @@ Used to load a file. .PP This method loads a file into the class ready for GetLine and and other methods to be called. If the file could not be loaded, \fBFileReader::FileSize\fP returns 0. .PP -Definition at line 954 of file modules.cpp. +Definition at line 992 of file modules.cpp. .PP References fc. .PP .nf -955 { -956 file_cache c; -957 readfile(c,filename.c_str()); -958 this->fc = c; -959 } +993 { +994 file_cache c; +995 readfile(c,filename.c_str()); +996 this->fc = c; +997 } .fi .PP .SH "Member Data Documentation" .PP .SS "\fBfile_cache\fP \fBFileReader::fc\fP\fC [private]\fP" .PP -Definition at line 1212 of file modules.h. +Definition at line 1601 of file modules.h. .PP Referenced by Exists(), FileReader(), FileSize(), GetLine(), and LoadFile(). diff --git a/docs/man/man3/GLine.3 b/docs/man/man3/GLine.3 index 90e78da82..a4dae91d5 100644 --- a/docs/man/man3/GLine.3 +++ b/docs/man/man3/GLine.3 @@ -1,4 +1,4 @@ -.TH "GLine" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "GLine" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/HostItem.3 b/docs/man/man3/HostItem.3 index 950a16845..873025613 100644 --- a/docs/man/man3/HostItem.3 +++ b/docs/man/man3/HostItem.3 @@ -1,4 +1,4 @@ -.TH "HostItem" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "HostItem" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/InspSocket.3 b/docs/man/man3/InspSocket.3 index a0c2e134c..1dc773958 100644 --- a/docs/man/man3/InspSocket.3 +++ b/docs/man/man3/InspSocket.3 @@ -1,4 +1,4 @@ -.TH "InspSocket" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "InspSocket" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -15,7 +15,7 @@ InspSocket \- .RI "\fBInspSocket\fP ()" .br .ti -1c -.RI "\fBInspSocket\fP (int newfd)" +.RI "\fBInspSocket\fP (int newfd, char *ip)" .br .ti -1c .RI "\fBInspSocket\fP (\fBstd::string\fP \fBhost\fP, int \fBport\fP, bool listening, unsigned long maxtime)" @@ -42,6 +42,9 @@ InspSocket \- .RI "virtual char * \fBRead\fP ()" .br .ti -1c +.RI "\fBstd::string\fP \fBGetIP\fP ()" +.br +.ti -1c .RI "virtual int \fBWrite\fP (\fBstd::string\fP data)" .br .ti -1c @@ -94,7 +97,10 @@ InspSocket \- .RI "pollfd \fBpolls\fP" .br .ti -1c -.RI "char \fBibuf\fP [1024]" +.RI "char \fBibuf\fP [16384]" +.br +.ti -1c +.RI "\fBstd::string\fP \fBIP\fP" .br .ti -1c .RI "sockaddr_in \fBclient\fP" @@ -123,327 +129,342 @@ References I_DISCONNECTED, and state. 49 } .fi .PP -.SS "InspSocket::InspSocket (int newfd)" +.SS "InspSocket::InspSocket (int newfd, char * ip)" .PP Definition at line 51 of file socket.cpp. .PP -References fd, I_CONNECTED, and state. +References fd, I_CONNECTED, IP, and state. .PP .nf 52 { 53 this->fd = newfd; 54 this->state = I_CONNECTED; -55 } +55 this->IP = ip; +56 } .fi .PP .SS "InspSocket::InspSocket (\fBstd::string\fP host, int port, bool listening, unsigned long maxtime)" .PP -Definition at line 57 of file socket.cpp. +Definition at line 58 of file socket.cpp. .PP -References addr, addy, Close(), DEBUG, fd, I_CONNECTING, I_ERR_BIND, I_ERR_CONNECT, I_ERR_SOCKET, I_ERROR, I_LISTENING, OnError(), state, timeout, and timeout_end. +References addr, addy, Close(), DEBUG, fd, I_CONNECTING, I_ERR_BIND, I_ERR_CONNECT, I_ERR_SOCKET, I_ERROR, I_LISTENING, IP, OnError(), state, timeout, and timeout_end. .PP .nf -58 { -59 if (listening) { -60 if ((this->fd = OpenTCPSocket()) == ERROR) -61 { -62 this->fd = -1; -63 this->state = I_ERROR; -64 this->OnError(I_ERR_SOCKET); -65 log(DEBUG,'OpenTCPSocket() error'); -66 return; -67 } -68 else -69 { -70 if (BindSocket(this->fd,this->client,this->server,port,(char*)host.c_str()) == ERROR) -71 { -72 this->Close(); -73 this->fd = -1; -74 this->state = I_ERROR; -75 this->OnError(I_ERR_BIND); -76 log(DEBUG,'BindSocket() error %s',strerror(errno)); -77 return; -78 } -79 else -80 { -81 this->state = I_LISTENING; -82 log(DEBUG,'New socket now in I_LISTENING state'); -83 return; -84 } -85 } -86 } else { -87 char* ip; -88 this->host = host; -89 hostent* hoste = gethostbyname(host.c_str()); -90 if (!hoste) { -91 ip = (char*)host.c_str(); -92 } else { -93 struct in_addr* ia = (in_addr*)hoste->h_addr; -94 ip = inet_ntoa(*ia); -95 } -96 -97 timeout_end = time(NULL)+maxtime; -98 timeout = false; -99 if ((this->fd = socket(AF_INET, SOCK_STREAM, 0)) == -1) -100 { -101 this->state = I_ERROR; -102 this->OnError(I_ERR_SOCKET); -103 return; -104 } -105 this->port = port; -106 inet_aton(ip,&addy); -107 addr.sin_family = AF_INET; -108 addr.sin_addr = addy; -109 addr.sin_port = htons(this->port); -110 -111 int flags; -112 flags = fcntl(this->fd, F_GETFL, 0); -113 fcntl(this->fd, F_SETFL, flags | O_NONBLOCK); -114 -115 if(connect(this->fd, (sockaddr*)&this->addr,sizeof(this->addr)) == -1) -116 { -117 if (errno != EINPROGRESS) -118 { -119 this->Close(); -120 this->OnError(I_ERR_CONNECT); -121 this->state = I_ERROR; -122 return; -123 } -124 } -125 this->state = I_CONNECTING; -126 return; -127 } -128 } +59 { +60 if (listening) { +61 if ((this->fd = OpenTCPSocket()) == ERROR) +62 { +63 this->fd = -1; +64 this->state = I_ERROR; +65 this->OnError(I_ERR_SOCKET); +66 log(DEBUG,'OpenTCPSocket() error'); +67 return; +68 } +69 else +70 { +71 if (BindSocket(this->fd,this->client,this->server,port,(char*)host.c_str()) == ERROR) +72 { +73 this->Close(); +74 this->fd = -1; +75 this->state = I_ERROR; +76 this->OnError(I_ERR_BIND); +77 log(DEBUG,'BindSocket() error %s',strerror(errno)); +78 return; +79 } +80 else +81 { +82 this->state = I_LISTENING; +83 log(DEBUG,'New socket now in I_LISTENING state'); +84 return; +85 } +86 } +87 } else { +88 char* ip; +89 this->host = host; +90 hostent* hoste = gethostbyname(host.c_str()); +91 if (!hoste) { +92 ip = (char*)host.c_str(); +93 } else { +94 struct in_addr* ia = (in_addr*)hoste->h_addr; +95 ip = inet_ntoa(*ia); +96 } +97 +98 this->IP = ip; +99 +100 timeout_end = time(NULL)+maxtime; +101 timeout = false; +102 if ((this->fd = socket(AF_INET, SOCK_STREAM, 0)) == -1) +103 { +104 this->state = I_ERROR; +105 this->OnError(I_ERR_SOCKET); +106 return; +107 } +108 this->port = port; +109 inet_aton(ip,&addy); +110 addr.sin_family = AF_INET; +111 addr.sin_addr = addy; +112 addr.sin_port = htons(this->port); +113 +114 int flags; +115 flags = fcntl(this->fd, F_GETFL, 0); +116 fcntl(this->fd, F_SETFL, flags | O_NONBLOCK); +117 +118 if(connect(this->fd, (sockaddr*)&this->addr,sizeof(this->addr)) == -1) +119 { +120 if (errno != EINPROGRESS) +121 { +122 this->Close(); +123 this->OnError(I_ERR_CONNECT); +124 this->state = I_ERROR; +125 return; +126 } +127 } +128 this->state = I_CONNECTING; +129 return; +130 } +131 } .fi .PP .SS "InspSocket::~InspSocket ()\fC [virtual]\fP" .PP -Definition at line 246 of file socket.cpp. +Definition at line 254 of file socket.cpp. .PP References Close(). .PP .nf -247 { -248 this->Close(); -249 } +255 { +256 this->Close(); +257 } .fi .PP .SH "Member Function Documentation" .PP .SS "void InspSocket::Close ()\fC [virtual]\fP" .PP -Definition at line 130 of file socket.cpp. +Definition at line 133 of file socket.cpp. .PP References fd, and OnClose(). .PP Referenced by InspSocket(), and ~InspSocket(). .PP .nf -131 { -132 if (this->fd != -1) -133 { -134 this->OnClose(); -135 shutdown(this->fd,2); -136 close(this->fd); -137 this->fd = -1; -138 } -139 } +134 { +135 if (this->fd != -1) +136 { +137 this->OnClose(); +138 shutdown(this->fd,2); +139 close(this->fd); +140 this->fd = -1; +141 } +142 } +.fi +.PP +.SS "\fBstd::string\fP InspSocket::GetIP ()" +.PP +Definition at line 144 of file socket.cpp. +.PP +References IP. +.PP +.nf +145 { +146 return this->IP; +147 } .fi .PP .SS "\fBInspSocketState\fP InspSocket::GetState ()" .PP -Definition at line 233 of file socket.cpp. +Definition at line 241 of file socket.cpp. .PP References state. .PP .nf -234 { -235 return this->state; -236 } +242 { +243 return this->state; +244 } .fi .PP .SS "void InspSocket::OnClose ()\fC [virtual]\fP" .PP -Definition at line 244 of file socket.cpp. +Definition at line 252 of file socket.cpp. .PP Referenced by Close(). .PP .nf -244 { return; } +252 { return; } .fi .PP .SS "bool InspSocket::OnConnected ()\fC [virtual]\fP" .PP -Definition at line 238 of file socket.cpp. +Definition at line 246 of file socket.cpp. .PP Referenced by Poll(). .PP .nf -238 { return true; } +246 { return true; } .fi .PP .SS "bool InspSocket::OnDataReady ()\fC [virtual]\fP" .PP -Definition at line 242 of file socket.cpp. +Definition at line 250 of file socket.cpp. .PP Referenced by Poll(). .PP .nf -242 { return true; } +250 { return true; } .fi .PP .SS "int InspSocket::OnDisconnect ()\fC [virtual]\fP" .PP -Definition at line 240 of file socket.cpp. +Definition at line 248 of file socket.cpp. .PP .nf -240 { return 0; } +248 { return 0; } .fi .PP .SS "void InspSocket::OnError (\fBInspSocketError\fP e)\fC [virtual]\fP" .PP -Definition at line 239 of file socket.cpp. +Definition at line 247 of file socket.cpp. .PP Referenced by InspSocket(), and Poll(). .PP .nf -239 { return; } +247 { return; } .fi .PP .SS "int InspSocket::OnIncomingConnection (int newfd, char * ip)\fC [virtual]\fP" .PP -Definition at line 241 of file socket.cpp. +Definition at line 249 of file socket.cpp. .PP Referenced by Poll(). .PP .nf -241 { return 0; } +249 { return 0; } .fi .PP .SS "void InspSocket::OnTimeout ()\fC [virtual]\fP" .PP -Definition at line 243 of file socket.cpp. +Definition at line 251 of file socket.cpp. .PP Referenced by Poll(). .PP .nf -243 { return; } +251 { return; } .fi .PP .SS "bool InspSocket::Poll ()" .PP -Definition at line 183 of file socket.cpp. +Definition at line 191 of file socket.cpp. .PP References client, fd, I_CONNECTED, I_CONNECTING, I_ERR_TIMEOUT, I_ERROR, I_LISTENING, length, OnConnected(), OnDataReady(), OnError(), OnIncomingConnection(), OnTimeout(), polls, SetState(), state, timeout, and timeout_end. .PP .nf -184 { -185 if ((time(NULL) > timeout_end) && (this->state == I_CONNECTING)) -186 { -187 // for non-listening sockets, the timeout can occur -188 // which causes termination of the connection after -189 // the given number of seconds without a successful -190 // connection. -191 this->OnTimeout(); -192 this->OnError(I_ERR_TIMEOUT); -193 timeout = true; -194 this->state = I_ERROR; -195 return false; -196 } -197 polls.fd = this->fd; -198 state == I_CONNECTING ? polls.events = POLLOUT : polls.events = POLLIN; -199 int ret = poll(&polls,1,1); -200 -201 if (ret > 0) -202 { -203 int incoming = -1; -204 -205 switch (this->state) -206 { -207 case I_CONNECTING: -208 this->SetState(I_CONNECTED); -209 return this->OnConnected(); -210 break; -211 case I_LISTENING: -212 length = sizeof (client); -213 incoming = accept (this->fd, (sockaddr*)&client,&length); -214 this->OnIncomingConnection(incoming,inet_ntoa(client.sin_addr)); -215 return true; -216 break; -217 case I_CONNECTED: -218 return this->OnDataReady(); -219 break; -220 default: -221 break; -222 } -223 } -224 return true; -225 } +192 { +193 if ((time(NULL) > timeout_end) && (this->state == I_CONNECTING)) +194 { +195 // for non-listening sockets, the timeout can occur +196 // which causes termination of the connection after +197 // the given number of seconds without a successful +198 // connection. +199 this->OnTimeout(); +200 this->OnError(I_ERR_TIMEOUT); +201 timeout = true; +202 this->state = I_ERROR; +203 return false; +204 } +205 polls.fd = this->fd; +206 state == I_CONNECTING ? polls.events = POLLOUT : polls.events = POLLIN; +207 int ret = poll(&polls,1,1); +208 +209 if (ret > 0) +210 { +211 int incoming = -1; +212 +213 switch (this->state) +214 { +215 case I_CONNECTING: +216 this->SetState(I_CONNECTED); +217 return this->OnConnected(); +218 break; +219 case I_LISTENING: +220 length = sizeof (client); +221 incoming = accept (this->fd, (sockaddr*)&client,&length); +222 this->OnIncomingConnection(incoming,inet_ntoa(client.sin_addr)); +223 return true; +224 break; +225 case I_CONNECTED: +226 return this->OnDataReady(); +227 break; +228 default: +229 break; +230 } +231 } +232 return true; +233 } .fi .PP .SS "char * InspSocket::Read ()\fC [virtual]\fP" .PP -Definition at line 141 of file socket.cpp. +Definition at line 149 of file socket.cpp. .PP References DEBUG, and ibuf. .PP .nf -142 { -143 int n = recv(this->fd,this->ibuf,sizeof(this->ibuf),0); -144 if (n > 0) -145 { -146 ibuf[n] = 0; -147 return ibuf; -148 } -149 else -150 { -151 log(DEBUG,'EOF or error on socket'); -152 return NULL; -153 } -154 } +150 { +151 int n = recv(this->fd,this->ibuf,sizeof(this->ibuf),0); +152 if (n > 0) +153 { +154 ibuf[n] = 0; +155 return ibuf; +156 } +157 else +158 { +159 log(DEBUG,'EOF or error on socket'); +160 return NULL; +161 } +162 } .fi .PP .SS "void InspSocket::SetState (\fBInspSocketState\fP s)" .PP -Definition at line 227 of file socket.cpp. +Definition at line 235 of file socket.cpp. .PP References DEBUG, and state. .PP Referenced by Poll(). .PP .nf -228 { -229 log(DEBUG,'Socket state change'); -230 this->state = s; -231 } +236 { +237 log(DEBUG,'Socket state change'); +238 this->state = s; +239 } .fi .PP .SS "int InspSocket::Write (\fBstd::string\fP data)\fC [virtual]\fP" .PP -Definition at line 160 of file socket.cpp. +Definition at line 168 of file socket.cpp. .PP .nf -161 { -162 char* d = (char*)data.c_str(); -163 unsigned int written = 0; -164 int n = 0; -165 int s = data.length(); -166 while ((written < data.length()) && (n >= 0)) -167 { -168 n = send(this->fd,d,s,0); -169 if (n > 0) -170 { -171 // If we didnt write everything, advance -172 // the pointers so that when we retry -173 // the next time around the loop, we try -174 // to write what we failed to write before. -175 written += n; -176 s -= n; -177 d += n; -178 } -179 } -180 return written; -181 } +169 { +170 char* d = (char*)data.c_str(); +171 unsigned int written = 0; +172 int n = 0; +173 int s = data.length(); +174 while ((written < data.length()) && (n >= 0)) +175 { +176 n = send(this->fd,d,s,0); +177 if (n > 0) +178 { +179 // If we didnt write everything, advance +180 // the pointers so that when we retry +181 // the next time around the loop, we try +182 // to write what we failed to write before. +183 written += n; +184 s -= n; +185 d += n; +186 } +187 } +188 return written; +189 } .fi .PP .SH "Member Data Documentation" @@ -460,7 +481,7 @@ Definition at line 38 of file socket.h. Referenced by InspSocket(). .SS "sockaddr_in \fBInspSocket::client\fP\fC [private]\fP" .PP -Definition at line 43 of file socket.h. +Definition at line 44 of file socket.h. .PP Referenced by Poll(). .SS "int \fBInspSocket::fd\fP\fC [private]\fP" @@ -471,14 +492,19 @@ Referenced by Close(), InspSocket(), and Poll(). .SS "\fBstd::string\fP \fBInspSocket::host\fP\fC [private]\fP" .PP Definition at line 34 of file socket.h. -.SS "char \fBInspSocket::ibuf\fP[1024]\fC [private]\fP" +.SS "char \fBInspSocket::ibuf\fP[16384]\fC [private]\fP" .PP Definition at line 42 of file socket.h. .PP Referenced by Read(). +.SS "\fBstd::string\fP \fBInspSocket::IP\fP\fC [private]\fP" +.PP +Definition at line 43 of file socket.h. +.PP +Referenced by GetIP(), and InspSocket(). .SS "socklen_t \fBInspSocket::length\fP\fC [private]\fP" .PP -Definition at line 45 of file socket.h. +Definition at line 46 of file socket.h. .PP Referenced by Poll(). .SS "pollfd \fBInspSocket::polls\fP\fC [private]\fP" @@ -491,7 +517,7 @@ Referenced by Poll(). Definition at line 35 of file socket.h. .SS "sockaddr_in \fBInspSocket::server\fP\fC [private]\fP" .PP -Definition at line 44 of file socket.h. +Definition at line 45 of file socket.h. .SS "\fBInspSocketState\fP \fBInspSocket::state\fP\fC [private]\fP" .PP Definition at line 36 of file socket.h. diff --git a/docs/man/man3/InviteItem.3 b/docs/man/man3/InviteItem.3 index 11c1fd0b6..03bba1468 100644 --- a/docs/man/man3/InviteItem.3 +++ b/docs/man/man3/InviteItem.3 @@ -1,4 +1,4 @@ -.TH "InviteItem" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "InviteItem" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/Invited.3 b/docs/man/man3/Invited.3 index 18e08bb8e..faf75bc02 100644 --- a/docs/man/man3/Invited.3 +++ b/docs/man/man3/Invited.3 @@ -1,4 +1,4 @@ -.TH "Invited" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "Invited" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -23,12 +23,12 @@ Inherits \fBclassbase\fP. .PP Holds a channel name to which a user has been invited. .PP -Definition at line 36 of file users.h. +Definition at line 39 of file users.h. .SH "Member Data Documentation" .PP .SS "char \fBInvited::channel\fP[CHANMAX]" .PP -Definition at line 39 of file users.h. +Definition at line 42 of file users.h. .PP Referenced by userrec::InviteTo(). diff --git a/docs/man/man3/KLine.3 b/docs/man/man3/KLine.3 index f0cbd2b59..81341d10c 100644 --- a/docs/man/man3/KLine.3 +++ b/docs/man/man3/KLine.3 @@ -1,4 +1,4 @@ -.TH "KLine" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "KLine" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ModeParameter.3 b/docs/man/man3/ModeParameter.3 index d2740f9ed..a6388f4c3 100644 --- a/docs/man/man3/ModeParameter.3 +++ b/docs/man/man3/ModeParameter.3 @@ -1,4 +1,4 @@ -.TH "ModeParameter" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ModeParameter" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/Module.3 b/docs/man/man3/Module.3 index 335d8a5a5..e5b842580 100644 --- a/docs/man/man3/Module.3 +++ b/docs/man/man3/Module.3 @@ -1,4 +1,4 @@ -.TH "Module" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "Module" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -16,9 +16,9 @@ Inherits \fBclassbase\fP. .in +1c .ti -1c -.RI "\fBModule\fP ()" +.RI "\fBModule\fP (\fBServer\fP *Me)" .br -.RI "\fIDefault constructor creates a module class. \fP" +.RI "\fIDefault constructor Creates a module class. \fP" .ti -1c .RI "virtual \fB~Module\fP ()" .br @@ -32,7 +32,7 @@ Inherits \fBclassbase\fP. .br .RI "\fICalled when a user connects. \fP" .ti -1c -.RI "virtual void \fBOnUserQuit\fP (\fBuserrec\fP *user)" +.RI "virtual void \fBOnUserQuit\fP (\fBuserrec\fP *user, \fBstd::string\fP message)" .br .RI "\fICalled when a user quits. \fP" .ti -1c @@ -48,15 +48,7 @@ Inherits \fBclassbase\fP. .br .RI "\fICalled when a user parts a channel. \fP" .ti -1c -.RI "virtual void \fBOnPacketTransmit\fP (\fBstd::string\fP &data, \fBstd::string\fP serv)" -.br -.RI "\fICalled before a packet is transmitted across the irc network between two irc servers. \fP" -.ti -1c -.RI "virtual void \fBOnPacketReceive\fP (\fBstd::string\fP &data, \fBstd::string\fP serv)" -.br -.RI "\fICalled after a packet is received from another irc server. \fP" -.ti -1c -.RI "virtual void \fBOnRehash\fP ()" +.RI "virtual void \fBOnRehash\fP (\fBstd::string\fP parameter)" .br .RI "\fICalled on rehash. \fP" .ti -1c @@ -80,7 +72,7 @@ Inherits \fBclassbase\fP. .br .RI "\fICalled whenever a user is kicked. \fP" .ti -1c -.RI "virtual void \fBOnOper\fP (\fBuserrec\fP *user)" +.RI "virtual void \fBOnOper\fP (\fBuserrec\fP *user, \fBstd::string\fP opertype)" .br .RI "\fICalled whenever a user opers locally. \fP" .ti -1c @@ -96,6 +88,10 @@ Inherits \fBclassbase\fP. .br .RI "\fICalled whenever a user is about to invite another user into a channel, before any processing is done. \fP" .ti -1c +.RI "virtual void \fBOnUserInvite\fP (\fBuserrec\fP *source, \fBuserrec\fP *dest, \fBchanrec\fP *channel)" +.br +.RI "\fICalled after a user has been successfully invited to a channel. \fP" +.ti -1c .RI "virtual int \fBOnUserPreMessage\fP (\fBuserrec\fP *user, void *dest, int target_type, \fBstd::string\fP &text)" .br .RI "\fICalled whenever a user is about to PRIVMSG A user or a channel, before any processing is done. \fP" @@ -108,21 +104,111 @@ Inherits \fBclassbase\fP. .br .RI "\fICalled before any nickchange, local or remote. \fP" .ti -1c -.RI "virtual void \fBOnUserPostNick\fP (\fBuserrec\fP *user, \fBstd::string\fP oldnick)" +.RI "virtual void \fBOnUserMessage\fP (\fBuserrec\fP *user, void *dest, int target_type, \fBstd::string\fP text)" .br -.RI "\fICalled after any nickchange, local or remote. \fP" +.RI "\fICalled after any PRIVMSG sent from a user. \fP" .ti -1c -.RI "virtual int \fBOnAccessCheck\fP (\fBuserrec\fP *source, \fBuserrec\fP *dest, \fBchanrec\fP *channel, int access_type)" +.RI "virtual void \fBOnUserNotice\fP (\fBuserrec\fP *user, void *dest, int target_type, \fBstd::string\fP text)" .br -.RI "\fICalled before an action which requires a channel privilage check. \fP" +.RI "\fICalled after any NOTICE sent from a user. \fP" +.ti -1c +.RI "virtual void \fBOnMode\fP (\fBuserrec\fP *user, void *dest, int target_type, \fBstd::string\fP text)" +.br +.RI "\fICalled after every MODE command sent from a user The dest variable contains a userrec* if target_type is TYPE_USER and a chanrec* if target_type is TYPE_CHANNEL. \fP" +.ti -1c +.RI "virtual void \fBOnGetServerDescription\fP (\fBstd::string\fP servername, \fBstd::string\fP &description)" +.br +.RI "\fIAllows modules to alter or create server descriptions Whenever a module requires a server description, for example for display in WHOIS, this function is called in all modules. \fP" +.ti -1c +.RI "virtual void \fBOnSyncUser\fP (\fBuserrec\fP *user, \fBModule\fP *proto, void *opaque)" +.br +.RI "\fIAllows modules to synchronize data which relates to users during a netburst. \fP" +.ti -1c +.RI "virtual void \fBOnSyncChannel\fP (\fBchanrec\fP *chan, \fBModule\fP *proto, void *opaque)" +.br +.RI "\fIAllows modules to synchronize data which relates to channels during a netburst. \fP" +.ti -1c +.RI "virtual void \fBOnSyncChannelMetaData\fP (\fBchanrec\fP *chan, \fBModule\fP *proto, void *opaque, \fBstd::string\fP extname)" +.br +.ti -1c +.RI "virtual void \fBOnSyncUserMetaData\fP (\fBuserrec\fP *user, \fBModule\fP *proto, void *opaque, \fBstd::string\fP extname)" +.br +.ti -1c +.RI "virtual void \fBOnDecodeMetaData\fP (int target_type, void *target, \fBstd::string\fP extname, \fBstd::string\fP extdata)" +.br +.RI "\fIAllows module data, sent via ProtoSendMetaData, to be decoded again by a receiving module. \fP" +.ti -1c +.RI "virtual void \fBProtoSendMode\fP (void *opaque, int target_type, void *target, \fBstd::string\fP modeline)" +.br +.RI "\fIImplemented by modules which provide the ability to link servers. \fP" +.ti -1c +.RI "virtual void \fBProtoSendMetaData\fP (void *opaque, int target_type, void *target, \fBstd::string\fP extname, \fBstd::string\fP extdata)" +.br +.RI "\fIImplemented by modules which provide the ability to link servers. \fP" +.ti -1c +.RI "virtual void \fBOnWallops\fP (\fBuserrec\fP *user, \fBstd::string\fP text)" +.br +.RI "\fICalled after every WALLOPS command. \fP" +.ti -1c +.RI "virtual void \fBOnChangeHost\fP (\fBuserrec\fP *user, \fBstd::string\fP newhost)" +.br +.RI "\fICalled whenever a user's hostname is changed. \fP" .ti -1c -.RI "virtual \fBstring_list\fP \fBOnUserSync\fP (\fBuserrec\fP *user)" +.RI "virtual void \fBOnChangeName\fP (\fBuserrec\fP *user, \fBstd::string\fP gecos)" .br -.RI "\fICalled during a netburst to sync user data. \fP" +.RI "\fICalled whenever a user's GECOS (realname) is changed. \fP" .ti -1c -.RI "virtual \fBstring_list\fP \fBOnChannelSync\fP (\fBchanrec\fP *chan)" +.RI "virtual void \fBOnAddGLine\fP (long duration, \fBuserrec\fP *source, \fBstd::string\fP reason, \fBstd::string\fP hostmask)" .br -.RI "\fICalled during a netburst to sync channel data. \fP" +.RI "\fICalled whenever a gline is added by a local user. \fP" +.ti -1c +.RI "virtual void \fBOnAddZLine\fP (long duration, \fBuserrec\fP *source, \fBstd::string\fP reason, \fBstd::string\fP ipmask)" +.br +.RI "\fICalled whenever a zline is added by a local user. \fP" +.ti -1c +.RI "virtual void \fBOnAddKLine\fP (long duration, \fBuserrec\fP *source, \fBstd::string\fP reason, \fBstd::string\fP hostmask)" +.br +.RI "\fICalled whenever a kline is added by a local user. \fP" +.ti -1c +.RI "virtual void \fBOnAddQLine\fP (long duration, \fBuserrec\fP *source, \fBstd::string\fP reason, \fBstd::string\fP nickmask)" +.br +.RI "\fICalled whenever a qline is added by a local user. \fP" +.ti -1c +.RI "virtual void \fBOnAddELine\fP (long duration, \fBuserrec\fP *source, \fBstd::string\fP reason, \fBstd::string\fP hostmask)" +.br +.RI "\fICalled whenever a eline is added by a local user. \fP" +.ti -1c +.RI "virtual void \fBOnDelGLine\fP (\fBuserrec\fP *source, \fBstd::string\fP hostmask)" +.br +.RI "\fICalled whenever a gline is deleted. \fP" +.ti -1c +.RI "virtual void \fBOnDelZLine\fP (\fBuserrec\fP *source, \fBstd::string\fP ipmask)" +.br +.RI "\fICalled whenever a zline is deleted. \fP" +.ti -1c +.RI "virtual void \fBOnDelKLine\fP (\fBuserrec\fP *source, \fBstd::string\fP hostmask)" +.br +.RI "\fICalled whenever a kline is deleted. \fP" +.ti -1c +.RI "virtual void \fBOnDelQLine\fP (\fBuserrec\fP *source, \fBstd::string\fP nickmask)" +.br +.RI "\fICalled whenever a qline is deleted. \fP" +.ti -1c +.RI "virtual void \fBOnDelELine\fP (\fBuserrec\fP *source, \fBstd::string\fP hostmask)" +.br +.RI "\fICalled whenever a eline is deleted. \fP" +.ti -1c +.RI "virtual void \fBOnCleanup\fP (int target_type, void *item)" +.br +.RI "\fICalled before your module is unloaded to clean up Extensibles. \fP" +.ti -1c +.RI "virtual void \fBOnUserPostNick\fP (\fBuserrec\fP *user, \fBstd::string\fP oldnick)" +.br +.RI "\fICalled after any nickchange, local or remote. \fP" +.ti -1c +.RI "virtual int \fBOnAccessCheck\fP (\fBuserrec\fP *source, \fBuserrec\fP *dest, \fBchanrec\fP *channel, int access_type)" +.br +.RI "\fICalled before an action which requires a channel privilage check. \fP" .ti -1c .RI "virtual void \fBOn005Numeric\fP (\fBstd::string\fP &output)" .br @@ -132,6 +218,10 @@ Inherits \fBclassbase\fP. .br .RI "\fICalled when a client is disconnected by KILL. \fP" .ti -1c +.RI "virtual void \fBOnRemoteKill\fP (\fBuserrec\fP *source, \fBuserrec\fP *dest, \fBstd::string\fP reason)" +.br +.RI "\fICalled when an oper wants to disconnect a remote user via KILL. \fP" +.ti -1c .RI "virtual void \fBOnLoadModule\fP (\fBModule\fP *mod, \fBstd::string\fP name)" .br .RI "\fICalled whenever a module is loaded. \fP" @@ -196,6 +286,10 @@ Inherits \fBclassbase\fP. .br .RI "\fICalled whenever a topic is changed by a local user. \fP" .ti -1c +.RI "virtual void \fBOnPostLocalTopicChange\fP (\fBuserrec\fP *user, \fBchanrec\fP *chan, \fBstd::string\fP topic)" +.br +.RI "\fICalled whenever a local topic has been changed. \fP" +.ti -1c .RI "virtual void \fBOnEvent\fP (\fBEvent\fP *event)" .br .RI "\fICalled whenever an \fBEvent\fP class is sent to all module by another module. \fP" @@ -246,27 +340,34 @@ Base class for all InspIRCd modules This class is the base class for InspIRCd mo All modules must inherit from this class, its methods will be called when irc server events occur. class inherited from module must be instantiated by the \fBModuleFactory\fP class (see relevent section) for the plugin to be initialised. .PP -Definition at line 238 of file modules.h. +Definition at line 239 of file modules.h. .SH "Constructor & Destructor Documentation" .PP -.SS "Module::Module ()" +.SS "Module::Module (\fBServer\fP * Me)" .PP -Default constructor creates a module class. +Default constructor Creates a module class. .PP -Definition at line 306 of file modules.cpp. +\fBParameters:\fP +.RS 4 +\fIMe\fP An instance of the \fBServer\fP class which can be saved for future use +.RE +.PP + +.PP +Definition at line 307 of file modules.cpp. .PP .nf -306 { } +307 { } .fi .PP .SS "Module::~Module ()\fC [virtual]\fP" .PP Default destructor destroys a module class. .PP -Definition at line 307 of file modules.cpp. +Definition at line 308 of file modules.cpp. .PP .nf -307 { } +308 { } .fi .PP .SH "Member Function Documentation" @@ -277,19 +378,26 @@ Returns the version number of a Module. .PP The method should return a \fBVersion\fP object with its version information assigned via \fBVersion::Version\fP .PP -Definition at line 319 of file modules.cpp. +Definition at line 321 of file modules.cpp. .PP References VF_VENDOR. .PP .nf -319 { return Version(1,0,0,0,VF_VENDOR); } +321 { return Version(1,0,0,0,VF_VENDOR); } .fi .PP .SS "void Module::On005Numeric (\fBstd::string\fP & output)\fC [virtual]\fP" .PP Called when a 005 numeric is about to be output. .PP -The module should modify the 005 numeric if needed to indicate its features. +The module should modify the 005 numeric if needed to indicate its features. +.PP +\fBParameters:\fP +.RS 4 +\fIoutput\fP The 005 string to be modified if neccessary. +.RE +.PP + .PP Definition at line 331 of file modules.cpp. .PP @@ -323,21 +431,50 @@ This function is called before many functions which check a users status on a ch .br AC_GENERAL_MODE (8) - a user channel mode is being changed
.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). + 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). .PP -Definition at line 328 of file modules.cpp. +\fBParameters:\fP +.RS 4 +\fIsource\fP The source of the access check +.br +\fIdest\fP The destination of the access check +.br +\fIchannel\fP The channel which is being checked +.br +\fIaccess_type\fP See above +.RE +.PP + +.PP +Definition at line 330 of file modules.cpp. .PP References ACR_DEFAULT. .PP .nf -328 { return ACR_DEFAULT; }; +330 { return ACR_DEFAULT; }; .fi .PP .SS "int Module::OnAddBan (\fBuserrec\fP * source, \fBchanrec\fP * channel, \fBstd::string\fP banmask)\fC [virtual]\fP" .PP Called whenever a ban is added to a channel's list. .PP -Return a non-zero value to 'eat' the mode change and prevent the ban from being added. +Return a non-zero value to 'eat' the mode change and prevent the ban from being added. +.PP +\fBParameters:\fP +.RS 4 +\fIsource\fP The user adding the ban +.br +\fIchannel\fP The channel the ban is being added to +.br +\fIbanmask\fP The ban mask being added +.RE +.PP +\fBReturns:\fP +.RS 4 +1 to block the ban, 0 to continue as normal +.RE +.PP + .PP Definition at line 356 of file modules.cpp. .PP @@ -345,11 +482,143 @@ Definition at line 356 of file modules.cpp. 356 { return 0; }; .fi .PP +.SS "void Module::OnAddELine (long duration, \fBuserrec\fP * source, \fBstd::string\fP reason, \fBstd::string\fP hostmask)\fC [virtual]\fP" +.PP +Called whenever a eline is added by a local user. +.PP +This method is triggered after the line is added. +.PP +\fBParameters:\fP +.RS 4 +\fIduration\fP The duration of the line in seconds +.br +\fIsource\fP The sender of the line +.br +\fIreason\fP The reason text to be displayed +.br +\fIhostmask\fP The hostmask to add +.RE +.PP + +.PP +Definition at line 382 of file modules.cpp. +.PP +.nf +382 { }; +.fi +.PP +.SS "void Module::OnAddGLine (long duration, \fBuserrec\fP * source, \fBstd::string\fP reason, \fBstd::string\fP hostmask)\fC [virtual]\fP" +.PP +Called whenever a gline is added by a local user. +.PP +This method is triggered after the line is added. +.PP +\fBParameters:\fP +.RS 4 +\fIduration\fP The duration of the line in seconds +.br +\fIsource\fP The sender of the line +.br +\fIreason\fP The reason text to be displayed +.br +\fIhostmask\fP The hostmask to add +.RE +.PP + +.PP +Definition at line 378 of file modules.cpp. +.PP +.nf +378 { }; +.fi +.PP +.SS "void Module::OnAddKLine (long duration, \fBuserrec\fP * source, \fBstd::string\fP reason, \fBstd::string\fP hostmask)\fC [virtual]\fP" +.PP +Called whenever a kline is added by a local user. +.PP +This method is triggered after the line is added. +.PP +\fBParameters:\fP +.RS 4 +\fIduration\fP The duration of the line in seconds +.br +\fIsource\fP The sender of the line +.br +\fIreason\fP The reason text to be displayed +.br +\fIhostmask\fP The hostmask to add +.RE +.PP + +.PP +Definition at line 380 of file modules.cpp. +.PP +.nf +380 { }; +.fi +.PP +.SS "void Module::OnAddQLine (long duration, \fBuserrec\fP * source, \fBstd::string\fP reason, \fBstd::string\fP nickmask)\fC [virtual]\fP" +.PP +Called whenever a qline is added by a local user. +.PP +This method is triggered after the line is added. +.PP +\fBParameters:\fP +.RS 4 +\fIduration\fP The duration of the line in seconds +.br +\fIsource\fP The sender of the line +.br +\fIreason\fP The reason text to be displayed +.br +\fInickmask\fP The hostmask to add +.RE +.PP + +.PP +Definition at line 381 of file modules.cpp. +.PP +.nf +381 { }; +.fi +.PP +.SS "void Module::OnAddZLine (long duration, \fBuserrec\fP * source, \fBstd::string\fP reason, \fBstd::string\fP ipmask)\fC [virtual]\fP" +.PP +Called whenever a zline is added by a local user. +.PP +This method is triggered after the line is added. +.PP +\fBParameters:\fP +.RS 4 +\fIduration\fP The duration of the line in seconds +.br +\fIsource\fP The sender of the line +.br +\fIreason\fP The reason text to be displayed +.br +\fIipmask\fP The hostmask to add +.RE +.PP + +.PP +Definition at line 379 of file modules.cpp. +.PP +.nf +379 { }; +.fi +.PP .SS "void Module::OnBackgroundTimer (time_t curtime)\fC [virtual]\fP" .PP Called once every five seconds for background processing. .PP -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. +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. +.PP +\fBParameters:\fP +.RS 4 +\fIcurtime\fP The current timer derived from time(2) +.RE +.PP + .PP Definition at line 335 of file modules.cpp. .PP @@ -357,11 +626,46 @@ Definition at line 335 of file modules.cpp. 335 { }; .fi .PP +.SS "void Module::OnChangeHost (\fBuserrec\fP * user, \fBstd::string\fP newhost)\fC [virtual]\fP" +.PP +Called whenever a user's hostname is changed. +.PP +This event triggers after the host has been set. +.PP +\fBParameters:\fP +.RS 4 +\fIuser\fP The user whos host is being changed +.br +\fInewhost\fP The new hostname being set +.RE +.PP + +.PP +Definition at line 376 of file modules.cpp. +.PP +.nf +376 { }; +.fi +.PP .SS "int Module::OnChangeLocalUserGECOS (\fBuserrec\fP * user, \fBstd::string\fP newhost)\fC [virtual]\fP" .PP Called whenever a change of a local users GECOS (fullname field) is attempted. .PP -return 1 to deny the name change, or 0 to allow it. +return 1 to deny the name change, or 0 to allow it. +.PP +\fBParameters:\fP +.RS 4 +\fIuser\fP The user whos GECOS will be changed +.br +\fInewhost\fP The new GECOS +.RE +.PP +\fBReturns:\fP +.RS 4 +1 to deny the GECOS change, 0 to allow +.RE +.PP + .PP Definition at line 349 of file modules.cpp. .PP @@ -373,7 +677,21 @@ Definition at line 349 of file modules.cpp. .PP Called whenever a change of a local users displayed host is attempted. .PP -Return 1 to deny the host change, or 0 to allow it. +Return 1 to deny the host change, or 0 to allow it. +.PP +\fBParameters:\fP +.RS 4 +\fIuser\fP The user whos host will be changed +.br +\fInewhost\fP The new hostname +.RE +.PP +\fBReturns:\fP +.RS 4 +1 to deny the host change, 0 to allow +.RE +.PP + .PP Definition at line 348 of file modules.cpp. .PP @@ -381,23 +699,46 @@ Definition at line 348 of file modules.cpp. 348 { return 0; }; .fi .PP -.SS "\fBstring_list\fP Module::OnChannelSync (\fBchanrec\fP * chan)\fC [virtual]\fP" +.SS "void Module::OnChangeName (\fBuserrec\fP * user, \fBstd::string\fP gecos)\fC [virtual]\fP" .PP -Called during a netburst to sync channel data. +Called whenever a user's GECOS (realname) is changed. .PP -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. +This event triggers after the name has been set. .PP -Definition at line 330 of file modules.cpp. +\fBParameters:\fP +.RS 4 +\fIuser\fP The user who's GECOS is being changed +.br +\fIgecos\fP The new GECOS being set on the user +.RE +.PP + +.PP +Definition at line 377 of file modules.cpp. .PP .nf -330 { string_list empty; return empty; } +377 { }; .fi .PP .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. .PP -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. +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. +.PP +\fBParameters:\fP +.RS 4 +\fIuser\fP The user joining the channel +.br +\fIchan\fP The channel being joined +.RE +.PP +\fBReturns:\fP +.RS 4 +1 to explicitly allow the join, 0 to proceed as normal +.RE +.PP + .PP Definition at line 346 of file modules.cpp. .PP @@ -409,7 +750,21 @@ Definition at line 346 of file modules.cpp. .PP Called whenever a user joins a channel, to determine if invite checks should go ahead or not. .PP -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. +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. +.PP +\fBParameters:\fP +.RS 4 +\fIuser\fP The user joining the channel +.br +\fIchan\fP The channel being joined +.RE +.PP +\fBReturns:\fP +.RS 4 +1 to explicitly allow the join, 0 to proceed as normal +.RE +.PP + .PP Definition at line 343 of file modules.cpp. .PP @@ -421,7 +776,21 @@ Definition at line 343 of file modules.cpp. .PP Called whenever a user joins a channel, to determine if key checks should go ahead or not. .PP -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. +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. +.PP +\fBParameters:\fP +.RS 4 +\fIuser\fP The user joining the channel +.br +\fIchan\fP The channel being joined +.RE +.PP +\fBReturns:\fP +.RS 4 +1 to explicitly allow the join, 0 to proceed as normal +.RE +.PP + .PP Definition at line 344 of file modules.cpp. .PP @@ -433,7 +802,21 @@ Definition at line 344 of file modules.cpp. .PP Called whenever a user joins a channel, to determine if channel limit checks should go ahead or not. .PP -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. +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. +.PP +\fBParameters:\fP +.RS 4 +\fIuser\fP The user joining the channel +.br +\fIchan\fP The channel being joined +.RE +.PP +\fBReturns:\fP +.RS 4 +1 to explicitly allow the join, 0 to proceed as normal +.RE +.PP + .PP Definition at line 345 of file modules.cpp. .PP @@ -445,7 +828,19 @@ Definition at line 345 of file modules.cpp. .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. .PP -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. +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. +.PP +\fBParameters:\fP +.RS 4 +\fIuser\fP The user to check +.RE +.PP +\fBReturns:\fP +.RS 4 +true to indicate readiness, false if otherwise +.RE +.PP + .PP Definition at line 338 of file modules.cpp. .PP @@ -453,85 +848,334 @@ Definition at line 338 of file modules.cpp. 338 { return true; }; .fi .PP -.SS "int Module::OnDelBan (\fBuserrec\fP * source, \fBchanrec\fP * channel, \fBstd::string\fP banmask)\fC [virtual]\fP" +.SS "void Module::OnCleanup (int target_type, void * item)\fC [virtual]\fP" .PP -Called whenever a ban is removed from a channel's list. +Called before your module is unloaded to clean up Extensibles. .PP -Return a non-zero value to 'eat' the mode change and prevent the ban from being removed. +This method is called once for every user and channel on the network, so that when your module unloads it may clear up any remaining data in the form of Extensibles added using \fBExtensible::Extend()\fP. If the target_type variable is TYPE_USER, then void* item refers to a userrec*, otherwise it refers to a chanrec*. .PP -Definition at line 357 of file modules.cpp. +\fBParameters:\fP +.RS 4 +\fItarget_type\fP The type of item being cleaned +.br +\fIitem\fP A pointer to the item's class +.RE +.PP + +.PP +Definition at line 388 of file modules.cpp. .PP .nf -357 { return 0; }; +388 { }; .fi .PP -.SS "void Module::OnEvent (\fBEvent\fP * event)\fC [virtual]\fP" +.SS "void Module::OnDecodeMetaData (int target_type, void * target, \fBstd::string\fP extname, \fBstd::string\fP extdata)\fC [virtual]\fP" .PP -Called whenever an \fBEvent\fP class is sent to all module by another module. +Allows module data, sent via ProtoSendMetaData, to be decoded again by a receiving module. .PP -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! +Please see src/modules/m_swhois.cpp for a working example of how to use this method call. .PP -Definition at line 351 of file modules.cpp. +\fBParameters:\fP +.RS 4 +\fItarget_type\fP The type of item to decode data for, TYPE_USER or TYPE_CHANNEL +.br +\fItarget\fP The chanrec* or userrec* that data should be added to +.br +\fIextname\fP The extension name which is being sent +.br +\fIextdata\fP The extension data, encoded at the other end by an identical module through OnSyncChannelMetaData or OnSyncUserMetaData +.RE .PP -.nf -351 { return; }; -.fi + .PP -.SS "int Module::OnExtendedMode (\fBuserrec\fP * user, void * target, char modechar, int type, bool mode_on, \fBstring_list\fP & params)\fC [virtual]\fP" +Definition at line 373 of file modules.cpp. .PP -Called whenever an extended mode is to be processed. +.nf +373 { }; +.fi .PP -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. +.SS "int Module::OnDelBan (\fBuserrec\fP * source, \fBchanrec\fP * channel, \fBstd::string\fP banmask)\fC [virtual]\fP" .PP -Definition at line 318 of file modules.cpp. +Called whenever a ban is removed from a channel's list. .PP -.nf -318 { return false; } -.fi +Return a non-zero value to 'eat' the mode change and prevent the ban from being removed. .PP -.SS "void Module::OnGlobalConnect (\fBuserrec\fP * user)\fC [virtual]\fP" +\fBParameters:\fP +.RS 4 +\fIsource\fP The user deleting the ban +.br +\fIchannel\fP The channel the ban is being deleted from +.br +\fIbanmask\fP The ban mask being deleted +.RE .PP -Called whenever a user connects, anywhere on the network. +\fBReturns:\fP +.RS 4 +1 to block the unban, 0 to continue as normal +.RE .PP -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. + .PP -Definition at line 355 of file modules.cpp. +Definition at line 357 of file modules.cpp. .PP .nf -355 { }; +357 { return 0; }; .fi .PP -.SS "void Module::OnGlobalOper (\fBuserrec\fP * user)\fC [virtual]\fP" +.SS "void Module::OnDelELine (\fBuserrec\fP * source, \fBstd::string\fP hostmask)\fC [virtual]\fP" .PP -Called whenever a user is given usermode +o, anywhere on the network. +Called whenever a eline is deleted. .PP -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. +This method is triggered after the line is deleted. .PP -Definition at line 354 of file modules.cpp. +\fBParameters:\fP +.RS 4 +\fIsource\fP The user removing the line +.br +\fIhostmask\fP The hostmask to delete +.RE +.PP + +.PP +Definition at line 387 of file modules.cpp. .PP .nf -354 { }; +387 { }; .fi .PP -.SS "void Module::OnInfo (\fBuserrec\fP * user)\fC [virtual]\fP" +.SS "void Module::OnDelGLine (\fBuserrec\fP * source, \fBstd::string\fP hostmask)\fC [virtual]\fP" .PP -Called whenever a user types /INFO. +Called whenever a gline is deleted. +.PP +This method is triggered after the line is deleted. +.PP +\fBParameters:\fP +.RS 4 +\fIsource\fP The user removing the line +.br +\fIhostmask\fP The hostmask to delete +.RE +.PP + +.PP +Definition at line 383 of file modules.cpp. +.PP +.nf +383 { }; +.fi +.PP +.SS "void Module::OnDelKLine (\fBuserrec\fP * source, \fBstd::string\fP hostmask)\fC [virtual]\fP" +.PP +Called whenever a kline is deleted. +.PP +This method is triggered after the line is deleted. +.PP +\fBParameters:\fP +.RS 4 +\fIsource\fP The user removing the line +.br +\fIhostmask\fP The hostmask to delete +.RE +.PP + +.PP +Definition at line 385 of file modules.cpp. +.PP +.nf +385 { }; +.fi +.PP +.SS "void Module::OnDelQLine (\fBuserrec\fP * source, \fBstd::string\fP nickmask)\fC [virtual]\fP" +.PP +Called whenever a qline is deleted. +.PP +This method is triggered after the line is deleted. +.PP +\fBParameters:\fP +.RS 4 +\fIsource\fP The user removing the line +.br +\fIhostmask\fP The hostmask to delete +.RE +.PP + +.PP +Definition at line 386 of file modules.cpp. +.PP +.nf +386 { }; +.fi +.PP +.SS "void Module::OnDelZLine (\fBuserrec\fP * source, \fBstd::string\fP ipmask)\fC [virtual]\fP" +.PP +Called whenever a zline is deleted. +.PP +This method is triggered after the line is deleted. +.PP +\fBParameters:\fP +.RS 4 +\fIsource\fP The user removing the line +.br +\fIhostmask\fP The hostmask to delete +.RE +.PP + +.PP +Definition at line 384 of file modules.cpp. +.PP +.nf +384 { }; +.fi +.PP +.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. +.PP +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! +.PP +\fBParameters:\fP +.RS 4 +\fIevent\fP The \fBEvent\fP class being received +.RE +.PP + +.PP +Definition at line 351 of file modules.cpp. +.PP +.nf +351 { return; }; +.fi +.PP +.SS "int Module::OnExtendedMode (\fBuserrec\fP * user, void * target, char modechar, int type, bool mode_on, \fBstring_list\fP & params)\fC [virtual]\fP" +.PP +Called whenever an extended mode is to be processed. +.PP +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. +.PP +\fBParameters:\fP +.RS 4 +\fIuser\fP The user issuing the mode +.br +\fItarget\fP The user or channel having the mode set on them +.br +\fImodechar\fP The mode character being set +.br +\fItype\fP The type of mode (user or channel) being set +.br +\fImode_on\fP True if the mode is being set, false if it is being unset +.br +\fIparams\fP A list of parameters for any channel mode (currently supports either 0 or 1 parameters) +.RE +.PP + +.PP +Definition at line 319 of file modules.cpp. +.PP +.nf +319 { return false; } +.fi +.PP +.SS "void Module::OnGetServerDescription (\fBstd::string\fP servername, \fBstd::string\fP & description)\fC [virtual]\fP" +.PP +Allows modules to alter or create server descriptions Whenever a module requires a server description, for example for display in WHOIS, this function is called in all modules. +.PP +You may change or define the description given in \fBstd::string\fP &description. If you do, this description will be shown in the WHOIS fields. +.PP +\fBParameters:\fP +.RS 4 +\fIservername\fP The servername being searched for +.br +\fIdescription\fP Alterable server description for this server +.RE +.PP + +.PP +Definition at line 367 of file modules.cpp. +.PP +.nf +367 { }; +.fi +.PP +.SS "void Module::OnGlobalConnect (\fBuserrec\fP * user)\fC [virtual]\fP" +.PP +Called whenever a user connects, anywhere on the network. +.PP +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. +.PP +\fBParameters:\fP +.RS 4 +\fIuser\fP The user who is connecting +.RE +.PP + +.PP +Definition at line 355 of file modules.cpp. +.PP +.nf +355 { }; +.fi +.PP +.SS "void Module::OnGlobalOper (\fBuserrec\fP * user)\fC [virtual]\fP" +.PP +Called whenever a user is given usermode +o, anywhere on the network. +.PP +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. +.PP +\fBParameters:\fP +.RS 4 +\fIuser\fP The user who is opering +.RE +.PP + +.PP +Definition at line 354 of file modules.cpp. +.PP +.nf +354 { }; +.fi +.PP +.SS "void Module::OnInfo (\fBuserrec\fP * user)\fC [virtual]\fP" +.PP +Called whenever a user types /INFO. .PP 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 here .PP -Definition at line 321 of file modules.cpp. +\fBParameters:\fP +.RS 4 +\fIuser\fP The user issuing /INFO +.RE +.PP + +.PP +Definition at line 323 of file modules.cpp. .PP .nf -321 { }; +323 { }; .fi .PP .SS "int Module::OnKill (\fBuserrec\fP * source, \fBuserrec\fP * dest, \fBstd::string\fP reason)\fC [virtual]\fP" .PP Called when a client is disconnected by KILL. .PP -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! +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 or remote users. If you do so youre risking race conditions, desyncs and worse! +.PP +\fBParameters:\fP +.RS 4 +\fIsource\fP The user sending the KILL +.br +\fIdest\fP The user being killed +.br +\fIreason\fP The kill reason +.RE +.PP +\fBReturns:\fP +.RS 4 +1 to prevent the kill, 0 to allow +.RE +.PP + .PP Definition at line 332 of file modules.cpp. .PP @@ -543,7 +1187,16 @@ Definition at line 332 of file modules.cpp. .PP Called whenever a module is loaded. .PP -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). +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). +.PP +\fBParameters:\fP +.RS 4 +\fImod\fP A pointer to the new module +.br +\fIname\fP The new module's filename +.RE +.PP + .PP Definition at line 333 of file modules.cpp. .PP @@ -555,7 +1208,20 @@ Definition at line 333 of file modules.cpp. .PP Called whenever a topic is changed by a local user. .PP -Return 1 to deny the topic change, or 0 to allow it. +Return 1 to deny the topic change, or 0 to allow it. +.PP +\fBParameters:\fP +.RS 4 +\fIuser\fP The user changing the topic +.br +\fIchan\fP The channels who's topic is being changed +.br +\fItopic\fP The actual topic text +.br +\fI1\fP to block the topic change, 0 to allow +.RE +.PP + .PP Definition at line 350 of file modules.cpp. .PP @@ -563,11 +1229,24 @@ Definition at line 350 of file modules.cpp. 350 { return 0; }; .fi .PP -.SS "void Module::OnOper (\fBuserrec\fP * user)\fC [virtual]\fP" +.SS "void Module::OnMode (\fBuserrec\fP * user, void * dest, int target_type, \fBstd::string\fP text)\fC [virtual]\fP" .PP -Called whenever a user opers locally. +Called after every MODE command sent from a user The dest variable contains a userrec* if target_type is TYPE_USER and a chanrec* if target_type is TYPE_CHANNEL. .PP -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. +The text variable contains the remainder of the mode string after the target, e.g. '+wsi' or '+ooo nick1 nick2 nick3'. +.PP +\fBParameters:\fP +.RS 4 +\fIuser\fP The user sending the MODEs +.br +\fIdest\fP The target of the modes (userrec* or chanrec*) +.br +\fItarget_type\fP The type of target (TYPE_USER or TYPE_CHANNEL) +.br +\fItext\fP The actual modes and their parameters if any +.RE +.PP + .PP Definition at line 320 of file modules.cpp. .PP @@ -575,47 +1254,99 @@ Definition at line 320 of file modules.cpp. 320 { }; .fi .PP -.SS "int Module::OnOperCompare (\fBstd::string\fP password, \fBstd::string\fP input)\fC [virtual]\fP" +.SS "void Module::OnOper (\fBuserrec\fP * user, \fBstd::string\fP opertype)\fC [virtual]\fP" .PP -Called whenever an oper password is to be compared to what a user has input. +Called whenever a user opers locally. .PP -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. +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. .PP -Definition at line 353 of file modules.cpp. +\fBParameters:\fP +.RS 4 +\fIuser\fP The user who is opering up +.br +\fIopertype\fP The opers type name +.RE +.PP + +.PP +Definition at line 322 of file modules.cpp. .PP .nf -353 { return 0; }; +322 { }; .fi .PP -.SS "void Module::OnPacketReceive (\fBstd::string\fP & data, \fBstd::string\fP serv)\fC [virtual]\fP" +.SS "int Module::OnOperCompare (\fBstd::string\fP password, \fBstd::string\fP input)\fC [virtual]\fP" .PP -Called after a packet is received from another irc server. +Called whenever an oper password is to be compared to what a user has input. .PP -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. +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. .PP -Definition at line 314 of file modules.cpp. +\fBParameters:\fP +.RS 4 +\fIpassword\fP The oper's password +.br +\fIinput\fP The password entered +.RE +.PP +\fBReturns:\fP +.RS 4 +1 to match the passwords, 0 to do nothing +.RE +.PP + +.PP +Definition at line 353 of file modules.cpp. .PP .nf -314 { } +353 { return 0; }; .fi .PP -.SS "void Module::OnPacketTransmit (\fBstd::string\fP & data, \fBstd::string\fP serv)\fC [virtual]\fP" +.SS "void Module::OnPostLocalTopicChange (\fBuserrec\fP * user, \fBchanrec\fP * chan, \fBstd::string\fP topic)\fC [virtual]\fP" .PP -Called before a packet is transmitted across the irc network between two irc servers. +Called whenever a local topic has been changed. .PP -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. +To block topic changes you must use OnLocalTopicChange instead. .PP -Definition at line 313 of file modules.cpp. +\fBParameters:\fP +.RS 4 +\fIuser\fP The user changing the topic +.br +\fIchan\fP The channels who's topic is being changed +.br +\fItopic\fP The actual topic text +.RE +.PP + +.PP +Definition at line 366 of file modules.cpp. .PP .nf -313 { } +366 { }; .fi .PP .SS "int Module::OnPreCommand (\fBstd::string\fP command, char ** parameters, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP" .PP Called whenever any command is about to be executed. .PP -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!) +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!) +.PP +\fBParameters:\fP +.RS 4 +\fIcommand\fP The command being executed +.br +\fIparameters\fP An array of array of characters containing the parameters for the command +.br +\fIpcnt\fP The nuimber of parameters passed to the command +.br +\fIuser\fP the user issuing the command +.RE +.PP +\fBReturns:\fP +.RS 4 +1 to block the command, 0 to allow +.RE +.PP + .PP Definition at line 337 of file modules.cpp. .PP @@ -627,7 +1358,29 @@ Definition at line 337 of file modules.cpp. .PP Called whenever a mode character is processed. .PP -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! +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! +.PP +\fBParameters:\fP +.RS 4 +\fIuser\fP The user who is sending the mode +.br +\fIchan\fP The channel the mode is being sent to +.br +\fImode\fP The mode character being set +.br +\fIparam\fP The parameter for the mode or an empty string +.br +\fIadding\fP true of the mode is being added, false if it is being removed +.br +\fIpcnt\fP The parameter count for the mode (0 or 1) +.RE +.PP +\fBReturns:\fP +.RS 4 +1 to deny the mode, 0 to allow +.RE +.PP + .PP Definition at line 342 of file modules.cpp. .PP @@ -639,7 +1392,18 @@ Definition at line 342 of file modules.cpp. .PP Called immediately after any connection is accepted. .PP -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. +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. +.PP +\fBParameters:\fP +.RS 4 +\fIfd\fP The file descriptor returned from accept() +.br +\fIip\fP The IP address of the connecting user +.br +\fIlocalport\fP The local port number the user connected to +.RE +.PP + .PP Definition at line 358 of file modules.cpp. .PP @@ -651,7 +1415,14 @@ Definition at line 358 of file modules.cpp. .PP Called immediately before any socket is closed. .PP -When this event is called, shutdown() has not yet been called on the socket. +When this event is called, shutdown() has not yet been called on the socket. +.PP +\fBParameters:\fP +.RS 4 +\fIfd\fP The file descriptor of the socket prior to close() +.RE +.PP + .PP Definition at line 360 of file modules.cpp. .PP @@ -663,7 +1434,25 @@ Definition at line 360 of file modules.cpp. .PP Called immediately before any read() operation on a client socket in the core. .PP -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. +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. +.PP +\fBParameters:\fP +.RS 4 +\fIfd\fP The file descriptor of the socket +.br +\fIbuffer\fP A char* buffer being read to +.br +\fIcount\fP The size of the buffer +.br +\fIreadresult\fP The amount of characters read, or 0 +.RE +.PP +\fBReturns:\fP +.RS 4 +nonzero if the event was handled, in which case readresult must be valid on exit +.RE +.PP + .PP Definition at line 361 of file modules.cpp. .PP @@ -675,7 +1464,23 @@ Definition at line 361 of file modules.cpp. .PP Called immediately before any write() operation on a user's socket in the core. .PP -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(). +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(). +.PP +\fBParameters:\fP +.RS 4 +\fIfd\fP The file descriptor of the socket +.br +\fIbuffer\fP A char* buffer being written +.br +\fINumber\fP of characters to write +.RE +.PP +\fBReturns:\fP +.RS 4 +Number of characters actually written or 0 if you didn't handle the operation +.RE +.PP + .PP Definition at line 359 of file modules.cpp. .PP @@ -683,23 +1488,58 @@ Definition at line 359 of file modules.cpp. 359 { return 0; }; .fi .PP -.SS "void Module::OnRehash ()\fC [virtual]\fP" +.SS "void Module::OnRehash (\fBstd::string\fP parameter)\fC [virtual]\fP" .PP Called on rehash. .PP -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. +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. If a parameter is given, the core has done nothing. The module receiving the event can decide if this parameter has any relevence to it. +.PP +\fBParameters:\fP +.RS 4 +\fIparameter\fP The (optional) parameter given to REHASH from the user. +.RE .PP -Definition at line 315 of file modules.cpp. + +.PP +Definition at line 316 of file modules.cpp. .PP .nf -315 { } +316 { } +.fi +.PP +.SS "void Module::OnRemoteKill (\fBuserrec\fP * source, \fBuserrec\fP * dest, \fBstd::string\fP reason)\fC [virtual]\fP" +.PP +Called when an oper wants to disconnect a remote user via KILL. +.PP +\fBParameters:\fP +.RS 4 +\fIsource\fP The user sending the KILL +.br +\fIdest\fP The user being killed +.br +\fIreason\fP The kill reason +.RE +.PP + +.PP +Definition at line 364 of file modules.cpp. +.PP +.nf +364 { }; .fi .PP .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. .PP -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). +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). +.PP +\fBParameters:\fP +.RS 4 +\fIrequest\fP The \fBRequest\fP class being received +.RE +.PP + .PP Definition at line 352 of file modules.cpp. .PP @@ -713,7 +1553,18 @@ Referenced by Request::Send(). .PP Called whenever a list is needed for a listmode. .PP -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. +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. +.PP +\fBParameters:\fP +.RS 4 +\fIuser\fP The user requesting the list +.br +\fIchannel\fP The channel the list is for +.br +\fImode\fP The listmode which a list is being requested on +.RE +.PP + .PP Definition at line 336 of file modules.cpp. .PP @@ -725,17 +1576,35 @@ Definition at line 336 of file modules.cpp. .PP Called when a raw command is transmitted or received. .PP -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. +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. .PP -Definition at line 316 of file modules.cpp. +\fBParameters:\fP +.RS 4 +\fIraw\fP The raw string in RFC1459 format +.br +\fIinbound\fP A flag to indicate wether the data is coming into the daemon or going out to the user +.br +\fIuser\fP The user record sending the text, when inbound == true. +.RE +.PP + +.PP +Definition at line 317 of file modules.cpp. .PP .nf -316 { } +317 { } .fi .PP .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. +.PP +\fBParameters:\fP +.RS 4 +\fIsymbol\fP the symbol provided to /STATS +.RE +.PP + .PP Definition at line 347 of file modules.cpp. .PP @@ -743,11 +1612,84 @@ Definition at line 347 of file modules.cpp. 347 { }; .fi .PP +.SS "void Module::OnSyncChannel (\fBchanrec\fP * chan, \fBModule\fP * proto, void * opaque)\fC [virtual]\fP" +.PP +Allows modules to synchronize data which relates to channels during a netburst. +.PP +When this function is called, it will be called from the module which implements the linking protocol. This currently is m_spanningtree.so. A pointer to this module is given in Module* proto, so that you may call its methods such as ProtoSendMode (see below). This function will be called for every user visible on your side of the burst, allowing you to for example set modes, etc. Do not use this call to synchronize data which you have stored using class \fBExtensible\fP -- There is a specialist function OnSyncUserMetaData and OnSyncChannelMetaData for this! +.PP +For a good example of how to use this function, please see src/modules/m_chanprotect.cpp +.PP +\fBParameters:\fP +.RS 4 +\fIchan\fP The channel being syncronized +.br +\fIproto\fP A pointer to the module handling network protocol +.br +\fIopaque\fP An opaque pointer set by the protocol module, should not be modified! +.RE +.PP + +.PP +Definition at line 369 of file modules.cpp. +.PP +.nf +369 { }; +.fi +.PP +.SS "void Module::OnSyncChannelMetaData (\fBchanrec\fP * chan, \fBModule\fP * proto, void * opaque, \fBstd::string\fP extname)\fC [virtual]\fP" +.PP +Definition at line 371 of file modules.cpp. +.PP +.nf +371 { }; +.fi +.PP +.SS "void Module::OnSyncUser (\fBuserrec\fP * user, \fBModule\fP * proto, void * opaque)\fC [virtual]\fP" +.PP +Allows modules to synchronize data which relates to users during a netburst. +.PP +When this function is called, it will be called from the module which implements the linking protocol. This currently is m_spanningtree.so. A pointer to this module is given in Module* proto, so that you may call its methods such as ProtoSendMode (see below). This function will be called for every user visible on your side of the burst, allowing you to for example set modes, etc. Do not use this call to synchronize data which you have stored using class \fBExtensible\fP -- There is a specialist function OnSyncUserMetaData and OnSyncChannelMetaData for this! +.PP +\fBParameters:\fP +.RS 4 +\fIuser\fP The user being syncronized +.br +\fIproto\fP A pointer to the module handling network protocol +.br +\fIopaque\fP An opaque pointer set by the protocol module, should not be modified! +.RE +.PP + +.PP +Definition at line 368 of file modules.cpp. +.PP +.nf +368 { }; +.fi +.PP +.SS "void Module::OnSyncUserMetaData (\fBuserrec\fP * user, \fBModule\fP * proto, void * opaque, \fBstd::string\fP extname)\fC [virtual]\fP" +.PP +Definition at line 372 of file modules.cpp. +.PP +.nf +372 { }; +.fi +.PP .SS "void Module::OnUnloadModule (\fBModule\fP * mod, \fBstd::string\fP name)\fC [virtual]\fP" .PP Called whenever a module is unloaded. .PP -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). +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). +.PP +\fBParameters:\fP +.RS 4 +\fImod\fP Pointer to the module being unloaded (still valid) +.br +\fIname\fP The filename of the module being unloaded +.RE +.PP + .PP Definition at line 334 of file modules.cpp. .PP @@ -759,43 +1701,102 @@ Definition at line 334 of file modules.cpp. .PP Called when a user connects. .PP -The details of the connecting user are available to you in the parameter userrec *user +The details of the connecting user are available to you in the parameter userrec *user .PP -Definition at line 308 of file modules.cpp. +\fBParameters:\fP +.RS 4 +\fIuser\fP The user who is connecting +.RE +.PP + +.PP +Definition at line 309 of file modules.cpp. .PP .nf -308 { } +309 { } .fi .PP .SS "void Module::OnUserDisconnect (\fBuserrec\fP * user)\fC [virtual]\fP" .PP Called whenever a user's socket is closed. .PP -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. +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. .PP -Definition at line 310 of file modules.cpp. +\fBParameters:\fP +.RS 4 +\fIuser\fP The user who is disconnecting +.RE +.PP + +.PP +Definition at line 311 of file modules.cpp. .PP .nf -310 { } +311 { } +.fi +.PP +.SS "void Module::OnUserInvite (\fBuserrec\fP * source, \fBuserrec\fP * dest, \fBchanrec\fP * channel)\fC [virtual]\fP" +.PP +Called after a user has been successfully invited to a channel. +.PP +You cannot prevent the invite from occuring using this function, to do that, use OnUserPreInvite instead. +.PP +\fBParameters:\fP +.RS 4 +\fIsource\fP The user who is issuing the INVITE +.br +\fIdest\fP The user being invited +.br +\fIchannel\fP The channel the user is being invited to +.RE +.PP + +.PP +Definition at line 365 of file modules.cpp. +.PP +.nf +365 { }; .fi .PP .SS "void Module::OnUserJoin (\fBuserrec\fP * user, \fBchanrec\fP * channel)\fC [virtual]\fP" .PP Called when a user joins a channel. .PP -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 +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 .PP -Definition at line 311 of file modules.cpp. +\fBParameters:\fP +.RS 4 +\fIuser\fP The user who is joining +.br +\fIchannel\fP The channel being joined +.RE +.PP + +.PP +Definition at line 312 of file modules.cpp. .PP .nf -311 { } +312 { } .fi .PP .SS "void Module::OnUserKick (\fBuserrec\fP * source, \fBuserrec\fP * user, \fBchanrec\fP * chan, \fBstd::string\fP reason)\fC [virtual]\fP" .PP Called whenever a user is kicked. .PP -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. +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. +.PP +\fBParameters:\fP +.RS 4 +\fIsource\fP The user issuing the kick +.br +\fIuser\fP The user being kicked +.br +\fIchan\fP The channel the user is being kicked from +.br +\fIreason\fP The kick reason +.RE +.PP + .PP Definition at line 341 of file modules.cpp. .PP @@ -803,40 +1804,124 @@ Definition at line 341 of file modules.cpp. 341 { }; .fi .PP +.SS "void Module::OnUserMessage (\fBuserrec\fP * user, void * dest, int target_type, \fBstd::string\fP text)\fC [virtual]\fP" +.PP +Called after any PRIVMSG sent from a user. +.PP +The dest variable contains a userrec* if target_type is TYPE_USER and a chanrec* if target_type is TYPE_CHANNEL. +.PP +\fBParameters:\fP +.RS 4 +\fIuser\fP The user sending the message +.br +\fIdest\fP The target of the message +.br +\fItarget_type\fP The type of target (TYPE_USER or TYPE_CHANNEL) +.br +\fItext\fP the text being sent by the user +.RE +.PP + +.PP +Definition at line 362 of file modules.cpp. +.PP +.nf +362 { }; +.fi +.PP +.SS "void Module::OnUserNotice (\fBuserrec\fP * user, void * dest, int target_type, \fBstd::string\fP text)\fC [virtual]\fP" +.PP +Called after any NOTICE sent from a user. +.PP +The dest variable contains a userrec* if target_type is TYPE_USER and a chanrec* if target_type is TYPE_CHANNEL. +.PP +\fBParameters:\fP +.RS 4 +\fIuser\fP The user sending the message +.br +\fIdest\fP The target of the message +.br +\fItarget_type\fP The type of target (TYPE_USER or TYPE_CHANNEL) +.br +\fItext\fP the text being sent by the user +.RE +.PP + +.PP +Definition at line 363 of file modules.cpp. +.PP +.nf +363 { }; +.fi +.PP .SS "void Module::OnUserPart (\fBuserrec\fP * user, \fBchanrec\fP * channel)\fC [virtual]\fP" .PP Called when a user parts a channel. .PP -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 +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 .PP -Definition at line 312 of file modules.cpp. +\fBParameters:\fP +.RS 4 +\fIuser\fP The user who is parting +.br +\fIchannel\fP The channel being parted +.RE +.PP + +.PP +Definition at line 313 of file modules.cpp. .PP .nf -312 { } +313 { } .fi .PP .SS "void Module::OnUserPostNick (\fBuserrec\fP * user, \fBstd::string\fP oldnick)\fC [virtual]\fP" .PP Called after any nickchange, local or remote. .PP -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. +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. .PP -Definition at line 327 of file modules.cpp. +\fBParameters:\fP +.RS 4 +\fIuser\fP The user changing their nick +.br +\fIoldnick\fP The old nickname of the user before the nickchange +.RE +.PP + +.PP +Definition at line 329 of file modules.cpp. .PP .nf -327 { }; +329 { }; .fi .PP .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. .PP -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. +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. .PP -Definition at line 323 of file modules.cpp. +\fBParameters:\fP +.RS 4 +\fIsource\fP The user who is issuing the INVITE +.br +\fIdest\fP The user being invited +.br +\fIchannel\fP The channel the user is being invited to +.RE +.PP +\fBReturns:\fP +.RS 4 +1 to deny the invite, 0 to allow +.RE +.PP + +.PP +Definition at line 325 of file modules.cpp. .PP .nf -323 { return 0; }; +325 { return 0; }; .fi .PP .SS "int Module::OnUserPreJoin (\fBuserrec\fP * user, \fBchanrec\fP * chan, const char * cname)\fC [virtual]\fP" @@ -847,19 +1932,51 @@ Returning a value of 1 from this function stops the process immediately, causing .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. +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. .PP -Definition at line 317 of file modules.cpp. +\fBParameters:\fP +.RS 4 +\fIuser\fP The user joining the channel +.br +\fIcname\fP The channel name being joined +.RE +.PP +\fBReturns:\fP +.RS 4 +1 To prevent the join, 0 to allow it. +.RE +.PP + +.PP +Definition at line 318 of file modules.cpp. .PP .nf -317 { return 0; } +318 { return 0; } .fi .PP .SS "int Module::OnUserPreKick (\fBuserrec\fP * source, \fBuserrec\fP * user, \fBchanrec\fP * chan, \fBstd::string\fP reason)\fC [virtual]\fP" .PP Called whenever a user is about to be kicked. .PP -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. +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. +.PP +\fBParameters:\fP +.RS 4 +\fIsource\fP The user issuing the kick +.br +\fIuser\fP The user being kicked +.br +\fIchan\fP The channel the user is being kicked from +.br +\fIreason\fP The kick reason +.RE +.PP +\fBReturns:\fP +.RS 4 +1 to prevent the kick, 0 to allow it +.RE +.PP + .PP Definition at line 340 of file modules.cpp. .PP @@ -871,55 +1988,121 @@ Definition at line 340 of file modules.cpp. .PP Called whenever a user is about to PRIVMSG A user or a channel, before any processing is done. .PP -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. +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. .PP -Definition at line 324 of file modules.cpp. +\fBParameters:\fP +.RS 4 +\fIuser\fP The user sending the message +.br +\fIdest\fP The target of the message (chanrec* or userrec*) +.br +\fItarget_type\fP The type of target (TYPE_USER or TYPE_CHANNEL) +.br +\fItext\fP Changeable text being sent by the user +.RE +.PP +\fBReturns:\fP +.RS 4 +1 to deny the NOTICE, 0 to allow it +.RE +.PP + +.PP +Definition at line 326 of file modules.cpp. .PP .nf -324 { return 0; }; +326 { return 0; }; .fi .PP .SS "int Module::OnUserPreNick (\fBuserrec\fP * user, \fBstd::string\fP newnick)\fC [virtual]\fP" .PP Called before any nickchange, local or remote. .PP -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. +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. .PP -Definition at line 326 of file modules.cpp. +\fBParameters:\fP +.RS 4 +\fIuser\fP The username changing their nick +.br +\fInewnick\fP Their new nickname +.RE +.PP +\fBReturns:\fP +.RS 4 +1 to deny the change, 0 to allow +.RE +.PP + +.PP +Definition at line 328 of file modules.cpp. .PP .nf -326 { return 0; }; +328 { return 0; }; .fi .PP .SS "int Module::OnUserPreNotice (\fBuserrec\fP * user, void * dest, int target_type, \fBstd::string\fP & text)\fC [virtual]\fP" .PP Called whenever a user is about to NOTICE A user or a channel, before any processing is done. .PP -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. +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. .PP -Definition at line 325 of file modules.cpp. +\fBParameters:\fP +.RS 4 +\fIuser\fP The user sending the message +.br +\fIdest\fP The target of the message (chanrec* or userrec*) +.br +\fItarget_type\fP The type of target (TYPE_USER or TYPE_CHANNEL) +.br +\fItext\fP Changeable text being sent by the user +.RE +.PP +\fBReturns:\fP +.RS 4 +1 to deny the NOTICE, 0 to allow it +.RE +.PP + +.PP +Definition at line 327 of file modules.cpp. .PP .nf -325 { return 0; }; +327 { return 0; }; .fi .PP -.SS "void Module::OnUserQuit (\fBuserrec\fP * user)\fC [virtual]\fP" +.SS "void Module::OnUserQuit (\fBuserrec\fP * user, \fBstd::string\fP message)\fC [virtual]\fP" .PP Called when a user quits. .PP -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. +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. .PP -Definition at line 309 of file modules.cpp. +\fBParameters:\fP +.RS 4 +\fIuser\fP The user who is quitting +.br +\fImessage\fP The user's quit message +.RE +.PP + +.PP +Definition at line 310 of file modules.cpp. .PP .nf -309 { } +310 { } .fi .PP .SS "void Module::OnUserRegister (\fBuserrec\fP * user)\fC [virtual]\fP" .PP Called whenever a user is about to register their connection (e.g. .PP -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. +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. +.PP +\fBParameters:\fP +.RS 4 +\fIuser\fP The user registering +.RE +.PP + .PP Definition at line 339 of file modules.cpp. .PP @@ -927,28 +2110,100 @@ Definition at line 339 of file modules.cpp. 339 { }; .fi .PP -.SS "\fBstring_list\fP Module::OnUserSync (\fBuserrec\fP * user)\fC [virtual]\fP" +.SS "void Module::OnWallops (\fBuserrec\fP * user, \fBstd::string\fP text)\fC [virtual]\fP" .PP -Called during a netburst to sync user data. +Called after every WALLOPS command. .PP -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. +\fBParameters:\fP +.RS 4 +\fIuser\fP The user sending the WALLOPS +.br +\fItext\fP The content of the WALLOPS message +.RE .PP -Definition at line 329 of file modules.cpp. + +.PP +Definition at line 375 of file modules.cpp. .PP .nf -329 { string_list empty; return empty; } +375 { }; .fi .PP .SS "void Module::OnWhois (\fBuserrec\fP * source, \fBuserrec\fP * dest)\fC [virtual]\fP" .PP Called whenever a /WHOIS is performed on a local user. .PP -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. +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. .PP -Definition at line 322 of file modules.cpp. +\fBParameters:\fP +.RS 4 +\fIsource\fP The user issuing the WHOIS command +.br +\fIdest\fP The user who is being WHOISed +.RE +.PP + +.PP +Definition at line 324 of file modules.cpp. .PP .nf -322 { }; +324 { }; +.fi +.PP +.SS "void Module::ProtoSendMetaData (void * opaque, int target_type, void * target, \fBstd::string\fP extname, \fBstd::string\fP extdata)\fC [virtual]\fP" +.PP +Implemented by modules which provide the ability to link servers. +.PP +These modules will implement this method, which allows metadata (extra data added to user and channel records using class \fBExtensible\fP, \fBExtensible::Extend\fP, etc) to be sent to other servers on a netburst and decoded at the other end by the same module on a different server. +.PP +More documentation to follow soon. Please see src/modules/m_swhois.cpp for example of how to use this function. +.PP +\fBParameters:\fP +.RS 4 +\fIopaque\fP An opaque pointer set by the protocol module, should not be modified! +.br +\fItarget_type\fP The type of item to decode data for, TYPE_USER or TYPE_CHANNEL +.br +\fItarget\fP The chanrec* or userrec* that metadata should be sent for +.br +\fIextname\fP The extension name to send metadata for +.br +\fIextdata\fP Encoded data for this extension name, which will be encoded at the oppsite end by an identical module using OnDecodeMetaData +.RE +.PP + +.PP +Definition at line 374 of file modules.cpp. +.PP +.nf +374 { }; +.fi +.PP +.SS "void Module::ProtoSendMode (void * opaque, int target_type, void * target, \fBstd::string\fP modeline)\fC [virtual]\fP" +.PP +Implemented by modules which provide the ability to link servers. +.PP +These modules will implement this method, which allows transparent sending of servermodes down the network link as a broadcast, without a module calling it having to know the format of the MODE command before the actual mode string. +.PP +More documentation to follow soon. Please see src/modules/m_chanprotect.cpp for examples of how to use this function. +.PP +\fBParameters:\fP +.RS 4 +\fIopaque\fP An opaque pointer set by the protocol module, should not be modified! +.br +\fItarget_type\fP The type of item to decode data for, TYPE_USER or TYPE_CHANNEL +.br +\fItarget\fP The chanrec* or userrec* that modes should be sent for +.br +\fImodeline\fP The modes and parameters to be sent +.RE +.PP + +.PP +Definition at line 370 of file modules.cpp. +.PP +.nf +370 { }; .fi .PP diff --git a/docs/man/man3/ModuleFactory.3 b/docs/man/man3/ModuleFactory.3 index 38eb2c414..07c23ad69 100644 --- a/docs/man/man3/ModuleFactory.3 +++ b/docs/man/man3/ModuleFactory.3 @@ -1,4 +1,4 @@ -.TH "ModuleFactory" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ModuleFactory" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -22,7 +22,7 @@ Inherits \fBclassbase\fP. .RI "virtual \fB~ModuleFactory\fP ()" .br .ti -1c -.RI "virtual \fBModule\fP * \fBCreateModule\fP ()=0" +.RI "virtual \fBModule\fP * \fBCreateModule\fP (\fBServer\fP *Me)=0" .br .RI "\fICreates a new module. \fP" .in -1c @@ -32,28 +32,28 @@ Instantiates classes inherited from \fBModule\fP This class creates a class inhe This is to allow for modules to create many different variants of \fBModule\fP, dependent on architecture, configuration, etc. In most cases, the simple class shown in the example module m_foobar.so will suffice for most modules. .PP -Definition at line 1265 of file modules.h. +Definition at line 1654 of file modules.h. .SH "Constructor & Destructor Documentation" .PP .SS "ModuleFactory::ModuleFactory ()\fC [inline]\fP" .PP -Definition at line 1268 of file modules.h. +Definition at line 1657 of file modules.h. .PP .nf -1268 { } +1657 { } .fi .PP .SS "virtual ModuleFactory::~ModuleFactory ()\fC [inline, virtual]\fP" .PP -Definition at line 1269 of file modules.h. +Definition at line 1658 of file modules.h. .PP .nf -1269 { } +1658 { } .fi .PP .SH "Member Function Documentation" .PP -.SS "virtual \fBModule\fP* ModuleFactory::CreateModule ()\fC [pure virtual]\fP" +.SS "virtual \fBModule\fP* ModuleFactory::CreateModule (\fBServer\fP * Me)\fC [pure virtual]\fP" .PP Creates a new module. .PP diff --git a/docs/man/man3/ModuleMessage.3 b/docs/man/man3/ModuleMessage.3 index 1aeb0a9ff..88ca58ca7 100644 --- a/docs/man/man3/ModuleMessage.3 +++ b/docs/man/man3/ModuleMessage.3 @@ -1,4 +1,4 @@ -.TH "ModuleMessage" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ModuleMessage" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -29,15 +29,15 @@ Inherited by \fBEvent\fP, and \fBRequest\fP. .PP The ModuleMessage class is the base class of \fBRequest\fP and \fBEvent\fP This class is used to represent a basic data structure which is passed between modules for safe inter-module communications. .PP -Definition at line 142 of file modules.h. +Definition at line 143 of file modules.h. .SH "Constructor & Destructor Documentation" .PP .SS "virtual ModuleMessage::~ModuleMessage ()\fC [inline, virtual]\fP" .PP -Definition at line 148 of file modules.h. +Definition at line 149 of file modules.h. .PP .nf -148 {}; +149 {}; .fi .PP .SH "Member Function Documentation" diff --git a/docs/man/man3/QLine.3 b/docs/man/man3/QLine.3 index a396146bc..f50afbdd4 100644 --- a/docs/man/man3/QLine.3 +++ b/docs/man/man3/QLine.3 @@ -1,4 +1,4 @@ -.TH "QLine" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "QLine" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/Request.3 b/docs/man/man3/Request.3 index b83cace94..bd8f3ab8f 100644 --- a/docs/man/man3/Request.3 +++ b/docs/man/man3/Request.3 @@ -1,4 +1,4 @@ -.TH "Request" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "Request" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -58,7 +58,7 @@ The Request class is a unicast message directed at a given module. When this class is properly instantiated it may be sent to a module using the \fBSend()\fP method, which will call the given module's OnRequest method with this class as its parameter. .PP -Definition at line 156 of file modules.h. +Definition at line 157 of file modules.h. .SH "Constructor & Destructor Documentation" .PP .SS "Request::Request (char * anydata, \fBModule\fP * src, \fBModule\fP * dst)" @@ -146,21 +146,21 @@ References dest, and Module::OnRequest(). .PP This member holds a pointer to arbitary data set by the emitter of the message. .PP -Definition at line 161 of file modules.h. +Definition at line 162 of file modules.h. .PP Referenced by GetData(). .SS "\fBModule\fP* \fBRequest::dest\fP\fC [protected]\fP" .PP The single destination of the Request. .PP -Definition at line 168 of file modules.h. +Definition at line 169 of file modules.h. .PP Referenced by GetDest(), and Send(). .SS "\fBModule\fP* \fBRequest::source\fP\fC [protected]\fP" .PP This is a pointer to the sender of the message, which can be used to directly trigger events, or to create a reply. .PP -Definition at line 165 of file modules.h. +Definition at line 166 of file modules.h. .PP Referenced by GetSource(). diff --git a/docs/man/man3/Server.3 b/docs/man/man3/Server.3 index 55223633d..cca17c7e4 100644 --- a/docs/man/man3/Server.3 +++ b/docs/man/man3/Server.3 @@ -1,4 +1,4 @@ -.TH "Server" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "Server" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -156,6 +156,9 @@ Inherits \fBclassbase\fP. .br .RI "\fICalls the handler for a command, either implemented by the core or by another module. \fP" .ti -1c +.RI "virtual bool \fBIsValidModuleCommand\fP (\fBstd::string\fP commandname, int pcnt, \fBuserrec\fP *user)" +.br +.ti -1c .RI "virtual void \fBChangeHost\fP (\fBuserrec\fP *user, \fBstd::string\fP host)" .br .RI "\fIChange displayed hostname of a user. \fP" @@ -239,6 +242,9 @@ Inherits \fBclassbase\fP. .RI "virtual void \fBDelSocket\fP (\fBInspSocket\fP *sock)" .br .RI "\fIDeletes a class derived from \fBInspSocket\fP from the server's socket engine. \fP" +.ti -1c +.RI "virtual void \fBRehashServer\fP ()" +.br .in -1c .SH "Detailed Description" .PP @@ -246,7 +252,7 @@ Allows server output and query functions This class contains methods which allow All modules should instantiate at least one copy of this class, and use its member functions to perform their tasks. .PP -Definition at line 696 of file modules.h. +Definition at line 1081 of file modules.h. .SH "Constructor & Destructor Documentation" .PP .SS "Server::Server ()" @@ -255,11 +261,11 @@ Default constructor. .PP Creates a Server object. .PP -Definition at line 367 of file modules.cpp. +Definition at line 394 of file modules.cpp. .PP .nf -368 { -369 } +395 { +396 } .fi .PP .SS "Server::~Server ()\fC [virtual]\fP" @@ -268,11 +274,11 @@ Default destructor. .PP Destroys a Server object. .PP -Definition at line 371 of file modules.cpp. +Definition at line 398 of file modules.cpp. .PP .nf -372 { -373 } +399 { +400 } .fi .PP .SH "Member Function Documentation" @@ -287,14 +293,14 @@ typedef void (handlerfunc) (char**, int, userrec*); ... void \fBhandle_kill(char .PP When the command is typed, the parameters will be placed into the parameters array (similar to argv) and the parameter count will be placed into pcnt (similar to argv). There will never be any less parameters than the 'minparams' value you specified when creating the command. The *user parameter is the class of the user which caused the command to trigger, who will always have the flag you specified in 'flags' when creating the initial command. For example to create an oper only command create the commands with flags='o'. The source parameter is used for resource tracking, and should contain the name of your module (with file extension) e.g. 'm_blarp.so'. If you place the wrong identifier here, you can cause crashes if your module is unloaded. .PP -Definition at line 457 of file modules.cpp. +Definition at line 495 of file modules.cpp. .PP References createcommand(). .PP .nf -458 { -459 createcommand(cmd,f,flags,minparams,source); -460 } +496 { +497 createcommand(cmd,f,flags,minparams,source); +498 } .fi .PP .SS "void Server::AddELine (long duration, \fBstd::string\fP source, \fBstd::string\fP reason, \fBstd::string\fP hostmask)\fC [virtual]\fP" @@ -303,14 +309,14 @@ Adds a E-line The E-line is enforced as soon as it is added. .PP The duration must be in seconds, however you can use the \fBServer::CalcDuration\fP method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. .PP -Definition at line 720 of file modules.cpp. +Definition at line 758 of file modules.cpp. .PP References add_eline(). .PP .nf -721 { -722 add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); -723 } +759 { +760 add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); +761 } .fi .PP .SS "bool Server::AddExtendedListMode (char modechar)\fC [virtual]\fP" @@ -329,17 +335,17 @@ This call is used to implement modes like +q and +a. The characteristics of thes .PP It is down to the module handling the mode to maintain state and determine what 'items' (e.g. users, or a banlist) have the mode set on them, and process the modes at the correct times, e.g. during access checks on channels, etc. When the extended mode is triggered the OnExtendedMode method will be triggered as above. Note that the target you are given will be a channel, if for example your mode is set 'on a user' (in for example +a) you must use 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. .PP -Definition at line 625 of file modules.cpp. +Definition at line 663 of file modules.cpp. .PP References DoAddExtendedMode(), ModeMakeList(), and MT_CHANNEL. .PP .nf -626 { -627 bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1); -628 if (res) -629 ModeMakeList(modechar); -630 return res; -631 } +664 { +665 bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1); +666 if (res) +667 ModeMakeList(modechar); +668 return res; +669 } .fi .PP .SS "bool Server::AddExtendedMode (char modechar, int type, bool requires_oper, int params_when_on, int params_when_off)\fC [virtual]\fP" @@ -348,37 +354,37 @@ Adds an extended mode letter which is parsed by a module. .PP This allows modules to add extra mode letters, e.g. +x for hostcloak. the 'type' parameter is either MT_CHANNEL, MT_CLIENT, or MT_SERVER, to indicate wether the mode is a channel mode, a client mode, or a server mode. requires_oper is used with MT_CLIENT type modes only to indicate the mode can only be set or unset by an oper. If this is used for MT_CHANNEL type modes it is ignored. params_when_on is the number of modes to expect when the mode is turned on (for type MT_CHANNEL only), e.g. with mode +k, this would have a value of 1. the params_when_off value has a similar value to params_when_on, except it indicates the number of parameters to expect when the mode is disabled. Modes which act in a similar way to channel mode +l (e.g. require a parameter to enable, but not to disable) should use this parameter. The function returns false if the mode is unavailable, and will not attempt to allocate another character, as this will confuse users. This also means that as only one module can claim a specific mode character, the core does not need to keep track of which modules own which modes, which speeds up operation of the server. In this version, a mode can have at most one parameter, attempting to use more parameters will have undefined effects. .PP -Definition at line 597 of file modules.cpp. +Definition at line 635 of file modules.cpp. .PP References DEBUG, DoAddExtendedMode(), MT_CLIENT, and MT_SERVER. .PP .nf -598 { -599 if (((modechar >= 'A') && (modechar <= 'Z')) || ((modechar >= 'a') && (modechar <= 'z'))) -600 { -601 if (type == MT_SERVER) -602 { -603 log(DEBUG,'*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion'); -604 return false; -605 } -606 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT)) -607 { -608 log(DEBUG,'*** API ERROR *** Parameters on MT_CLIENT modes are not supported'); -609 return false; -610 } -611 if ((params_when_on>1) || (params_when_off>1)) -612 { -613 log(DEBUG,'*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported'); -614 return false; -615 } -616 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off); -617 } -618 else -619 { -620 log(DEBUG,'*** API ERROR *** Muppet modechar detected.'); -621 } -622 return false; -623 } +636 { +637 if (((modechar >= 'A') && (modechar <= 'Z')) || ((modechar >= 'a') && (modechar <= 'z'))) +638 { +639 if (type == MT_SERVER) +640 { +641 log(DEBUG,'*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion'); +642 return false; +643 } +644 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT)) +645 { +646 log(DEBUG,'*** API ERROR *** Parameters on MT_CLIENT modes are not supported'); +647 return false; +648 } +649 if ((params_when_on>1) || (params_when_off>1)) +650 { +651 log(DEBUG,'*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported'); +652 return false; +653 } +654 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off); +655 } +656 else +657 { +658 log(DEBUG,'*** API ERROR *** Muppet modechar detected.'); +659 } +660 return false; +661 } .fi .PP .SS "void Server::AddGLine (long duration, \fBstd::string\fP source, \fBstd::string\fP reason, \fBstd::string\fP hostmask)\fC [virtual]\fP" @@ -387,14 +393,14 @@ Adds a G-line The G-line is propogated to all of the servers in the mesh and enf .PP The duration must be in seconds, however you can use the \fBServer::CalcDuration\fP method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. .PP -Definition at line 700 of file modules.cpp. +Definition at line 738 of file modules.cpp. .PP References add_gline(). .PP .nf -701 { -702 add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); -703 } +739 { +740 add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); +741 } .fi .PP .SS "void Server::AddKLine (long duration, \fBstd::string\fP source, \fBstd::string\fP reason, \fBstd::string\fP hostmask)\fC [virtual]\fP" @@ -403,14 +409,14 @@ Adds a K-line The K-line is enforced as soon as it is added. .PP The duration must be in seconds, however you can use the \fBServer::CalcDuration\fP method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. .PP -Definition at line 715 of file modules.cpp. +Definition at line 753 of file modules.cpp. .PP References add_kline(). .PP .nf -716 { -717 add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); -718 } +754 { +755 add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); +756 } .fi .PP .SS "void Server::AddQLine (long duration, \fBstd::string\fP source, \fBstd::string\fP reason, \fBstd::string\fP nickname)\fC [virtual]\fP" @@ -419,28 +425,28 @@ Adds a Q-line The Q-line is propogated to all of the servers in the mesh and enf .PP The duration must be in seconds, however you can use the \fBServer::CalcDuration\fP method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. .PP -Definition at line 705 of file modules.cpp. +Definition at line 743 of file modules.cpp. .PP References add_qline(). .PP .nf -706 { -707 add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str()); -708 } +744 { +745 add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str()); +746 } .fi .PP .SS "void Server::AddSocket (\fBInspSocket\fP * sock)\fC [virtual]\fP" .PP Adds a class derived from \fBInspSocket\fP to the server's socket engine. .PP -Definition at line 375 of file modules.cpp. +Definition at line 402 of file modules.cpp. .PP References module_sockets. .PP .nf -376 { -377 module_sockets.push_back(sock); -378 } +403 { +404 module_sockets.push_back(sock); +405 } .fi .PP .SS "void Server::AddZLine (long duration, \fBstd::string\fP source, \fBstd::string\fP reason, \fBstd::string\fP ipaddr)\fC [virtual]\fP" @@ -449,14 +455,14 @@ Adds a Z-line The Z-line is propogated to all of the servers in the mesh and enf .PP The duration must be in seconds, however you can use the \fBServer::CalcDuration\fP method to convert durations into the 1w2d3h3m6s format used by /GLINE etc. The source is an arbitary string used to indicate who or what sent the data, usually this is the nickname of a person, or a server name. .PP -Definition at line 710 of file modules.cpp. +Definition at line 748 of file modules.cpp. .PP References add_zline(). .PP .nf -711 { -712 add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str()); -713 } +749 { +750 add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str()); +751 } .fi .PP .SS "long Server::CalcDuration (\fBstd::string\fP duration)\fC [virtual]\fP" @@ -465,14 +471,14 @@ Calculates a duration This method will take a string containing a formatted dura .PP '1w2d') and return its value as a total number of seconds. This is the same function used internally by /GLINE etc to set the ban times. .PP -Definition at line 750 of file modules.cpp. +Definition at line 788 of file modules.cpp. .PP References duration(). .PP .nf -751 { -752 return duration(delta.c_str()); -753 } +789 { +790 return duration(delta.c_str()); +791 } .fi .PP .SS "void Server::CallCommandHandler (\fBstd::string\fP commandname, char ** parameters, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP" @@ -483,12 +489,12 @@ You can use this function to trigger other commands in the ircd, such as PRIVMSG .br ) you may use them as callback identifiers. The first parameter to this method is the name of the command handler you wish to call, e.g. PRIVMSG. This will be a command handler previously registered by the core or wih \fBAddCommand()\fP. The second parameter is an array of parameters, and the third parameter is a count of parameters in the array. If you do not pass enough parameters to meet the minimum needed by the handler, the functiom will silently ignore it. The final parameter is the user executing the command handler, used for privilage checks, etc. .PP -Definition at line 447 of file modules.cpp. +Definition at line 480 of file modules.cpp. .PP .nf -448 { -449 call_handler(commandname.c_str(),parameters,pcnt,user); -450 } +481 { +482 call_handler(commandname.c_str(),parameters,pcnt,user); +483 } .fi .PP .SS "void Server::ChangeGECOS (\fBuserrec\fP * user, \fBstd::string\fP gecos)\fC [virtual]\fP" @@ -497,14 +503,14 @@ Change GECOS (fullname) of a user. .PP You should always call this method to change a user's GECOS rather than writing directly to the fullname member of userrec, as any change applied via this method will be propogated to any linked servers. .PP -Definition at line 540 of file modules.cpp. +Definition at line 578 of file modules.cpp. .PP References ChangeName(). .PP .nf -541 { -542 ChangeName(user,gecos.c_str()); -543 } +579 { +580 ChangeName(user,gecos.c_str()); +581 } .fi .PP .SS "void Server::ChangeHost (\fBuserrec\fP * user, \fBstd::string\fP host)\fC [virtual]\fP" @@ -513,14 +519,14 @@ Change displayed hostname of a user. .PP You should always call this method to change a user's host rather than writing directly to the dhost member of userrec, as any change applied via this method will be propogated to any linked servers. .PP -Definition at line 535 of file modules.cpp. +Definition at line 573 of file modules.cpp. .PP References ChangeDisplayedHost(). .PP .nf -536 { -537 ChangeDisplayedHost(user,host.c_str()); -538 } +574 { +575 ChangeDisplayedHost(user,host.c_str()); +576 } .fi .PP .SS "void Server::ChangeUserNick (\fBuserrec\fP * user, \fBstd::string\fP nickname)\fC [virtual]\fP" @@ -529,12 +535,12 @@ Forces a user nickchange. .PP This command works similarly to SVSNICK, and can be used to implement Q-lines etc. If you specify an invalid nickname, the nick change will be dropped and the target user will receive the error numeric for it. .PP -Definition at line 432 of file modules.cpp. +Definition at line 465 of file modules.cpp. .PP .nf -433 { -434 force_nickchange(user,nickname.c_str()); -435 } +466 { +467 force_nickchange(user,nickname.c_str()); +468 } .fi .PP .SS "\fBstd::string\fP Server::ChanMode (\fBuserrec\fP * User, \fBchanrec\fP * Chan)\fC [virtual]\fP" @@ -543,14 +549,14 @@ Attempts to look up a user's privilages on a channel. .PP This function will return a string containing either @, %, +, or an empty string, representing the user's privilages upon the channel you specify. .PP -Definition at line 565 of file modules.cpp. +Definition at line 603 of file modules.cpp. .PP References cmode(). .PP .nf -566 { -567 return cmode(User,Chan); -568 } +604 { +605 return cmode(User,Chan); +606 } .fi .PP .SS "bool Server::CommonChannels (\fBuserrec\fP * u1, \fBuserrec\fP * u2)\fC [virtual]\fP" @@ -559,14 +565,14 @@ Returns true if two users share a common channel. .PP This method is used internally by the NICK and QUIT commands, and the \fBServer::SendCommon\fP method. .PP -Definition at line 513 of file modules.cpp. +Definition at line 551 of file modules.cpp. .PP References common_channels(). .PP .nf -514 { -515 return (common_channels(u1,u2) != 0); -516 } +552 { +553 return (common_channels(u1,u2) != 0); +554 } .fi .PP .SS "int Server::CountUsers (\fBchanrec\fP * c)\fC [virtual]\fP" @@ -575,103 +581,103 @@ Returns a count of the number of users on a channel. .PP This will NEVER be 0, as if the chanrec exists, it will have at least one user in the channel. .PP -Definition at line 633 of file modules.cpp. +Definition at line 671 of file modules.cpp. .PP .nf -634 { -635 return usercount(c); -636 } +672 { +673 return usercount(c); +674 } .fi .PP .SS "bool Server::DelELine (\fBstd::string\fP hostmask)\fC [virtual]\fP" .PP Deletes a local E-Line. .PP -Definition at line 745 of file modules.cpp. +Definition at line 783 of file modules.cpp. .PP References del_eline(). .PP .nf -746 { -747 return del_eline(hostmask.c_str()); -748 } +784 { +785 return del_eline(hostmask.c_str()); +786 } .fi .PP .SS "bool Server::DelGLine (\fBstd::string\fP hostmask)\fC [virtual]\fP" .PP Deletes a G-Line from all servers on the mesh. .PP -Definition at line 725 of file modules.cpp. +Definition at line 763 of file modules.cpp. .PP References del_gline(). .PP .nf -726 { -727 return del_gline(hostmask.c_str()); -728 } +764 { +765 return del_gline(hostmask.c_str()); +766 } .fi .PP .SS "bool Server::DelKLine (\fBstd::string\fP hostmask)\fC [virtual]\fP" .PP Deletes a local K-Line. .PP -Definition at line 740 of file modules.cpp. +Definition at line 778 of file modules.cpp. .PP References del_kline(). .PP .nf -741 { -742 return del_kline(hostmask.c_str()); -743 } +779 { +780 return del_kline(hostmask.c_str()); +781 } .fi .PP .SS "bool Server::DelQLine (\fBstd::string\fP nickname)\fC [virtual]\fP" .PP Deletes a Q-Line from all servers on the mesh. .PP -Definition at line 730 of file modules.cpp. +Definition at line 768 of file modules.cpp. .PP References del_qline(). .PP .nf -731 { -732 return del_qline(nickname.c_str()); -733 } +769 { +770 return del_qline(nickname.c_str()); +771 } .fi .PP .SS "void Server::DelSocket (\fBInspSocket\fP * sock)\fC [virtual]\fP" .PP Deletes a class derived from \fBInspSocket\fP from the server's socket engine. .PP -Definition at line 380 of file modules.cpp. +Definition at line 413 of file modules.cpp. .PP References module_sockets. .PP .nf -381 { -382 for (std::vector::iterator a = module_sockets.begin(); a < module_sockets.end(); a++) -383 { -384 if (*a == sock) -385 { -386 module_sockets.erase(a); -387 return; -388 } -389 } -390 } +414 { +415 for (std::vector::iterator a = module_sockets.begin(); a < module_sockets.end(); a++) +416 { +417 if (*a == sock) +418 { +419 module_sockets.erase(a); +420 return; +421 } +422 } +423 } .fi .PP .SS "bool Server::DelZLine (\fBstd::string\fP ipaddr)\fC [virtual]\fP" .PP Deletes a Z-Line from all servers on the mesh. .PP -Definition at line 735 of file modules.cpp. +Definition at line 773 of file modules.cpp. .PP References del_zline(). .PP .nf -736 { -737 return del_zline(ipaddr.c_str()); -738 } +774 { +775 return del_zline(ipaddr.c_str()); +776 } .fi .PP .SS "\fBchanrec\fP * Server::FindChannel (\fBstd::string\fP channel)\fC [virtual]\fP" @@ -680,12 +686,12 @@ Attempts to look up a channel and return a pointer to it. .PP This function will return NULL if the channel does not exist. .PP -Definition at line 560 of file modules.cpp. +Definition at line 598 of file modules.cpp. .PP .nf -561 { -562 return FindChan(channel.c_str()); -563 } +599 { +600 return FindChan(channel.c_str()); +601 } .fi .PP .SS "\fBuserrec\fP * Server::FindDescriptor (int socket)\fC [virtual]\fP" @@ -694,12 +700,12 @@ Attempts to look up a nick using the file descriptor associated with that nick. .PP This function will return NULL if the file descriptor is not associated with a valid user. .PP -Definition at line 555 of file modules.cpp. +Definition at line 593 of file modules.cpp. .PP .nf -556 { -557 return (socket < 65536 ? fd_ref_table[socket] : NULL); -558 } +594 { +595 return (socket < 65536 ? fd_ref_table[socket] : NULL); +596 } .fi .PP .SS "\fBModule\fP * Server::FindModule (\fBstd::string\fP name)\fC [virtual]\fP" @@ -708,21 +714,21 @@ This function finds a module by name. .PP You must provide the filename of the module. If the module cannot be found (is not loaded) the function will return NULL. .PP -Definition at line 784 of file modules.cpp. +Definition at line 822 of file modules.cpp. .PP References MODCOUNT, module_names, and modules. .PP .nf -785 { -786 for (int i = 0; i <= MODCOUNT; i++) -787 { -788 if (module_names[i] == name) -789 { -790 return modules[i]; -791 } -792 } -793 return NULL; -794 } +823 { +824 for (int i = 0; i <= MODCOUNT; i++) +825 { +826 if (module_names[i] == name) +827 { +828 return modules[i]; +829 } +830 } +831 return NULL; +832 } .fi .PP .SS "\fBuserrec\fP * Server::FindNick (\fBstd::string\fP nick)\fC [virtual]\fP" @@ -731,12 +737,12 @@ Attempts to look up a nick and return a pointer to it. .PP This function will return NULL if the nick does not exist. .PP -Definition at line 550 of file modules.cpp. +Definition at line 588 of file modules.cpp. .PP .nf -551 { -552 return Find(nick); -553 } +589 { +590 return Find(nick); +591 } .fi .PP .SS "\fBAdmin\fP Server::GetAdmin ()\fC [virtual]\fP" @@ -745,48 +751,48 @@ Returns the information of the server as returned by the /ADMIN command. .PP See the \fBAdmin\fP class for further information of the return value. The members \fBAdmin::Nick\fP, \fBAdmin::Email\fP and \fBAdmin::Name\fP contain the information for the server where the module is loaded. .PP -Definition at line 590 of file modules.cpp. +Definition at line 628 of file modules.cpp. .PP .nf -591 { -592 return Admin(getadminname(),getadminemail(),getadminnick()); -593 } +629 { +630 return Admin(getadminname(),getadminemail(),getadminnick()); +631 } .fi .PP .SS "\fBstd::string\fP Server::GetNetworkName ()\fC [virtual]\fP" .PP Returns the network name, global to all linked servers. .PP -Definition at line 580 of file modules.cpp. +Definition at line 618 of file modules.cpp. .PP .nf -581 { -582 return getnetworkname(); -583 } +619 { +620 return getnetworkname(); +621 } .fi .PP .SS "\fBstd::string\fP Server::GetServerDescription ()\fC [virtual]\fP" .PP Returns the server description string of the local server. .PP -Definition at line 585 of file modules.cpp. +Definition at line 623 of file modules.cpp. .PP .nf -586 { -587 return getserverdesc(); -588 } +624 { +625 return getserverdesc(); +626 } .fi .PP .SS "\fBstd::string\fP Server::GetServerName ()\fC [virtual]\fP" .PP Returns the server name of the server where the module is loaded. .PP -Definition at line 575 of file modules.cpp. +Definition at line 613 of file modules.cpp. .PP .nf -576 { -577 return getservername(); -578 } +614 { +615 return getservername(); +616 } .fi .PP .SS "\fBchanuserlist\fP Server::GetUsers (\fBchanrec\fP * chan)\fC [virtual]\fP" @@ -795,22 +801,22 @@ Fetches the userlist of a channel. .PP This function must be here and not a member of userrec or chanrec due to include constraints. .PP -Definition at line 420 of file modules.cpp. +Definition at line 453 of file modules.cpp. .PP References chanrec::GetUsers(), and list. .PP .nf -421 { -422 chanuserlist userl; -423 userl.clear(); -424 std::vector *list = chan->GetUsers(); -425 for (std::vector::iterator i = list->begin(); i != list->end(); i++) -426 { -427 char* o = *i; -428 userl.push_back((userrec*)o); -429 } -430 return userl; -431 } +454 { +455 chanuserlist userl; +456 userl.clear(); +457 std::vector *list = chan->GetUsers(); +458 for (std::vector::iterator i = list->begin(); i != list->end(); i++) +459 { +460 char* o = *i; +461 userl.push_back((userrec*)o); +462 } +463 return userl; +464 } .fi .PP .SS "bool Server::IsNick (\fBstd::string\fP nick)\fC [virtual]\fP" @@ -819,14 +825,14 @@ Returns true if a nick is valid. .PP Nicks for unregistered connections will return false. .PP -Definition at line 545 of file modules.cpp. +Definition at line 583 of file modules.cpp. .PP References isnick(). .PP .nf -546 { -547 return (isnick(nick.c_str()) != 0); -548 } +584 { +585 return (isnick(nick.c_str()) != 0); +586 } .fi .PP .SS "bool Server::IsOnChannel (\fBuserrec\fP * User, \fBchanrec\fP * Chan)\fC [virtual]\fP" @@ -835,14 +841,14 @@ Checks if a user is on a channel. .PP This function will return true or false to indicate if user 'User' is on channel 'Chan'. .PP -Definition at line 570 of file modules.cpp. +Definition at line 608 of file modules.cpp. .PP References has_channel(). .PP .nf -571 { -572 return has_channel(User,Chan); -573 } +609 { +610 return has_channel(User,Chan); +611 } .fi .PP .SS "bool Server::IsUlined (\fBstd::string\fP server)\fC [virtual]\fP" @@ -851,50 +857,60 @@ Returns true if the servername you give is ulined. .PP ULined servers have extra privilages. They are allowed to change nicknames on remote servers, change modes of clients which are on remote servers and set modes of channels where there are no channel operators for that channel on the ulined server, amongst other things. Ulined server data is also broadcast across the mesh at all times as opposed to selectively messaged in the case of normal servers, as many ulined server types (such as services) do not support meshed links and must operate in this manner. .PP -Definition at line 442 of file modules.cpp. +Definition at line 475 of file modules.cpp. .PP References is_uline(). .PP .nf -443 { -444 return is_uline(server.c_str()); -445 } +476 { +477 return is_uline(server.c_str()); +478 } .fi .PP .SS "bool Server::IsValidMask (\fBstd::string\fP mask)\fC [virtual]\fP" .PP Returns true if a nick!ident string is correctly formatted, false if otherwise. .PP -Definition at line 755 of file modules.cpp. +Definition at line 793 of file modules.cpp. +.PP +.nf +794 { +795 const char* dest = mask.c_str(); +796 if (strchr(dest,'!')==0) +797 return false; +798 if (strchr(dest,'@')==0) +799 return false; +800 for (unsigned int i = 0; i < strlen(dest); i++) +801 if (dest[i] < 32) +802 return false; +803 for (unsigned int i = 0; i < strlen(dest); i++) +804 if (dest[i] > 126) +805 return false; +806 unsigned int c = 0; +807 for (unsigned int i = 0; i < strlen(dest); i++) +808 if (dest[i] == '!') +809 c++; +810 if (c>1) +811 return false; +812 c = 0; +813 for (unsigned int i = 0; i < strlen(dest); i++) +814 if (dest[i] == '@') +815 c++; +816 if (c>1) +817 return false; +818 +819 return true; +820 } +.fi +.PP +.SS "bool Server::IsValidModuleCommand (\fBstd::string\fP commandname, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP" +.PP +Definition at line 485 of file modules.cpp. .PP .nf -756 { -757 const char* dest = mask.c_str(); -758 if (strchr(dest,'!')==0) -759 return false; -760 if (strchr(dest,'@')==0) -761 return false; -762 for (unsigned int i = 0; i < strlen(dest); i++) -763 if (dest[i] < 32) -764 return false; -765 for (unsigned int i = 0; i < strlen(dest); i++) -766 if (dest[i] > 126) -767 return false; -768 unsigned int c = 0; -769 for (unsigned int i = 0; i < strlen(dest); i++) -770 if (dest[i] == '!') -771 c++; -772 if (c>1) -773 return false; -774 c = 0; -775 for (unsigned int i = 0; i < strlen(dest); i++) -776 if (dest[i] == '@') -777 c++; -778 if (c>1) -779 return false; -780 -781 return true; -782 } +486 { +487 return is_valid_cmd(commandname.c_str(), pcnt, user); +488 } .fi .PP .SS "\fBchanrec\fP * Server::JoinUserToChannel (\fBuserrec\fP * user, \fBstd::string\fP cname, \fBstd::string\fP key)\fC [virtual]\fP" @@ -903,12 +919,12 @@ Forces a user to join a channel. .PP This is similar to svsjoin and can be used to implement redirection, etc. On success, the return value is a valid pointer to a chanrec* of the channel the user was joined to. On failure, the result is NULL. .PP -Definition at line 410 of file modules.cpp. +Definition at line 443 of file modules.cpp. .PP .nf -411 { -412 return add_channel(user,cname.c_str(),key.c_str(),false); -413 } +444 { +445 return add_channel(user,cname.c_str(),key.c_str(),false); +446 } .fi .PP .SS "void Server::Log (int level, \fBstd::string\fP s)\fC [virtual]\fP" @@ -917,12 +933,12 @@ Writes a log string. .PP This method writes a line of text to the log. If the level given is lower than the level given in the configuration, this command has no effect. .PP -Definition at line 452 of file modules.cpp. +Definition at line 490 of file modules.cpp. .PP .nf -453 { -454 log(level,'%s',s.c_str()); -455 } +491 { +492 log(level,'%s',s.c_str()); +493 } .fi .PP .SS "bool Server::MatchText (\fBstd::string\fP sliteral, \fBstd::string\fP spattern)\fC [virtual]\fP" @@ -931,15 +947,15 @@ Matches text against a glob pattern. .PP Uses the ircd's internal matching function to match string against a globbing pattern, e.g. *!*@*.com Returns true if the literal successfully matches the pattern, false if otherwise. .PP -Definition at line 397 of file modules.cpp. +Definition at line 430 of file modules.cpp. .PP .nf -398 { -399 char literal[MAXBUF],pattern[MAXBUF]; -400 strlcpy(literal,sliteral.c_str(),MAXBUF); -401 strlcpy(pattern,spattern.c_str(),MAXBUF); -402 return match(literal,pattern); -403 } +431 { +432 char literal[MAXBUF],pattern[MAXBUF]; +433 strlcpy(literal,sliteral.c_str(),MAXBUF); +434 strlcpy(pattern,spattern.c_str(),MAXBUF); +435 return match(literal,pattern); +436 } .fi .PP .SS "\fBchanrec\fP * Server::PartUserFromChannel (\fBuserrec\fP * user, \fBstd::string\fP cname, \fBstd::string\fP reason)\fC [virtual]\fP" @@ -948,12 +964,12 @@ Forces a user to part a channel. .PP This is similar to svspart and can be used to implement redirection, etc. Although the return value of this function is a pointer to a channel record, the returned data is undefined and should not be read or written to. This behaviour may be changed in a future version. .PP -Definition at line 415 of file modules.cpp. +Definition at line 448 of file modules.cpp. .PP .nf -416 { -417 return del_channel(user,cname.c_str(),reason.c_str(),false); -418 } +449 { +450 return del_channel(user,cname.c_str(),reason.c_str(),false); +451 } .fi .PP .SS "bool Server::PseudoToUser (\fBuserrec\fP * alive, \fBuserrec\fP * zombie, \fBstd::string\fP message)\fC [virtual]\fP" @@ -962,39 +978,39 @@ This user takes one user, and switches their file descriptor with another user, .PP The user in 'alive' is booted off the server with the given message. The user referred to by 'zombie' should have previously been locked with Server::ZombifyUser, otherwise stale sockets and file descriptor leaks can occur. After this call, the pointer to alive will be invalid, and the pointer to zombie will be equivalent in effect to the old pointer to alive. .PP -Definition at line 670 of file modules.cpp. +Definition at line 708 of file modules.cpp. .PP References ucrec::channel, userrec::chans, userrec::ClearBuffer(), connection::fd, FD_MAGIC_NUMBER, connection::host, userrec::ident, chanrec::name, userrec::nick, chanrec::setby, chanrec::topic, and chanrec::topicset. .PP .nf -671 { -672 zombie->fd = alive->fd; -673 alive->fd = FD_MAGIC_NUMBER; -674 alive->ClearBuffer(); -675 Write(zombie->fd,':%s!%s@%s NICK %s',alive->nick,alive->ident,alive->host,zombie->nick); -676 kill_link(alive,message.c_str()); -677 fd_ref_table[zombie->fd] = zombie; -678 for (int i = 0; i != MAXCHANS; i++) -679 { -680 if (zombie->chans[i].channel != NULL) -681 { -682 if (zombie->chans[i].channel->name) -683 { -684 chanrec* Ptr = zombie->chans[i].channel; -685 WriteFrom(zombie->fd,zombie,'JOIN %s',Ptr->name); -686 if (Ptr->topicset) -687 { -688 WriteServ(zombie->fd,'332 %s %s :%s', zombie->nick, Ptr->name, Ptr->topic); -689 WriteServ(zombie->fd,'333 %s %s %s %d', zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset); -690 } -691 userlist(zombie,Ptr); -692 WriteServ(zombie->fd,'366 %s %s :End of /NAMES list.', zombie->nick, Ptr->name); -693 -694 } -695 } -696 } -697 return true; -698 } +709 { +710 zombie->fd = alive->fd; +711 alive->fd = FD_MAGIC_NUMBER; +712 alive->ClearBuffer(); +713 Write(zombie->fd,':%s!%s@%s NICK %s',alive->nick,alive->ident,alive->host,zombie->nick); +714 kill_link(alive,message.c_str()); +715 fd_ref_table[zombie->fd] = zombie; +716 for (int i = 0; i != MAXCHANS; i++) +717 { +718 if (zombie->chans[i].channel != NULL) +719 { +720 if (zombie->chans[i].channel->name) +721 { +722 chanrec* Ptr = zombie->chans[i].channel; +723 WriteFrom(zombie->fd,zombie,'JOIN %s',Ptr->name); +724 if (Ptr->topicset) +725 { +726 WriteServ(zombie->fd,'332 %s %s :%s', zombie->nick, Ptr->name, Ptr->topic); +727 WriteServ(zombie->fd,'333 %s %s %s %d', zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset); +728 } +729 userlist(zombie,Ptr); +730 WriteServ(zombie->fd,'366 %s %s :End of /NAMES list.', zombie->nick, Ptr->name); +731 +732 } +733 } +734 } +735 return true; +736 } .fi .PP .SS "void Server::QuitUser (\fBuserrec\fP * user, \fBstd::string\fP reason)\fC [virtual]\fP" @@ -1007,12 +1023,23 @@ WARNING! .PP Once you call this function, userrec* user will immediately become INVALID. You MUST NOT write to, or read from this pointer after calling the QuitUser method UNDER ANY CIRCUMSTANCES! The best course of action after calling this method is to immediately bail from your handler. .PP -Definition at line 437 of file modules.cpp. +Definition at line 470 of file modules.cpp. +.PP +.nf +471 { +472 kill_link(user,reason.c_str()); +473 } +.fi +.PP +.SS "void Server::RehashServer ()\fC [virtual]\fP" +.PP +Definition at line 407 of file modules.cpp. .PP .nf -438 { -439 kill_link(user,reason.c_str()); -440 } +408 { +409 WriteOpers('*** Rehashing config file'); +410 ReadConfig(false,NULL); +411 } .fi .PP .SS "void Server::Send (int Socket, \fBstd::string\fP s)\fC [virtual]\fP" @@ -1021,12 +1048,12 @@ Sends a line of text down a TCP/IP socket. .PP This method writes a line of text to an established socket, cutting it to 510 characters plus a carriage return and linefeed if required. .PP -Definition at line 467 of file modules.cpp. +Definition at line 505 of file modules.cpp. .PP .nf -468 { -469 Write(Socket,'%s',s.c_str()); -470 } +506 { +507 Write(Socket,'%s',s.c_str()); +508 } .fi .PP .SS "void Server::SendChannel (\fBuserrec\fP * User, \fBchanrec\fP * Channel, \fBstd::string\fP s, bool IncludeSender)\fC [virtual]\fP" @@ -1035,19 +1062,19 @@ Sends text from a user to a channel (mulicast). .PP This method writes a line of text to a channel, with the given user's nick/ident /host combination prepended, as used in PRIVMSG etc commands (see RFC 1459). If the IncludeSender flag is set, then the text is also sent back to the user from which it originated, as seen in MODE (see RFC 1459). .PP -Definition at line 501 of file modules.cpp. +Definition at line 539 of file modules.cpp. .PP .nf -502 { -503 if (IncludeSender) -504 { -505 WriteChannel(Channel,User,'%s',s.c_str()); -506 } -507 else -508 { -509 ChanExceptSender(Channel,User,'%s',s.c_str()); -510 } -511 } +540 { +541 if (IncludeSender) +542 { +543 WriteChannel(Channel,User,'%s',s.c_str()); +544 } +545 else +546 { +547 ChanExceptSender(Channel,User,'%s',s.c_str()); +548 } +549 } .fi .PP .SS "void Server::SendChannelServerNotice (\fBstd::string\fP ServName, \fBchanrec\fP * Channel, \fBstd::string\fP text)\fC [virtual]\fP" @@ -1056,12 +1083,12 @@ Writes text to a channel, but from a server, including all. .PP This can be used to send server notices to a group of users. .PP -Definition at line 496 of file modules.cpp. +Definition at line 534 of file modules.cpp. .PP .nf -497 { -498 WriteChannelWithServ((char*)ServName.c_str(), Channel, '%s', text.c_str()); -499 } +535 { +536 WriteChannelWithServ((char*)ServName.c_str(), Channel, '%s', text.c_str()); +537 } .fi .PP .SS "void Server::SendCommon (\fBuserrec\fP * User, \fBstd::string\fP text, bool IncludeSender)\fC [virtual]\fP" @@ -1070,19 +1097,19 @@ Sends text from a user to one or more channels (mulicast). .PP This method writes a line of text to all users which share a common channel with a given user, with the user's nick/ident/host combination prepended, as used in PRIVMSG etc commands (see RFC 1459). If the IncludeSender flag is set, then the text is also sent back to the user from which it originated, as seen in NICK (see RFC 1459). Otherwise, it is only sent to the other recipients, as seen in QUIT. .PP -Definition at line 518 of file modules.cpp. +Definition at line 556 of file modules.cpp. .PP .nf -519 { -520 if (IncludeSender) -521 { -522 WriteCommon(User,'%s',text.c_str()); -523 } -524 else -525 { -526 WriteCommonExcept(User,'%s',text.c_str()); -527 } -528 } +557 { +558 if (IncludeSender) +559 { +560 WriteCommon(User,'%s',text.c_str()); +561 } +562 else +563 { +564 WriteCommonExcept(User,'%s',text.c_str()); +565 } +566 } .fi .PP .SS "void Server::SendFrom (int Socket, \fBuserrec\fP * User, \fBstd::string\fP s)\fC [virtual]\fP" @@ -1091,12 +1118,12 @@ Sends text from a user to a socket. .PP This method writes a line of text to an established socket, with the given user's nick/ident /host combination prepended, as used in PRIVSG etc commands (see RFC 1459) .PP -Definition at line 477 of file modules.cpp. +Definition at line 515 of file modules.cpp. .PP .nf -478 { -479 WriteFrom(Socket,User,'%s',s.c_str()); -480 } +516 { +517 WriteFrom(Socket,User,'%s',s.c_str()); +518 } .fi .PP .SS "void Server::SendMode (char ** parameters, int pcnt, \fBuserrec\fP * user)\fC [virtual]\fP" @@ -1119,14 +1146,14 @@ Srv->SendMode(modes,3,user); .PP The modes will originate from the server where the command was issued, however responses (e.g. numerics) will be sent to the user you provide as the third parameter. You must be sure to get the number of parameters correct in the pcnt parameter otherwise you could leave your server in an unstable state! .PP -Definition at line 462 of file modules.cpp. +Definition at line 500 of file modules.cpp. .PP References server_mode(). .PP .nf -463 { -464 server_mode(parameters,pcnt,user); -465 } +501 { +502 server_mode(parameters,pcnt,user); +503 } .fi .PP .SS "void Server::SendOpers (\fBstd::string\fP s)\fC [virtual]\fP" @@ -1135,12 +1162,12 @@ Sends text to all opers. .PP This method sends a server notice to all opers with the usermode +s. .PP -Definition at line 392 of file modules.cpp. +Definition at line 425 of file modules.cpp. .PP .nf -393 { -394 WriteOpers('%s',s.c_str()); -395 } +426 { +427 WriteOpers('%s',s.c_str()); +428 } .fi .PP .SS "void Server::SendServ (int Socket, \fBstd::string\fP s)\fC [virtual]\fP" @@ -1149,12 +1176,12 @@ Sends text from the server to a socket. .PP This method writes a line of text to an established socket, with the servername prepended as used by numerics (see RFC 1459) .PP -Definition at line 472 of file modules.cpp. +Definition at line 510 of file modules.cpp. .PP .nf -473 { -474 WriteServ(Socket,'%s',s.c_str()); -475 } +511 { +512 WriteServ(Socket,'%s',s.c_str()); +513 } .fi .PP .SS "void Server::SendTo (\fBuserrec\fP * Source, \fBuserrec\fP * Dest, \fBstd::string\fP s)\fC [virtual]\fP" @@ -1171,23 +1198,23 @@ The format will become: .PP Which is useful for numerics and server notices to single users, etc. .PP -Definition at line 482 of file modules.cpp. +Definition at line 520 of file modules.cpp. .PP References connection::fd. .PP .nf -483 { -484 if (!Source) -485 { -486 // if source is NULL, then the message originates from the local server -487 Write(Dest->fd,':%s %s',this->GetServerName().c_str(),s.c_str()); -488 } -489 else -490 { -491 // otherwise it comes from the user specified -492 WriteTo(Source,Dest,'%s',s.c_str()); -493 } -494 } +521 { +522 if (!Source) +523 { +524 // if source is NULL, then the message originates from the local server +525 Write(Dest->fd,':%s %s',this->GetServerName().c_str(),s.c_str()); +526 } +527 else +528 { +529 // otherwise it comes from the user specified +530 WriteTo(Source,Dest,'%s',s.c_str()); +531 } +532 } .fi .PP .SS "void Server::SendToModeMask (\fBstd::string\fP modes, int flags, \fBstd::string\fP text)\fC [virtual]\fP" @@ -1200,12 +1227,12 @@ Serv->SendToModeMask('xi', WM_OR, 'm00'); .PP Then the text 'm00' will be sent to all users with EITHER mode x or i. Conversely if you used WM_AND, the user must have both modes set to receive the message. .PP -Definition at line 405 of file modules.cpp. +Definition at line 438 of file modules.cpp. .PP .nf -406 { -407 WriteMode(modes.c_str(),flags,'%s',text.c_str()); -408 } +439 { +440 WriteMode(modes.c_str(),flags,'%s',text.c_str()); +441 } .fi .PP .SS "void Server::SendWallops (\fBuserrec\fP * User, \fBstd::string\fP text)\fC [virtual]\fP" @@ -1214,12 +1241,12 @@ Sends a WALLOPS message. .PP This method writes a WALLOPS message to all users with the +w flag, originating from the specified user. .PP -Definition at line 530 of file modules.cpp. +Definition at line 568 of file modules.cpp. .PP .nf -531 { -532 WriteWallOps(User,false,'%s',text.c_str()); -533 } +569 { +570 WriteWallOps(User,false,'%s',text.c_str()); +571 } .fi .PP .SS "bool Server::UserToPseudo (\fBuserrec\fP * user, \fBstd::string\fP message)\fC [virtual]\fP" @@ -1228,40 +1255,40 @@ Remove a user's connection to the irc server, but leave their client in existenc .PP When you call this function, the user's file descriptor will be replaced with the value of FD_MAGIC_NUMBER and their old file descriptor will be closed. This idle client will remain until it is restored with a valid file descriptor, or is removed from IRC by an operator After this call, the pointer to user will be invalid. .PP -Definition at line 639 of file modules.cpp. +Definition at line 677 of file modules.cpp. .PP References userrec::ClearBuffer(), DEBUG, connection::fd, FD_MAGIC_NUMBER, connection::host, and userrec::ident. .PP .nf -640 { -641 unsigned int old_fd = user->fd; -642 user->fd = FD_MAGIC_NUMBER; -643 user->ClearBuffer(); -644 Write(old_fd,'ERROR :Closing link (%s@%s) [%s]',user->ident,user->host,message.c_str()); -645 #ifdef USE_KQUEUE -646 struct kevent ke; -647 EV_SET(&ke, old_fd, EVFILT_READ, EV_DELETE, 0, 0, NULL); -648 int i = kevent(kq, &ke, 1, 0, 0, NULL); -649 if (i == -1) -650 { -651 log(DEBUG,'kqueue: Failed to remove user from queue!'); -652 } -653 #endif -654 #ifdef USE_EPOLL -655 struct epoll_event ev; -656 ev.events = EPOLLIN | EPOLLET; -657 ev.data.fd = old_fd; -658 int i = epoll_ctl(ep, EPOLL_CTL_DEL, old_fd, &ev); -659 if (i < 0) -660 { -661 log(DEBUG,'epoll: List deletion failure!'); -662 } -663 #endif -664 -665 shutdown(old_fd,2); -666 close(old_fd); -667 return true; -668 } +678 { +679 unsigned int old_fd = user->fd; +680 user->fd = FD_MAGIC_NUMBER; +681 user->ClearBuffer(); +682 Write(old_fd,'ERROR :Closing link (%s@%s) [%s]',user->ident,user->host,message.c_str()); +683 #ifdef USE_KQUEUE +684 struct kevent ke; +685 EV_SET(&ke, old_fd, EVFILT_READ, EV_DELETE, 0, 0, NULL); +686 int i = kevent(kq, &ke, 1, 0, 0, NULL); +687 if (i == -1) +688 { +689 log(DEBUG,'kqueue: Failed to remove user from queue!'); +690 } +691 #endif +692 #ifdef USE_EPOLL +693 struct epoll_event ev; +694 ev.events = EPOLLIN | EPOLLET; +695 ev.data.fd = old_fd; +696 int i = epoll_ctl(ep, EPOLL_CTL_DEL, old_fd, &ev); +697 if (i < 0) +698 { +699 log(DEBUG,'epoll: List deletion failure!'); +700 } +701 #endif +702 +703 shutdown(old_fd,2); +704 close(old_fd); +705 return true; +706 } .fi .PP diff --git a/docs/man/man3/Version.3 b/docs/man/man3/Version.3 index 166f36369..4cc7e69ab 100644 --- a/docs/man/man3/Version.3 +++ b/docs/man/man3/Version.3 @@ -1,4 +1,4 @@ -.TH "Version" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "Version" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -44,7 +44,7 @@ Holds a module's Version information The four members (set by the constructor on A class of type Version is returned by the GetVersion method of the \fBModule\fP class. .PP -Definition at line 112 of file modules.h. +Definition at line 113 of file modules.h. .SH "Constructor & Destructor Documentation" .PP .SS "Version::Version (int major, int minor, int revision, int build, int flags)" @@ -59,19 +59,19 @@ Definition at line 246 of file modules.cpp. .PP .SS "const int \fBVersion::Build\fP" .PP -Definition at line 115 of file modules.h. +Definition at line 116 of file modules.h. .SS "const int \fBVersion::Flags\fP" .PP -Definition at line 115 of file modules.h. +Definition at line 116 of file modules.h. .SS "const int \fBVersion::Major\fP" .PP -Definition at line 115 of file modules.h. +Definition at line 116 of file modules.h. .SS "const int \fBVersion::Minor\fP" .PP -Definition at line 115 of file modules.h. +Definition at line 116 of file modules.h. .SS "const int \fBVersion::Revision\fP" .PP -Definition at line 115 of file modules.h. +Definition at line 116 of file modules.h. .SH "Author" .PP diff --git a/docs/man/man3/WhoWasUser.3 b/docs/man/man3/WhoWasUser.3 index e1fc03962..14441a78c 100644 --- a/docs/man/man3/WhoWasUser.3 +++ b/docs/man/man3/WhoWasUser.3 @@ -1,4 +1,4 @@ -.TH "WhoWasUser" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "WhoWasUser" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -39,30 +39,30 @@ WhoWasUser \- A lightweight userrec used by WHOWAS. .PP A lightweight userrec used by WHOWAS. .PP -Definition at line 325 of file users.h. +Definition at line 332 of file users.h. .SH "Member Data Documentation" .PP .SS "char \fBWhoWasUser::dhost\fP[160]" .PP -Definition at line 330 of file users.h. +Definition at line 337 of file users.h. .SS "char \fBWhoWasUser::fullname\fP[MAXGECOS+1]" .PP -Definition at line 332 of file users.h. +Definition at line 339 of file users.h. .SS "char \fBWhoWasUser::host\fP[160]" .PP -Definition at line 331 of file users.h. +Definition at line 338 of file users.h. .SS "char \fBWhoWasUser::ident\fP[IDENTMAX+1]" .PP -Definition at line 329 of file users.h. +Definition at line 336 of file users.h. .SS "char \fBWhoWasUser::nick\fP[NICKMAX]" .PP -Definition at line 328 of file users.h. +Definition at line 335 of file users.h. .SS "char \fBWhoWasUser::server\fP[256]" .PP -Definition at line 333 of file users.h. +Definition at line 340 of file users.h. .SS "time_t \fBWhoWasUser::signon\fP" .PP -Definition at line 334 of file users.h. +Definition at line 341 of file users.h. .SH "Author" .PP diff --git a/docs/man/man3/XLine.3 b/docs/man/man3/XLine.3 index f6d574d79..531448d3d 100644 --- a/docs/man/man3/XLine.3 +++ b/docs/man/man3/XLine.3 @@ -1,4 +1,4 @@ -.TH "XLine" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "XLine" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ZLine.3 b/docs/man/man3/ZLine.3 index 9b5c0c9ae..887f4b3f7 100644 --- a/docs/man/man3/ZLine.3 +++ b/docs/man/man3/ZLine.3 @@ -1,4 +1,4 @@ -.TH "ZLine" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ZLine" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/_home_.3 b/docs/man/man3/_home_.3 index 4551c1a19..4e407fde9 100644 --- a/docs/man/man3/_home_.3 +++ b/docs/man/man3/_home_.3 @@ -1,4 +1,4 @@ -.TH "/home/ Directory Reference" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "/home/ Directory Reference" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/_home_brain_.3 b/docs/man/man3/_home_brain_.3 index 57d2400e8..de4a2293e 100644 --- a/docs/man/man3/_home_brain_.3 +++ b/docs/man/man3/_home_brain_.3 @@ -1,4 +1,4 @@ -.TH "/home/brain/ Directory Reference" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "/home/brain/ Directory Reference" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/_home_brain_inspircd-cvs_.3 b/docs/man/man3/_home_brain_inspircd-cvs_.3 index 96ae7889f..475459bfd 100644 --- a/docs/man/man3/_home_brain_inspircd-cvs_.3 +++ b/docs/man/man3/_home_brain_inspircd-cvs_.3 @@ -1,4 +1,4 @@ -.TH "/home/brain/inspircd-cvs/ Directory Reference" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "/home/brain/inspircd-cvs/ Directory Reference" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/_home_brain_inspircd-cvs_inspircd_.3 b/docs/man/man3/_home_brain_inspircd-cvs_inspircd_.3 index f1dad75d0..840161aaa 100644 --- a/docs/man/man3/_home_brain_inspircd-cvs_inspircd_.3 +++ b/docs/man/man3/_home_brain_inspircd-cvs_inspircd_.3 @@ -1,4 +1,4 @@ -.TH "/home/brain/inspircd-cvs/inspircd/ Directory Reference" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "/home/brain/inspircd-cvs/inspircd/ Directory Reference" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/_home_brain_inspircd-cvs_inspircd_include_.3 b/docs/man/man3/_home_brain_inspircd-cvs_inspircd_include_.3 index b7891755c..3f8773d1f 100644 --- a/docs/man/man3/_home_brain_inspircd-cvs_inspircd_include_.3 +++ b/docs/man/man3/_home_brain_inspircd-cvs_inspircd_include_.3 @@ -1,4 +1,4 @@ -.TH "/home/brain/inspircd-cvs/inspircd/include/ Directory Reference" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "/home/brain/inspircd-cvs/inspircd/include/ Directory Reference" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/_home_brain_inspircd-cvs_inspircd_src_.3 b/docs/man/man3/_home_brain_inspircd-cvs_inspircd_src_.3 index 868e33670..0a1c37a31 100644 --- a/docs/man/man3/_home_brain_inspircd-cvs_inspircd_src_.3 +++ b/docs/man/man3/_home_brain_inspircd-cvs_inspircd_src_.3 @@ -1,4 +1,4 @@ -.TH "/home/brain/inspircd-cvs/inspircd/src/ Directory Reference" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "/home/brain/inspircd-cvs/inspircd/src/ Directory Reference" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/base.h.3 b/docs/man/man3/base.h.3 index 293b9845c..2ccad4081 100644 --- a/docs/man/man3/base.h.3 +++ b/docs/man/man3/base.h.3 @@ -1,4 +1,4 @@ -.TH "base.h" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "base.h" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -12,6 +12,8 @@ base.h \- .br \fC#include \fP .br +\fC#include \fP +.br \fC#include \fP .br @@ -42,7 +44,7 @@ base.h \- .PP .SS "typedef void* \fBVoidPointer\fP" .PP -Definition at line 25 of file base.h. +Definition at line 26 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 41e336448..43d39173b 100644 --- a/docs/man/man3/channels.cpp.3 +++ b/docs/man/man3/channels.cpp.3 @@ -1,4 +1,4 @@ -.TH "channels.cpp" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "channels.cpp" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -221,7 +221,7 @@ Referenced by Server::GetUsers(). Definition at line 81 of file channels.cpp. .SS "int \fBMODCOUNT\fP = -1" .PP -Definition at line 994 of file modules.cpp. +Definition at line 1032 of file modules.cpp. .PP Referenced by Server::FindModule(). .SS "std::vector<\fBstd::string\fP> \fBmodule_names\fP" diff --git a/docs/man/man3/channels.h.3 b/docs/man/man3/channels.h.3 index e0158a5fa..3ea8129b0 100644 --- a/docs/man/man3/channels.h.3 +++ b/docs/man/man3/channels.h.3 @@ -1,4 +1,4 @@ -.TH "channels.h" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "channels.h" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/chanrec.3 b/docs/man/man3/chanrec.3 index 48d998e2f..35dc47ddf 100644 --- a/docs/man/man3/chanrec.3 +++ b/docs/man/man3/chanrec.3 @@ -1,4 +1,4 @@ -.TH "chanrec" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "chanrec" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/classbase.3 b/docs/man/man3/classbase.3 index cf1538044..e8000432a 100644 --- a/docs/man/man3/classbase.3 +++ b/docs/man/man3/classbase.3 @@ -1,4 +1,4 @@ -.TH "classbase" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "classbase" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -35,27 +35,27 @@ Inherited by \fBAdmin\fP, \fBConfigReader\fP, \fBConnectClass\fP, \fBExtensible\ .PP The base class for all inspircd classes. .PP -Definition at line 29 of file base.h. +Definition at line 30 of file base.h. .SH "Constructor & Destructor Documentation" .PP .SS "classbase::classbase ()\fC [inline]\fP" .PP Constructor, Sets the object's time. .PP -Definition at line 39 of file base.h. +Definition at line 40 of file base.h. .PP References age. .PP .nf -39 { age = time(NULL); } +40 { age = time(NULL); } .fi .PP .SS "classbase::~classbase ()\fC [inline]\fP" .PP -Definition at line 40 of file base.h. +Definition at line 41 of file base.h. .PP .nf -40 { } +41 { } .fi .PP .SH "Member Data Documentation" @@ -64,7 +64,7 @@ Definition at line 40 of file base.h. .PP Time that the object was instantiated (used for TS calculation etc). .PP -Definition at line 34 of file base.h. +Definition at line 35 of file base.h. .PP Referenced by classbase(). diff --git a/docs/man/man3/command_t.3 b/docs/man/man3/command_t.3 index a761b01d2..3856f66d6 100644 --- a/docs/man/man3/command_t.3 +++ b/docs/man/man3/command_t.3 @@ -1,4 +1,4 @@ -.TH "command_t" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "command_t" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/commands.h.3 b/docs/man/man3/commands.h.3 index 467911b07..643a4d95f 100644 --- a/docs/man/man3/commands.h.3 +++ b/docs/man/man3/commands.h.3 @@ -1,4 +1,4 @@ -.TH "commands.h" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "commands.h" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -188,9 +188,14 @@ commands.h \- .RI "long \fBduration\fP (const char *str)" .br .RI "\fIOther useful functions. \fP" +.ti -1c +.RI "void \fBdo_whois\fP (\fBuserrec\fP *user, \fBuserrec\fP *dest, unsigned long signon, unsigned long idle, char *nick)" +.br .in -1c .SH "Function Documentation" .PP +.SS "void do_whois (\fBuserrec\fP * user, \fBuserrec\fP * dest, unsigned long signon, unsigned long idle, char * nick)" +.PP .SS "long duration (const char * str)" .PP Other useful functions. @@ -304,7 +309,7 @@ These are the handlers for user commands. .PP Functions for u:lined servers. .PP -Referenced by Server::IsUlined(). +Referenced by userrec::HasPermission(), and Server::IsUlined(). .SH "Author" .PP Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/man3/connection.3 b/docs/man/man3/connection.3 index e243173d6..ca56a0899 100644 --- a/docs/man/man3/connection.3 +++ b/docs/man/man3/connection.3 @@ -1,4 +1,4 @@ -.TH "connection" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "connection" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/connection.h.3 b/docs/man/man3/connection.h.3 index 04af56c8c..9ddbe7517 100644 --- a/docs/man/man3/connection.h.3 +++ b/docs/man/man3/connection.h.3 @@ -1,4 +1,4 @@ -.TH "connection.h" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "connection.h" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ctables.h.3 b/docs/man/man3/ctables.h.3 index b9fe786ed..4579fc91f 100644 --- a/docs/man/man3/ctables.h.3 +++ b/docs/man/man3/ctables.h.3 @@ -1,4 +1,4 @@ -.TH "ctables.h" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ctables.h" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/dns.h.3 b/docs/man/man3/dns.h.3 index a3c90c1c8..fd601d288 100644 --- a/docs/man/man3/dns.h.3 +++ b/docs/man/man3/dns.h.3 @@ -1,4 +1,4 @@ -.TH "dns.h" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "dns.h" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/dns_ip4list.3 b/docs/man/man3/dns_ip4list.3 index 483f4c324..e857eff47 100644 --- a/docs/man/man3/dns_ip4list.3 +++ b/docs/man/man3/dns_ip4list.3 @@ -1,4 +1,4 @@ -.TH "dns_ip4list" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "dns_ip4list" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/hashcomp.h.3 b/docs/man/man3/hashcomp.h.3 index 2e77b22f0..fc7453492 100644 --- a/docs/man/man3/hashcomp.h.3 +++ b/docs/man/man3/hashcomp.h.3 @@ -1,4 +1,4 @@ -.TH "hashcomp.h" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "hashcomp.h" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/irc.3 b/docs/man/man3/irc.3 index 5732c80f7..192b4a0ea 100644 --- a/docs/man/man3/irc.3 +++ b/docs/man/man3/irc.3 @@ -1,4 +1,4 @@ -.TH "irc" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "irc" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/irc_InAddr_HashComp.3 b/docs/man/man3/irc_InAddr_HashComp.3 index ead2429e0..e4d8d0720 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 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "irc::InAddr_HashComp" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/irc_StrHashComp.3 b/docs/man/man3/irc_StrHashComp.3 index 8b96cb26a..dae5027b7 100644 --- a/docs/man/man3/irc_StrHashComp.3 +++ b/docs/man/man3/irc_StrHashComp.3 @@ -1,4 +1,4 @@ -.TH "irc::StrHashComp" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "irc::StrHashComp" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/irc_irc_char_traits.3 b/docs/man/man3/irc_irc_char_traits.3 index fbc43ebdb..118de0f30 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 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "irc::irc_char_traits" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/message.h.3 b/docs/man/man3/message.h.3 index 5778a25f6..1fde59aac 100644 --- a/docs/man/man3/message.h.3 +++ b/docs/man/man3/message.h.3 @@ -1,4 +1,4 @@ -.TH "message.h" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "message.h" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/mode.h.3 b/docs/man/man3/mode.h.3 index 8a27ddae3..15a7a3541 100644 --- a/docs/man/man3/mode.h.3 +++ b/docs/man/man3/mode.h.3 @@ -1,4 +1,4 @@ -.TH "mode.h" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "mode.h" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/modules.cpp.3 b/docs/man/man3/modules.cpp.3 index 1a652c1d6..ea563e279 100644 --- a/docs/man/man3/modules.cpp.3 +++ b/docs/man/man3/modules.cpp.3 @@ -1,4 +1,4 @@ -.TH "modules.cpp" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "modules.cpp" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -474,7 +474,7 @@ Referenced by ConfigReader::ConfigReader(). Definition at line 81 of file channels.cpp. .SS "int \fBMODCOUNT\fP = -1" .PP -Definition at line 994 of file modules.cpp. +Definition at line 1032 of file modules.cpp. .SS "std::vector<\fBstd::string\fP> \fBmodule_names\fP" .PP .SS "std::vector<\fBInspSocket\fP*> \fBmodule_sockets\fP" diff --git a/docs/man/man3/modules.h.3 b/docs/man/man3/modules.h.3 index 36b65e742..c6eb1ac55 100644 --- a/docs/man/man3/modules.h.3 +++ b/docs/man/man3/modules.h.3 @@ -1,4 +1,4 @@ -.TH "modules.h" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "modules.h" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -71,6 +71,7 @@ modules.h \- .ti -1c .RI "#define \fBDEBUG\fP 10" .br +.RI "\fIlog levels \fP" .ti -1c .RI "#define \fBVERBOSE\fP 20" .br @@ -86,6 +87,7 @@ modules.h \- .ti -1c .RI "#define \fBMT_CHANNEL\fP 1" .br +.RI "\fIUsed with OnExtendedMode() method of modules. \fP" .ti -1c .RI "#define \fBMT_CLIENT\fP 2" .br @@ -95,6 +97,7 @@ modules.h \- .ti -1c .RI "#define \fBACR_DEFAULT\fP 0" .br +.RI "\fIUsed with OnAccessCheck() method of modules. \fP" .ti -1c .RI "#define \fBACR_DENY\fP 1" .br @@ -131,6 +134,7 @@ modules.h \- .ti -1c .RI "#define \fBVF_STATIC\fP 1" .br +.RI "\fIUsed to define a set of behavior bits for a module. \fP" .ti -1c .RI "#define \fBVF_VENDOR\fP 2" .br @@ -194,36 +198,38 @@ modules.h \- .PP .SS "#define AC_DEHALFOP 6" .PP -Definition at line 47 of file modules.h. +Definition at line 46 of file modules.h. .SS "#define AC_DEOP 1" .PP -Definition at line 42 of file modules.h. +Definition at line 41 of file modules.h. .SS "#define AC_DEVOICE 4" .PP -Definition at line 45 of file modules.h. +Definition at line 44 of file modules.h. .SS "#define AC_GENERAL_MODE 8" .PP -Definition at line 49 of file modules.h. +Definition at line 48 of file modules.h. .SS "#define AC_HALFOP 5" .PP -Definition at line 46 of file modules.h. +Definition at line 45 of file modules.h. .SS "#define AC_INVITE 7" .PP -Definition at line 48 of file modules.h. +Definition at line 47 of file modules.h. .SS "#define AC_KICK 0" .PP -Definition at line 41 of file modules.h. +Definition at line 40 of file modules.h. .SS "#define AC_OP 2" .PP -Definition at line 43 of file modules.h. +Definition at line 42 of file modules.h. .SS "#define AC_VOICE 3" .PP -Definition at line 44 of file modules.h. +Definition at line 43 of file modules.h. .SS "#define ACR_ALLOW 2" .PP Definition at line 39 of file modules.h. .SS "#define ACR_DEFAULT 0" .PP +Used with OnAccessCheck() method of modules. +.PP Definition at line 37 of file modules.h. .PP Referenced by Module::OnAccessCheck(). @@ -232,40 +238,42 @@ Referenced by Module::OnAccessCheck(). Definition at line 38 of file modules.h. .SS "#define CONF_FILE_NOT_FOUND 0x000200" .PP -Definition at line 1112 of file modules.h. +Definition at line 1501 of file modules.h. .PP Referenced by ConfigReader::ConfigReader(). .SS "#define CONF_NOT_A_NUMBER 0x000010" .PP -Definition at line 1109 of file modules.h. +Definition at line 1498 of file modules.h. .PP Referenced by ConfigReader::ReadInteger(). .SS "#define CONF_NOT_UNSIGNED 0x000080" .PP -Definition at line 1110 of file modules.h. +Definition at line 1499 of file modules.h. .PP Referenced by ConfigReader::ReadInteger(). .SS "#define CONF_VALUE_NOT_FOUND 0x000100" .PP -Definition at line 1111 of file modules.h. +Definition at line 1500 of file modules.h. .PP Referenced by ConfigReader::ReadFlag(), ConfigReader::ReadInteger(), and ConfigReader::ReadValue(). .SS "#define DEBUG 10" .PP +log levels +.PP Definition at line 23 of file modules.h. .PP -Referenced by Server::AddExtendedMode(), chanrec::AddUser(), chanrec::DelUser(), userrec::HasPermission(), InspSocket::InspSocket(), chanrec::IsCustomModeSet(), InspSocket::Read(), userrec::ReadData(), userrec::RemoveInvite(), chanrec::SetCustomMode(), chanrec::SetCustomModeParam(), InspSocket::SetState(), userrec::SetWriteError(), and Server::UserToPseudo(). +Referenced by Server::AddExtendedMode(), chanrec::AddUser(), chanrec::DelUser(), InspSocket::InspSocket(), chanrec::IsCustomModeSet(), InspSocket::Read(), userrec::ReadData(), userrec::RemoveInvite(), chanrec::SetCustomMode(), chanrec::SetCustomModeParam(), InspSocket::SetState(), userrec::SetWriteError(), and Server::UserToPseudo(). .SS "#define DEFAULT 30" .PP Definition at line 25 of file modules.h. .SS "#define FD_MAGIC_NUMBER -42" .PP -Definition at line 100 of file modules.h. +Definition at line 101 of file modules.h. .PP Referenced by Server::PseudoToUser(), and Server::UserToPseudo(). .SS "#define FOREACH_MOD for (int _i = 0; _i <= \fBMODCOUNT\fP; _i++) modules[_i]->" .PP -Definition at line 80 of file modules.h. +Definition at line 81 of file modules.h. .PP Referenced by Event::Send(). .SS "#define FOREACH_RESULT(x)" @@ -284,9 +292,11 @@ Referenced by Event::Send(). } .fi .PP -Definition at line 88 of file modules.h. +Definition at line 89 of file modules.h. .SS "#define MT_CHANNEL 1" .PP +Used with OnExtendedMode() method of modules. +.PP Definition at line 31 of file modules.h. .PP Referenced by Server::AddExtendedListMode(), and ModeMakeList(). @@ -311,16 +321,18 @@ Definition at line 26 of file modules.h. Definition at line 24 of file modules.h. .SS "#define VF_COMMON 8" .PP -Definition at line 56 of file modules.h. +Definition at line 55 of file modules.h. .SS "#define VF_SERVICEPROVIDER 4" .PP -Definition at line 55 of file modules.h. +Definition at line 54 of file modules.h. .SS "#define VF_STATIC 1" .PP -Definition at line 53 of file modules.h. +Used to define a set of behavior bits for a module. +.PP +Definition at line 52 of file modules.h. .SS "#define VF_VENDOR 2" .PP -Definition at line 54 of file modules.h. +Definition at line 53 of file modules.h. .PP Referenced by Module::GetVersion(). .SH "Typedef Documentation" @@ -329,18 +341,18 @@ Referenced by Module::GetVersion(). .PP Holds a list of users in a channel. .PP -Definition at line 73 of file modules.h. +Definition at line 74 of file modules.h. .SS "typedef std::deque<\fBstd::string\fP> \fBfile_cache\fP" .PP Low level definition of a \fBFileReader\fP classes file cache area. .PP -Definition at line 68 of file modules.h. +Definition at line 65 of file modules.h. .SS "typedef DLLFactory<\fBModuleFactory\fP> \fBircd_module\fP" .PP -Definition at line 1278 of file modules.h. +Definition at line 1667 of file modules.h. .SS "typedef \fBfile_cache\fP \fBstring_list\fP" .PP -Definition at line 69 of file modules.h. +Definition at line 70 of file modules.h. .SH "Function Documentation" .PP .SS "void createcommand (char * cmd, handlerfunc f, char flags, int minparams, char * source)" diff --git a/docs/man/man3/nspace.3 b/docs/man/man3/nspace.3 index 44ac7474d..6459e68a2 100644 --- a/docs/man/man3/nspace.3 +++ b/docs/man/man3/nspace.3 @@ -1,4 +1,4 @@ -.TH "nspace" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "nspace" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/nspace_hash_ in_addr _.3 b/docs/man/man3/nspace_hash_ in_addr _.3 index c75ee4fc5..2058787ef 100644 --- a/docs/man/man3/nspace_hash_ in_addr _.3 +++ b/docs/man/man3/nspace_hash_ in_addr _.3 @@ -1,4 +1,4 @@ -.TH "nspace::hash< in_addr >" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "nspace::hash< in_addr >" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/nspace_hash_ string _.3 b/docs/man/man3/nspace_hash_ string _.3 index 8d218437a..c9cd5e252 100644 --- a/docs/man/man3/nspace_hash_ string _.3 +++ b/docs/man/man3/nspace_hash_ string _.3 @@ -1,4 +1,4 @@ -.TH "nspace::hash< string >" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "nspace::hash< string >" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/socket.cpp.3 b/docs/man/man3/socket.cpp.3 index 37e4f4a85..136a95e21 100644 --- a/docs/man/man3/socket.cpp.3 +++ b/docs/man/man3/socket.cpp.3 @@ -1,4 +1,4 @@ -.TH "socket.cpp" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "socket.cpp" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/socket.h.3 b/docs/man/man3/socket.h.3 index a41c11226..bdb68566b 100644 --- a/docs/man/man3/socket.h.3 +++ b/docs/man/man3/socket.h.3 @@ -1,4 +1,4 @@ -.TH "socket.h" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "socket.h" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/std.3 b/docs/man/man3/std.3 index e566786d7..03a3fe2ea 100644 --- a/docs/man/man3/std.3 +++ b/docs/man/man3/std.3 @@ -1,4 +1,4 @@ -.TH "std" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "std" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/std_char_traits.3 b/docs/man/man3/std_char_traits.3 index dcf736b14..6dd1f9220 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 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "std::char_traits" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/ucrec.3 b/docs/man/man3/ucrec.3 index 464b9ab48..fdf24381c 100644 --- a/docs/man/man3/ucrec.3 +++ b/docs/man/man3/ucrec.3 @@ -1,4 +1,4 @@ -.TH "ucrec" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "ucrec" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME diff --git a/docs/man/man3/userrec.3 b/docs/man/man3/userrec.3 index dd6cda28e..38c346b28 100644 --- a/docs/man/man3/userrec.3 +++ b/docs/man/man3/userrec.3 @@ -1,4 +1,4 @@ -.TH "userrec" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "userrec" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -19,9 +19,6 @@ Inherits \fBconnection\fP. .RI "\fBuserrec\fP ()" .br .ti -1c -.RI "virtual \fB~userrec\fP ()" -.br -.ti -1c .RI "virtual char * \fBGetFullHost\fP ()" .br .RI "\fIReturns 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. \fP" @@ -89,6 +86,9 @@ Inherits \fBconnection\fP. .RI "void \fBCloseSocket\fP ()" .br .RI "\fIShuts down and closes the user's socket. \fP" +.ti -1c +.RI "virtual \fB~userrec\fP ()" +.br .in -1c .SS "Public Attributes" @@ -192,52 +192,53 @@ Holds all information about a user This class stores all information about a use Everything about a connection is stored here primarily, from the user's socket ID (file descriptor) through to the user's nickname and hostname. Use the Find method of the server class to locate a specific user by nickname. .PP -Definition at line 108 of file users.h. +Definition at line 111 of file users.h. .SH "Constructor & Destructor Documentation" .PP .SS "userrec::userrec ()" .PP -Definition at line 33 of file users.cpp. +Definition at line 38 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, sendq, server, ServerName, connection::signon, TIME, timeout, and ucrec::uc_modes. .PP .nf -34 { -35 // the PROPER way to do it, AVOID bzero at *ALL* costs -36 strcpy(nick,''); -37 strcpy(ip,'127.0.0.1'); -38 timeout = 0; -39 strcpy(ident,''); -40 strcpy(host,''); -41 strcpy(dhost,''); -42 strcpy(fullname,''); -43 strcpy(modes,''); -44 server = (char*)FindServerNamePtr(ServerName); -45 strcpy(awaymsg,''); -46 strcpy(oper,''); -47 reset_due = TIME; -48 lines_in = 0; -49 fd = lastping = signon = idle_lastmsg = nping = registered = 0; -50 flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0; -51 haspassed = false; -52 dns_done = false; -53 recvq = ''; -54 sendq = ''; -55 for (int i = 0; i < MAXCHANS; i++) -56 { -57 this->chans[i].channel = NULL; -58 this->chans[i].uc_modes = 0; -59 } -60 invites.clear(); -61 } +39 { +40 // the PROPER way to do it, AVOID bzero at *ALL* costs +41 strcpy(nick,''); +42 strcpy(ip,'127.0.0.1'); +43 timeout = 0; +44 strcpy(ident,''); +45 strcpy(host,''); +46 strcpy(dhost,''); +47 strcpy(fullname,''); +48 strcpy(modes,''); +49 server = (char*)FindServerNamePtr(ServerName); +50 strcpy(awaymsg,''); +51 strcpy(oper,''); +52 reset_due = TIME; +53 lines_in = 0; +54 fd = lastping = signon = idle_lastmsg = nping = registered = 0; +55 flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0; +56 haspassed = false; +57 dns_done = false; +58 recvq = ''; +59 sendq = ''; +60 for (int i = 0; i < MAXCHANS; i++) +61 { +62 this->chans[i].channel = NULL; +63 this->chans[i].uc_modes = 0; +64 } +65 invites.clear(); +66 } .fi .PP -.SS "virtual userrec::~userrec ()\fC [inline, virtual]\fP" +.SS "userrec::~userrec ()\fC [virtual]\fP" .PP -Definition at line 221 of file users.h. +Definition at line 68 of file users.cpp. .PP .nf -221 { } +69 { +70 } .fi .PP .SH "Member Function Documentation" @@ -248,35 +249,35 @@ This method adds data to the buffer of the user. .PP The buffer can grow to any size within limits of the available memory, managed by the size of a \fBstd::string\fP, however if any individual line in the buffer grows over 600 bytes in length (which is 88 chars over the RFC-specified limit per line) then the method will return false and the text will not be inserted. .PP -Definition at line 194 of file users.cpp. +Definition at line 205 of file users.cpp. .PP References recvq, recvqmax, and SetWriteError(). .PP .nf -195 { -196 std::string b = ''; -197 for (unsigned int i = 0; i < a.length(); i++) -198 if ((a[i] != '\r') && (a[i] != '\0') && (a[i] != 7)) -199 b = b + a[i]; -200 std::stringstream stream(recvq); -201 stream << b; -202 recvq = stream.str(); -203 unsigned int i = 0; -204 // count the size of the first line in the buffer. -205 while (i < recvq.length()) -206 { -207 if (recvq[i++] == '\n') -208 break; -209 } -210 if (recvq.length() > (unsigned)this->recvqmax) -211 { -212 this->SetWriteError('RecvQ exceeded'); -213 WriteOpers('*** User %s RecvQ of %d exceeds connect class maximum of %d',this->nick,recvq.length(),this->recvqmax); -214 } -215 // return false if we've had more than 600 characters WITHOUT -216 // a carriage return (this is BAD, drop the socket) -217 return (i < 600); -218 } +206 { +207 std::string b = ''; +208 for (unsigned int i = 0; i < a.length(); i++) +209 if ((a[i] != '\r') && (a[i] != '\0') && (a[i] != 7)) +210 b = b + a[i]; +211 std::stringstream stream(recvq); +212 stream << b; +213 recvq = stream.str(); +214 unsigned int i = 0; +215 // count the size of the first line in the buffer. +216 while (i < recvq.length()) +217 { +218 if (recvq[i++] == '\n') +219 break; +220 } +221 if (recvq.length() > (unsigned)this->recvqmax) +222 { +223 this->SetWriteError('RecvQ exceeded'); +224 WriteOpers('*** User %s RecvQ of %d exceeds connect class maximum of %d',this->nick,recvq.length(),this->recvqmax); +225 } +226 // return false if we've had more than 600 characters WITHOUT +227 // a carriage return (this is BAD, drop the socket) +228 return (i < 600); +229 } .fi .PP .SS "void userrec::AddWriteBuf (\fBstd::string\fP data)" @@ -285,24 +286,24 @@ Adds to the user's write buffer. .PP You may add any amount of text up to this users sendq value, if you exceed the sendq value, \fBSetWriteError()\fP will be called to set the users error string to 'SendQ exceeded', and further buffer adds will be dropped. .PP -Definition at line 250 of file users.cpp. +Definition at line 261 of file users.cpp. .PP References sendq, sendqmax, and SetWriteError(). .PP .nf -251 { -252 if (this->GetWriteError() != '') -253 return; -254 if (sendq.length() + data.length() > (unsigned)this->sendqmax) -255 { -256 WriteOpers('*** User %s SendQ of %d exceeds connect class maximum of %d',this->nick,sendq.length() + data.length(),this->sendqmax); -257 this->SetWriteError('SendQ exceeded'); -258 return; -259 } -260 std::stringstream stream; -261 stream << sendq << data; -262 sendq = stream.str(); -263 } +262 { +263 if (this->GetWriteError() != '') +264 return; +265 if (sendq.length() + data.length() > (unsigned)this->sendqmax) +266 { +267 WriteOpers('*** User %s SendQ of %d exceeds connect class maximum of %d',this->nick,sendq.length() + data.length(),this->sendqmax); +268 this->SetWriteError('SendQ exceeded'); +269 return; +270 } +271 std::stringstream stream; +272 stream << sendq << data; +273 sendq = stream.str(); +274 } .fi .PP .SS "bool userrec::BufferIsReady ()" @@ -311,46 +312,46 @@ This method returns true if the buffer contains at least one carriage return cha .PP one complete line may be read) .PP -Definition at line 220 of file users.cpp. +Definition at line 231 of file users.cpp. .PP References recvq. .PP .nf -221 { -222 for (unsigned int i = 0; i < recvq.length(); i++) -223 if (recvq[i] == '\n') -224 return true; -225 return false; -226 } +232 { +233 for (unsigned int i = 0; i < recvq.length(); i++) +234 if (recvq[i] == '\n') +235 return true; +236 return false; +237 } .fi .PP .SS "void userrec::ClearBuffer ()" .PP This function clears the entire buffer by setting it to an empty string. .PP -Definition at line 228 of file users.cpp. +Definition at line 239 of file users.cpp. .PP References recvq. .PP Referenced by Server::PseudoToUser(), and Server::UserToPseudo(). .PP .nf -229 { -230 recvq = ''; -231 } +240 { +241 recvq = ''; +242 } .fi .PP .SS "void userrec::CloseSocket ()" .PP Shuts down and closes the user's socket. .PP -Definition at line 63 of file users.cpp. +Definition at line 72 of file users.cpp. .PP .nf -64 { -65 shutdown(this->fd,2); -66 close(this->fd); -67 } +73 { +74 shutdown(this->fd,2); +75 close(this->fd); +76 } .fi .PP .SS "void userrec::FlushWriteBuf ()" @@ -359,31 +360,31 @@ Flushes as much of the user's buffer to the file descriptor as possible. .PP This function may not always flush the entire buffer, rather instead as much of it as it possibly can. If the send() call fails to send the entire buffer, the buffer position is advanced forwards and the rest of the data sent at the next call to this method. .PP -Definition at line 266 of file users.cpp. +Definition at line 277 of file users.cpp. .PP References connection::bytes_out, connection::cmds_out, sendq, and SetWriteError(). .PP .nf -267 { -268 if (sendq.length()) -269 { -270 char* tb = (char*)this->sendq.c_str(); -271 int n_sent = write(this->fd,tb,this->sendq.length()); -272 if (n_sent == -1) -273 { -274 this->SetWriteError(strerror(errno)); -275 } -276 else -277 { -278 // advance the queue -279 tb += n_sent; -280 this->sendq = tb; -281 // update the user's stats counters -282 this->bytes_out += n_sent; -283 this->cmds_out++; -284 } -285 } -286 } +278 { +279 if (sendq.length()) +280 { +281 char* tb = (char*)this->sendq.c_str(); +282 int n_sent = write(this->fd,tb,this->sendq.length()); +283 if (n_sent == -1) +284 { +285 this->SetWriteError(strerror(errno)); +286 } +287 else +288 { +289 // advance the queue +290 tb += n_sent; +291 this->sendq = tb; +292 // update the user's stats counters +293 this->bytes_out += n_sent; +294 this->cmds_out++; +295 } +296 } +297 } .fi .PP .SS "\fBstd::string\fP userrec::GetBuffer ()" @@ -392,42 +393,42 @@ This method returns the first available string at the tail end of the buffer and .PP This means it is a one way operation in a similar way to strtok(), and multiple calls return multiple lines if they are available. The results of this function if there are no lines to be read are unknown, always use \fBBufferIsReady()\fP to check if it is ok to read the buffer before calling \fBGetBuffer()\fP. .PP -Definition at line 233 of file users.cpp. +Definition at line 244 of file users.cpp. .PP References recvq. .PP .nf -234 { -235 if (recvq == '') -236 return ''; -237 char* line = (char*)recvq.c_str(); -238 std::string ret = ''; -239 while ((*line != '\n') && (strlen(line))) -240 { -241 ret = ret + *line; -242 line++; -243 } -244 if ((*line == '\n') || (*line == '\r')) -245 line++; -246 recvq = line; -247 return ret; -248 } +245 { +246 if (recvq == '') +247 return ''; +248 char* line = (char*)recvq.c_str(); +249 std::string ret = ''; +250 while ((*line != '\n') && (strlen(line))) +251 { +252 ret = ret + *line; +253 line++; +254 } +255 if ((*line == '\n') || (*line == '\r')) +256 line++; +257 recvq = line; +258 return ret; +259 } .fi .PP .SS "char * userrec::GetFullHost ()\fC [virtual]\fP" .PP Returns the full displayed host of the user This member function returns the hostname of the user as seen by other users on the server, in nick!identhost form. .PP -Definition at line 69 of file users.cpp. +Definition at line 78 of file users.cpp. .PP References dhost, ident, and nick. .PP .nf -70 { -71 static char result[MAXBUF]; -72 snprintf(result,MAXBUF,'%s!%s@%s',nick,ident,dhost); -73 return result; -74 } +79 { +80 static char result[MAXBUF]; +81 snprintf(result,MAXBUF,'%s!%s@%s',nick,ident,dhost); +82 return result; +83 } .fi .PP .SS "char * userrec::GetFullRealHost ()\fC [virtual]\fP" @@ -436,44 +437,44 @@ Returns the full real host of the user This member function returns the hostname .PP If any form of hostname cloaking is in operation, e.g. through a module, then this method will ignore it and return the true hostname. .PP -Definition at line 87 of file users.cpp. +Definition at line 96 of file users.cpp. .PP References connection::host, ident, and nick. .PP .nf -88 { -89 static char fresult[MAXBUF]; -90 snprintf(fresult,MAXBUF,'%s!%s@%s',nick,ident,host); -91 return fresult; -92 } +97 { +98 static char fresult[MAXBUF]; +99 snprintf(fresult,MAXBUF,'%s!%s@%s',nick,ident,host); +100 return fresult; +101 } .fi .PP .SS "\fBInvitedList\fP * userrec::GetInviteList ()" .PP Returns the list of channels this user has been invited to but has not yet joined. .PP -Definition at line 108 of file users.cpp. +Definition at line 117 of file users.cpp. .PP References invites. .PP .nf -109 { -110 return &invites; -111 } +118 { +119 return &invites; +120 } .fi .PP .SS "\fBstd::string\fP userrec::GetWriteError ()" .PP Returns the write error which last occured on this connection or an empty string if none occured. .PP -Definition at line 296 of file users.cpp. +Definition at line 307 of file users.cpp. .PP References WriteError. .PP .nf -297 { -298 return this->WriteError; -299 } +308 { +309 return this->WriteError; +310 } .fi .PP .SS "bool userrec::HasPermission (char * command)" @@ -482,118 +483,120 @@ Returns true or false for if a user can execute a privilaged oper command. .PP This is done by looking up their oper type from \fBuserrec::oper\fP, then referencing this to their oper classes and checking the commands they can execute. .PP -Definition at line 142 of file users.cpp. +Definition at line 151 of file users.cpp. .PP -References config_f, and DEBUG. +References config_f, and is_uline(). .PP .nf -143 { -144 char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF]; -145 char* mycmd; -146 char* savept; -147 char* savept2; -148 -149 // are they even an oper at all? -150 if (strchr(this->modes,'o')) -151 { -152 log(DEBUG,'*** HasPermission: %s is an oper',this->nick); -153 for (int j =0; j < ConfValueEnum('type',&config_f); j++) -154 { -155 ConfValue('type','name',j,TypeName,&config_f); -156 if (!strcmp(TypeName,this->oper)) -157 { -158 log(DEBUG,'*** HasPermission: %s is an oper of type '%s'',this->nick,this->oper); -159 ConfValue('type','classes',j,Classes,&config_f); -160 char* myclass = strtok_r(Classes,' ',&savept); -161 while (myclass) -162 { -163 log(DEBUG,'*** HasPermission: checking classtype '%s'',myclass); -164 for (int k =0; k < ConfValueEnum('class',&config_f); k++) -165 { -166 ConfValue('class','name',k,ClassName,&config_f); -167 if (!strcmp(ClassName,myclass)) -168 { -169 ConfValue('class','commands',k,CommandList,&config_f); -170 log(DEBUG,'*** HasPermission: found class named %s with commands: '%s'',ClassName,CommandList); -171 -172 -173 mycmd = strtok_r(CommandList,' ',&savept2); -174 while (mycmd) -175 { -176 if (!strcasecmp(mycmd,command)) -177 { -178 log(DEBUG,'*** Command %s found, returning true',command); -179 return true; -180 } -181 mycmd = strtok_r(NULL,' ',&savept2); -182 } -183 } -184 } -185 myclass = strtok_r(NULL,' ',&savept); -186 } -187 } -188 } -189 } -190 return false; -191 } +152 { +153 char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF]; +154 char* mycmd; +155 char* savept; +156 char* savept2; +157 +158 // users on u-lined servers can completely bypass +159 // all permissions based checks. +160 // +161 // of course, if this is sent to a remote server and this +162 // server is not ulined there, then that other server +163 // silently drops the command. +164 if (is_uline(this->server)) +165 return true; +166 +167 // are they even an oper at all? +168 if (strchr(this->modes,'o')) +169 { +170 for (int j =0; j < ConfValueEnum('type',&config_f); j++) +171 { +172 ConfValue('type','name',j,TypeName,&config_f); +173 if (!strcmp(TypeName,this->oper)) +174 { +175 ConfValue('type','classes',j,Classes,&config_f); +176 char* myclass = strtok_r(Classes,' ',&savept); +177 while (myclass) +178 { +179 for (int k =0; k < ConfValueEnum('class',&config_f); k++) +180 { +181 ConfValue('class','name',k,ClassName,&config_f); +182 if (!strcmp(ClassName,myclass)) +183 { +184 ConfValue('class','commands',k,CommandList,&config_f); +185 mycmd = strtok_r(CommandList,' ',&savept2); +186 while (mycmd) +187 { +188 if ((!strcasecmp(mycmd,command)) || (*mycmd == '*')) +189 { +190 return true; +191 } +192 mycmd = strtok_r(NULL,' ',&savept2); +193 } +194 } +195 } +196 myclass = strtok_r(NULL,' ',&savept); +197 } +198 } +199 } +200 } +201 return false; +202 } .fi .PP .SS "void userrec::InviteTo (char * channel)\fC [virtual]\fP" .PP Adds a channel to a users invite list (invites them to a channel). .PP -Definition at line 113 of file users.cpp. +Definition at line 122 of file users.cpp. .PP References Invited::channel, and invites. .PP .nf -114 { -115 Invited i; -116 strlcpy(i.channel,channel,CHANMAX); -117 invites.push_back(i); -118 } +123 { +124 Invited i; +125 strlcpy(i.channel,channel,CHANMAX); +126 invites.push_back(i); +127 } .fi .PP .SS "bool userrec::IsInvited (char * channel)\fC [virtual]\fP" .PP Returns true if a user is invited to a channel. .PP -Definition at line 94 of file users.cpp. +Definition at line 103 of file users.cpp. .PP References invites. .PP .nf -95 { -96 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) -97 { -98 if (i->channel) { -99 if (!strcasecmp(i->channel,channel)) -100 { -101 return true; -102 } -103 } -104 } -105 return false; -106 } +104 { +105 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) +106 { +107 if (i->channel) { +108 if (!strcasecmp(i->channel,channel)) +109 { +110 return true; +111 } +112 } +113 } +114 return false; +115 } .fi .PP .SS "int userrec::ReadData (void * buffer, size_t size)" .PP Calls read() to read some data for this user using their fd. .PP -Definition at line 76 of file users.cpp. +Definition at line 85 of file users.cpp. .PP References DEBUG. .PP .nf -77 { -78 if (this->fd > -1) -79 { -80 log(DEBUG,'userrec::ReadData on fd %d',this->fd); -81 return read(this->fd, buffer, size); -82 } -83 else return 0; -84 } +86 { +87 if (this->fd > -1) +88 { +89 log(DEBUG,'userrec::ReadData on fd %d',this->fd); +90 return read(this->fd, buffer, size); +91 } +92 else return 0; +93 } .fi .PP .SS "void userrec::RemoveInvite (char * channel)\fC [virtual]\fP" @@ -602,31 +605,31 @@ Removes a channel from a users invite list. .PP This member function is called on successfully joining an invite only channel to which the user has previously been invited, to clear the invitation. .PP -Definition at line 120 of file users.cpp. +Definition at line 129 of file users.cpp. .PP References DEBUG, and invites. .PP .nf -121 { -122 log(DEBUG,'Removing invites'); -123 if (channel) -124 { -125 if (invites.size()) -126 { -127 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) -128 { -129 if (i->channel) -130 { -131 if (!strcasecmp(i->channel,channel)) -132 { -133 invites.erase(i); -134 return; -135 } -136 } -137 } -138 } -139 } -140 } +130 { +131 log(DEBUG,'Removing invites'); +132 if (channel) +133 { +134 if (invites.size()) +135 { +136 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) +137 { +138 if (i->channel) +139 { +140 if (!strcasecmp(i->channel,channel)) +141 { +142 invites.erase(i); +143 return; +144 } +145 } +146 } +147 } +148 } +149 } .fi .PP .SS "void userrec::SetWriteError (\fBstd::string\fP error)" @@ -635,19 +638,19 @@ Sets the write error for a connection. .PP This is done because the actual disconnect of a client may occur at an inopportune time such as half way through /LIST output. The WriteErrors of clients are checked at a more ideal time (in the mainloop) and errored clients purged. .PP -Definition at line 288 of file users.cpp. +Definition at line 299 of file users.cpp. .PP References DEBUG, and WriteError. .PP Referenced by AddBuffer(), AddWriteBuf(), and FlushWriteBuf(). .PP .nf -289 { -290 log(DEBUG,'Setting error string for %s to '%s'',this->nick,error.c_str()); -291 // don't try to set the error twice, its already set take the first string. -292 if (this->WriteError == '') -293 this->WriteError = error; -294 } +300 { +301 log(DEBUG,'Setting error string for %s to '%s'',this->nick,error.c_str()); +302 // don't try to set the error twice, its already set take the first string. +303 if (this->WriteError == '') +304 this->WriteError = error; +305 } .fi .PP .SH "Member Data Documentation" @@ -658,12 +661,12 @@ The user's away message. .PP If this string is empty, the user is not marked as away. .PP -Definition at line 155 of file users.h. +Definition at line 158 of file users.h. .PP Referenced by userrec(). .SS "\fBucrec\fP \fBuserrec::chans\fP[MAXCHANS]" .PP -Definition at line 146 of file users.h. +Definition at line 149 of file users.h. .PP Referenced by Server::PseudoToUser(), and userrec(). .SS "char \fBuserrec::dhost\fP[160]" @@ -672,28 +675,28 @@ The host displayed to non-opers (used for cloaking etc). .PP This usually matches the value of \fBuserrec::host\fP. .PP -Definition at line 131 of file users.h. +Definition at line 134 of file users.h. .PP Referenced by GetFullHost(), and userrec(). .SS "bool \fBuserrec::dns_done\fP" .PP True when \fBDNS\fP lookups are completed. .PP -Definition at line 178 of file users.h. +Definition at line 181 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. .PP -Definition at line 161 of file users.h. +Definition at line 164 of file users.h. .PP Referenced by userrec(). .SS "char \fBuserrec::fullname\fP[MAXGECOS+1]" .PP The users full name. .PP -Definition at line 135 of file users.h. +Definition at line 138 of file users.h. .PP Referenced by userrec(). .SS "char \fBuserrec::ident\fP[IDENTMAX+2]" @@ -702,21 +705,21 @@ The users ident reply. .PP Two characters are added to the user-defined limit to compensate for the tilde etc. .PP -Definition at line 126 of file users.h. +Definition at line 129 of file users.h. .PP Referenced by GetFullHost(), GetFullRealHost(), Server::PseudoToUser(), userrec(), and Server::UserToPseudo(). .SS "\fBInvitedList\fP \fBuserrec::invites\fP\fC [private]\fP" .PP A list of channels the user has a pending invite to. .PP -Definition at line 114 of file users.h. +Definition at line 117 of file users.h. .PP Referenced by GetInviteList(), InviteTo(), IsInvited(), RemoveInvite(), and userrec(). .SS "int \fBuserrec::lines_in\fP" .PP Flood counters. .PP -Definition at line 203 of file users.h. +Definition at line 206 of file users.h. .PP Referenced by userrec(). .SS "char \fBuserrec::modes\fP[54]" @@ -725,7 +728,7 @@ The user's mode string. .PP This may contain any of the following RFC characters: o, w, s, i Your module may define other mode characters as it sees fit. it is limited to length 54, as there can only be a maximum of 52 user modes (26 upper, 26 lower case) a null terminating char, and an optional + character. .PP -Definition at line 144 of file users.h. +Definition at line 147 of file users.h. .PP Referenced by userrec(). .SS "char \fBuserrec::nick\fP[NICKMAX]" @@ -734,7 +737,7 @@ The users nickname. .PP An invalid nickname indicates an unregistered connection prior to the NICK command. .PP -Definition at line 121 of file users.h. +Definition at line 124 of file users.h. .PP Referenced by ConfigReader::DumpErrors(), GetFullHost(), GetFullRealHost(), Server::PseudoToUser(), and userrec(). .SS "char \fBuserrec::oper\fP[NICKMAX]" @@ -743,7 +746,7 @@ The oper type they logged in as, if they are an oper. .PP This is used to check permissions in operclasses, so that we can say 'yay' or 'nay' to any commands they issue. The value of this is the value of a valid 'type name=' tag. .PP -Definition at line 174 of file users.h. +Definition at line 177 of file users.h. .PP Referenced by userrec(). .SS "char \fBuserrec::password\fP[MAXBUF]" @@ -752,31 +755,31 @@ Password specified by the user when they registered. .PP This is stored even if the block doesnt need a password, so that modules may check it. .PP -Definition at line 188 of file users.h. +Definition at line 191 of file users.h. .SS "unsigned int \fBuserrec::pingmax\fP" .PP Number of seconds between PINGs for this user (set from tag. .PP -Definition at line 182 of file users.h. +Definition at line 185 of file users.h. .SS "\fBstd::string\fP \fBuserrec::recvq\fP" .PP User's receive queue. .PP Lines from the IRCd awaiting processing are stored here. Upgraded april 2005, old system a bit hairy. .PP -Definition at line 194 of file users.h. +Definition at line 197 of file users.h. .PP Referenced by AddBuffer(), BufferIsReady(), ClearBuffer(), GetBuffer(), and userrec(). .SS "long \fBuserrec::recvqmax\fP" .PP Maximum size this user's recvq can become. .PP -Definition at line 217 of file users.h. +Definition at line 220 of file users.h. .PP Referenced by AddBuffer(). .SS "time_t \fBuserrec::reset_due\fP" .PP -Definition at line 204 of file users.h. +Definition at line 207 of file users.h. .PP Referenced by userrec(). .SS "\fBstd::string\fP \fBuserrec::sendq\fP" @@ -785,36 +788,36 @@ User's send queue. .PP Lines waiting to be sent are stored here until their buffer is flushed. .PP -Definition at line 199 of file users.h. +Definition at line 202 of file users.h. .PP Referenced by AddWriteBuf(), FlushWriteBuf(), and userrec(). .SS "long \fBuserrec::sendqmax\fP" .PP Maximum size this user's sendq can become. .PP -Definition at line 213 of file users.h. +Definition at line 216 of file users.h. .PP Referenced by AddWriteBuf(). .SS "char* \fBuserrec::server\fP" .PP The server the user is connected to. .PP -Definition at line 150 of file users.h. +Definition at line 153 of file users.h. .PP Referenced by userrec(). .SS "long \fBuserrec::threshold\fP" .PP -Definition at line 205 of file users.h. +Definition at line 208 of file users.h. .SS "unsigned int \fBuserrec::timeout\fP" .PP Number of seconds this user is given to send USER/NICK If they do not send their details in this time limit they will be disconnected. .PP -Definition at line 167 of file users.h. +Definition at line 170 of file users.h. .PP Referenced by userrec(). .SS "\fBstd::string\fP \fBuserrec::WriteError\fP" .PP -Definition at line 209 of file users.h. +Definition at line 212 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 48f8e97a8..392e603cc 100644 --- a/docs/man/man3/users.cpp.3 +++ b/docs/man/man3/users.cpp.3 @@ -1,4 +1,4 @@ -.TH "users.cpp" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "users.cpp" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -20,6 +20,8 @@ users.cpp \- .br \fC#include 'inspstring.h'\fP .br +\fC#include 'commands.h'\fP +.br \fC#include 'helperfuncs.h'\fP .br diff --git a/docs/man/man3/users.h.3 b/docs/man/man3/users.h.3 index 673e90f71..ec37125ae 100644 --- a/docs/man/man3/users.h.3 +++ b/docs/man/man3/users.h.3 @@ -1,4 +1,4 @@ -.TH "users.h" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "users.h" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -75,34 +75,34 @@ users.h \- .PP .SS "#define CC_ALLOW 0" .PP -Definition at line 31 of file users.h. +Definition at line 34 of file users.h. .SS "#define CC_DENY 1" .PP -Definition at line 32 of file users.h. +Definition at line 35 of file users.h. .SS "#define STATUS_HOP 2" .PP -Definition at line 27 of file users.h. +Definition at line 30 of file users.h. .SS "#define STATUS_NORMAL 0" .PP -Definition at line 29 of file users.h. +Definition at line 32 of file users.h. .SS "#define STATUS_OP 4" .PP -Definition at line 26 of file users.h. +Definition at line 29 of file users.h. .SS "#define STATUS_VOICE 1" .PP -Definition at line 28 of file users.h. +Definition at line 31 of file users.h. .SH "Typedef Documentation" .PP .SS "typedef std::vector<\fBConnectClass\fP> \fBClassVector\fP" .PP Holds a complete list of all allow and deny tags from the configuration file (connection classes). .PP -Definition at line 100 of file users.h. +Definition at line 103 of file users.h. .SS "typedef std::vector<\fBInvited\fP> \fBInvitedList\fP" .PP Holds a complete list of all channels to which a user has been invited and has not yet joined. .PP -Definition at line 94 of file users.h. +Definition at line 97 of file users.h. .SH "Author" .PP Generated automatically by Doxygen for InspIRCd from the source code. diff --git a/docs/man/man3/xline.h.3 b/docs/man/man3/xline.h.3 index 9b6a790a3..b2eaee5de 100644 --- a/docs/man/man3/xline.h.3 +++ b/docs/man/man3/xline.h.3 @@ -1,4 +1,4 @@ -.TH "xline.h" 3 "27 Nov 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- +.TH "xline.h" 3 "9 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME @@ -132,6 +132,9 @@ xline.h \- .RI "void \fBzline_set_creation_time\fP (char *ip, time_t create_time)" .br .ti -1c +.RI "void \fBeline_set_creation_time\fP (char *host, time_t create_time)" +.br +.ti -1c .RI "bool \fBzline_make_global\fP (const char *ipaddr)" .br .ti -1c @@ -172,6 +175,8 @@ Referenced by Server::DelQLine(). .SS "bool del_zline (const char * ipaddr)" .PP Referenced by Server::DelZLine(). +.SS "void eline_set_creation_time (char * host, time_t create_time)" +.PP .SS "void expire_lines ()" .PP .SS "void gline_set_creation_time (char * host, time_t create_time)" diff --git a/docs/module-doc/annotated.html b/docs/module-doc/annotated.html index 8d3b2baae..bd438814f 100644 --- a/docs/module-doc/annotated.html +++ b/docs/module-doc/annotated.html @@ -49,7 +49,7 @@ XLineXLine is the base class for ban lines such as G lines and K lines ZLineZLine class -
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/base_8h-source.html b/docs/module-doc/base_8h-source.html index 3023bee60..3a161dafb 100644 --- a/docs/module-doc/base_8h-source.html +++ b/docs/module-doc/base_8h-source.html @@ -29,63 +29,66 @@ 00020 #include "inspircd_config.h" 00021 #include <time.h> 00022 #include <map> -00023 #include <string> -00024 -00025 typedef void* VoidPointer; -00026 -00029 class classbase -00030 { -00031 public: -00034 time_t age; -00035 -00039 classbase() { age = time(NULL); } -00040 ~classbase() { } -00041 }; -00042 -00050 class Extensible : public classbase -00051 { -00054 std::map<std::string,char*> Extension_Items; -00055 -00056 public: -00057 -00069 bool Extend(std::string key, char* p); -00070 -00080 bool Shrink(std::string key); -00081 -00088 char* GetExt(std::string key); -00089 }; +00023 #include <deque> +00024 #include <string> +00025 +00026 typedef void* VoidPointer; +00027 +00030 class classbase +00031 { +00032 public: +00035 time_t age; +00036 +00040 classbase() { age = time(NULL); } +00041 ~classbase() { } +00042 }; +00043 +00051 class Extensible : public classbase +00052 { +00055 std::map<std::string,char*> Extension_Items; +00056 +00057 public: +00058 +00070 bool Extend(std::string key, char* p); +00071 +00081 bool Shrink(std::string key); +00082 +00089 char* GetExt(std::string key); 00090 -00095 class BoolSet -00096 { -00097 char bits; -00098 -00099 public: -00100 -00103 BoolSet(); -00104 -00107 BoolSet(char bitmask); -00108 -00113 void Set(int number); -00114 -00121 bool Get(int number); -00122 -00127 void Unset(int number); -00128 -00133 void Invert(int number); -00134 -00137 bool operator==(BoolSet other); -00138 -00141 BoolSet operator|(BoolSet other); -00142 -00145 BoolSet operator&(BoolSet other); -00146 -00149 bool operator=(BoolSet other); -00150 }; -00151 -00152 -00153 #endif -00154 -
Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +00097 void GetExtList(std::deque<std::string> &list); +00098 }; +00099 +00104 class BoolSet +00105 { +00106 char bits; +00107 +00108 public: +00109 +00112 BoolSet(); +00113 +00116 BoolSet(char bitmask); +00117 +00122 void Set(int number); +00123 +00130 bool Get(int number); +00131 +00136 void Unset(int number); +00137 +00142 void Invert(int number); +00143 +00146 bool operator==(BoolSet other); +00147 +00150 BoolSet operator|(BoolSet other); +00151 +00154 BoolSet operator&(BoolSet other); +00155 +00158 bool operator=(BoolSet other); +00159 }; +00160 +00161 +00162 #endif +00163 +
Generated on Fri Dec 9 20:20:03 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/base_8h.html b/docs/module-doc/base_8h.html index f2d9350a9..775e3da7e 100644 --- a/docs/module-doc/base_8h.html +++ b/docs/module-doc/base_8h.html @@ -10,6 +10,7 @@

base.h File Reference

#include "inspircd_config.h"
#include <time.h>
#include <map>
+#include <deque>
#include <string>

@@ -18,18 +19,18 @@ Include dependency graph for base.h:

This graph shows which files directly or indirectly include this file:

- - - - - - - - - - - - + + + + + + + + + + + +

@@ -72,10 +73,10 @@ This graph shows which files directly or indirectly include this file:

-Definition at line 25 of file base.h. +Definition at line 26 of file base.h. -


Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:04 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/base_8h__dep__incl.gif b/docs/module-doc/base_8h__dep__incl.gif index 3722ae7c0..ae4b48aaa 100644 Binary files a/docs/module-doc/base_8h__dep__incl.gif and b/docs/module-doc/base_8h__dep__incl.gif differ diff --git a/docs/module-doc/base_8h__dep__incl.map b/docs/module-doc/base_8h__dep__incl.map index 1174c2639..cecf4bb8a 100644 --- a/docs/module-doc/base_8h__dep__incl.map +++ b/docs/module-doc/base_8h__dep__incl.map @@ -1,13 +1,13 @@ base referer -rect $channels_8h-source.html 123,260 208,287 -rect $connection_8h-source.html 116,108 215,135 -rect $ctables_8h-source.html 264,7 339,33 -rect $modules_8h-source.html 396,57 479,84 -rect $users_8cpp-source.html 398,159 478,185 -rect $users_8h-source.html 270,260 334,287 -rect $commands_8h-source.html 388,463 487,489 -rect $message_8h-source.html 395,209 480,236 -rect $mode_8h-source.html 404,311 471,337 -rect $xline_8h-source.html 407,361 468,388 -rect $channels_8cpp-source.html 536,235 635,261 -rect $modules_8cpp-source.html 536,311 635,337 +rect $channels_8h-source.html 123,327 208,353 +rect $connection_8h-source.html 116,276 215,303 +rect $ctables_8h-source.html 264,529 339,556 +rect $modules_8h-source.html 396,479 479,505 +rect $users_8cpp-source.html 546,99 626,125 +rect $users_8h-source.html 270,276 334,303 +rect $commands_8h-source.html 388,124 487,151 +rect $message_8h-source.html 395,428 480,455 +rect $mode_8h-source.html 404,327 471,353 +rect $xline_8h-source.html 407,377 468,404 +rect $channels_8cpp-source.html 536,428 635,455 +rect $modules_8cpp-source.html 536,377 635,404 diff --git a/docs/module-doc/base_8h__dep__incl.md5 b/docs/module-doc/base_8h__dep__incl.md5 index e545b47b2..4d82252e0 100644 --- a/docs/module-doc/base_8h__dep__incl.md5 +++ b/docs/module-doc/base_8h__dep__incl.md5 @@ -1 +1 @@ -f6b12bb178ea9037bef41c096843593c \ No newline at end of file +e28f78b35c4f957a36c51e1bcb09e76a \ No newline at end of file diff --git a/docs/module-doc/base_8h__incl.gif b/docs/module-doc/base_8h__incl.gif index 009720209..3f882f006 100644 Binary files a/docs/module-doc/base_8h__incl.gif and b/docs/module-doc/base_8h__incl.gif differ diff --git a/docs/module-doc/base_8h__incl.md5 b/docs/module-doc/base_8h__incl.md5 index 9190d9f22..008189a10 100644 --- a/docs/module-doc/base_8h__incl.md5 +++ b/docs/module-doc/base_8h__incl.md5 @@ -1 +1 @@ -67c328a54e3df328858803d816336df4 \ No newline at end of file +6c8bdf0cad8e094c4c6082bc5e0b8386 \ No newline at end of file diff --git a/docs/module-doc/channels_8cpp-source.html b/docs/module-doc/channels_8cpp-source.html index d99c7dae0..2d0f5739d 100644 --- a/docs/module-doc/channels_8cpp-source.html +++ b/docs/module-doc/channels_8cpp-source.html @@ -225,7 +225,7 @@ 00216 { 00217 return &internal_userlist; 00218 } -
Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:03 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/channels_8cpp.html b/docs/module-doc/channels_8cpp.html index cfaa8f104..5d78dcae2 100644 --- a/docs/module-doc/channels_8cpp.html +++ b/docs/module-doc/channels_8cpp.html @@ -263,7 +263,7 @@ Definition at line 53

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

@@ -430,7 +430,7 @@ Referenced by chanrec::Get

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

@@ -526,9 +526,9 @@ Definition at line 81

-Definition at line 994 of file modules.cpp. +Definition at line 1032 of file modules.cpp.

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

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

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

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

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

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

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

@@ -881,7 +881,7 @@ Referenced by userrec::userre

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

@@ -930,7 +930,7 @@ Referenced by userrec::userre -


Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:05 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/channels_8cpp__incl.md5 b/docs/module-doc/channels_8cpp__incl.md5 index bc705adcd..8b4c9e585 100644 --- a/docs/module-doc/channels_8cpp__incl.md5 +++ b/docs/module-doc/channels_8cpp__incl.md5 @@ -1 +1 @@ -b9467ee45a5cd937945c9c8802f0376d \ No newline at end of file +00cd09e5fafd85fb588d65342322aed6 \ No newline at end of file diff --git a/docs/module-doc/channels_8h-source.html b/docs/module-doc/channels_8h-source.html index e9acc6bb2..26d81b34d 100644 --- a/docs/module-doc/channels_8h-source.html +++ b/docs/module-doc/channels_8h-source.html @@ -148,7 +148,7 @@ 00257 00258 #endif 00259 -
Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:03 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/channels_8h.html b/docs/module-doc/channels_8h.html index b1a4e82db..2374c6875 100644 --- a/docs/module-doc/channels_8h.html +++ b/docs/module-doc/channels_8h.html @@ -22,14 +22,14 @@ Include dependency graph for channels.h:

- - - - - - - - + + + + + + + +

@@ -449,7 +449,7 @@ Holds a complete invite list. Definition at line 95 of file channels.h. -


Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:06 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/channels_8h__dep__incl.gif b/docs/module-doc/channels_8h__dep__incl.gif index c30f900f1..201a0931d 100644 Binary files a/docs/module-doc/channels_8h__dep__incl.gif and b/docs/module-doc/channels_8h__dep__incl.gif differ diff --git a/docs/module-doc/channels_8h__dep__incl.map b/docs/module-doc/channels_8h__dep__incl.map index 6a4cbd04f..cff1e4e14 100644 --- a/docs/module-doc/channels_8h__dep__incl.map +++ b/docs/module-doc/channels_8h__dep__incl.map @@ -1,9 +1,9 @@ base referer -rect $users_8cpp-source.html 267,7 347,33 -rect $users_8h-source.html 144,199 208,225 -rect $commands_8h-source.html 257,311 356,337 -rect $message_8h-source.html 264,57 349,84 -rect $mode_8h-source.html 273,159 340,185 -rect $xline_8h-source.html 276,260 337,287 -rect $channels_8cpp-source.html 405,133 504,160 -rect $modules_8cpp-source.html 405,209 504,236 +rect $users_8cpp-source.html 415,58 495,84 +rect $users_8h-source.html 144,210 208,236 +rect $commands_8h-source.html 257,58 356,84 +rect $message_8h-source.html 264,362 349,388 +rect $mode_8h-source.html 273,159 340,186 +rect $xline_8h-source.html 276,311 337,338 +rect $channels_8cpp-source.html 405,286 504,312 +rect $modules_8cpp-source.html 405,210 504,236 diff --git a/docs/module-doc/channels_8h__dep__incl.md5 b/docs/module-doc/channels_8h__dep__incl.md5 index 25db181a9..deb32325f 100644 --- a/docs/module-doc/channels_8h__dep__incl.md5 +++ b/docs/module-doc/channels_8h__dep__incl.md5 @@ -1 +1 @@ -3803f94897b7a90d54a987bd74d935ae \ No newline at end of file +dae3fe0b8a33c3f04852556c65af182e \ No newline at end of file diff --git a/docs/module-doc/channels_8h__incl.gif b/docs/module-doc/channels_8h__incl.gif index 8e4dd03bb..2c8fb0983 100644 Binary files a/docs/module-doc/channels_8h__incl.gif and b/docs/module-doc/channels_8h__incl.gif differ diff --git a/docs/module-doc/channels_8h__incl.md5 b/docs/module-doc/channels_8h__incl.md5 index e2b7ccf71..18c79c8c4 100644 --- a/docs/module-doc/channels_8h__incl.md5 +++ b/docs/module-doc/channels_8h__incl.md5 @@ -1 +1 @@ -bff3dff79fdca44ef00db5b6a6df4411 \ No newline at end of file +2faa87cc7e26d0d2ae6d67b690f5412a \ No newline at end of file diff --git a/docs/module-doc/classAdmin-members.html b/docs/module-doc/classAdmin-members.html index 493a13aa1..f00b7f227 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 Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classAdmin.html b/docs/module-doc/classAdmin.html index d026f9314..2dba3923c 100644 --- a/docs/module-doc/classAdmin.html +++ b/docs/module-doc/classAdmin.html @@ -38,7 +38,7 @@ It is constructed by class Server, and

-Definition at line 124 of file modules.h.


Constructor & Destructor Documentation

+Definition at line 125 of file modules.h.

Constructor & Destructor Documentation

@@ -110,7 +110,7 @@ Definition at line 250

-Definition at line 127 of file modules.h. +Definition at line 128 of file modules.h.

@@ -135,7 +135,7 @@ Definition at line 127 of

-Definition at line 127 of file modules.h. +Definition at line 128 of file modules.h.

@@ -160,12 +160,12 @@ Definition at line 127 of

-Definition at line 127 of file modules.h. +Definition at line 128 of file modules.h.


The documentation for this class was generated from the following files: -
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classBanItem-members.html b/docs/module-doc/classBanItem-members.html index 15d2909d0..6f4b5a8c3 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 Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classBanItem.html b/docs/module-doc/classBanItem.html index 7dd3b43e8..a485356af 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 Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classBoolSet-members.html b/docs/module-doc/classBoolSet-members.html index c0728dad7..9a39a66b9 100644 --- a/docs/module-doc/classBoolSet-members.html +++ b/docs/module-doc/classBoolSet-members.html @@ -17,7 +17,7 @@ operator|(BoolSet other)BoolSet Set(int number)BoolSet Unset(int number)BoolSet -
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classBoolSet.html b/docs/module-doc/classBoolSet.html index c812aee4f..5cf4610b1 100644 --- a/docs/module-doc/classBoolSet.html +++ b/docs/module-doc/classBoolSet.html @@ -55,7 +55,7 @@ Use BoolSet::Set

-Definition at line 95 of file base.h.


Constructor & Destructor Documentation

+Definition at line 104 of file base.h.

Constructor & Destructor Documentation

@@ -400,12 +400,12 @@ The Unset method unsets one value in the set.

-Definition at line 97 of file base.h. +Definition at line 106 of file base.h.


The documentation for this class was generated from the following file: -
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classConfigReader-members.html b/docs/module-doc/classConfigReader-members.html index 27016f475..ad8fb8962 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 Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classConfigReader.html b/docs/module-doc/classConfigReader.html index 331390141..6a8a95db9 100644 --- a/docs/module-doc/classConfigReader.html +++ b/docs/module-doc/classConfigReader.html @@ -73,7 +73,7 @@ It may either be instantiated with one parameter or none. Constructing the class

-Definition at line 1121 of file modules.h.


Constructor & Destructor Documentation

+Definition at line 1510 of file modules.h.

Constructor & Destructor Documentation

@@ -102,16 +102,16 @@ Default constructor.

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

-Definition at line 796 of file modules.cpp. +Definition at line 834 of file modules.cpp.

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

00797 {
-00798         include_stack.clear();
-00799         this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
-00800         this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
-00801         this->readerror = LoadConf(CONFIG_FILE,this->cache,this->errorlog);
-00802         if (!this->readerror)
-00803                 this->error = CONF_FILE_NOT_FOUND;
-00804 }
+References cache, CONF_FILE_NOT_FOUND, error, errorlog, include_stack, and readerror.
00835 {
+00836         include_stack.clear();
+00837         this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
+00838         this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
+00839         this->readerror = LoadConf(CONFIG_FILE,this->cache,this->errorlog);
+00840         if (!this->readerror)
+00841                 this->error = CONF_FILE_NOT_FOUND;
+00842 }
 

@@ -146,15 +146,15 @@ Overloaded constructor.

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

-Definition at line 816 of file modules.cpp. +Definition at line 854 of file modules.cpp.

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

00817 {
-00818         this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
-00819         this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
-00820         this->readerror = LoadConf(filename.c_str(),this->cache,this->errorlog);
-00821         if (!this->readerror)
-00822                 this->error = CONF_FILE_NOT_FOUND;
-00823 };
+References cache, CONF_FILE_NOT_FOUND, error, errorlog, and readerror.
00855 {
+00856         this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);
+00857         this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out);
+00858         this->readerror = LoadConf(filename.c_str(),this->cache,this->errorlog);
+00859         if (!this->readerror)
+00860                 this->error = CONF_FILE_NOT_FOUND;
+00861 };
 

@@ -188,14 +188,14 @@ Default destructor.

This method destroys the ConfigReader class.

-Definition at line 807 of file modules.cpp. +Definition at line 845 of file modules.cpp.

-References cache, and errorlog.

00808 {
-00809         if (this->cache)
-00810                 delete this->cache;
-00811         if (this->errorlog)
-00812                 delete this->errorlog;
-00813 }
+References cache, and errorlog.
00846 {
+00847         if (this->cache)
+00848                 delete this->cache;
+00849         if (this->errorlog)
+00850                 delete this->errorlog;
+00851 }
 

@@ -240,38 +240,38 @@ 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 894 of file modules.cpp. -

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

00895 {
-00896         if (bail)
-00897         {
-00898                 printf("There were errors in your configuration:\n%s",errorlog->str().c_str());
-00899                 exit(0);
-00900         }
-00901         else
-00902         {
-00903                 char dataline[1024];
-00904                 if (user)
-00905                 {
-00906                         WriteServ(user->fd,"NOTICE %s :There were errors in the configuration file:",user->nick);
-00907                         while (!errorlog->eof())
-00908                         {
-00909                                 errorlog->getline(dataline,1024);
-00910                                 WriteServ(user->fd,"NOTICE %s :%s",user->nick,dataline);
-00911                         }
-00912                 }
-00913                 else
-00914                 {
-00915                         WriteOpers("There were errors in the configuration file:",user->nick);
-00916                         while (!errorlog->eof())
-00917                         {
-00918                                 errorlog->getline(dataline,1024);
-00919                                 WriteOpers(dataline);
-00920                         }
-00921                 }
-00922                 return;
-00923         }
-00924 }
+Definition at line 932 of file modules.cpp.
+

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

00933 {
+00934         if (bail)
+00935         {
+00936                 printf("There were errors in your configuration:\n%s",errorlog->str().c_str());
+00937                 exit(0);
+00938         }
+00939         else
+00940         {
+00941                 char dataline[1024];
+00942                 if (user)
+00943                 {
+00944                         WriteServ(user->fd,"NOTICE %s :There were errors in the configuration file:",user->nick);
+00945                         while (!errorlog->eof())
+00946                         {
+00947                                 errorlog->getline(dataline,1024);
+00948                                 WriteServ(user->fd,"NOTICE %s :%s",user->nick,dataline);
+00949                         }
+00950                 }
+00951                 else
+00952                 {
+00953                         WriteOpers("There were errors in the configuration file:",user->nick);
+00954                         while (!errorlog->eof())
+00955                         {
+00956                                 errorlog->getline(dataline,1024);
+00957                                 WriteOpers(dataline);
+00958                         }
+00959                 }
+00960                 return;
+00961         }
+00962 }
 

@@ -306,11 +306,11 @@ 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 927 of file modules.cpp. +Definition at line 965 of file modules.cpp.

-References cache.

00928 {
-00929         return EnumConf(cache,tag.c_str());
-00930 }
+References cache.
00966 {
+00967         return EnumConf(cache,tag.c_str());
+00968 }
 

@@ -354,11 +354,11 @@ 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 932 of file modules.cpp. +Definition at line 970 of file modules.cpp.

-References cache.

00933 {
-00934         return EnumValues(cache, tag.c_str(), index);
-00935 }
+References cache.
00971 {
+00972         return EnumValues(cache, tag.c_str(), index);
+00973 }
 

@@ -392,13 +392,13 @@ 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 887 of file modules.cpp. +Definition at line 925 of file modules.cpp.

-References error.

00888 {
-00889         long olderr = this->error;
-00890         this->error = 0;
-00891         return olderr;
-00892 }
+References error.
00926 {
+00927         long olderr = this->error;
+00928         this->error = 0;
+00929         return olderr;
+00930 }
 

@@ -448,23 +448,23 @@ 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 841 of file modules.cpp. -

-References cache, CONF_VALUE_NOT_FOUND, and error.

00842 {
-00843         char val[MAXBUF];
-00844         char t[MAXBUF];
-00845         char n[MAXBUF];
-00846         strlcpy(t,tag.c_str(),MAXBUF);
-00847         strlcpy(n,name.c_str(),MAXBUF);
-00848         int res = ReadConf(cache,t,n,index,val);
-00849         if (!res)
-00850         {
-00851                 this->error = CONF_VALUE_NOT_FOUND;
-00852                 return false;
-00853         }
-00854         std::string s = val;
-00855         return ((s == "yes") || (s == "YES") || (s == "true") || (s == "TRUE") || (s == "1"));
-00856 }
+Definition at line 879 of file modules.cpp.
+

+References cache, CONF_VALUE_NOT_FOUND, and error.

00880 {
+00881         char val[MAXBUF];
+00882         char t[MAXBUF];
+00883         char n[MAXBUF];
+00884         strlcpy(t,tag.c_str(),MAXBUF);
+00885         strlcpy(n,name.c_str(),MAXBUF);
+00886         int res = ReadConf(cache,t,n,index,val);
+00887         if (!res)
+00888         {
+00889                 this->error = CONF_VALUE_NOT_FOUND;
+00890                 return false;
+00891         }
+00892         std::string s = val;
+00893         return ((s == "yes") || (s == "YES") || (s == "true") || (s == "TRUE") || (s == "1"));
+00894 }
 

@@ -520,35 +520,35 @@ 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 858 of file modules.cpp. -

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

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

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

00897 {
+00898         char val[MAXBUF];
+00899         char t[MAXBUF];
+00900         char n[MAXBUF];
+00901         strlcpy(t,tag.c_str(),MAXBUF);
+00902         strlcpy(n,name.c_str(),MAXBUF);
+00903         int res = ReadConf(cache,t,n,index,val);
+00904         if (!res)
+00905         {
+00906                 this->error = CONF_VALUE_NOT_FOUND;
+00907                 return 0;
+00908         }
+00909         for (unsigned int i = 0; i < strlen(val); i++)
+00910         {
+00911                 if (!isdigit(val[i]))
+00912                 {
+00913                         this->error = CONF_NOT_A_NUMBER;
+00914                         return 0;
+00915                 }
+00916         }
+00917         if ((needs_unsigned) && (atoi(val)<0))
+00918         {
+00919                 this->error = CONF_NOT_UNSIGNED;
+00920                 return 0;
+00921         }
+00922         return atoi(val);
+00923 }
 

@@ -598,22 +598,22 @@ 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 825 of file modules.cpp. -

-References cache, CONF_VALUE_NOT_FOUND, and error.

00826 {
-00827         char val[MAXBUF];
-00828         char t[MAXBUF];
-00829         char n[MAXBUF];
-00830         strlcpy(t,tag.c_str(),MAXBUF);
-00831         strlcpy(n,name.c_str(),MAXBUF);
-00832         int res = ReadConf(cache,t,n,index,val);
-00833         if (!res)
-00834         {
-00835                 this->error = CONF_VALUE_NOT_FOUND;
-00836                 return "";
-00837         }
-00838         return val;
-00839 }
+Definition at line 863 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 "";
+00875         }
+00876         return val;
+00877 }
 

@@ -647,11 +647,11 @@ 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 937 of file modules.cpp. +Definition at line 975 of file modules.cpp.

-References readerror.

00938 {
-00939         return this->readerror;
-00940 }
+References readerror.
00976 {
+00977         return this->readerror;
+00978 }
 

@@ -682,9 +682,9 @@ The contents of the configuration file This protected member should never be acc

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

-Definition at line 1129 of file modules.h. +Definition at line 1518 of file modules.h.

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

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

-Definition at line 1134 of file modules.h. +Definition at line 1523 of file modules.h.

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

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

-Definition at line 1130 of file modules.h. +Definition at line 1519 of file modules.h.

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

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

-Definition at line 1133 of file modules.h. +Definition at line 1522 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 Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classConnectClass-members.html b/docs/module-doc/classConnectClass-members.html index c3f989f12..ee728b9b1 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 Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classConnectClass.html b/docs/module-doc/classConnectClass.html index 8b6b1b40a..ad1f05e34 100644 --- a/docs/module-doc/classConnectClass.html +++ b/docs/module-doc/classConnectClass.html @@ -57,7 +57,7 @@ Holds information relevent to <connect allow> and <connect deny> tag

-Definition at line 45 of file users.h.


Constructor & Destructor Documentation

+Definition at line 48 of file users.h.

Constructor & Destructor Documentation

@@ -84,18 +84,18 @@ Definition at line 45 of fi

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

-References flood, host, pass, pingtime, recvqmax, registration_timeout, sendqmax, and threshold.

00080         {
-00081                 registration_timeout = 0;
-00082                 flood = 0;
-00083                 pingtime = 0;
-00084                 threshold = 0;
-00085                 sendqmax = 0;
-00086                 recvqmax = 0;
-00087                 strlcpy(host,"",MAXBUF);
-00088                 strlcpy(pass,"",MAXBUF);
-00089         }
+Definition at line 82 of file users.h.
+

+References flood, host, pass, pingtime, recvqmax, registration_timeout, sendqmax, and threshold.

00083         {
+00084                 registration_timeout = 0;
+00085                 flood = 0;
+00086                 pingtime = 0;
+00087                 threshold = 0;
+00088                 sendqmax = 0;
+00089                 recvqmax = 0;
+00090                 strlcpy(host,"",MAXBUF);
+00091                 strlcpy(pass,"",MAXBUF);
+00092         }
 

@@ -126,9 +126,9 @@ Number of lines in buffer before excess flood is triggered.

-Definition at line 56 of file users.h. +Definition at line 59 of file users.h.

-Referenced by ConnectClass(). +Referenced by ConnectClass().

@@ -155,9 +155,9 @@ Host mask for this line.

-Definition at line 59 of file users.h. +Definition at line 62 of file users.h.

-Referenced by ConnectClass(). +Referenced by ConnectClass().

@@ -184,9 +184,9 @@ Referenced by ConnectClass()

-Definition at line 65 of file users.h. +Definition at line 68 of file users.h.

-Referenced by ConnectClass(). +Referenced by ConnectClass().

@@ -213,9 +213,9 @@ Number of seconds between pings for this line.

-Definition at line 62 of file users.h. +Definition at line 65 of file users.h.

-Referenced by ConnectClass(). +Referenced by ConnectClass().

@@ -242,9 +242,9 @@ Maximum size of recvq for users in this class (bytes).

-Definition at line 77 of file users.h. +Definition at line 80 of file users.h.

-Referenced by ConnectClass(). +Referenced by ConnectClass().

@@ -271,9 +271,9 @@ Max time to register the connection in seconds.

-Definition at line 53 of file users.h. +Definition at line 56 of file users.h.

-Referenced by ConnectClass(). +Referenced by ConnectClass().

@@ -300,9 +300,9 @@ Maximum size of sendq for users in this class (bytes).

-Definition at line 73 of file users.h. +Definition at line 76 of file users.h.

-Referenced by ConnectClass(). +Referenced by ConnectClass().

@@ -329,9 +329,9 @@ Threshold value for flood disconnect.

-Definition at line 69 of file users.h. +Definition at line 72 of file users.h.

-Referenced by ConnectClass(). +Referenced by ConnectClass().

@@ -358,12 +358,12 @@ Type of line, either CC_ALLOW or CC_DENY.

-Definition at line 50 of file users.h. +Definition at line 53 of file users.h.


The documentation for this class was generated from the following file: -
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classDNS-members.html b/docs/module-doc/classDNS-members.html index f1d0bb6e8..168801c8c 100644 --- a/docs/module-doc/classDNS-members.html +++ b/docs/module-doc/classDNS-members.html @@ -23,17 +23,19 @@ dns_ntoa4(const in_addr *const ip)DNS [private] dns_ntoa4_r(const in_addr *const ip)DNS [private] dns_ntoa4_s(const in_addr *const ip, char *const result)DNS [private] - fdDNS [private] ForwardLookup(std::string host)DNS GetFD()DNS GetResult()DNS + GetResultIP()DNS HasResult()DNS + localbufDNS [private] + myfdDNS [private] resultDNS [private] ReverseLookup(std::string ip)DNS SetNS(std::string dnsserver)DNS tDNS [private] ~DNS()DNS -
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classDNS.html b/docs/module-doc/classDNS.html index 0ed6c7daa..56c81e054 100644 --- a/docs/module-doc/classDNS.html +++ b/docs/module-doc/classDNS.html @@ -35,6 +35,8 @@ Collaboration diagram for DNS:

std::string GetResult ()  This method returns the result of your query as a string, depending upon wether you called DNS::ReverseLookup() or DNS::ForwardLookup.
+std::string GetResultIP () + int GetFD ()  This method returns the file handle used by the dns query socket or zero if the query is invalid for some reason, e.g.
@@ -55,28 +57,30 @@ Collaboration diagram for DNS:

int dns_getname4 (const in_addr *const ip) -char * dns_getresult (const int fd) +char * dns_getresult (const int fd) in_addr * dns_aton4_s (const char *const ipstring, in_addr *const ip) char * dns_ntoa4_s (const in_addr *const ip, char *const result) -char * dns_getresult_s (const int fd, char *const result) +char * dns_getresult_s (const int fd, char *const result) in_addr * dns_aton4_r (const char *const ipstring) char * dns_ntoa4_r (const in_addr *const ip) -char * dns_getresult_r (const int fd) +char * dns_getresult_r (const int fd)

Private Attributes

in_addr * binip char * result +char localbuf [1024] + int t -int fd +int myfd

Detailed Description

@@ -678,6 +682,33 @@ the dns server not responding.

This method returns the result of your query as a string, depending upon wether you called DNS::ReverseLookup() or DNS::ForwardLookup. +

+ + + +

+ + + + +
+ + + + + + + + +
std::string DNS::GetResultIP  ) 
+
+ + + + @@ -795,13 +826,13 @@ This method will start the reverse lookup of an ip given in dotted decimal forma Definition at line 38 of file dns.h.
+   + +

-

+

@@ -817,7 +848,32 @@ Definition at line 38 of file

-Definition at line 42 of file dns.h. +Definition at line 40 of file dns.h. +

+
- +
int DNS::fd [private] char DNS::localbuf[1024] [private]
+

+ + + + +
+ + + + +
int DNS::myfd [private]
+
+ + + +
+   + + +

+ +

+Definition at line 43 of file dns.h.

@@ -867,12 +923,12 @@ Definition at line 39 of file

-Definition at line 40 of file dns.h. +Definition at line 41 of file dns.h.


The documentation for this class was generated from the following file: -
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classDNS__coll__graph.gif b/docs/module-doc/classDNS__coll__graph.gif index ddb6ebb1d..d1cf9cc49 100644 Binary files a/docs/module-doc/classDNS__coll__graph.gif and b/docs/module-doc/classDNS__coll__graph.gif differ diff --git a/docs/module-doc/classDNS__coll__graph.md5 b/docs/module-doc/classDNS__coll__graph.md5 index 7d5283854..3b6e88a7e 100644 --- a/docs/module-doc/classDNS__coll__graph.md5 +++ b/docs/module-doc/classDNS__coll__graph.md5 @@ -1 +1 @@ -30aee4bdc7bc1791511ab48a46f93734 \ No newline at end of file +0840238510d3cd2b1f0c40a4d86dbdbe \ No newline at end of file diff --git a/docs/module-doc/classELine-members.html b/docs/module-doc/classELine-members.html index 94e06c52f..a89e471aa 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 Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classELine.html b/docs/module-doc/classELine.html index 7a26d840d..5a9afa2b1 100644 --- a/docs/module-doc/classELine.html +++ b/docs/module-doc/classELine.html @@ -59,7 +59,7 @@ Definition at line 88 of fi
The documentation for this class was generated from the following file: -
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classEvent-members.html b/docs/module-doc/classEvent-members.html index 626f9ce32..bf5d0ea7d 100644 --- a/docs/module-doc/classEvent-members.html +++ b/docs/module-doc/classEvent-members.html @@ -18,7 +18,7 @@ sourceEvent [protected] ~classbase()classbase [inline] ~ModuleMessage()ModuleMessage [inline, virtual] -
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classEvent.html b/docs/module-doc/classEvent.html index 6e0a14d33..cba0e76e8 100644 --- a/docs/module-doc/classEvent.html +++ b/docs/module-doc/classEvent.html @@ -57,7 +57,7 @@ When the class is properly instantiated it may be sent to all modules using the

-Definition at line 196 of file modules.h.


Constructor & Destructor Documentation

+Definition at line 197 of file modules.h.

Constructor & Destructor Documentation

@@ -139,7 +139,7 @@ Get the Event data.

Definition at line 283 of file modules.cpp.

-References data.

00284 {
+References data.
00284 {
 00285         return this->data;
 00286 }
 
@@ -177,7 +177,7 @@ Use this to determine the event type for safe casting of the data

Definition at line 299 of file modules.cpp.

-References id.

00300 {
+References id.
00300 {
 00301         return this->id;
 00302 }
 
@@ -215,7 +215,7 @@ Get the event Source.

Definition at line 288 of file modules.cpp.

-References source.

00289 {
+References source.
00289 {
 00290         return this->source;
 00291 }
 
@@ -255,7 +255,7 @@ Implements ModuleM

Definition at line 293 of file modules.cpp.

-References FOREACH_MOD.

00294 {
+References FOREACH_MOD.
00294 {
 00295         FOREACH_MOD OnEvent(this);
 00296         return NULL;
 00297 }
@@ -289,7 +289,7 @@ This member holds a pointer to arbitary data set by the emitter of the message.
 

-Definition at line 201 of file modules.h. +Definition at line 202 of file modules.h.

Referenced by GetData().

@@ -318,7 +318,7 @@ The event identifier.

This is arbitary text which should be used to distinguish one type of event from another.

-Definition at line 210 of file modules.h. +Definition at line 211 of file modules.h.

Referenced by GetEventID(). @@ -347,14 +347,14 @@ This is a pointer to the sender of the message, which can be used to directly tr

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

Referenced by GetSource().


The documentation for this class was generated from the following files: -
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classExemptItem-members.html b/docs/module-doc/classExemptItem-members.html index df9a82186..fda27de54 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 Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classExemptItem.html b/docs/module-doc/classExemptItem.html index 3d93816f7..c49acaf37 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 Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classExtMode-members.html b/docs/module-doc/classExtMode-members.html index 9e287e28e..21efddd55 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 Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classExtMode.html b/docs/module-doc/classExtMode.html index 1c1255ba9..c643babee 100644 --- a/docs/module-doc/classExtMode.html +++ b/docs/module-doc/classExtMode.html @@ -251,7 +251,7 @@ Definition at line 143
The documentation for this class was generated from the following file: -
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classExtensible-members.html b/docs/module-doc/classExtensible-members.html index 00599a442..fb1606799 100644 --- a/docs/module-doc/classExtensible-members.html +++ b/docs/module-doc/classExtensible-members.html @@ -11,9 +11,10 @@ Extend(std::string key, char *p)Extensible Extension_ItemsExtensible [private] GetExt(std::string key)Extensible + GetExtList(std::deque< std::string > &list)Extensible Shrink(std::string key)Extensible ~classbase()classbase [inline] -
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classExtensible.html b/docs/module-doc/classExtensible.html index 4308465d9..0deebba1a 100644 --- a/docs/module-doc/classExtensible.html +++ b/docs/module-doc/classExtensible.html @@ -34,6 +34,9 @@ Inheritance diagram for Extensible:

char * GetExt (std::string key)  Get an extension item.
+void GetExtList (std::deque< std::string > &list) + + Get a list of all extension items names.

Private Attributes

std::map< std::string, char * > Extension_Items @@ -46,7 +49,7 @@ class Extensible implements a system which allows modules to 'extend' the class

-Definition at line 50 of file base.h.


Member Function Documentation

+Definition at line 51 of file base.h.

Member Function Documentation

@@ -130,6 +133,42 @@ Get an extension item.
+

+ + + + +
+ + + + + + + + + +
void Extensible::GetExtList std::deque< std::string > &  list  ) 
+
+ + + + + +
+   + + +

+Get a list of all extension items names. +

+

Parameters:
+ + +
list A deque of strings to receive the list
+
+
Returns:
This function writes a list of all extension items stored in this object by name into the given deque and returns void.
+

@@ -192,12 +231,12 @@ Private data store.

-Definition at line 54 of file base.h. +Definition at line 55 of file base.h.


The documentation for this class was generated from the following file: -
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classFileReader-members.html b/docs/module-doc/classFileReader-members.html index c27c1c19d..da64ad375 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 Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classFileReader.html b/docs/module-doc/classFileReader.html index 6141b3c73..afa717b3b 100644 --- a/docs/module-doc/classFileReader.html +++ b/docs/module-doc/classFileReader.html @@ -53,7 +53,7 @@ This class contains methods for read-only manipulation of a text file in memory.

-Definition at line 1210 of file modules.h.


Constructor & Destructor Documentation

+Definition at line 1599 of file modules.h.

Constructor & Destructor Documentation

@@ -82,8 +82,8 @@ 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 950 of file modules.cpp.

00951 {
-00952 }
+Definition at line 988 of file modules.cpp.
00989 {
+00990 }
 

@@ -118,13 +118,13 @@ 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 943 of file modules.cpp. +Definition at line 981 of file modules.cpp.

-References fc.

00944 {
-00945         file_cache c;
-00946         readfile(c,filename.c_str());
-00947         this->fc = c;
-00948 }
+References fc.
00982 {
+00983         file_cache c;
+00984         readfile(c,filename.c_str());
+00985         this->fc = c;
+00986 }
 

@@ -158,8 +158,8 @@ Default destructor.

This deletes the memory allocated to the file.

-Definition at line 962 of file modules.cpp.

00963 {
-00964 }
+Definition at line 1000 of file modules.cpp.
01001 {
+01002 }
 

@@ -194,18 +194,18 @@ Returns true if the file exists This function will return false if the file coul

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

-References fc.

00967 {
-00968         if (fc.size() == 0)
-00969         {
-00970                 return(false);
-00971         }
-00972         else
-00973         {
-00974                 return(true);
-00975         }
-00976 }
+Definition at line 1004 of file modules.cpp.
+

+References fc.

01005 {
+01006         if (fc.size() == 0)
+01007         {
+01008                 return(false);
+01009         }
+01010         else
+01011         {
+01012                 return(true);
+01013         }
+01014 }
 

@@ -239,11 +239,11 @@ 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 985 of file modules.cpp. +Definition at line 1023 of file modules.cpp.

-References fc.

00986 {
-00987         return fc.size();
-00988 }
+References fc.
01024 {
+01025         return fc.size();
+01026 }
 

@@ -278,13 +278,13 @@ 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 978 of file modules.cpp. +Definition at line 1016 of file modules.cpp.

-References fc.

00979 {
-00980         if ((x<0) || ((unsigned)x>fc.size()))
-00981                 return "";
-00982         return fc[x];
-00983 }
+References fc.
01017 {
+01018         if ((x<0) || ((unsigned)x>fc.size()))
+01019                 return "";
+01020         return fc[x];
+01021 }
 

@@ -319,13 +319,13 @@ 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 954 of file modules.cpp. +Definition at line 992 of file modules.cpp.

-References fc.

00955 {
-00956         file_cache c;
-00957         readfile(c,filename.c_str());
-00958         this->fc = c;
-00959 }
+References fc.
00993 {
+00994         file_cache c;
+00995         readfile(c,filename.c_str());
+00996         this->fc = c;
+00997 }
 

@@ -354,14 +354,14 @@ References fc.

-Definition at line 1212 of file modules.h. +Definition at line 1601 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 Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classGLine-members.html b/docs/module-doc/classGLine-members.html index eca26ed66..7b280769c 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 Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classGLine.html b/docs/module-doc/classGLine.html index 6d2a46d4d..87544b0d1 100644 --- a/docs/module-doc/classGLine.html +++ b/docs/module-doc/classGLine.html @@ -62,7 +62,7 @@ Definition at line 79 of fi
The documentation for this class was generated from the following file: -
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classHostItem-members.html b/docs/module-doc/classHostItem-members.html index 6914cbe50..5c90d36c3 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 Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classHostItem.html b/docs/module-doc/classHostItem.html index 238f52f13..e22456404 100644 --- a/docs/module-doc/classHostItem.html +++ b/docs/module-doc/classHostItem.html @@ -186,7 +186,7 @@ Definition at line 39 of
The documentation for this class was generated from the following file: -
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classInspSocket-members.html b/docs/module-doc/classInspSocket-members.html index 360dde71c..efbe82517 100644 --- a/docs/module-doc/classInspSocket-members.html +++ b/docs/module-doc/classInspSocket-members.html @@ -11,12 +11,14 @@ clientInspSocket [private] Close()InspSocket [virtual] fdInspSocket [private] + GetIP()InspSocket GetState()InspSocket hostInspSocket [private] - ibufInspSocket [private] + ibufInspSocket [private] InspSocket()InspSocket - InspSocket(int newfd)InspSocket + InspSocket(int newfd, char *ip)InspSocket InspSocket(std::string host, int port, bool listening, unsigned long maxtime)InspSocket + IPInspSocket [private] lengthInspSocket [private] OnClose()InspSocket [virtual] OnConnected()InspSocket [virtual] @@ -36,7 +38,7 @@ timeout_endInspSocket [private] Write(std::string data)InspSocket [virtual] ~InspSocket()InspSocket [virtual] -
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:12 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classInspSocket.html b/docs/module-doc/classInspSocket.html index ba3112cbe..6aee4b7e0 100644 --- a/docs/module-doc/classInspSocket.html +++ b/docs/module-doc/classInspSocket.html @@ -13,7 +13,7 @@ Collaboration diagram for InspSocket:


Public Member Functions

 InspSocket () - InspSocket (int newfd) + InspSocket (int newfd, char *ip)  InspSocket (std::string host, int port, bool listening, unsigned long maxtime) @@ -31,6 +31,8 @@ Collaboration diagram for InspSocket:

virtual char * Read () +std::string GetIP () + virtual int Write (std::string data) virtual int OnIncomingConnection (int newfd, char *ip) @@ -64,7 +66,9 @@ Collaboration diagram for InspSocket:

pollfd polls -char ibuf [1024] +char ibuf [16384] + +std::string IP sockaddr_in client @@ -115,7 +119,7 @@ References I -

+

- - - + + + + + + + + + + + +
@@ -124,9 +128,18 @@ References I InspSocket::InspSocket int  newfd  )  newfd,
char *  ip
@@ -144,10 +157,11 @@ References I

Definition at line 51 of file socket.cpp.

-References fd, I_CONNECTED, and state.

00052 {
+References fd, I_CONNECTED, IP, and state.
00052 {
 00053         this->fd = newfd;
 00054         this->state = I_CONNECTED;
-00055 }
+00055         this->IP = ip;
+00056 }
 

@@ -201,79 +215,81 @@ References fd, 57 of file socket.cpp. -

-References addr, addy, Close(), DEBUG, fd, I_CONNECTING, I_ERR_BIND, I_ERR_CONNECT, I_ERR_SOCKET, I_ERROR, I_LISTENING, OnError(), state, timeout, and timeout_end.

00058 {
-00059         if (listening) {
-00060                 if ((this->fd = OpenTCPSocket()) == ERROR)
-00061                 {
-00062                         this->fd = -1;
-00063                         this->state = I_ERROR;
-00064                         this->OnError(I_ERR_SOCKET);
-00065                         log(DEBUG,"OpenTCPSocket() error");
-00066                         return;
-00067                 }
-00068                 else
-00069                 {
-00070                         if (BindSocket(this->fd,this->client,this->server,port,(char*)host.c_str()) == ERROR)
-00071                         {
-00072                                 this->Close();
-00073                                 this->fd = -1;
-00074                                 this->state = I_ERROR;
-00075                                 this->OnError(I_ERR_BIND);
-00076                                 log(DEBUG,"BindSocket() error %s",strerror(errno));
-00077                                 return;
-00078                         }
-00079                         else
-00080                         {
-00081                                 this->state = I_LISTENING;
-00082                                 log(DEBUG,"New socket now in I_LISTENING state");
-00083                                 return;
-00084                         }
-00085                 }                       
-00086         } else {
-00087                 char* ip;
-00088                 this->host = host;
-00089                 hostent* hoste = gethostbyname(host.c_str());
-00090                 if (!hoste) {
-00091                         ip = (char*)host.c_str();
-00092                 } else {
-00093                         struct in_addr* ia = (in_addr*)hoste->h_addr;
-00094                         ip = inet_ntoa(*ia);
-00095                 }
-00096 
-00097                 timeout_end = time(NULL)+maxtime;
-00098                 timeout = false;
-00099                 if ((this->fd = socket(AF_INET, SOCK_STREAM, 0)) == -1)
-00100                 {
-00101                         this->state = I_ERROR;
-00102                         this->OnError(I_ERR_SOCKET);
-00103                         return;
-00104                 }
-00105                 this->port = port;
-00106                 inet_aton(ip,&addy);
-00107                 addr.sin_family = AF_INET;
-00108                 addr.sin_addr = addy;
-00109                 addr.sin_port = htons(this->port);
-00110 
-00111                 int flags;
-00112                 flags = fcntl(this->fd, F_GETFL, 0);
-00113                 fcntl(this->fd, F_SETFL, flags | O_NONBLOCK);
-00114 
-00115                 if(connect(this->fd, (sockaddr*)&this->addr,sizeof(this->addr)) == -1)
-00116                 {
-00117                         if (errno != EINPROGRESS)
-00118                         {
-00119                                 this->Close();
-00120                                 this->OnError(I_ERR_CONNECT);
-00121                                 this->state = I_ERROR;
-00122                                 return;
-00123                         }
-00124                 }
-00125                 this->state = I_CONNECTING;
-00126                 return;
-00127         }
-00128 }
+Definition at line 58 of file socket.cpp.
+

+References addr, addy, Close(), DEBUG, fd, I_CONNECTING, I_ERR_BIND, I_ERR_CONNECT, I_ERR_SOCKET, I_ERROR, I_LISTENING, IP, OnError(), state, timeout, and timeout_end.

00059 {
+00060         if (listening) {
+00061                 if ((this->fd = OpenTCPSocket()) == ERROR)
+00062                 {
+00063                         this->fd = -1;
+00064                         this->state = I_ERROR;
+00065                         this->OnError(I_ERR_SOCKET);
+00066                         log(DEBUG,"OpenTCPSocket() error");
+00067                         return;
+00068                 }
+00069                 else
+00070                 {
+00071                         if (BindSocket(this->fd,this->client,this->server,port,(char*)host.c_str()) == ERROR)
+00072                         {
+00073                                 this->Close();
+00074                                 this->fd = -1;
+00075                                 this->state = I_ERROR;
+00076                                 this->OnError(I_ERR_BIND);
+00077                                 log(DEBUG,"BindSocket() error %s",strerror(errno));
+00078                                 return;
+00079                         }
+00080                         else
+00081                         {
+00082                                 this->state = I_LISTENING;
+00083                                 log(DEBUG,"New socket now in I_LISTENING state");
+00084                                 return;
+00085                         }
+00086                 }                       
+00087         } else {
+00088                 char* ip;
+00089                 this->host = host;
+00090                 hostent* hoste = gethostbyname(host.c_str());
+00091                 if (!hoste) {
+00092                         ip = (char*)host.c_str();
+00093                 } else {
+00094                         struct in_addr* ia = (in_addr*)hoste->h_addr;
+00095                         ip = inet_ntoa(*ia);
+00096                 }
+00097 
+00098                 this->IP = ip;
+00099 
+00100                 timeout_end = time(NULL)+maxtime;
+00101                 timeout = false;
+00102                 if ((this->fd = socket(AF_INET, SOCK_STREAM, 0)) == -1)
+00103                 {
+00104                         this->state = I_ERROR;
+00105                         this->OnError(I_ERR_SOCKET);
+00106                         return;
+00107                 }
+00108                 this->port = port;
+00109                 inet_aton(ip,&addy);
+00110                 addr.sin_family = AF_INET;
+00111                 addr.sin_addr = addy;
+00112                 addr.sin_port = htons(this->port);
+00113 
+00114                 int flags;
+00115                 flags = fcntl(this->fd, F_GETFL, 0);
+00116                 fcntl(this->fd, F_SETFL, flags | O_NONBLOCK);
+00117 
+00118                 if(connect(this->fd, (sockaddr*)&this->addr,sizeof(this->addr)) == -1)
+00119                 {
+00120                         if (errno != EINPROGRESS)
+00121                         {
+00122                                 this->Close();
+00123                                 this->OnError(I_ERR_CONNECT);
+00124                                 this->state = I_ERROR;
+00125                                 return;
+00126                         }
+00127                 }
+00128                 this->state = I_CONNECTING;
+00129                 return;
+00130         }
+00131 }
 

@@ -305,11 +321,11 @@ References addr,

-Definition at line 246 of file socket.cpp. +Definition at line 254 of file socket.cpp.

-References Close().

00247 {
-00248         this->Close();
-00249 }
+References Close().
00255 {
+00256         this->Close();
+00257 }
 

@@ -342,19 +358,55 @@ References Close().

-Definition at line 130 of file socket.cpp. +Definition at line 133 of file socket.cpp.

-References fd, and OnClose(). +References fd, and OnClose().

-Referenced by InspSocket(), and ~InspSocket().

00131 {
-00132         if (this->fd != -1)
-00133         {
-00134                 this->OnClose();
-00135                 shutdown(this->fd,2);
-00136                 close(this->fd);
-00137                 this->fd = -1;
-00138         }
-00139 }
+Referenced by InspSocket(), and ~InspSocket().
00134 {
+00135         if (this->fd != -1)
+00136         {
+00137                 this->OnClose();
+00138                 shutdown(this->fd,2);
+00139                 close(this->fd);
+00140                 this->fd = -1;
+00141         }
+00142 }
+
+

+ + + +

+ + + + +
+ + + + + + + + +
std::string InspSocket::GetIP  ) 
+
+ + + + @@ -386,11 +438,11 @@ Referenced by InspSocket()

-Definition at line 233 of file socket.cpp. +Definition at line 241 of file socket.cpp.

-References state.

00234 {
-00235         return this->state;
-00236 }
+References state.
00242 {
+00243         return this->state;
+00244 }
 

@@ -422,9 +474,9 @@ References state.

-Definition at line 244 of file socket.cpp. +Definition at line 252 of file socket.cpp.

-Referenced by Close().

00244 { return; }
+Referenced by Close().
00252 { return; }
 

@@ -456,9 +508,9 @@ Referenced by Close().

-Definition at line 238 of file socket.cpp. +Definition at line 246 of file socket.cpp.

-Referenced by Poll().

00238 { return true; }
+Referenced by Poll().
00246 { return true; }
 

@@ -490,9 +542,9 @@ Referenced by Poll().

-Definition at line 242 of file socket.cpp. +Definition at line 250 of file socket.cpp.

-Referenced by Poll().

00242 { return true; }
+Referenced by Poll().
00250 { return true; }
 

@@ -524,7 +576,7 @@ Referenced by Poll().

-Definition at line 240 of file socket.cpp.

00240 { return 0; }
+Definition at line 248 of file socket.cpp.
00248 { return 0; }
 

@@ -557,9 +609,9 @@ Definition at line 240 o

-Definition at line 239 of file socket.cpp. +Definition at line 247 of file socket.cpp.

-Referenced by InspSocket(), and Poll().

00239 { return; }
+Referenced by InspSocket(), and Poll().
00247 { return; }
 

@@ -601,9 +653,9 @@ Referenced by InspSocket()

-Definition at line 241 of file socket.cpp. +Definition at line 249 of file socket.cpp.

-Referenced by Poll().

00241 { return 0; }
+Referenced by Poll().
00249 { return 0; }
 

@@ -635,9 +687,9 @@ Referenced by Poll().

-Definition at line 243 of file socket.cpp. +Definition at line 251 of file socket.cpp.

-Referenced by Poll().

00243 { return; }
+Referenced by Poll().
00251 { return; }
 

@@ -669,50 +721,50 @@ Referenced by Poll().

-Definition at line 183 of file socket.cpp. -

-References client, fd, I_CONNECTED, I_CONNECTING, I_ERR_TIMEOUT, I_ERROR, I_LISTENING, length, OnConnected(), OnDataReady(), OnError(), OnIncomingConnection(), OnTimeout(), polls, SetState(), state, timeout, and timeout_end.

00184 {
-00185         if ((time(NULL) > timeout_end) && (this->state == I_CONNECTING))
-00186         {
-00187                 // for non-listening sockets, the timeout can occur
-00188                 // which causes termination of the connection after
-00189                 // the given number of seconds without a successful
-00190                 // connection.
-00191                 this->OnTimeout();
-00192                 this->OnError(I_ERR_TIMEOUT);
-00193                 timeout = true;
-00194                 this->state = I_ERROR;
-00195                 return false;
-00196         }
-00197         polls.fd = this->fd;
-00198         state == I_CONNECTING ? polls.events = POLLOUT : polls.events = POLLIN;
-00199         int ret = poll(&polls,1,1);
-00200 
-00201         if (ret > 0)
-00202         {
-00203                 int incoming = -1;
-00204                 
-00205                 switch (this->state)
-00206                 {
-00207                         case I_CONNECTING:
-00208                                 this->SetState(I_CONNECTED);
-00209                                 return this->OnConnected();
-00210                         break;
-00211                         case I_LISTENING:
-00212                                 length = sizeof (client);
-00213                                 incoming = accept (this->fd, (sockaddr*)&client,&length);
-00214                                 this->OnIncomingConnection(incoming,inet_ntoa(client.sin_addr));
-00215                                 return true;
-00216                         break;
-00217                         case I_CONNECTED:
-00218                                 return this->OnDataReady();
-00219                         break;
-00220                         default:
-00221                         break;
-00222                 }
-00223         }
-00224         return true;
-00225 }
+Definition at line 191 of file socket.cpp.
+

+References client, fd, I_CONNECTED, I_CONNECTING, I_ERR_TIMEOUT, I_ERROR, I_LISTENING, length, OnConnected(), OnDataReady(), OnError(), OnIncomingConnection(), OnTimeout(), polls, SetState(), state, timeout, and timeout_end.

00192 {
+00193         if ((time(NULL) > timeout_end) && (this->state == I_CONNECTING))
+00194         {
+00195                 // for non-listening sockets, the timeout can occur
+00196                 // which causes termination of the connection after
+00197                 // the given number of seconds without a successful
+00198                 // connection.
+00199                 this->OnTimeout();
+00200                 this->OnError(I_ERR_TIMEOUT);
+00201                 timeout = true;
+00202                 this->state = I_ERROR;
+00203                 return false;
+00204         }
+00205         polls.fd = this->fd;
+00206         state == I_CONNECTING ? polls.events = POLLOUT : polls.events = POLLIN;
+00207         int ret = poll(&polls,1,1);
+00208 
+00209         if (ret > 0)
+00210         {
+00211                 int incoming = -1;
+00212                 
+00213                 switch (this->state)
+00214                 {
+00215                         case I_CONNECTING:
+00216                                 this->SetState(I_CONNECTED);
+00217                                 return this->OnConnected();
+00218                         break;
+00219                         case I_LISTENING:
+00220                                 length = sizeof (client);
+00221                                 incoming = accept (this->fd, (sockaddr*)&client,&length);
+00222                                 this->OnIncomingConnection(incoming,inet_ntoa(client.sin_addr));
+00223                                 return true;
+00224                         break;
+00225                         case I_CONNECTED:
+00226                                 return this->OnDataReady();
+00227                         break;
+00228                         default:
+00229                         break;
+00230                 }
+00231         }
+00232         return true;
+00233 }
 

@@ -744,21 +796,21 @@ References client,

-Definition at line 141 of file socket.cpp. +Definition at line 149 of file socket.cpp.

-References DEBUG, and ibuf.

00142 {
-00143         int n = recv(this->fd,this->ibuf,sizeof(this->ibuf),0);
-00144         if (n > 0)
-00145         {
-00146                 ibuf[n] = 0;
-00147                 return ibuf;
-00148         }
-00149         else
-00150         {
-00151                 log(DEBUG,"EOF or error on socket");
-00152                 return NULL;
-00153         }
-00154 }
+References DEBUG, and ibuf.
00150 {
+00151         int n = recv(this->fd,this->ibuf,sizeof(this->ibuf),0);
+00152         if (n > 0)
+00153         {
+00154                 ibuf[n] = 0;
+00155                 return ibuf;
+00156         }
+00157         else
+00158         {
+00159                 log(DEBUG,"EOF or error on socket");
+00160                 return NULL;
+00161         }
+00162 }
 

@@ -791,14 +843,14 @@ References DEBUG, and

-Definition at line 227 of file socket.cpp. +Definition at line 235 of file socket.cpp.

References DEBUG, and state.

-Referenced by Poll().

00228 {
-00229         log(DEBUG,"Socket state change");
-00230         this->state = s;
-00231 }
+Referenced by Poll().
00236 {
+00237         log(DEBUG,"Socket state change");
+00238         this->state = s;
+00239 }
 

@@ -831,27 +883,27 @@ Referenced by Poll().

-Definition at line 160 of file socket.cpp.

00161 {
-00162         char* d = (char*)data.c_str();
-00163         unsigned int written = 0;
-00164         int n = 0;
-00165         int s = data.length();
-00166         while ((written < data.length()) && (n >= 0))
-00167         {
-00168                 n = send(this->fd,d,s,0);
-00169                 if (n > 0)
-00170                 {
-00171                         // If we didnt write everything, advance
-00172                         // the pointers so that when we retry
-00173                         // the next time around the loop, we try
-00174                         // to write what we failed to write before.
-00175                         written += n;
-00176                         s -= n;
-00177                         d += n;
-00178                 }
-00179         }
-00180         return written;
-00181 }
+Definition at line 168 of file socket.cpp.
00169 {
+00170         char* d = (char*)data.c_str();
+00171         unsigned int written = 0;
+00172         int n = 0;
+00173         int s = data.length();
+00174         while ((written < data.length()) && (n >= 0))
+00175         {
+00176                 n = send(this->fd,d,s,0);
+00177                 if (n > 0)
+00178                 {
+00179                         // If we didnt write everything, advance
+00180                         // the pointers so that when we retry
+00181                         // the next time around the loop, we try
+00182                         // to write what we failed to write before.
+00183                         written += n;
+00184                         s -= n;
+00185                         d += n;
+00186                 }
+00187         }
+00188         return written;
+00189 }
 

@@ -882,7 +934,7 @@ Definition at line 160 o

Definition at line 37 of file socket.h.

-Referenced by InspSocket(). +Referenced by InspSocket().

+   + + +

+ +

+Definition at line 144 of file socket.cpp. +

+References IP.

00145 {
+00146         return this->IP;
+00147 }
 

@@ -909,7 +961,7 @@ Referenced by InspSocket() Definition at line 38 of file socket.h.

-Referenced by InspSocket(). +Referenced by InspSocket().

@@ -934,9 +986,9 @@ Referenced by InspSocket()

-Definition at line 43 of file socket.h. +Definition at line 44 of file socket.h.

-Referenced by Poll(). +Referenced by Poll().

@@ -963,7 +1015,7 @@ Referenced by Poll().

Definition at line 33 of file socket.h.

-Referenced by Close(), InspSocket(), and Poll(). +Referenced by Close(), InspSocket(), and Poll().

@@ -991,13 +1043,13 @@ Referenced by Close(), < Definition at line 34 of file socket.h. -

+

@@ -1015,7 +1067,34 @@ Definition at line 34 of f

Definition at line 42 of file socket.h.

-Referenced by Read(). +Referenced by Read(). +

+
- +
char InspSocket::ibuf[1024] [private] char InspSocket::ibuf[16384] [private]
+

+ + + + +
+ + + + +
std::string InspSocket::IP [private]
+
+ + + +
+   + + +

+ +

+Definition at line 43 of file socket.h. +

+Referenced by GetIP(), and InspSocket().

@@ -1040,9 +1119,9 @@ Referenced by Read().

-Definition at line 45 of file socket.h. +Definition at line 46 of file socket.h.

-Referenced by Poll(). +Referenced by Poll().

@@ -1069,7 +1148,7 @@ Referenced by Poll().

Definition at line 41 of file socket.h.

-Referenced by Poll(). +Referenced by Poll().

@@ -1119,7 +1198,7 @@ Definition at line 35 of f

-Definition at line 44 of file socket.h. +Definition at line 45 of file socket.h.

@@ -1146,7 +1225,7 @@ Definition at line 44 of f

Definition at line 36 of file socket.h.

-Referenced by GetState(), InspSocket(), Poll(), and SetState(). +Referenced by GetState(), InspSocket(), Poll(), and SetState().

@@ -1173,7 +1252,7 @@ Referenced by GetState()

Definition at line 40 of file socket.h.

-Referenced by InspSocket(), and Poll(). +Referenced by InspSocket(), and Poll().

@@ -1200,12 +1279,12 @@ Referenced by InspSocket() Definition at line 39 of file socket.h.

-Referenced by InspSocket(), and Poll(). +Referenced by InspSocket(), and Poll().


The documentation for this class was generated from the following files: -
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:12 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classInspSocket__coll__graph.gif b/docs/module-doc/classInspSocket__coll__graph.gif index d86379c9e..9269ee903 100644 Binary files a/docs/module-doc/classInspSocket__coll__graph.gif and b/docs/module-doc/classInspSocket__coll__graph.gif differ diff --git a/docs/module-doc/classInspSocket__coll__graph.md5 b/docs/module-doc/classInspSocket__coll__graph.md5 index f725ccf80..6ab1742da 100644 --- a/docs/module-doc/classInspSocket__coll__graph.md5 +++ b/docs/module-doc/classInspSocket__coll__graph.md5 @@ -1 +1 @@ -54ad555a6ea1c60b284e46323c9c0329 \ No newline at end of file +2124408fbdca907827a4683c5601f725 \ No newline at end of file diff --git a/docs/module-doc/classInviteItem-members.html b/docs/module-doc/classInviteItem-members.html index 716504d80..b63f569dc 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 Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:12 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classInviteItem.html b/docs/module-doc/classInviteItem.html index 0cce8bbce..b1f14360b 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 Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:12 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classInvited-members.html b/docs/module-doc/classInvited-members.html index 1170cf069..7c4b21450 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 Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:12 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classInvited.html b/docs/module-doc/classInvited.html index 37365beb0..8b0434bb5 100644 --- a/docs/module-doc/classInvited.html +++ b/docs/module-doc/classInvited.html @@ -29,7 +29,7 @@ Holds a channel name to which a user has been invited.

-Definition at line 36 of file users.h.


Member Data Documentation

+Definition at line 39 of file users.h.

Member Data Documentation

@@ -52,14 +52,14 @@ Definition at line 36 of fi

-Definition at line 39 of file users.h. +Definition at line 42 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 Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:12 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classKLine-members.html b/docs/module-doc/classKLine-members.html index 4ace61462..e0006eebb 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 Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:12 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classKLine.html b/docs/module-doc/classKLine.html index 6fe7cc184..4a3660712 100644 --- a/docs/module-doc/classKLine.html +++ b/docs/module-doc/classKLine.html @@ -62,7 +62,7 @@ Definition at line 68 of fi
The documentation for this class was generated from the following file: -
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:12 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classModeParameter-members.html b/docs/module-doc/classModeParameter-members.html index 71145bb65..8ed231973 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 Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:12 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classModeParameter.html b/docs/module-doc/classModeParameter.html index 23fafdc0a..8cd857a03 100644 --- a/docs/module-doc/classModeParameter.html +++ b/docs/module-doc/classModeParameter.html @@ -119,7 +119,7 @@ Referenced by chanrec::Set
The documentation for this class was generated from the following file:
-
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:12 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classModule-members.html b/docs/module-doc/classModule-members.html index ae7b0320c..368a410c1 100644 --- a/docs/module-doc/classModule-members.html +++ b/docs/module-doc/classModule-members.html @@ -9,48 +9,70 @@ ageclassbase classbase()classbase [inline] GetVersion()Module [virtual] - Module()Module + Module(Server *Me)Module On005Numeric(std::string &output)Module [virtual] OnAccessCheck(userrec *source, userrec *dest, chanrec *channel, int access_type)Module [virtual] OnAddBan(userrec *source, chanrec *channel, std::string banmask)Module [virtual] + OnAddELine(long duration, userrec *source, std::string reason, std::string hostmask)Module [virtual] + OnAddGLine(long duration, userrec *source, std::string reason, std::string hostmask)Module [virtual] + OnAddKLine(long duration, userrec *source, std::string reason, std::string hostmask)Module [virtual] + OnAddQLine(long duration, userrec *source, std::string reason, std::string nickmask)Module [virtual] + OnAddZLine(long duration, userrec *source, std::string reason, std::string ipmask)Module [virtual] OnBackgroundTimer(time_t curtime)Module [virtual] + OnChangeHost(userrec *user, std::string newhost)Module [virtual] OnChangeLocalUserGECOS(userrec *user, std::string newhost)Module [virtual] OnChangeLocalUserHost(userrec *user, std::string newhost)Module [virtual] - OnChannelSync(chanrec *chan)Module [virtual] + OnChangeName(userrec *user, std::string gecos)Module [virtual] OnCheckBan(userrec *user, chanrec *chan)Module [virtual] OnCheckInvite(userrec *user, chanrec *chan)Module [virtual] OnCheckKey(userrec *user, chanrec *chan, std::string keygiven)Module [virtual] OnCheckLimit(userrec *user, chanrec *chan)Module [virtual] OnCheckReady(userrec *user)Module [virtual] + OnCleanup(int target_type, void *item)Module [virtual] + OnDecodeMetaData(int target_type, void *target, std::string extname, std::string extdata)Module [virtual] OnDelBan(userrec *source, chanrec *channel, std::string banmask)Module [virtual] + OnDelELine(userrec *source, std::string hostmask)Module [virtual] + OnDelGLine(userrec *source, std::string hostmask)Module [virtual] + OnDelKLine(userrec *source, std::string hostmask)Module [virtual] + OnDelQLine(userrec *source, std::string nickmask)Module [virtual] + OnDelZLine(userrec *source, std::string ipmask)Module [virtual] OnEvent(Event *event)Module [virtual] OnExtendedMode(userrec *user, void *target, char modechar, int type, bool mode_on, string_list &params)Module [virtual] + OnGetServerDescription(std::string servername, std::string &description)Module [virtual] OnGlobalConnect(userrec *user)Module [virtual] OnGlobalOper(userrec *user)Module [virtual] OnInfo(userrec *user)Module [virtual] OnKill(userrec *source, userrec *dest, std::string reason)Module [virtual] OnLoadModule(Module *mod, std::string name)Module [virtual] OnLocalTopicChange(userrec *user, chanrec *chan, std::string topic)Module [virtual] - OnOper(userrec *user)Module [virtual] + OnMode(userrec *user, void *dest, int target_type, std::string text)Module [virtual] + OnOper(userrec *user, std::string opertype)Module [virtual] OnOperCompare(std::string password, std::string input)Module [virtual] - OnPacketReceive(std::string &data, std::string serv)Module [virtual] - OnPacketTransmit(std::string &data, std::string serv)Module [virtual] + OnPostLocalTopicChange(userrec *user, chanrec *chan, std::string topic)Module [virtual] OnPreCommand(std::string command, char **parameters, int pcnt, userrec *user)Module [virtual] OnRawMode(userrec *user, chanrec *chan, char mode, std::string param, bool adding, int pcnt)Module [virtual] OnRawSocketAccept(int fd, std::string ip, int localport)Module [virtual] OnRawSocketClose(int fd)Module [virtual] OnRawSocketRead(int fd, char *buffer, unsigned int count, int &readresult)Module [virtual] OnRawSocketWrite(int fd, char *buffer, int count)Module [virtual] - OnRehash()Module [virtual] + OnRehash(std::string parameter)Module [virtual] + OnRemoteKill(userrec *source, userrec *dest, std::string reason)Module [virtual] OnRequest(Request *request)Module [virtual] OnSendList(userrec *user, chanrec *channel, char mode)Module [virtual] OnServerRaw(std::string &raw, bool inbound, userrec *user)Module [virtual] OnStats(char symbol)Module [virtual] + OnSyncChannel(chanrec *chan, Module *proto, void *opaque)Module [virtual] + OnSyncChannelMetaData(chanrec *chan, Module *proto, void *opaque, std::string extname)Module [virtual] + OnSyncUser(userrec *user, Module *proto, void *opaque)Module [virtual] + OnSyncUserMetaData(userrec *user, Module *proto, void *opaque, std::string extname)Module [virtual] OnUnloadModule(Module *mod, std::string name)Module [virtual] OnUserConnect(userrec *user)Module [virtual] OnUserDisconnect(userrec *user)Module [virtual] + OnUserInvite(userrec *source, userrec *dest, chanrec *channel)Module [virtual] OnUserJoin(userrec *user, chanrec *channel)Module [virtual] OnUserKick(userrec *source, userrec *user, chanrec *chan, std::string reason)Module [virtual] + OnUserMessage(userrec *user, void *dest, int target_type, std::string text)Module [virtual] + OnUserNotice(userrec *user, void *dest, int target_type, std::string text)Module [virtual] OnUserPart(userrec *user, chanrec *channel)Module [virtual] OnUserPostNick(userrec *user, std::string oldnick)Module [virtual] OnUserPreInvite(userrec *source, userrec *dest, chanrec *channel)Module [virtual] @@ -59,13 +81,15 @@ OnUserPreMessage(userrec *user, void *dest, int target_type, std::string &text)Module [virtual] OnUserPreNick(userrec *user, std::string newnick)Module [virtual] OnUserPreNotice(userrec *user, void *dest, int target_type, std::string &text)Module [virtual] - OnUserQuit(userrec *user)Module [virtual] + OnUserQuit(userrec *user, std::string message)Module [virtual] OnUserRegister(userrec *user)Module [virtual] - OnUserSync(userrec *user)Module [virtual] + OnWallops(userrec *user, std::string text)Module [virtual] OnWhois(userrec *source, userrec *dest)Module [virtual] + ProtoSendMetaData(void *opaque, int target_type, void *target, std::string extname, std::string extdata)Module [virtual] + ProtoSendMode(void *opaque, int target_type, void *target, std::string modeline)Module [virtual] ~classbase()classbase [inline] ~Module()Module [virtual] -
Generated on Sun Nov 27 01:43:26 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:12 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classModule.html b/docs/module-doc/classModule.html index a97d7c059..deef06e8c 100644 --- a/docs/module-doc/classModule.html +++ b/docs/module-doc/classModule.html @@ -21,9 +21,9 @@ Inheritance diagram for Module:

[legend]
List of all members. - + - + @@ -33,9 +33,9 @@ Inheritance diagram for Module:

virtual void 
- + - + @@ -45,15 +45,9 @@ Inheritance diagram for Module:

virtual void 
- + - - - - - - - + @@ -69,9 +63,9 @@ Inheritance diagram for Module:

virtual void 
- + - + @@ -81,6 +75,9 @@ Inheritance diagram for Module:

virtual int 
+ + + @@ -90,24 +87,94 @@ Inheritance diagram for Module:

virtual int 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + @@ -156,6 +223,9 @@ Inheritance diagram for Module:

virtual int 
+ + + @@ -197,8 +267,8 @@ All modules must inherit from this class, its methods will be called when irc se

-Definition at line 238 of file modules.h.


Constructor & Destructor Documentation

-

+Definition at line 239 of file modules.h.


Constructor & Destructor Documentation

+


Public Member Functions

 Module ()
 Module (Server *Me)
 Default constructor creates a module class.
 Default constructor Creates a module class.
virtual ~Module ()
 Default destructor destroys a module class.
OnUserConnect (userrec *user)
 Called when a user connects.
virtual void OnUserQuit (userrec *user)
virtual void OnUserQuit (userrec *user, std::string message)
 Called when a user quits.
 Called when a user quits.
virtual void OnUserDisconnect (userrec *user)
 Called whenever a user's socket is closed.
OnUserPart (userrec *user, chanrec *channel)
 Called when a user parts a channel.
virtual void OnPacketTransmit (std::string &data, std::string serv)
virtual void OnRehash (std::string parameter)
 Called before a packet is transmitted across the irc network between two irc servers.
virtual void OnPacketReceive (std::string &data, std::string serv)
 Called after a packet is received from another irc server.
virtual void OnRehash ()
 Called on rehash.
 Called on rehash.
virtual void OnServerRaw (std::string &raw, bool inbound, userrec *user)
 Called when a raw command is transmitted or received.
OnUserKick (userrec *source, userrec *user, chanrec *chan, std::string reason)
 Called whenever a user is kicked.
virtual void OnOper (userrec *user)
virtual void OnOper (userrec *user, std::string opertype)
 Called whenever a user opers locally.
 Called whenever a user opers locally.
virtual void OnInfo (userrec *user)
 Called whenever a user types /INFO.
OnUserPreInvite (userrec *source, userrec *dest, chanrec *channel)
 Called whenever a user is about to invite another user into a channel, before any processing is done.
virtual void OnUserInvite (userrec *source, userrec *dest, chanrec *channel)
 Called after a user has been successfully invited to a channel.
virtual int OnUserPreMessage (userrec *user, void *dest, int target_type, std::string &text)
 Called whenever a user is about to PRIVMSG A user or a channel, before any processing is done.
OnUserPreNick (userrec *user, std::string newnick)
 Called before any nickchange, local or remote.
virtual void OnUserMessage (userrec *user, void *dest, int target_type, std::string text)
 Called after any PRIVMSG sent from a user.
virtual void OnUserNotice (userrec *user, void *dest, int target_type, std::string text)
 Called after any NOTICE sent from a user.
virtual void OnMode (userrec *user, void *dest, int target_type, std::string text)
 Called after every MODE command sent from a user The dest variable contains a userrec* if target_type is TYPE_USER and a chanrec* if target_type is TYPE_CHANNEL.
virtual void OnGetServerDescription (std::string servername, std::string &description)
 Allows modules to alter or create server descriptions Whenever a module requires a server description, for example for display in WHOIS, this function is called in all modules.
virtual void OnSyncUser (userrec *user, Module *proto, void *opaque)
 Allows modules to synchronize data which relates to users during a netburst.
virtual void OnSyncChannel (chanrec *chan, Module *proto, void *opaque)
 Allows modules to synchronize data which relates to channels during a netburst.
virtual void OnSyncChannelMetaData (chanrec *chan, Module *proto, void *opaque, std::string extname)
virtual void OnSyncUserMetaData (userrec *user, Module *proto, void *opaque, std::string extname)
virtual void OnDecodeMetaData (int target_type, void *target, std::string extname, std::string extdata)
 Allows module data, sent via ProtoSendMetaData, to be decoded again by a receiving module.
virtual void ProtoSendMode (void *opaque, int target_type, void *target, std::string modeline)
 Implemented by modules which provide the ability to link servers.
virtual void ProtoSendMetaData (void *opaque, int target_type, void *target, std::string extname, std::string extdata)
 Implemented by modules which provide the ability to link servers.
virtual void OnWallops (userrec *user, std::string text)
 Called after every WALLOPS command.
virtual void OnChangeHost (userrec *user, std::string newhost)
 Called whenever a user's hostname is changed.
virtual void OnChangeName (userrec *user, std::string gecos)
 Called whenever a user's GECOS (realname) is changed.
virtual void OnAddGLine (long duration, userrec *source, std::string reason, std::string hostmask)
 Called whenever a gline is added by a local user.
virtual void OnAddZLine (long duration, userrec *source, std::string reason, std::string ipmask)
 Called whenever a zline is added by a local user.
virtual void OnAddKLine (long duration, userrec *source, std::string reason, std::string hostmask)
 Called whenever a kline is added by a local user.
virtual void OnAddQLine (long duration, userrec *source, std::string reason, std::string nickmask)
 Called whenever a qline is added by a local user.
virtual void OnAddELine (long duration, userrec *source, std::string reason, std::string hostmask)
 Called whenever a eline is added by a local user.
virtual void OnDelGLine (userrec *source, std::string hostmask)
 Called whenever a gline is deleted.
virtual void OnDelZLine (userrec *source, std::string ipmask)
 Called whenever a zline is deleted.
virtual void OnDelKLine (userrec *source, std::string hostmask)
 Called whenever a kline is deleted.
virtual void OnDelQLine (userrec *source, std::string nickmask)
 Called whenever a qline is deleted.
virtual void OnDelELine (userrec *source, std::string hostmask)
 Called whenever a eline is deleted.
virtual void OnCleanup (int target_type, void *item)
 Called before your module is unloaded to clean up Extensibles.
virtual void OnUserPostNick (userrec *user, std::string oldnick)
 Called after any nickchange, local or remote.
virtual int OnAccessCheck (userrec *source, userrec *dest, chanrec *channel, int access_type)
 Called before an action which requires a channel privilage check.
virtual string_list OnUserSync (userrec *user)
 Called during a netburst to sync user data.
virtual string_list OnChannelSync (chanrec *chan)
 Called during a netburst to sync channel data.
virtual void On005Numeric (std::string &output)
 Called when a 005 numeric is about to be output.
virtual int OnKill (userrec *source, userrec *dest, std::string reason)
 Called when a client is disconnected by KILL.
virtual void OnRemoteKill (userrec *source, userrec *dest, std::string reason)
 Called when an oper wants to disconnect a remote user via KILL.
virtual void OnLoadModule (Module *mod, std::string name)
 Called whenever a module is loaded.
OnLocalTopicChange (userrec *user, chanrec *chan, std::string topic)
 Called whenever a topic is changed by a local user.
virtual void OnPostLocalTopicChange (userrec *user, chanrec *chan, std::string topic)
 Called whenever a local topic has been changed.
virtual void OnEvent (Event *event)
 Called whenever an Event class is sent to all module by another module.
- + + @@ -222,11 +293,16 @@ Definition at line 238 of @@ -260,7 +336,7 @@ Default destructor destroys a module class.

-Definition at line 307 of file modules.cpp.

00307 { }
+Definition at line 308 of file modules.cpp.
00308 { }
 

@@ -295,9 +371,9 @@ 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 319 of file modules.cpp. +Definition at line 321 of file modules.cpp.

-References VF_VENDOR.

00319 { return Version(1,0,0,0,VF_VENDOR); }
+References VF_VENDOR.
00321 { return Version(1,0,0,0,VF_VENDOR); }
 

@@ -330,7 +406,12 @@ References VF_VENDOR.

Called when a 005 numeric is about to be output.

-The module should modify the 005 numeric if needed to indicate its features. +The module should modify the 005 numeric if needed to indicate its features.

Parameters:
+
@@ -206,7 +276,8 @@ Definition at line 238 of
Module::Module Server Me  ) 

-Default constructor creates a module class. +Default constructor Creates a module class.

+

Parameters:
+ + +
Me An instance of the Server class which can be saved for future use
+

-Definition at line 306 of file modules.cpp.

00306 { }
+Definition at line 307 of file modules.cpp.
00307 { }
 

+ +
output The 005 string to be modified if neccessary.
+ +

Definition at line 331 of file modules.cpp.

00331 { };
 
@@ -397,11 +478,19 @@ This function is called before many functions which check a users status on a ch AC_DEHALFOP (6) - a user is being dehalfopped
AC_INVITE (7) - a user is being invited
AC_GENERAL_MODE (8) - a user channel mode is being changed<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). + 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).
Parameters:
+ + + + + +
source The source of the access check
dest The destination of the access check
channel The channel which is being checked
access_type See above
+
+

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

-References ACR_DEFAULT.

00328 { return ACR_DEFAULT; };
+References ACR_DEFAULT.
00330 { return ACR_DEFAULT; };
 

@@ -449,7 +538,15 @@ References ACR_DEFAULT. 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. +Return a non-zero value to 'eat' the mode change and prevent the ban from being added.

Parameters:
+ + + + +
source The user adding the ban
channel The channel the ban is being added to
banmask The ban mask being added
+
+
Returns:
1 to block the ban, 0 to continue as normal
+

Definition at line 356 of file modules.cpp.

00356 { return 0; };
 
@@ -457,18 +554,39 @@ Definition at line 356 -

+

@@ -482,32 +600,52 @@ Definition at line 356
- + - - - - + + + + + + + + + + + + + + + + + + + + + + + + +
void Module::OnBackgroundTimer void Module::OnAddELine time_t  curtime  )  [virtual]long  duration,
userrec source,
std::string  reason,
std::string  hostmask
[virtual]

-Called once every five seconds for background processing. +Called whenever a eline is added by a local user.

-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. +This method is triggered after the line is added.

Parameters:
+ + + + + +
duration The duration of the line in seconds
source The sender of the line
reason The reason text to be displayed
hostmask The hostmask to add
+
+

-Definition at line 335 of file modules.cpp.

00335 { };
+Definition at line 382 of file modules.cpp.
00382 { };
 

-

+

- + - - + + + + + + + + - + + + + + + + @@ -526,32 +664,52 @@ Definition at line 335
int Module::OnChangeLocalUserGECOS void Module::OnAddGLine userrec user, long  duration,
userrec source,
std::string  newhost reason,
std::string  hostmask

-Called whenever a change of a local users GECOS (fullname field) is attempted. +Called whenever a gline is added by a local user.

-return 1 to deny the name change, or 0 to allow it. +This method is triggered after the line is added.

Parameters:
+ + + + + +
duration The duration of the line in seconds
source The sender of the line
reason The reason text to be displayed
hostmask The hostmask to add
+
+

-Definition at line 349 of file modules.cpp.

00349 { return 0; };
+Definition at line 378 of file modules.cpp.
00378 { };
 

-

+

-
- + - - + + + + + + + + - + + + + + + + @@ -570,28 +728,57 @@ Definition at line 349
int Module::OnChangeLocalUserHost void Module::OnAddKLine userrec user, long  duration,
userrec source,
std::string  newhost reason,
std::string  hostmask

-Called whenever a change of a local users displayed host is attempted. +Called whenever a kline is added by a local user.

-Return 1 to deny the host change, or 0 to allow it. +This method is triggered after the line is added.

Parameters:
+ + + + + +
duration The duration of the line in seconds
source The sender of the line
reason The reason text to be displayed
hostmask The hostmask to add
+
+

-Definition at line 348 of file modules.cpp.

00348 { return 0; };
+Definition at line 380 of file modules.cpp.
00380 { };
 

-

+

@@ -605,32 +792,52 @@ Definition at line 348
- + - - - - + + + + + + + + + + + + + + + + + + + + + + + + +
string_list Module::OnChannelSync void Module::OnAddQLine chanrec chan  )  [virtual]long  duration,
userrec source,
std::string  reason,
std::string  nickmask
[virtual]

-Called during a netburst to sync channel data. +Called whenever a qline is added by a local user.

-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. +This method is triggered after the line is added.

Parameters:
+ + + + + +
duration The duration of the line in seconds
source The sender of the line
reason The reason text to be displayed
nickmask The hostmask to add
+
+

-Definition at line 330 of file modules.cpp.

00330 { string_list empty; return empty; }
+Definition at line 381 of file modules.cpp.
00381 { };
 

-

+

+ + @@ -189,6 +191,8 @@ Inheritance diagram for Server:

virtual void 
+ +
- + - - + + - - + + + + + + + + + + + + + + @@ -649,37 +856,36 @@ Definition at line 330
int Module::OnCheckBan void Module::OnAddZLine userrec user, long  duration,
chanrec chanuserrec source,
std::string  reason,
std::string  ipmask

-Called whenever a user joins a channel, to determine if banlist checks should go ahead or not. +Called whenever a zline is added by a local user.

-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. +This method is triggered after the line is added.

Parameters:
+ + + + + +
duration The duration of the line in seconds
source The sender of the line
reason The reason text to be displayed
ipmask The hostmask to add
+
+

-Definition at line 346 of file modules.cpp.

00346 { return 0; };
+Definition at line 379 of file modules.cpp.
00379 { };
 

-

+

@@ -693,38 +899,37 @@ Definition at line 346
- + - - - - - - - - - - - - - + + + +
int Module::OnCheckInvite void Module::OnBackgroundTimer userrec user,
chanrec chan
[virtual]time_t  curtime  )  [virtual]

-Called whenever a user joins a channel, to determine if invite checks should go ahead or not. +Called once every five seconds for background processing.

-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. +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.

Parameters:
+ + +
curtime The current timer derived from time(2)
+
+

-Definition at line 343 of file modules.cpp.

00343 { return 0; };
+Definition at line 335 of file modules.cpp.
00335 { };
 

-

+

- + - - - - - - - + @@ -743,23 +948,29 @@ Definition at line 343
int Module::OnCheckKey void Module::OnChangeHost userrec user,
chanrec chan,
std::string  keygiven newhost

-Called whenever a user joins a channel, to determine if key checks should go ahead or not. +Called whenever a user's hostname is changed.

-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. +This event triggers after the host has been set.

Parameters:
+ + + +
user The user whos host is being changed
newhost The new hostname being set
+
+

-Definition at line 344 of file modules.cpp.

00344 { return 0; };
+Definition at line 376 of file modules.cpp.
00376 { };
 

-

+

+ + @@ -65,7 +67,7 @@ -
- + @@ -767,8 +978,8 @@ Definition at line 344 - - + + @@ -787,28 +998,44 @@ Definition at line 344
int Module::OnCheckLimit int Module::OnChangeLocalUserGECOS userrec user,
chanrec chanstd::string  newhost

-Called whenever a user joins a channel, to determine if channel limit checks should go ahead or not. +Called whenever a change of a local users GECOS (fullname field) is attempted.

-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. +return 1 to deny the name change, or 0 to allow it.

Parameters:
+ + + +
user The user whos GECOS will be changed
newhost The new GECOS
+
+
Returns:
1 to deny the GECOS change, 0 to allow
+

-Definition at line 345 of file modules.cpp.

00345 { return 0; };
+Definition at line 349 of file modules.cpp.
00349 { return 0; };
 

-

+

@@ -822,38 +1049,39 @@ Definition at line 345
- + - - - + + + + + + + + + + + +
bool Module::OnCheckReady int Module::OnChangeLocalUserHost userrec user  )  [virtual] user,
std::string  newhost
[virtual]

-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. +Called whenever a change of a local users displayed host is attempted.

-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. +Return 1 to deny the host change, or 0 to allow it.

Parameters:
+ + + +
user The user whos host will be changed
newhost The new hostname
+
+
Returns:
1 to deny the host change, 0 to allow
+

-Definition at line 338 of file modules.cpp.

00338 { return true; };
+Definition at line 348 of file modules.cpp.
00348 { return 0; };
 

-

+

+
- + - - - - - - - + - + @@ -872,32 +1100,47 @@ Definition at line 338
int Module::OnDelBan void Module::OnChangeName userrec source,
chanrec channel, user,
std::string  banmask gecos

-Called whenever a ban is removed from a channel's list. +Called whenever a user's GECOS (realname) is changed.

-Return a non-zero value to 'eat' the mode change and prevent the ban from being removed. +This event triggers after the name has been set.

Parameters:
+ + + +
user The user who's GECOS is being changed
gecos The new GECOS being set on the user
+
+

-Definition at line 357 of file modules.cpp.

00357 { return 0; };
+Definition at line 377 of file modules.cpp.
00377 { };
 

-

+

- + + + + + + + + + + + +
- + - - - - + + -
void Module::OnEvent int Module::OnCheckBan Event event  )  [virtual]userrec user,
-
chanrec chan
[virtual]
+

@@ -907,23 +1150,30 @@ Definition at line 357

-Called whenever an Event class is sent to all module by another module. +Called whenever a user joins a channel, to determine if banlist checks should go ahead or not.

-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! +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.

Parameters:
+ + + +
user The user joining the channel
chan The channel being joined
+
+
Returns:
1 to explicitly allow the join, 0 to proceed as normal
+

-Definition at line 351 of file modules.cpp.

00351 { return; };
+Definition at line 346 of file modules.cpp.
00346 { return 0; };
 

-

+

- + @@ -931,32 +1181,8 @@ Definition at line 351 - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -975,28 +1201,50 @@ Definition at line 351
int Module::OnExtendedMode int Module::OnCheckInvite userrec user,
void *  target,
char  modechar,
int  type,
bool  mode_on,
string_list paramschanrec chan

-Called whenever an extended mode is to be processed. +Called whenever a user joins a channel, to determine if invite checks should go ahead or not.

-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. +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.

Parameters:
+ + + +
user The user joining the channel
chan The channel being joined
+
+
Returns:
1 to explicitly allow the join, 0 to proceed as normal
+

-Definition at line 318 of file modules.cpp.

00318 { return false; }
+Definition at line 343 of file modules.cpp.
00343 { return 0; };
 

-

+

@@ -1010,28 +1258,44 @@ Definition at line 318
- + - - - + + + + + + + + + + + + + + + + + +
void Module::OnGlobalConnect int Module::OnCheckKey userrec user  )  [virtual] user,
chanrec chan,
std::string  keygiven
[virtual]

-Called whenever a user connects, anywhere on the network. +Called whenever a user joins a channel, to determine if key checks should go ahead or not.

-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. +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.

Parameters:
+ + + +
user The user joining the channel
chan The channel being joined
+
+
Returns:
1 to explicitly allow the join, 0 to proceed as normal
+

-Definition at line 355 of file modules.cpp.

00355 { };
+Definition at line 344 of file modules.cpp.
00344 { return 0; };
 

-

+

@@ -1045,23 +1309,30 @@ Definition at line 355
- + - - - + + + + + + + + + + + +
void Module::OnGlobalOper int Module::OnCheckLimit userrec user  )  [virtual] user,
chanrec chan
[virtual]

-Called whenever a user is given usermode +o, anywhere on the network. +Called whenever a user joins a channel, to determine if channel limit checks should go ahead or not.

-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. +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.

Parameters:
+ + + +
user The user joining the channel
chan The channel being joined
+
+
Returns:
1 to explicitly allow the join, 0 to proceed as normal
+

-Definition at line 354 of file modules.cpp.

00354 { };
+Definition at line 345 of file modules.cpp.
00345 { return 0; };
 

-

+

-
- + @@ -1080,39 +1351,38 @@ Definition at line 354
void Module::OnInfo bool Module::OnCheckReady userrec user

-Called whenever a user types /INFO. +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.

-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 +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.

Parameters:
+ + +
user The user to check
+
+
Returns:
true to indicate readiness, false if otherwise
+

-Definition at line 321 of file modules.cpp.

00321 { };
+Definition at line 338 of file modules.cpp.
00338 { return true; };
 

-

+

- + - - - - - - - - + + - - + + @@ -1131,32 +1401,50 @@ Definition at line 321
int Module::OnKill void Module::OnCleanup userrec source,
userrec dest, int  target_type,
std::string  reasonvoid *  item

-Called when a client is disconnected by KILL. +Called before your module is unloaded to clean up Extensibles.

-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! +This method is called once for every user and channel on the network, so that when your module unloads it may clear up any remaining data in the form of Extensibles added using Extensible::Extend(). If the target_type variable is TYPE_USER, then void* item refers to a userrec*, otherwise it refers to a chanrec*.

Parameters:
+ + + +
target_type The type of item being cleaned
item A pointer to the item's class
+
+

-Definition at line 332 of file modules.cpp.

00332 { return 0; };
+Definition at line 388 of file modules.cpp.
00388 { };
 

-

+

- + - - + + + + + + + + - + + + + + + + @@ -1175,38 +1463,46 @@ Definition at line 332
void Module::OnLoadModule void Module::OnDecodeMetaData Module mod, int  target_type,
void *  target,
std::string  name extname,
std::string  extdata

-Called whenever a module is loaded. +Allows module data, sent via ProtoSendMetaData, to be decoded again by a receiving module.

-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). +Please see src/modules/m_swhois.cpp for a working example of how to use this method call.

Parameters:
+ + + + + +
target_type The type of item to decode data for, TYPE_USER or TYPE_CHANNEL
target The chanrec* or userrec* that data should be added to
extname The extension name which is being sent
extdata The extension data, encoded at the other end by an identical module through OnSyncChannelMetaData or OnSyncUserMetaData
+
+

-Definition at line 333 of file modules.cpp.

00333 { };
+Definition at line 373 of file modules.cpp.
00373 { };
 

-

+

-
- + - + - + - + @@ -1225,28 +1521,45 @@ Definition at line 333
int Module::OnLocalTopicChange int Module::OnDelBan userrec user, source,
chanrec chan, channel,
std::string  topic banmask

-Called whenever a topic is changed by a local user. +Called whenever a ban is removed from a channel's list.

-Return 1 to deny the topic change, or 0 to allow it. +Return a non-zero value to 'eat' the mode change and prevent the ban from being removed.

Parameters:
+ + + + +
source The user deleting the ban
channel The channel the ban is being deleted from
banmask The ban mask being deleted
+
+
Returns:
1 to block the unban, 0 to continue as normal
+

-Definition at line 350 of file modules.cpp.

00350 { return 0; };
+Definition at line 357 of file modules.cpp.
00357 { return 0; };
 

-

+

@@ -1260,32 +1573,38 @@ Definition at line 350
- + - - - + + + + + + + + + + + +
void Module::OnOper void Module::OnDelELine userrec user  )  [virtual] source,
std::string  hostmask
[virtual]

-Called whenever a user opers locally. +Called whenever a eline is deleted.

-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. +This method is triggered after the line is deleted.

Parameters:
+ + + +
source The user removing the line
hostmask The hostmask to delete
+
+

-Definition at line 320 of file modules.cpp.

00320 { };
+Definition at line 387 of file modules.cpp.
00387 { };
 

-

+

- + - - + + - + @@ -1304,32 +1623,38 @@ Definition at line 320
int Module::OnOperCompare void Module::OnDelGLine std::string  password, userrec source,
std::string  input hostmask

-Called whenever an oper password is to be compared to what a user has input. +Called whenever a gline is deleted.

-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. +This method is triggered after the line is deleted.

Parameters:
+ + + +
source The user removing the line
hostmask The hostmask to delete
+
+

-Definition at line 353 of file modules.cpp.

00353 { return 0; };
+Definition at line 383 of file modules.cpp.
00383 { };
 

-

+

- + - +
- + - - + + - + @@ -1348,32 +1673,38 @@ Definition at line 353
void Module::OnPacketReceive void Module::OnDelKLine std::string data, userrec source,
std::string  serv hostmask

-Called after a packet is received from another irc server. +Called whenever a kline is deleted.

-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. +This method is triggered after the line is deleted.

Parameters:
+ + + +
source The user removing the line
hostmask The hostmask to delete
+
+

-Definition at line 314 of file modules.cpp.

00314 { }
+Definition at line 385 of file modules.cpp.
00385 { };
 

-

+

- + - - + + - + @@ -1392,44 +1723,38 @@ Definition at line 314
void Module::OnPacketTransmit void Module::OnDelQLine std::string data, userrec source,
std::string  serv nickmask

-Called before a packet is transmitted across the irc network between two irc servers. +Called whenever a qline is deleted.

-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. +This method is triggered after the line is deleted.

Parameters:
+ + + +
source The user removing the line
hostmask The hostmask to delete
+
+

-Definition at line 313 of file modules.cpp.

00313 { }
+Definition at line 386 of file modules.cpp.
00386 { };
 

-

+

+ +
- + - - - - - - - - - - - - - - + + - - + + @@ -1448,56 +1773,1225 @@ Definition at line 313
int Module::OnPreCommand void Module::OnDelZLine std::string  command,
char **  parameters,
int  pcnt, userrec source,
userrec userstd::string  ipmask

-Called whenever any command is about to be executed. +Called whenever a zline is deleted.

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

Parameters:
+ + + +
source The user removing the line
hostmask The hostmask to delete
+
+

-Definition at line 337 of file modules.cpp.

00337 { return 0; };
+Definition at line 384 of file modules.cpp.
00384 { };
 

-

+

+ +
- + - - - - - - - - - - - - - - + + + + - +
int Module::OnRawMode void Module::OnEvent userrec user,
chanrec chan,
char  mode, Event event  )  [virtual]
+
+ + + + + +
+   + + +

+Called whenever an Event class is sent to all module by another module. +

+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!

Parameters:
+ + +
event The Event class being received
+
+ +

+Definition at line 351 of file modules.cpp.

00351 { return; };
+
+

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int Module::OnExtendedMode userrec user,
void *  target,
char  modechar,
int  type,
bool  mode_on,
string_list params
[virtual]
+
+ + + + + +
+   + + +

+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.

Parameters:
+ + + + + + + +
user The user issuing the mode
target The user or channel having the mode set on them
modechar The mode character being set
type The type of mode (user or channel) being set
mode_on True if the mode is being set, false if it is being unset
params A list of parameters for any channel mode (currently supports either 0 or 1 parameters)
+
+ +

+Definition at line 319 of file modules.cpp.

00319 { return false; }
+
+

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
void Module::OnGetServerDescription std::string  servername,
std::string description
[virtual]
+
+ + + + + +
+   + + +

+Allows modules to alter or create server descriptions Whenever a module requires a server description, for example for display in WHOIS, this function is called in all modules. +

+You may change or define the description given in std::string &description. If you do, this description will be shown in the WHOIS fields.

Parameters:
+ + + +
servername The servername being searched for
description Alterable server description for this server
+
+ +

+Definition at line 367 of file modules.cpp.

00367 { };
+
+

+

+

+ + + + +
+ + + + + + + + + +
void Module::OnGlobalConnect userrec user  )  [virtual]
+
+ + + + + +
+   + + +

+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.

Parameters:
+ + +
user The user who is connecting
+
+ +

+Definition at line 355 of file modules.cpp.

00355 { };
+
+

+

+

+ + + + +
+ + + + + + + + + +
void Module::OnGlobalOper userrec user  )  [virtual]
+
+ + + + + +
+   + + +

+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.

Parameters:
+ + +
user The user who is opering
+
+ +

+Definition at line 354 of file modules.cpp.

00354 { };
+
+

+

+

+ + + + +
+ + + + + + + + + +
void Module::OnInfo userrec user  )  [virtual]
+
+ + + + + +
+   + + +

+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

+

Parameters:
+ + +
user The user issuing /INFO
+
+ +

+Definition at line 323 of file modules.cpp.

00323 { };
+
+

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
int Module::OnKill userrec source,
userrec dest,
std::string  reason
[virtual]
+
+ + + + + +
+   + + +

+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 or remote users. If you do so youre risking race conditions, desyncs and worse!

Parameters:
+ + + + +
source The user sending the KILL
dest The user being killed
reason The kill reason
+
+
Returns:
1 to prevent the kill, 0 to allow
+ +

+Definition at line 332 of file modules.cpp.

00332 { return 0; };
+
+

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
void Module::OnLoadModule Module mod,
std::string  name
[virtual]
+
+ + + + + +
+   + + +

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

Parameters:
+ + + +
mod A pointer to the new module
name The new module's filename
+
+ +

+Definition at line 333 of file modules.cpp.

00333 { };
+
+

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
int Module::OnLocalTopicChange userrec user,
chanrec chan,
std::string  topic
[virtual]
+
+ + + + + +
+   + + +

+Called whenever a topic is changed by a local user. +

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

Parameters:
+ + + + + +
user The user changing the topic
chan The channels who's topic is being changed
topic The actual topic text
1 to block the topic change, 0 to allow
+
+ +

+Definition at line 350 of file modules.cpp.

00350 { return 0; };
+
+

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Module::OnMode userrec user,
void *  dest,
int  target_type,
std::string  text
[virtual]
+
+ + + + + +
+   + + +

+Called after every MODE command sent from a user The dest variable contains a userrec* if target_type is TYPE_USER and a chanrec* if target_type is TYPE_CHANNEL. +

+The text variable contains the remainder of the mode string after the target, e.g. "+wsi" or "+ooo nick1 nick2 nick3".

Parameters:
+ + + + + +
user The user sending the MODEs
dest The target of the modes (userrec* or chanrec*)
target_type The type of target (TYPE_USER or TYPE_CHANNEL)
text The actual modes and their parameters if any
+
+ +

+Definition at line 320 of file modules.cpp.

00320 { };
+
+

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
void Module::OnOper userrec user,
std::string  opertype
[virtual]
+
+ + + + + +
+   + + +

+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.

Parameters:
+ + + +
user The user who is opering up
opertype The opers type name
+
+ +

+Definition at line 322 of file modules.cpp.

00322 { };
+
+

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + +
int Module::OnOperCompare std::string  password,
std::string  input
[virtual]
+
+ + + + + +
+   + + +

+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.

Parameters:
+ + + +
password The oper's password
input The password entered
+
+
Returns:
1 to match the passwords, 0 to do nothing
+ +

+Definition at line 353 of file modules.cpp.

00353 { return 0; };
+
+

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Module::OnPostLocalTopicChange userrec user,
chanrec chan,
std::string  topic
[virtual]
+
+ + + + + +
+   + + +

+Called whenever a local topic has been changed. +

+To block topic changes you must use OnLocalTopicChange instead.

Parameters:
+ + + + +
user The user changing the topic
chan The channels who's topic is being changed
topic The actual topic text
+
+ +

+Definition at line 366 of file modules.cpp.

00366 { };
+
+

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int Module::OnPreCommand std::string  command,
char **  parameters,
int  pcnt,
userrec user
[virtual]
+
+ + + + + +
+   + + +

+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!)

Parameters:
+ + + + + +
command The command being executed
parameters An array of array of characters containing the parameters for the command
pcnt The nuimber of parameters passed to the command
user the user issuing the command
+
+
Returns:
1 to block the command, 0 to allow
+ +

+Definition at line 337 of file modules.cpp.

00337 { return 0; };
+
+

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int Module::OnRawMode userrec user,
chanrec chan,
char  mode,
std::string  param,
bool  adding,
int  pcnt
[virtual]
+
+ + + + + +
+   + + +

+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!

Parameters:
+ + + + + + + +
user The user who is sending the mode
chan The channel the mode is being sent to
mode The mode character being set
param The parameter for the mode or an empty string
adding true of the mode is being added, false if it is being removed
pcnt The parameter count for the mode (0 or 1)
+
+
Returns:
1 to deny the mode, 0 to allow
+ +

+Definition at line 342 of file modules.cpp.

00342 { return 0; };
+
+

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Module::OnRawSocketAccept int  fd,
std::string  ip,
int  localport
[virtual]
+
+ + + + + +
+   + + +

+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.

Parameters:
+ + + + +
fd The file descriptor returned from accept()
ip The IP address of the connecting user
localport The local port number the user connected to
+
+ +

+Definition at line 358 of file modules.cpp.

00358 { };
+
+

+

+

+ + + + +
+ + + + + + + + + +
void Module::OnRawSocketClose int  fd  )  [virtual]
+
+ + + + + +
+   + + +

+Called immediately before any socket is closed. +

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

Parameters:
+ + +
fd The file descriptor of the socket prior to close()
+
+ +

+Definition at line 360 of file modules.cpp.

00360 { };
+
+

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
int Module::OnRawSocketRead int  fd,
char *  buffer,
unsigned int  count,
int &  readresult
[virtual]
+
+ + + + + +
+   + + +

+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.

Parameters:
+ + + + + +
fd The file descriptor of the socket
buffer A char* buffer being read to
count The size of the buffer
readresult The amount of characters read, or 0
+
+
Returns:
nonzero if the event was handled, in which case readresult must be valid on exit
+ +

+Definition at line 361 of file modules.cpp.

00361 { return 0; };
+
+

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
int Module::OnRawSocketWrite int  fd,
char *  buffer,
int  count
[virtual]
+
+ + + + + +
+   + + +

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

Parameters:
+ + + + +
fd The file descriptor of the socket
buffer A char* buffer being written
Number of characters to write
+
+
Returns:
Number of characters actually written or 0 if you didn't handle the operation
+ +

+Definition at line 359 of file modules.cpp.

00359 { return 0; };
+
+

+

+

+ + + + +
+ + + + + + + + + +
void Module::OnRehash std::string  parameter  )  [virtual]
+
+ + + + + +
+   + + +

+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. If a parameter is given, the core has done nothing. The module receiving the event can decide if this parameter has any relevence to it.

Parameters:
+ + +
parameter The (optional) parameter given to REHASH from the user.
+
+ +

+Definition at line 316 of file modules.cpp.

00316 { }
+
+

+

+

+ + + + +
+ + + + + + + + + + + + + + - + + + + + + + +
void Module::OnRemoteKill userrec source,
userrec dest,
std::string  param, reason
[virtual]
+
+ + + + + +
+   + + +

+Called when an oper wants to disconnect a remote user via KILL. +

+

Parameters:
+ + + + +
source The user sending the KILL
dest The user being killed
reason The kill reason
+
+ +

+Definition at line 364 of file modules.cpp.

00364 { };
+
+

+

+

+ + + + +
+ + + + + + + + + +
char * Module::OnRequest Request request  )  [virtual]
+
+ + + + + +
+   + + +

+Called whenever a Request class is sent to your module by another module. +

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

Parameters:
+ + +
request The Request class being received
+
+ +

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

+Referenced by Request::Send().

00352 { return NULL; };
+
+

+

+

+ + +
+ + + + + + - - + + - - + + @@ -1516,38 +3010,45 @@ Definition at line 337
void Module::OnSendList userrec user,
bool  adding, chanrec channel,
int  pcntchar  mode

-Called whenever a mode character is processed. +Called whenever a list is needed for a listmode.

-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! +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.

Parameters:
+ + + + +
user The user requesting the list
channel The channel the list is for
mode The listmode which a list is being requested on
+
+

-Definition at line 342 of file modules.cpp.

00342 { return 0; };
+Definition at line 336 of file modules.cpp.
00336 { };
 

-

+

@@ -2601,7 +4317,12 @@ Definition at line 309

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. +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.

Parameters:
+
- + - - + + - - + + - - + + @@ -1566,26 +3067,33 @@ Definition at line 342
void Module::OnRawSocketAccept void Module::OnServerRaw int  fd, std::string raw,
std::string  ip, bool  inbound,
int  localportuserrec user

-Called immediately after any connection is accepted. +Called when a raw command is transmitted or received.

-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. +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.

Parameters:
+ + + + +
raw The raw string in RFC1459 format
inbound A flag to indicate wether the data is coming into the daemon or going out to the user
user The user record sending the text, when inbound == true.
+
+

-Definition at line 358 of file modules.cpp.

00358 { };
+Definition at line 317 of file modules.cpp.
00317 { }
 

-

+

@@ -2566,9 +4276,15 @@ Definition at line 325

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. +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.

Parameters:
+
- + - - + + @@ -1601,44 +3109,43 @@ Definition at line 358
void Module::OnRawSocketClose void Module::OnStats int  fd char  symbol  )  [virtual]

-Called immediately before any socket is closed. +Called on all /STATS commands This method is triggered for all /STATS use, including stats symbols handled by the core.

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

Parameters:
+ + +
symbol the symbol provided to /STATS
+
+

-Definition at line 360 of file modules.cpp.

00360 { };
+Definition at line 347 of file modules.cpp.
00347 { };
 

-

+

- + - - - - - - - - + + - - + + - - + + @@ -1657,38 +3164,53 @@ Definition at line 360
int Module::OnRawSocketRead void Module::OnSyncChannel int  fd,
char *  buffer, chanrec chan,
unsigned int  count, Module proto,
int &  readresultvoid *  opaque

-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. +Allows modules to synchronize data which relates to channels during a netburst. +

+When this function is called, it will be called from the module which implements the linking protocol. This currently is m_spanningtree.so. A pointer to this module is given in Module* proto, so that you may call its methods such as ProtoSendMode (see below). This function will be called for every user visible on your side of the burst, allowing you to for example set modes, etc. Do not use this call to synchronize data which you have stored using class Extensible -- There is a specialist function OnSyncUserMetaData and OnSyncChannelMetaData for this!

+For a good example of how to use this function, please see src/modules/m_chanprotect.cpp

+

Parameters:
+ + + + +
chan The channel being syncronized
proto A pointer to the module handling network protocol
opaque An opaque pointer set by the protocol module, should not be modified!
+
+

-Definition at line 361 of file modules.cpp.

00361 { return 0; };
+Definition at line 369 of file modules.cpp.
00369 { };
 

-

+

@@ -2531,15 +4223,24 @@ Definition at line 326

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. +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.

Parameters:
+
- + - - + + - - + + - - + + + + + + + + @@ -1707,27 +3229,41 @@ Definition at line 361
int Module::OnRawSocketWrite void Module::OnSyncChannelMetaData int  fd, chanrec chan,
char *  buffer, Module proto,
int  countvoid *  opaque,
std::string  extname

-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 359 of file modules.cpp.

00359 { return 0; };
+Definition at line 371 of file modules.cpp.
00371 { };
 

-

+

@@ -1741,28 +3277,56 @@ Definition at line 359
- + - - - + + + + + + + + + + + + + + + + + + +
void Module::OnRehash void Module::OnSyncUser  )  [virtual]userrec user,
Module proto,
void *  opaque
[virtual]

-Called on rehash. +Allows modules to synchronize data which relates to users during a netburst.

-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. +When this function is called, it will be called from the module which implements the linking protocol. This currently is m_spanningtree.so. A pointer to this module is given in Module* proto, so that you may call its methods such as ProtoSendMode (see below). This function will be called for every user visible on your side of the burst, allowing you to for example set modes, etc. Do not use this call to synchronize data which you have stored using class Extensible -- There is a specialist function OnSyncUserMetaData and OnSyncChannelMetaData for this!

Parameters:
+ + + + +
user The user being syncronized
proto A pointer to the module handling network protocol
opaque An opaque pointer set by the protocol module, should not be modified!
+
+

-Definition at line 315 of file modules.cpp.

00315 { }
+Definition at line 368 of file modules.cpp.
00368 { };
 

-

+

@@ -1776,40 +3340,30 @@ Definition at line 315
- + - - - - + + + + + + + + + + + + + + + + + + + + + + + + +
char * Module::OnRequest void Module::OnSyncUserMetaData Request request  )  [virtual]userrec user,
Module proto,
void *  opaque,
std::string  extname
[virtual]

-Called whenever a Request class is sent to your module by another module. -

-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 352 of file modules.cpp. +

-Referenced by Request::Send().

00352 { return NULL; };
+Definition at line 372 of file modules.cpp.
00372 { };
 

-

+

@@ -2475,9 +4160,16 @@ Definition at line 324

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. +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.

Parameters:
+
- + - - - - - - - - + + - - + + @@ -1828,43 +3382,34 @@ Referenced by Request::Send
void Module::OnSendList void Module::OnUnloadModule userrec user,
chanrec channel, Module mod,
char  modestd::string  name

-Called whenever a list is needed for a listmode. +Called whenever a module is unloaded.

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

Parameters:
+ + + +
mod Pointer to the module being unloaded (still valid)
name The filename of the module being unloaded
+
+

-Definition at line 336 of file modules.cpp.

00336 { };
+Definition at line 334 of file modules.cpp.
00334 { };
 

-

+

@@ -1878,26 +3423,31 @@ Definition at line 336
- + - - - - - - - - - - - - - - - - - - - + + + +
void Module::OnServerRaw void Module::OnUserConnect std::string raw,
bool  inbound,
userrec user
[virtual]userrec user  )  [virtual]

-Called when a raw command is transmitted or received. +Called when a user connects.

-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. +The details of the connecting user are available to you in the parameter userrec *user

Parameters:
+ + +
user The user who is connecting
+
+

-Definition at line 316 of file modules.cpp.

00316 { }
+Definition at line 309 of file modules.cpp.
00309 { }
 

-

+

@@ -2375,7 +4042,16 @@ Definition at line 317

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. +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.

Parameters:
+
- + - - + + @@ -1913,32 +3463,43 @@ Definition at line 316
void Module::OnStats void Module::OnUserDisconnect char  symbol userrec user  )  [virtual]

-Called on all /STATS commands This method is triggered for all /STATS use, including stats symbols handled by the core. +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.

Parameters:
+ + +
user The user who is disconnecting
+

-Definition at line 347 of file modules.cpp.

00347 { };
+Definition at line 311 of file modules.cpp.
00311 { }
 

-

+

@@ -2319,9 +3979,16 @@ Called whenever a user is about to join a channel, before any processing is done

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. This is useful for modules which may want to mimic +b, +k, +l etc. Returning -1 from this function forces the join to be allowed, bypassing restrictions such as banlists, invite, keys etc.

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. +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.

Parameters:
+
- + - - + + + + + + + + - - + + @@ -1957,28 +3518,44 @@ Definition at line 347
void Module::OnUnloadModule void Module::OnUserInvite Module mod, userrec source,
userrec dest,
std::string  namechanrec channel

-Called whenever a module is unloaded. +Called after a user has been successfully invited to a channel.

-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). +You cannot prevent the invite from occuring using this function, to do that, use OnUserPreInvite instead.

Parameters:
+ + + + +
source The user who is issuing the INVITE
dest The user being invited
channel The channel the user is being invited to
+
+

-Definition at line 334 of file modules.cpp.

00334 { };
+Definition at line 365 of file modules.cpp.
00365 { };
 

-

+

@@ -1992,28 +3569,55 @@ Definition at line 334
- + - - - + + + + + + + + + + + +
void Module::OnUserConnect void Module::OnUserJoin userrec user  )  [virtual] user,
chanrec channel
[virtual]

-Called when a user connects. +Called when a user joins a channel.

-The details of the connecting user are available to you in the parameter userrec *user +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

Parameters:
+ + + +
user The user who is joining
channel The channel being joined
+
+

-Definition at line 308 of file modules.cpp.

00308 { }
+Definition at line 312 of file modules.cpp.
00312 { }
 

-

+

@@ -2027,23 +3631,31 @@ Definition at line 308
- + - - - + + + + + + + + + + + + + + + + + + + + + + + +
void Module::OnUserDisconnect void Module::OnUserKick userrec user  )  [virtual] source,
userrec user,
chanrec chan,
std::string  reason
[virtual]

-Called whenever a user's socket is closed. +Called whenever a user is kicked.

-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. +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.

Parameters:
+ + + + + +
source The user issuing the kick
user The user being kicked
chan The channel the user is being kicked from
reason The kick reason
+
+

-Definition at line 310 of file modules.cpp.

00310 { }
+Definition at line 341 of file modules.cpp.
00341 { };
 

-

+

@@ -2267,9 +3919,17 @@ Definition at line 327

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. +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.

Parameters:
+
- + @@ -2051,8 +3663,20 @@ Definition at line 310 - - + + + + + + + + + + + + + + @@ -2071,44 +3695,52 @@ Definition at line 310
void Module::OnUserJoin void Module::OnUserMessage userrec user,
chanrec channelvoid *  dest,
int  target_type,
std::string  text

-Called when a user joins a channel. +Called after any PRIVMSG sent from a user.

-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 +The dest variable contains a userrec* if target_type is TYPE_USER and a chanrec* if target_type is TYPE_CHANNEL.

Parameters:
+ + + + + +
user The user sending the message
dest The target of the message
target_type The type of target (TYPE_USER or TYPE_CHANNEL)
text the text being sent by the user
+
+

-Definition at line 311 of file modules.cpp.

00311 { }
+Definition at line 362 of file modules.cpp.
00362 { };
 

-

+

@@ -2217,9 +3863,15 @@ Definition at line 312

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. +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.

Parameters:
+
- + - + - - + + - - + + - + @@ -2127,11 +3759,19 @@ Definition at line 311 @@ -2173,9 +3813,15 @@ Definition at line 341

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 +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

Parameters:
+
void Module::OnUserKick void Module::OnUserNotice userrec source, user,
userrec user, void *  dest,
chanrec chan, int  target_type,
std::string  reason text

-Called whenever a user is kicked. +Called after any NOTICE sent from a user.

-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. +The dest variable contains a userrec* if target_type is TYPE_USER and a chanrec* if target_type is TYPE_CHANNEL.

Parameters:
+ + + + + +
user The user sending the message
dest The target of the message
target_type The type of target (TYPE_USER or TYPE_CHANNEL)
text the text being sent by the user
+
+

-Definition at line 341 of file modules.cpp.

00341 { };
+Definition at line 363 of file modules.cpp.
00363 { };
 

+ + +
user The user who is parting
channel The channel being parted
+ +

-Definition at line 312 of file modules.cpp.

00312 { }
+Definition at line 313 of file modules.cpp.
00313 { }
 

+ + +
user The user changing their nick
oldnick The old nickname of the user before the nickchange
+ +

-Definition at line 327 of file modules.cpp.

00327 { };
+Definition at line 329 of file modules.cpp.
00329 { };
 

+ + + +
source The user who is issuing the INVITE
dest The user being invited
channel The channel the user is being invited to
+ +

Returns:
1 to deny the invite, 0 to allow
+

-Definition at line 323 of file modules.cpp.

00323 { return 0; };
+Definition at line 325 of file modules.cpp.
00325 { return 0; };
 

+ + +
user The user joining the channel
cname The channel name being joined
+ +

Returns:
1 To prevent the join, 0 to allow it.
+

-Definition at line 317 of file modules.cpp.

00317 { return 0; }
+Definition at line 318 of file modules.cpp.
00318 { return 0; }
 

+ + + + +
source The user issuing the kick
user The user being kicked
chan The channel the user is being kicked from
reason The kick reason
+ +

Returns:
1 to prevent the kick, 0 to allow it
+

Definition at line 340 of file modules.cpp.

00340 { return 0; };
 
@@ -2431,9 +4107,18 @@ Definition at line 340

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. +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.

Parameters:
+ + + + + +
user The user sending the message
dest The target of the message (chanrec* or userrec*)
target_type The type of target (TYPE_USER or TYPE_CHANNEL)
text Changeable text being sent by the user
+
+
Returns:
1 to deny the NOTICE, 0 to allow it
+

-Definition at line 324 of file modules.cpp.

00324 { return 0; };
+Definition at line 326 of file modules.cpp.
00326 { return 0; };
 

+ + +
user The username changing their nick
newnick Their new nickname
+ +

Returns:
1 to deny the change, 0 to allow
+

-Definition at line 326 of file modules.cpp.

00326 { return 0; };
+Definition at line 328 of file modules.cpp.
00328 { return 0; };
 

+ + + + +
user The user sending the message
dest The target of the message (chanrec* or userrec*)
target_type The type of target (TYPE_USER or TYPE_CHANNEL)
text Changeable text being sent by the user
+ +

Returns:
1 to deny the NOTICE, 0 to allow it
+

-Definition at line 325 of file modules.cpp.

00325 { return 0; };
+Definition at line 327 of file modules.cpp.
00327 { return 0; };
 

-

+

- - - + + + + + + + + + + + +
@@ -2548,9 +4249,18 @@ Definition at line 325 void Module::OnUserQuit userrec user  )  [virtual] user,
std::string  message
[virtual]

+ + +
user The user who is quitting
message The user's quit message
+ +

-Definition at line 309 of file modules.cpp.

00309 { }
+Definition at line 310 of file modules.cpp.
00310 { }
 

+ +
user The user registering
+ +

Definition at line 339 of file modules.cpp.

00339 { };
 
@@ -2609,18 +4330,27 @@ Definition at line 339
-

+

@@ -2634,11 +4364,17 @@ Definition at line 339 @@ -2680,9 +4416,153 @@ Definition at line 329

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. +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.

Parameters:
+
- + - - - + + + + + + + + + + + +
string_list Module::OnUserSync void Module::OnWallops userrec user  )  [virtual] user,
std::string  text
[virtual]

-Called during a netburst to sync user data. +Called after every WALLOPS command.

-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. +

Parameters:
+ + + +
user The user sending the WALLOPS
text The content of the WALLOPS message
+
+

-Definition at line 329 of file modules.cpp.

00329 { string_list empty; return empty; }
+Definition at line 375 of file modules.cpp.
00375 { };
 

+ + +
source The user issuing the WHOIS command
dest The user who is being WHOISed
+ +

-Definition at line 322 of file modules.cpp.

00322 { };
+Definition at line 324 of file modules.cpp.
00324 { };
+
+

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Module::ProtoSendMetaData void *  opaque,
int  target_type,
void *  target,
std::string  extname,
std::string  extdata
[virtual]
+
+ + + + + +
+   + + +

+Implemented by modules which provide the ability to link servers. +

+These modules will implement this method, which allows metadata (extra data added to user and channel records using class Extensible, Extensible::Extend, etc) to be sent to other servers on a netburst and decoded at the other end by the same module on a different server.

+More documentation to follow soon. Please see src/modules/m_swhois.cpp for example of how to use this function.

Parameters:
+ + + + + + +
opaque An opaque pointer set by the protocol module, should not be modified!
target_type The type of item to decode data for, TYPE_USER or TYPE_CHANNEL
target The chanrec* or userrec* that metadata should be sent for
extname The extension name to send metadata for
extdata Encoded data for this extension name, which will be encoded at the oppsite end by an identical module using OnDecodeMetaData
+
+ +

+Definition at line 374 of file modules.cpp.

00374 { };
+
+

+

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Module::ProtoSendMode void *  opaque,
int  target_type,
void *  target,
std::string  modeline
[virtual]
+
+ + + + @@ -2690,7 +4570,7 @@ Definition at line 322
+   + + +

+Implemented by modules which provide the ability to link servers. +

+These modules will implement this method, which allows transparent sending of servermodes down the network link as a broadcast, without a module calling it having to know the format of the MODE command before the actual mode string.

+More documentation to follow soon. Please see src/modules/m_chanprotect.cpp for examples of how to use this function.

+

Parameters:
+ + + + + +
opaque An opaque pointer set by the protocol module, should not be modified!
target_type The type of item to decode data for, TYPE_USER or TYPE_CHANNEL
target The chanrec* or userrec* that modes should be sent for
modeline The modes and parameters to be sent
+
+ +

+Definition at line 370 of file modules.cpp.

00370 { };
 


The documentation for this class was generated from the following files: -
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:12 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classModuleFactory-members.html b/docs/module-doc/classModuleFactory-members.html index b73bcb781..3fe0642ed 100644 --- a/docs/module-doc/classModuleFactory-members.html +++ b/docs/module-doc/classModuleFactory-members.html @@ -8,11 +8,11 @@

ModuleFactory Member List

This is the complete list of members for ModuleFactory, including all inherited members.

- + -
ageclassbase
classbase()classbase [inline]
CreateModule()=0ModuleFactory [pure virtual]
CreateModule(Server *Me)=0ModuleFactory [pure virtual]
ModuleFactory()ModuleFactory [inline]
~classbase()classbase [inline]
~ModuleFactory()ModuleFactory [inline, virtual]


Generated on Sun Nov 27 01:43:26 2005 for InspIRCd by  +


Generated on Fri Dec 9 20:20:12 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classModuleFactory.html b/docs/module-doc/classModuleFactory.html index 7c1a7c248..a3dc0a079 100644 --- a/docs/module-doc/classModuleFactory.html +++ b/docs/module-doc/classModuleFactory.html @@ -25,9 +25,9 @@ Inheritance diagram for ModuleFactory:

virtual 
~ModuleFactory ()
virtual ModuleCreateModule ()=0
virtual ModuleCreateModule (Server *Me)=0
 Creates a new module.
 Creates a new module.


Detailed Description

Instantiates classes inherited from Module This class creates a class inherited from type Module, using new. @@ -36,7 +36,7 @@ This is to allow for modules to create many different variants of

-Definition at line 1265 of file modules.h.


Constructor & Destructor Documentation

+Definition at line 1654 of file modules.h.

Constructor & Destructor Documentation

@@ -63,7 +63,7 @@ Definition at line 1265 o

-Definition at line 1268 of file modules.h.

01268 { }
+Definition at line 1657 of file modules.h.
01657 { }
 

@@ -95,14 +95,14 @@ Definition at line 1268 o

-Definition at line 1269 of file modules.h.

01269 { }
+Definition at line 1658 of file modules.h.
01658 { }
 


Member Function Documentation

-

+

- + + @@ -133,7 +134,7 @@ Your inherited class of ModuleFactory must return a pointer to your modules.h -
Generated on Sun Nov 27 01:43:26 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:12 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classModuleMessage-members.html b/docs/module-doc/classModuleMessage-members.html index b632b3a31..96103b242 100644 --- a/docs/module-doc/classModuleMessage-members.html +++ b/docs/module-doc/classModuleMessage-members.html @@ -11,7 +11,7 @@
-
@@ -110,7 +110,8 @@ Definition at line 1269 o
virtual Module* ModuleFactory::CreateModule Server Me  )  [pure virtual]
Send()=0ModuleMessage [pure virtual]
~classbase()classbase [inline]
~ModuleMessage()ModuleMessage [inline, virtual]


Generated on Sun Nov 27 01:43:26 2005 for InspIRCd by  +


Generated on Fri Dec 9 20:20:12 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classModuleMessage.html b/docs/module-doc/classModuleMessage.html index 4c1211a7b..1b6c1eb90 100644 --- a/docs/module-doc/classModuleMessage.html +++ b/docs/module-doc/classModuleMessage.html @@ -34,7 +34,7 @@ The ModuleMessage class is the base class of 142 of file modules.h.

Constructor & Destructor Documentation

+Definition at line 143 of file modules.h.

Constructor & Destructor Documentation

@@ -61,7 +61,7 @@ Definition at line 142 of

-Definition at line 148 of file modules.h.

00148 {};
+Definition at line 149 of file modules.h.
00149 {};
 

@@ -101,7 +101,7 @@ Implemented in Request, an


The documentation for this class was generated from the following file: -
Generated on Sun Nov 27 01:43:26 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:12 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classQLine-members.html b/docs/module-doc/classQLine-members.html index e1497bcbe..67f8cba88 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 Sun Nov 27 01:43:26 2005 for InspIRCd by  +


Generated on Fri Dec 9 20:20:12 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classQLine.html b/docs/module-doc/classQLine.html index 589abe351..6e7bb430e 100644 --- a/docs/module-doc/classQLine.html +++ b/docs/module-doc/classQLine.html @@ -92,7 +92,7 @@ Definition at line 114 of f


The documentation for this class was generated from the following file: -
Generated on Sun Nov 27 01:43:26 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:12 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classRequest-members.html b/docs/module-doc/classRequest-members.html index 05f160ddc..6eb061050 100644 --- a/docs/module-doc/classRequest-members.html +++ b/docs/module-doc/classRequest-members.html @@ -18,7 +18,7 @@
sourceRequest [protected]
~classbase()classbase [inline]
~ModuleMessage()ModuleMessage [inline, virtual]


Generated on Sun Nov 27 01:43:26 2005 for InspIRCd by  +


Generated on Fri Dec 9 20:20:12 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classRequest.html b/docs/module-doc/classRequest.html index a65615678..8eb92ac45 100644 --- a/docs/module-doc/classRequest.html +++ b/docs/module-doc/classRequest.html @@ -57,7 +57,7 @@ When this class is properly instantiated it may be sent to a module using the

-Definition at line 156 of file modules.h.


Constructor & Destructor Documentation

+Definition at line 157 of file modules.h.

Constructor & Destructor Documentation

@@ -139,7 +139,7 @@ Fetch the Request data.

Definition at line 254 of file modules.cpp.

-References data.

00255 {
+References data.
00255 {
 00256         return this->data;
 00257 }
 
@@ -177,7 +177,7 @@ Fetch the request destination (should be 'this' in the receiving module).

Definition at line 264 of file modules.cpp.

-References dest.

00265 {
+References dest.
00265 {
 00266         return this->dest;
 00267 }
 
@@ -215,7 +215,7 @@ Fetch the request source.

Definition at line 259 of file modules.cpp.

-References source.

00260 {
+References source.
00260 {
 00261         return this->source;
 00262 }
 
@@ -255,7 +255,7 @@ Implements ModuleM

Definition at line 269 of file modules.cpp.

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

00270 {
+References dest, and Module::OnRequest().
00270 {
 00271         if (this->dest)
 00272         {
 00273                 return dest->OnRequest(this);
@@ -295,7 +295,7 @@ This member holds a pointer to arbitary data set by the emitter of the message.
 

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

Referenced by GetData().

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

-Definition at line 168 of file modules.h. +Definition at line 169 of file modules.h.

Referenced by GetDest(), and Send(). @@ -353,14 +353,14 @@ This is a pointer to the sender of the message, which can be used to directly tr

-Definition at line 165 of file modules.h. +Definition at line 166 of file modules.h.

Referenced by GetSource().


The documentation for this class was generated from the following files: -
Generated on Sun Nov 27 01:43:26 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:12 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classServer-members.html b/docs/module-doc/classServer-members.html index f620cf802..1482d4be1 100644 --- a/docs/module-doc/classServer-members.html +++ b/docs/module-doc/classServer-members.html @@ -44,12 +44,14 @@
IsOnChannel(userrec *User, chanrec *Chan)Server [virtual]
IsUlined(std::string server)Server [virtual]
IsValidMask(std::string mask)Server [virtual]
IsValidModuleCommand(std::string commandname, int pcnt, userrec *user)Server [virtual]
JoinUserToChannel(userrec *user, std::string cname, std::string key)Server [virtual]
Log(int level, std::string s)Server [virtual]
MatchText(std::string sliteral, std::string spattern)Server [virtual]
PartUserFromChannel(userrec *user, std::string cname, std::string reason)Server [virtual]
PseudoToUser(userrec *alive, userrec *zombie, std::string message)Server [virtual]
QuitUser(userrec *user, std::string reason)Server [virtual]
RehashServer()Server [virtual]
Send(int Socket, std::string s)Server [virtual]
SendChannel(userrec *User, chanrec *Channel, std::string s, bool IncludeSender)Server [virtual]
SendChannelServerNotice(std::string ServName, chanrec *Channel, std::string text)Server [virtual]
UserToPseudo(userrec *user, std::string message)Server [virtual]
~classbase()classbase [inline]
~Server()Server [virtual]


Generated on Sun Nov 27 01:43:26 2005 for InspIRCd by  +


Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classServer.html b/docs/module-doc/classServer.html index 8285fb2d6..f71644ac0 100644 --- a/docs/module-doc/classServer.html +++ b/docs/module-doc/classServer.html @@ -126,6 +126,8 @@ Inheritance diagram for Server:

virtual void 
CallCommandHandler (std::string commandname, char **parameters, int pcnt, userrec *user)
 Calls the handler for a command, either implemented by the core or by another module.
virtual bool IsValidModuleCommand (std::string commandname, int pcnt, userrec *user)
virtual void ChangeHost (userrec *user, std::string host)
 Change displayed hostname of a user.
DelSocket (InspSocket *sock)
 Deletes a class derived from InspSocket from the server's socket engine.
virtual void RehashServer ()


Detailed Description

Allows server output and query functions This class contains methods which allow a module to query the state of the irc server, and produce output to users and other servers. @@ -197,7 +201,7 @@ All modules should instantiate at least one copy of this class, and use its memb

-Definition at line 696 of file modules.h.


Constructor & Destructor Documentation

+Definition at line 1081 of file modules.h.

Constructor & Destructor Documentation

@@ -226,8 +230,8 @@ Default constructor.

Creates a Server object.

-Definition at line 367 of file modules.cpp.

00368 {
-00369 }
+Definition at line 394 of file modules.cpp.
00395 {
+00396 }
 

@@ -261,8 +265,8 @@ Default destructor.

Destroys a Server object.

-Definition at line 371 of file modules.cpp.

00372 {
-00373 }
+Definition at line 398 of file modules.cpp.
00399 {
+00400 }
 

@@ -327,11 +331,11 @@ 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 457 of file modules.cpp. +Definition at line 495 of file modules.cpp.

-References createcommand().

00458 {
-00459         createcommand(cmd,f,flags,minparams,source);
-00460 }
+References createcommand().
00496 {
+00497         createcommand(cmd,f,flags,minparams,source);
+00498 }
 

@@ -387,11 +391,11 @@ 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 720 of file modules.cpp. +Definition at line 758 of file modules.cpp.

-References add_eline().

00721 {
-00722         add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
-00723 }
+References add_eline().
00759 {
+00760         add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
+00761 }
 

@@ -431,14 +435,14 @@ 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 625 of file modules.cpp. +Definition at line 663 of file modules.cpp.

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

00626 {
-00627         bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1);
-00628         if (res)
-00629                 ModeMakeList(modechar);
-00630         return res;
-00631 }
+References DoAddExtendedMode(), ModeMakeList(), and MT_CHANNEL.
00664 {
+00665         bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1);
+00666         if (res)
+00667                 ModeMakeList(modechar);
+00668         return res;
+00669 }
 

@@ -500,34 +504,34 @@ 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 597 of file modules.cpp. -

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

00598 {
-00599         if (((modechar >= 'A') && (modechar <= 'Z')) || ((modechar >= 'a') && (modechar <= 'z')))
-00600         {
-00601                 if (type == MT_SERVER)
-00602                 {
-00603                         log(DEBUG,"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion");
-00604                         return false;
-00605                 }
-00606                 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT))
-00607                 {
-00608                         log(DEBUG,"*** API ERROR *** Parameters on MT_CLIENT modes are not supported");
-00609                         return false;
-00610                 }
-00611                 if ((params_when_on>1) || (params_when_off>1))
-00612                 {
-00613                         log(DEBUG,"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported");
-00614                         return false;
-00615                 }
-00616                 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off);
-00617         }
-00618         else
-00619         {
-00620                 log(DEBUG,"*** API ERROR *** Muppet modechar detected.");
-00621         }
-00622         return false;
-00623 }
+Definition at line 635 of file modules.cpp.
+

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

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

@@ -583,11 +587,11 @@ 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 700 of file modules.cpp. +Definition at line 738 of file modules.cpp.

-References add_gline().

00701 {
-00702         add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
-00703 }
+References add_gline().
00739 {
+00740         add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
+00741 }
 

@@ -643,11 +647,11 @@ 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 715 of file modules.cpp. +Definition at line 753 of file modules.cpp.

-References add_kline().

00716 {
-00717         add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
-00718 }
+References add_kline().
00754 {
+00755         add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str());
+00756 }
 

@@ -703,11 +707,11 @@ 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 705 of file modules.cpp. +Definition at line 743 of file modules.cpp.

-References add_qline().

00706 {
-00707         add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str());
-00708 }
+References add_qline().
00744 {
+00745         add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str());
+00746 }
 

@@ -742,11 +746,11 @@ Adds a class derived from InspSocket

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

-References module_sockets.

00376 {
-00377         module_sockets.push_back(sock);
-00378 }
+References module_sockets.
00403 {
+00404         module_sockets.push_back(sock);
+00405 }
 

@@ -802,11 +806,11 @@ 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 710 of file modules.cpp. +Definition at line 748 of file modules.cpp.

-References add_zline().

00711 {
-00712         add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str());
-00713 }
+References add_zline().
00749 {
+00750         add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str());
+00751 }
 

@@ -841,11 +845,11 @@ 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 750 of file modules.cpp. +Definition at line 788 of file modules.cpp.

-References duration().

00751 {
-00752         return duration(delta.c_str());
-00753 }
+References duration().
00789 {
+00790         return duration(delta.c_str());
+00791 }
 

@@ -902,9 +906,9 @@ 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 447 of file modules.cpp.

00448 {
-00449         call_handler(commandname.c_str(),parameters,pcnt,user);
-00450 }
+Definition at line 480 of file modules.cpp.
00481 {
+00482         call_handler(commandname.c_str(),parameters,pcnt,user);
+00483 }
 

@@ -948,11 +952,11 @@ 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 540 of file modules.cpp. +Definition at line 578 of file modules.cpp.

-References ChangeName().

00541 {
-00542         ChangeName(user,gecos.c_str());
-00543 }
+References ChangeName().
00579 {
+00580         ChangeName(user,gecos.c_str());
+00581 }
 

@@ -996,11 +1000,11 @@ 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 535 of file modules.cpp. +Definition at line 573 of file modules.cpp.

-References ChangeDisplayedHost().

00536 {
-00537         ChangeDisplayedHost(user,host.c_str());
-00538 }
+References ChangeDisplayedHost().
00574 {
+00575         ChangeDisplayedHost(user,host.c_str());
+00576 }
 

@@ -1044,9 +1048,9 @@ 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 432 of file modules.cpp.

00433 {
-00434         force_nickchange(user,nickname.c_str());
-00435 }
+Definition at line 465 of file modules.cpp.
00466 {
+00467         force_nickchange(user,nickname.c_str());
+00468 }
 

@@ -1090,11 +1094,11 @@ 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 565 of file modules.cpp. +Definition at line 603 of file modules.cpp.

-References cmode().

00566 {
-00567         return cmode(User,Chan);
-00568 }
+References cmode().
00604 {
+00605         return cmode(User,Chan);
+00606 }
 

@@ -1138,11 +1142,11 @@ 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 513 of file modules.cpp. +Definition at line 551 of file modules.cpp.

-References common_channels().

00514 {
-00515         return (common_channels(u1,u2) != 0);
-00516 }
+References common_channels().
00552 {
+00553         return (common_channels(u1,u2) != 0);
+00554 }
 

@@ -1177,9 +1181,9 @@ 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 633 of file modules.cpp.

00634 {
-00635         return usercount(c);
-00636 }
+Definition at line 671 of file modules.cpp.
00672 {
+00673         return usercount(c);
+00674 }
 

@@ -1214,11 +1218,11 @@ Deletes a local E-Line.

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

-References del_eline().

00746 {
-00747         return del_eline(hostmask.c_str());
-00748 }
+References del_eline().
00784 {
+00785         return del_eline(hostmask.c_str());
+00786 }
 

@@ -1253,11 +1257,11 @@ Deletes a G-Line from all servers on the mesh.

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

-References del_gline().

00726 {
-00727         return del_gline(hostmask.c_str());
-00728 }
+References del_gline().
00764 {
+00765         return del_gline(hostmask.c_str());
+00766 }
 

@@ -1292,11 +1296,11 @@ Deletes a local K-Line.

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

-References del_kline().

00741 {
-00742         return del_kline(hostmask.c_str());
-00743 }
+References del_kline().
00779 {
+00780         return del_kline(hostmask.c_str());
+00781 }
 

@@ -1331,11 +1335,11 @@ Deletes a Q-Line from all servers on the mesh.

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

-References del_qline().

00731 {
-00732         return del_qline(nickname.c_str());
-00733 }
+References del_qline().
00769 {
+00770         return del_qline(nickname.c_str());
+00771 }
 

@@ -1370,18 +1374,18 @@ Deletes a class derived from InspSocke

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

-References module_sockets.

00381 {
-00382         for (std::vector<InspSocket*>::iterator a = module_sockets.begin(); a < module_sockets.end(); a++)
-00383         {
-00384                 if (*a == sock)
-00385                 {
-00386                         module_sockets.erase(a);
-00387                         return;
-00388                 }
-00389         }
-00390 }
+References module_sockets.
00414 {
+00415         for (std::vector<InspSocket*>::iterator a = module_sockets.begin(); a < module_sockets.end(); a++)
+00416         {
+00417                 if (*a == sock)
+00418                 {
+00419                         module_sockets.erase(a);
+00420                         return;
+00421                 }
+00422         }
+00423 }
 

@@ -1416,11 +1420,11 @@ Deletes a Z-Line from all servers on the mesh.

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

-References del_zline().

00736 {
-00737         return del_zline(ipaddr.c_str());
-00738 }
+References del_zline().
00774 {
+00775         return del_zline(ipaddr.c_str());
+00776 }
 

@@ -1455,9 +1459,9 @@ 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 560 of file modules.cpp.

00561 {
-00562         return FindChan(channel.c_str());
-00563 }
+Definition at line 598 of file modules.cpp.
00599 {
+00600         return FindChan(channel.c_str());
+00601 }
 

@@ -1492,9 +1496,9 @@ 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 555 of file modules.cpp.

00556 {
-00557         return (socket < 65536 ? fd_ref_table[socket] : NULL);
-00558 }
+Definition at line 593 of file modules.cpp.
00594 {
+00595         return (socket < 65536 ? fd_ref_table[socket] : NULL);
+00596 }
 

@@ -1529,18 +1533,18 @@ 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 784 of file modules.cpp. -

-References MODCOUNT, module_names, and modules.

00785 {
-00786         for (int i = 0; i <= MODCOUNT; i++)
-00787         {
-00788                 if (module_names[i] == name)
-00789                 {
-00790                         return modules[i];
-00791                 }
-00792         }
-00793         return NULL;
-00794 }
+Definition at line 822 of file modules.cpp.
+

+References MODCOUNT, module_names, and modules.

00823 {
+00824         for (int i = 0; i <= MODCOUNT; i++)
+00825         {
+00826                 if (module_names[i] == name)
+00827                 {
+00828                         return modules[i];
+00829                 }
+00830         }
+00831         return NULL;
+00832 }
 

@@ -1575,9 +1579,9 @@ 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 550 of file modules.cpp.

00551 {
-00552         return Find(nick);
-00553 }
+Definition at line 588 of file modules.cpp.
00589 {
+00590         return Find(nick);
+00591 }
 

@@ -1611,9 +1615,9 @@ 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 590 of file modules.cpp.

00591 {
-00592         return Admin(getadminname(),getadminemail(),getadminnick());
-00593 }
+Definition at line 628 of file modules.cpp.
00629 {
+00630         return Admin(getadminname(),getadminemail(),getadminnick());
+00631 }
 

@@ -1647,9 +1651,9 @@ Returns the network name, global to all linked servers.

-Definition at line 580 of file modules.cpp.

00581 {
-00582         return getnetworkname();
-00583 }
+Definition at line 618 of file modules.cpp.
00619 {
+00620         return getnetworkname();
+00621 }
 

@@ -1683,9 +1687,9 @@ Returns the server description string of the local server.

-Definition at line 585 of file modules.cpp.

00586 {
-00587         return getserverdesc();
-00588 }
+Definition at line 623 of file modules.cpp.
00624 {
+00625         return getserverdesc();
+00626 }
 

@@ -1719,9 +1723,9 @@ Returns the server name of the server where the module is loaded.

-Definition at line 575 of file modules.cpp.

00576 {
-00577         return getservername();
-00578 }
+Definition at line 613 of file modules.cpp.
00614 {
+00615         return getservername();
+00616 }
 

@@ -1756,19 +1760,19 @@ 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 420 of file modules.cpp. -

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

00421 {
-00422         chanuserlist userl;
-00423         userl.clear();
-00424         std::vector<char*> *list = chan->GetUsers();
-00425         for (std::vector<char*>::iterator i = list->begin(); i != list->end(); i++)
-00426         {
-00427                 char* o = *i;
-00428                 userl.push_back((userrec*)o);
-00429         }
-00430         return userl;
-00431 }
+Definition at line 453 of file modules.cpp.
+

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

00454 {
+00455         chanuserlist userl;
+00456         userl.clear();
+00457         std::vector<char*> *list = chan->GetUsers();
+00458         for (std::vector<char*>::iterator i = list->begin(); i != list->end(); i++)
+00459         {
+00460                 char* o = *i;
+00461                 userl.push_back((userrec*)o);
+00462         }
+00463         return userl;
+00464 }
 

@@ -1803,11 +1807,11 @@ Returns true if a nick is valid.

Nicks for unregistered connections will return false.

-Definition at line 545 of file modules.cpp. +Definition at line 583 of file modules.cpp.

-References isnick().

00546 {
-00547         return (isnick(nick.c_str()) != 0);
-00548 }
+References isnick().
00584 {
+00585         return (isnick(nick.c_str()) != 0);
+00586 }
 

@@ -1851,11 +1855,11 @@ 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 570 of file modules.cpp. +Definition at line 608 of file modules.cpp.

-References has_channel().

00571 {
-00572         return has_channel(User,Chan);
-00573 }
+References has_channel().
00609 {
+00610         return has_channel(User,Chan);
+00611 }
 

@@ -1890,11 +1894,11 @@ 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 442 of file modules.cpp. +Definition at line 475 of file modules.cpp.

-References is_uline().

00443 {
-00444         return is_uline(server.c_str());
-00445 }
+References is_uline().
00476 {
+00477         return is_uline(server.c_str());
+00478 }
 

@@ -1929,33 +1933,83 @@ Returns true if a nick!ident string is correctly formatted, false if otherwise.

-Definition at line 755 of file modules.cpp.

00756 {
-00757         const char* dest = mask.c_str();
-00758         if (strchr(dest,'!')==0)
-00759                 return false;
-00760         if (strchr(dest,'@')==0)
-00761                 return false;
-00762         for (unsigned int i = 0; i < strlen(dest); i++)
-00763                 if (dest[i] < 32)
-00764                         return false;
-00765         for (unsigned int i = 0; i < strlen(dest); i++)
-00766                 if (dest[i] > 126)
-00767                         return false;
-00768         unsigned int c = 0;
-00769         for (unsigned int i = 0; i < strlen(dest); i++)
-00770                 if (dest[i] == '!')
-00771                         c++;
-00772         if (c>1)
-00773                 return false;
-00774         c = 0;
-00775         for (unsigned int i = 0; i < strlen(dest); i++)
-00776                 if (dest[i] == '@')
-00777                         c++;
-00778         if (c>1)
-00779                 return false;
-00780 
-00781         return true;
-00782 }
+Definition at line 793 of file modules.cpp.
00794 {
+00795         const char* dest = mask.c_str();
+00796         if (strchr(dest,'!')==0)
+00797                 return false;
+00798         if (strchr(dest,'@')==0)
+00799                 return false;
+00800         for (unsigned int i = 0; i < strlen(dest); i++)
+00801                 if (dest[i] < 32)
+00802                         return false;
+00803         for (unsigned int i = 0; i < strlen(dest); i++)
+00804                 if (dest[i] > 126)
+00805                         return false;
+00806         unsigned int c = 0;
+00807         for (unsigned int i = 0; i < strlen(dest); i++)
+00808                 if (dest[i] == '!')
+00809                         c++;
+00810         if (c>1)
+00811                 return false;
+00812         c = 0;
+00813         for (unsigned int i = 0; i < strlen(dest); i++)
+00814                 if (dest[i] == '@')
+00815                         c++;
+00816         if (c>1)
+00817                 return false;
+00818 
+00819         return true;
+00820 }
+
+

+ +

+
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool Server::IsValidModuleCommand std::string  commandname,
int  pcnt,
userrec user
[virtual]
+
+ + + + @@ -2005,9 +2059,9 @@ 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 410 of file modules.cpp.

00411 {
-00412         return add_channel(user,cname.c_str(),key.c_str(),false);
-00413 }
+Definition at line 443 of file modules.cpp.
00444 {
+00445         return add_channel(user,cname.c_str(),key.c_str(),false);
+00446 }
 

@@ -2051,9 +2105,9 @@ 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 452 of file modules.cpp.

00453 {
-00454         log(level,"%s",s.c_str());
-00455 }
+Definition at line 490 of file modules.cpp.
00491 {
+00492         log(level,"%s",s.c_str());
+00493 }
 

@@ -2097,12 +2151,12 @@ 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 397 of file modules.cpp.

00398 {
-00399         char literal[MAXBUF],pattern[MAXBUF];
-00400         strlcpy(literal,sliteral.c_str(),MAXBUF);
-00401         strlcpy(pattern,spattern.c_str(),MAXBUF);
-00402         return match(literal,pattern);
-00403 }
+Definition at line 430 of file modules.cpp.
00431 {
+00432         char literal[MAXBUF],pattern[MAXBUF];
+00433         strlcpy(literal,sliteral.c_str(),MAXBUF);
+00434         strlcpy(pattern,spattern.c_str(),MAXBUF);
+00435         return match(literal,pattern);
+00436 }
 

@@ -2152,9 +2206,9 @@ 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 415 of file modules.cpp.

00416 {
-00417         return del_channel(user,cname.c_str(),reason.c_str(),false);
-00418 }
+Definition at line 448 of file modules.cpp.
00449 {
+00450         return del_channel(user,cname.c_str(),reason.c_str(),false);
+00451 }
 

@@ -2204,36 +2258,36 @@ 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 670 of file modules.cpp. -

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

00671 {
-00672         zombie->fd = alive->fd;
-00673         alive->fd = FD_MAGIC_NUMBER;
-00674         alive->ClearBuffer();
-00675         Write(zombie->fd,":%s!%s@%s NICK %s",alive->nick,alive->ident,alive->host,zombie->nick);
-00676         kill_link(alive,message.c_str());
-00677         fd_ref_table[zombie->fd] = zombie;
-00678         for (int i = 0; i != MAXCHANS; i++)
-00679         {
-00680                 if (zombie->chans[i].channel != NULL)
-00681                 {
-00682                         if (zombie->chans[i].channel->name)
-00683                         {
-00684                                 chanrec* Ptr = zombie->chans[i].channel;
-00685                                 WriteFrom(zombie->fd,zombie,"JOIN %s",Ptr->name);
-00686                                 if (Ptr->topicset)
-00687                                 {
-00688                                         WriteServ(zombie->fd,"332 %s %s :%s", zombie->nick, Ptr->name, Ptr->topic);
-00689                                         WriteServ(zombie->fd,"333 %s %s %s %d", zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset);
-00690                                 }
-00691                                 userlist(zombie,Ptr);
-00692                                 WriteServ(zombie->fd,"366 %s %s :End of /NAMES list.", zombie->nick, Ptr->name);
-00693 
-00694                         }
-00695                 }
-00696         }
-00697         return true;
-00698 }
+Definition at line 708 of file modules.cpp.
+

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

00709 {
+00710         zombie->fd = alive->fd;
+00711         alive->fd = FD_MAGIC_NUMBER;
+00712         alive->ClearBuffer();
+00713         Write(zombie->fd,":%s!%s@%s NICK %s",alive->nick,alive->ident,alive->host,zombie->nick);
+00714         kill_link(alive,message.c_str());
+00715         fd_ref_table[zombie->fd] = zombie;
+00716         for (int i = 0; i != MAXCHANS; i++)
+00717         {
+00718                 if (zombie->chans[i].channel != NULL)
+00719                 {
+00720                         if (zombie->chans[i].channel->name)
+00721                         {
+00722                                 chanrec* Ptr = zombie->chans[i].channel;
+00723                                 WriteFrom(zombie->fd,zombie,"JOIN %s",Ptr->name);
+00724                                 if (Ptr->topicset)
+00725                                 {
+00726                                         WriteServ(zombie->fd,"332 %s %s :%s", zombie->nick, Ptr->name, Ptr->topic);
+00727                                         WriteServ(zombie->fd,"333 %s %s %s %d", zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset);
+00728                                 }
+00729                                 userlist(zombie,Ptr);
+00730                                 WriteServ(zombie->fd,"366 %s %s :End of /NAMES list.", zombie->nick, Ptr->name);
+00731 
+00732                         }
+00733                 }
+00734         }
+00735         return true;
+00736 }
 

@@ -2279,9 +2333,44 @@ 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 437 of file modules.cpp.

00438 {
-00439         kill_link(user,reason.c_str());
-00440 }
+Definition at line 470 of file modules.cpp.
00471 {
+00472         kill_link(user,reason.c_str());
+00473 }
+
+

+ +

+
+   + + +

+ +

+Definition at line 485 of file modules.cpp.

00486 {
+00487         return is_valid_cmd(commandname.c_str(), pcnt, user);
+00488 }
 

+

+ + + + +
+ + + + + + + + +
void Server::RehashServer  )  [virtual]
+
+ + + + @@ -2325,9 +2414,9 @@ 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 467 of file modules.cpp.

00468 {
-00469         Write(Socket,"%s",s.c_str());
-00470 }
+Definition at line 505 of file modules.cpp.
00506 {
+00507         Write(Socket,"%s",s.c_str());
+00508 }
 

@@ -2383,16 +2472,16 @@ 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 501 of file modules.cpp.

00502 {
-00503         if (IncludeSender)
-00504         {
-00505                 WriteChannel(Channel,User,"%s",s.c_str());
-00506         }
-00507         else
-00508         {
-00509                 ChanExceptSender(Channel,User,"%s",s.c_str());
-00510         }
-00511 }
+Definition at line 539 of file modules.cpp.
00540 {
+00541         if (IncludeSender)
+00542         {
+00543                 WriteChannel(Channel,User,"%s",s.c_str());
+00544         }
+00545         else
+00546         {
+00547                 ChanExceptSender(Channel,User,"%s",s.c_str());
+00548         }
+00549 }
 

@@ -2442,9 +2531,9 @@ 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 496 of file modules.cpp.

00497 {
-00498         WriteChannelWithServ((char*)ServName.c_str(), Channel, "%s", text.c_str());
-00499 }
+Definition at line 534 of file modules.cpp.
00535 {
+00536         WriteChannelWithServ((char*)ServName.c_str(), Channel, "%s", text.c_str());
+00537 }
 

@@ -2494,16 +2583,16 @@ 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 518 of file modules.cpp.

00519 {
-00520         if (IncludeSender)
-00521         {
-00522                 WriteCommon(User,"%s",text.c_str());
-00523         }
-00524         else
-00525         {
-00526                 WriteCommonExcept(User,"%s",text.c_str());
-00527         }
-00528 }
+Definition at line 556 of file modules.cpp.
00557 {
+00558         if (IncludeSender)
+00559         {
+00560                 WriteCommon(User,"%s",text.c_str());
+00561         }
+00562         else
+00563         {
+00564                 WriteCommonExcept(User,"%s",text.c_str());
+00565         }
+00566 }
 

@@ -2553,9 +2642,9 @@ 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 477 of file modules.cpp.

00478 {
-00479         WriteFrom(Socket,User,"%s",s.c_str());
-00480 }
+Definition at line 515 of file modules.cpp.
00516 {
+00517         WriteFrom(Socket,User,"%s",s.c_str());
+00518 }
 

@@ -2612,11 +2701,11 @@ 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 462 of file modules.cpp. +Definition at line 500 of file modules.cpp.

-References server_mode().

00463 {
-00464         server_mode(parameters,pcnt,user);
-00465 }
+References server_mode().
00501 {
+00502         server_mode(parameters,pcnt,user);
+00503 }
 

@@ -2651,9 +2740,9 @@ Sends text to all opers.

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

-Definition at line 392 of file modules.cpp.

00393 {
-00394         WriteOpers("%s",s.c_str());
-00395 }
+Definition at line 425 of file modules.cpp.
00426 {
+00427         WriteOpers("%s",s.c_str());
+00428 }
 

@@ -2697,9 +2786,9 @@ 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 472 of file modules.cpp.

00473 {
-00474         WriteServ(Socket,"%s",s.c_str());
-00475 }
+Definition at line 510 of file modules.cpp.
00511 {
+00512         WriteServ(Socket,"%s",s.c_str());
+00513 }
 

@@ -2753,20 +2842,20 @@ The format will become:

:localserver TEXT

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

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

-References connection::fd.

00483 {
-00484         if (!Source)
-00485         {
-00486                 // if source is NULL, then the message originates from the local server
-00487                 Write(Dest->fd,":%s %s",this->GetServerName().c_str(),s.c_str());
-00488         }
-00489         else
-00490         {
-00491                 // otherwise it comes from the user specified
-00492                 WriteTo(Source,Dest,"%s",s.c_str());
-00493         }
-00494 }
+Definition at line 520 of file modules.cpp.
+

+References connection::fd.

00521 {
+00522         if (!Source)
+00523         {
+00524                 // if source is NULL, then the message originates from the local server
+00525                 Write(Dest->fd,":%s %s",this->GetServerName().c_str(),s.c_str());
+00526         }
+00527         else
+00528         {
+00529                 // otherwise it comes from the user specified
+00530                 WriteTo(Source,Dest,"%s",s.c_str());
+00531         }
+00532 }
 

@@ -2818,9 +2907,9 @@ 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 405 of file modules.cpp.

00406 {
-00407         WriteMode(modes.c_str(),flags,"%s",text.c_str());
-00408 }
+Definition at line 438 of file modules.cpp.
00439 {
+00440         WriteMode(modes.c_str(),flags,"%s",text.c_str());
+00441 }
 

@@ -2864,9 +2953,9 @@ 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 530 of file modules.cpp.

00531 {
-00532         WriteWallOps(User,false,"%s",text.c_str());
-00533 }
+Definition at line 568 of file modules.cpp.
00569 {
+00570         WriteWallOps(User,false,"%s",text.c_str());
+00571 }
 

@@ -2910,37 +2999,37 @@ 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 639 of file modules.cpp. -

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

00640 {
-00641         unsigned int old_fd = user->fd;
-00642         user->fd = FD_MAGIC_NUMBER;
-00643         user->ClearBuffer();
-00644         Write(old_fd,"ERROR :Closing link (%s@%s) [%s]",user->ident,user->host,message.c_str());
-00645 #ifdef USE_KQUEUE
-00646         struct kevent ke;
-00647         EV_SET(&ke, old_fd, EVFILT_READ, EV_DELETE, 0, 0, NULL);
-00648         int i = kevent(kq, &ke, 1, 0, 0, NULL);
-00649         if (i == -1)
-00650         {
-00651                 log(DEBUG,"kqueue: Failed to remove user from queue!");
-00652         }
-00653 #endif
-00654 #ifdef USE_EPOLL
-00655         struct epoll_event ev;
-00656         ev.events = EPOLLIN | EPOLLET;
-00657         ev.data.fd = old_fd;
-00658         int i = epoll_ctl(ep, EPOLL_CTL_DEL, old_fd, &ev);
-00659         if (i < 0)
-00660         {
-00661                 log(DEBUG,"epoll: List deletion failure!");
-00662         }
-00663 #endif
-00664 
-00665         shutdown(old_fd,2);
-00666         close(old_fd);
-00667         return true;
-00668 }
+Definition at line 677 of file modules.cpp.
+

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

00678 {
+00679         unsigned int old_fd = user->fd;
+00680         user->fd = FD_MAGIC_NUMBER;
+00681         user->ClearBuffer();
+00682         Write(old_fd,"ERROR :Closing link (%s@%s) [%s]",user->ident,user->host,message.c_str());
+00683 #ifdef USE_KQUEUE
+00684         struct kevent ke;
+00685         EV_SET(&ke, old_fd, EVFILT_READ, EV_DELETE, 0, 0, NULL);
+00686         int i = kevent(kq, &ke, 1, 0, 0, NULL);
+00687         if (i == -1)
+00688         {
+00689                 log(DEBUG,"kqueue: Failed to remove user from queue!");
+00690         }
+00691 #endif
+00692 #ifdef USE_EPOLL
+00693         struct epoll_event ev;
+00694         ev.events = EPOLLIN | EPOLLET;
+00695         ev.data.fd = old_fd;
+00696         int i = epoll_ctl(ep, EPOLL_CTL_DEL, old_fd, &ev);
+00697         if (i < 0)
+00698         {
+00699                 log(DEBUG,"epoll: List deletion failure!");
+00700         }
+00701 #endif
+00702 
+00703         shutdown(old_fd,2);
+00704         close(old_fd);
+00705         return true;
+00706 }
 

@@ -2948,7 +3037,7 @@ References userrec::ClearBuff

+   + + +

+ +

+Definition at line 407 of file modules.cpp.

00408 {
+00409         WriteOpers("*** Rehashing config file");
+00410         ReadConfig(false,NULL);
+00411 }
 


The documentation for this class was generated from the following files: -
Generated on Sun Nov 27 01:43:26 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classVersion-members.html b/docs/module-doc/classVersion-members.html index 641098da6..8685101ac 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 Sun Nov 27 01:43:26 2005 for InspIRCd by  +


Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classVersion.html b/docs/module-doc/classVersion.html index c2caf8f31..634494f3d 100644 --- a/docs/module-doc/classVersion.html +++ b/docs/module-doc/classVersion.html @@ -42,7 +42,7 @@ A class of type Version is returned by the GetVersion method of the 112 of file modules.h.

Constructor & Destructor Documentation

+Definition at line 113 of file modules.h.

Constructor & Destructor Documentation

@@ -126,7 +126,7 @@ Definition at line 246

-Definition at line 115 of file modules.h. +Definition at line 116 of file modules.h.

@@ -151,7 +151,7 @@ Definition at line 115 of

-Definition at line 115 of file modules.h. +Definition at line 116 of file modules.h.

@@ -176,7 +176,7 @@ Definition at line 115 of

-Definition at line 115 of file modules.h. +Definition at line 116 of file modules.h.

@@ -201,7 +201,7 @@ Definition at line 115 of

-Definition at line 115 of file modules.h. +Definition at line 116 of file modules.h.

@@ -226,12 +226,12 @@ Definition at line 115 of

-Definition at line 115 of file modules.h. +Definition at line 116 of file modules.h.


The documentation for this class was generated from the following files: -
Generated on Sun Nov 27 01:43:26 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classWhoWasUser-members.html b/docs/module-doc/classWhoWasUser-members.html index 7708132ee..a5c9aa762 100644 --- a/docs/module-doc/classWhoWasUser-members.html +++ b/docs/module-doc/classWhoWasUser-members.html @@ -13,7 +13,7 @@ nickWhoWasUser serverWhoWasUser signonWhoWasUser -
Generated on Sun Nov 27 01:43:26 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classWhoWasUser.html b/docs/module-doc/classWhoWasUser.html index aa182b7a0..5bfbf3f63 100644 --- a/docs/module-doc/classWhoWasUser.html +++ b/docs/module-doc/classWhoWasUser.html @@ -34,7 +34,7 @@ A lightweight userrec used by WHOWAS.

-Definition at line 325 of file users.h.


Member Data Documentation

+Definition at line 332 of file users.h.

Member Data Documentation

@@ -57,7 +57,7 @@ Definition at line 325 of f

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

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

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

@@ -107,7 +107,7 @@ Definition at line 332 of f

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

@@ -132,7 +132,7 @@ Definition at line 331 of f

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

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

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

@@ -182,7 +182,7 @@ Definition at line 328 of f

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

@@ -207,12 +207,12 @@ Definition at line 333 of f

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


The documentation for this class was generated from the following file: -
Generated on Sun Nov 27 01:43:26 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classXLine-members.html b/docs/module-doc/classXLine-members.html index 5bef18732..4ec53d0f6 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 Sun Nov 27 01:43:26 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classXLine.html b/docs/module-doc/classXLine.html index 45d896e8c..8af097557 100644 --- a/docs/module-doc/classXLine.html +++ b/docs/module-doc/classXLine.html @@ -185,7 +185,7 @@ Definition at line 48 of fi
The documentation for this class was generated from the following file: -
Generated on Sun Nov 27 01:43:26 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classZLine-members.html b/docs/module-doc/classZLine-members.html index 25b5a6b34..b0a42f011 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 Sun Nov 27 01:43:26 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classZLine.html b/docs/module-doc/classZLine.html index af5bdfbe5..afe33572b 100644 --- a/docs/module-doc/classZLine.html +++ b/docs/module-doc/classZLine.html @@ -92,7 +92,7 @@ Definition at line 103 of f
The documentation for this class was generated from the following file: -
Generated on Sun Nov 27 01:43:26 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classchanrec-members.html b/docs/module-doc/classchanrec-members.html index 3e93502dc..daaf0b7de 100644 --- a/docs/module-doc/classchanrec-members.html +++ b/docs/module-doc/classchanrec-members.html @@ -17,6 +17,7 @@ DelUser(char *castuser)chanrec Extend(std::string key, char *p)Extensible GetExt(std::string key)Extensible + GetExtList(std::deque< std::string > &list)Extensible GetModeParameter(char mode)chanrec GetUserCounter()chanrec GetUsers()chanrec @@ -33,7 +34,7 @@ topicsetchanrec ~chanrec()chanrec [inline, virtual] ~classbase()classbase [inline] -
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classchanrec.html b/docs/module-doc/classchanrec.html index f332e4510..3d4ba950a 100644 --- a/docs/module-doc/classchanrec.html +++ b/docs/module-doc/classchanrec.html @@ -398,7 +398,7 @@ Definition at line 215

References internal_userlist.

-Referenced by Server::GetUsers().

00216 {
+Referenced by Server::GetUsers().
00216 {
 00217         return &internal_userlist;
 00218 }
 
@@ -842,7 +842,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().

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

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

@@ -929,12 +929,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 Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classclassbase-members.html b/docs/module-doc/classclassbase-members.html index 3cc34fdbc..10d979f6f 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 Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classclassbase.html b/docs/module-doc/classclassbase.html index 4f065424f..39acb09ff 100644 --- a/docs/module-doc/classclassbase.html +++ b/docs/module-doc/classclassbase.html @@ -48,7 +48,7 @@ The base class for all inspircd classes.

-Definition at line 29 of file base.h.


Constructor & Destructor Documentation

+Definition at line 30 of file base.h.

Constructor & Destructor Documentation

@@ -77,9 +77,9 @@ Constructor, Sets the object's time.

-Definition at line 39 of file base.h. +Definition at line 40 of file base.h.

-References age.

00039 { age = time(NULL); }
+References age.
00040 { age = time(NULL); }
 

@@ -111,7 +111,7 @@ References age.

40 of file base.h.
00040 { }
+Definition at line 41 of file base.h.
00041 { }
 

@@ -142,14 +142,14 @@ Time that the object was instantiated (used for TS calculation etc).

-Definition at line 34 of file base.h. +Definition at line 35 of file base.h.

-Referenced by classbase(). +Referenced by classbase().


The documentation for this class was generated from the following file: -
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classcommand__t-members.html b/docs/module-doc/classcommand__t-members.html index 947d15e3a..aeb511356 100644 --- a/docs/module-doc/classcommand__t-members.html +++ b/docs/module-doc/classcommand__t-members.html @@ -12,6 +12,7 @@ Extend(std::string key, char *p)Extensible flags_neededcommand_t GetExt(std::string key)Extensible + GetExtList(std::deque< std::string > &list)Extensible handler_functioncommand_t min_paramscommand_t Shrink(std::string key)Extensible @@ -19,7 +20,7 @@ total_bytescommand_t use_countcommand_t ~classbase()classbase [inline] -
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classcommand__t.html b/docs/module-doc/classcommand__t.html index ce2282e17..aad0922e0 100644 --- a/docs/module-doc/classcommand__t.html +++ b/docs/module-doc/classcommand__t.html @@ -242,7 +242,7 @@ Definition at line 43 of
The documentation for this class was generated from the following file: -
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classconnection-members.html b/docs/module-doc/classconnection-members.html index 6dbe2d41d..1cafc344e 100644 --- a/docs/module-doc/classconnection-members.html +++ b/docs/module-doc/classconnection-members.html @@ -16,6 +16,7 @@ Extend(std::string key, char *p)Extensible fdconnection GetExt(std::string key)Extensible + GetExtList(std::deque< std::string > &list)Extensible haspassedconnection hostconnection idle_lastmsgconnection @@ -27,7 +28,7 @@ Shrink(std::string key)Extensible signonconnection ~classbase()classbase [inline] -
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classconnection.html b/docs/module-doc/classconnection.html index 76ef16db8..258877c45 100644 --- a/docs/module-doc/classconnection.html +++ b/docs/module-doc/classconnection.html @@ -142,7 +142,7 @@ Stats counter for bytes inbound.

Definition at line 54 of file connection.h.

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

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

Definition at line 58 of file connection.h.

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

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

Definition at line 62 of file connection.h.

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

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

Definition at line 66 of file connection.h.

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

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

Definition at line 42 of file connection.h.

-Referenced by connection(), ConfigReader::DumpErrors(), Server::PseudoToUser(), Server::SendTo(), userrec::userrec(), and Server::UserToPseudo(). +Referenced by connection(), ConfigReader::DumpErrors(), Server::PseudoToUser(), Server::SendTo(), userrec::userrec(), and Server::UserToPseudo().

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

Definition at line 70 of file connection.h.

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

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

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

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

Definition at line 92 of file connection.h.

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

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

Definition at line 50 of file connection.h.

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

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

Definition at line 84 of file connection.h.

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

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

Definition at line 96 of file connection.h.

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

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

Definition at line 76 of file connection.h.

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

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

Definition at line 80 of file connection.h.

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

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

Definition at line 88 of file connection.h.

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


The documentation for this class was generated from the following file: -
Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classes.html b/docs/module-doc/classes.html index 1d3d77251..bc1966cbd 100644 --- a/docs/module-doc/classes.html +++ b/docs/module-doc/classes.html @@ -27,7 +27,7 @@ ConnectClass   
  G  
  K  
Server   ZLine   connection   

A | B | C | D | E | F | G | H | I | K | M | Q | R | S | U | V | W | X | Z

-


Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classstd_1_1char__traits.html b/docs/module-doc/classstd_1_1char__traits.html index c91c33065..3843fbc07 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 Sun Nov 27 01:43:25 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classucrec-members.html b/docs/module-doc/classucrec-members.html index 630eeec48..c95b71f14 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 Sun Nov 27 01:43:26 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classucrec.html b/docs/module-doc/classucrec.html index 22589f797..356b90092 100644 --- a/docs/module-doc/classucrec.html +++ b/docs/module-doc/classucrec.html @@ -133,7 +133,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 @@ Contains a bitmask of the UCMODE_OP .

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 Sun Nov 27 01:43:26 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classuserrec-members.html b/docs/module-doc/classuserrec-members.html index 03f0cdccd..fbd98bf62 100644 --- a/docs/module-doc/classuserrec-members.html +++ b/docs/module-doc/classuserrec-members.html @@ -29,6 +29,7 @@ fullnameuserrec GetBuffer()userrec GetExt(std::string key)Extensible + GetExtList(std::deque< std::string > &list)Extensible GetFullHost()userrec [virtual] GetFullRealHost()userrec [virtual] GetInviteList()userrec @@ -68,8 +69,8 @@ userrec()userrec WriteErroruserrec ~classbase()classbase [inline] - ~userrec()userrec [inline, virtual] -
Generated on Sun Nov 27 01:43:26 2005 for InspIRCd by  + ~userrec()userrec [virtual] +
Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/classuserrec.html b/docs/module-doc/classuserrec.html index 9c47c4518..93514f343 100644 --- a/docs/module-doc/classuserrec.html +++ b/docs/module-doc/classuserrec.html @@ -26,8 +26,6 @@ Inheritance diagram for userrec:


Public Member Functions

 userrec () -virtual ~userrec () - virtual char * GetFullHost ()  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.
@@ -79,6 +77,8 @@ Inheritance diagram for userrec:

void CloseSocket ()  Shuts down and closes the user's socket.
+virtual ~userrec () +

Public Attributes

char nick [NICKMAX] @@ -154,7 +154,7 @@ Everything about a connection is stored here primarily, from the user's socket I

-Definition at line 108 of file users.h.


Constructor & Destructor Documentation

+Definition at line 111 of file users.h.

Constructor & Destructor Documentation

@@ -181,36 +181,36 @@ Definition at line 108 of f

-Definition at line 33 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, sendq, server, ServerName, connection::signon, TIME, timeout, and ucrec::uc_modes.

00034 {
-00035         // the PROPER way to do it, AVOID bzero at *ALL* costs
-00036         strcpy(nick,"");
-00037         strcpy(ip,"127.0.0.1");
-00038         timeout = 0;
-00039         strcpy(ident,"");
-00040         strcpy(host,"");
-00041         strcpy(dhost,"");
-00042         strcpy(fullname,"");
-00043         strcpy(modes,"");
-00044         server = (char*)FindServerNamePtr(ServerName);
-00045         strcpy(awaymsg,"");
-00046         strcpy(oper,"");
-00047         reset_due = TIME;
-00048         lines_in = 0;
-00049         fd = lastping = signon = idle_lastmsg = nping = registered = 0;
-00050         flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0;
-00051         haspassed = false;
-00052         dns_done = false;
-00053         recvq = "";
-00054         sendq = "";
-00055         for (int i = 0; i < MAXCHANS; i++)
-00056         {
-00057                 this->chans[i].channel = NULL;
-00058                 this->chans[i].uc_modes = 0;
-00059         }
-00060         invites.clear();
-00061 }
+Definition at line 38 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, sendq, server, ServerName, connection::signon, TIME, timeout, and ucrec::uc_modes.

00039 {
+00040         // the PROPER way to do it, AVOID bzero at *ALL* costs
+00041         strcpy(nick,"");
+00042         strcpy(ip,"127.0.0.1");
+00043         timeout = 0;
+00044         strcpy(ident,"");
+00045         strcpy(host,"");
+00046         strcpy(dhost,"");
+00047         strcpy(fullname,"");
+00048         strcpy(modes,"");
+00049         server = (char*)FindServerNamePtr(ServerName);
+00050         strcpy(awaymsg,"");
+00051         strcpy(oper,"");
+00052         reset_due = TIME;
+00053         lines_in = 0;
+00054         fd = lastping = signon = idle_lastmsg = nping = registered = 0;
+00055         flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0;
+00056         haspassed = false;
+00057         dns_done = false;
+00058         recvq = "";
+00059         sendq = "";
+00060         for (int i = 0; i < MAXCHANS; i++)
+00061         {
+00062                 this->chans[i].channel = NULL;
+00063                 this->chans[i].uc_modes = 0;
+00064         }
+00065         invites.clear();
+00066 }
 

@@ -222,11 +222,11 @@ References awaymsg,

- + - +
virtual userrec::~userrec userrec::~userrec  )  [inline, virtual] [virtual]
@@ -242,7 +242,8 @@ References awaymsg,

-Definition at line 221 of file users.h.

00221 {  }
+Definition at line 68 of file users.cpp.
00069 {
+00070 }
 

@@ -278,32 +279,32 @@ 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 194 of file users.cpp. -

-References recvq, recvqmax, and SetWriteError().

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

+References recvq, recvqmax, and SetWriteError().

00206 {
+00207         std::string b = "";
+00208         for (unsigned int i = 0; i < a.length(); i++)
+00209                 if ((a[i] != '\r') && (a[i] != '\0') && (a[i] != 7))
+00210                         b = b + a[i];
+00211         std::stringstream stream(recvq);
+00212         stream << b;
+00213         recvq = stream.str();
+00214         unsigned int i = 0;
+00215         // count the size of the first line in the buffer.
+00216         while (i < recvq.length())
+00217         {
+00218                 if (recvq[i++] == '\n')
+00219                         break;
+00220         }
+00221         if (recvq.length() > (unsigned)this->recvqmax)
+00222         {
+00223                 this->SetWriteError("RecvQ exceeded");
+00224                 WriteOpers("*** User %s RecvQ of %d exceeds connect class maximum of %d",this->nick,recvq.length(),this->recvqmax);
+00225         }
+00226         // return false if we've had more than 600 characters WITHOUT
+00227         // a carriage return (this is BAD, drop the socket)
+00228         return (i < 600);
+00229 }
 

@@ -338,21 +339,21 @@ 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 250 of file users.cpp. -

-References sendq, sendqmax, and SetWriteError().

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

+References sendq, sendqmax, and SetWriteError().

00262 {
+00263         if (this->GetWriteError() != "")
+00264                 return;
+00265         if (sendq.length() + data.length() > (unsigned)this->sendqmax)
+00266         {
+00267                 WriteOpers("*** User %s SendQ of %d exceeds connect class maximum of %d",this->nick,sendq.length() + data.length(),this->sendqmax);
+00268                 this->SetWriteError("SendQ exceeded");
+00269                 return;
+00270         }
+00271         std::stringstream stream;
+00272         stream << sendq << data;
+00273         sendq = stream.str();
+00274 }
 

@@ -386,14 +387,14 @@ This method returns true if the buffer contains at least one carriage return cha

one complete line may be read)

-Definition at line 220 of file users.cpp. +Definition at line 231 of file users.cpp.

-References recvq.

00221 {
-00222         for (unsigned int i = 0; i < recvq.length(); i++)
-00223                 if (recvq[i] == '\n')
-00224                         return true;
-00225         return false;
-00226 }
+References recvq.
00232 {
+00233         for (unsigned int i = 0; i < recvq.length(); i++)
+00234                 if (recvq[i] == '\n')
+00235                         return true;
+00236         return false;
+00237 }
 

@@ -427,13 +428,13 @@ This function clears the entire buffer by setting it to an empty string.

-Definition at line 228 of file users.cpp. +Definition at line 239 of file users.cpp.

-References recvq. +References recvq.

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

00229 {
-00230         recvq = "";
-00231 }
+Referenced by Server::PseudoToUser(), and Server::UserToPseudo().
00240 {
+00241         recvq = "";
+00242 }
 

@@ -467,10 +468,10 @@ Shuts down and closes the user's socket.

-Definition at line 63 of file users.cpp.

00064 {
-00065         shutdown(this->fd,2);
-00066         close(this->fd);
-00067 }
+Definition at line 72 of file users.cpp.
00073 {
+00074         shutdown(this->fd,2);
+00075         close(this->fd);
+00076 }
 

@@ -504,28 +505,28 @@ 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 266 of file users.cpp. -

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

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

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

00278 {
+00279         if (sendq.length())
+00280         {
+00281                 char* tb = (char*)this->sendq.c_str();
+00282                 int n_sent = write(this->fd,tb,this->sendq.length());
+00283                 if (n_sent == -1)
+00284                 {
+00285                         this->SetWriteError(strerror(errno));
+00286                 }
+00287                 else
+00288                 {
+00289                         // advance the queue
+00290                         tb += n_sent;
+00291                         this->sendq = tb;
+00292                         // update the user's stats counters
+00293                         this->bytes_out += n_sent;
+00294                         this->cmds_out++;
+00295                 }
+00296         }
+00297 }
 

@@ -559,23 +560,23 @@ 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 233 of file users.cpp. -

-References recvq.

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

+References recvq.

00245 {
+00246         if (recvq == "")
+00247                 return "";
+00248         char* line = (char*)recvq.c_str();
+00249         std::string ret = "";
+00250         while ((*line != '\n') && (strlen(line)))
+00251         {
+00252                 ret = ret + *line;
+00253                 line++;
+00254         }
+00255         if ((*line == '\n') || (*line == '\r'))
+00256                 line++;
+00257         recvq = line;
+00258         return ret;
+00259 }
 

@@ -609,13 +610,13 @@ Returns the full displayed host of the user This member function returns the hos

-Definition at line 69 of file users.cpp. +Definition at line 78 of file users.cpp.

-References dhost, ident, and nick.

00070 {
-00071         static char result[MAXBUF];
-00072         snprintf(result,MAXBUF,"%s!%s@%s",nick,ident,dhost);
-00073         return result;
-00074 }
+References dhost, ident, and nick.
00079 {
+00080         static char result[MAXBUF];
+00081         snprintf(result,MAXBUF,"%s!%s@%s",nick,ident,dhost);
+00082         return result;
+00083 }
 

@@ -649,13 +650,13 @@ 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 87 of file users.cpp. +Definition at line 96 of file users.cpp.

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

00088 {
-00089         static char fresult[MAXBUF];
-00090         snprintf(fresult,MAXBUF,"%s!%s@%s",nick,ident,host);
-00091         return fresult;
-00092 }
+References connection::host, ident, and nick.
00097 {
+00098         static char fresult[MAXBUF];
+00099         snprintf(fresult,MAXBUF,"%s!%s@%s",nick,ident,host);
+00100         return fresult;
+00101 }
 

@@ -689,11 +690,11 @@ Returns the list of channels this user has been invited to but has not yet joine

-Definition at line 108 of file users.cpp. +Definition at line 117 of file users.cpp.

-References invites.

00109 {
-00110         return &invites;
-00111 }
+References invites.
00118 {
+00119         return &invites;
+00120 }
 

@@ -727,11 +728,11 @@ Returns the write error which last occured on this connection or an empty string

-Definition at line 296 of file users.cpp. +Definition at line 307 of file users.cpp.

-References WriteError.

00297 {
-00298         return this->WriteError;
-00299 }
+References WriteError.
00308 {
+00309         return this->WriteError;
+00310 }
 

@@ -766,57 +767,59 @@ Returns true or false for if a user can execute a privilaged oper command.

This is done by looking up their oper type from userrec::oper, then referencing this to their oper classes and checking the commands they can execute.

-Definition at line 142 of file users.cpp. -

-References config_f, and DEBUG.

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

+References config_f, and is_uline().

00152 {
+00153         char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF];
+00154         char* mycmd;
+00155         char* savept;
+00156         char* savept2;
+00157         
+00158         // users on u-lined servers can completely bypass
+00159         // all permissions based checks.
+00160         //
+00161         // of course, if this is sent to a remote server and this
+00162         // server is not ulined there, then that other server
+00163         // silently drops the command.
+00164         if (is_uline(this->server))
+00165                 return true;
+00166         
+00167         // are they even an oper at all?
+00168         if (strchr(this->modes,'o'))
+00169         {
+00170                 for (int j =0; j < ConfValueEnum("type",&config_f); j++)
+00171                 {
+00172                         ConfValue("type","name",j,TypeName,&config_f);
+00173                         if (!strcmp(TypeName,this->oper))
+00174                         {
+00175                                 ConfValue("type","classes",j,Classes,&config_f);
+00176                                 char* myclass = strtok_r(Classes," ",&savept);
+00177                                 while (myclass)
+00178                                 {
+00179                                         for (int k =0; k < ConfValueEnum("class",&config_f); k++)
+00180                                         {
+00181                                                 ConfValue("class","name",k,ClassName,&config_f);
+00182                                                 if (!strcmp(ClassName,myclass))
+00183                                                 {
+00184                                                         ConfValue("class","commands",k,CommandList,&config_f);
+00185                                                         mycmd = strtok_r(CommandList," ",&savept2);
+00186                                                         while (mycmd)
+00187                                                         {
+00188                                                                 if ((!strcasecmp(mycmd,command)) || (*mycmd == '*'))
+00189                                                                 {
+00190                                                                         return true;
+00191                                                                 }
+00192                                                                 mycmd = strtok_r(NULL," ",&savept2);
+00193                                                         }
+00194                                                 }
+00195                                         }
+00196                                         myclass = strtok_r(NULL," ",&savept);
+00197                                 }
+00198                         }
+00199                 }
+00200         }
+00201         return false;
+00202 }
 

@@ -851,13 +854,13 @@ Adds a channel to a users invite list (invites them to a channel).

-Definition at line 113 of file users.cpp. +Definition at line 122 of file users.cpp.

-References Invited::channel, and invites.

00114 {
-00115         Invited i;
-00116         strlcpy(i.channel,channel,CHANMAX);
-00117         invites.push_back(i);
-00118 }
+References Invited::channel, and invites.
00123 {
+00124         Invited i;
+00125         strlcpy(i.channel,channel,CHANMAX);
+00126         invites.push_back(i);
+00127 }
 

@@ -892,20 +895,20 @@ Returns true if a user is invited to a channel.

-Definition at line 94 of file users.cpp. +Definition at line 103 of file users.cpp.

-References invites.

00095 {
-00096         for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
-00097         {
-00098                 if (i->channel) {
-00099                         if (!strcasecmp(i->channel,channel))
-00100                         {
-00101                                 return true;
-00102                         }
-00103                 }
-00104         }
-00105         return false;
-00106 }
+References invites.
00104 {
+00105         for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
+00106         {
+00107                 if (i->channel) {
+00108                         if (!strcasecmp(i->channel,channel))
+00109                         {
+00110                                 return true;
+00111                         }
+00112                 }
+00113         }
+00114         return false;
+00115 }
 

@@ -949,16 +952,16 @@ Calls read() to read some data for this user using their fd.

-Definition at line 76 of file users.cpp. +Definition at line 85 of file users.cpp.

-References DEBUG.

00077 {
-00078         if (this->fd > -1)
-00079         {
-00080                 log(DEBUG,"userrec::ReadData on fd %d",this->fd);
-00081                 return read(this->fd, buffer, size);
-00082         }
-00083         else return 0;
-00084 }
+References DEBUG.
00086 {
+00087         if (this->fd > -1)
+00088         {
+00089                 log(DEBUG,"userrec::ReadData on fd %d",this->fd);
+00090                 return read(this->fd, buffer, size);
+00091         }
+00092         else return 0;
+00093 }
 

@@ -993,28 +996,28 @@ 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 120 of file users.cpp. -

-References DEBUG, and invites.

00121 {
-00122         log(DEBUG,"Removing invites");
-00123         if (channel)
-00124         {
-00125                 if (invites.size())
-00126                 {
-00127                         for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
-00128                         {
-00129                                 if (i->channel)
-00130                                 {
-00131                                         if (!strcasecmp(i->channel,channel))
-00132                                         {
-00133                                                 invites.erase(i);
-00134                                                 return;
-00135                                         }
-00136                                 }
-00137                         }
-00138                 }
-00139         }
-00140 }
+Definition at line 129 of file users.cpp.
+

+References DEBUG, and invites.

00130 {
+00131         log(DEBUG,"Removing invites");
+00132         if (channel)
+00133         {
+00134                 if (invites.size())
+00135                 {
+00136                         for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++)
+00137                         {
+00138                                 if (i->channel)
+00139                                 {
+00140                                         if (!strcasecmp(i->channel,channel))
+00141                                         {
+00142                                                 invites.erase(i);
+00143                                                 return;
+00144                                         }
+00145                                 }
+00146                         }
+00147                 }
+00148         }
+00149 }
 

@@ -1049,16 +1052,16 @@ 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 288 of file users.cpp. +Definition at line 299 of file users.cpp.

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

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

00289 {
-00290         log(DEBUG,"Setting error string for %s to '%s'",this->nick,error.c_str());
-00291         // don't try to set the error twice, its already set take the first string.
-00292         if (this->WriteError == "")
-00293                 this->WriteError = error;
-00294 }
+Referenced by AddBuffer(), AddWriteBuf(), and FlushWriteBuf().
00300 {
+00301         log(DEBUG,"Setting error string for %s to '%s'",this->nick,error.c_str());
+00302         // don't try to set the error twice, its already set take the first string.
+00303         if (this->WriteError == "")
+00304                 this->WriteError = error;
+00305 }
 

@@ -1089,9 +1092,9 @@ 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. +Definition at line 158 of file users.h.

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

@@ -1116,9 +1119,9 @@ Referenced by userrec().

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

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

@@ -1145,9 +1148,9 @@ The host displayed to non-opers (used for cloaking etc).

This usually matches the value of userrec::host.

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

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

@@ -1174,9 +1177,9 @@ True when DNS lookups are completed.

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

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

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

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

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

@@ -1232,9 +1235,9 @@ The users full name.

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

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

@@ -1261,9 +1264,9 @@ 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. +Definition at line 129 of file users.h.

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

@@ -1290,9 +1293,9 @@ A list of channels the user has a pending invite to.

-Definition at line 114 of file users.h. +Definition at line 117 of file users.h.

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

@@ -1319,9 +1322,9 @@ Flood counters.

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

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

@@ -1348,9 +1351,9 @@ 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. +Definition at line 147 of file users.h.

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

@@ -1377,9 +1380,9 @@ The users nickname.

An invalid nickname indicates an unregistered connection prior to the NICK command.

-Definition at line 121 of file users.h. +Definition at line 124 of file users.h.

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

@@ -1406,9 +1409,9 @@ 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. +Definition at line 177 of file users.h.

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

@@ -1435,7 +1438,7 @@ Password specified by the user when they registered.

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

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

@@ -1462,7 +1465,7 @@ Number of seconds between PINGs for this user (set from <connect:allow> ta

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

@@ -1489,9 +1492,9 @@ 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. +Definition at line 197 of file users.h.

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

@@ -1518,9 +1521,9 @@ Maximum size this user's recvq can become.

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

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

@@ -1545,9 +1548,9 @@ Referenced by AddBuffer()

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

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

@@ -1574,9 +1577,9 @@ 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. +Definition at line 202 of file users.h.

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

@@ -1603,9 +1606,9 @@ Maximum size this user's sendq can become.

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

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

@@ -1632,9 +1635,9 @@ The server the user is connected to.

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

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

@@ -1659,7 +1662,7 @@ Referenced by userrec().

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

@@ -1686,9 +1689,9 @@ Number of seconds this user is given to send USER/NICK If they do not send their

-Definition at line 167 of file users.h. +Definition at line 170 of file users.h.

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

@@ -1713,14 +1716,14 @@ Referenced by userrec().

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

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


The documentation for this class was generated from the following files: -
Generated on Sun Nov 27 01:43:26 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/commands_8h-source.html b/docs/module-doc/commands_8h-source.html index 3d62e89c4..ca09eb05e 100644 --- a/docs/module-doc/commands_8h-source.html +++ b/docs/module-doc/commands_8h-source.html @@ -94,8 +94,10 @@ 00089 00092 long duration(const char* str); 00093 -00094 #endif -

Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +00094 void do_whois(userrec* user, userrec* dest,unsigned long signon, unsigned long idle, char* nick); +00095 +00096 #endif +

Generated on Fri Dec 9 20:20:03 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/commands_8h.html b/docs/module-doc/commands_8h.html index 191152837..1c25411f7 100644 --- a/docs/module-doc/commands_8h.html +++ b/docs/module-doc/commands_8h.html @@ -27,7 +27,8 @@ Include dependency graph for commands.h:

- + +

@@ -143,8 +144,65 @@ This graph shows which files directly or indirectly include this file:

long duration (const char *str)  Other useful functions.
+void do_whois (userrec *user, userrec *dest, unsigned long signon, unsigned long idle, char *nick) +

Function Documentation

+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void do_whois userrec user,
userrec dest,
unsigned long  signon,
unsigned long  idle,
char *  nick
+
+ + + + + +
+   + + +

+

@@ -174,7 +232,7 @@ Other useful functions.

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

@@ -2401,10 +2459,10 @@ Functions for u:lined servers.

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


Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:06 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/commands_8h__dep__incl.gif b/docs/module-doc/commands_8h__dep__incl.gif index f3081d264..9c1fd4e97 100644 Binary files a/docs/module-doc/commands_8h__dep__incl.gif and b/docs/module-doc/commands_8h__dep__incl.gif differ diff --git a/docs/module-doc/commands_8h__dep__incl.map b/docs/module-doc/commands_8h__dep__incl.map index 4ed4b1367..40f4817a8 100644 --- a/docs/module-doc/commands_8h__dep__incl.map +++ b/docs/module-doc/commands_8h__dep__incl.map @@ -1,2 +1,3 @@ base referer -rect $modules_8cpp-source.html 154,7 252,33 +rect $modules_8cpp-source.html 154,7 252,34 +rect $users_8cpp-source.html 163,58 243,84 diff --git a/docs/module-doc/commands_8h__dep__incl.md5 b/docs/module-doc/commands_8h__dep__incl.md5 index f0e06b5f7..f583a9c38 100644 --- a/docs/module-doc/commands_8h__dep__incl.md5 +++ b/docs/module-doc/commands_8h__dep__incl.md5 @@ -1 +1 @@ -cf68098e63b4748ba0865f2bc30af732 \ No newline at end of file +ccb4ab234f9170cb8c946ac0da24c81d \ No newline at end of file diff --git a/docs/module-doc/commands_8h__incl.md5 b/docs/module-doc/commands_8h__incl.md5 index 451a89aa0..75966de38 100644 --- a/docs/module-doc/commands_8h__incl.md5 +++ b/docs/module-doc/commands_8h__incl.md5 @@ -1 +1 @@ -c2b443ef5e1ee3a3ee4ac49b793d39a5 \ No newline at end of file +0ab6434b364171922a16fbd69fe35c2b \ No newline at end of file diff --git a/docs/module-doc/connection_8h-source.html b/docs/module-doc/connection_8h-source.html index 8570e44d5..1953b03c1 100644 --- a/docs/module-doc/connection_8h-source.html +++ b/docs/module-doc/connection_8h-source.html @@ -82,7 +82,7 @@ 00107 #endif 00108 00109 -

Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +

Generated on Fri Dec 9 20:20:03 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/connection_8h.html b/docs/module-doc/connection_8h.html index 302c0902a..2b2d28e2a 100644 --- a/docs/module-doc/connection_8h.html +++ b/docs/module-doc/connection_8h.html @@ -31,14 +31,14 @@ Include dependency graph for connection.h:

- - - - - - - - + + + + + + + +

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

 Please note: classes serverrec and userrec both inherit from class connection. More...
-
Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:07 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/connection_8h__dep__incl.gif b/docs/module-doc/connection_8h__dep__incl.gif index b424df146..6955c5eeb 100644 Binary files a/docs/module-doc/connection_8h__dep__incl.gif and b/docs/module-doc/connection_8h__dep__incl.gif differ diff --git a/docs/module-doc/connection_8h__dep__incl.map b/docs/module-doc/connection_8h__dep__incl.map index 03b0bcf03..e2eda6b4d 100644 --- a/docs/module-doc/connection_8h__dep__incl.map +++ b/docs/module-doc/connection_8h__dep__incl.map @@ -1,9 +1,9 @@ base referer -rect $users_8cpp-source.html 278,7 358,33 -rect $users_8h-source.html 155,133 219,160 -rect $channels_8cpp-source.html 416,133 515,160 -rect $modules_8cpp-source.html 416,209 515,236 -rect $commands_8h-source.html 268,311 367,337 -rect $message_8h-source.html 275,108 360,135 -rect $mode_8h-source.html 284,159 351,185 -rect $xline_8h-source.html 287,209 348,236 +rect $users_8cpp-source.html 426,58 506,84 +rect $users_8h-source.html 155,184 219,211 +rect $channels_8cpp-source.html 416,286 515,312 +rect $modules_8cpp-source.html 416,210 515,236 +rect $commands_8h-source.html 268,108 367,135 +rect $message_8h-source.html 275,210 360,236 +rect $mode_8h-source.html 284,260 351,287 +rect $xline_8h-source.html 287,311 348,338 diff --git a/docs/module-doc/connection_8h__dep__incl.md5 b/docs/module-doc/connection_8h__dep__incl.md5 index c1c7e633a..d38e2fed2 100644 --- a/docs/module-doc/connection_8h__dep__incl.md5 +++ b/docs/module-doc/connection_8h__dep__incl.md5 @@ -1 +1 @@ -c7cecb14291ff4131ebac40acf61d502 \ No newline at end of file +e7f8b1061bdad90c2835adfcfbc5d84e \ No newline at end of file diff --git a/docs/module-doc/connection_8h__incl.gif b/docs/module-doc/connection_8h__incl.gif index 61336dc8b..6ce5349e8 100644 Binary files a/docs/module-doc/connection_8h__incl.gif and b/docs/module-doc/connection_8h__incl.gif differ diff --git a/docs/module-doc/connection_8h__incl.md5 b/docs/module-doc/connection_8h__incl.md5 index be4f35580..fd8b11637 100644 --- a/docs/module-doc/connection_8h__incl.md5 +++ b/docs/module-doc/connection_8h__incl.md5 @@ -1 +1 @@ -7566ac0f626ba6a537eabdae6c98a2d9 \ No newline at end of file +58c73d261dc41f418721e3c765d392c8 \ No newline at end of file diff --git a/docs/module-doc/ctables_8h-source.html b/docs/module-doc/ctables_8h-source.html index 0241f3c68..7f3a4cfee 100644 --- a/docs/module-doc/ctables_8h-source.html +++ b/docs/module-doc/ctables_8h-source.html @@ -44,7 +44,7 @@ 00051 00052 #endif 00053 -

Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +

Generated on Fri Dec 9 20:20:03 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/ctables_8h.html b/docs/module-doc/ctables_8h.html index 674d3b7f9..b2f9ac1e7 100644 --- a/docs/module-doc/ctables_8h.html +++ b/docs/module-doc/ctables_8h.html @@ -33,7 +33,7 @@ This graph shows which files directly or indirectly include this file:

 A structure that defines a command. More...
-
Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:07 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/ctables_8h__incl.gif b/docs/module-doc/ctables_8h__incl.gif index 1d6aea743..4920046dd 100644 Binary files a/docs/module-doc/ctables_8h__incl.gif and b/docs/module-doc/ctables_8h__incl.gif differ diff --git a/docs/module-doc/ctables_8h__incl.md5 b/docs/module-doc/ctables_8h__incl.md5 index 21bcd8b04..b510b2d77 100644 --- a/docs/module-doc/ctables_8h__incl.md5 +++ b/docs/module-doc/ctables_8h__incl.md5 @@ -1 +1 @@ -ce4287d2f1f82e62ab357a4a90b21185 \ No newline at end of file +d5431bcb76ccd0bce090bde6c22e93eb \ No newline at end of file diff --git a/docs/module-doc/dir_000000.html b/docs/module-doc/dir_000000.html index 433d50e93..03db9192d 100644 --- a/docs/module-doc/dir_000000.html +++ b/docs/module-doc/dir_000000.html @@ -20,7 +20,7 @@ directory  brain -
Generated on Sun Nov 27 01:43:26 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/dir_000001.html b/docs/module-doc/dir_000001.html index e50eadacb..b1836c3da 100644 --- a/docs/module-doc/dir_000001.html +++ b/docs/module-doc/dir_000001.html @@ -21,7 +21,7 @@ directory  inspircd-cvs -
Generated on Sun Nov 27 01:43:26 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/dir_000002.html b/docs/module-doc/dir_000002.html index 09debb034..71c2a48c1 100644 --- a/docs/module-doc/dir_000002.html +++ b/docs/module-doc/dir_000002.html @@ -21,7 +21,7 @@ directory  inspircd -
Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/dir_000003.html b/docs/module-doc/dir_000003.html index caf075056..bf667456c 100644 --- a/docs/module-doc/dir_000003.html +++ b/docs/module-doc/dir_000003.html @@ -13,7 +13,7 @@ - + @@ -26,7 +26,7 @@ directory  src -
Generated on Sun Nov 27 01:43:26 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/dir_000003_dep.gif b/docs/module-doc/dir_000003_dep.gif index 970c00d1e..dae021b5f 100644 Binary files a/docs/module-doc/dir_000003_dep.gif and b/docs/module-doc/dir_000003_dep.gif differ diff --git a/docs/module-doc/dir_000003_dep.map b/docs/module-doc/dir_000003_dep.map index da683e754..43e9d1dd9 100644 --- a/docs/module-doc/dir_000003_dep.map +++ b/docs/module-doc/dir_000003_dep.map @@ -1,7 +1,7 @@ base referer rect dir_000004.html 39,172 111,220 rect dir_000005.html 39,76 111,124 -rect dir_000005_000004.html 75,147 90,160 +rect dir_000005_000004.html 75,147 91,160 rect dir_000005_000004.html 71,168 79,176 rect dir_000003.html 28,55 217,231 rect dir_000002.html 17,17 228,241 diff --git a/docs/module-doc/dir_000004.html b/docs/module-doc/dir_000004.html index 5a3041753..b66c766e7 100644 --- a/docs/module-doc/dir_000004.html +++ b/docs/module-doc/dir_000004.html @@ -44,7 +44,7 @@ file  xline.h [code] -
Generated on Sun Nov 27 01:43:26 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/dir_000005.html b/docs/module-doc/dir_000005.html index 24d94f27e..16c8b902f 100644 --- a/docs/module-doc/dir_000005.html +++ b/docs/module-doc/dir_000005.html @@ -13,7 +13,7 @@ - + @@ -29,7 +29,7 @@ file  users.cpp [code] -
Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/dir_000005_000004.html b/docs/module-doc/dir_000005_000004.html index 65c355384..f47ca4652 100644 --- a/docs/module-doc/dir_000005_000004.html +++ b/docs/module-doc/dir_000005_000004.html @@ -7,7 +7,7 @@ -

src → include Relation

File in home » brain » inspircd-cvs » inspircd » srcIncludes file in home » brain » inspircd-cvs » inspircd » include
channels.cppctables.h
channels.cppmessage.h
channels.cppmode.h
channels.cppmodules.h
channels.cppusers.h
channels.cppxline.h
modules.cppcommands.h
modules.cppctables.h
modules.cpphashcomp.h
modules.cppmessage.h
modules.cppmode.h
modules.cppmodules.h
modules.cppsocket.h
modules.cppusers.h
modules.cppxline.h
socket.cppsocket.h
users.cppchannels.h
users.cppconnection.h
users.cppusers.h

Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +

src → include Relation

File in home » brain » inspircd-cvs » inspircd » srcIncludes file in home » brain » inspircd-cvs » inspircd » include
channels.cppctables.h
channels.cppmessage.h
channels.cppmode.h
channels.cppmodules.h
channels.cppusers.h
channels.cppxline.h
modules.cppcommands.h
modules.cppctables.h
modules.cpphashcomp.h
modules.cppmessage.h
modules.cppmode.h
modules.cppmodules.h
modules.cppsocket.h
modules.cppusers.h
modules.cppxline.h
socket.cppsocket.h
users.cppchannels.h
users.cppcommands.h
users.cppconnection.h
users.cppusers.h

Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/dir_000005_dep.gif b/docs/module-doc/dir_000005_dep.gif index 68bfaa13b..48c70077f 100644 Binary files a/docs/module-doc/dir_000005_dep.gif and b/docs/module-doc/dir_000005_dep.gif differ diff --git a/docs/module-doc/dir_000005_dep.map b/docs/module-doc/dir_000005_dep.map index 230315694..828963de3 100644 --- a/docs/module-doc/dir_000005_dep.map +++ b/docs/module-doc/dir_000005_dep.map @@ -1,6 +1,6 @@ base referer rect dir_000005.html 28,55 100,103 rect dir_000004.html 28,151 100,199 -rect dir_000005_000004.html 65,125 79,139 +rect dir_000005_000004.html 64,125 80,139 rect dir_000005_000004.html 60,147 68,155 rect dir_000003.html 17,17 111,113 diff --git a/docs/module-doc/dirs.html b/docs/module-doc/dirs.html index 4a3493811..c70d30179 100644 --- a/docs/module-doc/dirs.html +++ b/docs/module-doc/dirs.html @@ -21,7 +21,7 @@ -
Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/dns_8h-source.html b/docs/module-doc/dns_8h-source.html index 6b7deaef2..3592f2d79 100644 --- a/docs/module-doc/dns_8h-source.html +++ b/docs/module-doc/dns_8h-source.html @@ -43,36 +43,38 @@ 00037 private: 00038 in_addr *binip; 00039 char* result; -00040 int t; -00041 void dns_init(); -00042 int fd; -00043 void dns_init_2(const char* dnsserver); -00044 in_addr *dns_aton4(const char * const ipstring); -00045 char *dns_ntoa4(const in_addr * const ip); -00046 int dns_getip4(const char * const name); -00047 int dns_getip4list(const char * const name); -00048 int dns_getname4(const in_addr * const ip); -00049 char *dns_getresult(const int fd); -00050 in_addr *dns_aton4_s(const char * const ipstring, in_addr * const ip); -00051 char *dns_ntoa4_s(const in_addr * const ip, char * const result); -00052 char *dns_getresult_s(const int fd, char * const result); -00053 in_addr *dns_aton4_r(const char * const ipstring); -00054 char *dns_ntoa4_r(const in_addr * const ip); -00055 char *dns_getresult_r(const int fd); -00056 public: -00063 DNS(); -00067 DNS(std::string dnsserver); -00070 ~DNS(); -00075 bool ReverseLookup(std::string ip); -00079 bool ForwardLookup(std::string host); -00083 bool HasResult(); -00087 std::string GetResult(); -00091 int GetFD(); -00092 void SetNS(std::string dnsserver); -00093 }; -00094 -00095 #endif -

Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +00040 char localbuf[1024]; +00041 int t; +00042 void dns_init(); +00043 int myfd; +00044 void dns_init_2(const char* dnsserver); +00045 in_addr *dns_aton4(const char * const ipstring); +00046 char *dns_ntoa4(const in_addr * const ip); +00047 int dns_getip4(const char * const name); +00048 int dns_getip4list(const char * const name); +00049 int dns_getname4(const in_addr * const ip); +00050 char *dns_getresult(const int fd); +00051 in_addr *dns_aton4_s(const char * const ipstring, in_addr * const ip); +00052 char *dns_ntoa4_s(const in_addr * const ip, char * const result); +00053 char *dns_getresult_s(const int fd, char * const result); +00054 in_addr *dns_aton4_r(const char * const ipstring); +00055 char *dns_ntoa4_r(const in_addr * const ip); +00056 char *dns_getresult_r(const int fd); +00057 public: +00064 DNS(); +00068 DNS(std::string dnsserver); +00071 ~DNS(); +00076 bool ReverseLookup(std::string ip); +00080 bool ForwardLookup(std::string host); +00084 bool HasResult(); +00088 std::string GetResult(); +00089 std::string GetResultIP(); +00093 int GetFD(); +00094 void SetNS(std::string dnsserver); +00095 }; +00096 +00097 #endif +

Generated on Fri Dec 9 20:20:03 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/dns_8h.html b/docs/module-doc/dns_8h.html index 6819e0dd3..78f3494fa 100644 --- a/docs/module-doc/dns_8h.html +++ b/docs/module-doc/dns_8h.html @@ -25,7 +25,7 @@ Include dependency graph for dns.h:

 The DNS class allows fast nonblocking resolution of hostnames and ip addresses. More...
-
Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:07 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/files.html b/docs/module-doc/files.html index 09fc04473..48a64d4d7 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 Sun Nov 27 01:43:24 2005 for InspIRCd by  +
Generated on Fri Dec 9 20:20:03 2005 for InspIRCd by  doxygen 1.4.4-20050815
diff --git a/docs/module-doc/functions.html b/docs/module-doc/functions.html index 1dd122f9d..0df95c18b 100644 --- a/docs/module-doc/functions.html +++ b/docs/module-doc/functions.html @@ -30,7 +30,7 @@ Here is a list of all class members with links to the classes they belong to: : Admin
  • age : classbase
  • awaymsg : userrec -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_0x62.html b/docs/module-doc/functions_0x62.html index ab2a16dbb..8635fc1e1 100644 --- a/docs/module-doc/functions_0x62.html +++ b/docs/module-doc/functions_0x62.html @@ -22,7 +22,7 @@ Here is a list of all class members with links to the classes they belong to: : Version
  • bytes_in : connection
  • bytes_out : connection -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_0x63.html b/docs/module-doc/functions_0x63.html index ca7c29e1c..cc252bbdd 100644 --- a/docs/module-doc/functions_0x63.html +++ b/docs/module-doc/functions_0x63.html @@ -38,9 +38,9 @@ Here is a list of all class members with links to the classes they belong to: : connection
  • CountUsers() : Server
  • created : chanrec
  • CreateModule() -: ModuleFactory
  • custom_modes +: ModuleFactory
  • custom_modes : chanrec -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_0x64.html b/docs/module-doc/functions_0x64.html index 071c3b8bc..76871dddc 100644 --- a/docs/module-doc/functions_0x64.html +++ b/docs/module-doc/functions_0x64.html @@ -41,7 +41,7 @@ Here is a list of all class members with links to the classes they belong to: : DNS
  • DumpErrors() : ConfigReader
  • duration : XLine -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_0x65.html b/docs/module-doc/functions_0x65.html index d540c93d3..02b9a2ba2 100644 --- a/docs/module-doc/functions_0x65.html +++ b/docs/module-doc/functions_0x65.html @@ -24,7 +24,7 @@ Here is a list of all class members with links to the classes they belong to: : Extensible
  • Extension_Items : Extensible
  • ExtMode() : ExtMode -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_0x66.html b/docs/module-doc/functions_0x66.html index 0e5eef2ff..97c99e69e 100644 --- a/docs/module-doc/functions_0x66.html +++ b/docs/module-doc/functions_0x66.html @@ -14,7 +14,7 @@ Here is a list of all class members with links to the classes they belong to:

    - f -

    -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_0x67.html b/docs/module-doc/functions_0x67.html index 7fd17e32d..3aa990b92 100644 --- a/docs/module-doc/functions_0x67.html +++ b/docs/module-doc/functions_0x67.html @@ -20,15 +20,18 @@ Here is a list of all class members with links to the classes they belong to: : Request
  • GetError() : ConfigReader
  • GetEventID() : Event
  • GetExt() -: Extensible
  • GetFD() +: Extensible
  • GetExtList() +: Extensible
  • GetFD() : DNS
  • GetFullHost() : userrec
  • GetFullRealHost() : userrec
  • GetInviteList() -: userrec
  • GetLine() +: userrec
  • GetIP() +: InspSocket
  • GetLine() : FileReader
  • GetModeParameter() : chanrec
  • GetNetworkName() : Server
  • GetResult() -: DNS
  • GetServerDescription() +: DNS
  • GetResultIP() +: DNS
  • GetServerDescription() : Server
  • GetServerName() : Server
  • GetSource() : Event, Request
  • GetState() @@ -37,7 +40,7 @@ Here is a list of all class members with links to the classes they belong to: : Server, chanrec
  • GetVersion() : Module
  • GetWriteError() : userrec -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_0x68.html b/docs/module-doc/functions_0x68.html index b7afccad2..aa9f5b2a3 100644 --- a/docs/module-doc/functions_0x68.html +++ b/docs/module-doc/functions_0x68.html @@ -20,7 +20,7 @@ Here is a list of all class members with links to the classes they belong to: : WhoWasUser, ConnectClass, InspSocket, connection
  • HostItem() : HostItem
  • hostmask : ELine, GLine, KLine -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_0x69.html b/docs/module-doc/functions_0x69.html index 0bad44b82..72b2753e6 100644 --- a/docs/module-doc/functions_0x69.html +++ b/docs/module-doc/functions_0x69.html @@ -13,7 +13,7 @@ Here is a list of all class members with links to the classes they belong to:

    - i -

    -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +: Server
  • IsValidModuleCommand() +: Server +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_0x6a.html b/docs/module-doc/functions_0x6a.html index 23e73892a..c6a887f10 100644 --- a/docs/module-doc/functions_0x6a.html +++ b/docs/module-doc/functions_0x6a.html @@ -14,7 +14,7 @@ Here is a list of all class members with links to the classes they belong to:

    - j -

    -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_0x6b.html b/docs/module-doc/functions_0x6b.html index dbcd49338..4bd07cec1 100644 --- a/docs/module-doc/functions_0x6b.html +++ b/docs/module-doc/functions_0x6b.html @@ -14,7 +14,7 @@ Here is a list of all class members with links to the classes they belong to:

    - k -

    -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_0x6c.html b/docs/module-doc/functions_0x6c.html index 580c62484..4b74b1f07 100644 --- a/docs/module-doc/functions_0x6c.html +++ b/docs/module-doc/functions_0x6c.html @@ -18,10 +18,11 @@ Here is a list of all class members with links to the classes they belong to: : chanrec
  • lines_in : userrec
  • list : ExtMode
  • LoadFile() -: FileReader
  • Log() +: FileReader
  • localbuf +: DNS
  • Log() : Server
  • lt() : irc::irc_char_traits -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_0x6d.html b/docs/module-doc/functions_0x6d.html index 552da6fae..36fab4466 100644 --- a/docs/module-doc/functions_0x6d.html +++ b/docs/module-doc/functions_0x6d.html @@ -20,9 +20,10 @@ Here is a list of all class members with links to the classes they belong to: : ModeParameter
  • modechar : ExtMode
  • modes : userrec
  • Module() -: Module
  • ModuleFactory() -: ModuleFactory -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +: Module
  • ModuleFactory() +: ModuleFactory
  • myfd +: DNS +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_0x6e.html b/docs/module-doc/functions_0x6e.html index 2e6491b87..82ece27a8 100644 --- a/docs/module-doc/functions_0x6e.html +++ b/docs/module-doc/functions_0x6e.html @@ -22,7 +22,7 @@ Here is a list of all class members with links to the classes they belong to: : QLine, WhoWasUser, userrec
  • Nick : Admin
  • nping : connection -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_0x6f.html b/docs/module-doc/functions_0x6f.html index 0826fbacf..273043f39 100644 --- a/docs/module-doc/functions_0x6f.html +++ b/docs/module-doc/functions_0x6f.html @@ -15,52 +15,74 @@ Here is a list of all class members with links to the classes they belong to:
  • On005Numeric() : Module
  • OnAccessCheck() : Module
  • OnAddBan() -: Module
  • OnBackgroundTimer() -: Module
  • OnChangeLocalUserGECOS() +: Module
  • OnAddELine() +: Module
  • OnAddGLine() +: Module
  • OnAddKLine() +: Module
  • OnAddQLine() +: Module
  • OnAddZLine() +: Module
  • OnBackgroundTimer() +: Module
  • OnChangeHost() +: Module
  • OnChangeLocalUserGECOS() : Module
  • OnChangeLocalUserHost() -: Module
  • OnChannelSync() -: Module
  • OnCheckBan() +: Module
  • OnChangeName() +: Module
  • OnCheckBan() : Module
  • OnCheckInvite() : Module
  • OnCheckKey() : Module
  • OnCheckLimit() : Module
  • OnCheckReady() -: Module
  • OnClose() +: Module
  • OnCleanup() +: Module
  • OnClose() : InspSocket
  • OnConnected() : InspSocket
  • OnDataReady() -: InspSocket
  • OnDelBan() -: Module
  • OnDisconnect() +: InspSocket
  • OnDecodeMetaData() +: Module
  • OnDelBan() +: Module
  • OnDelELine() +: Module
  • OnDelGLine() +: Module
  • OnDelKLine() +: Module
  • OnDelQLine() +: Module
  • OnDelZLine() +: Module
  • OnDisconnect() : InspSocket
  • OnError() : InspSocket
  • OnEvent() : Module
  • OnExtendedMode() -: Module
  • OnGlobalConnect() +: Module
  • OnGetServerDescription() +: Module
  • OnGlobalConnect() : Module
  • OnGlobalOper() : Module
  • OnIncomingConnection() : InspSocket
  • OnInfo() : Module
  • OnKill() : Module
  • OnLoadModule() : Module
  • OnLocalTopicChange() -: Module
  • OnOper() -: Module
  • OnOperCompare() -: Module
  • OnPacketReceive() -: Module
  • OnPacketTransmit() -: Module
  • OnPreCommand() +: Module
  • OnMode() +: Module
  • OnOper() +: Module
  • OnOperCompare() +: Module
  • OnPostLocalTopicChange() +: Module
  • OnPreCommand() : Module
  • OnRawMode() : Module
  • OnRawSocketAccept() : Module
  • OnRawSocketClose() : Module
  • OnRawSocketRead() : Module
  • OnRawSocketWrite() : Module
  • OnRehash() -: Module
  • OnRequest() +: Module
  • OnRemoteKill() +: Module
  • OnRequest() : Module
  • OnSendList() : Module
  • OnServerRaw() : Module
  • OnStats() -: Module
  • OnTimeout() +: Module
  • OnSyncChannel() +: Module
  • OnSyncChannelMetaData() +: Module
  • OnSyncUser() +: Module
  • OnSyncUserMetaData() +: Module
  • OnTimeout() : InspSocket
  • OnUnloadModule() : Module
  • OnUserConnect() : Module
  • OnUserDisconnect() -: Module
  • OnUserJoin() +: Module
  • OnUserInvite() +: Module
  • OnUserJoin() : Module
  • OnUserKick() -: Module
  • OnUserPart() +: Module
  • OnUserMessage() +: Module
  • OnUserNotice() +: Module
  • OnUserPart() : Module
  • OnUserPostNick() : Module
  • OnUserPreInvite() : Module
  • OnUserPreJoin() @@ -69,9 +91,9 @@ Here is a list of all class members with links to the classes they belong to: : Module
  • OnUserPreNick() : Module
  • OnUserPreNotice() : Module
  • OnUserQuit() -: Module
  • OnUserRegister() -: Module
  • OnUserSync() -: Module
  • OnWhois() +: Module
  • OnUserRegister() +: Module
  • OnWallops() +: Module
  • OnWhois() : Module
  • oper : userrec
  • operator &() : BoolSet
  • operator()() @@ -79,7 +101,7 @@ Here is a list of all class members with links to the classes they belong to: : BoolSet
  • operator==() : BoolSet
  • operator|() : BoolSet -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_0x70.html b/docs/module-doc/functions_0x70.html index c3d5b19e8..03c02540b 100644 --- a/docs/module-doc/functions_0x70.html +++ b/docs/module-doc/functions_0x70.html @@ -23,9 +23,11 @@ Here is a list of all class members with links to the classes they belong to: : ConnectClass
  • Poll() : InspSocket
  • polls : InspSocket
  • port -: InspSocket, connection
  • PseudoToUser() +: InspSocket, connection
  • ProtoSendMetaData() +: Module
  • ProtoSendMode() +: Module
  • PseudoToUser() : Server -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_0x71.html b/docs/module-doc/functions_0x71.html index d5388a7f5..1b21da48c 100644 --- a/docs/module-doc/functions_0x71.html +++ b/docs/module-doc/functions_0x71.html @@ -14,7 +14,7 @@ Here is a list of all class members with links to the classes they belong to:

    - q -

    -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_0x72.html b/docs/module-doc/functions_0x72.html index e8fe68c40..1ba629ddb 100644 --- a/docs/module-doc/functions_0x72.html +++ b/docs/module-doc/functions_0x72.html @@ -23,14 +23,15 @@ Here is a list of all class members with links to the classes they belong to: : userrec
  • recvqmax : userrec, ConnectClass
  • registered : connection
  • registration_timeout -: ConnectClass
  • RemoveInvite() +: ConnectClass
  • RehashServer() +: Server
  • RemoveInvite() : userrec
  • Request() : Request
  • reset_due : userrec
  • result : DNS
  • ReverseLookup() : DNS
  • Revision : Version -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_0x73.html b/docs/module-doc/functions_0x73.html index 366b74dcc..670a7add6 100644 --- a/docs/module-doc/functions_0x73.html +++ b/docs/module-doc/functions_0x73.html @@ -41,7 +41,7 @@ Here is a list of all class members with links to the classes they belong to: : WhoWasUser, connection
  • source : XLine, Event, Request, command_t
  • state : InspSocket -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_0x74.html b/docs/module-doc/functions_0x74.html index 81e4483db..e5b4c63e6 100644 --- a/docs/module-doc/functions_0x74.html +++ b/docs/module-doc/functions_0x74.html @@ -21,7 +21,7 @@ Here is a list of all class members with links to the classes they belong to: : chanrec
  • total_bytes : command_t
  • type : ConnectClass, ExtMode -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_0x75.html b/docs/module-doc/functions_0x75.html index 1d65fb77c..180c2f94a 100644 --- a/docs/module-doc/functions_0x75.html +++ b/docs/module-doc/functions_0x75.html @@ -19,7 +19,7 @@ Here is a list of all class members with links to the classes they belong to: : command_t
  • userrec() : userrec
  • UserToPseudo() : Server -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_0x76.html b/docs/module-doc/functions_0x76.html index 87321f331..dab31d1d2 100644 --- a/docs/module-doc/functions_0x76.html +++ b/docs/module-doc/functions_0x76.html @@ -15,7 +15,7 @@ Here is a list of all class members with links to the classes they belong to:
  • Verify() : ConfigReader
  • Version() : Version -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_0x77.html b/docs/module-doc/functions_0x77.html index 2c7265b11..a941840f5 100644 --- a/docs/module-doc/functions_0x77.html +++ b/docs/module-doc/functions_0x77.html @@ -15,7 +15,7 @@ Here is a list of all class members with links to the classes they belong to:
  • Write() : InspSocket
  • WriteError : userrec -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_0x7e.html b/docs/module-doc/functions_0x7e.html index 26f7b4e9f..9dc3acf39 100644 --- a/docs/module-doc/functions_0x7e.html +++ b/docs/module-doc/functions_0x7e.html @@ -26,7 +26,7 @@ Here is a list of all class members with links to the classes they belong to: : Server
  • ~ucrec() : ucrec
  • ~userrec() : userrec -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_func.html b/docs/module-doc/functions_func.html index 88e17c2e6..b55529db1 100644 --- a/docs/module-doc/functions_func.html +++ b/docs/module-doc/functions_func.html @@ -26,7 +26,7 @@ : userrec
  • AddZLine() : Server
  • Admin() : Admin -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_func_0x62.html b/docs/module-doc/functions_func_0x62.html index 19e45c200..d8fabd11d 100644 --- a/docs/module-doc/functions_func_0x62.html +++ b/docs/module-doc/functions_func_0x62.html @@ -15,7 +15,7 @@
  • BoolSet() : BoolSet
  • BufferIsReady() : userrec -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_func_0x63.html b/docs/module-doc/functions_func_0x63.html index d547274d7..dc64e11e8 100644 --- a/docs/module-doc/functions_func_0x63.html +++ b/docs/module-doc/functions_func_0x63.html @@ -30,8 +30,8 @@ : ConnectClass
  • connection() : connection
  • CountUsers() : Server
  • CreateModule() -: ModuleFactory -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +: ModuleFactory +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_func_0x64.html b/docs/module-doc/functions_func_0x64.html index af6d79643..74e2d3955 100644 --- a/docs/module-doc/functions_func_0x64.html +++ b/docs/module-doc/functions_func_0x64.html @@ -36,7 +36,7 @@ : DNS
  • dns_ntoa4_s() : DNS
  • DumpErrors() : ConfigReader -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_func_0x65.html b/docs/module-doc/functions_func_0x65.html index 121adfbae..c5ee4b0ec 100644 --- a/docs/module-doc/functions_func_0x65.html +++ b/docs/module-doc/functions_func_0x65.html @@ -20,7 +20,7 @@ : FileReader
  • Extend() : Extensible
  • ExtMode() : ExtMode -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_func_0x66.html b/docs/module-doc/functions_func_0x66.html index 36983c5b4..510742533 100644 --- a/docs/module-doc/functions_func_0x66.html +++ b/docs/module-doc/functions_func_0x66.html @@ -22,7 +22,7 @@ : Server
  • FlushWriteBuf() : userrec
  • ForwardLookup() : DNS -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_func_0x67.html b/docs/module-doc/functions_func_0x67.html index de898f1e8..5d267f5a7 100644 --- a/docs/module-doc/functions_func_0x67.html +++ b/docs/module-doc/functions_func_0x67.html @@ -20,15 +20,18 @@ : Request
  • GetError() : ConfigReader
  • GetEventID() : Event
  • GetExt() -: Extensible
  • GetFD() +: Extensible
  • GetExtList() +: Extensible
  • GetFD() : DNS
  • GetFullHost() : userrec
  • GetFullRealHost() : userrec
  • GetInviteList() -: userrec
  • GetLine() +: userrec
  • GetIP() +: InspSocket
  • GetLine() : FileReader
  • GetModeParameter() : chanrec
  • GetNetworkName() : Server
  • GetResult() -: DNS
  • GetServerDescription() +: DNS
  • GetResultIP() +: DNS
  • GetServerDescription() : Server
  • GetServerName() : Server
  • GetSource() : Event, Request
  • GetState() @@ -37,7 +40,7 @@ : Server, chanrec
  • GetVersion() : Module
  • GetWriteError() : userrec -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_func_0x68.html b/docs/module-doc/functions_func_0x68.html index 3565777cb..e0e409921 100644 --- a/docs/module-doc/functions_func_0x68.html +++ b/docs/module-doc/functions_func_0x68.html @@ -16,7 +16,7 @@ : userrec
  • HasResult() : DNS
  • HostItem() : HostItem -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_func_0x69.html b/docs/module-doc/functions_func_0x69.html index 5b8edf709..9e93b7aff 100644 --- a/docs/module-doc/functions_func_0x69.html +++ b/docs/module-doc/functions_func_0x69.html @@ -21,8 +21,9 @@ : Server
  • IsOnChannel() : Server
  • IsUlined() : Server
  • IsValidMask() -: Server -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +: Server
  • IsValidModuleCommand() +: Server +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_func_0x6a.html b/docs/module-doc/functions_func_0x6a.html index c49dde6f6..757b8cb26 100644 --- a/docs/module-doc/functions_func_0x6a.html +++ b/docs/module-doc/functions_func_0x6a.html @@ -14,7 +14,7 @@

    - j -

    -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_func_0x6c.html b/docs/module-doc/functions_func_0x6c.html index 7ac05c2f0..7e3280d0d 100644 --- a/docs/module-doc/functions_func_0x6c.html +++ b/docs/module-doc/functions_func_0x6c.html @@ -16,7 +16,7 @@ : FileReader
  • Log() : Server
  • lt() : irc::irc_char_traits -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_func_0x6d.html b/docs/module-doc/functions_func_0x6d.html index f40bb565c..0e37cd85f 100644 --- a/docs/module-doc/functions_func_0x6d.html +++ b/docs/module-doc/functions_func_0x6d.html @@ -14,9 +14,9 @@

    - m -

    -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_func_0x6e.html b/docs/module-doc/functions_func_0x6e.html index 197fe5030..3ed36337b 100644 --- a/docs/module-doc/functions_func_0x6e.html +++ b/docs/module-doc/functions_func_0x6e.html @@ -14,7 +14,7 @@

    - n -

    -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_func_0x6f.html b/docs/module-doc/functions_func_0x6f.html index 630c59b4f..e6578ed59 100644 --- a/docs/module-doc/functions_func_0x6f.html +++ b/docs/module-doc/functions_func_0x6f.html @@ -15,52 +15,74 @@
  • On005Numeric() : Module
  • OnAccessCheck() : Module
  • OnAddBan() -: Module
  • OnBackgroundTimer() -: Module
  • OnChangeLocalUserGECOS() +: Module
  • OnAddELine() +: Module
  • OnAddGLine() +: Module
  • OnAddKLine() +: Module
  • OnAddQLine() +: Module
  • OnAddZLine() +: Module
  • OnBackgroundTimer() +: Module
  • OnChangeHost() +: Module
  • OnChangeLocalUserGECOS() : Module
  • OnChangeLocalUserHost() -: Module
  • OnChannelSync() -: Module
  • OnCheckBan() +: Module
  • OnChangeName() +: Module
  • OnCheckBan() : Module
  • OnCheckInvite() : Module
  • OnCheckKey() : Module
  • OnCheckLimit() : Module
  • OnCheckReady() -: Module
  • OnClose() +: Module
  • OnCleanup() +: Module
  • OnClose() : InspSocket
  • OnConnected() : InspSocket
  • OnDataReady() -: InspSocket
  • OnDelBan() -: Module
  • OnDisconnect() +: InspSocket
  • OnDecodeMetaData() +: Module
  • OnDelBan() +: Module
  • OnDelELine() +: Module
  • OnDelGLine() +: Module
  • OnDelKLine() +: Module
  • OnDelQLine() +: Module
  • OnDelZLine() +: Module
  • OnDisconnect() : InspSocket
  • OnError() : InspSocket
  • OnEvent() : Module
  • OnExtendedMode() -: Module
  • OnGlobalConnect() +: Module
  • OnGetServerDescription() +: Module
  • OnGlobalConnect() : Module
  • OnGlobalOper() : Module
  • OnIncomingConnection() : InspSocket
  • OnInfo() : Module
  • OnKill() : Module
  • OnLoadModule() : Module
  • OnLocalTopicChange() -: Module
  • OnOper() -: Module
  • OnOperCompare() -: Module
  • OnPacketReceive() -: Module
  • OnPacketTransmit() -: Module
  • OnPreCommand() +: Module
  • OnMode() +: Module
  • OnOper() +: Module
  • OnOperCompare() +: Module
  • OnPostLocalTopicChange() +: Module
  • OnPreCommand() : Module
  • OnRawMode() : Module
  • OnRawSocketAccept() : Module
  • OnRawSocketClose() : Module
  • OnRawSocketRead() : Module
  • OnRawSocketWrite() : Module
  • OnRehash() -: Module
  • OnRequest() +: Module
  • OnRemoteKill() +: Module
  • OnRequest() : Module
  • OnSendList() : Module
  • OnServerRaw() : Module
  • OnStats() -: Module
  • OnTimeout() +: Module
  • OnSyncChannel() +: Module
  • OnSyncChannelMetaData() +: Module
  • OnSyncUser() +: Module
  • OnSyncUserMetaData() +: Module
  • OnTimeout() : InspSocket
  • OnUnloadModule() : Module
  • OnUserConnect() : Module
  • OnUserDisconnect() -: Module
  • OnUserJoin() +: Module
  • OnUserInvite() +: Module
  • OnUserJoin() : Module
  • OnUserKick() -: Module
  • OnUserPart() +: Module
  • OnUserMessage() +: Module
  • OnUserNotice() +: Module
  • OnUserPart() : Module
  • OnUserPostNick() : Module
  • OnUserPreInvite() : Module
  • OnUserPreJoin() @@ -69,16 +91,16 @@ : Module
  • OnUserPreNick() : Module
  • OnUserPreNotice() : Module
  • OnUserQuit() -: Module
  • OnUserRegister() -: Module
  • OnUserSync() -: Module
  • OnWhois() +: Module
  • OnUserRegister() +: Module
  • OnWallops() +: Module
  • OnWhois() : Module
  • operator &() : BoolSet
  • operator()() : irc::InAddr_HashComp, irc::StrHashComp, nspace::hash< string >, nspace::hash< in_addr >
  • operator=() : BoolSet
  • operator==() : BoolSet
  • operator|() : BoolSet -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_func_0x70.html b/docs/module-doc/functions_func_0x70.html index aaaea6e6b..bb1445439 100644 --- a/docs/module-doc/functions_func_0x70.html +++ b/docs/module-doc/functions_func_0x70.html @@ -14,9 +14,11 @@

    - p -

    -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_func_0x71.html b/docs/module-doc/functions_func_0x71.html index 474f5cd1b..d56b67c39 100644 --- a/docs/module-doc/functions_func_0x71.html +++ b/docs/module-doc/functions_func_0x71.html @@ -14,7 +14,7 @@

    - q -

    -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_func_0x72.html b/docs/module-doc/functions_func_0x72.html index 2ae4d4f6e..f7aa962f5 100644 --- a/docs/module-doc/functions_func_0x72.html +++ b/docs/module-doc/functions_func_0x72.html @@ -17,11 +17,12 @@ : userrec
  • ReadFlag() : ConfigReader
  • ReadInteger() : ConfigReader
  • ReadValue() -: ConfigReader
  • RemoveInvite() +: ConfigReader
  • RehashServer() +: Server
  • RemoveInvite() : userrec
  • Request() : Request
  • ReverseLookup() : DNS -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_func_0x73.html b/docs/module-doc/functions_func_0x73.html index 69f1e7fe9..49bc58b11 100644 --- a/docs/module-doc/functions_func_0x73.html +++ b/docs/module-doc/functions_func_0x73.html @@ -32,7 +32,7 @@ : InspSocket
  • SetWriteError() : userrec
  • Shrink() : Extensible -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_func_0x75.html b/docs/module-doc/functions_func_0x75.html index d61b10e31..b1361ba6b 100644 --- a/docs/module-doc/functions_func_0x75.html +++ b/docs/module-doc/functions_func_0x75.html @@ -17,7 +17,7 @@ : BoolSet
  • userrec() : userrec
  • UserToPseudo() : Server -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_func_0x76.html b/docs/module-doc/functions_func_0x76.html index b427c35b2..aa027ef44 100644 --- a/docs/module-doc/functions_func_0x76.html +++ b/docs/module-doc/functions_func_0x76.html @@ -15,7 +15,7 @@
  • Verify() : ConfigReader
  • Version() : Version -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_func_0x77.html b/docs/module-doc/functions_func_0x77.html index 56f4c17de..3676cdc03 100644 --- a/docs/module-doc/functions_func_0x77.html +++ b/docs/module-doc/functions_func_0x77.html @@ -14,7 +14,7 @@

    - w -

    -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_func_0x7e.html b/docs/module-doc/functions_func_0x7e.html index 78afe00e9..622a97666 100644 --- a/docs/module-doc/functions_func_0x7e.html +++ b/docs/module-doc/functions_func_0x7e.html @@ -26,7 +26,7 @@ : Server
  • ~ucrec() : ucrec
  • ~userrec() : userrec -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/functions_vars.html b/docs/module-doc/functions_vars.html index e3cde11f2..b21c7c3fc 100644 --- a/docs/module-doc/functions_vars.html +++ b/docs/module-doc/functions_vars.html @@ -53,7 +53,7 @@

    - f -

    - i -

    @@ -84,7 +85,8 @@ : InspSocket
  • limit : chanrec
  • lines_in : userrec
  • list -: ExtMode +: ExtMode
  • localbuf +: DNS

    - m -

    +: userrec
  • myfd +: DNS

    - n -

    • n_matches : XLine
    • name @@ -156,7 +159,7 @@

      - w -

      -
      Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
      Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
      diff --git a/docs/module-doc/globals.html b/docs/module-doc/globals.html index 631ba7f5e..63da0dd55 100644 --- a/docs/module-doc/globals.html +++ b/docs/module-doc/globals.html @@ -37,7 +37,7 @@ Here is a list of all file members with links to the files they belong to: : modules.cpp, channels.cpp
    • allowed_umode() : mode.h
    • apply_lines() : xline.h
    -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_0x62.html b/docs/module-doc/globals_0x62.html index c57abb546..a01f0ba9a 100644 --- a/docs/module-doc/globals_0x62.html +++ b/docs/module-doc/globals_0x62.html @@ -16,7 +16,7 @@ Here is a list of all file members with links to the files they belong to: : channels.h
  • Blocking() : message.h
  • boundPortCount : socket.cpp, modules.cpp, channels.cpp -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_0x63.html b/docs/module-doc/globals_0x63.html index 33492944f..0f45a335a 100644 --- a/docs/module-doc/globals_0x63.html +++ b/docs/module-doc/globals_0x63.html @@ -44,7 +44,7 @@ Here is a list of all file members with links to the files they belong to: : modules.h
  • cstatus() : message.h
  • custom_mode_params : channels.cpp -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_0x64.html b/docs/module-doc/globals_0x64.html index a0abb5768..5a7f2ed96 100644 --- a/docs/module-doc/globals_0x64.html +++ b/docs/module-doc/globals_0x64.html @@ -23,10 +23,11 @@ Here is a list of all file members with links to the files they belong to: : xline.h
  • DieDelay : modules.cpp, channels.cpp
  • diepass : modules.cpp, channels.cpp
  • DieValue -: modules.cpp, channels.cpp
  • DoAddExtendedMode() +: modules.cpp, channels.cpp
  • do_whois() +: commands.h
  • DoAddExtendedMode() : modules.cpp
  • duration() : commands.h -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_0x65.html b/docs/module-doc/globals_0x65.html index 40bb97edf..2f995ffa1 100644 --- a/docs/module-doc/globals_0x65.html +++ b/docs/module-doc/globals_0x65.html @@ -12,13 +12,14 @@ Here is a list of all file members with links to the files they belong to:

    - e -

    -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_0x66.html b/docs/module-doc/globals_0x66.html index a1dfbb62f..eac6148da 100644 --- a/docs/module-doc/globals_0x66.html +++ b/docs/module-doc/globals_0x66.html @@ -19,7 +19,7 @@ Here is a list of all file members with links to the files they belong to: : modules.h
  • FOREACH_MOD : modules.h
  • FOREACH_RESULT : modules.h -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_0x67.html b/docs/module-doc/globals_0x67.html index 4a00d5018..aa017cc5b 100644 --- a/docs/module-doc/globals_0x67.html +++ b/docs/module-doc/globals_0x67.html @@ -17,7 +17,7 @@ Here is a list of all file members with links to the files they belong to: : mode.h
  • give_voice() : mode.h
  • gline_set_creation_time() : xline.h -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_0x68.html b/docs/module-doc/globals_0x68.html index ccd41a737..0e6638fcf 100644 --- a/docs/module-doc/globals_0x68.html +++ b/docs/module-doc/globals_0x68.html @@ -67,7 +67,7 @@ Here is a list of all file members with links to the files they belong to: : commands.h
  • has_channel() : message.h
  • hasumode() : message.h -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_0x69.html b/docs/module-doc/globals_0x69.html index 37b3d6b09..213276dfc 100644 --- a/docs/module-doc/globals_0x69.html +++ b/docs/module-doc/globals_0x69.html @@ -32,7 +32,7 @@ Here is a list of all file members with links to the files they belong to: : commands.h
  • isident() : message.h
  • isnick() : message.h -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_0x6c.html b/docs/module-doc/globals_0x6c.html index 858c1e9cc..a259a082d 100644 --- a/docs/module-doc/globals_0x6c.html +++ b/docs/module-doc/globals_0x6c.html @@ -16,7 +16,7 @@ Here is a list of all file members with links to the files they belong to: : modules.cpp, channels.cpp
  • log_file : socket.cpp, modules.cpp, channels.cpp
  • LogLevel : modules.cpp, channels.cpp -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_0x6d.html b/docs/module-doc/globals_0x6d.html index 9434213aa..60f02466a 100644 --- a/docs/module-doc/globals_0x6d.html +++ b/docs/module-doc/globals_0x6d.html @@ -31,13 +31,13 @@ Here is a list of all file members with links to the files they belong to: : modules.cpp
  • module_names : modules.cpp, channels.cpp
  • module_sockets : modules.cpp
  • modules -: modules.cpp, channels.cpp
  • motd -: modules.cpp, channels.cpp
  • MOTD -: modules.cpp
  • MT_CHANNEL +: modules.cpp, channels.cpp
  • MOTD +: modules.cpp
  • motd +: modules.cpp, channels.cpp
  • MT_CHANNEL : modules.h
  • MT_CLIENT : modules.h
  • MT_SERVER : modules.h -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_0x6e.html b/docs/module-doc/globals_0x6e.html index aa4f67ff8..094bf1732 100644 --- a/docs/module-doc/globals_0x6e.html +++ b/docs/module-doc/globals_0x6e.html @@ -19,7 +19,7 @@ Here is a list of all file members with links to the files they belong to: : message.h
  • NONE : modules.h
  • nspace : hashcomp.h, channels.cpp -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_0x6f.html b/docs/module-doc/globals_0x6f.html index d450c3ce9..8ba3b7b56 100644 --- a/docs/module-doc/globals_0x6f.html +++ b/docs/module-doc/globals_0x6f.html @@ -14,7 +14,7 @@ Here is a list of all file members with links to the files they belong to:

    - o -

    -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_0x70.html b/docs/module-doc/globals_0x70.html index 2f656d73e..9e3cf8967 100644 --- a/docs/module-doc/globals_0x70.html +++ b/docs/module-doc/globals_0x70.html @@ -18,7 +18,7 @@ Here is a list of all file members with links to the files they belong to: : modules.cpp, channels.cpp
  • process_modes() : mode.h
  • process_module_umode() : mode.h -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_0x71.html b/docs/module-doc/globals_0x71.html index fc28db687..cda2f0a00 100644 --- a/docs/module-doc/globals_0x71.html +++ b/docs/module-doc/globals_0x71.html @@ -15,7 +15,7 @@ Here is a list of all file members with links to the files they belong to:
  • qline_make_global() : xline.h
  • qline_set_creation_time() : xline.h -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_0x72.html b/docs/module-doc/globals_0x72.html index 84db1d420..196ecf33e 100644 --- a/docs/module-doc/globals_0x72.html +++ b/docs/module-doc/globals_0x72.html @@ -17,7 +17,7 @@ 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 -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_0x73.html b/docs/module-doc/globals_0x73.html index 2617e4d18..c43408e02 100644 --- a/docs/module-doc/globals_0x73.html +++ b/docs/module-doc/globals_0x73.html @@ -30,7 +30,7 @@ Here is a list of all file members with links to the files they belong to: : users.h
  • string : hashcomp.h
  • string_list : modules.h -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_0x74.html b/docs/module-doc/globals_0x74.html index 000121a3d..dddfb058a 100644 --- a/docs/module-doc/globals_0x74.html +++ b/docs/module-doc/globals_0x74.html @@ -20,7 +20,7 @@ Here is a list of all file members with links to the files they belong to: : message.h
  • tidystring() : message.h
  • TIME : users.cpp, socket.cpp, modules.cpp, channels.cpp -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_0x75.html b/docs/module-doc/globals_0x75.html index 2aabe539a..b2f9bfae4 100644 --- a/docs/module-doc/globals_0x75.html +++ b/docs/module-doc/globals_0x75.html @@ -20,7 +20,7 @@ Here is a list of all file members with links to the files they belong to: : channels.h
  • unlimitcore : socket.cpp
  • user_hash : modules.cpp -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_0x76.html b/docs/module-doc/globals_0x76.html index f4a101507..580b1ef40 100644 --- a/docs/module-doc/globals_0x76.html +++ b/docs/module-doc/globals_0x76.html @@ -19,7 +19,7 @@ Here is a list of all file members with links to the files they belong to: : modules.h
  • VF_VENDOR : modules.h
  • VoidPointer : base.h -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_0x77.html b/docs/module-doc/globals_0x77.html index fbb81cb57..f15932bee 100644 --- a/docs/module-doc/globals_0x77.html +++ b/docs/module-doc/globals_0x77.html @@ -17,7 +17,7 @@ Here is a list of all file members with links to the files they belong to: : modules.cpp
  • WHOWAS_MAX : modules.cpp, channels.cpp
  • WHOWAS_STALE : modules.cpp, channels.cpp -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_0x7a.html b/docs/module-doc/globals_0x7a.html index 8876f165f..d3327bae9 100644 --- a/docs/module-doc/globals_0x7a.html +++ b/docs/module-doc/globals_0x7a.html @@ -15,7 +15,7 @@ Here is a list of all file members with links to the files they belong to:
  • zline_make_global() : xline.h
  • zline_set_creation_time() : xline.h -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_defs.html b/docs/module-doc/globals_defs.html index b155d0221..1cbfd8d96 100644 --- a/docs/module-doc/globals_defs.html +++ b/docs/module-doc/globals_defs.html @@ -78,7 +78,7 @@ : modules.h
  • VF_STATIC : modules.h
  • VF_VENDOR : modules.h -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:14 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_enum.html b/docs/module-doc/globals_enum.html index da898985a..ca4f96501 100644 --- a/docs/module-doc/globals_enum.html +++ b/docs/module-doc/globals_enum.html @@ -12,7 +12,7 @@
  • InspSocketError : socket.h
  • InspSocketState : socket.h -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:14 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_eval.html b/docs/module-doc/globals_eval.html index e8080ff9f..e5d0fd9fc 100644 --- a/docs/module-doc/globals_eval.html +++ b/docs/module-doc/globals_eval.html @@ -19,7 +19,7 @@ : socket.h
  • I_ERROR : socket.h
  • I_LISTENING : socket.h -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:14 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_func.html b/docs/module-doc/globals_func.html index df42b69fa..f34aad449 100644 --- a/docs/module-doc/globals_func.html +++ b/docs/module-doc/globals_func.html @@ -42,11 +42,13 @@ : xline.h
  • del_kline() : xline.h
  • del_qline() : xline.h
  • del_zline() -: xline.h
  • DoAddExtendedMode() +: xline.h
  • do_whois() +: commands.h
  • DoAddExtendedMode() : modules.cpp
  • duration() : commands.h

    - e -

      -
    • expire_lines() +
    • eline_set_creation_time() +: xline.h
    • expire_lines() : xline.h

    - f -

    • factory() @@ -169,7 +171,7 @@
    • zline_make_global() : xline.h
    • zline_set_creation_time() : xline.h
    -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_type.html b/docs/module-doc/globals_type.html index f1f712149..fd641a338 100644 --- a/docs/module-doc/globals_type.html +++ b/docs/module-doc/globals_type.html @@ -28,7 +28,7 @@ : modules.cpp
  • VoidPointer : base.h
  • whowas_hash : modules.cpp -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:14 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/globals_vars.html b/docs/module-doc/globals_vars.html index 6bf40a4ac..c77031009 100644 --- a/docs/module-doc/globals_vars.html +++ b/docs/module-doc/globals_vars.html @@ -55,9 +55,9 @@ : modules.cpp, channels.cpp
  • module_names : modules.cpp, channels.cpp
  • module_sockets : modules.cpp
  • modules -: modules.cpp, channels.cpp
  • motd -: modules.cpp, channels.cpp
  • MOTD -: modules.cpp +: modules.cpp, channels.cpp
  • MOTD +: modules.cpp
  • motd +: modules.cpp, channels.cpp

    - n -

    -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/graph_legend.html b/docs/module-doc/graph_legend.html index 90c2454ce..36e33a761 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 Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:14 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/hashcomp_8h-source.html b/docs/module-doc/hashcomp_8h-source.html index d93e2359d..100557245 100644 --- a/docs/module-doc/hashcomp_8h-source.html +++ b/docs/module-doc/hashcomp_8h-source.html @@ -109,7 +109,7 @@ 00130 } 00131 00132 #endif -

    Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +

    Generated on Fri Dec 9 20:20:03 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/hashcomp_8h.html b/docs/module-doc/hashcomp_8h.html index 094ec14a6..b082ee153 100644 --- a/docs/module-doc/hashcomp_8h.html +++ b/docs/module-doc/hashcomp_8h.html @@ -77,7 +77,7 @@ This graph shows which files directly or indirectly include this file:

    44 of file hashcomp.h. -
    Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:07 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/hierarchy.html b/docs/module-doc/hierarchy.html index 6b1822b2c..23791af5a 100644 --- a/docs/module-doc/hierarchy.html +++ b/docs/module-doc/hierarchy.html @@ -65,7 +65,7 @@ This inheritance list is sorted roughly, but not completely, alphabetically: -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/inherits.html b/docs/module-doc/inherits.html index 67a43a23d..9105b0e91 100644 --- a/docs/module-doc/inherits.html +++ b/docs/module-doc/inherits.html @@ -84,7 +84,7 @@ -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:14 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/main.html b/docs/module-doc/main.html index fd5a79646..8d70ff3d3 100644 --- a/docs/module-doc/main.html +++ b/docs/module-doc/main.html @@ -7,7 +7,7 @@

    InspIRCd Documentation

    -

    1.0Betareleases


    Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +

    1.0Betareleases


    Generated on Fri Dec 9 20:20:03 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/message_8h-source.html b/docs/module-doc/message_8h-source.html index 7d56671ff..6b3c2388a 100644 --- a/docs/module-doc/message_8h-source.html +++ b/docs/module-doc/message_8h-source.html @@ -57,7 +57,7 @@ 00048 void send_network_quit(const char* nick, const char* reason); 00049 00050 #endif -

    Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +

    Generated on Fri Dec 9 20:20:03 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/message_8h.html b/docs/module-doc/message_8h.html index baa3188b9..35a98df68 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().

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

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

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

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

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

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

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

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

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

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

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


    Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:07 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/message_8h__incl.md5 b/docs/module-doc/message_8h__incl.md5 index 2224be875..724dbb712 100644 --- a/docs/module-doc/message_8h__incl.md5 +++ b/docs/module-doc/message_8h__incl.md5 @@ -1 +1 @@ -7aeb3a1884c55b8e203a25501370a382 \ No newline at end of file +3a2c4208881b372cdcae2d492b4dfb49 \ No newline at end of file diff --git a/docs/module-doc/mode_8h-source.html b/docs/module-doc/mode_8h-source.html index 2d980d16b..85a8d6468 100644 --- a/docs/module-doc/mode_8h-source.html +++ b/docs/module-doc/mode_8h-source.html @@ -55,7 +55,7 @@ 00046 00047 00048 #endif -

    Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +

    Generated on Fri Dec 9 20:20:03 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/mode_8h.html b/docs/module-doc/mode_8h.html index 5d453ab00..26c2b6592 100644 --- a/docs/module-doc/mode_8h.html +++ b/docs/module-doc/mode_8h.html @@ -593,7 +593,7 @@ This graph shows which files directly or indirectly include this file:

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

    @@ -792,7 +792,7 @@ Referenced by Server::SendM -


    Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:08 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/mode_8h__incl.md5 b/docs/module-doc/mode_8h__incl.md5 index a5d5a9523..6d7d31d18 100644 --- a/docs/module-doc/mode_8h__incl.md5 +++ b/docs/module-doc/mode_8h__incl.md5 @@ -1 +1 @@ -e60a56359f355b23ad1b5e5f66fd3fe7 \ No newline at end of file +3d060c191165c8107d912ed1383b6923 \ No newline at end of file diff --git a/docs/module-doc/modules_8cpp-source.html b/docs/module-doc/modules_8cpp-source.html index bfedc2754..9298996f8 100644 --- a/docs/module-doc/modules_8cpp-source.html +++ b/docs/module-doc/modules_8cpp-source.html @@ -117,7 +117,7 @@ 00108 00109 extern int ports[MAXSOCKS]; 00110 -00111 +00111 class Server; 00112 00113 extern std::stringstream config_f; 00114 @@ -312,31 +312,31 @@ 00303 00304 00305 // These declarations define the behavours of the base class Module (which does nothing at all) -00306 Module::Module() { } -00307 Module::~Module() { } -00308 void Module::OnUserConnect(userrec* user) { } -00309 void Module::OnUserQuit(userrec* user) { } -00310 void Module::OnUserDisconnect(userrec* user) { } -00311 void Module::OnUserJoin(userrec* user, chanrec* channel) { } -00312 void Module::OnUserPart(userrec* user, chanrec* channel) { } -00313 void Module::OnPacketTransmit(std::string &data, std::string serv) { } -00314 void Module::OnPacketReceive(std::string &data, std::string serv) { } -00315 void Module::OnRehash() { } -00316 void Module::OnServerRaw(std::string &raw, bool inbound, userrec* user) { } -00317 int Module::OnUserPreJoin(userrec* user, chanrec* chan, const char* cname) { return 0; } -00318 int Module::OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params) { return false; } -00319 Version Module::GetVersion() { return Version(1,0,0,0,VF_VENDOR); } -00320 void Module::OnOper(userrec* user) { }; -00321 void Module::OnInfo(userrec* user) { }; -00322 void Module::OnWhois(userrec* source, userrec* dest) { }; -00323 int Module::OnUserPreInvite(userrec* source,userrec* dest,chanrec* channel) { return 0; }; -00324 int Module::OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text) { return 0; }; -00325 int Module::OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text) { return 0; }; -00326 int Module::OnUserPreNick(userrec* user, std::string newnick) { return 0; }; -00327 void Module::OnUserPostNick(userrec* user, std::string oldnick) { }; -00328 int Module::OnAccessCheck(userrec* source,userrec* dest,chanrec* channel,int access_type) { return ACR_DEFAULT; }; -00329 string_list Module::OnUserSync(userrec* user) { string_list empty; return empty; } -00330 string_list Module::OnChannelSync(chanrec* chan) { string_list empty; return empty; } +00306 +00307 Module::Module(Server* Me) { } +00308 Module::~Module() { } +00309 void Module::OnUserConnect(userrec* user) { } +00310 void Module::OnUserQuit(userrec* user, std::string message) { } +00311 void Module::OnUserDisconnect(userrec* user) { } +00312 void Module::OnUserJoin(userrec* user, chanrec* channel) { } +00313 void Module::OnUserPart(userrec* user, chanrec* channel) { } +00314 void Module::OnPacketTransmit(std::string &data, std::string serv) { } +00315 void Module::OnPacketReceive(std::string &data, std::string serv) { } +00316 void Module::OnRehash(std::string parameter) { } +00317 void Module::OnServerRaw(std::string &raw, bool inbound, userrec* user) { } +00318 int Module::OnUserPreJoin(userrec* user, chanrec* chan, const char* cname) { return 0; } +00319 int Module::OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params) { return false; } +00320 void Module::OnMode(userrec* user, void* dest, int target_type, std::string text) { }; +00321 Version Module::GetVersion() { return Version(1,0,0,0,VF_VENDOR); } +00322 void Module::OnOper(userrec* user, std::string opertype) { }; +00323 void Module::OnInfo(userrec* user) { }; +00324 void Module::OnWhois(userrec* source, userrec* dest) { }; +00325 int Module::OnUserPreInvite(userrec* source,userrec* dest,chanrec* channel) { return 0; }; +00326 int Module::OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text) { return 0; }; +00327 int Module::OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text) { return 0; }; +00328 int Module::OnUserPreNick(userrec* user, std::string newnick) { return 0; }; +00329 void Module::OnUserPostNick(userrec* user, std::string oldnick) { }; +00330 int Module::OnAccessCheck(userrec* source,userrec* dest,chanrec* channel,int access_type) { return ACR_DEFAULT; }; 00331 void Module::On005Numeric(std::string &output) { }; 00332 int Module::OnKill(userrec* source, userrec* dest, std::string reason) { return 0; }; 00333 void Module::OnLoadModule(Module* mod,std::string name) { }; @@ -368,642 +368,680 @@ 00359 int Module::OnRawSocketWrite(int fd, char* buffer, int count) { return 0; }; 00360 void Module::OnRawSocketClose(int fd) { }; 00361 int Module::OnRawSocketRead(int fd, char* buffer, unsigned int count, int &readresult) { return 0; }; -00362 -00363 // server is a wrapper class that provides methods to all of the C-style -00364 // exports in the core -00365 // -00366 -00367 Server::Server() -00368 { -00369 } -00370 -00371 Server::~Server() -00372 { -00373 } -00374 -00375 void Server::AddSocket(InspSocket* sock) -00376 { -00377 module_sockets.push_back(sock); -00378 } -00379 -00380 void Server::DelSocket(InspSocket* sock) -00381 { -00382 for (std::vector<InspSocket*>::iterator a = module_sockets.begin(); a < module_sockets.end(); a++) -00383 { -00384 if (*a == sock) -00385 { -00386 module_sockets.erase(a); -00387 return; -00388 } -00389 } -00390 } -00391 -00392 void Server::SendOpers(std::string s) -00393 { -00394 WriteOpers("%s",s.c_str()); -00395 } -00396 -00397 bool Server::MatchText(std::string sliteral, std::string spattern) -00398 { -00399 char literal[MAXBUF],pattern[MAXBUF]; -00400 strlcpy(literal,sliteral.c_str(),MAXBUF); -00401 strlcpy(pattern,spattern.c_str(),MAXBUF); -00402 return match(literal,pattern); -00403 } -00404 -00405 void Server::SendToModeMask(std::string modes, int flags, std::string text) -00406 { -00407 WriteMode(modes.c_str(),flags,"%s",text.c_str()); -00408 } -00409 -00410 chanrec* Server::JoinUserToChannel(userrec* user, std::string cname, std::string key) -00411 { -00412 return add_channel(user,cname.c_str(),key.c_str(),false); -00413 } -00414 -00415 chanrec* Server::PartUserFromChannel(userrec* user, std::string cname, std::string reason) -00416 { -00417 return del_channel(user,cname.c_str(),reason.c_str(),false); -00418 } -00419 -00420 chanuserlist Server::GetUsers(chanrec* chan) -00421 { -00422 chanuserlist userl; -00423 userl.clear(); -00424 std::vector<char*> *list = chan->GetUsers(); -00425 for (std::vector<char*>::iterator i = list->begin(); i != list->end(); i++) -00426 { -00427 char* o = *i; -00428 userl.push_back((userrec*)o); -00429 } -00430 return userl; -00431 } -00432 void Server::ChangeUserNick(userrec* user, std::string nickname) -00433 { -00434 force_nickchange(user,nickname.c_str()); -00435 } -00436 -00437 void Server::QuitUser(userrec* user, std::string reason) -00438 { -00439 kill_link(user,reason.c_str()); -00440 } -00441 -00442 bool Server::IsUlined(std::string server) -00443 { -00444 return is_uline(server.c_str()); -00445 } -00446 -00447 void Server::CallCommandHandler(std::string commandname, char** parameters, int pcnt, userrec* user) -00448 { -00449 call_handler(commandname.c_str(),parameters,pcnt,user); -00450 } -00451 -00452 void Server::Log(int level, std::string s) -00453 { -00454 log(level,"%s",s.c_str()); -00455 } -00456 -00457 void Server::AddCommand(char* cmd, handlerfunc f, char flags, int minparams, char* source) -00458 { -00459 createcommand(cmd,f,flags,minparams,source); -00460 } -00461 -00462 void Server::SendMode(char **parameters, int pcnt, userrec *user) -00463 { -00464 server_mode(parameters,pcnt,user); -00465 } -00466 -00467 void Server::Send(int Socket, std::string s) -00468 { -00469 Write(Socket,"%s",s.c_str()); -00470 } -00471 -00472 void Server::SendServ(int Socket, std::string s) -00473 { -00474 WriteServ(Socket,"%s",s.c_str()); -00475 } -00476 -00477 void Server::SendFrom(int Socket, userrec* User, std::string s) -00478 { -00479 WriteFrom(Socket,User,"%s",s.c_str()); -00480 } -00481 -00482 void Server::SendTo(userrec* Source, userrec* Dest, std::string s) -00483 { -00484 if (!Source) -00485 { -00486 // if source is NULL, then the message originates from the local server -00487 Write(Dest->fd,":%s %s",this->GetServerName().c_str(),s.c_str()); -00488 } -00489 else -00490 { -00491 // otherwise it comes from the user specified -00492 WriteTo(Source,Dest,"%s",s.c_str()); -00493 } -00494 } -00495 -00496 void Server::SendChannelServerNotice(std::string ServName, chanrec* Channel, std::string text) -00497 { -00498 WriteChannelWithServ((char*)ServName.c_str(), Channel, "%s", text.c_str()); -00499 } -00500 -00501 void Server::SendChannel(userrec* User, chanrec* Channel, std::string s,bool IncludeSender) -00502 { -00503 if (IncludeSender) -00504 { -00505 WriteChannel(Channel,User,"%s",s.c_str()); -00506 } -00507 else -00508 { -00509 ChanExceptSender(Channel,User,"%s",s.c_str()); -00510 } -00511 } -00512 -00513 bool Server::CommonChannels(userrec* u1, userrec* u2) -00514 { -00515 return (common_channels(u1,u2) != 0); -00516 } -00517 -00518 void Server::SendCommon(userrec* User, std::string text,bool IncludeSender) -00519 { -00520 if (IncludeSender) -00521 { -00522 WriteCommon(User,"%s",text.c_str()); -00523 } -00524 else -00525 { -00526 WriteCommonExcept(User,"%s",text.c_str()); -00527 } -00528 } -00529 -00530 void Server::SendWallops(userrec* User, std::string text) -00531 { -00532 WriteWallOps(User,false,"%s",text.c_str()); -00533 } -00534 -00535 void Server::ChangeHost(userrec* user, std::string host) -00536 { -00537 ChangeDisplayedHost(user,host.c_str()); -00538 } -00539 -00540 void Server::ChangeGECOS(userrec* user, std::string gecos) -00541 { -00542 ChangeName(user,gecos.c_str()); -00543 } -00544 -00545 bool Server::IsNick(std::string nick) -00546 { -00547 return (isnick(nick.c_str()) != 0); -00548 } -00549 -00550 userrec* Server::FindNick(std::string nick) -00551 { -00552 return Find(nick); -00553 } -00554 -00555 userrec* Server::FindDescriptor(int socket) -00556 { -00557 return (socket < 65536 ? fd_ref_table[socket] : NULL); -00558 } -00559 -00560 chanrec* Server::FindChannel(std::string channel) -00561 { -00562 return FindChan(channel.c_str()); -00563 } -00564 -00565 std::string Server::ChanMode(userrec* User, chanrec* Chan) -00566 { -00567 return cmode(User,Chan); -00568 } -00569 -00570 bool Server::IsOnChannel(userrec* User, chanrec* Chan) -00571 { -00572 return has_channel(User,Chan); -00573 } -00574 -00575 std::string Server::GetServerName() -00576 { -00577 return getservername(); -00578 } -00579 -00580 std::string Server::GetNetworkName() -00581 { -00582 return getnetworkname(); -00583 } -00584 -00585 std::string Server::GetServerDescription() -00586 { -00587 return getserverdesc(); -00588 } -00589 -00590 Admin Server::GetAdmin() -00591 { -00592 return Admin(getadminname(),getadminemail(),getadminnick()); -00593 } -00594 -00595 -00596 -00597 bool Server::AddExtendedMode(char modechar, int type, bool requires_oper, int params_when_on, int params_when_off) -00598 { -00599 if (((modechar >= 'A') && (modechar <= 'Z')) || ((modechar >= 'a') && (modechar <= 'z'))) -00600 { -00601 if (type == MT_SERVER) -00602 { -00603 log(DEBUG,"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion"); -00604 return false; -00605 } -00606 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT)) -00607 { -00608 log(DEBUG,"*** API ERROR *** Parameters on MT_CLIENT modes are not supported"); -00609 return false; -00610 } -00611 if ((params_when_on>1) || (params_when_off>1)) -00612 { -00613 log(DEBUG,"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported"); -00614 return false; -00615 } -00616 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off); -00617 } -00618 else -00619 { -00620 log(DEBUG,"*** API ERROR *** Muppet modechar detected."); -00621 } -00622 return false; -00623 } -00624 -00625 bool Server::AddExtendedListMode(char modechar) -00626 { -00627 bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1); -00628 if (res) -00629 ModeMakeList(modechar); -00630 return res; +00362 void Module::OnUserMessage(userrec* user, void* dest, int target_type, std::string text) { }; +00363 void Module::OnUserNotice(userrec* user, void* dest, int target_type, std::string text) { }; +00364 void Module::OnRemoteKill(userrec* source, userrec* dest, std::string reason) { }; +00365 void Module::OnUserInvite(userrec* source,userrec* dest,chanrec* channel) { }; +00366 void Module::OnPostLocalTopicChange(userrec* user, chanrec* chan, std::string topic) { }; +00367 void Module::OnGetServerDescription(std::string servername,std::string &description) { }; +00368 void Module::OnSyncUser(userrec* user, Module* proto, void* opaque) { }; +00369 void Module::OnSyncChannel(chanrec* chan, Module* proto, void* opaque) { }; +00370 void Module::ProtoSendMode(void* opaque, int target_type, void* target, std::string modeline) { }; +00371 void Module::OnSyncChannelMetaData(chanrec* chan, Module* proto,void* opaque, std::string extname) { }; +00372 void Module::OnSyncUserMetaData(userrec* user, Module* proto,void* opaque, std::string extname) { }; +00373 void Module::OnDecodeMetaData(int target_type, void* target, std::string extname, std::string extdata) { }; +00374 void Module::ProtoSendMetaData(void* opaque, int target_type, void* target, std::string extname, std::string extdata) { }; +00375 void Module::OnWallops(userrec* user, std::string text) { }; +00376 void Module::OnChangeHost(userrec* user, std::string newhost) { }; +00377 void Module::OnChangeName(userrec* user, std::string gecos) { }; +00378 void Module::OnAddGLine(long duration, userrec* source, std::string reason, std::string hostmask) { }; +00379 void Module::OnAddZLine(long duration, userrec* source, std::string reason, std::string ipmask) { }; +00380 void Module::OnAddKLine(long duration, userrec* source, std::string reason, std::string hostmask) { }; +00381 void Module::OnAddQLine(long duration, userrec* source, std::string reason, std::string nickmask) { }; +00382 void Module::OnAddELine(long duration, userrec* source, std::string reason, std::string hostmask) { }; +00383 void Module::OnDelGLine(userrec* source, std::string hostmask) { }; +00384 void Module::OnDelZLine(userrec* source, std::string ipmask) { }; +00385 void Module::OnDelKLine(userrec* source, std::string hostmask) { }; +00386 void Module::OnDelQLine(userrec* source, std::string nickmask) { }; +00387 void Module::OnDelELine(userrec* source, std::string hostmask) { }; +00388 void Module::OnCleanup(int target_type, void* item) { }; +00389 +00390 /* server is a wrapper class that provides methods to all of the C-style +00391 * exports in the core +00392 */ +00393 +00394 Server::Server() +00395 { +00396 } +00397 +00398 Server::~Server() +00399 { +00400 } +00401 +00402 void Server::AddSocket(InspSocket* sock) +00403 { +00404 module_sockets.push_back(sock); +00405 } +00406 +00407 void Server::RehashServer() +00408 { +00409 WriteOpers("*** Rehashing config file"); +00410 ReadConfig(false,NULL); +00411 } +00412 +00413 void Server::DelSocket(InspSocket* sock) +00414 { +00415 for (std::vector<InspSocket*>::iterator a = module_sockets.begin(); a < module_sockets.end(); a++) +00416 { +00417 if (*a == sock) +00418 { +00419 module_sockets.erase(a); +00420 return; +00421 } +00422 } +00423 } +00424 +00425 void Server::SendOpers(std::string s) +00426 { +00427 WriteOpers("%s",s.c_str()); +00428 } +00429 +00430 bool Server::MatchText(std::string sliteral, std::string spattern) +00431 { +00432 char literal[MAXBUF],pattern[MAXBUF]; +00433 strlcpy(literal,sliteral.c_str(),MAXBUF); +00434 strlcpy(pattern,spattern.c_str(),MAXBUF); +00435 return match(literal,pattern); +00436 } +00437 +00438 void Server::SendToModeMask(std::string modes, int flags, std::string text) +00439 { +00440 WriteMode(modes.c_str(),flags,"%s",text.c_str()); +00441 } +00442 +00443 chanrec* Server::JoinUserToChannel(userrec* user, std::string cname, std::string key) +00444 { +00445 return add_channel(user,cname.c_str(),key.c_str(),false); +00446 } +00447 +00448 chanrec* Server::PartUserFromChannel(userrec* user, std::string cname, std::string reason) +00449 { +00450 return del_channel(user,cname.c_str(),reason.c_str(),false); +00451 } +00452 +00453 chanuserlist Server::GetUsers(chanrec* chan) +00454 { +00455 chanuserlist userl; +00456 userl.clear(); +00457 std::vector<char*> *list = chan->GetUsers(); +00458 for (std::vector<char*>::iterator i = list->begin(); i != list->end(); i++) +00459 { +00460 char* o = *i; +00461 userl.push_back((userrec*)o); +00462 } +00463 return userl; +00464 } +00465 void Server::ChangeUserNick(userrec* user, std::string nickname) +00466 { +00467 force_nickchange(user,nickname.c_str()); +00468 } +00469 +00470 void Server::QuitUser(userrec* user, std::string reason) +00471 { +00472 kill_link(user,reason.c_str()); +00473 } +00474 +00475 bool Server::IsUlined(std::string server) +00476 { +00477 return is_uline(server.c_str()); +00478 } +00479 +00480 void Server::CallCommandHandler(std::string commandname, char** parameters, int pcnt, userrec* user) +00481 { +00482 call_handler(commandname.c_str(),parameters,pcnt,user); +00483 } +00484 +00485 bool Server::IsValidModuleCommand(std::string commandname, int pcnt, userrec* user) +00486 { +00487 return is_valid_cmd(commandname.c_str(), pcnt, user); +00488 } +00489 +00490 void Server::Log(int level, std::string s) +00491 { +00492 log(level,"%s",s.c_str()); +00493 } +00494 +00495 void Server::AddCommand(char* cmd, handlerfunc f, char flags, int minparams, char* source) +00496 { +00497 createcommand(cmd,f,flags,minparams,source); +00498 } +00499 +00500 void Server::SendMode(char **parameters, int pcnt, userrec *user) +00501 { +00502 server_mode(parameters,pcnt,user); +00503 } +00504 +00505 void Server::Send(int Socket, std::string s) +00506 { +00507 Write(Socket,"%s",s.c_str()); +00508 } +00509 +00510 void Server::SendServ(int Socket, std::string s) +00511 { +00512 WriteServ(Socket,"%s",s.c_str()); +00513 } +00514 +00515 void Server::SendFrom(int Socket, userrec* User, std::string s) +00516 { +00517 WriteFrom(Socket,User,"%s",s.c_str()); +00518 } +00519 +00520 void Server::SendTo(userrec* Source, userrec* Dest, std::string s) +00521 { +00522 if (!Source) +00523 { +00524 // if source is NULL, then the message originates from the local server +00525 Write(Dest->fd,":%s %s",this->GetServerName().c_str(),s.c_str()); +00526 } +00527 else +00528 { +00529 // otherwise it comes from the user specified +00530 WriteTo(Source,Dest,"%s",s.c_str()); +00531 } +00532 } +00533 +00534 void Server::SendChannelServerNotice(std::string ServName, chanrec* Channel, std::string text) +00535 { +00536 WriteChannelWithServ((char*)ServName.c_str(), Channel, "%s", text.c_str()); +00537 } +00538 +00539 void Server::SendChannel(userrec* User, chanrec* Channel, std::string s,bool IncludeSender) +00540 { +00541 if (IncludeSender) +00542 { +00543 WriteChannel(Channel,User,"%s",s.c_str()); +00544 } +00545 else +00546 { +00547 ChanExceptSender(Channel,User,"%s",s.c_str()); +00548 } +00549 } +00550 +00551 bool Server::CommonChannels(userrec* u1, userrec* u2) +00552 { +00553 return (common_channels(u1,u2) != 0); +00554 } +00555 +00556 void Server::SendCommon(userrec* User, std::string text,bool IncludeSender) +00557 { +00558 if (IncludeSender) +00559 { +00560 WriteCommon(User,"%s",text.c_str()); +00561 } +00562 else +00563 { +00564 WriteCommonExcept(User,"%s",text.c_str()); +00565 } +00566 } +00567 +00568 void Server::SendWallops(userrec* User, std::string text) +00569 { +00570 WriteWallOps(User,false,"%s",text.c_str()); +00571 } +00572 +00573 void Server::ChangeHost(userrec* user, std::string host) +00574 { +00575 ChangeDisplayedHost(user,host.c_str()); +00576 } +00577 +00578 void Server::ChangeGECOS(userrec* user, std::string gecos) +00579 { +00580 ChangeName(user,gecos.c_str()); +00581 } +00582 +00583 bool Server::IsNick(std::string nick) +00584 { +00585 return (isnick(nick.c_str()) != 0); +00586 } +00587 +00588 userrec* Server::FindNick(std::string nick) +00589 { +00590 return Find(nick); +00591 } +00592 +00593 userrec* Server::FindDescriptor(int socket) +00594 { +00595 return (socket < 65536 ? fd_ref_table[socket] : NULL); +00596 } +00597 +00598 chanrec* Server::FindChannel(std::string channel) +00599 { +00600 return FindChan(channel.c_str()); +00601 } +00602 +00603 std::string Server::ChanMode(userrec* User, chanrec* Chan) +00604 { +00605 return cmode(User,Chan); +00606 } +00607 +00608 bool Server::IsOnChannel(userrec* User, chanrec* Chan) +00609 { +00610 return has_channel(User,Chan); +00611 } +00612 +00613 std::string Server::GetServerName() +00614 { +00615 return getservername(); +00616 } +00617 +00618 std::string Server::GetNetworkName() +00619 { +00620 return getnetworkname(); +00621 } +00622 +00623 std::string Server::GetServerDescription() +00624 { +00625 return getserverdesc(); +00626 } +00627 +00628 Admin Server::GetAdmin() +00629 { +00630 return Admin(getadminname(),getadminemail(),getadminnick()); 00631 } 00632 -00633 int Server::CountUsers(chanrec* c) -00634 { -00635 return usercount(c); -00636 } -00637 -00638 -00639 bool Server::UserToPseudo(userrec* user,std::string message) -00640 { -00641 unsigned int old_fd = user->fd; -00642 user->fd = FD_MAGIC_NUMBER; -00643 user->ClearBuffer(); -00644 Write(old_fd,"ERROR :Closing link (%s@%s) [%s]",user->ident,user->host,message.c_str()); -00645 #ifdef USE_KQUEUE -00646 struct kevent ke; -00647 EV_SET(&ke, old_fd, EVFILT_READ, EV_DELETE, 0, 0, NULL); -00648 int i = kevent(kq, &ke, 1, 0, 0, NULL); -00649 if (i == -1) -00650 { -00651 log(DEBUG,"kqueue: Failed to remove user from queue!"); -00652 } -00653 #endif -00654 #ifdef USE_EPOLL -00655 struct epoll_event ev; -00656 ev.events = EPOLLIN | EPOLLET; -00657 ev.data.fd = old_fd; -00658 int i = epoll_ctl(ep, EPOLL_CTL_DEL, old_fd, &ev); -00659 if (i < 0) -00660 { -00661 log(DEBUG,"epoll: List deletion failure!"); -00662 } -00663 #endif -00664 -00665 shutdown(old_fd,2); -00666 close(old_fd); -00667 return true; -00668 } -00669 -00670 bool Server::PseudoToUser(userrec* alive,userrec* zombie,std::string message) -00671 { -00672 zombie->fd = alive->fd; -00673 alive->fd = FD_MAGIC_NUMBER; -00674 alive->ClearBuffer(); -00675 Write(zombie->fd,":%s!%s@%s NICK %s",alive->nick,alive->ident,alive->host,zombie->nick); -00676 kill_link(alive,message.c_str()); -00677 fd_ref_table[zombie->fd] = zombie; -00678 for (int i = 0; i != MAXCHANS; i++) -00679 { -00680 if (zombie->chans[i].channel != NULL) -00681 { -00682 if (zombie->chans[i].channel->name) -00683 { -00684 chanrec* Ptr = zombie->chans[i].channel; -00685 WriteFrom(zombie->fd,zombie,"JOIN %s",Ptr->name); -00686 if (Ptr->topicset) -00687 { -00688 WriteServ(zombie->fd,"332 %s %s :%s", zombie->nick, Ptr->name, Ptr->topic); -00689 WriteServ(zombie->fd,"333 %s %s %s %d", zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset); -00690 } -00691 userlist(zombie,Ptr); -00692 WriteServ(zombie->fd,"366 %s %s :End of /NAMES list.", zombie->nick, Ptr->name); -00693 -00694 } -00695 } -00696 } -00697 return true; -00698 } -00699 -00700 void Server::AddGLine(long duration, std::string source, std::string reason, std::string hostmask) -00701 { -00702 add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); -00703 } -00704 -00705 void Server::AddQLine(long duration, std::string source, std::string reason, std::string nickname) -00706 { -00707 add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str()); -00708 } -00709 -00710 void Server::AddZLine(long duration, std::string source, std::string reason, std::string ipaddr) -00711 { -00712 add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str()); -00713 } -00714 -00715 void Server::AddKLine(long duration, std::string source, std::string reason, std::string hostmask) -00716 { -00717 add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); -00718 } -00719 -00720 void Server::AddELine(long duration, std::string source, std::string reason, std::string hostmask) -00721 { -00722 add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); -00723 } -00724 -00725 bool Server::DelGLine(std::string hostmask) -00726 { -00727 return del_gline(hostmask.c_str()); -00728 } -00729 -00730 bool Server::DelQLine(std::string nickname) -00731 { -00732 return del_qline(nickname.c_str()); -00733 } -00734 -00735 bool Server::DelZLine(std::string ipaddr) -00736 { -00737 return del_zline(ipaddr.c_str()); -00738 } -00739 -00740 bool Server::DelKLine(std::string hostmask) -00741 { -00742 return del_kline(hostmask.c_str()); -00743 } -00744 -00745 bool Server::DelELine(std::string hostmask) -00746 { -00747 return del_eline(hostmask.c_str()); -00748 } -00749 -00750 long Server::CalcDuration(std::string delta) -00751 { -00752 return duration(delta.c_str()); -00753 } -00754 -00755 bool Server::IsValidMask(std::string mask) -00756 { -00757 const char* dest = mask.c_str(); -00758 if (strchr(dest,'!')==0) -00759 return false; -00760 if (strchr(dest,'@')==0) -00761 return false; -00762 for (unsigned int i = 0; i < strlen(dest); i++) -00763 if (dest[i] < 32) -00764 return false; -00765 for (unsigned int i = 0; i < strlen(dest); i++) -00766 if (dest[i] > 126) -00767 return false; -00768 unsigned int c = 0; -00769 for (unsigned int i = 0; i < strlen(dest); i++) -00770 if (dest[i] == '!') -00771 c++; -00772 if (c>1) -00773 return false; -00774 c = 0; -00775 for (unsigned int i = 0; i < strlen(dest); i++) -00776 if (dest[i] == '@') -00777 c++; -00778 if (c>1) -00779 return false; -00780 -00781 return true; -00782 } -00783 -00784 Module* Server::FindModule(std::string name) -00785 { -00786 for (int i = 0; i <= MODCOUNT; i++) -00787 { -00788 if (module_names[i] == name) -00789 { -00790 return modules[i]; -00791 } -00792 } -00793 return NULL; -00794 } -00795 -00796 ConfigReader::ConfigReader() -00797 { -00798 include_stack.clear(); -00799 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); -00800 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out); -00801 this->readerror = LoadConf(CONFIG_FILE,this->cache,this->errorlog); -00802 if (!this->readerror) -00803 this->error = CONF_FILE_NOT_FOUND; -00804 } -00805 -00806 -00807 ConfigReader::~ConfigReader() -00808 { -00809 if (this->cache) -00810 delete this->cache; -00811 if (this->errorlog) -00812 delete this->errorlog; -00813 } -00814 -00815 -00816 ConfigReader::ConfigReader(std::string filename) -00817 { -00818 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); -00819 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out); -00820 this->readerror = LoadConf(filename.c_str(),this->cache,this->errorlog); -00821 if (!this->readerror) -00822 this->error = CONF_FILE_NOT_FOUND; -00823 }; -00824 -00825 std::string ConfigReader::ReadValue(std::string tag, std::string name, int index) -00826 { -00827 char val[MAXBUF]; -00828 char t[MAXBUF]; -00829 char n[MAXBUF]; -00830 strlcpy(t,tag.c_str(),MAXBUF); -00831 strlcpy(n,name.c_str(),MAXBUF); -00832 int res = ReadConf(cache,t,n,index,val); -00833 if (!res) -00834 { -00835 this->error = CONF_VALUE_NOT_FOUND; -00836 return ""; -00837 } -00838 return val; -00839 } -00840 -00841 bool ConfigReader::ReadFlag(std::string tag, std::string name, int index) -00842 { -00843 char val[MAXBUF]; -00844 char t[MAXBUF]; -00845 char n[MAXBUF]; -00846 strlcpy(t,tag.c_str(),MAXBUF); -00847 strlcpy(n,name.c_str(),MAXBUF); -00848 int res = ReadConf(cache,t,n,index,val); -00849 if (!res) -00850 { -00851 this->error = CONF_VALUE_NOT_FOUND; -00852 return false; -00853 } -00854 std::string s = val; -00855 return ((s == "yes") || (s == "YES") || (s == "true") || (s == "TRUE") || (s == "1")); -00856 } -00857 -00858 long ConfigReader::ReadInteger(std::string tag, std::string name, int index, bool needs_unsigned) -00859 { -00860 char val[MAXBUF]; -00861 char t[MAXBUF]; -00862 char n[MAXBUF]; -00863 strlcpy(t,tag.c_str(),MAXBUF); -00864 strlcpy(n,name.c_str(),MAXBUF); -00865 int res = ReadConf(cache,t,n,index,val); -00866 if (!res) -00867 { -00868 this->error = CONF_VALUE_NOT_FOUND; -00869 return 0; -00870 } -00871 for (unsigned int i = 0; i < strlen(val); i++) +00633 +00634 +00635 bool Server::AddExtendedMode(char modechar, int type, bool requires_oper, int params_when_on, int params_when_off) +00636 { +00637 if (((modechar >= 'A') && (modechar <= 'Z')) || ((modechar >= 'a') && (modechar <= 'z'))) +00638 { +00639 if (type == MT_SERVER) +00640 { +00641 log(DEBUG,"*** API ERROR *** Modes of type MT_SERVER are reserved for future expansion"); +00642 return false; +00643 } +00644 if (((params_when_on>0) || (params_when_off>0)) && (type == MT_CLIENT)) +00645 { +00646 log(DEBUG,"*** API ERROR *** Parameters on MT_CLIENT modes are not supported"); +00647 return false; +00648 } +00649 if ((params_when_on>1) || (params_when_off>1)) +00650 { +00651 log(DEBUG,"*** API ERROR *** More than one parameter for an MT_CHANNEL mode is not yet supported"); +00652 return false; +00653 } +00654 return DoAddExtendedMode(modechar,type,requires_oper,params_when_on,params_when_off); +00655 } +00656 else +00657 { +00658 log(DEBUG,"*** API ERROR *** Muppet modechar detected."); +00659 } +00660 return false; +00661 } +00662 +00663 bool Server::AddExtendedListMode(char modechar) +00664 { +00665 bool res = DoAddExtendedMode(modechar,MT_CHANNEL,false,1,1); +00666 if (res) +00667 ModeMakeList(modechar); +00668 return res; +00669 } +00670 +00671 int Server::CountUsers(chanrec* c) +00672 { +00673 return usercount(c); +00674 } +00675 +00676 +00677 bool Server::UserToPseudo(userrec* user,std::string message) +00678 { +00679 unsigned int old_fd = user->fd; +00680 user->fd = FD_MAGIC_NUMBER; +00681 user->ClearBuffer(); +00682 Write(old_fd,"ERROR :Closing link (%s@%s) [%s]",user->ident,user->host,message.c_str()); +00683 #ifdef USE_KQUEUE +00684 struct kevent ke; +00685 EV_SET(&ke, old_fd, EVFILT_READ, EV_DELETE, 0, 0, NULL); +00686 int i = kevent(kq, &ke, 1, 0, 0, NULL); +00687 if (i == -1) +00688 { +00689 log(DEBUG,"kqueue: Failed to remove user from queue!"); +00690 } +00691 #endif +00692 #ifdef USE_EPOLL +00693 struct epoll_event ev; +00694 ev.events = EPOLLIN | EPOLLET; +00695 ev.data.fd = old_fd; +00696 int i = epoll_ctl(ep, EPOLL_CTL_DEL, old_fd, &ev); +00697 if (i < 0) +00698 { +00699 log(DEBUG,"epoll: List deletion failure!"); +00700 } +00701 #endif +00702 +00703 shutdown(old_fd,2); +00704 close(old_fd); +00705 return true; +00706 } +00707 +00708 bool Server::PseudoToUser(userrec* alive,userrec* zombie,std::string message) +00709 { +00710 zombie->fd = alive->fd; +00711 alive->fd = FD_MAGIC_NUMBER; +00712 alive->ClearBuffer(); +00713 Write(zombie->fd,":%s!%s@%s NICK %s",alive->nick,alive->ident,alive->host,zombie->nick); +00714 kill_link(alive,message.c_str()); +00715 fd_ref_table[zombie->fd] = zombie; +00716 for (int i = 0; i != MAXCHANS; i++) +00717 { +00718 if (zombie->chans[i].channel != NULL) +00719 { +00720 if (zombie->chans[i].channel->name) +00721 { +00722 chanrec* Ptr = zombie->chans[i].channel; +00723 WriteFrom(zombie->fd,zombie,"JOIN %s",Ptr->name); +00724 if (Ptr->topicset) +00725 { +00726 WriteServ(zombie->fd,"332 %s %s :%s", zombie->nick, Ptr->name, Ptr->topic); +00727 WriteServ(zombie->fd,"333 %s %s %s %d", zombie->nick, Ptr->name, Ptr->setby, Ptr->topicset); +00728 } +00729 userlist(zombie,Ptr); +00730 WriteServ(zombie->fd,"366 %s %s :End of /NAMES list.", zombie->nick, Ptr->name); +00731 +00732 } +00733 } +00734 } +00735 return true; +00736 } +00737 +00738 void Server::AddGLine(long duration, std::string source, std::string reason, std::string hostmask) +00739 { +00740 add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); +00741 } +00742 +00743 void Server::AddQLine(long duration, std::string source, std::string reason, std::string nickname) +00744 { +00745 add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str()); +00746 } +00747 +00748 void Server::AddZLine(long duration, std::string source, std::string reason, std::string ipaddr) +00749 { +00750 add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str()); +00751 } +00752 +00753 void Server::AddKLine(long duration, std::string source, std::string reason, std::string hostmask) +00754 { +00755 add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); +00756 } +00757 +00758 void Server::AddELine(long duration, std::string source, std::string reason, std::string hostmask) +00759 { +00760 add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); +00761 } +00762 +00763 bool Server::DelGLine(std::string hostmask) +00764 { +00765 return del_gline(hostmask.c_str()); +00766 } +00767 +00768 bool Server::DelQLine(std::string nickname) +00769 { +00770 return del_qline(nickname.c_str()); +00771 } +00772 +00773 bool Server::DelZLine(std::string ipaddr) +00774 { +00775 return del_zline(ipaddr.c_str()); +00776 } +00777 +00778 bool Server::DelKLine(std::string hostmask) +00779 { +00780 return del_kline(hostmask.c_str()); +00781 } +00782 +00783 bool Server::DelELine(std::string hostmask) +00784 { +00785 return del_eline(hostmask.c_str()); +00786 } +00787 +00788 long Server::CalcDuration(std::string delta) +00789 { +00790 return duration(delta.c_str()); +00791 } +00792 +00793 bool Server::IsValidMask(std::string mask) +00794 { +00795 const char* dest = mask.c_str(); +00796 if (strchr(dest,'!')==0) +00797 return false; +00798 if (strchr(dest,'@')==0) +00799 return false; +00800 for (unsigned int i = 0; i < strlen(dest); i++) +00801 if (dest[i] < 32) +00802 return false; +00803 for (unsigned int i = 0; i < strlen(dest); i++) +00804 if (dest[i] > 126) +00805 return false; +00806 unsigned int c = 0; +00807 for (unsigned int i = 0; i < strlen(dest); i++) +00808 if (dest[i] == '!') +00809 c++; +00810 if (c>1) +00811 return false; +00812 c = 0; +00813 for (unsigned int i = 0; i < strlen(dest); i++) +00814 if (dest[i] == '@') +00815 c++; +00816 if (c>1) +00817 return false; +00818 +00819 return true; +00820 } +00821 +00822 Module* Server::FindModule(std::string name) +00823 { +00824 for (int i = 0; i <= MODCOUNT; i++) +00825 { +00826 if (module_names[i] == name) +00827 { +00828 return modules[i]; +00829 } +00830 } +00831 return NULL; +00832 } +00833 +00834 ConfigReader::ConfigReader() +00835 { +00836 include_stack.clear(); +00837 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); +00838 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out); +00839 this->readerror = LoadConf(CONFIG_FILE,this->cache,this->errorlog); +00840 if (!this->readerror) +00841 this->error = CONF_FILE_NOT_FOUND; +00842 } +00843 +00844 +00845 ConfigReader::~ConfigReader() +00846 { +00847 if (this->cache) +00848 delete this->cache; +00849 if (this->errorlog) +00850 delete this->errorlog; +00851 } +00852 +00853 +00854 ConfigReader::ConfigReader(std::string filename) +00855 { +00856 this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out); +00857 this->errorlog = new std::stringstream(std::stringstream::in | std::stringstream::out); +00858 this->readerror = LoadConf(filename.c_str(),this->cache,this->errorlog); +00859 if (!this->readerror) +00860 this->error = CONF_FILE_NOT_FOUND; +00861 }; +00862 +00863 std::string ConfigReader::ReadValue(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 if (!isdigit(val[i])) -00874 { -00875 this->error = CONF_NOT_A_NUMBER; -00876 return 0; -00877 } -00878 } -00879 if ((needs_unsigned) && (atoi(val)<0)) -00880 { -00881 this->error = CONF_NOT_UNSIGNED; -00882 return 0; -00883 } -00884 return atoi(val); -00885 } -00886 -00887 long ConfigReader::GetError() -00888 { -00889 long olderr = this->error; -00890 this->error = 0; -00891 return olderr; -00892 } -00893 -00894 void ConfigReader::DumpErrors(bool bail, userrec* user) -00895 { -00896 if (bail) -00897 { -00898 printf("There were errors in your configuration:\n%s",errorlog->str().c_str()); -00899 exit(0); -00900 } -00901 else -00902 { -00903 char dataline[1024]; -00904 if (user) -00905 { -00906 WriteServ(user->fd,"NOTICE %s :There were errors in the configuration file:",user->nick); -00907 while (!errorlog->eof()) -00908 { -00909 errorlog->getline(dataline,1024); -00910 WriteServ(user->fd,"NOTICE %s :%s",user->nick,dataline); -00911 } -00912 } -00913 else -00914 { -00915 WriteOpers("There were errors in the configuration file:",user->nick); -00916 while (!errorlog->eof()) -00917 { -00918 errorlog->getline(dataline,1024); -00919 WriteOpers(dataline); -00920 } -00921 } -00922 return; -00923 } -00924 } -00925 -00926 -00927 int ConfigReader::Enumerate(std::string tag) -00928 { -00929 return EnumConf(cache,tag.c_str()); +00873 this->error = CONF_VALUE_NOT_FOUND; +00874 return ""; +00875 } +00876 return val; +00877 } +00878 +00879 bool ConfigReader::ReadFlag(std::string tag, std::string name, int index) +00880 { +00881 char val[MAXBUF]; +00882 char t[MAXBUF]; +00883 char n[MAXBUF]; +00884 strlcpy(t,tag.c_str(),MAXBUF); +00885 strlcpy(n,name.c_str(),MAXBUF); +00886 int res = ReadConf(cache,t,n,index,val); +00887 if (!res) +00888 { +00889 this->error = CONF_VALUE_NOT_FOUND; +00890 return false; +00891 } +00892 std::string s = val; +00893 return ((s == "yes") || (s == "YES") || (s == "true") || (s == "TRUE") || (s == "1")); +00894 } +00895 +00896 long ConfigReader::ReadInteger(std::string tag, std::string name, int index, bool needs_unsigned) +00897 { +00898 char val[MAXBUF]; +00899 char t[MAXBUF]; +00900 char n[MAXBUF]; +00901 strlcpy(t,tag.c_str(),MAXBUF); +00902 strlcpy(n,name.c_str(),MAXBUF); +00903 int res = ReadConf(cache,t,n,index,val); +00904 if (!res) +00905 { +00906 this->error = CONF_VALUE_NOT_FOUND; +00907 return 0; +00908 } +00909 for (unsigned int i = 0; i < strlen(val); i++) +00910 { +00911 if (!isdigit(val[i])) +00912 { +00913 this->error = CONF_NOT_A_NUMBER; +00914 return 0; +00915 } +00916 } +00917 if ((needs_unsigned) && (atoi(val)<0)) +00918 { +00919 this->error = CONF_NOT_UNSIGNED; +00920 return 0; +00921 } +00922 return atoi(val); +00923 } +00924 +00925 long ConfigReader::GetError() +00926 { +00927 long olderr = this->error; +00928 this->error = 0; +00929 return olderr; 00930 } 00931 -00932 int ConfigReader::EnumerateValues(std::string tag, int index) +00932 void ConfigReader::DumpErrors(bool bail, userrec* user) 00933 { -00934 return EnumValues(cache, tag.c_str(), index); -00935 } -00936 -00937 bool ConfigReader::Verify() -00938 { -00939 return this->readerror; -00940 } -00941 -00942 -00943 FileReader::FileReader(std::string filename) -00944 { -00945 file_cache c; -00946 readfile(c,filename.c_str()); -00947 this->fc = c; -00948 } -00949 -00950 FileReader::FileReader() -00951 { -00952 } -00953 -00954 void FileReader::LoadFile(std::string filename) -00955 { -00956 file_cache c; -00957 readfile(c,filename.c_str()); -00958 this->fc = c; -00959 } -00960 -00961 -00962 FileReader::~FileReader() -00963 { -00964 } -00965 -00966 bool FileReader::Exists() -00967 { -00968 if (fc.size() == 0) -00969 { -00970 return(false); -00971 } -00972 else -00973 { -00974 return(true); -00975 } -00976 } -00977 -00978 std::string FileReader::GetLine(int x) -00979 { -00980 if ((x<0) || ((unsigned)x>fc.size())) -00981 return ""; -00982 return fc[x]; -00983 } -00984 -00985 int FileReader::FileSize() -00986 { -00987 return fc.size(); -00988 } -00989 -00990 -00991 std::vector<Module*> modules(255); -00992 std::vector<ircd_module*> factory(255); -00993 -00994 int MODCOUNT = -1; -00995 -00996 -

    Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +00934 if (bail) +00935 { +00936 printf("There were errors in your configuration:\n%s",errorlog->str().c_str()); +00937 exit(0); +00938 } +00939 else +00940 { +00941 char dataline[1024]; +00942 if (user) +00943 { +00944 WriteServ(user->fd,"NOTICE %s :There were errors in the configuration file:",user->nick); +00945 while (!errorlog->eof()) +00946 { +00947 errorlog->getline(dataline,1024); +00948 WriteServ(user->fd,"NOTICE %s :%s",user->nick,dataline); +00949 } +00950 } +00951 else +00952 { +00953 WriteOpers("There were errors in the configuration file:",user->nick); +00954 while (!errorlog->eof()) +00955 { +00956 errorlog->getline(dataline,1024); +00957 WriteOpers(dataline); +00958 } +00959 } +00960 return; +00961 } +00962 } +00963 +00964 +00965 int ConfigReader::Enumerate(std::string tag) +00966 { +00967 return EnumConf(cache,tag.c_str()); +00968 } +00969 +00970 int ConfigReader::EnumerateValues(std::string tag, int index) +00971 { +00972 return EnumValues(cache, tag.c_str(), index); +00973 } +00974 +00975 bool ConfigReader::Verify() +00976 { +00977 return this->readerror; +00978 } +00979 +00980 +00981 FileReader::FileReader(std::string filename) +00982 { +00983 file_cache c; +00984 readfile(c,filename.c_str()); +00985 this->fc = c; +00986 } +00987 +00988 FileReader::FileReader() +00989 { +00990 } +00991 +00992 void FileReader::LoadFile(std::string filename) +00993 { +00994 file_cache c; +00995 readfile(c,filename.c_str()); +00996 this->fc = c; +00997 } +00998 +00999 +01000 FileReader::~FileReader() +01001 { +01002 } +01003 +01004 bool FileReader::Exists() +01005 { +01006 if (fc.size() == 0) +01007 { +01008 return(false); +01009 } +01010 else +01011 { +01012 return(true); +01013 } +01014 } +01015 +01016 std::string FileReader::GetLine(int x) +01017 { +01018 if ((x<0) || ((unsigned)x>fc.size())) +01019 return ""; +01020 return fc[x]; +01021 } +01022 +01023 int FileReader::FileSize() +01024 { +01025 return fc.size(); +01026 } +01027 +01028 +01029 std::vector<Module*> modules(255); +01030 std::vector<ircd_module*> factory(255); +01031 +01032 int MODCOUNT = -1; +01033 +01034 +

    Generated on Fri Dec 9 20:20:03 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/modules_8cpp.html b/docs/module-doc/modules_8cpp.html index a7853803c..3b456b97d 100644 --- a/docs/module-doc/modules_8cpp.html +++ b/docs/module-doc/modules_8cpp.html @@ -420,7 +420,7 @@ Definition at line 221

    References EMode, and ModeDefined().

    -Referenced by Server::AddExtendedListMode(), and Server::AddExtendedMode().

    00222 {
    +Referenced by Server::AddExtendedListMode(), and Server::AddExtendedMode().
    00222 {
     00223         if (ModeDefined(modechar,type)) {
     00224                 return false;
     00225         }
    @@ -758,7 +758,7 @@ Definition at line 231
     

    References EMode, and MT_CHANNEL.

    -Referenced by Server::AddExtendedListMode().

    00232 {
    +Referenced by Server::AddExtendedListMode().
    00232 {
     00233         for (ExtModeListIter i = EMode.begin(); i < EMode.end(); i++)
     00234         {
     00235                 if ((i->modechar == modechar) && (i->type == MT_CHANNEL))
    @@ -1174,7 +1174,7 @@ Referenced by DoAddExtended
     

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

    @@ -1316,7 +1316,7 @@ Definition at line 81

    -Definition at line 994 of file modules.cpp. +Definition at line 1032 of file modules.cpp.

    @@ -1364,7 +1364,7 @@ Definition at line 994

    -Referenced by Server::AddSocket(), and Server::DelSocket(). +Referenced by Server::AddSocket(), and Server::DelSocket().

    @@ -1804,7 +1804,7 @@ Referenced by Server::AddSo -


    Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:09 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/modules_8cpp__incl.md5 b/docs/module-doc/modules_8cpp__incl.md5 index 075b4d32d..40a066bd0 100644 --- a/docs/module-doc/modules_8cpp__incl.md5 +++ b/docs/module-doc/modules_8cpp__incl.md5 @@ -1 +1 @@ -ef223cbef13898617d55573e4017c641 \ No newline at end of file +1b005f3bb4371af3d7b1f0bde019cdee \ No newline at end of file diff --git a/docs/module-doc/modules_8h-source.html b/docs/module-doc/modules_8h-source.html index a66aa14b1..5fc39102d 100644 --- a/docs/module-doc/modules_8h-source.html +++ b/docs/module-doc/modules_8h-source.html @@ -27,424 +27,491 @@ 00018 #ifndef __PLUGIN_H 00019 #define __PLUGIN_H 00020 -00021 // log levels -00022 00023 #define DEBUG 10 00024 #define VERBOSE 20 00025 #define DEFAULT 30 00026 #define SPARSE 40 00027 #define NONE 50 00028 -00029 // used with OnExtendedMode() method of modules -00030 00031 #define MT_CHANNEL 1 00032 #define MT_CLIENT 2 00033 #define MT_SERVER 3 00034 -00035 // used with OnAccessCheck() method of modules -00036 00037 #define ACR_DEFAULT 0 // Do default action (act as if the module isnt even loaded) 00038 #define ACR_DENY 1 // deny the action 00039 #define ACR_ALLOW 2 // allow the action -00040 -00041 #define AC_KICK 0 // a user is being kicked -00042 #define AC_DEOP 1 // a user is being deopped -00043 #define AC_OP 2 // a user is being opped -00044 #define AC_VOICE 3 // a user is being voiced -00045 #define AC_DEVOICE 4 // a user is being devoiced -00046 #define AC_HALFOP 5 // a user is being halfopped -00047 #define AC_DEHALFOP 6 // a user is being dehalfopped -00048 #define AC_INVITE 7 // a user is being invited -00049 #define AC_GENERAL_MODE 8 // a user channel mode is being changed -00050 -00051 // used to define a set of behavior bits for a module -00052 -00053 #define VF_STATIC 1 // module is static, cannot be /unloadmodule'd -00054 #define VF_VENDOR 2 // module is a vendor module (came in the original tarball, not 3rd party) -00055 #define VF_SERVICEPROVIDER 4 // module provides a service to other modules (can be a dependency) -00056 #define VF_COMMON 8 // module needs to be common on all servers in a mesh to link -00057 -00058 #include "dynamic.h" -00059 #include "base.h" -00060 #include "ctables.h" -00061 #include "socket.h" -00062 #include <string> -00063 #include <deque> -00064 #include <sstream> -00065 -00068 typedef std::deque<std::string> file_cache; -00069 typedef file_cache string_list; -00070 -00073 typedef std::deque<userrec*> chanuserlist; -00074 +00040 #define AC_KICK 0 // a user is being kicked +00041 #define AC_DEOP 1 // a user is being deopped +00042 #define AC_OP 2 // a user is being opped +00043 #define AC_VOICE 3 // a user is being voiced +00044 #define AC_DEVOICE 4 // a user is being devoiced +00045 #define AC_HALFOP 5 // a user is being halfopped +00046 #define AC_DEHALFOP 6 // a user is being dehalfopped +00047 #define AC_INVITE 7 // a user is being invited +00048 #define AC_GENERAL_MODE 8 // a user channel mode is being changed +00049 +00052 #define VF_STATIC 1 // module is static, cannot be /unloadmodule'd +00053 #define VF_VENDOR 2 // module is a vendor module (came in the original tarball, not 3rd party) +00054 #define VF_SERVICEPROVIDER 4 // module provides a service to other modules (can be a dependency) +00055 #define VF_COMMON 8 // module needs to be common on all servers in a mesh to link +00056 +00057 #include "dynamic.h" +00058 #include "base.h" +00059 #include "ctables.h" +00060 #include "socket.h" +00061 #include <string> +00062 #include <deque> +00063 #include <sstream> +00064 +00065 class Server; +00066 +00069 typedef std::deque<std::string> file_cache; +00070 typedef file_cache string_list; +00071 +00074 typedef std::deque<userrec*> chanuserlist; 00075 -00076 // This #define allows us to call a method in all -00077 // loaded modules in a readable simple way, e.g.: -00078 // 'FOREACH_MOD OnConnect(user);' -00079 -00080 #define FOREACH_MOD for (int _i = 0; _i <= MODCOUNT; _i++) modules[_i]-> -00081 -00082 // This define is similar to the one above but returns a result in MOD_RESULT. -00083 // The first module to return a nonzero result is the value to be accepted, -00084 // and any modules after are ignored. -00085 -00086 // ********************************************************************************************* -00087 -00088 #define FOREACH_RESULT(x) { MOD_RESULT = 0; \ -00089 for (int _i = 0; _i <= MODCOUNT; _i++) { \ -00090 int res = modules[_i]->x ; \ -00091 if (res != 0) { \ -00092 MOD_RESULT = res; \ -00093 break; \ -00094 } \ -00095 } \ -00096 } -00097 -00098 // ********************************************************************************************* -00099 -00100 #define FD_MAGIC_NUMBER -42 -00101 -00102 extern void createcommand(char* cmd, handlerfunc f, char flags, int minparams, char* source); -00103 extern void server_mode(char **parameters, int pcnt, userrec *user); -00104 -00105 // class Version holds the version information of a Module, returned -00106 // by Module::GetVersion (thanks RD) -00107 -00112 class Version : public classbase -00113 { -00114 public: -00115 const int Major, Minor, Revision, Build, Flags; -00116 Version(int major, int minor, int revision, int build, int flags); -00117 }; -00118 -00124 class Admin : public classbase -00125 { -00126 public: -00127 const std::string Name, Email, Nick; -00128 Admin(std::string name, std::string email, std::string nick); -00129 }; -00130 +00076 +00077 // This #define allows us to call a method in all +00078 // loaded modules in a readable simple way, e.g.: +00079 // 'FOREACH_MOD OnConnect(user);' +00080 +00081 #define FOREACH_MOD for (int _i = 0; _i <= MODCOUNT; _i++) modules[_i]-> +00082 +00083 // This define is similar to the one above but returns a result in MOD_RESULT. +00084 // The first module to return a nonzero result is the value to be accepted, +00085 // and any modules after are ignored. +00086 +00087 // ********************************************************************************************* +00088 +00089 #define FOREACH_RESULT(x) { MOD_RESULT = 0; \ +00090 for (int _i = 0; _i <= MODCOUNT; _i++) { \ +00091 int res = modules[_i]->x ; \ +00092 if (res != 0) { \ +00093 MOD_RESULT = res; \ +00094 break; \ +00095 } \ +00096 } \ +00097 } +00098 +00099 // ********************************************************************************************* +00100 +00101 #define FD_MAGIC_NUMBER -42 +00102 +00103 extern void createcommand(char* cmd, handlerfunc f, char flags, int minparams, char* source); +00104 extern void server_mode(char **parameters, int pcnt, userrec *user); +00105 +00106 // class Version holds the version information of a Module, returned +00107 // by Module::GetVersion (thanks RD) +00108 +00113 class Version : public classbase +00114 { +00115 public: +00116 const int Major, Minor, Revision, Build, Flags; +00117 Version(int major, int minor, int revision, int build, int flags); +00118 }; +00119 +00125 class Admin : public classbase +00126 { +00127 public: +00128 const std::string Name, Email, Nick; +00129 Admin(std::string name, std::string email, std::string nick); +00130 }; 00131 -00132 // Forward-delacare module for ModuleMessage etc -00133 class Module; -00134 -00135 // Thanks to Rob (from anope) for the idea of this message passing API -00136 // (its been done before, but this seemed a very neat and tidy way... -00137 -00142 class ModuleMessage : public classbase -00143 { -00144 public: -00147 virtual char* Send() = 0; -00148 virtual ~ModuleMessage() {}; -00149 }; -00150 -00156 class Request : public ModuleMessage -00157 { -00158 protected: -00161 char* data; -00165 Module* source; -00168 Module* dest; -00169 public: -00172 Request(char* anydata, Module* src, Module* dst); -00175 char* GetData(); -00178 Module* GetSource(); -00181 Module* GetDest(); -00187 char* Send(); -00188 }; -00189 +00132 +00133 // Forward-delacare module for ModuleMessage etc +00134 class Module; +00135 +00136 // Thanks to Rob (from anope) for the idea of this message passing API +00137 // (its been done before, but this seemed a very neat and tidy way... +00138 +00143 class ModuleMessage : public classbase +00144 { +00145 public: +00148 virtual char* Send() = 0; +00149 virtual ~ModuleMessage() {}; +00150 }; +00151 +00157 class Request : public ModuleMessage +00158 { +00159 protected: +00162 char* data; +00166 Module* source; +00169 Module* dest; +00170 public: +00173 Request(char* anydata, Module* src, Module* dst); +00176 char* GetData(); +00179 Module* GetSource(); +00182 Module* GetDest(); +00188 char* Send(); +00189 }; 00190 -00196 class Event : public ModuleMessage -00197 { -00198 protected: -00201 char* data; -00205 Module* source; -00210 std::string id; -00211 public: -00214 Event(char* anydata, Module* src, std::string eventid); -00217 char* GetData(); -00220 Module* GetSource(); -00224 std::string GetEventID(); -00229 char* Send(); -00230 }; -00231 +00191 +00197 class Event : public ModuleMessage +00198 { +00199 protected: +00202 char* data; +00206 Module* source; +00211 std::string id; +00212 public: +00215 Event(char* anydata, Module* src, std::string eventid); +00218 char* GetData(); +00221 Module* GetSource(); +00225 std::string GetEventID(); +00230 char* Send(); +00231 }; 00232 -00238 class Module : public classbase -00239 { -00240 public: -00241 -00245 Module(); -00246 -00250 virtual ~Module(); -00251 -00256 virtual Version GetVersion(); -00257 -00261 virtual void OnUserConnect(userrec* user); -00262 -00268 virtual void OnUserQuit(userrec* user); -00269 -00275 virtual void OnUserDisconnect(userrec* user); -00276 -00281 virtual void OnUserJoin(userrec* user, chanrec* channel); +00233 +00239 class Module : public classbase +00240 { +00241 public: +00242 +00247 Module(Server* Me); +00248 +00252 virtual ~Module(); +00253 +00258 virtual Version GetVersion(); +00259 +00264 virtual void OnUserConnect(userrec* user); +00265 +00273 virtual void OnUserQuit(userrec* user, std::string message); +00274 +00281 virtual void OnUserDisconnect(userrec* user); 00282 -00287 virtual void OnUserPart(userrec* user, chanrec* channel); -00288 -00294 virtual void OnPacketTransmit(std::string &data, std::string serv); -00295 -00302 virtual void OnPacketReceive(std::string &data, std::string serv); -00303 -00309 virtual void OnRehash(); -00310 +00289 virtual void OnUserJoin(userrec* user, chanrec* channel); +00290 +00297 virtual void OnUserPart(userrec* user, chanrec* channel); +00298 +00306 virtual void OnRehash(std::string parameter); +00307 00319 virtual void OnServerRaw(std::string &raw, bool inbound, userrec* user); 00320 -00330 virtual int OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params); -00331 -00345 virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname); -00346 -00352 virtual int OnUserPreKick(userrec* source, userrec* user, chanrec* chan, std::string reason); -00353 -00358 virtual void OnUserKick(userrec* source, userrec* user, chanrec* chan, std::string reason); -00359 -00364 virtual void OnOper(userrec* user); -00365 -00374 virtual void OnInfo(userrec* user); -00375 -00380 virtual void OnWhois(userrec* source, userrec* dest); -00381 -00387 virtual int OnUserPreInvite(userrec* source,userrec* dest,chanrec* channel); -00388 -00397 virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text); -00398 -00410 virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text); -00411 -00419 virtual int OnUserPreNick(userrec* user, std::string newnick); -00420 -00428 virtual void OnUserPostNick(userrec* user, std::string oldnick); -00429 -00451 virtual int OnAccessCheck(userrec* source,userrec* dest,chanrec* channel,int access_type); -00452 -00458 virtual string_list OnUserSync(userrec* user); -00459 -00465 virtual string_list OnChannelSync(chanrec* chan); -00466 -00470 virtual void On005Numeric(std::string &output); -00471 -00481 virtual int OnKill(userrec* source, userrec* dest, std::string reason); -00482 -00493 virtual void OnLoadModule(Module* mod,std::string name); -00494 -00505 virtual void OnUnloadModule(Module* mod,std::string name); -00506 -00512 virtual void OnBackgroundTimer(time_t curtime); -00513 -00521 virtual void OnSendList(userrec* user, chanrec* channel, char mode); -00522 -00533 virtual int OnPreCommand(std::string command, char **parameters, int pcnt, userrec *user); -00534 -00543 virtual bool OnCheckReady(userrec* user); -00544 -00552 virtual void OnUserRegister(userrec* user); -00553 -00559 virtual int OnRawMode(userrec* user, chanrec* chan, char mode, std::string param, bool adding, int pcnt); -00560 -00566 virtual int OnCheckInvite(userrec* user, chanrec* chan); -00567 -00574 virtual int OnCheckKey(userrec* user, chanrec* chan, std::string keygiven); -00575 -00581 virtual int OnCheckLimit(userrec* user, chanrec* chan); -00582 -00588 virtual int OnCheckBan(userrec* user, chanrec* chan); -00589 -00593 virtual void OnStats(char symbol); -00594 -00598 virtual int OnChangeLocalUserHost(userrec* user, std::string newhost); -00599 -00603 virtual int OnChangeLocalUserGECOS(userrec* user, std::string newhost); -00604 -00608 virtual int OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic); -00609 -00615 virtual void OnEvent(Event* event); -00616 -00623 virtual char* OnRequest(Request* request); -00624 -00631 virtual int OnOperCompare(std::string password, std::string input); -00632 -00638 virtual void OnGlobalOper(userrec* user); -00639 -00644 virtual void OnGlobalConnect(userrec* user); -00645 -00649 virtual int OnAddBan(userrec* source, chanrec* channel,std::string banmask); -00650 -00654 virtual int OnDelBan(userrec* source, chanrec* channel,std::string banmask); +00336 virtual int OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params); +00337 +00354 virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname); +00355 +00366 virtual int OnUserPreKick(userrec* source, userrec* user, chanrec* chan, std::string reason); +00367 +00376 virtual void OnUserKick(userrec* source, userrec* user, chanrec* chan, std::string reason); +00377 +00384 virtual void OnOper(userrec* user, std::string opertype); +00385 +00396 virtual void OnInfo(userrec* user); +00397 +00404 virtual void OnWhois(userrec* source, userrec* dest); +00405 +00415 virtual int OnUserPreInvite(userrec* source,userrec* dest,chanrec* channel); +00416 +00424 virtual void OnUserInvite(userrec* source,userrec* dest,chanrec* channel); +00425 +00439 virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text); +00440 +00457 virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text); +00458 +00469 virtual int OnUserPreNick(userrec* user, std::string newnick); +00470 +00479 virtual void OnUserMessage(userrec* user, void* dest, int target_type, std::string text); +00480 +00489 virtual void OnUserNotice(userrec* user, void* dest, int target_type, std::string text); +00490 +00500 virtual void OnMode(userrec* user, void* dest, int target_type, std::string text); +00501 +00510 virtual void OnGetServerDescription(std::string servername,std::string &description); +00511 +00524 virtual void OnSyncUser(userrec* user, Module* proto, void* opaque); +00525 +00541 virtual void OnSyncChannel(chanrec* chan, Module* proto, void* opaque); +00542 +00543 /* Allows modules to syncronize metadata related to channels over the network during a netburst. +00544 * Whenever the linking module wants to send out data, but doesnt know what the data +00545 * represents (e.g. it is Extensible metadata, added to a userrec or chanrec by a module) then +00546 * this method is called.You should use the ProtoSendMetaData function after you've +00547 * correctly decided how the data should be represented, to send the metadata on its way if it belongs +00548 * to your module. For a good example of how to use this method, see src/modules/m_swhois.cpp. +00549 * @param chan The channel whos metadata is being syncronized +00550 * @param proto A pointer to the module handling network protocol +00551 * @param opaque An opaque pointer set by the protocol module, should not be modified! +00552 * @param extname The extensions name which is being searched for +00553 */ +00554 virtual void OnSyncChannelMetaData(chanrec* chan, Module* proto,void* opaque, std::string extname); +00555 +00556 /* Allows modules to syncronize metadata related to users over the network during a netburst. +00557 * Whenever the linking module wants to send out data, but doesnt know what the data +00558 * represents (e.g. it is Extensible metadata, added to a userrec or chanrec by a module) then +00559 * this method is called. You should use the ProtoSendMetaData function after you've +00560 * correctly decided how the data should be represented, to send the metadata on its way if +00561 * if it belongs to your module. +00562 * @param user The user whos metadata is being syncronized +00563 * @param proto A pointer to the module handling network protocol +00564 * @param opaque An opaque pointer set by the protocol module, should not be modified! +00565 * @param extname The extensions name which is being searched for +00566 */ +00567 virtual void OnSyncUserMetaData(userrec* user, Module* proto,void* opaque, std::string extname); +00568 +00576 virtual void OnDecodeMetaData(int target_type, void* target, std::string extname, std::string extdata); +00577 +00591 virtual void ProtoSendMode(void* opaque, int target_type, void* target, std::string modeline); +00592 +00607 virtual void ProtoSendMetaData(void* opaque, int target_type, void* target, std::string extname, std::string extdata); +00608 +00613 virtual void OnWallops(userrec* user, std::string text); +00614 +00620 virtual void OnChangeHost(userrec* user, std::string newhost); +00621 +00627 virtual void OnChangeName(userrec* user, std::string gecos); +00628 +00636 virtual void OnAddGLine(long duration, userrec* source, std::string reason, std::string hostmask); +00637 +00645 virtual void OnAddZLine(long duration, userrec* source, std::string reason, std::string ipmask); +00646 +00654 virtual void OnAddKLine(long duration, userrec* source, std::string reason, std::string hostmask); 00655 -00662 virtual void OnRawSocketAccept(int fd, std::string ip, int localport); -00663 -00670 virtual int OnRawSocketWrite(int fd, char* buffer, int count); -00671 -00675 virtual void OnRawSocketClose(int fd); -00676 -00687 virtual int OnRawSocketRead(int fd, char* buffer, unsigned int count, int &readresult); -00688 }; -00689 -00690 -00696 class Server : public classbase -00697 { -00698 public: -00702 Server(); -00706 virtual ~Server(); -00707 -00711 virtual void SendOpers(std::string s); -00716 virtual void Log(int level, std::string s); -00721 virtual void Send(int Socket, std::string s); -00726 virtual void SendServ(int Socket, std::string s); -00730 virtual void SendChannelServerNotice(std::string ServName, chanrec* Channel, std::string text); -00735 virtual void SendFrom(int Socket, userrec* User, std::string s); -00750 virtual void SendTo(userrec* Source, userrec* Dest, std::string s); -00757 virtual void SendChannel(userrec* User, chanrec* Channel, std::string s,bool IncludeSender); -00762 virtual bool CommonChannels(userrec* u1, userrec* u2); -00770 virtual void SendCommon(userrec* User, std::string text,bool IncludeSender); -00775 virtual void SendWallops(userrec* User, std::string text); -00776 -00780 virtual bool IsNick(std::string nick); -00784 virtual int CountUsers(chanrec* c); -00788 virtual userrec* FindNick(std::string nick); -00792 virtual userrec* FindDescriptor(int socket); -00796 virtual chanrec* FindChannel(std::string channel); -00801 virtual std::string ChanMode(userrec* User, chanrec* Chan); -00805 virtual bool IsOnChannel(userrec* User, chanrec* Chan); -00808 virtual std::string GetServerName(); -00811 virtual std::string GetNetworkName(); -00814 virtual std::string GetServerDescription(); -00820 virtual Admin GetAdmin(); -00839 virtual bool AddExtendedMode(char modechar, int type, bool requires_oper, int params_when_on, int params_when_off); -00840 -00862 virtual bool AddExtendedListMode(char modechar); -00863 -00881 virtual void AddCommand(char* cmd, handlerfunc f, char flags, int minparams, char* source); -00882 -00904 virtual void SendMode(char **parameters, int pcnt, userrec *user); -00905 -00918 virtual void SendToModeMask(std::string modes, int flags, std::string text); -00919 -00925 virtual chanrec* JoinUserToChannel(userrec* user, std::string cname, std::string key); -00926 -00932 virtual chanrec* PartUserFromChannel(userrec* user, std::string cname, std::string reason); -00933 -00939 virtual void ChangeUserNick(userrec* user, std::string nickname); -00940 -00951 virtual void QuitUser(userrec* user, std::string reason); -00952 -00957 virtual bool MatchText(std::string sliteral, std::string spattern); -00958 -00970 virtual void CallCommandHandler(std::string commandname, char** parameters, int pcnt, userrec* user); -00971 -00977 virtual void ChangeHost(userrec* user, std::string host); -00978 -00984 virtual void ChangeGECOS(userrec* user, std::string gecos); -00985 -00994 virtual bool IsUlined(std::string server); -00995 -00999 virtual chanuserlist GetUsers(chanrec* chan); -01000 -01007 virtual bool UserToPseudo(userrec* user,std::string message); -01008 -01015 virtual bool PseudoToUser(userrec* alive,userrec* zombie,std::string message); -01016 -01024 virtual void AddGLine(long duration, std::string source, std::string reason, std::string hostmask); -01025 -01033 virtual void AddQLine(long duration, std::string source, std::string reason, std::string nickname); -01034 -01042 virtual void AddZLine(long duration, std::string source, std::string reason, std::string ipaddr); -01043 -01051 virtual void AddKLine(long duration, std::string source, std::string reason, std::string hostmask); -01052 -01060 virtual void AddELine(long duration, std::string source, std::string reason, std::string hostmask); -01061 -01064 virtual bool DelGLine(std::string hostmask); -01065 -01068 virtual bool DelQLine(std::string nickname); -01069 -01072 virtual bool DelZLine(std::string ipaddr); -01073 -01076 virtual bool DelKLine(std::string hostmask); -01077 -01080 virtual bool DelELine(std::string hostmask); -01081 -01087 virtual long CalcDuration(std::string duration); -01088 -01091 virtual bool IsValidMask(std::string mask); +00663 virtual void OnAddQLine(long duration, userrec* source, std::string reason, std::string nickmask); +00664 +00672 virtual void OnAddELine(long duration, userrec* source, std::string reason, std::string hostmask); +00673 +00679 virtual void OnDelGLine(userrec* source, std::string hostmask); +00680 +00686 virtual void OnDelZLine(userrec* source, std::string ipmask); +00687 +00693 virtual void OnDelKLine(userrec* source, std::string hostmask); +00694 +00700 virtual void OnDelQLine(userrec* source, std::string nickmask); +00701 +00707 virtual void OnDelELine(userrec* source, std::string hostmask); +00708 +00718 virtual void OnCleanup(int target_type, void* item); +00719 +00729 virtual void OnUserPostNick(userrec* user, std::string oldnick); +00730 +00756 virtual int OnAccessCheck(userrec* source,userrec* dest,chanrec* channel,int access_type); +00757 +00762 virtual void On005Numeric(std::string &output); +00763 +00777 virtual int OnKill(userrec* source, userrec* dest, std::string reason); +00778 +00784 virtual void OnRemoteKill(userrec* source, userrec* dest, std::string reason); +00785 +00798 virtual void OnLoadModule(Module* mod,std::string name); +00799 +00812 virtual void OnUnloadModule(Module* mod,std::string name); +00813 +00820 virtual void OnBackgroundTimer(time_t curtime); +00821 +00832 virtual void OnSendList(userrec* user, chanrec* channel, char mode); +00833 +00849 virtual int OnPreCommand(std::string command, char **parameters, int pcnt, userrec *user); +00850 +00861 virtual bool OnCheckReady(userrec* user); +00862 +00871 virtual void OnUserRegister(userrec* user); +00872 +00885 virtual int OnRawMode(userrec* user, chanrec* chan, char mode, std::string param, bool adding, int pcnt); +00886 +00895 virtual int OnCheckInvite(userrec* user, chanrec* chan); +00896 +00906 virtual int OnCheckKey(userrec* user, chanrec* chan, std::string keygiven); +00907 +00916 virtual int OnCheckLimit(userrec* user, chanrec* chan); +00917 +00926 virtual int OnCheckBan(userrec* user, chanrec* chan); +00927 +00932 virtual void OnStats(char symbol); +00933 +00940 virtual int OnChangeLocalUserHost(userrec* user, std::string newhost); +00941 +00948 virtual int OnChangeLocalUserGECOS(userrec* user, std::string newhost); +00949 +00957 virtual int OnLocalTopicChange(userrec* user, chanrec* chan, std::string topic); +00958 +00965 virtual void OnPostLocalTopicChange(userrec* user, chanrec* chan, std::string topic); +00966 +00973 virtual void OnEvent(Event* event); +00974 +00982 virtual char* OnRequest(Request* request); +00983 +00993 virtual int OnOperCompare(std::string password, std::string input); +00994 +01001 virtual void OnGlobalOper(userrec* user); +01002 +01008 virtual void OnGlobalConnect(userrec* user); +01009 +01017 virtual int OnAddBan(userrec* source, chanrec* channel,std::string banmask); +01018 +01026 virtual int OnDelBan(userrec* source, chanrec* channel,std::string banmask); +01027 +01037 virtual void OnRawSocketAccept(int fd, std::string ip, int localport); +01038 +01049 virtual int OnRawSocketWrite(int fd, char* buffer, int count); +01050 +01055 virtual void OnRawSocketClose(int fd); +01056 +01072 virtual int OnRawSocketRead(int fd, char* buffer, unsigned int count, int &readresult); +01073 }; +01074 +01075 +01081 class Server : public classbase +01082 { +01083 public: +01087 Server(); +01091 virtual ~Server(); 01092 -01097 virtual Module* FindModule(std::string name); -01098 -01101 virtual void AddSocket(InspSocket* sock); -01102 -01105 virtual void DelSocket(InspSocket* sock); -01106 }; -01107 -01108 -01109 #define CONF_NOT_A_NUMBER 0x000010 -01110 #define CONF_NOT_UNSIGNED 0x000080 -01111 #define CONF_VALUE_NOT_FOUND 0x000100 -01112 #define CONF_FILE_NOT_FOUND 0x000200 -01113 -01114 -01121 class ConfigReader : public classbase -01122 { -01123 protected: -01129 std::stringstream *cache; -01130 std::stringstream *errorlog; -01133 bool readerror; -01134 long error; -01135 -01136 public: -01141 ConfigReader(); // default constructor reads ircd.conf -01145 ConfigReader(std::string filename); // read a module-specific config -01149 ~ConfigReader(); -01154 std::string ReadValue(std::string tag, std::string name, int index); -01160 bool ReadFlag(std::string tag, std::string name, int index); -01169 long ReadInteger(std::string tag, std::string name, int index, bool needs_unsigned); -01174 long GetError(); -01181 int Enumerate(std::string tag); -01186 bool Verify(); -01193 void DumpErrors(bool bail,userrec* user); -01194 -01200 int EnumerateValues(std::string tag, int index); -01201 }; -01202 -01203 -01204 -01210 class FileReader : public classbase -01211 { -01212 file_cache fc; -01213 public: -01218 FileReader(); -01219 -01225 FileReader(std::string filename); -01226 -01230 ~FileReader(); -01231 -01237 void LoadFile(std::string filename); -01238 -01242 bool Exists(); -01243 -01248 std::string GetLine(int x); -01249 -01255 int FileSize(); -01256 }; -01257 -01258 -01265 class ModuleFactory : public classbase -01266 { -01267 public: -01268 ModuleFactory() { } -01269 virtual ~ModuleFactory() { } -01274 virtual Module * CreateModule() = 0; -01275 }; -01276 -01277 -01278 typedef DLLFactory<ModuleFactory> ircd_module; -01279 -01280 #endif -

    Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +01096 virtual void SendOpers(std::string s); +01101 virtual void Log(int level, std::string s); +01106 virtual void Send(int Socket, std::string s); +01111 virtual void SendServ(int Socket, std::string s); +01115 virtual void SendChannelServerNotice(std::string ServName, chanrec* Channel, std::string text); +01120 virtual void SendFrom(int Socket, userrec* User, std::string s); +01135 virtual void SendTo(userrec* Source, userrec* Dest, std::string s); +01142 virtual void SendChannel(userrec* User, chanrec* Channel, std::string s,bool IncludeSender); +01147 virtual bool CommonChannels(userrec* u1, userrec* u2); +01155 virtual void SendCommon(userrec* User, std::string text,bool IncludeSender); +01160 virtual void SendWallops(userrec* User, std::string text); +01161 +01165 virtual bool IsNick(std::string nick); +01169 virtual int CountUsers(chanrec* c); +01173 virtual userrec* FindNick(std::string nick); +01177 virtual userrec* FindDescriptor(int socket); +01181 virtual chanrec* FindChannel(std::string channel); +01186 virtual std::string ChanMode(userrec* User, chanrec* Chan); +01190 virtual bool IsOnChannel(userrec* User, chanrec* Chan); +01193 virtual std::string GetServerName(); +01196 virtual std::string GetNetworkName(); +01199 virtual std::string GetServerDescription(); +01205 virtual Admin GetAdmin(); +01224 virtual bool AddExtendedMode(char modechar, int type, bool requires_oper, int params_when_on, int params_when_off); +01225 +01247 virtual bool AddExtendedListMode(char modechar); +01248 +01266 virtual void AddCommand(char* cmd, handlerfunc f, char flags, int minparams, char* source); +01267 +01289 virtual void SendMode(char **parameters, int pcnt, userrec *user); +01290 +01303 virtual void SendToModeMask(std::string modes, int flags, std::string text); +01304 +01310 virtual chanrec* JoinUserToChannel(userrec* user, std::string cname, std::string key); +01311 +01317 virtual chanrec* PartUserFromChannel(userrec* user, std::string cname, std::string reason); +01318 +01324 virtual void ChangeUserNick(userrec* user, std::string nickname); +01325 +01336 virtual void QuitUser(userrec* user, std::string reason); +01337 +01342 virtual bool MatchText(std::string sliteral, std::string spattern); +01343 +01355 virtual void CallCommandHandler(std::string commandname, char** parameters, int pcnt, userrec* user); +01356 +01357 virtual bool IsValidModuleCommand(std::string commandname, int pcnt, userrec* user); +01358 +01364 virtual void ChangeHost(userrec* user, std::string host); +01365 +01371 virtual void ChangeGECOS(userrec* user, std::string gecos); +01372 +01381 virtual bool IsUlined(std::string server); +01382 +01386 virtual chanuserlist GetUsers(chanrec* chan); +01387 +01394 virtual bool UserToPseudo(userrec* user,std::string message); +01395 +01402 virtual bool PseudoToUser(userrec* alive,userrec* zombie,std::string message); +01403 +01411 virtual void AddGLine(long duration, std::string source, std::string reason, std::string hostmask); +01412 +01420 virtual void AddQLine(long duration, std::string source, std::string reason, std::string nickname); +01421 +01429 virtual void AddZLine(long duration, std::string source, std::string reason, std::string ipaddr); +01430 +01438 virtual void AddKLine(long duration, std::string source, std::string reason, std::string hostmask); +01439 +01447 virtual void AddELine(long duration, std::string source, std::string reason, std::string hostmask); +01448 +01451 virtual bool DelGLine(std::string hostmask); +01452 +01455 virtual bool DelQLine(std::string nickname); +01456 +01459 virtual bool DelZLine(std::string ipaddr); +01460 +01463 virtual bool DelKLine(std::string hostmask); +01464 +01467 virtual bool DelELine(std::string hostmask); +01468 +01474 virtual long CalcDuration(std::string duration); +01475 +01478 virtual bool IsValidMask(std::string mask); +01479 +01484 virtual Module* FindModule(std::string name); +01485 +01488 virtual void AddSocket(InspSocket* sock); +01489 +01492 virtual void DelSocket(InspSocket* sock); +01493 +01494 virtual void RehashServer(); +01495 }; +01496 +01497 +01498 #define CONF_NOT_A_NUMBER 0x000010 +01499 #define CONF_NOT_UNSIGNED 0x000080 +01500 #define CONF_VALUE_NOT_FOUND 0x000100 +01501 #define CONF_FILE_NOT_FOUND 0x000200 +01502 +01503 +01510 class ConfigReader : public classbase +01511 { +01512 protected: +01518 std::stringstream *cache; +01519 std::stringstream *errorlog; +01522 bool readerror; +01523 long error; +01524 +01525 public: +01530 ConfigReader(); // default constructor reads ircd.conf +01534 ConfigReader(std::string filename); // read a module-specific config +01538 ~ConfigReader(); +01543 std::string ReadValue(std::string tag, std::string name, int index); +01549 bool ReadFlag(std::string tag, std::string name, int index); +01558 long ReadInteger(std::string tag, std::string name, int index, bool needs_unsigned); +01563 long GetError(); +01570 int Enumerate(std::string tag); +01575 bool Verify(); +01582 void DumpErrors(bool bail,userrec* user); +01583 +01589 int EnumerateValues(std::string tag, int index); +01590 }; +01591 +01592 +01593 +01599 class FileReader : public classbase +01600 { +01601 file_cache fc; +01602 public: +01607 FileReader(); +01608 +01614 FileReader(std::string filename); +01615 +01619 ~FileReader(); +01620 +01626 void LoadFile(std::string filename); +01627 +01631 bool Exists(); +01632 +01637 std::string GetLine(int x); +01638 +01644 int FileSize(); +01645 }; +01646 +01647 +01654 class ModuleFactory : public classbase +01655 { +01656 public: +01657 ModuleFactory() { } +01658 virtual ~ModuleFactory() { } +01663 virtual Module * CreateModule(Server* Me) = 0; +01664 }; +01665 +01666 +01667 typedef DLLFactory<ModuleFactory> ircd_module; +01668 +01669 #endif +

    Generated on Fri Dec 9 20:20:03 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/modules_8h.html b/docs/module-doc/modules_8h.html index d6c773aec..e10dfd7ea 100644 --- a/docs/module-doc/modules_8h.html +++ b/docs/module-doc/modules_8h.html @@ -18,9 +18,9 @@

    Include dependency graph for modules.h:

    - - - + + +

    @@ -67,6 +67,7 @@ This graph shows which files directly or indirectly include this file:


    Defines

    #define DEBUG   10 + log levels
    #define VERBOSE   20 #define DEFAULT   30 @@ -77,12 +78,14 @@ This graph shows which files directly or indirectly include this file:

    #define MT_CHANNEL   1 + Used with OnExtendedMode() method of modules.
    #define MT_CLIENT   2 #define MT_SERVER   3 #define ACR_DEFAULT   0 + Used with OnAccessCheck() method of modules.
    #define ACR_DENY   1 #define ACR_ALLOW   2 @@ -107,6 +110,7 @@ This graph shows which files directly or indirectly include this file:

    #define VF_STATIC   1 + Used to define a set of behavior bits for a module.
    #define VF_VENDOR   2 #define VF_SERVICEPROVIDER   4 @@ -167,7 +171,7 @@ This graph shows which files directly or indirectly include this file:

    -Definition at line 47 of file modules.h. +Definition at line 46 of file modules.h.

    @@ -192,7 +196,7 @@ Definition at line 47 of

    -Definition at line 42 of file modules.h. +Definition at line 41 of file modules.h.

    @@ -217,7 +221,7 @@ Definition at line 42 of

    -Definition at line 45 of file modules.h. +Definition at line 44 of file modules.h.

    @@ -242,7 +246,7 @@ Definition at line 45 of

    -Definition at line 49 of file modules.h. +Definition at line 48 of file modules.h.

    @@ -267,7 +271,7 @@ Definition at line 49 of

    -Definition at line 46 of file modules.h. +Definition at line 45 of file modules.h.

    @@ -292,7 +296,7 @@ Definition at line 46 of

    -Definition at line 48 of file modules.h. +Definition at line 47 of file modules.h.

    @@ -317,7 +321,7 @@ Definition at line 48 of

    -Definition at line 41 of file modules.h. +Definition at line 40 of file modules.h.

    @@ -342,7 +346,7 @@ Definition at line 41 of

    -Definition at line 43 of file modules.h. +Definition at line 42 of file modules.h.

    @@ -367,7 +371,7 @@ Definition at line 43 of

    -Definition at line 44 of file modules.h. +Definition at line 43 of file modules.h.

    @@ -415,11 +419,13 @@ Definition at line 39 of

    +Used with OnAccessCheck() method of modules. +

    Definition at line 37 of file modules.h.

    -Referenced by Module::OnAccessCheck(). +Referenced by Module::OnAccessCheck().

    @@ -469,9 +475,9 @@ Definition at line 38 of

    -Definition at line 1112 of file modules.h. +Definition at line 1501 of file modules.h.

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

    @@ -496,9 +502,9 @@ Referenced by ConfigReader:

    -Definition at line 1109 of file modules.h. +Definition at line 1498 of file modules.h.

    -Referenced by ConfigReader::ReadInteger(). +Referenced by ConfigReader::ReadInteger().

    @@ -523,9 +529,9 @@ Referenced by ConfigReader:

    -Definition at line 1110 of file modules.h. +Definition at line 1499 of file modules.h.

    -Referenced by ConfigReader::ReadInteger(). +Referenced by ConfigReader::ReadInteger().

    @@ -550,9 +556,9 @@ Referenced by ConfigReader:

    -Definition at line 1111 of file modules.h. +Definition at line 1500 of file modules.h.

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

    @@ -575,11 +581,13 @@ Referenced by ConfigReader:

    +log levels +

    Definition at line 23 of file modules.h.

    -Referenced by Server::AddExtendedMode(), chanrec::AddUser(), chanrec::DelUser(), userrec::HasPermission(), InspSocket::InspSocket(), chanrec::IsCustomModeSet(), InspSocket::Read(), userrec::ReadData(), userrec::RemoveInvite(), chanrec::SetCustomMode(), chanrec::SetCustomModeParam(), InspSocket::SetState(), userrec::SetWriteError(), and Server::UserToPseudo(). +Referenced by Server::AddExtendedMode(), chanrec::AddUser(), chanrec::DelUser(), InspSocket::InspSocket(), chanrec::IsCustomModeSet(), InspSocket::Read(), userrec::ReadData(), userrec::RemoveInvite(), chanrec::SetCustomMode(), chanrec::SetCustomModeParam(), InspSocket::SetState(), userrec::SetWriteError(), and Server::UserToPseudo().

    @@ -629,9 +637,9 @@ Definition at line 25 of

    -Definition at line 100 of file modules.h. +Definition at line 101 of file modules.h.

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

    @@ -656,7 +664,7 @@ Referenced by Server::Pseud

    -Definition at line 80 of file modules.h. +Definition at line 81 of file modules.h.

    Referenced by Event::Send(). @@ -697,7 +705,7 @@ Referenced by Event::Send() }

    -Definition at line 88 of file modules.h. +Definition at line 89 of file modules.h.

    @@ -720,11 +728,13 @@ Definition at line 88 of

    +Used with OnExtendedMode() method of modules. +

    Definition at line 31 of file modules.h.

    -Referenced by Server::AddExtendedListMode(), and ModeMakeList(). +Referenced by Server::AddExtendedListMode(), and ModeMakeList().

    @@ -751,7 +761,7 @@ Referenced by Server::AddEx

    Definition at line 32 of file modules.h.

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

    @@ -778,7 +788,7 @@ Referenced by Server::AddEx

    Definition at line 33 of file modules.h.

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

    @@ -878,7 +888,7 @@ Definition at line 24 of

    -Definition at line 56 of file modules.h. +Definition at line 55 of file modules.h.

    @@ -903,7 +913,7 @@ Definition at line 56 of

    -Definition at line 55 of file modules.h. +Definition at line 54 of file modules.h.

    @@ -926,9 +936,11 @@ Definition at line 55 of

    +Used to define a set of behavior bits for a module. +

    -Definition at line 53 of file modules.h. +Definition at line 52 of file modules.h.

    @@ -953,9 +965,9 @@ Definition at line 53 of

    -Definition at line 54 of file modules.h. +Definition at line 53 of file modules.h.

    -Referenced by Module::GetVersion(). +Referenced by Module::GetVersion().


    Typedef Documentation

    @@ -983,7 +995,7 @@ Holds a list of users in a channel.

    -Definition at line 73 of file modules.h. +Definition at line 74 of file modules.h.

    @@ -1010,7 +1022,7 @@ Low level definition of a FileReader

    -Definition at line 68 of file modules.h. +Definition at line 65 of file modules.h.

    @@ -1035,7 +1047,7 @@ Definition at line 68 of

    -Definition at line 1278 of file modules.h. +Definition at line 1667 of file modules.h.

    @@ -1060,7 +1072,7 @@ Definition at line 1278 o

    -Definition at line 69 of file modules.h. +Definition at line 70 of file modules.h.


    Function Documentation

    @@ -1118,7 +1130,7 @@ Definition at line 69 of

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

    @@ -1164,7 +1176,7 @@ Referenced by Server::AddCo -


    Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:09 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/modules_8h__incl.gif b/docs/module-doc/modules_8h__incl.gif index 90c81185e..03bf0ebbd 100644 Binary files a/docs/module-doc/modules_8h__incl.gif and b/docs/module-doc/modules_8h__incl.gif differ diff --git a/docs/module-doc/modules_8h__incl.map b/docs/module-doc/modules_8h__incl.map index 2214f2413..370fb51f0 100644 --- a/docs/module-doc/modules_8h__incl.map +++ b/docs/module-doc/modules_8h__incl.map @@ -1,4 +1,4 @@ base referer -rect $base_8h-source.html 291,44 352,71 -rect $ctables_8h-source.html 146,145 220,172 -rect $socket_8h-source.html 147,323 219,349 +rect $base_8h-source.html 291,108 352,135 +rect $ctables_8h-source.html 146,58 220,84 +rect $socket_8h-source.html 147,362 219,388 diff --git a/docs/module-doc/modules_8h__incl.md5 b/docs/module-doc/modules_8h__incl.md5 index cf971d90c..ea64f75bc 100644 --- a/docs/module-doc/modules_8h__incl.md5 +++ b/docs/module-doc/modules_8h__incl.md5 @@ -1 +1 @@ -5b86268e2f91690fd1ce3d798c0f701b \ No newline at end of file +11f79d4fade25dd250e5607e0123fc19 \ No newline at end of file diff --git a/docs/module-doc/namespaceirc.html b/docs/module-doc/namespaceirc.html index cbdb82a4b..1d19f74f2 100644 --- a/docs/module-doc/namespaceirc.html +++ b/docs/module-doc/namespaceirc.html @@ -56,7 +56,7 @@ This typedef declares irc::string< Definition at line 129 of file hashcomp.h. -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/namespacemembers.html b/docs/module-doc/namespacemembers.html index e7d8b4e31..e5032f8de 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 documentatio -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:14 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/namespacemembers_type.html b/docs/module-doc/namespacemembers_type.html index ec8cc3b9c..c3edcd117 100644 --- a/docs/module-doc/namespacemembers_type.html +++ b/docs/module-doc/namespacemembers_type.html @@ -11,7 +11,7 @@ -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:14 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/namespacenspace.html b/docs/module-doc/namespacenspace.html index 96ae0a3b0..d22c8eef6 100644 --- a/docs/module-doc/namespacenspace.html +++ b/docs/module-doc/namespacenspace.html @@ -15,7 +15,7 @@ struct  hash< string > -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/namespaces.html b/docs/module-doc/namespaces.html index 650759e44..5d3391290 100644 --- a/docs/module-doc/namespaces.html +++ b/docs/module-doc/namespaces.html @@ -10,7 +10,7 @@ nspace std -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/namespacestd.html b/docs/module-doc/namespacestd.html index 458862b34..cf71bb1fe 100644 --- a/docs/module-doc/namespacestd.html +++ b/docs/module-doc/namespacestd.html @@ -10,7 +10,7 @@
    -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/socket_8cpp-source.html b/docs/module-doc/socket_8cpp-source.html index b11873f4e..bdd849a0d 100644 --- a/docs/module-doc/socket_8cpp-source.html +++ b/docs/module-doc/socket_8cpp-source.html @@ -57,211 +57,219 @@ 00048 this->state = I_DISCONNECTED; 00049 } 00050 -00051 InspSocket::InspSocket(int newfd) +00051 InspSocket::InspSocket(int newfd, char* ip) 00052 { 00053 this->fd = newfd; 00054 this->state = I_CONNECTED; -00055 } -00056 -00057 InspSocket::InspSocket(std::string host, int port, bool listening, unsigned long maxtime) -00058 { -00059 if (listening) { -00060 if ((this->fd = OpenTCPSocket()) == ERROR) -00061 { -00062 this->fd = -1; -00063 this->state = I_ERROR; -00064 this->OnError(I_ERR_SOCKET); -00065 log(DEBUG,"OpenTCPSocket() error"); -00066 return; -00067 } -00068 else -00069 { -00070 if (BindSocket(this->fd,this->client,this->server,port,(char*)host.c_str()) == ERROR) -00071 { -00072 this->Close(); -00073 this->fd = -1; -00074 this->state = I_ERROR; -00075 this->OnError(I_ERR_BIND); -00076 log(DEBUG,"BindSocket() error %s",strerror(errno)); -00077 return; -00078 } -00079 else -00080 { -00081 this->state = I_LISTENING; -00082 log(DEBUG,"New socket now in I_LISTENING state"); -00083 return; -00084 } -00085 } -00086 } else { -00087 char* ip; -00088 this->host = host; -00089 hostent* hoste = gethostbyname(host.c_str()); -00090 if (!hoste) { -00091 ip = (char*)host.c_str(); -00092 } else { -00093 struct in_addr* ia = (in_addr*)hoste->h_addr; -00094 ip = inet_ntoa(*ia); -00095 } -00096 -00097 timeout_end = time(NULL)+maxtime; -00098 timeout = false; -00099 if ((this->fd = socket(AF_INET, SOCK_STREAM, 0)) == -1) -00100 { -00101 this->state = I_ERROR; -00102 this->OnError(I_ERR_SOCKET); -00103 return; -00104 } -00105 this->port = port; -00106 inet_aton(ip,&addy); -00107 addr.sin_family = AF_INET; -00108 addr.sin_addr = addy; -00109 addr.sin_port = htons(this->port); -00110 -00111 int flags; -00112 flags = fcntl(this->fd, F_GETFL, 0); -00113 fcntl(this->fd, F_SETFL, flags | O_NONBLOCK); -00114 -00115 if(connect(this->fd, (sockaddr*)&this->addr,sizeof(this->addr)) == -1) -00116 { -00117 if (errno != EINPROGRESS) -00118 { -00119 this->Close(); -00120 this->OnError(I_ERR_CONNECT); -00121 this->state = I_ERROR; -00122 return; -00123 } -00124 } -00125 this->state = I_CONNECTING; -00126 return; -00127 } -00128 } -00129 -00130 void InspSocket::Close() -00131 { -00132 if (this->fd != -1) -00133 { -00134 this->OnClose(); -00135 shutdown(this->fd,2); -00136 close(this->fd); -00137 this->fd = -1; -00138 } -00139 } -00140 -00141 char* InspSocket::Read() -00142 { -00143 int n = recv(this->fd,this->ibuf,sizeof(this->ibuf),0); -00144 if (n > 0) -00145 { -00146 ibuf[n] = 0; -00147 return ibuf; -00148 } -00149 else -00150 { -00151 log(DEBUG,"EOF or error on socket"); -00152 return NULL; -00153 } -00154 } -00155 -00156 // There are two possible outcomes to this function. -00157 // It will either write all of the data, or an undefined amount. -00158 // If an undefined amount is written the connection has failed -00159 // and should be aborted. -00160 int InspSocket::Write(std::string data) -00161 { -00162 char* d = (char*)data.c_str(); -00163 unsigned int written = 0; -00164 int n = 0; -00165 int s = data.length(); -00166 while ((written < data.length()) && (n >= 0)) -00167 { -00168 n = send(this->fd,d,s,0); -00169 if (n > 0) -00170 { -00171 // If we didnt write everything, advance -00172 // the pointers so that when we retry -00173 // the next time around the loop, we try -00174 // to write what we failed to write before. -00175 written += n; -00176 s -= n; -00177 d += n; -00178 } -00179 } -00180 return written; -00181 } -00182 -00183 bool InspSocket::Poll() -00184 { -00185 if ((time(NULL) > timeout_end) && (this->state == I_CONNECTING)) -00186 { -00187 // for non-listening sockets, the timeout can occur -00188 // which causes termination of the connection after -00189 // the given number of seconds without a successful -00190 // connection. -00191 this->OnTimeout(); -00192 this->OnError(I_ERR_TIMEOUT); -00193 timeout = true; -00194 this->state = I_ERROR; -00195 return false; -00196 } -00197 polls.fd = this->fd; -00198 state == I_CONNECTING ? polls.events = POLLOUT : polls.events = POLLIN; -00199 int ret = poll(&polls,1,1); -00200 -00201 if (ret > 0) -00202 { -00203 int incoming = -1; -00204 -00205 switch (this->state) -00206 { -00207 case I_CONNECTING: -00208 this->SetState(I_CONNECTED); -00209 return this->OnConnected(); -00210 break; -00211 case I_LISTENING: -00212 length = sizeof (client); -00213 incoming = accept (this->fd, (sockaddr*)&client,&length); -00214 this->OnIncomingConnection(incoming,inet_ntoa(client.sin_addr)); -00215 return true; -00216 break; -00217 case I_CONNECTED: -00218 return this->OnDataReady(); -00219 break; -00220 default: -00221 break; -00222 } -00223 } -00224 return true; -00225 } -00226 -00227 void InspSocket::SetState(InspSocketState s) -00228 { -00229 log(DEBUG,"Socket state change"); -00230 this->state = s; -00231 } -00232 -00233 InspSocketState InspSocket::GetState() -00234 { -00235 return this->state; -00236 } -00237 -00238 bool InspSocket::OnConnected() { return true; } -00239 void InspSocket::OnError(InspSocketError e) { return; } -00240 int InspSocket::OnDisconnect() { return 0; } -00241 int InspSocket::OnIncomingConnection(int newfd, char* ip) { return 0; } -00242 bool InspSocket::OnDataReady() { return true; } -00243 void InspSocket::OnTimeout() { return; } -00244 void InspSocket::OnClose() { return; } +00055 this->IP = ip; +00056 } +00057 +00058 InspSocket::InspSocket(std::string host, int port, bool listening, unsigned long maxtime) +00059 { +00060 if (listening) { +00061 if ((this->fd = OpenTCPSocket()) == ERROR) +00062 { +00063 this->fd = -1; +00064 this->state = I_ERROR; +00065 this->OnError(I_ERR_SOCKET); +00066 log(DEBUG,"OpenTCPSocket() error"); +00067 return; +00068 } +00069 else +00070 { +00071 if (BindSocket(this->fd,this->client,this->server,port,(char*)host.c_str()) == ERROR) +00072 { +00073 this->Close(); +00074 this->fd = -1; +00075 this->state = I_ERROR; +00076 this->OnError(I_ERR_BIND); +00077 log(DEBUG,"BindSocket() error %s",strerror(errno)); +00078 return; +00079 } +00080 else +00081 { +00082 this->state = I_LISTENING; +00083 log(DEBUG,"New socket now in I_LISTENING state"); +00084 return; +00085 } +00086 } +00087 } else { +00088 char* ip; +00089 this->host = host; +00090 hostent* hoste = gethostbyname(host.c_str()); +00091 if (!hoste) { +00092 ip = (char*)host.c_str(); +00093 } else { +00094 struct in_addr* ia = (in_addr*)hoste->h_addr; +00095 ip = inet_ntoa(*ia); +00096 } +00097 +00098 this->IP = ip; +00099 +00100 timeout_end = time(NULL)+maxtime; +00101 timeout = false; +00102 if ((this->fd = socket(AF_INET, SOCK_STREAM, 0)) == -1) +00103 { +00104 this->state = I_ERROR; +00105 this->OnError(I_ERR_SOCKET); +00106 return; +00107 } +00108 this->port = port; +00109 inet_aton(ip,&addy); +00110 addr.sin_family = AF_INET; +00111 addr.sin_addr = addy; +00112 addr.sin_port = htons(this->port); +00113 +00114 int flags; +00115 flags = fcntl(this->fd, F_GETFL, 0); +00116 fcntl(this->fd, F_SETFL, flags | O_NONBLOCK); +00117 +00118 if(connect(this->fd, (sockaddr*)&this->addr,sizeof(this->addr)) == -1) +00119 { +00120 if (errno != EINPROGRESS) +00121 { +00122 this->Close(); +00123 this->OnError(I_ERR_CONNECT); +00124 this->state = I_ERROR; +00125 return; +00126 } +00127 } +00128 this->state = I_CONNECTING; +00129 return; +00130 } +00131 } +00132 +00133 void InspSocket::Close() +00134 { +00135 if (this->fd != -1) +00136 { +00137 this->OnClose(); +00138 shutdown(this->fd,2); +00139 close(this->fd); +00140 this->fd = -1; +00141 } +00142 } +00143 +00144 std::string InspSocket::GetIP() +00145 { +00146 return this->IP; +00147 } +00148 +00149 char* InspSocket::Read() +00150 { +00151 int n = recv(this->fd,this->ibuf,sizeof(this->ibuf),0); +00152 if (n > 0) +00153 { +00154 ibuf[n] = 0; +00155 return ibuf; +00156 } +00157 else +00158 { +00159 log(DEBUG,"EOF or error on socket"); +00160 return NULL; +00161 } +00162 } +00163 +00164 // There are two possible outcomes to this function. +00165 // It will either write all of the data, or an undefined amount. +00166 // If an undefined amount is written the connection has failed +00167 // and should be aborted. +00168 int InspSocket::Write(std::string data) +00169 { +00170 char* d = (char*)data.c_str(); +00171 unsigned int written = 0; +00172 int n = 0; +00173 int s = data.length(); +00174 while ((written < data.length()) && (n >= 0)) +00175 { +00176 n = send(this->fd,d,s,0); +00177 if (n > 0) +00178 { +00179 // If we didnt write everything, advance +00180 // the pointers so that when we retry +00181 // the next time around the loop, we try +00182 // to write what we failed to write before. +00183 written += n; +00184 s -= n; +00185 d += n; +00186 } +00187 } +00188 return written; +00189 } +00190 +00191 bool InspSocket::Poll() +00192 { +00193 if ((time(NULL) > timeout_end) && (this->state == I_CONNECTING)) +00194 { +00195 // for non-listening sockets, the timeout can occur +00196 // which causes termination of the connection after +00197 // the given number of seconds without a successful +00198 // connection. +00199 this->OnTimeout(); +00200 this->OnError(I_ERR_TIMEOUT); +00201 timeout = true; +00202 this->state = I_ERROR; +00203 return false; +00204 } +00205 polls.fd = this->fd; +00206 state == I_CONNECTING ? polls.events = POLLOUT : polls.events = POLLIN; +00207 int ret = poll(&polls,1,1); +00208 +00209 if (ret > 0) +00210 { +00211 int incoming = -1; +00212 +00213 switch (this->state) +00214 { +00215 case I_CONNECTING: +00216 this->SetState(I_CONNECTED); +00217 return this->OnConnected(); +00218 break; +00219 case I_LISTENING: +00220 length = sizeof (client); +00221 incoming = accept (this->fd, (sockaddr*)&client,&length); +00222 this->OnIncomingConnection(incoming,inet_ntoa(client.sin_addr)); +00223 return true; +00224 break; +00225 case I_CONNECTED: +00226 return this->OnDataReady(); +00227 break; +00228 default: +00229 break; +00230 } +00231 } +00232 return true; +00233 } +00234 +00235 void InspSocket::SetState(InspSocketState s) +00236 { +00237 log(DEBUG,"Socket state change"); +00238 this->state = s; +00239 } +00240 +00241 InspSocketState InspSocket::GetState() +00242 { +00243 return this->state; +00244 } 00245 -00246 InspSocket::~InspSocket() -00247 { -00248 this->Close(); -00249 } -00250 -00251 /* -00252 int BindSocket (int sockfd, struct sockaddr_in client, struct sockaddr_in server, int port, char* addr) -00253 int OpenTCPSocket (void) -00254 */ -

    Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +00246 bool InspSocket::OnConnected() { return true; } +00247 void InspSocket::OnError(InspSocketError e) { return; } +00248 int InspSocket::OnDisconnect() { return 0; } +00249 int InspSocket::OnIncomingConnection(int newfd, char* ip) { return 0; } +00250 bool InspSocket::OnDataReady() { return true; } +00251 void InspSocket::OnTimeout() { return; } +00252 void InspSocket::OnClose() { return; } +00253 +00254 InspSocket::~InspSocket() +00255 { +00256 this->Close(); +00257 } +00258 +00259 /* +00260 int BindSocket (int sockfd, struct sockaddr_in client, struct sockaddr_in server, int port, char* addr) +00261 int OpenTCPSocket (void) +00262 */ +

    Generated on Fri Dec 9 20:20:03 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/socket_8cpp.html b/docs/module-doc/socket_8cpp.html index 1c55c0030..a600dc335 100644 --- a/docs/module-doc/socket_8cpp.html +++ b/docs/module-doc/socket_8cpp.html @@ -189,7 +189,7 @@ Include dependency graph for socket.cpp:

    Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:09 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/socket_8h-source.html b/docs/module-doc/socket_8h-source.html index 402dc31cf..cd591d23e 100644 --- a/docs/module-doc/socket_8h-source.html +++ b/docs/module-doc/socket_8h-source.html @@ -48,32 +48,34 @@ 00039 time_t timeout_end; 00040 bool timeout; 00041 pollfd polls; -00042 char ibuf[1024]; -00043 sockaddr_in client; -00044 sockaddr_in server; -00045 socklen_t length; -00046 public: -00047 InspSocket(); -00048 InspSocket(int newfd); -00049 InspSocket(std::string host, int port, bool listening, unsigned long maxtime); -00050 virtual bool OnConnected(); -00051 virtual void OnError(InspSocketError e); -00052 virtual int OnDisconnect(); -00053 virtual bool OnDataReady(); -00054 virtual void OnTimeout(); -00055 virtual void OnClose(); -00056 virtual char* Read(); -00057 virtual int Write(std::string data); -00058 virtual int OnIncomingConnection(int newfd, char* ip); -00059 void SetState(InspSocketState s); -00060 InspSocketState GetState(); -00061 bool Poll(); -00062 virtual void Close(); -00063 virtual ~InspSocket(); -00064 }; -00065 -00066 #endif -

    Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +00042 char ibuf[16384]; +00043 std::string IP; +00044 sockaddr_in client; +00045 sockaddr_in server; +00046 socklen_t length; +00047 public: +00048 InspSocket(); +00049 InspSocket(int newfd, char* ip); +00050 InspSocket(std::string host, int port, bool listening, unsigned long maxtime); +00051 virtual bool OnConnected(); +00052 virtual void OnError(InspSocketError e); +00053 virtual int OnDisconnect(); +00054 virtual bool OnDataReady(); +00055 virtual void OnTimeout(); +00056 virtual void OnClose(); +00057 virtual char* Read(); +00058 std::string GetIP(); +00059 virtual int Write(std::string data); +00060 virtual int OnIncomingConnection(int newfd, char* ip); +00061 void SetState(InspSocketState s); +00062 InspSocketState GetState(); +00063 bool Poll(); +00064 virtual void Close(); +00065 virtual ~InspSocket(); +00066 }; +00067 +00068 #endif +

    Generated on Fri Dec 9 20:20:03 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/socket_8h.html b/docs/module-doc/socket_8h.html index b26832053..09b395e38 100644 --- a/docs/module-doc/socket_8h.html +++ b/docs/module-doc/socket_8h.html @@ -133,7 +133,7 @@ Definition at line 27 of f -
    Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:09 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/structdns__ip4list-members.html b/docs/module-doc/structdns__ip4list-members.html index 4b2855396..40ab17ab3 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 Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/structdns__ip4list.html b/docs/module-doc/structdns__ip4list.html index 4a6a3e921..5e9a9e17c 100644 --- a/docs/module-doc/structdns__ip4list.html +++ b/docs/module-doc/structdns__ip4list.html @@ -74,7 +74,7 @@ Definition at line 28 of file
    The documentation for this struct was generated from the following file: -
    Generated on Sun Nov 27 01:43:25 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:11 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/structirc_1_1InAddr__HashComp-members.html b/docs/module-doc/structirc_1_1InAddr__HashComp-members.html index 0198d581e..f5693f7f1 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) const irc::InAddr_HashComp


    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/structirc_1_1InAddr__HashComp.html b/docs/module-doc/structirc_1_1InAddr__HashComp.html index a93b6035c..83e07d260 100644 --- a/docs/module-doc/structirc_1_1InAddr__HashComp.html +++ b/docs/module-doc/structirc_1_1InAddr__HashComp.html @@ -68,7 +68,7 @@ The operator () does the actual comparison in hash_map.
    The documentation for this struct was generated from the following file: -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/structirc_1_1StrHashComp-members.html b/docs/module-doc/structirc_1_1StrHashComp-members.html index 6bc0b384a..9bf858e6c 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) const irc::StrHashComp


    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/structirc_1_1StrHashComp.html b/docs/module-doc/structirc_1_1StrHashComp.html index 569019152..5c6c1c97d 100644 --- a/docs/module-doc/structirc_1_1StrHashComp.html +++ b/docs/module-doc/structirc_1_1StrHashComp.html @@ -68,7 +68,7 @@ The operator () does the actual comparison in hash_map.
    The documentation for this struct was generated from the following file: -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    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 ac56cb2de..f40a3458d 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 Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/structirc_1_1irc__char__traits.html b/docs/module-doc/structirc_1_1irc__char__traits.html index dc297bac9..60ad0d63e 100644 --- a/docs/module-doc/structirc_1_1irc__char__traits.html +++ b/docs/module-doc/structirc_1_1irc__char__traits.html @@ -256,7 +256,7 @@ Check if two chars do NOT match.
    The documentation for this struct was generated from the following file: -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/structnspace_1_1hash_3_01in__addr_01_4-members.html b/docs/module-doc/structnspace_1_1hash_3_01in__addr_01_4-members.html index 0401fd8c5..00a4cfb59 100644 --- a/docs/module-doc/structnspace_1_1hash_3_01in__addr_01_4-members.html +++ b/docs/module-doc/structnspace_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) const nspace::hash< in_addr >


    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/structnspace_1_1hash_3_01in__addr_01_4.html b/docs/module-doc/structnspace_1_1hash_3_01in__addr_01_4.html index 1556a6eaa..439e9c023 100644 --- a/docs/module-doc/structnspace_1_1hash_3_01in__addr_01_4.html +++ b/docs/module-doc/structnspace_1_1hash_3_01in__addr_01_4.html @@ -54,7 +54,7 @@ Definition at line 54 of
    The documentation for this struct was generated from the following file: -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/structnspace_1_1hash_3_01string_01_4-members.html b/docs/module-doc/structnspace_1_1hash_3_01string_01_4-members.html index 55cf95fd1..94058dcac 100644 --- a/docs/module-doc/structnspace_1_1hash_3_01string_01_4-members.html +++ b/docs/module-doc/structnspace_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) const nspace::hash< string >


    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/structnspace_1_1hash_3_01string_01_4.html b/docs/module-doc/structnspace_1_1hash_3_01string_01_4.html index 9b48cfc45..a963e1d80 100644 --- a/docs/module-doc/structnspace_1_1hash_3_01string_01_4.html +++ b/docs/module-doc/structnspace_1_1hash_3_01string_01_4.html @@ -54,7 +54,7 @@ Definition at line 62 of
    The documentation for this struct was generated from the following file: -
    Generated on Sun Nov 27 01:43:27 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:13 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/users_8cpp-source.html b/docs/module-doc/users_8cpp-source.html index 78de98822..4254d8509 100644 --- a/docs/module-doc/users_8cpp-source.html +++ b/docs/module-doc/users_8cpp-source.html @@ -31,282 +31,293 @@ 00022 #include "users.h" 00023 #include "inspircd.h" 00024 #include <stdio.h> -00025 #include "inspstring.h" -00026 #include "helperfuncs.h" -00027 -00028 extern std::stringstream config_f; -00029 extern char ServerName[MAXBUF]; -00030 -00031 extern time_t TIME; +00025 #ifdef THREADED_DNS +00026 #include <pthread.h> +00027 #include <signal.h> +00028 #endif +00029 #include "inspstring.h" +00030 #include "commands.h" +00031 #include "helperfuncs.h" 00032 -00033 userrec::userrec() -00034 { -00035 // the PROPER way to do it, AVOID bzero at *ALL* costs -00036 strcpy(nick,""); -00037 strcpy(ip,"127.0.0.1"); -00038 timeout = 0; -00039 strcpy(ident,""); -00040 strcpy(host,""); -00041 strcpy(dhost,""); -00042 strcpy(fullname,""); -00043 strcpy(modes,""); -00044 server = (char*)FindServerNamePtr(ServerName); -00045 strcpy(awaymsg,""); -00046 strcpy(oper,""); -00047 reset_due = TIME; -00048 lines_in = 0; -00049 fd = lastping = signon = idle_lastmsg = nping = registered = 0; -00050 flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0; -00051 haspassed = false; -00052 dns_done = false; -00053 recvq = ""; -00054 sendq = ""; -00055 for (int i = 0; i < MAXCHANS; i++) -00056 { -00057 this->chans[i].channel = NULL; -00058 this->chans[i].uc_modes = 0; -00059 } -00060 invites.clear(); -00061 } -00062 -00063 void userrec::CloseSocket() -00064 { -00065 shutdown(this->fd,2); -00066 close(this->fd); -00067 } -00068 -00069 char* userrec::GetFullHost() -00070 { -00071 static char result[MAXBUF]; -00072 snprintf(result,MAXBUF,"%s!%s@%s",nick,ident,dhost); -00073 return result; -00074 } -00075 -00076 int userrec::ReadData(void* buffer, size_t size) -00077 { -00078 if (this->fd > -1) -00079 { -00080 log(DEBUG,"userrec::ReadData on fd %d",this->fd); -00081 return read(this->fd, buffer, size); -00082 } -00083 else return 0; -00084 } -00085 -00086 -00087 char* userrec::GetFullRealHost() -00088 { -00089 static char fresult[MAXBUF]; -00090 snprintf(fresult,MAXBUF,"%s!%s@%s",nick,ident,host); -00091 return fresult; -00092 } -00093 -00094 bool userrec::IsInvited(char* channel) -00095 { -00096 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) -00097 { -00098 if (i->channel) { -00099 if (!strcasecmp(i->channel,channel)) -00100 { -00101 return true; -00102 } -00103 } -00104 } -00105 return false; -00106 } -00107 -00108 InvitedList* userrec::GetInviteList() -00109 { -00110 return &invites; -00111 } -00112 -00113 void userrec::InviteTo(char* channel) -00114 { -00115 Invited i; -00116 strlcpy(i.channel,channel,CHANMAX); -00117 invites.push_back(i); -00118 } -00119 -00120 void userrec::RemoveInvite(char* channel) -00121 { -00122 log(DEBUG,"Removing invites"); -00123 if (channel) -00124 { -00125 if (invites.size()) -00126 { -00127 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) -00128 { -00129 if (i->channel) -00130 { -00131 if (!strcasecmp(i->channel,channel)) -00132 { -00133 invites.erase(i); -00134 return; -00135 } -00136 } -00137 } -00138 } -00139 } -00140 } -00141 -00142 bool userrec::HasPermission(char* command) -00143 { -00144 char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF]; -00145 char* mycmd; -00146 char* savept; -00147 char* savept2; -00148 -00149 // are they even an oper at all? -00150 if (strchr(this->modes,'o')) -00151 { -00152 log(DEBUG,"*** HasPermission: %s is an oper",this->nick); -00153 for (int j =0; j < ConfValueEnum("type",&config_f); j++) -00154 { -00155 ConfValue("type","name",j,TypeName,&config_f); -00156 if (!strcmp(TypeName,this->oper)) -00157 { -00158 log(DEBUG,"*** HasPermission: %s is an oper of type '%s'",this->nick,this->oper); -00159 ConfValue("type","classes",j,Classes,&config_f); -00160 char* myclass = strtok_r(Classes," ",&savept); -00161 while (myclass) -00162 { -00163 log(DEBUG,"*** HasPermission: checking classtype '%s'",myclass); -00164 for (int k =0; k < ConfValueEnum("class",&config_f); k++) -00165 { -00166 ConfValue("class","name",k,ClassName,&config_f); -00167 if (!strcmp(ClassName,myclass)) -00168 { -00169 ConfValue("class","commands",k,CommandList,&config_f); -00170 log(DEBUG,"*** HasPermission: found class named %s with commands: '%s'",ClassName,CommandList); -00171 -00172 -00173 mycmd = strtok_r(CommandList," ",&savept2); -00174 while (mycmd) -00175 { -00176 if (!strcasecmp(mycmd,command)) -00177 { -00178 log(DEBUG,"*** Command %s found, returning true",command); -00179 return true; -00180 } -00181 mycmd = strtok_r(NULL," ",&savept2); -00182 } -00183 } -00184 } -00185 myclass = strtok_r(NULL," ",&savept); -00186 } -00187 } -00188 } -00189 } -00190 return false; -00191 } -00192 -00193 -00194 bool userrec::AddBuffer(std::string a) -00195 { -00196 std::string b = ""; -00197 for (unsigned int i = 0; i < a.length(); i++) -00198 if ((a[i] != '\r') && (a[i] != '\0') && (a[i] != 7)) -00199 b = b + a[i]; -00200 std::stringstream stream(recvq); -00201 stream << b; -00202 recvq = stream.str(); -00203 unsigned int i = 0; -00204 // count the size of the first line in the buffer. -00205 while (i < recvq.length()) -00206 { -00207 if (recvq[i++] == '\n') -00208 break; -00209 } -00210 if (recvq.length() > (unsigned)this->recvqmax) -00211 { -00212 this->SetWriteError("RecvQ exceeded"); -00213 WriteOpers("*** User %s RecvQ of %d exceeds connect class maximum of %d",this->nick,recvq.length(),this->recvqmax); -00214 } -00215 // return false if we've had more than 600 characters WITHOUT -00216 // a carriage return (this is BAD, drop the socket) -00217 return (i < 600); -00218 } -00219 -00220 bool userrec::BufferIsReady() -00221 { -00222 for (unsigned int i = 0; i < recvq.length(); i++) -00223 if (recvq[i] == '\n') -00224 return true; -00225 return false; -00226 } -00227 -00228 void userrec::ClearBuffer() -00229 { -00230 recvq = ""; -00231 } -00232 -00233 std::string userrec::GetBuffer() -00234 { -00235 if (recvq == "") -00236 return ""; -00237 char* line = (char*)recvq.c_str(); -00238 std::string ret = ""; -00239 while ((*line != '\n') && (strlen(line))) -00240 { -00241 ret = ret + *line; -00242 line++; -00243 } -00244 if ((*line == '\n') || (*line == '\r')) -00245 line++; -00246 recvq = line; -00247 return ret; -00248 } -00249 -00250 void userrec::AddWriteBuf(std::string data) -00251 { -00252 if (this->GetWriteError() != "") -00253 return; -00254 if (sendq.length() + data.length() > (unsigned)this->sendqmax) -00255 { -00256 WriteOpers("*** User %s SendQ of %d exceeds connect class maximum of %d",this->nick,sendq.length() + data.length(),this->sendqmax); -00257 this->SetWriteError("SendQ exceeded"); -00258 return; -00259 } -00260 std::stringstream stream; -00261 stream << sendq << data; -00262 sendq = stream.str(); -00263 } -00264 -00265 // send AS MUCH OF THE USERS SENDQ as we are able to (might not be all of it) -00266 void userrec::FlushWriteBuf() -00267 { -00268 if (sendq.length()) -00269 { -00270 char* tb = (char*)this->sendq.c_str(); -00271 int n_sent = write(this->fd,tb,this->sendq.length()); -00272 if (n_sent == -1) -00273 { -00274 this->SetWriteError(strerror(errno)); -00275 } -00276 else -00277 { -00278 // advance the queue -00279 tb += n_sent; -00280 this->sendq = tb; -00281 // update the user's stats counters -00282 this->bytes_out += n_sent; -00283 this->cmds_out++; -00284 } -00285 } -00286 } -00287 -00288 void userrec::SetWriteError(std::string error) -00289 { -00290 log(DEBUG,"Setting error string for %s to '%s'",this->nick,error.c_str()); -00291 // don't try to set the error twice, its already set take the first string. -00292 if (this->WriteError == "") -00293 this->WriteError = error; -00294 } -00295 -00296 std::string userrec::GetWriteError() -00297 { -00298 return this->WriteError; -00299 } -

    Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +00033 extern std::stringstream config_f; +00034 extern char ServerName[MAXBUF]; +00035 +00036 extern time_t TIME; +00037 +00038 userrec::userrec() +00039 { +00040 // the PROPER way to do it, AVOID bzero at *ALL* costs +00041 strcpy(nick,""); +00042 strcpy(ip,"127.0.0.1"); +00043 timeout = 0; +00044 strcpy(ident,""); +00045 strcpy(host,""); +00046 strcpy(dhost,""); +00047 strcpy(fullname,""); +00048 strcpy(modes,""); +00049 server = (char*)FindServerNamePtr(ServerName); +00050 strcpy(awaymsg,""); +00051 strcpy(oper,""); +00052 reset_due = TIME; +00053 lines_in = 0; +00054 fd = lastping = signon = idle_lastmsg = nping = registered = 0; +00055 flood = port = bytes_in = bytes_out = cmds_in = cmds_out = 0; +00056 haspassed = false; +00057 dns_done = false; +00058 recvq = ""; +00059 sendq = ""; +00060 for (int i = 0; i < MAXCHANS; i++) +00061 { +00062 this->chans[i].channel = NULL; +00063 this->chans[i].uc_modes = 0; +00064 } +00065 invites.clear(); +00066 } +00067 +00068 userrec::~userrec() +00069 { +00070 } +00071 +00072 void userrec::CloseSocket() +00073 { +00074 shutdown(this->fd,2); +00075 close(this->fd); +00076 } +00077 +00078 char* userrec::GetFullHost() +00079 { +00080 static char result[MAXBUF]; +00081 snprintf(result,MAXBUF,"%s!%s@%s",nick,ident,dhost); +00082 return result; +00083 } +00084 +00085 int userrec::ReadData(void* buffer, size_t size) +00086 { +00087 if (this->fd > -1) +00088 { +00089 log(DEBUG,"userrec::ReadData on fd %d",this->fd); +00090 return read(this->fd, buffer, size); +00091 } +00092 else return 0; +00093 } +00094 +00095 +00096 char* userrec::GetFullRealHost() +00097 { +00098 static char fresult[MAXBUF]; +00099 snprintf(fresult,MAXBUF,"%s!%s@%s",nick,ident,host); +00100 return fresult; +00101 } +00102 +00103 bool userrec::IsInvited(char* channel) +00104 { +00105 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) +00106 { +00107 if (i->channel) { +00108 if (!strcasecmp(i->channel,channel)) +00109 { +00110 return true; +00111 } +00112 } +00113 } +00114 return false; +00115 } +00116 +00117 InvitedList* userrec::GetInviteList() +00118 { +00119 return &invites; +00120 } +00121 +00122 void userrec::InviteTo(char* channel) +00123 { +00124 Invited i; +00125 strlcpy(i.channel,channel,CHANMAX); +00126 invites.push_back(i); +00127 } +00128 +00129 void userrec::RemoveInvite(char* channel) +00130 { +00131 log(DEBUG,"Removing invites"); +00132 if (channel) +00133 { +00134 if (invites.size()) +00135 { +00136 for (InvitedList::iterator i = invites.begin(); i != invites.end(); i++) +00137 { +00138 if (i->channel) +00139 { +00140 if (!strcasecmp(i->channel,channel)) +00141 { +00142 invites.erase(i); +00143 return; +00144 } +00145 } +00146 } +00147 } +00148 } +00149 } +00150 +00151 bool userrec::HasPermission(char* command) +00152 { +00153 char TypeName[MAXBUF],Classes[MAXBUF],ClassName[MAXBUF],CommandList[MAXBUF]; +00154 char* mycmd; +00155 char* savept; +00156 char* savept2; +00157 +00158 // users on u-lined servers can completely bypass +00159 // all permissions based checks. +00160 // +00161 // of course, if this is sent to a remote server and this +00162 // server is not ulined there, then that other server +00163 // silently drops the command. +00164 if (is_uline(this->server)) +00165 return true; +00166 +00167 // are they even an oper at all? +00168 if (strchr(this->modes,'o')) +00169 { +00170 for (int j =0; j < ConfValueEnum("type",&config_f); j++) +00171 { +00172 ConfValue("type","name",j,TypeName,&config_f); +00173 if (!strcmp(TypeName,this->oper)) +00174 { +00175 ConfValue("type","classes",j,Classes,&config_f); +00176 char* myclass = strtok_r(Classes," ",&savept); +00177 while (myclass) +00178 { +00179 for (int k =0; k < ConfValueEnum("class",&config_f); k++) +00180 { +00181 ConfValue("class","name",k,ClassName,&config_f); +00182 if (!strcmp(ClassName,myclass)) +00183 { +00184 ConfValue("class","commands",k,CommandList,&config_f); +00185 mycmd = strtok_r(CommandList," ",&savept2); +00186 while (mycmd) +00187 { +00188 if ((!strcasecmp(mycmd,command)) || (*mycmd == '*')) +00189 { +00190 return true; +00191 } +00192 mycmd = strtok_r(NULL," ",&savept2); +00193 } +00194 } +00195 } +00196 myclass = strtok_r(NULL," ",&savept); +00197 } +00198 } +00199 } +00200 } +00201 return false; +00202 } +00203 +00204 +00205 bool userrec::AddBuffer(std::string a) +00206 { +00207 std::string b = ""; +00208 for (unsigned int i = 0; i < a.length(); i++) +00209 if ((a[i] != '\r') && (a[i] != '\0') && (a[i] != 7)) +00210 b = b + a[i]; +00211 std::stringstream stream(recvq); +00212 stream << b; +00213 recvq = stream.str(); +00214 unsigned int i = 0; +00215 // count the size of the first line in the buffer. +00216 while (i < recvq.length()) +00217 { +00218 if (recvq[i++] == '\n') +00219 break; +00220 } +00221 if (recvq.length() > (unsigned)this->recvqmax) +00222 { +00223 this->SetWriteError("RecvQ exceeded"); +00224 WriteOpers("*** User %s RecvQ of %d exceeds connect class maximum of %d",this->nick,recvq.length(),this->recvqmax); +00225 } +00226 // return false if we've had more than 600 characters WITHOUT +00227 // a carriage return (this is BAD, drop the socket) +00228 return (i < 600); +00229 } +00230 +00231 bool userrec::BufferIsReady() +00232 { +00233 for (unsigned int i = 0; i < recvq.length(); i++) +00234 if (recvq[i] == '\n') +00235 return true; +00236 return false; +00237 } +00238 +00239 void userrec::ClearBuffer() +00240 { +00241 recvq = ""; +00242 } +00243 +00244 std::string userrec::GetBuffer() +00245 { +00246 if (recvq == "") +00247 return ""; +00248 char* line = (char*)recvq.c_str(); +00249 std::string ret = ""; +00250 while ((*line != '\n') && (strlen(line))) +00251 { +00252 ret = ret + *line; +00253 line++; +00254 } +00255 if ((*line == '\n') || (*line == '\r')) +00256 line++; +00257 recvq = line; +00258 return ret; +00259 } +00260 +00261 void userrec::AddWriteBuf(std::string data) +00262 { +00263 if (this->GetWriteError() != "") +00264 return; +00265 if (sendq.length() + data.length() > (unsigned)this->sendqmax) +00266 { +00267 WriteOpers("*** User %s SendQ of %d exceeds connect class maximum of %d",this->nick,sendq.length() + data.length(),this->sendqmax); +00268 this->SetWriteError("SendQ exceeded"); +00269 return; +00270 } +00271 std::stringstream stream; +00272 stream << sendq << data; +00273 sendq = stream.str(); +00274 } +00275 +00276 // send AS MUCH OF THE USERS SENDQ as we are able to (might not be all of it) +00277 void userrec::FlushWriteBuf() +00278 { +00279 if (sendq.length()) +00280 { +00281 char* tb = (char*)this->sendq.c_str(); +00282 int n_sent = write(this->fd,tb,this->sendq.length()); +00283 if (n_sent == -1) +00284 { +00285 this->SetWriteError(strerror(errno)); +00286 } +00287 else +00288 { +00289 // advance the queue +00290 tb += n_sent; +00291 this->sendq = tb; +00292 // update the user's stats counters +00293 this->bytes_out += n_sent; +00294 this->cmds_out++; +00295 } +00296 } +00297 } +00298 +00299 void userrec::SetWriteError(std::string error) +00300 { +00301 log(DEBUG,"Setting error string for %s to '%s'",this->nick,error.c_str()); +00302 // don't try to set the error twice, its already set take the first string. +00303 if (this->WriteError == "") +00304 this->WriteError = error; +00305 } +00306 +00307 std::string userrec::GetWriteError() +00308 { +00309 return this->WriteError; +00310 } +

    Generated on Fri Dec 9 20:20:03 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/users_8cpp.html b/docs/module-doc/users_8cpp.html index 53e2b3431..c0507b2e0 100644 --- a/docs/module-doc/users_8cpp.html +++ b/docs/module-doc/users_8cpp.html @@ -14,14 +14,16 @@ #include "inspircd.h"
    #include <stdio.h>
    #include "inspstring.h"
    +#include "commands.h"
    #include "helperfuncs.h"

    Include dependency graph for users.cpp:

    - - - + + + +

    @@ -105,7 +107,7 @@ Include dependency graph for users.cpp:

    Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:09 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/users_8cpp__incl.gif b/docs/module-doc/users_8cpp__incl.gif index 0271baf2e..5126e18e3 100644 Binary files a/docs/module-doc/users_8cpp__incl.gif and b/docs/module-doc/users_8cpp__incl.gif differ diff --git a/docs/module-doc/users_8cpp__incl.map b/docs/module-doc/users_8cpp__incl.map index 250202e80..12be62e4b 100644 --- a/docs/module-doc/users_8cpp__incl.map +++ b/docs/module-doc/users_8cpp__incl.map @@ -1,4 +1,5 @@ base referer -rect $channels_8h-source.html 294,159 379,186 -rect $connection_8h-source.html 287,58 386,84 -rect $users_8h-source.html 155,108 219,135 +rect $channels_8h-source.html 408,132 493,159 +rect $connection_8h-source.html 401,233 500,260 +rect $users_8h-source.html 288,183 352,209 +rect $commands_8h-source.html 137,132 236,159 diff --git a/docs/module-doc/users_8cpp__incl.md5 b/docs/module-doc/users_8cpp__incl.md5 index 45df1e870..e8c9aae41 100644 --- a/docs/module-doc/users_8cpp__incl.md5 +++ b/docs/module-doc/users_8cpp__incl.md5 @@ -1 +1 @@ -58b13cc74add16d3b6bac215c7ef17ab \ No newline at end of file +2fa94c1471f03be385dba85c3d44dac3 \ No newline at end of file diff --git a/docs/module-doc/users_8h-source.html b/docs/module-doc/users_8h-source.html index 38f9cd109..f355eeb54 100644 --- a/docs/module-doc/users_8h-source.html +++ b/docs/module-doc/users_8h-source.html @@ -28,164 +28,171 @@ 00019 #include "inspstring.h" 00020 #include "connection.h" 00021 #include <string> -00022 -00023 #ifndef __USERS_H__ -00024 #define __USERS_H__ +00022 #ifdef THREADED_DNS +00023 #include <pthread.h> +00024 #endif 00025 -00026 #define STATUS_OP 4 -00027 #define STATUS_HOP 2 -00028 #define STATUS_VOICE 1 -00029 #define STATUS_NORMAL 0 -00030 -00031 #define CC_ALLOW 0 -00032 #define CC_DENY 1 +00026 #ifndef __USERS_H__ +00027 #define __USERS_H__ +00028 +00029 #define STATUS_OP 4 +00030 #define STATUS_HOP 2 +00031 #define STATUS_VOICE 1 +00032 #define STATUS_NORMAL 0 00033 -00036 class Invited : public classbase -00037 { -00038 public: -00039 char channel[CHANMAX]; -00040 }; -00041 -00042 -00045 class ConnectClass : public classbase -00046 { -00047 public: -00050 char type; -00053 int registration_timeout; -00056 int flood; -00059 char host[MAXBUF]; -00062 int pingtime; -00065 char pass[MAXBUF]; -00066 -00069 int threshold; -00070 -00073 long sendqmax; -00074 -00077 long recvqmax; -00078 -00079 ConnectClass() -00080 { -00081 registration_timeout = 0; -00082 flood = 0; -00083 pingtime = 0; -00084 threshold = 0; -00085 sendqmax = 0; -00086 recvqmax = 0; -00087 strlcpy(host,"",MAXBUF); -00088 strlcpy(pass,"",MAXBUF); -00089 } -00090 }; -00091 -00094 typedef std::vector<Invited> InvitedList; -00095 -00096 -00097 -00100 typedef std::vector<ConnectClass> ClassVector; -00101 -00108 class userrec : public connection -00109 { -00110 private: -00111 -00114 InvitedList invites; -00115 public: -00116 -00121 char nick[NICKMAX]; -00122 -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 -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 }; +00034 #define CC_ALLOW 0 +00035 #define CC_DENY 1 +00036 +00039 class Invited : public classbase +00040 { +00041 public: +00042 char channel[CHANMAX]; +00043 }; +00044 +00045 +00048 class ConnectClass : public classbase +00049 { +00050 public: +00053 char type; +00056 int registration_timeout; +00059 int flood; +00062 char host[MAXBUF]; +00065 int pingtime; +00068 char pass[MAXBUF]; +00069 +00072 int threshold; +00073 +00076 long sendqmax; +00077 +00080 long recvqmax; +00081 +00082 ConnectClass() +00083 { +00084 registration_timeout = 0; +00085 flood = 0; +00086 pingtime = 0; +00087 threshold = 0; +00088 sendqmax = 0; +00089 recvqmax = 0; +00090 strlcpy(host,"",MAXBUF); +00091 strlcpy(pass,"",MAXBUF); +00092 } +00093 }; +00094 +00097 typedef std::vector<Invited> InvitedList; +00098 +00099 +00100 +00103 typedef std::vector<ConnectClass> ClassVector; +00104 +00111 class userrec : public connection +00112 { +00113 private: +00114 +00117 InvitedList invites; +00118 public: +00119 +00124 char nick[NICKMAX]; +00125 +00129 char ident[IDENTMAX+2]; +00130 +00134 char dhost[160]; +00135 +00138 char fullname[MAXGECOS+1]; +00139 +00147 char modes[54]; +00148 +00149 ucrec chans[MAXCHANS]; +00150 +00153 char* server; +00154 +00158 char awaymsg[MAXAWAY+1]; +00159 +00164 int flood; +00165 +00170 unsigned int timeout; +00171 +00177 char oper[NICKMAX]; +00178 +00181 bool dns_done; +00182 +00185 unsigned int pingmax; +00186 +00191 char password[MAXBUF]; +00192 +00197 std::string recvq; +00198 +00202 std::string sendq; +00203 +00206 int lines_in; +00207 time_t reset_due; +00208 long threshold; +00209 +00210 /* Write error string +00211 */ +00212 std::string WriteError; +00213 +00216 long sendqmax; +00217 +00220 long recvqmax; +00221 +00222 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 -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 Sun Nov 27 01:43:24 2005 for InspIRCd by  +00323 virtual ~userrec(); +00324 +00325 #ifdef THREADED_DNS +00326 pthread_t dnsthread; +00327 #endif +00328 }; +00329 +00332 class WhoWasUser +00333 { +00334 public: +00335 char nick[NICKMAX]; +00336 char ident[IDENTMAX+1]; +00337 char dhost[160]; +00338 char host[160]; +00339 char fullname[MAXGECOS+1]; +00340 char server[256]; +00341 time_t signon; +00342 }; +00343 +00344 #endif +

    Generated on Fri Dec 9 20:20:03 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/users_8h.html b/docs/module-doc/users_8h.html index c26992c15..5a1e5c89c 100644 --- a/docs/module-doc/users_8h.html +++ b/docs/module-doc/users_8h.html @@ -25,8 +25,8 @@ This graph shows which files directly or indirectly include this file:

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

    -Definition at line 31 of file users.h. +Definition at line 34 of file users.h.

    @@ -117,7 +117,7 @@ Definition at line 31 of fi

    -Definition at line 32 of file users.h. +Definition at line 35 of file users.h.

    @@ -142,7 +142,7 @@ Definition at line 32 of fi

    -Definition at line 27 of file users.h. +Definition at line 30 of file users.h.

    @@ -167,7 +167,7 @@ Definition at line 27 of fi

    -Definition at line 29 of file users.h. +Definition at line 32 of file users.h.

    @@ -192,7 +192,7 @@ Definition at line 29 of fi

    -Definition at line 26 of file users.h. +Definition at line 29 of file users.h.

    @@ -217,7 +217,7 @@ Definition at line 26 of fi

    -Definition at line 28 of file users.h. +Definition at line 31 of file users.h.


    Typedef Documentation

    @@ -245,7 +245,7 @@ Holds a complete list of all allow and deny tags from the configuration file (co

    -Definition at line 100 of file users.h. +Definition at line 103 of file users.h.

    @@ -272,10 +272,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. +Definition at line 97 of file users.h. -


    Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/users_8h__dep__incl.gif b/docs/module-doc/users_8h__dep__incl.gif index d0e01f1c4..aa0164236 100644 Binary files a/docs/module-doc/users_8h__dep__incl.gif and b/docs/module-doc/users_8h__dep__incl.gif differ diff --git a/docs/module-doc/users_8h__dep__incl.map b/docs/module-doc/users_8h__dep__incl.map index 6ace71bf1..58ad59725 100644 --- a/docs/module-doc/users_8h__dep__incl.map +++ b/docs/module-doc/users_8h__dep__incl.map @@ -1,8 +1,8 @@ base referer rect $channels_8cpp-source.html 269,83 368,109 rect $modules_8cpp-source.html 269,159 368,185 -rect $users_8cpp-source.html 131,311 211,337 -rect $commands_8h-source.html 121,209 220,236 +rect $users_8cpp-source.html 279,285 359,312 +rect $commands_8h-source.html 121,260 220,287 rect $message_8h-source.html 128,57 213,84 rect $mode_8h-source.html 137,108 204,135 rect $xline_8h-source.html 140,159 201,185 diff --git a/docs/module-doc/users_8h__dep__incl.md5 b/docs/module-doc/users_8h__dep__incl.md5 index ec176e93b..657a6ee6c 100644 --- a/docs/module-doc/users_8h__dep__incl.md5 +++ b/docs/module-doc/users_8h__dep__incl.md5 @@ -1 +1 @@ -90f60db6818f380f159c532db95ccc66 \ No newline at end of file +1df71afa1aaf320bbe4ab884cb21df5d \ No newline at end of file diff --git a/docs/module-doc/users_8h__incl.md5 b/docs/module-doc/users_8h__incl.md5 index 1487e9c1d..0182762ef 100644 --- a/docs/module-doc/users_8h__incl.md5 +++ b/docs/module-doc/users_8h__incl.md5 @@ -1 +1 @@ -7879e2bf7dd2f81aa204448ca88459ab \ No newline at end of file +8a804bf9eb838d5cc63aad0c666de3ab \ No newline at end of file diff --git a/docs/module-doc/xline_8h-source.html b/docs/module-doc/xline_8h-source.html index 898ab6283..c15e7534b 100644 --- a/docs/module-doc/xline_8h-source.html +++ b/docs/module-doc/xline_8h-source.html @@ -118,12 +118,13 @@ 00150 void gline_set_creation_time(char* host, time_t create_time); 00151 void qline_set_creation_time(char* nick, time_t create_time); 00152 void zline_set_creation_time(char* ip, time_t create_time); -00153 -00154 bool zline_make_global(const char* ipaddr); -00155 bool qline_make_global(const char* nickname); -00156 -00157 #endif -

    Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +00153 void eline_set_creation_time(char* host, time_t create_time); +00154 +00155 bool zline_make_global(const char* ipaddr); +00156 bool qline_make_global(const char* nickname); +00157 +00158 #endif +
    Generated on Fri Dec 9 20:20:04 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/xline_8h.html b/docs/module-doc/xline_8h.html index 62098d9d5..15600f2c5 100644 --- a/docs/module-doc/xline_8h.html +++ b/docs/module-doc/xline_8h.html @@ -105,6 +105,8 @@ This graph shows which files directly or indirectly include this file:

    void zline_set_creation_time (char *ip, time_t create_time) +void eline_set_creation_time (char *host, time_t create_time) + bool zline_make_global (const char *ipaddr) bool qline_make_global (const char *nickname) @@ -159,7 +161,7 @@ This graph shows which files directly or indirectly include this file:

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

    @@ -210,7 +212,7 @@ Referenced by Server::AddEL

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

    @@ -261,7 +263,7 @@ Referenced by Server::AddGL

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

    @@ -312,7 +314,7 @@ Referenced by Server::AddKL

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

    @@ -363,7 +365,7 @@ Referenced by Server::AddQL

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

    @@ -420,7 +422,7 @@ Referenced by Server::AddZL

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

    @@ -450,7 +452,7 @@ Referenced by Server::DelEL

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

    @@ -480,7 +482,7 @@ Referenced by Server::DelGL

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

    @@ -510,7 +512,7 @@ Referenced by Server::DelKL

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

    @@ -540,7 +542,44 @@ Referenced by Server::DelQL

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

    + + + + +
    + + + + + + + + + + + + + + + + + + +
    void eline_set_creation_time char *  host,
    time_t  create_time
    +
    + + + +
    +   + + +

    +

    @@ -1044,7 +1083,7 @@ Referenced by Server::DelZL -


    Generated on Sun Nov 27 01:43:24 2005 for InspIRCd by  +
    Generated on Fri Dec 9 20:20:10 2005 for InspIRCd by  doxygen 1.4.4-20050815
    diff --git a/docs/module-doc/xline_8h__incl.md5 b/docs/module-doc/xline_8h__incl.md5 index 8b33a634d..19d6c530a 100644 --- a/docs/module-doc/xline_8h__incl.md5 +++ b/docs/module-doc/xline_8h__incl.md5 @@ -1 +1 @@ -6e8687e6a611b1214ddbdd4f9cecd725 \ No newline at end of file +c19192f2db3c2ad86cf37af32b2260b3 \ No newline at end of file -- cgit v1.2.3