01: /**
02: * Copyright (C) 2003 Manfred Andres
03: *
04: * This program is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU General Public License
06: * as published by the Free Software Foundation; either version 2
07: * of the License, or (at your option) any later version.
08: *
09: * This program is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12: * GNU General Public License for more details.
13: *
14: * You should have received a copy of the GNU General Public License
15: * along with this program; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17: */package freecs.interfaces;
18:
19: /**
20: * admin = 13107
21: * vip = 130991
22: * user = 33
23: * asshole = 917536
24: */
25:
26: /**
27: * deffining userrights and the sate of this user
28: */
29: public interface IUserStates {
30: public static final int MAY_OPEN_GROUP = 1;
31: public static final int MAY_OPEN_MODERATED_GROUP = 2;
32: public static final int MAY_LOCK_GROUP = 4;
33: public static final int MAY_LOCK_MODERATED_GROUP = 8;
34: public static final int MAY_LOCK_STARTING_GROUP = 16;
35: public static final int MAY_JOIN_GROUP = 32;
36: public static final int MAY_JOIN_LOCKED_GROUP = 64;
37: public static final int MAY_SET_THEME = 128;
38:
39: public static final int MAY_CHANGE_RIGHT = 256;
40: public static final int MAY_PUNISH = 512;
41: public static final int MAY_KICK = 1024;
42: public static final int MAY_KICK_HARD = 2048;
43: public static final int MAY_BAN = 4096;
44:
45: public static final int PROTECTED_FROM_PUNISH = 8192;
46: public static final int PROTECTED_FROM_KICK = 16384;
47: public static final int PROTECTED_FROM_BAN = 32768;
48: public static final int PROTECTED_FROM_RIGHTCHANGE = 65536;
49:
50: public static final int FREELY_PUNISHABLE = 131072;
51: public static final int FREELY_KICKABLE = 262144;
52: public static final int FREELY_BANABLE = 524288;
53:
54: public static final int IS_MODERATOR = 1048576;
55: public static final int MAY_RELEASE_SERVERBAN = 2097152;
56: public static final int IS_GUEST = 4194304;
57:
58: public static final int ROLE_ASSHOLE = MAY_JOIN_GROUP
59: | FREELY_PUNISHABLE | FREELY_KICKABLE | FREELY_BANABLE;
60:
61: public static final int ROLE_USER = MAY_OPEN_GROUP | MAY_JOIN_GROUP;
62:
63: public static final int ROLE_VIP = MAY_OPEN_GROUP
64: | MAY_OPEN_MODERATED_GROUP | MAY_LOCK_GROUP
65: | MAY_LOCK_MODERATED_GROUP | MAY_JOIN_GROUP
66: | MAY_CHANGE_RIGHT | MAY_PUNISH | MAY_KICK | MAY_KICK_HARD
67: | MAY_BAN | MAY_SET_THEME | PROTECTED_FROM_PUNISH
68: | PROTECTED_FROM_KICK | PROTECTED_FROM_BAN
69: | PROTECTED_FROM_RIGHTCHANGE;
70:
71: public static final int ROLE_GOD = ROLE_VIP | MAY_JOIN_LOCKED_GROUP
72: | MAY_LOCK_STARTING_GROUP;
73:
74: }
|