/** * mynick.h: Data structures for account information. * * Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team * Rights to this code are as documented in COPYING. * * * Portions of this file were derived from sources bearing the following license: * Copyright © 2005-2006 Atheme Development Group * Rights to this code are as documented in doc/pod/license.pod. * * $Id: mynick.h,v 1.7 2007/09/22 14:27:26 pippijn Exp $ */ #ifndef ACCOUNT_MYNICK_H #define ACCOUNT_MYNICK_H #include #include #include /* registered nick */ class mynick_t : public object, public zero_initialised { struct callbacks { functor::callback3 info; functor::callback2 enforce; functor::callback3 group; functor::callback3 ungroup; }; public: typedef std::pair pair_type; typedef std::map map_type; static map_type map; public: char nick[NICKLEN]; myuser_t *owner; time_t registered; time_t lastseen; node_t node; /* for myuser_t::nicks */ static callbacks callback; public: // methods static mynick_t *create (myuser_t *mu, char const * const name); static mynick_t *find (char const * const name); static void cleanup (void); private: virtual void _destroy (); }; #endif