KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > freecs > interfaces > IUserStates


1 /**
2  * Copyright (C) 2003 Manfred Andres
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * 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  */

18 package freecs.interfaces;
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 |
60                                           FREELY_KICKABLE |
61                                           FREELY_BANABLE;
62
63    public static final int ROLE_USER = MAY_OPEN_GROUP |
64                                           MAY_JOIN_GROUP;
65
66    public static final int ROLE_VIP = MAY_OPEN_GROUP |
67                                           MAY_OPEN_MODERATED_GROUP |
68                                           MAY_LOCK_GROUP |
69                                           MAY_LOCK_MODERATED_GROUP |
70                                           MAY_JOIN_GROUP |
71                                           MAY_CHANGE_RIGHT |
72                                           MAY_PUNISH |
73                                           MAY_KICK |
74                                           MAY_KICK_HARD |
75                                           MAY_BAN |
76                                           MAY_SET_THEME |
77                                           PROTECTED_FROM_PUNISH |
78                                           PROTECTED_FROM_KICK |
79                                           PROTECTED_FROM_BAN |
80                                           PROTECTED_FROM_RIGHTCHANGE;
81
82     public static final int ROLE_GOD = ROLE_VIP |
83                                           MAY_JOIN_LOCKED_GROUP |
84                                           MAY_LOCK_STARTING_GROUP;
85                   
86     
87 }
Popular Tags