/
LIB3/
LIB3/D/ADMIN/
LIB3/D/ADMIN/OBJ/
LIB3/D/ADMIN/ROOM/W/
LIB3/D/HOME/
LIB3/D/HOME/CITY/ARENA/
LIB3/D/HOME/CITY/ITEMS/
LIB3/D/HOME/CITY/POSTOFFI/
LIB3/DOC/
LIB3/GLOBAL/SPECIAL/
LIB3/GLOBAL/VIRTUAL/
LIB3/NET/
LIB3/NET/CONFIG/
LIB3/NET/DAEMON/CHARS/
LIB3/NET/GOPHER/
LIB3/NET/INHERIT/
LIB3/NET/OBJ/
LIB3/NET/SAVE/
LIB3/NET/VIRTUAL/
LIB3/OBJ/B_DAY/
LIB3/OBJ/HANDLERS/TERM_TYP/
LIB3/PLAYERS/B/
LIB3/PLAYERS/N/
LIB3/ROOM/
LIB3/SAVE/
LIB3/SAVE/BOARDS/
LIB3/SAVE/ENVIRON/
LIB3/SAVE/POST/
LIB3/STD/COMMANDS/SHADOWS/
LIB3/STD/CREATOR/
LIB3/STD/DOM/
LIB3/STD/EFFECTS/
LIB3/STD/EFFECTS/HEALING/
LIB3/STD/EFFECTS/OTHER/
LIB3/STD/EFFECTS/POISONS/
LIB3/STD/ENVIRON/
LIB3/STD/GUILDS/
LIB3/STD/LIQUIDS/
LIB3/STD/ROOM/
LIB3/STD/TRIGGER/SHADOW/
LIB3/W/
LIB3/W/BANNOR/
LIB3/W/NEWSTYLE/
#include "path.h"
inherit "std/room";
static string message, ban;
static int in_use;

setup()
{
   set_short("The complaints room");
   set_long("A barren looking room with small but very angry "
      +"looking thunderclouds buzzing roung the ceiling, this is "
      +"where the people of New Moon can come to air their "
      +"griefs, and hopefully gain the attention of somebody with "
      +"the power to solve all their worries.\n");
   add_item( ({"cloud", "thundercloud"}),
      "The clouds are dark grey, and occasional flashes of "
      +"lightning illuminate them.\n");
   add_sign("A sign, much like any other.\n",
      "Players can 'complain' here to lodge an official complaint.\n"
      +"Creators can also 'banish' names here.\n", "sign", "sign");
   set_zone("town hall");
   set_light(80);
   add_exit("east", "corridor3", "door");
}

void init() {
   ::init();
   add_action("banish", "banish");
   add_action("complain", "complain");
}

int banish(string str) {
   string str1, temp1;
   
   if(!this_player()->query_creator())
      {
      notify_fail("Only creators can banish people here. If there is "
            +"an offensively named player on the go, inform one of "
         +"our invariably friendly creators, and they will banish it for you.\n");
      return 0;
   }
   notify_fail("Usage : banish <name> <reason>\n");
   if(!str)
      return 0;
   if(sscanf(str, "%s %s", str, str1) != 2)
      return 0;
   str = lower_case(str);
   if(sscanf(str,"%s.",temp1))
      return 0;
   if(sscanf(str, "%s/", temp1))
      return 0;
   if(file_size("/banish/"+str+".o") >= 0) {
      notify_fail("That name is already banished.\n");
      return 0;
   }
   if("secure/login"->test_user(str)) {
      notify_fail("That is a player.  You must rm or mv the player file first.\n");
      return 0;
   }
   ban = "Banished by : "+(string)this_player()->query_name()+"\n";
   ban += ctime(time())+"\n";
   ban += "Banish Reason : " + str1 + "\n";
   seteuid((string)"secure/master"->get_root_uid());
   write_file("/banish/"+str+".o", ban);
   seteuid("Room");
   write(str + " banished.\n");
   return 1;
}


int complain() {
   if(this_player()->query_property("guest")) {
      return 0;
   }
   if(in_use) {
      write("Sorry, a complaint is currently being posted.\n"+
         "Please try again soon or fetch a creator if nobody is here.\n");
      return 1;
   }
   message = this_player()->query_cap_name() + " " + ctime(time()) + "\n";
   in_use = 1;
   write("You are lodging an official complaint about something or someone.\n"+
      "Do not take this action lightly.\n"+
      "Please provide as much information as possible and a Lord or God "+
      "will mail you regarding the problem as soon as possible.  Only "+
      "problems that you feel affect the entire mud should be complained "+
      "about.  Feedback for the general populous will probably end up on "+
      "bulletin boards around the place.\n");
   write("Enter complaint.  ** to end or ~q to abort.\n");
   write("] ");
   input_to("get_complaint");
   return 1;
}

void get_complaint(string str) {
   if(str == "~q") {
      write("Complaint aborted.\n");
      in_use = 0;
      message = "";
      return;
   }
   if(str == "**") {
      write("Complaint Posted\n");
      message += "\n\n";
      log_file("COMPLAINTS", message);
      message = "";
      in_use = 0;
      return;
   }
   message += str + "\n";
   write("] ");
   input_to("get_complaint");
}


int vote() {
   write("No issues up for vote.\n");
   return 1;
}