diff -Nur ircd-hybrid-6.3rc6.orig/include/config.h ircd-hybrid-6.3rc6/include/config.h
--- ircd-hybrid-6.3rc6.orig/include/config.h	Fri Jan  4 05:00:58 2002
+++ ircd-hybrid-6.3rc6/include/config.h	Thu Feb 14 12:35:37 2002
@@ -500,6 +500,8 @@
 #undef  SYSLOG_USERS    /* send userlog stuff to syslog */
 #undef  SYSLOG_OPER     /* log all users who successfully become an Op */
 #undef  SYSLOG_BLOCK_ALLOCATOR /* debug block allocator */
+#undef  SYSLOG_CHGHOST  /* log all remote hostname changes to syslog */
+#undef  SYSLOG_CHGIDENT /* log all remote username changes to syslog */
 
 /* LOG_FACILITY - facility to use for syslog()
  * Define the facility you want to use for syslog().  Ask your
diff -Nur ircd-hybrid-6.3rc6.orig/include/m_commands.h ircd-hybrid-6.3rc6/include/m_commands.h
--- ircd-hybrid-6.3rc6.orig/include/m_commands.h	Thu Nov 29 07:28:23 2001
+++ ircd-hybrid-6.3rc6/include/m_commands.h	Thu Feb 14 12:20:08 2002
@@ -99,4 +99,6 @@
 extern int m_dns(struct Client *,struct Client *,int,char **);
 extern int m_htm(struct Client *,struct Client *,int,char **);
 extern int m_set(struct Client *,struct Client *,int,char **);
+extern int m_chghost(struct Client*,struct Client*,int,char **);
+extern int m_chgident(struct Client*,struct Client*,int,char **);
 #endif /* INCLUDED_m_commands_h */
diff -Nur ircd-hybrid-6.3rc6.orig/include/msg.h ircd-hybrid-6.3rc6/include/msg.h
--- ircd-hybrid-6.3rc6.orig/include/msg.h	Sat Dec  8 03:38:15 2001
+++ ircd-hybrid-6.3rc6/include/msg.h	Thu Feb 14 12:19:36 2002
@@ -118,6 +118,8 @@
 #define MSG_UNDLINE  "UNDLINE"  /* UNDLINE */
 #define MSG_HTM      "HTM"      /* HTM */
 #define MSG_SET      "SET"      /* SET */
+#define MSG_CHGHOST  "CHGHOST"  /* CHGHOST */
+#define MSG_CHGIDENT "CHGIDENT" /* CHGIDENT */
 
 #define MSG_GLINE    "GLINE"    /* GLINE */
 #define MSG_UNGLINE  "UNGLINE"  /* UNGLINE */
@@ -253,6 +255,8 @@
   { MSG_HTM,    m_htm,       0, MAXPARA, 1, 0, 0, 0L },
   { MSG_SET,    m_set,       0, MAXPARA, 1, 0, 0, 0L },
   { MSG_TESTLINE,       m_testline,          0, MAXPARA, 1, 0, 0, 0L },
+  { MSG_CHGHOST, m_chghost,  0, MAXPARA, 1, 0, 0, 0L },
+  { MSG_CHGIDENT,m_chgident, 0, MAXPARA, 1, 0, 0, 0L },
   { (char *) 0, (int (*)()) 0 , 0, 0,    0, 0, 0, 0L }
 };
 
diff -Nur ircd-hybrid-6.3rc6.orig/src/Makefile.in ircd-hybrid-6.3rc6/src/Makefile.in
--- ircd-hybrid-6.3rc6.orig/src/Makefile.in	Fri Dec  7 05:13:29 2001
+++ ircd-hybrid-6.3rc6/src/Makefile.in	Thu Feb 14 12:24:06 2002
@@ -35,6 +35,8 @@
 	m_admin.c \
 	m_away.c \
 	m_capab.c \
+	m_chghost.c \
+	m_chgident.c \
 	m_close.c \
 	m_connect.c \
 	m_die.c \
@@ -121,6 +123,8 @@
 #	m_admin.o \
 #	m_away.o \
 #	m_capab.o \
+#	m_chghost.o \
+#	m_chgident.o \
 #	m_close.o \
 #	m_connect.o \
 #	m_die.o \
