~ubuntu-branches/ubuntu/oneiric/inspircd/oneiric

« back to all changes in this revision

Viewing changes to include/cull_list.h

  • Committer: Bazaar Package Importer
  • Author(s): Giacomo Catenazzi, Darren Blaber, Matt Arnold, Giacomo Catenazzi
  • Date: 2008-03-06 07:56:47 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080306075647-z8a4phxkn3vo3ajx
Tags: 1.1.17+dfsg-1
[ Darren Blaber ]
* New upstream release, fix /etc/init.d/inspircd stop.
* Fix the postrm script so there is no duplicate update-rc.d
* Fix the manpage so there are no more errors in it

[ Matt Arnold ]
*  Fix prerm so it works (Closes: #466924)

[ Giacomo Catenazzi ]
* Added me as uploader
* Add again support of dpatch in debian/rules
* Build sources only once!
* Correct make clean target, not to include generated ./inspircd on sources
* Don't change permission of configuration files, when starting inspircd
  (separation of policy and program).

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 *       | Inspire Internet Relay Chat Daemon |
3
3
 *       +------------------------------------+
4
4
 *
5
 
 *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
 
5
 *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
6
6
 * See: http://www.inspircd.org/wiki/index.php/Credits
7
7
 *
8
8
 * This program is free but copyrighted software; see
24
24
 
25
25
class InspIRCd;
26
26
 
27
 
/** The CullItem class holds a user and their quitmessage,
28
 
 * and is used internally by the CullList class to compile
29
 
 * a list of users which are to be culled when a long
30
 
 * operation (such as a netsplit) has completed.
31
 
 */
32
 
class CoreExport CullItem : public classbase
33
 
{
34
 
 private:
35
 
        /** Holds a pointer to the user,
36
 
         * must be valid and can be a local or remote user.
37
 
         */
38
 
        userrec* user;
39
 
        /** Holds the quit reason to use for this user.
40
 
         */
41
 
        std::string reason;
42
 
        /** Holds the quit reason opers see, if different from users
43
 
         */
44
 
        std::string oper_reason;
45
 
        /** Silent items dont generate an snotice.
46
 
         */
47
 
        bool silent;
48
 
 public:
49
 
        /** Constrcutor.
50
 
        * Initializes the CullItem with a user pointer
51
 
        * and their quit reason
52
 
        * @param u The user to add
53
 
        * @param r The quit reason of the added user
54
 
        * @param ro The quit reason to show to opers only
55
 
        */
56
 
        CullItem(userrec* u, std::string &r, const char* ro = "");
57
 
        /** Constrcutor.
58
 
         * Initializes the CullItem with a user pointer
59
 
         * and their quit reason
60
 
         * @param u The user to add
61
 
         * @param r The quit reason of the added user
62
 
         * @param ro The quit reason to show to opers only
63
 
         */
64
 
        CullItem(userrec* u, const char* r, const char* ro = "");
65
 
 
66
 
        /** Make the quit silent a module is dealing with
67
 
         * displaying this users quit, so we shouldn't
68
 
         * send anything out.
69
 
         */
70
 
        void MakeSilent();
71
 
 
72
 
        /** Returns true if the quit for this user has been set
73
 
         * to silent.
74
 
         */
75
 
        bool IsSilent();
76
 
 
77
 
        /** Destructor
78
 
         */
79
 
        ~CullItem();
80
 
 
81
 
        /** Returns a pointer to the user
82
 
        */
83
 
        userrec* GetUser();
84
 
        /** Returns the user's quit reason
85
 
        */
86
 
        std::string& GetReason();
87
 
        /** Returns oper reason
88
 
         */
89
 
        std::string& GetOperReason();
90
 
};
91
 
 
92
27
/** The CullList class can be used by modules, and is used
93
28
 * by the core, to compile large lists of users in preperation
94
29
 * to quitting them all at once. This is faster than quitting
109
44
         */
110
45
        InspIRCd* ServerInstance;
111
46
 
112
 
        /** Holds a list of users already added for quick lookup
113
 
         */
114
 
        std::map<userrec*, userrec*> exempt;
115
 
 
116
47
        /** Holds a list of users being quit.
117
48
         * See the information for CullItem for
118
49
         * more information.
119
50
         */
120
 
        std::vector<CullItem> list;
 
51
        std::vector<userrec *> list;
121
52
 
122
53
 public:
123
54
        /** Constructor.