ranks.cc
musicmud-2.1.6/src/ranks.cc · 1.7 KB
From the archive musicmud2.1.6.tar.gz
Download the archive « Back to the archive contents
/*
* MusicMUD Daemon, version 1.0
* 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 "levels.h"
#include "privs.h"
const char *get_rank(int priv) {
switch (priv) {
case 1: return "Serf";
case 2 ... 16: return "Adventurer";
case 17: return "Hero";
case 18: return "Distinguished";
case 19 ... 9992 : return "Esteemed";
case 9993 ... 9996: return "Famed";
case 9997 ... 9999: return "Revered";
}
return "BugFixer";
}
const char *plural_rank(int priv) {
switch (priv) {
case 1: return "Serfs";
case 2 ... 16: return "Adventurers";
case 17: return "Heroes";
case 18: return "the Distinguished";
case 19 ... 9992 : return "the Esteemed";
case 9993 ... 9996: return "the Famed";
case 9997 ... 9999: return "the Revered";
}
return "Bugfixer";
}
const char *long_rank(int priv) {
return get_rank(priv);
}
const char *get_rank(const MudObject *who)
{
return get_rank(privs_of(who));
}
const char *get_long_rank(const MudObject *who) {
return long_rank(privs_of(who));
}