#
# Patch name: Caseless BSD.C Commands.
# Patch version: 0
# Author's name: ranmir
# Author's email: ag_vertigo@geocities.com
# Version of PennMUSH: 1.8.2p1
# Date patch made: 2007/06/01
# Author is willing to support (yes/no): yes
# Patch format: diff -c
#
#
# This is a contributed PennMUSH patch. Its use is subject to the
# same restrictions found in PennMUSH's hdrs/copyrite.h file.
#
# No warranty is given for this patch. It is not necessarily going
# to work on your system, with any version of PennMUSH other than
# the one above, etc.
#
# If the author given above was willing to support the patch, you
# should write to the author if you have any questions or problems. Do
# *NOT* send email messages to Javelin or any PennMUSH mailing list about
# this patch!
#
# Below this line is the author's description of the patch,
# followed by the patch itself. If the patch is in context diff
# format, you'll probably apply it by typing: patch < patchfile
# in your top-level MUSH directory, unless instructed otherwise
# below.
#
# Description: A quick patch I made for lazy admins who don't want
# or need to softcode a WHO command, or any of the myriad of other
# 'internal' pennmush commands.
# These changes only affect bsd.c, however they are non-@hookable
# commands, so this change will mean that lowercase versions of all
# these functions will not be possible without reversing this patch.
# ranmir '07
*** bsd.c.orig	Fri Jun  1 15:27:22 2007
--- bsd.c	Fri Jun  1 15:28:47 2007
***************
*** 2426,2469 ****
  
    (d->cmds)++;
  
!   if (!strcmp(command, IDLE_COMMAND))
      return 1;
    d->last_time = mudtime;
!   if (!strcmp(command, QUIT_COMMAND)) {
      return 0;
!   } else if (!strcmp(command, LOGOUT_COMMAND)) {
      return -1;
!   } else if (!strcmp(command, INFO_COMMAND)) {
      send_prefix(d);
      dump_info(d);
      send_suffix(d);
!   } else if (!strncmp(command, WHO_COMMAND, strlen(WHO_COMMAND))) {
      send_prefix(d);
      dump_users(d, command + strlen(WHO_COMMAND), 0);
      send_suffix(d);
!   } else if (!strncmp(command, DOING_COMMAND, strlen(DOING_COMMAND))) {
      send_prefix(d);
      dump_users(d, command + strlen(DOING_COMMAND), 1);
      send_suffix(d);
!   } else if (!strncmp(command, SESSION_COMMAND, strlen(SESSION_COMMAND))) {
      send_prefix(d);
      dump_users(d, command + strlen(SESSION_COMMAND), 2);
      send_suffix(d);
!   } else if (!strncmp(command, PREFIX_COMMAND, strlen(PREFIX_COMMAND))) {
      set_userstring(&d->output_prefix, command + strlen(PREFIX_COMMAND));
!   } else if (!strncmp(command, SUFFIX_COMMAND, strlen(SUFFIX_COMMAND))) {
      set_userstring(&d->output_suffix, command + strlen(SUFFIX_COMMAND));
!   } else if (!strncmp(command, "SCREENWIDTH", 11)) {
      d->width = parse_integer(command + 11);
!   } else if (!strncmp(command, "SCREENHEIGHT", 12)) {
      d->height = parse_integer(command + 12);
!   } else if (!strncmp(command, "PROMPT_NEWLINES", 15)) {
      if (parse_integer(command + 15))
        d->conn_flags |= CONN_PROMPT_NEWLINES;
      else
        d->conn_flags &= ~CONN_PROMPT_NEWLINES;
    } else if (SUPPORT_PUEBLO
! 	     && !strncmp(command, PUEBLO_COMMAND, strlen(PUEBLO_COMMAND))) {
      parse_puebloclient(d, command);
      if (!(d->conn_flags & CONN_HTML)) {
        queue_newwrite(d, (unsigned char *) PUEBLO_SEND, strlen(PUEBLO_SEND));
--- 2426,2469 ----
  
    (d->cmds)++;
  
!   if (!strcasecmp(command, IDLE_COMMAND))
      return 1;
    d->last_time = mudtime;
!   if (!strcasecmp(command, QUIT_COMMAND)) {
      return 0;
!   } else if (!strcasecmp(command, LOGOUT_COMMAND)) {
      return -1;
!   } else if (!strcasecmp(command, INFO_COMMAND)) {
      send_prefix(d);
      dump_info(d);
      send_suffix(d);
!   } else if (!strncasecmp(command, WHO_COMMAND, strlen(WHO_COMMAND))) {
      send_prefix(d);
      dump_users(d, command + strlen(WHO_COMMAND), 0);
      send_suffix(d);
!   } else if (!strncasecmp(command, DOING_COMMAND, strlen(DOING_COMMAND))) {
      send_prefix(d);
      dump_users(d, command + strlen(DOING_COMMAND), 1);
      send_suffix(d);
!   } else if (!strncasecmp(command, SESSION_COMMAND, strlen(SESSION_COMMAND))) {
      send_prefix(d);
      dump_users(d, command + strlen(SESSION_COMMAND), 2);
      send_suffix(d);
!   } else if (!strncasecmp(command, PREFIX_COMMAND, strlen(PREFIX_COMMAND))) {
      set_userstring(&d->output_prefix, command + strlen(PREFIX_COMMAND));
!   } else if (!strncasecmp(command, SUFFIX_COMMAND, strlen(SUFFIX_COMMAND))) {
      set_userstring(&d->output_suffix, command + strlen(SUFFIX_COMMAND));
!   } else if (!strncasecmp(command, "SCREENWIDTH", 11)) {
      d->width = parse_integer(command + 11);
!   } else if (!strncasecmp(command, "SCREENHEIGHT", 12)) {
      d->height = parse_integer(command + 12);
!   } else if (!strncasecmp(command, "PROMPT_NEWLINES", 15)) {
      if (parse_integer(command + 15))
        d->conn_flags |= CONN_PROMPT_NEWLINES;
      else
        d->conn_flags &= ~CONN_PROMPT_NEWLINES;
    } else if (SUPPORT_PUEBLO
! 	     && !strncasecmp(command, PUEBLO_COMMAND, strlen(PUEBLO_COMMAND))) {
      parse_puebloclient(d, command);
      if (!(d->conn_flags & CONN_HTML)) {
        queue_newwrite(d, (unsigned char *) PUEBLO_SEND, strlen(PUEBLO_SEND));