diff -Nur ircd-hybrid-6.3rc6.orig/src/m_chghost.c ircd-hybrid-6.3rc6/src/m_chghost.c
--- ircd-hybrid-6.3rc6.orig/src/m_chghost.c	Thu Jan  1 01:00:00 1970
+++ ircd-hybrid-6.3rc6/src/m_chghost.c	Thu Feb 14 11:56:40 2002
@@ -0,0 +1,152 @@
+/**********************************************************
+ *                                                        *
+ * This file is part of a patch which introduces commands *
+ * 'chghost' and 'chgident' to hybrid 6.2.                *
+ * Notice: this patch has not been approved by any of the *
+ * official Hybrid IRCd coder.                            *
+ *                                                        *
+ **********************************************************/
+
+
+/***************************************************************************
+                           m_chghost.c
+                           -------------------
+    copyright            : (C) 2002 by Martin Scholl
+    email                : ms@deridiot.net
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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.                                   *
+ *                                                                         *
+ ***************************************************************************/
+
+#include "m_commands.h"
+#include "client.h"
+#include "ircd.h"
+#include "numeric.h"
+#include "s_log.h"
+#include "s_serv.h"
+#include "send.h"
+#include "whowas.h"
+#include "irc_string.h"
+
+#include <string.h>
+
+/**
+ * m_chghost
+ * 
+ *    parv[0] = sender
+ *    parv[1] = victim
+ *    parv[2] = vhost
+ *
+ * Notes:
+ * access to this command is only permitted for servers
+ */
+int m_chghost( struct Client *cptr, 
+	       struct Client *sptr,
+	       int parc,
+	       char** parv )
+{
+   struct Client* acptr;
+   const char*    sender = parv[0];
+   char*          target;
+   char*          vhost; /* new hostname */
+   char*          hostname; /* last hostname */
+
+   /**
+    * only let servers access this command
+    */
+   if( !IsServer( cptr ) )
+   {
+      sendto_one( sptr, form_str( ERR_UNKNOWNCOMMAND ),
+		  me.name, sender, "CHGHOST" );
+
+      return 0;
+   }
+   
+   if( parc < 2 || *parv[1] == '\0' )
+   {
+      sendto_one( sptr, form_str( ERR_NEEDMOREPARAMS ),
+		  me.name, sender, "CHGHOST" );
+      
+      return 0;
+   }
+   
+   target = parv[1];
+   
+   if( !( acptr = find_client( target, NULL ) ) ) {
+      /*
+       * chase client
+       */
+      if( !( acptr = get_history( target, (long) KILLCHASETIMELIMIT ) ) ) 
+      {
+	 sendto_one( sptr, form_str( ERR_NOSUCHNICK ),
+		     me.name, sender, target );
+
+	 return 0;
+      }
+   }
+
+   vhost    = parv[2];
+   hostname = &acptr->host[0];
+
+   /*
+    * only apply change if proposed hostname change 
+    * changes hostname in fact 
+    * ( case-sensitive substring search )
+    */
+   if( ( strstr( hostname, vhost ) ) != hostname ) {
+      int   len    = strlen( vhost );
+      char* lIter  = vhost; /* used to write to 'vhost' string */
+      char* rIter  = vhost; /* used to read from 'vhost' string */
+      char* endStr = vhost;
+
+      len = len > HOSTLEN ? HOSTLEN : len;
+      endStr += len;
+
+      /*
+       * clean 'vhost' from irregular characters
+       */
+      for( ; rIter != endStr; ++rIter )
+      {
+	 if( IsHostChar( *rIter ) ) 
+	 {
+	    *lIter = *rIter;
+	    ++lIter;
+	 }
+      }
+
+      *lIter = '\0'; /* terminate */
+
+      /*
+       * no valid character in vhost left.
+       * to keep network in sync chghost
+       * back to the last valid hostname.
+       */
+      if( *vhost == '\0' ) {
+	 sendto_one( cptr, ":%s CHGHOST %s %s",
+		     me.name, target, hostname );
+	 return 0;
+      }
+
+#if defined(USE_SYSLOG) && defined(SYSLOG_CHGHOST)
+      log( L_INFO, "CHGHOST From %s to %s for %s",
+	   hostname, vhost, sender );
+#endif
+
+      /*
+       * change hostname and broadcast change
+       */
+      strncpy_irc( hostname, vhost, len );
+      hostname[len] = '\0';
+      
+      sendto_serv_butone( cptr, ":%s CHGHOST %s %s",
+			  sender, target, hostname );
+   }
+
+   return 0;
+}
diff -Nur ircd-hybrid-6.3rc6.orig/src/m_chgident.c ircd-hybrid-6.3rc6/src/m_chgident.c
--- ircd-hybrid-6.3rc6.orig/src/m_chgident.c	Thu Jan  1 01:00:00 1970
+++ ircd-hybrid-6.3rc6/src/m_chgident.c	Thu Feb 14 11:56:32 2002
@@ -0,0 +1,151 @@
+/**********************************************************
+ *                                                        *
+ * This file is part of a patch which introduces commands *
+ * 'chghost' and 'chgident' to hybrid 6.2.                *
+ * Notice: this patch has not been approved by any of the *
+ * official Hybrid IRCd coder.                            *
+ *                                                        *
+ **********************************************************/
+
+/***************************************************************************
+                           m_chgident.c
+                           -------------------
+    copyright            : (C) 2002 by Martin Scholl
+    email                : ms@deridiot.net
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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.                                   *
+ *                                                                         *
+ ***************************************************************************/
+
+#include "m_commands.h"
+#include "client.h"
+#include "ircd.h"
+#include "numeric.h"
+#include "s_log.h"
+#include "s_serv.h"
+#include "send.h"
+#include "whowas.h"
+#include "irc_string.h"
+
+#include <string.h>
+
+/**
+ * m_chgident
+ * 
+ *    parv[0] = sender
+ *    parv[1] = victim
+ *    parv[2] = username
+ *
+ * Notes:
+ * access to this command is only permitted for servers
+ */
+int m_chgident( struct Client *cptr, 
+	       struct Client *sptr,
+	       int parc,
+	       char** parv )
+{
+  struct Client* acptr; /* `target''s client struct */
+   const char*    sender = parv[0]; /* hostname changer */
+   char*          target; /* who's username should be changed */
+   char*          newUsername; /* proposed username after update */
+   char*          username; /* current username */
+
+   /**
+    * let only servers access this command
+    */
+   if( !IsServer( cptr ) )
+   {
+     sendto_one( sptr, form_str( ERR_UNKNOWNCOMMAND ),
+		 me.name, sender, "CHGIDENT" );
+
+      return 0;
+   }
+   
+   if( parc < 2 || *parv[1] == '\0' )
+   {
+      sendto_one( sptr, form_str( ERR_NEEDMOREPARAMS ),
+		  me.name, sender, "CHGIDENT" );
+      
+      return 0;
+   }
+
+   target = parv[1];
+
+   if( !( acptr = find_client( target, NULL ) ) ) {
+      /*
+       * chase client
+       */
+      if( !( acptr = get_history( target, (long) KILLCHASETIMELIMIT ) ) )
+      {
+	 sendto_one( sptr, form_str( ERR_NOSUCHNICK ),
+		     me.name, sender, target );
+
+	 return 0;
+      }
+   }
+
+   newUsername = parv[2];
+   username    = &acptr->username[0];
+
+   /*
+    * only apply change if proposed username change
+    * changes username in fact
+    * ( case-sensitive substring search )
+    */
+   if( ( strstr( username, newUsername ) ) != username ) {
+      int   len    = strlen( newUsername );
+      char* lIter  = newUsername; /* used to write to 'vhost' string */
+      char* rIter  = newUsername; /* used to read from 'vhost' string */
+      char* endStr = newUsername; /* marks end of iterative operation */
+
+      len = len > USERLEN ? USERLEN : len;
+      endStr += len;
+
+      /*
+       * clean 'newUsername' from irregular characters
+       */
+      for( ; rIter != endStr; ++rIter )
+      {
+	 if( IsUserChar( *rIter ) )
+	 {
+	    *lIter = *rIter;
+	    ++lIter;
+	 }
+      }
+
+      *lIter = '\0'; /* terminate */
+
+      /*
+       * no valid character in newUsername left ->
+       *    keep network in sync via 'CHGIDENT'
+       *    back to the last valid username.
+       */
+      if( *newUsername == '\0' ) {
+	 sendto_one( cptr, ":%s CHGIDENT %s %s",
+		     me.name, target, username );
+	 return 0;
+      }
+
+#if defined(USE_SYSLOG) && defined(SYSLOG_CHGIDENT)
+      log( L_INFO, "CHGIDENT from %s to %s for %s",
+	   username, newUsername, sender );
+#endif
+
+      /*
+       * change hostname and broadcast change
+       */
+      strncpy_irc( username, newUsername, len );
+      username[len] = '\0';
+      
+      sendto_serv_butone( cptr, ":%s CHGIDENT %s %s",
+			  sender, target, username );
+   }
+
+   return 0;
+}
