/* vi: set ts=2: +-------------------+ Christian Schlittchen | | Enno Rehling | Eressea PBEM host | Katja Zedel | (c) 1998 - 2003 | Henning Peters | | Ingo Wilken +-------------------+ Stefan Reich This program may not be used, modified or distributed without prior permission by the authors of Eressea. */ #include #include #include "gmcmd.h" #include /* misc includes */ #include #include #include #include /* kernel includes */ #include #include #include #include #include #include #include #include #include #include #include /* util includes */ #include #include #include #include #include #include #include #include #include #include #include /* libc includes */ #include #include #include #include static int read_permissions(attrib * a, void *owner, struct storage *store) { attrib *attr = NULL; a_read(store, &attr, NULL); a_free(attr); return AT_READ_OK; } struct attrib_type at_permissions = { "GM:permissions", NULL, NULL, NULL, NULL, read_permissions, ATF_UNIQUE }; static int read_gmcreate(attrib * a, void *owner, struct storage *store) { char zText[32]; READ_TOK(store, zText, sizeof(zText)); return AT_READ_OK; } /* at_gmcreate specifies that the owner can create items of a particular type */ attrib_type at_gmcreate = { "GM:create", NULL, NULL, NULL, NULL, read_gmcreate }; void register_gmcmd(void) { at_register(&at_gmcreate); at_register(&at_permissions); }