2015-01-30 20:37:14 +01:00
|
|
|
/*
|
2014-03-22 21:49:18 +01:00
|
|
|
+-------------------+ Christian Schlittchen <corwin@amber.kn-bremen.de>
|
|
|
|
| | Enno Rehling <enno@eressea.de>
|
|
|
|
| Eressea PBEM host | Katja Zedel <katze@felidae.kn-bremen.de>
|
|
|
|
| (c) 1998 - 2003 | Henning Peters <faroul@beyond.kn-bremen.de>
|
|
|
|
| | Ingo Wilken <Ingo.Wilken@informatik.uni-oldenburg.de>
|
|
|
|
+-------------------+ Stefan Reich <reich@halbling.de>
|
|
|
|
|
|
|
|
This program may not be used, modified or distributed
|
|
|
|
without prior permission by the authors of Eressea.
|
2015-01-30 20:37:14 +01:00
|
|
|
*/
|
2014-03-22 21:49:18 +01:00
|
|
|
|
|
|
|
#include <platform.h>
|
|
|
|
#include <kernel/config.h>
|
|
|
|
#include "gmcmd.h"
|
|
|
|
#include <kernel/command.h>
|
|
|
|
|
|
|
|
/* misc includes */
|
|
|
|
#include <attributes/key.h>
|
|
|
|
#include <triggers/gate.h>
|
|
|
|
|
|
|
|
/* kernel includes */
|
|
|
|
#include <kernel/building.h>
|
|
|
|
#include <kernel/faction.h>
|
|
|
|
#include <kernel/item.h>
|
2014-06-09 18:54:48 +02:00
|
|
|
#include <kernel/messages.h>
|
2014-03-22 21:49:18 +01:00
|
|
|
#include <kernel/order.h>
|
|
|
|
#include <kernel/plane.h>
|
|
|
|
#include <kernel/region.h>
|
|
|
|
#include <kernel/terrain.h>
|
|
|
|
#include <kernel/terrainid.h>
|
|
|
|
#include <kernel/unit.h>
|
|
|
|
|
|
|
|
/* util includes */
|
|
|
|
#include <util/attrib.h>
|
2016-02-13 13:42:02 +01:00
|
|
|
#include <util/gamedata.h>
|
2018-02-09 21:20:43 +01:00
|
|
|
#include <util/macros.h>
|
2016-02-13 13:42:02 +01:00
|
|
|
|
2014-03-22 21:49:18 +01:00
|
|
|
#include <storage.h>
|
|
|
|
|
|
|
|
/* libc includes */
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <limits.h>
|
|
|
|
#include <assert.h>
|
|
|
|
|
2018-02-09 21:20:43 +01:00
|
|
|
static int read_permissions(variant *var, void *owner, struct gamedata *data)
|
2014-03-22 21:49:18 +01:00
|
|
|
{
|
2018-05-21 13:27:02 +02:00
|
|
|
attrib *a = NULL;
|
2018-02-09 21:20:43 +01:00
|
|
|
UNUSED_ARG(var);
|
2016-05-28 20:26:59 +02:00
|
|
|
read_attribs(data, &a, owner);
|
2015-01-30 20:37:14 +01:00
|
|
|
a_remove(&a, a);
|
|
|
|
return AT_READ_OK;
|
2014-03-22 21:49:18 +01:00
|
|
|
}
|
|
|
|
|
2018-02-09 21:20:43 +01:00
|
|
|
static int read_gmcreate(variant *var, void *owner, struct gamedata *data)
|
2014-03-22 21:49:18 +01:00
|
|
|
{
|
2015-01-30 20:37:14 +01:00
|
|
|
char zText[32];
|
2018-02-09 21:20:43 +01:00
|
|
|
UNUSED_ARG(var);
|
2016-02-13 13:42:02 +01:00
|
|
|
READ_TOK(data->store, zText, sizeof(zText));
|
2015-01-30 20:37:14 +01:00
|
|
|
return AT_READ_OK;
|
2014-03-22 21:49:18 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void register_gmcmd(void)
|
|
|
|
{
|
2014-10-18 19:23:36 +02:00
|
|
|
at_deprecate("GM:create", read_gmcreate);
|
|
|
|
at_deprecate("GM:permissions", read_permissions);
|
2014-03-22 21:49:18 +01:00
|
|
|
}
|