diff options
-rw-r--r-- | include/configreader.h | 5 | ||||
-rw-r--r-- | src/modules/extra/m_filter_pcre.cpp | 3 | ||||
-rw-r--r-- | src/modules/extra/m_ssl_gnutls.cpp | 2 | ||||
-rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_botmode.cpp | 5 | ||||
-rw-r--r-- | src/modules/m_cban.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_censor.cpp | 8 | ||||
-rw-r--r-- | src/modules/m_cgiirc.cpp | 7 | ||||
-rw-r--r-- | src/modules/m_chanfilter.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_chanprotect.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_cloaking.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_filter.cpp | 5 | ||||
-rw-r--r-- | src/modules/m_helpop.cpp | 9 | ||||
-rw-r--r-- | src/modules/m_hostchange.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_httpd.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_inviteexception.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_joinflood.cpp | 7 | ||||
-rw-r--r-- | src/modules/m_kicknorejoin.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_knock.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_messageflood.cpp | 6 | ||||
-rw-r--r-- | src/modules/m_safelist.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_stripcolor.cpp | 2 |
22 files changed, 75 insertions, 26 deletions
diff --git a/include/configreader.h b/include/configreader.h index 5c8a66307..44551b132 100644 --- a/include/configreader.h +++ b/include/configreader.h @@ -37,6 +37,8 @@ typedef bool (*MultiNotify)(ServerConfig* conf, const char*); enum ConfigDataType { DT_NOTHING, DT_INTEGER, DT_CHARPTR, DT_BOOLEAN }; +/** Holds a core configuration item and its callbacks + */ struct InitialConfig { char* tag; @@ -46,6 +48,9 @@ struct InitialConfig Validator validation_function; }; +/** Holds a core configuration item and its callbacks + * where there may be more than one item + */ struct MultiConfig { const char* tag; diff --git a/src/modules/extra/m_filter_pcre.cpp b/src/modules/extra/m_filter_pcre.cpp index d435600b4..faf1718e4 100644 --- a/src/modules/extra/m_filter_pcre.cpp +++ b/src/modules/extra/m_filter_pcre.cpp @@ -24,9 +24,10 @@ #include "users.h" #include "channels.h" #include "modules.h" - #include "inspircd.h" +/** Thrown by m_filter_pcre + */ class FilterPCREException : public ModuleException { public: diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index fc8429ee2..53aad2379 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -33,6 +33,8 @@ bool isin(int port, const std::vector<int> &portlist) return false; } +/** Represents an SSL user's extra data + */ class issl_session : public classbase { public: diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 1f5023b75..bb57a8467 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -41,6 +41,8 @@ char* get_error() return ERR_error_string(ERR_get_error(), NULL); } +/** Represents an SSL user's extra data + */ class issl_session : public classbase { public: diff --git a/src/modules/m_botmode.cpp b/src/modules/m_botmode.cpp index 2aa5047bf..8d67c4a14 100644 --- a/src/modules/m_botmode.cpp +++ b/src/modules/m_botmode.cpp @@ -21,14 +21,13 @@ using namespace std; #include "users.h" #include "channels.h" #include "modules.h" - #include "configreader.h" #include "inspircd.h" /* $ModDesc: Provides support for unreal-style umode +B */ - - +/** Handles user mode +B + */ class BotMode : public ModeHandler { public: diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp index ff8e3af54..a7af325b9 100644 --- a/src/modules/m_cban.cpp +++ b/src/modules/m_cban.cpp @@ -24,6 +24,8 @@ /* $ModDesc: Gives /cban, aka C:lines. Think Q:lines, for channels. */ +/** Holds a CBAN item + */ class CBan : public classbase { public: diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp index 50315997f..e81ee17a4 100644 --- a/src/modules/m_censor.cpp +++ b/src/modules/m_censor.cpp @@ -27,8 +27,8 @@ typedef std::map<irc::string,irc::string> censor_t; /* $ModDesc: Provides user and channel +G mode */ - - +/** Thrown by m_censor + */ class CensorException : public ModuleException { public: @@ -38,6 +38,8 @@ class CensorException : public ModuleException } }; +/** Handles usermode +G + */ class CensorUser : public ModeHandler { public: @@ -70,6 +72,8 @@ class CensorUser : public ModeHandler } }; +/** Handles channel mode +G + */ class CensorChannel : public ModeHandler { public: diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp index d70bd9561..9d4344629 100644 --- a/src/modules/m_cgiirc.cpp +++ b/src/modules/m_cgiirc.cpp @@ -23,16 +23,15 @@ #include <arpa/inet.h> #include "users.h" #include "modules.h" - #include "dns.h" #include "inspircd.h" /* $ModDesc: Change user's hosts connecting from known CGI:IRC hosts */ - - enum CGItype { PASS, IDENT, PASSFIRST, IDENTFIRST }; +/** Holds a CGI site's details + */ class CGIhost : public classbase { public: @@ -47,6 +46,8 @@ public: typedef std::vector<CGIhost> CGIHostlist; +/** Resolver for CGI:IRC hostnames encoded in ident/GECOS + */ class CGIResolver : public Resolver { std::string typ; diff --git a/src/modules/m_chanfilter.cpp b/src/modules/m_chanfilter.cpp index 458d1a29d..f1ae55df8 100644 --- a/src/modules/m_chanfilter.cpp +++ b/src/modules/m_chanfilter.cpp @@ -28,8 +28,8 @@ using namespace std; /* $ModDesc: Provides channel-specific censor lists (like mode +G but varies from channel to channel) */ - - +/** Handles channel mode +g + */ class ChanFilter : public ListModeBase { public: diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp index e2b121965..2f384f001 100644 --- a/src/modules/m_chanprotect.cpp +++ b/src/modules/m_chanprotect.cpp @@ -32,6 +32,8 @@ const char* fakevalue = "on"; */ bool unload_kludge = false; +/** Handles basic operation of +qa channel modes + */ class FounderProtectBase { private: @@ -143,6 +145,8 @@ class FounderProtectBase } }; +/** Abstraction of FounderProtectBase for channel mode +q + */ class ChanFounder : public ModeHandler, public FounderProtectBase { char* dummyptr; @@ -199,6 +203,8 @@ class ChanFounder : public ModeHandler, public FounderProtectBase } }; +/** Abstraction of FounderProtectBase for channel mode +a + */ class ChanProtect : public ModeHandler, public FounderProtectBase { char* dummyptr; diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index 60f62b099..29d26a9ec 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -60,6 +60,8 @@ typedef unsigned int uint32_t; typedef uint32_t word32; /* NOT unsigned long. We don't support 16 bit platforms, anyway. */ typedef unsigned char byte; +/** An MD5 context, used by m_cloaking + */ class xMD5Context : public classbase { public: @@ -68,6 +70,8 @@ class xMD5Context : public classbase word32 in[16]; }; +/** Handles user mode +x + */ class CloakUser : public ModeHandler { diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp index 775130f35..46f5922f0 100644 --- a/src/modules/m_filter.cpp +++ b/src/modules/m_filter.cpp @@ -25,13 +25,14 @@ using namespace std; #include "users.h" #include "channels.h" #include "modules.h" - #include "inspircd.h" /* $ModDesc: An enhanced version of the unreal m_filter.so used by chatspike.net */ +/** Holds a filter pattern and reason + */ class Filter : public classbase { public: @@ -41,6 +42,8 @@ class Filter : public classbase typedef std::map<std::string,Filter*> filter_t; +/** Thrown by m_filter + */ class FilterException : public ModuleException { public: diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp index dc124cd46..330a5d60e 100644 --- a/src/modules/m_helpop.cpp +++ b/src/modules/m_helpop.cpp @@ -19,19 +19,18 @@ using namespace std; #include "users.h" #include "channels.h" #include "modules.h" - #include "inspircd.h" // Global Vars static ConfigReader *helpop; - - bool do_helpop(const char**, int, userrec*); void sendtohelpop(userrec*, int, const char**); /* $ModDesc: /helpop Command, Works like Unreal helpop */ +/** Handles user mode +h + */ class Helpop : public ModeHandler { public: @@ -60,6 +59,8 @@ class Helpop : public ModeHandler } }; +/** Handles /HELPOP + */ class cmd_helpop : public command_t { public: @@ -182,6 +183,8 @@ class cmd_helpop : public command_t } }; +/** Thrown by m_helpop + */ class HelpopException : public ModuleException { private: diff --git a/src/modules/m_hostchange.cpp b/src/modules/m_hostchange.cpp index d270c74d4..4de6a8202 100644 --- a/src/modules/m_hostchange.cpp +++ b/src/modules/m_hostchange.cpp @@ -24,8 +24,8 @@ using namespace std; /* $ModDesc: Provides masking of user hostnames in a different way to m_cloaking */ - - +/** Holds information on a host set by m_hostchange + */ class Host : public classbase { public: diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index 9317f1992..96fdfc8f2 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -1,4 +1,4 @@ -/* +------------------------------------+ +/* +------------------------------------+ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * @@ -31,6 +31,8 @@ class ModuleHttp; static ModuleHttp* HttpModule; static bool claimed; +/** HTTP socket states + */ enum HttpState { HTTP_LISTEN = 0, @@ -39,6 +41,8 @@ enum HttpState HTTP_SERVE_SEND_DATA = 3 }; +/** A socket used for HTTP transport + */ class HttpSocket : public InspSocket { FileReader* index; diff --git a/src/modules/m_inviteexception.cpp b/src/modules/m_inviteexception.cpp index c7cfa739e..bcb2d7d6d 100644 --- a/src/modules/m_inviteexception.cpp +++ b/src/modules/m_inviteexception.cpp @@ -21,6 +21,8 @@ class InspIRCd* ServerInstance; +/** Handles channel mode +I + */ class InviteException : public ListModeBase { public: @@ -30,8 +32,6 @@ class InviteException : public ListModeBase class ModuleInviteException : public Module { InviteException* ie; - - public: ModuleInviteException(InspIRCd* Me) : Module(Me) { diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp index 99a872457..8557ad11f 100644 --- a/src/modules/m_joinflood.cpp +++ b/src/modules/m_joinflood.cpp @@ -26,8 +26,8 @@ using namespace std; /* $ModDesc: Provides channel mode +j (join flood protection) */ - - +/** Holds settings and state associated with channel mode +j + */ class joinfloodsettings : public classbase { public: @@ -40,6 +40,7 @@ class joinfloodsettings : public classbase bool locked; joinfloodsettings() : secs(0), joins(0) {}; + joinfloodsettings(int b, int c) : secs(b), joins(c) { reset = time(NULL) + secs; @@ -92,6 +93,8 @@ class joinfloodsettings : public classbase }; +/** Handles channel mode +j + */ class JoinFlood : public ModeHandler { public: diff --git a/src/modules/m_kicknorejoin.cpp b/src/modules/m_kicknorejoin.cpp index 4845e633e..f0244388e 100644 --- a/src/modules/m_kicknorejoin.cpp +++ b/src/modules/m_kicknorejoin.cpp @@ -21,6 +21,8 @@ inline int strtoint(const std::string &str) typedef std::map<userrec*, time_t> delaylist; +/** Handles channel mode +J + */ class KickRejoin : public ModeHandler { public: diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp index 3a104bb67..1e490ad12 100644 --- a/src/modules/m_knock.cpp +++ b/src/modules/m_knock.cpp @@ -26,8 +26,8 @@ using namespace std; /* $ModDesc: Provides support for /KNOCK and mode +K */ - - +/** Handles the /KNOCK command + */ class cmd_knock : public command_t { public: @@ -77,6 +77,8 @@ class cmd_knock : public command_t } }; +/** Handles channel mode +K + */ class Knock : public ModeHandler { public: diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp index fc19217e5..52174792f 100644 --- a/src/modules/m_messageflood.cpp +++ b/src/modules/m_messageflood.cpp @@ -25,8 +25,8 @@ using namespace std; /* $ModDesc: Provides channel mode +f (message flood protection) */ - - +/** Holds flood settings and state for mode +f + */ class floodsettings : public classbase { public: @@ -80,6 +80,8 @@ class floodsettings : public classbase } }; +/** Handles channel mode +f + */ class MsgFlood : public ModeHandler { public: diff --git a/src/modules/m_safelist.cpp b/src/modules/m_safelist.cpp index 77cc0715b..ac7225b5e 100644 --- a/src/modules/m_safelist.cpp +++ b/src/modules/m_safelist.cpp @@ -23,6 +23,8 @@ using namespace std; #include "inspircd.h" #include "wildcard.h" +/** Holds a users m_safelist state + */ class ListData : public classbase { public: diff --git a/src/modules/m_stripcolor.cpp b/src/modules/m_stripcolor.cpp index 73abba72c..fd149e5f2 100644 --- a/src/modules/m_stripcolor.cpp +++ b/src/modules/m_stripcolor.cpp @@ -23,6 +23,8 @@ using namespace std; /* $ModDesc: Provides channel +S mode (strip ansi colour) */ +/** Handles channel mode +S + */ class ChannelStripColor : public ModeHandler { public: |