Update of /cvsroot/netrek/server/Vanilla/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3547/include
Modified Files:
config.h.in sysdefaults.h data.h struct.h defs.h gencmds.h
Log Message:
voting site policy
Index: config.h.in
===================================================================
RCS file: /cvsroot/netrek/server/Vanilla/include/config.h.in,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- config.h.in 24 Apr 2006 12:35:17 -0000 1.5
+++ config.h.in 26 Apr 2006 09:52:43 -0000 1.6
@@ -341,32 +341,6 @@
/* OBSERVERS - allow players to watch */
#define OBSERVERS
- /* VOTING - allow voting mode */
-#define VOTING
-
- /* ALLOW_EJECT - define to allow players to
- eject others */
-
- /* ALLOW_BAN - define to allow players to
- eject and ban others */
-
- /* VICIOUS_EJECT - free's the players slot
- after ejection,
- causes some clients to
- hang */
-
- /* EJECT_ONLY_IF_QUEUE - refuses to eject
- unless queue != 0 */
-
-#ifdef VOTING
-#define ALLOW_EJECT
-#ifdef ALLOW_EJECT
-#define ALLOW_BAN
-#undef VICIOUS_EJECT
-#undef EJECT_ONLY_IF_QUEUE
-#endif
-#endif
-
#define NODOCK /* NODOCK allow per-slot docking priveledges */
#define NOTRANSWARP /* NOTRANSWARP - allow starbase to set transwarp
@@ -391,7 +365,6 @@
this define. */
#undef GENO_COUNT
-#ifdef VOTING
/* AUTO_INL - starts up INL robot
by majority vote */
@@ -427,7 +400,6 @@
#define BALANCE_PLANET 100
#define BALANCE_DEFENSE 0
#define BALANCE_OFFENSE 100
-#endif
/* MESSAGES_ALL_TIME - allow messaging during
freezes like twarp, refit, and war decl.
required to be set for INL robot use. */
Index: defs.h
===================================================================
RCS file: /cvsroot/netrek/server/Vanilla/include/defs.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- defs.h 24 Apr 2006 12:35:17 -0000 1.6
+++ defs.h 26 Apr 2006 09:52:43 -0000 1.7
@@ -64,14 +64,12 @@
by default have 16 player slots and make
the rest obs slots */
-#ifdef VOTING
#define PV_EXTRA 8 /* # of non-eject vote types */
#define PV_TOTAL MAXPLAYER*2+PV_EXTRA /* total number of voting slots */
#define PV_EJECT 0*MAXPLAYER /* array base for eject votes */
#define PV_BAN 1*MAXPLAYER /* array base for eject votes */
#define PV_OTHER 2*MAXPLAYER /* array base for non-eject votes */
-/* see ntserv/ntscmds.c for array */
-#endif
+/* see ntserv/ntscmds.c for voting array */
#if defined(NEWBIESERVER) || defined(PRETSERVER)
#define MAXQUEUE 13 /* Number of different waitqueues */
Index: sysdefaults.h
===================================================================
RCS file: /cvsroot/netrek/server/Vanilla/include/sysdefaults.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- sysdefaults.h 21 Mar 2005 10:17:16 -0000 1.2
+++ sysdefaults.h 26 Apr 2006 09:52:43 -0000 1.3
@@ -196,6 +196,20 @@
"No bombing out of t-mode" },
{ "NO_UNWARRING_BOMBING", SYSDEF_INT, &no_unwarring_bombing,
"No 3rd space bombing" },
+ { "VOTING", SYSDEF_INT, &voting,
+ "Enable voting" },
+ { "BAN_VOTE_ENABLE", SYSDEF_INT, &ban_vote_enable,
+ "Enable vote for temporary ban" },
+ { "BAN_VOTE_LENGTH", SYSDEF_INT, &ban_vote_length,
+ "Length of ban in number of non-banned logins" },
+ { "BAN_VOTE_OFFSET", SYSDEF_INT, &ban_vote_offset,
+ "Offset to change ban length by on each retry during ban period" },
+ { "EJECT_VOTE_ENABLE", SYSDEF_INT, &eject_vote_enable,
+ "Enable vote for ejection" },
+ { "EJECT_VOTE_ONLY_IF_QUEUE", SYSDEF_INT, &eject_vote_only_if_queue,
+ "Only allow ejection if there is a queue of players" },
+ { "EJECT_VOTE_VICIOUS", SYSDEF_INT, &eject_vote_vicious,
+ "Kill ntserv process to eject, causes some client problems" },
{ "", SYSDEF_END, NULL }
};
Index: struct.h
===================================================================
RCS file: /cvsroot/netrek/server/Vanilla/include/struct.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- struct.h 24 Apr 2006 12:35:17 -0000 1.7
+++ struct.h 26 Apr 2006 09:52:43 -0000 1.8
@@ -399,9 +399,7 @@
int p_df; /* defense (0 unknown, 1 worst, 100 best) */
int p_tg; /* target+1 */
#endif
-#ifdef VOTING
time_t voting[PV_TOTAL]; /* voting array */
-#endif
int p_candock; /* is this player allowed to dock onto SB */
int p_transwarp; /* flags base must have to allow transwarp */
};
@@ -703,7 +701,6 @@
int (*handler)();
};
-#ifdef VOTING
struct vote_handler {
char *type;
int tag;
@@ -719,9 +716,6 @@
#define VC_GLOG 0x0010 /* Write Votes to God Log */
#define VC_PLAYER 0x0020 /* Each player can be voted on, like eject */
-
-#endif
-
#endif /* __INCLUDED_struct_h__ */
/* Hey Emacs!
Index: gencmds.h
===================================================================
RCS file: /cvsroot/netrek/server/Vanilla/include/gencmds.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- gencmds.h 21 Mar 2005 05:23:36 -0000 1.1
+++ gencmds.h 26 Apr 2006 09:52:43 -0000 1.2
@@ -22,11 +22,9 @@
#define C_PR_5 0x4000
#define C_PR_6 0x8000
-#ifdef VOTING
#define C_VC_ALL 0x0020 /* Command only passes with Majority concensus */
#define C_VC_TEAM 0x0040 /* Command passes with agreement from Team */
/*#define C_VC_PLAYER 0x0080 */ /* Each player can be voted on, like eject */
-#endif /* VOTING */
/* Integrate Voting commands and generic commands into the same
structure. The two only differ slightly */
Index: data.h
===================================================================
RCS file: /cvsroot/netrek/server/Vanilla/include/data.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- data.h 24 Apr 2006 12:35:17 -0000 1.4
+++ data.h 26 Apr 2006 09:52:43 -0000 1.5
@@ -347,4 +347,12 @@
extern int whitelisted;
extern int blacklisted;
+extern int voting;
+extern int ban_vote_enable;
+extern int ban_vote_length;
+extern int ban_vote_offset;
+extern int eject_vote_enable;
+extern int eject_vote_only_if_queue;
+extern int eject_vote_vicious;
+
#endif /* _h_data */