From 364735e18b500f0a071fab4cc5c9e7bace1835fc Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 6 Oct 2006 14:23:37 +0000 Subject: [PATCH] Document a ton of classes (e.g. give them a short description for http://svn.inspircd.org/docs/annotated.html) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5434 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/commands/cmd_unloadmodule.h | 2 ++ include/commands/cmd_user.h | 2 ++ include/hashcomp.h | 12 +++++++----- include/u_listmode.h | 6 ++++++ src/modules/extra/m_sslinfo.cpp | 4 +++- src/modules/m_nicklock.cpp | 5 ++++- src/modules/m_opermotd.cpp | 2 ++ src/modules/m_randquote.cpp | 2 ++ src/modules/m_safelist.cpp | 3 +-- src/modules/m_sajoin.cpp | 5 ++--- src/modules/m_samode.cpp | 7 +++---- src/modules/m_sanick.cpp | 5 ++--- src/modules/m_sapart.cpp | 6 ++---- src/modules/m_saquit.cpp | 5 ++--- src/modules/m_sethost.cpp | 5 ++--- src/modules/m_setident.cpp | 2 ++ src/modules/m_setidle.cpp | 2 ++ src/modules/m_spanningtree.cpp | 2 ++ src/modules/m_spy.cpp | 5 ++++- src/modules/m_swhois.cpp | 5 ++--- src/modules/m_testcommand.cpp | 9 ++++----- src/modules/m_timedbans.cpp | 7 ++++--- src/modules/m_tline.cpp | 6 ++---- src/modules/m_uninvite.cpp | 6 ++---- src/modules/m_userip.cpp | 6 ++---- src/modules/m_vhost.cpp | 7 ++++--- 26 files changed, 72 insertions(+), 56 deletions(-) diff --git a/include/commands/cmd_unloadmodule.h b/include/commands/cmd_unloadmodule.h index ba19bc5e1..c2d2d473d 100644 --- a/include/commands/cmd_unloadmodule.h +++ b/include/commands/cmd_unloadmodule.h @@ -22,6 +22,8 @@ #include "users.h" #include "channels.h" +/** Handle /UNLOADMODULE + */ class cmd_unloadmodule : public command_t { public: diff --git a/include/commands/cmd_user.h b/include/commands/cmd_user.h index f5d7cb242..e7b9784bd 100644 --- a/include/commands/cmd_user.h +++ b/include/commands/cmd_user.h @@ -22,6 +22,8 @@ #include "users.h" #include "channels.h" +/** Handle /USER + */ class cmd_user : public command_t { public: diff --git a/include/hashcomp.h b/include/hashcomp.h index b22f65272..b2756b340 100644 --- a/include/hashcomp.h +++ b/include/hashcomp.h @@ -248,10 +248,8 @@ namespace irc const std::string GetToken(); }; - /** irc::commasepstream allows for splitting comma seperated lists. - * Lists passed to irc::commasepstream should not contain spaces - * after the commas, or this will be taken to be part of the item - * data. Each successive call to commasepstream::GetToken() returns + /** irc::sepstream allows for splitting token seperated lists. + * Each successive call to sepstream::GetToken() returns * the next token, until none remain, at which point the method returns * an empty string. */ @@ -263,7 +261,7 @@ namespace irc std::string::iterator n; char sep; public: - /** Create a commasepstream and fill it with the provided data + /** Create a sepstream and fill it with the provided data */ sepstream(const std::string &source, char seperator); virtual ~sepstream(); @@ -274,6 +272,8 @@ namespace irc virtual const std::string GetToken(); }; + /** A derived form of sepstream, which seperates on commas + */ class commasepstream : public sepstream { public: @@ -282,6 +282,8 @@ namespace irc } }; + /** A derived form of sepstream, which seperates on spaces + */ class spacesepstream : public sepstream { public: diff --git a/include/u_listmode.h b/include/u_listmode.h index 8315dbcd1..d5416988a 100644 --- a/include/u_listmode.h +++ b/include/u_listmode.h @@ -27,6 +27,8 @@ inline std::string stringtime() return TIME.str(); } +/** An item in a listmode's list + */ class ListItem : public classbase { public: @@ -35,6 +37,8 @@ public: std::string time; }; +/** The number of items a listmode's list may contain + */ class ListLimit : public classbase { public: @@ -46,6 +50,8 @@ public: typedef std::vector modelist; typedef std::vector limitlist; +/** The base class for listmodes defined by u_listmode.h + */ class ListModeBase : public ModeHandler { protected: diff --git a/src/modules/extra/m_sslinfo.cpp b/src/modules/extra/m_sslinfo.cpp index 1be1d8a5a..a29a61658 100644 --- a/src/modules/extra/m_sslinfo.cpp +++ b/src/modules/extra/m_sslinfo.cpp @@ -26,7 +26,9 @@ using namespace std; #include "dns.h" /* $ModDesc: Provides /sslinfo command used to test who a mask matches */ - + +/** Handle /SSLINFO + */ class cmd_sslinfo : public command_t { public: diff --git a/src/modules/m_nicklock.cpp b/src/modules/m_nicklock.cpp index 304065007..ca0c030ac 100644 --- a/src/modules/m_nicklock.cpp +++ b/src/modules/m_nicklock.cpp @@ -28,7 +28,8 @@ using namespace std; /* $ModDesc: Provides the NICKLOCK command, allows an oper to chage a users nick and lock them to it until they quit */ - +/** Handle /NICKLOCK + */ class cmd_nicklock : public command_t { char* dummy; @@ -73,6 +74,8 @@ class cmd_nicklock : public command_t } }; +/** Handle /NICKUNLOCK + */ class cmd_nickunlock : public command_t { public: diff --git a/src/modules/m_opermotd.cpp b/src/modules/m_opermotd.cpp index aa22a77a5..62c59aa9b 100644 --- a/src/modules/m_opermotd.cpp +++ b/src/modules/m_opermotd.cpp @@ -30,6 +30,8 @@ CmdResult ShowOperMOTD(userrec* user) return CMD_SUCCESS; } +/** Handle /OPERMOTD + */ class cmd_opermotd : public command_t { public: diff --git a/src/modules/m_randquote.cpp b/src/modules/m_randquote.cpp index 3163d37a0..519fb5b93 100644 --- a/src/modules/m_randquote.cpp +++ b/src/modules/m_randquote.cpp @@ -31,6 +31,8 @@ std::string suffix = ""; /* $ModDesc: Provides random Quotes on Connect. */ +/** Handle /RANDQUOTE + */ class cmd_randquote : public command_t { public: diff --git a/src/modules/m_safelist.cpp b/src/modules/m_safelist.cpp index 9008e485a..32e68ff10 100644 --- a/src/modules/m_safelist.cpp +++ b/src/modules/m_safelist.cpp @@ -42,8 +42,7 @@ class ListData : public classbase typedef std::vector UserList; UserList listusers; /* vector of people doing a /list */ -/* - * To create a timer which recurs every second, we inherit from InspTimer. +/** To create a timer which recurs every second, we inherit from InspTimer. * InspTimer is only one-shot however, so at the end of each Tick() we simply * insert another of ourselves into the pending queue :) */ diff --git a/src/modules/m_sajoin.cpp b/src/modules/m_sajoin.cpp index e025b5e3e..2baecfc22 100644 --- a/src/modules/m_sajoin.cpp +++ b/src/modules/m_sajoin.cpp @@ -26,9 +26,8 @@ using namespace std; /* $ModDesc: Provides support for unreal-style SAJOIN command */ - - - +/** Handle /SAJOIN + */ class cmd_sajoin : public command_t { public: diff --git a/src/modules/m_samode.cpp b/src/modules/m_samode.cpp index 6491c9a3a..51a862701 100644 --- a/src/modules/m_samode.cpp +++ b/src/modules/m_samode.cpp @@ -24,7 +24,7 @@ using namespace std; * */ -/* $ModDesc: Povides more advanced UnrealIRCd SAMODE command */ +/* $ModDesc: Provides more advanced UnrealIRCd SAMODE command */ /* * ToDo: @@ -37,9 +37,8 @@ using namespace std; #include "modules.h" #include "inspircd.h" - - - +/** Handle /SAMODE + */ class cmd_samode : public command_t { public: diff --git a/src/modules/m_sanick.cpp b/src/modules/m_sanick.cpp index e974e3eb5..3892efb36 100644 --- a/src/modules/m_sanick.cpp +++ b/src/modules/m_sanick.cpp @@ -25,9 +25,8 @@ using namespace std; /* $ModDesc: Provides support for SANICK command */ - - - +/** Handle /SANICK + */ class cmd_sanick : public command_t { public: diff --git a/src/modules/m_sapart.cpp b/src/modules/m_sapart.cpp index 20201790b..6db3661b5 100644 --- a/src/modules/m_sapart.cpp +++ b/src/modules/m_sapart.cpp @@ -21,14 +21,12 @@ using namespace std; #include "users.h" #include "channels.h" #include "modules.h" - #include "inspircd.h" /* $ModDesc: Provides support for unreal-style SAPART command */ - - - +/** Handle /SAPART + */ class cmd_sapart : public command_t { public: diff --git a/src/modules/m_saquit.cpp b/src/modules/m_saquit.cpp index 20ffdd99e..09cc45d45 100644 --- a/src/modules/m_saquit.cpp +++ b/src/modules/m_saquit.cpp @@ -35,9 +35,8 @@ using namespace std; /* $ModDesc: Provides support for an SAQUIT command, exits user with a reason */ - - - +/** Handle /SAQUIT + */ class cmd_saquit : public command_t { public: diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp index 678786757..441d2f396 100644 --- a/src/modules/m_sethost.cpp +++ b/src/modules/m_sethost.cpp @@ -26,9 +26,8 @@ using namespace std; /* $ModDesc: Provides support for the SETHOST command */ - - - +/** Handle /SETHOST + */ class cmd_sethost : public command_t { public: diff --git a/src/modules/m_setident.cpp b/src/modules/m_setident.cpp index d1f67bb14..065c1d96d 100644 --- a/src/modules/m_setident.cpp +++ b/src/modules/m_setident.cpp @@ -4,6 +4,8 @@ /* $ModDesc: Provides support for the SETIDENT command */ +/** Handle /SETIDENT + */ class cmd_setident : public command_t { public: diff --git a/src/modules/m_setidle.cpp b/src/modules/m_setidle.cpp index 6b8754311..b24ca96ee 100644 --- a/src/modules/m_setidle.cpp +++ b/src/modules/m_setidle.cpp @@ -25,6 +25,8 @@ using namespace std; /* $ModDesc: Allows opers to set their idle time */ +/** Handle /SETIDLE + */ class cmd_setidle : public command_t { public: diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 07e2c8977..c02c31ac4 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -583,6 +583,8 @@ bool IsServer(std::string ServerName) } +/** Handle /RCONNECT + */ class cmd_rconnect : public command_t { Module* Creator; diff --git a/src/modules/m_spy.cpp b/src/modules/m_spy.cpp index 86e7128d6..fe85ef5b2 100644 --- a/src/modules/m_spy.cpp +++ b/src/modules/m_spy.cpp @@ -75,7 +75,8 @@ void spy_userlist(userrec *user, chanrec *c) } - +/** Handle /SPYLIST + */ class cmd_spylist : public command_t { public: @@ -102,6 +103,8 @@ class cmd_spylist : public command_t } }; +/** Handle /SPYNAMES + */ class cmd_spynames : public command_t { public: diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp index 3b28716ff..49984db14 100644 --- a/src/modules/m_swhois.cpp +++ b/src/modules/m_swhois.cpp @@ -17,13 +17,12 @@ #include "users.h" #include "channels.h" #include "modules.h" - #include "inspircd.h" /* $ModDesc: Provides the SWHOIS command which allows setting of arbitary WHOIS lines */ - - +/** Handle /SWHOIS + */ class cmd_swhois : public command_t { diff --git a/src/modules/m_testcommand.cpp b/src/modules/m_testcommand.cpp index 4f5d3a244..5816b20a0 100644 --- a/src/modules/m_testcommand.cpp +++ b/src/modules/m_testcommand.cpp @@ -20,14 +20,13 @@ using namespace std; #include "users.h" #include "channels.h" #include "modules.h" - #include "dns.h" #include "inspircd.h" /* $ModDesc: Povides a proof-of-concept test /WOOT command */ - - +/** A test resolver class for IPV6 + */ class MyV6Resolver : public Resolver { bool fw; @@ -48,8 +47,8 @@ class MyV6Resolver : public Resolver } }; - - +/** Handle /WOOT + */ class cmd_woot : public command_t { public: diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp index 4c58306f5..6bd6a39fd 100644 --- a/src/modules/m_timedbans.cpp +++ b/src/modules/m_timedbans.cpp @@ -23,14 +23,13 @@ using namespace std; #include "users.h" #include "channels.h" #include "modules.h" - #include "hashcomp.h" #include "configreader.h" #include "inspircd.h" - - +/** Holds a timed ban + */ class TimedBan : public classbase { public: @@ -42,6 +41,8 @@ class TimedBan : public classbase typedef std::vector timedbans; timedbans TimedBanList; +/** Handle /TBAN + */ class cmd_tban : public command_t { public: diff --git a/src/modules/m_tline.cpp b/src/modules/m_tline.cpp index 2635d2b12..0208222a4 100644 --- a/src/modules/m_tline.cpp +++ b/src/modules/m_tline.cpp @@ -20,16 +20,14 @@ using namespace std; #include "users.h" #include "channels.h" #include "modules.h" - #include "wildcard.h" #include "inspircd.h" #include "dns.h" /* $ModDesc: Provides /tline command used to test who a mask matches */ - - - +/** Handle /TLINE + */ class cmd_tline : public command_t { public: diff --git a/src/modules/m_uninvite.cpp b/src/modules/m_uninvite.cpp index 792429ce0..0d77ee7cd 100644 --- a/src/modules/m_uninvite.cpp +++ b/src/modules/m_uninvite.cpp @@ -22,13 +22,11 @@ using namespace std; #include "users.h" #include "channels.h" #include "modules.h" - #include "configreader.h" #include "inspircd.h" - - - +/** Handle /UNINVITE + */ class cmd_uninvite : public command_t { public: diff --git a/src/modules/m_userip.cpp b/src/modules/m_userip.cpp index 6f7a50453..c7efaf090 100644 --- a/src/modules/m_userip.cpp +++ b/src/modules/m_userip.cpp @@ -21,14 +21,12 @@ using namespace std; #include "users.h" #include "channels.h" #include "modules.h" - #include "inspircd.h" /* $ModDesc: Provides support for USERIP command */ - - - +/** Handle /USERIP + */ class cmd_userip : public command_t { public: diff --git a/src/modules/m_vhost.cpp b/src/modules/m_vhost.cpp index 09a045564..233def0b6 100644 --- a/src/modules/m_vhost.cpp +++ b/src/modules/m_vhost.cpp @@ -24,13 +24,14 @@ using namespace std; /* $ModDesc: Provides masking of user hostnames via traditional /VHOST command */ -static ConfigReader *Conf; - +static ConfigReader* Conf; +/** Handle /VHOST + */ class cmd_vhost : public command_t { public: - cmd_vhost (InspIRCd* Instance) : command_t(Instance,"VHOST", 0, 2) + cmd_vhost (InspIRCd* Instance) : command_t(Instance,"VHOST", 0, 2) { this->source = "m_vhost.so"; syntax = " "; -- 2.39.2