change.cc
musicmud-2.1.6/src/extras/change.cc · 1.4 KB
From the archive musicmud2.1.6.tar.gz
Download the archive « Back to the archive contents
/*
* MusicMUD - change module
* Copyright (C) 1998-2003 Abigail Brady
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#include "musicmud.h"
#include "verbs.h"
#include "misc.h"
#include "pflags.h"
#include "util.h"
static bool verb_copydesc(MudObject *who, int argc, const char **argv) {
if (argc < 2) {
who->printf("copydesc <where>\n", argv[0]);
return true;
}
MudObject *where = planet->get(argv[1]);
if (!where) {
who->printf("Can't find %s.\n", argv[1]);
return true;
}
who->owner->set("!old-desc", who->owner->get("desc"));
who->owner->set("desc", where->get("desc"));
return true;
}
#define MODULE "change"
#include "verbmodule.h"
void startup() {
AUTO_VERB(copydesc, 5, 0, PFL_EDITALL);
}