Debian Codegraph @

src/bnetd/channel_conv.cpp

raw symbols SCIP
1 /*
2 * Copyright (C) 2001 Ross Combs ([email protected])
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 #include "common/setup_before.h"
19 #include "channel_conv.h"
20 #include "common/bnet_protocol.h"
21 #include "channel.h"
22 #include "common/setup_after.h"
23
24 namespace pvpgn
25 {
26
27 namespace bnetd
28 {
29
30 extern unsigned int cflags_to_bncflags(unsigned flags)
31 {
32 unsigned int res;
33
34 res = 0;
35 if (flags&channel_flags_public)
36 res |= CF_PUBLIC;
37 if (flags&channel_flags_moderated)
38 res |= CF_MODERATED;
39 if (flags&channel_flags_restricted)
40 res |= CF_RESTRICTED;
41 if (flags&channel_flags_thevoid)
42 res |= CF_THEVOID;
43 if (flags&channel_flags_system)
44 res |= CF_SYSTEM;
45 if (flags&channel_flags_official)
46 res |= CF_OFFICIAL;
47
48 return res;
49 }
50
51 }
52
53 }