From b9190ebc16253254cb649faae76119eec3e14b8e Mon Sep 17 00:00:00 2001 From: Adam- Date: Wed, 11 Nov 2009 06:03:25 +0000 Subject: Moved alot of stuff to constructors and destructors, instead of having functions everywhere to create and destroy objects git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2639 5417fbe8-f217-4b02-8779-1006273d7864 --- include/account.h | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'include/account.h') diff --git a/include/account.h b/include/account.h index 075b15e9e..b2ba04950 100644 --- a/include/account.h +++ b/include/account.h @@ -69,13 +69,10 @@ enum NickCoreFlag class NickRequest { public: - NickRequest() - { - next = prev = NULL; - nick = passcode = email = NULL; - *password = 0; - requested = lastmail = 0; - } + NickRequest(const std::string &nickname); + + ~NickRequest(); + NickRequest *next, *prev; char *nick; char *passcode; @@ -90,7 +87,15 @@ class NickCore; class CoreExport NickAlias : public Extensible, public Flags { public: - NickAlias(); + /** Default constructor + * @param nickname The nick + * @param nickcore The nickcofe for this nick + */ + NickAlias(const std::string &nickname, NickCore *nickcore); + + /** Default destructor + */ + ~NickAlias(); NickAlias *next, *prev; char *nick; /* Nickname */ @@ -105,7 +110,14 @@ class CoreExport NickAlias : public Extensible, public Flags class CoreExport NickCore : public Extensible, public Flags { public: - NickCore(); + /** Default constructor + * @param display The display nick + */ + NickCore(const std::string &nickdisplay); + + /** Default destructor + */ + ~NickCore(); NickCore *next, *prev; -- cgit