[project @ 2005-07-04 08:15:08 by unknown_lamer]
[clinton/bobotpp.git] / source / ShitEntry.H
1 // ShitEntry.H -*- C++ -*-
2 // Copyright (c) 1998 Etienne BERNARD
3 // Copyright (c) 2002 Clinton Ebadi
4
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // any later version.
9
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
19 #ifndef SHITENTRY_H
20 #define SHITENTRY_H
21
22 #include <ctime>
23
24 #include "Mask.H"
25
26 class ShitList;
27 class UserCommands;
28
29 class ShitEntry {
30 Mask shitMask;
31 Mask shitChannelMask;
32 int shitLevel;
33 std::time_t expirationDate;
34 String shitReason;
35
36 public:
37
38 enum {
39 SHIT_NOSHIT = 0,
40 SHIT_NOOP = 1,
41 SHIT_NOJOIN = 2,
42 SHIT_NODEBAN = 3
43 };
44
45 ShitEntry(String, String, int, std::time_t, String);
46
47 bool matches(String, String);
48 bool isStillValid();
49
50 String getMask();
51 String getChannelMask();
52
53 int getShitLevel() const;
54 time_t getExpirationDate() const;
55 String getShitReason() const;
56
57 friend class ShitList;
58 friend class UserCommands;
59 };
60
61 #endif