diff -ruN ircd-hybrid-7.0/Makefile.in ircd-hybrid-7.0cj0/Makefile.in
--- ircd-hybrid-7.0/Makefile.in	2002-01-13 10:31:43.000000000 -0800
+++ ircd-hybrid-7.0cj0/Makefile.in	2003-07-28 18:29:40.000000000 -0700
@@ -38,7 +38,7 @@
 # the system one.
 #CFLAGS= -DNDEBUG -g -O2 -D"FD_SETSIZE=1024"
 SHELL=/bin/sh
-SUBDIRS=modules adns src tools doc @SUBDIR_MESSAGES@ include servlink help
+SUBDIRS=modules adns src tools doc @SUBDIR_MESSAGES@ include servlink help chatjunkies
 CLEANDIRS = ${SUBDIRS} contrib iauth
 # XXX removed `iauth' from the build since it doesn't compile currently
 # SUBDIRS=src tools iauth
diff -ruN ircd-hybrid-7.0/chatjunkies/Makefile.in ircd-hybrid-7.0cj0/chatjunkies/Makefile.in
--- ircd-hybrid-7.0/chatjunkies/Makefile.in	1969-12-31 16:00:00.000000000 -0800
+++ ircd-hybrid-7.0cj0/chatjunkies/Makefile.in	2003-07-28 18:29:40.000000000 -0700
@@ -0,0 +1,74 @@
+#
+# Makefile.in for ircd/chatjunkies
+#
+# $Id: Makefile.in,v 1.35.2.6 2003/06/10 02:16:50 bill Exp $
+#
+CC		= @CC@
+RM		= @RM@
+SED             = @SED@
+LEX		= @LEX@
+LEXLIB		= @LEXLIB@
+CFLAGS		= @IRC_CFLAGS@ -DIRCD_PREFIX=\"@prefix@\"
+PICFLAGS	= @PICFLAGS@
+MKDEP		= @MKDEP@
+INSTALL		= @INSTALL@
+INSTALL_PROGRAM	= @INSTALL_PROGRAM@
+INSTALL_DATA	= @INSTALL_DATA@
+INSTALL_SUID    = @INSTALL_PROGRAM@ -o root -m 4755
+SHELL		= /bin/sh
+AUTOMODULEDIR	= @prefix@/modules/autoload
+
+SSL_LIBS	= @SSL_LIBS@
+SSL_INCLUDES	= @SSL_INCLUDES@
+
+IRCDLIBS	= @LIBS@ $(SSL_LIBS)
+
+INCLUDES	= -I../include -I../adns $(SSL_INCLUDES)
+CPPFLAGS	= ${INCLUDES} @CPPFLAGS@
+
+SRCS =                          \
+	m_sethost.c		\
+	m_setident.c		\
+	m_setname.c		\
+	m_force.c		\
+	m_map.c			\
+	m_mkpasswd.c		\
+	m_ojoin.c		\
+	m_opme.c		\
+	m_tburst.c		\
+	m_whois.c		
+
+OBJS = ${SRCS:.c=.so}
+
+default:	build
+build: all
+all: $(OBJS)
+
+install: all
+	@echo "Installing modules into $(AUTOMODULEDIR) .."
+	@for file in $(OBJS); do \
+		$(INSTALL_DATA) $$file $(AUTOMODULEDIR); \
+	done
+
+.SUFFIXES: .so
+
+.c.so:
+	${CC} ${PICFLAGS}  ${CPPFLAGS} ${CFLAGS} $< -o $@
+
+.PHONY: depend clean distclean
+depend:
+	@${MKDEP} ${CPPFLAGS} ${SRCS} > .depend
+	@sed s/\\\.o/\\\.so/ < .depend > .depend.tmp
+	@sed -e '/^# DO NOT DELETE THIS LINE/,$$d' <Makefile >Makefile.depend
+	@echo '# DO NOT DELETE THIS LINE!!!' >>Makefile.depend
+	@echo '# make depend needs it.' >>Makefile.depend
+	@cat .depend.tmp >>Makefile.depend
+	@mv Makefile.depend Makefile
+	@rm -f .depend.tmp .depend
+
+clean:
+	${RM} -f *.so *~ 
+
+distclean: clean
+	${RM} -f Makefile
+
diff -ruN ircd-hybrid-7.0/chatjunkies/m_force.c ircd-hybrid-7.0cj0/chatjunkies/m_force.c
--- ircd-hybrid-7.0/chatjunkies/m_force.c	1969-12-31 16:00:00.000000000 -0800
+++ ircd-hybrid-7.0cj0/chatjunkies/m_force.c	2003-07-28 18:29:40.000000000 -0700
@@ -0,0 +1,314 @@
+/* contrib/m_force.c
+ * Copyright (C) 2002 Hybrid Development Team
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *  1.Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *  2.Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *  3.The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ *  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ *  DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+ *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ *  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ *  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ *  IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ *  POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $Id: m_force.c,v 1.17 2002/11/01 13:24:41 db Exp $
+ */
+
+#include "stdinc.h"
+#include "handlers.h"
+#include "client.h"
+#include "common.h"     /* FALSE bleah */
+#include "ircd.h"
+#include "irc_string.h"
+#include "numeric.h"
+#include "fdlist.h"
+#include "hash.h"
+#include "s_bsd.h"
+#include "s_conf.h"
+#include "s_log.h"
+#include "s_serv.h"
+#include "send.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+#include "channel.h"
+#include "channel_mode.h"
+
+
+static void mo_forcejoin(struct Client *client_p, struct Client *source_p,
+                         int parc, char *parv[]);
+static void mo_forcepart(struct Client *client_p, struct Client *source_p,
+		         int parc, char *parv[]);
+
+struct Message forcejoin_msgtab = {
+  "FORCEJOIN", 0, 0, 3, 0, MFLG_SLOW, 0,
+  {m_ignore, m_not_oper, mo_forcejoin, mo_forcejoin}
+};
+struct Message forcepart_msgtab = {
+  "FORCEPART", 0, 0, 3, 0, MFLG_SLOW, 0,
+  {m_ignore, m_not_oper, mo_forcepart, mo_forcepart}
+};
+
+#ifndef STATIC_MODULES
+void
+_modinit(void)
+{
+  mod_add_cmd(&forcejoin_msgtab);
+  mod_add_cmd(&forcepart_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&forcejoin_msgtab);
+  mod_del_cmd(&forcepart_msgtab);
+}
+
+char *_version = "$Revision: 1.17 $";
+#endif
+
+/*
+ * m_forcejoin
+ *      parv[0] = sender prefix
+ *      parv[1] = user to force
+ *      parv[2] = channel to force them into
+ */
+static void mo_forcejoin(struct Client *client_p, struct Client *source_p,
+                         int parc, char *parv[])
+{
+  struct Client *target_p;
+  struct Channel *chptr;
+  int type;
+  char mode;
+  char sjmode;
+  char *newch;
+
+  if(!IsAdmin(source_p))
+  {
+    sendto_one(source_p, ":%s NOTICE %s :You have no A flag", me.name, parv[0]);
+    return;
+  }
+
+  /* if target_p is not existent, print message
+   * to source_p and bail - scuzzy
+   */
+  if ((target_p = find_client(parv[1])) == NULL)
+  {
+    sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name,
+	       source_p->name, parv[1]);
+    return;
+  }
+
+  if (!MyConnect(target_p))
+  {
+    sendto_one(target_p, ":%s FORCEJOIN %s %s", parv[0], parv[1], parv[2]);
+    return;
+  }
+
+  /* select our modes from parv[2] if they exist... (chanop)*/
+  if(*parv[2] == '@')
+  {
+    type = CHFL_CHANOP;
+    mode = 'o';
+    sjmode = '@';
+  }
+#ifdef HALFOPS
+  else if(*parv[2] == '%')
+  {
+    type = CHFL_HALFOP;
+    mode = 'h';
+    sjmode = '%';
+  }
+#endif
+  else if(*parv[2] == '+')
+  {
+    type = CHFL_VOICE;
+    mode = 'v';
+    sjmode = '+';
+  }
+  else
+  {
+    type = CHFL_PEON;
+    mode = sjmode = '\0';
+  }
+    
+  if(mode != '\0')
+    parv[2]++;
+    
+  if((chptr = hash_find_channel(parv[2])) != NULL)
+    {
+      if(IsMember(target_p, chptr))
+      {
+        /* debugging is fun... */
+        sendto_one(source_p, ":%s NOTICE %s :*** Notice -- %s is already in %s", me.name,
+		   source_p->name, target_p->name, chptr->chname);
+	return;
+      }
+
+      add_user_to_channel(chptr, target_p, type);
+
+      if (chptr->chname[0] != '&')
+        sendto_server(target_p, target_p, chptr, NOCAPS, NOCAPS, LL_ICLIENT,
+	              ":%s SJOIN %lu %s + :%c%s",
+	              me.name, (unsigned long) chptr->channelts,
+	              chptr->chname, type ? sjmode : ' ', target_p->name);
+
+      sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN :%s",
+                             target_p->name, target_p->username,
+                             target_p->host, chptr->chname);
+
+      if(type)
+        sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +%c %s",
+	                     me.name, chptr->chname, mode, target_p->name);
+        
+      if(chptr->topic != NULL)
+      {
+	sendto_one(target_p, form_str(RPL_TOPIC), me.name,
+	           target_p->name, chptr->chname, chptr->topic);
+        sendto_one(target_p, form_str(RPL_TOPICWHOTIME),
+	           me.name, source_p->name, chptr->chname,
+	           chptr->topic_info, chptr->topic_time);
+      }
+
+      channel_member_names(target_p, chptr, chptr->chname, 1);
+    }
+  else
+    {
+      newch = parv[2];
+      if (!check_channel_name(newch))
+      {
+        sendto_one(source_p, form_str(ERR_BADCHANNAME), me.name,
+		   source_p->name, (unsigned char*)newch);
+	return;
+      }
+
+      /* channel name must begin with & or # */
+      if (!IsChannelName(newch))
+      {
+        sendto_one(source_p, form_str(ERR_BADCHANNAME), me.name,
+		   source_p->name, (unsigned char*)newch);
+        return;
+      }
+
+     /* it would be interesting here to allow an oper
+      * to force target_p into a channel that doesn't exist
+      * even more so, into a local channel when we disable
+      * local channels... but...
+      * I don't want to break anything - scuzzy
+      */
+      if (ConfigServerHide.disable_local_channels &&
+	  (*newch == '&'))
+      {
+        sendto_one(source_p, ":%s NOTICE %s :No such channel (%s)", me.name,
+		   source_p->name, newch);
+        return;
+      }
+
+      /* newch can't be longer than CHANNELLEN */
+      if (strlen(newch) > CHANNELLEN)
+      {
+	sendto_one(source_p, ":%s NOTICE %s :Channel name is too long", me.name,
+		   source_p->name);
+        return;
+      }
+
+      chptr = get_or_create_channel(target_p, newch, NULL);
+      add_user_to_channel(chptr, target_p, CHFL_CHANOP);
+
+      /* send out a join, make target_p join chptr */
+      if (chptr->chname[0] != '&')
+        sendto_server(target_p, target_p, chptr, NOCAPS, NOCAPS, LL_ICLIENT,
+                      ":%s SJOIN %lu %s +nt :@%s", me.name,
+		      (unsigned long) chptr->channelts, chptr->chname,
+		      target_p->name);
+
+      sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN :%s",
+                             target_p->name, target_p->username,
+                             target_p->host, chptr->chname);
+
+      chptr->mode.mode |= MODE_TOPICLIMIT;
+      chptr->mode.mode |= MODE_NOPRIVMSGS;
+
+      sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +nt", me.name,
+                           chptr->chname);
+
+      target_p->localClient->last_join_time = CurrentTime;
+      channel_member_names(target_p, chptr, chptr->chname, 1);
+
+      /* we do this to let the oper know that a channel was created, this will be
+       * seen from the server handling the command instead of the server that
+       * the oper is on.
+       */
+      sendto_one(source_p, ":%s NOTICE %s :*** Notice -- Creating channel %s", me.name,
+		 source_p->name, chptr->chname);
+    }
+}
+
+
+static void mo_forcepart(struct Client *client_p, struct Client *source_p,
+		         int parc, char *parv[])
+{
+  struct Client *target_p;
+  struct Channel *chptr;
+
+  if(!IsAdmin(source_p))
+  {
+    sendto_one(source_p, ":%s NOTICE %s :You have no A flag", me.name, parv[0]);
+    return;
+  }
+
+  /* if target_p == NULL then let the oper know */
+  if ((target_p = find_client(parv[1])) == NULL)
+  {
+    sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name,
+               source_p->name, parv[1]);
+    return;
+  }
+
+  if (!MyConnect(target_p))
+  {
+    sendto_one(target_p, ":%s FORCEPART %s %s", parv[0], parv[1], parv[2]);
+    return;
+  }
+
+  if((chptr = hash_find_channel(parv[2])) == NULL)
+  {
+    sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+               me.name, parv[0], parv[2]);
+    return;
+  }
+
+  if (!IsMember(target_p, chptr))
+  {
+    sendto_one(source_p, form_str(ERR_USERNOTINCHANNEL),
+               me.name, parv[0], parv[2], parv[1]);
+    return;
+  }
+  
+  if (chptr->chname[0] != '&')
+    sendto_server(target_p, target_p, chptr, NOCAPS, NOCAPS, LL_ICLIENT,
+		  ":%s PART %s :%s",
+		  target_p->name, chptr->chname,
+		  target_p->name);
+
+  sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s PART %s :%s",
+                       target_p->name, target_p->username,
+ 	               target_p->host,chptr->chname,
+		       target_p->name);
+  remove_user_from_channel(chptr, target_p);
+}
+
diff -ruN ircd-hybrid-7.0/chatjunkies/m_map.c ircd-hybrid-7.0cj0/chatjunkies/m_map.c
--- ircd-hybrid-7.0/chatjunkies/m_map.c	1969-12-31 16:00:00.000000000 -0800
+++ ircd-hybrid-7.0cj0/chatjunkies/m_map.c	2003-07-28 18:29:40.000000000 -0700
@@ -0,0 +1,156 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  m_map.c: Sends an Undernet compatible map to a user.
+ *
+ *  Copyright (C) 2002 by the past and present ircd coders, and others.
+ *
+ *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307
+ *  USA
+ *
+ *  $Id: m_map.c,v 1.12 2002/05/24 23:48:34 androsyn Exp $
+ */
+
+#include "stdinc.h"
+#include "client.h"
+#include "modules.h"
+#include "handlers.h"
+#include "numeric.h"
+#include "send.h"
+#include "s_conf.h"
+
+#define USER_COL       50 /* display | Users: %d at col 50 */
+
+static void m_map(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[]);
+static void mo_map(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[]);
+static void dump_map(struct Client *client_p,struct Client *root, char *pbuf);
+
+struct Message map_msgtab = {
+  "MAP", 0, 0, 0, 0, MFLG_SLOW, 0,
+  {m_unregistered, m_map, m_ignore, mo_map}
+};
+
+#ifndef STATIC_MODULES
+void _modinit(void)
+{
+  mod_add_cmd(&map_msgtab);
+}
+
+void _moddeinit(void)
+{
+  mod_del_cmd(&map_msgtab);
+}
+
+const char *_version = "$Revision: 1.12 $";
+#endif
+
+static char buf[BUFSIZE];
+
+/* m_map
+**	parv[0] = sender prefix
+*/
+static void m_map(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[])
+{
+  if (!ConfigServerHide.flatten_links)
+  {
+    dump_map(client_p,&me,buf);
+    sendto_one(client_p, form_str(RPL_MAPEND), me.name, client_p->name);
+    return;
+  }
+
+  m_not_oper(client_p,source_p,parc,parv);
+  return;
+}
+
+/*
+** mo_map
+**      parv[0] = sender prefix
+*/
+static void mo_map(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[])
+{
+  dump_map(client_p,&me,buf);
+  sendto_one(client_p, form_str(RPL_MAPEND), me.name, client_p->name);
+}
+
+/*
+** dump_map
+**   dumps server map, called recursively.
+*/
+static void dump_map(struct Client *client_p,struct Client *root_p, char *pbuf)
+{
+  int cnt = 0, i = 0, len;
+  int users = 0;
+  struct Client *server_p,*user_p;
+        
+  *pbuf= '\0';
+       
+  strncat(pbuf,root_p->name,BUFSIZE - ((size_t) pbuf - (size_t) buf));
+  len = strlen(buf);
+  buf[len] = ' ';
+	
+  if (len < USER_COL)
+  {
+     for (i = len+1; i < USER_COL; i++)
+     {
+       buf[i] = '-';
+     }
+  }
+	
+  /* FIXME: add serv->usercnt */
+  for( user_p = root_p->serv->users; user_p; user_p = user_p->lnext )
+    users++;
+        
+  snprintf(buf + USER_COL, BUFSIZE - USER_COL,
+           " | Users: %5d (%4.1f%%)", users,
+           100 * (float) users / (float) Count.total);
+        
+  sendto_one(client_p, form_str(RPL_MAP),me.name,client_p->name,buf);
+        
+  if ((server_p = root_p->serv->servers))
+  {
+    for (; server_p; server_p = server_p->lnext)
+    {
+      cnt++;
+    }
+    
+    if (cnt)
+    {
+      if (pbuf > buf + 3)
+      {
+        pbuf[-2] = ' ';
+        if (pbuf[-3] == '`')
+          pbuf[-3] = ' ';
+      }
+    }
+  }
+  for (i = 1,server_p = root_p->serv->servers; server_p; server_p=server_p->lnext)
+  {
+    *pbuf = ' ';
+    if (i < cnt)
+      *(pbuf + 1) = '|';
+    else
+      *(pbuf + 1) = '`';
+      
+    *(pbuf + 2) = '-';
+    *(pbuf + 3) = ' ';
+    dump_map(client_p,server_p,pbuf+4);
+ 
+    i++;
+   }
+}
+
diff -ruN ircd-hybrid-7.0/chatjunkies/m_mkpasswd.c ircd-hybrid-7.0cj0/chatjunkies/m_mkpasswd.c
--- ircd-hybrid-7.0/chatjunkies/m_mkpasswd.c	1969-12-31 16:00:00.000000000 -0800
+++ ircd-hybrid-7.0cj0/chatjunkies/m_mkpasswd.c	2003-07-28 18:29:40.000000000 -0700
@@ -0,0 +1,168 @@
+/*
+ *  m_mkpasswd.c: Encrypts a password online, DES or MD5.
+ *
+ *  Copyright 2002 W. Campbell and the ircd-hybrid development team
+ *  Based on mkpasswd.c, originally by Nelson Minar (minar@reed.edu)
+ *
+ *  You can use this code in any way as long as these names remain.
+ *
+ *  $Id: m_mkpasswd.c,v 1.9 2002/05/24 23:48:34 androsyn Exp $
+ */
+
+/* List of ircd includes from ../include/ */
+#include "stdinc.h"
+#include "handlers.h"
+#include "client.h"
+#include "common.h"     /* FALSE bleah */
+#include "ircd.h"
+#include "irc_string.h"
+#include "numeric.h"
+#include "fdlist.h"
+#include "s_bsd.h"
+#include "s_conf.h"
+#include "s_log.h"
+#include "s_serv.h"
+#include "send.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+
+#include <string.h>
+
+extern char *crypt();
+
+static void m_mkpasswd(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[]);
+static void mo_mkpasswd(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[]);
+static char *make_salt(void);
+static char *make_md5_salt(void);
+
+static char saltChars[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./";
+
+struct Message test_msgtab = {
+  "MKPASSWD", 0, 0, 1, 2, MFLG_SLOW, 0,
+  {m_unregistered, m_mkpasswd, m_ignore, mo_mkpasswd}
+};
+
+#ifndef STATIC_MODULES
+void _modinit(void)
+{
+  mod_add_cmd(&test_msgtab);
+}
+
+void _moddeinit(void)
+{
+  mod_del_cmd(&test_msgtab);
+}
+
+const char *_version = "$Revision: 1.9 $";
+#endif
+
+static void m_mkpasswd(struct Client *client_p, struct Client *source_p,
+                   int parc, char *parv[])
+{
+  static time_t last_used = 0;
+  int is_md5 = 0;
+
+  if ((last_used + ConfigFileEntry.pace_wait) > CurrentTime)
+    {
+      /* safe enough to give this on a local connect only */
+      sendto_one(source_p,form_str(RPL_LOAD2HI),me.name,parv[0]);
+      return;
+    }
+  else
+    {
+      last_used = CurrentTime;
+    }
+
+  if (parc == 3)
+  {
+    if (!irccmp(parv[2], "MD5"))
+    {
+      is_md5 = 1;
+    }
+    else if (!irccmp(parv[2], "DES"))
+    {
+      /* Not really needed, but we may want to have a default encryption
+       * setting somewhere down the road
+       */
+      is_md5 = 0;
+    }
+    else
+    {
+      sendto_one(source_p, ":%s NOTICE %s :MKPASSWD syntax error:  MKPASSWD pass [DES|MD5]", me.name, parv[0]);
+      return;
+    }
+  }
+
+  if(parc == 1)
+    sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+               me.name, parv[0], "MKPASSWD");
+  else
+    sendto_one(source_p, ":%s NOTICE %s :Encryption for [%s]:  %s",
+               me.name, parv[0], parv[1], crypt(parv[1],
+               is_md5 ? make_md5_salt() : make_salt()));
+}
+
+/*
+** mo_test
+**      parv[0] = sender prefix
+**      parv[1] = parameter
+*/
+static void mo_mkpasswd(struct Client *client_p, struct Client *source_p,
+                   int parc, char *parv[])
+{		 
+  int is_md5 = 0;
+
+  if (parc == 3)
+  {
+    if (!irccmp(parv[2], "MD5"))
+    {
+      is_md5 = 1;
+    }
+    else if (!irccmp(parv[2], "DES"))
+    {
+      /* Not really needed, but we may want to have a default encryption
+       * setting somewhere down the road
+       */
+      is_md5 = 0;
+    }
+    else
+    {
+      sendto_one(source_p, ":%s NOTICE %s :MKPASSWD syntax error:  MKPASSWD pass [DES|MD5]", me.name, parv[0]);
+      return;
+    }
+  }
+
+  if (parc == 1)
+    sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS),
+               me.name, parv[0], "MKPASSWD");
+  else
+    sendto_one(source_p, ":%s NOTICE %s :Encryption for [%s]:  %s",
+               me.name, parv[0], parv[1], crypt(parv[1],
+               is_md5 ? make_md5_salt() : make_salt()));
+}
+
+static char *make_salt(void)
+{
+  static char salt[3];
+  salt[0] = saltChars[random() % 64];
+  salt[1] = saltChars[random() % 64];
+  salt[2] = '\0';
+  return salt;
+}
+
+static char *make_md5_salt(void)
+{
+  static char salt[13];
+  int i;
+  salt[0] = '$';
+  salt[1] = '1';
+  salt[2] = '$';
+  for (i=3; i<11; i++)
+    salt[i] = saltChars[random() % 64];
+  salt[11] = '$';
+  salt[12] = '\0';
+  return salt;
+}
diff -ruN ircd-hybrid-7.0/chatjunkies/m_ojoin.c ircd-hybrid-7.0cj0/chatjunkies/m_ojoin.c
--- ircd-hybrid-7.0/chatjunkies/m_ojoin.c	1969-12-31 16:00:00.000000000 -0800
+++ ircd-hybrid-7.0cj0/chatjunkies/m_ojoin.c	2003-07-28 18:29:40.000000000 -0700
@@ -0,0 +1,203 @@
+/*   contrib/m_ojoin.c
+ *   Copyright (C) 2002 Hybrid Development Team
+ *
+ *   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 1, 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.
+ *
+ *   $Id: m_ojoin.c,v 1.11 2002/06/11 01:49:18 androsyn Exp $
+ */
+
+#include "stdinc.h"
+#include "tools.h"
+#include "handlers.h"
+#include "channel.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 "hash.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+#include "vchannel.h"
+#include "list.h"
+#include "channel_mode.h"
+
+static void mo_ojoin(struct Client *client_p, struct Client *source_p,
+                         int parc, char *parv[]);
+
+struct Message ojoin_msgtab = {
+  "OJOIN", 0, 0, 2, 0, MFLG_SLOW, 0,
+  {m_unregistered, m_not_oper, m_ignore, mo_ojoin}
+};
+
+void
+_modinit(void)
+{
+  mod_add_cmd(&ojoin_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&ojoin_msgtab);
+}
+
+char *_version = "$Revision: 1.11 $";
+
+/*
+** mo_ojoin
+**      parv[0] = sender prefix
+**      parv[1] = channel
+*/
+static void mo_ojoin(struct Client *client_p, struct Client *source_p,
+                        int parc, char *parv[])
+{
+  struct Channel *chptr, *root_chptr;
+  int move_me = 0;
+#ifdef VCHANS
+  int on_vchan = 0;
+#endif
+
+  /* admins only */
+  if (!IsOperAdmin(source_p))
+    {
+      sendto_one(source_p, ":%s NOTICE %s :You have no A flag", me.name, parv[0]);
+      return;
+    }
+
+  /* XXX - we might not have CBURSTed this channel if we are a lazylink
+   * yet. */
+  if (*parv[1] == '@' || *parv[1] == '%' || *parv[1] == '+')
+    {
+      parv[1]++;
+      move_me = 1;
+    }
+
+  chptr= hash_find_channel(parv[1]);
+  root_chptr = chptr;
+
+#ifdef VCHANS
+  if (chptr && parc > 2 && parv[2][0] == '!')
+    {
+      chptr = find_vchan(chptr, parv[2]);
+      if (root_chptr != chptr)
+        on_vchan++;
+    }
+#endif
+
+  if( chptr == NULL )
+    {
+      sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+		 me.name, parv[0], parv[1]);
+      return;
+    }
+
+  if(IsMember(source_p, chptr))
+    {
+      sendto_one(source_p, ":%s NOTICE %s :Please part %s before using OJOIN",
+                 me.name, source_p->name, parv[1]);
+      return;
+    }
+
+  if (move_me == 1)
+    parv[1]--;
+
+  if (*parv[1] == '@') 
+    {
+       add_user_to_channel(chptr, source_p, CHFL_CHANOP);
+       if (chptr->chname[0] != '&')
+         sendto_server(client_p, source_p, chptr, NOCAPS, NOCAPS, LL_ICLIENT, 
+                 ":%s SJOIN %lu %s + :@%s", me.name, chptr->channelts,
+                 chptr->chname, source_p->name);
+       sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN %s",
+                       source_p->name,
+                       source_p->username,
+                       source_p->host,
+                       root_chptr->chname);
+       sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +o %s",
+                       me.name, chptr->chname, source_p->name);
+
+    }
+#ifdef HALFOPS
+  else if (*parv[1] == '%')
+    {
+       add_user_to_channel(chptr, source_p, CHFL_HALFOP);
+       if (chptr->chname[0] != '&')
+         sendto_server(client_p, source_p, chptr, NOCAPS, NOCAPS, LL_ICLIENT, 
+                 ":%s SJOIN %lu %s + :%%%s", me.name, chptr->channelts,
+                 chptr->chname, source_p->name);
+       sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN %s",
+                       source_p->name,
+                       source_p->username,
+                       source_p->host,
+                       root_chptr->chname);
+       sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +h %s",
+                       me.name, chptr->chname, source_p->name);
+    }
+#endif
+  else if (*parv[1] == '+')
+    {
+       add_user_to_channel(chptr, source_p, CHFL_VOICE);
+       if (chptr->chname[0] != '&')
+         sendto_server(client_p, source_p, chptr, NOCAPS, NOCAPS, LL_ICLIENT, 
+                 ":%s SJOIN %lu %s + :+%s", me.name, chptr->channelts,
+                 chptr->chname, source_p->name);
+       sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN %s",
+                       source_p->name,
+                       source_p->username,
+                       source_p->host,
+                       root_chptr->chname);
+       sendto_channel_local(ALL_MEMBERS, chptr, ":%s MODE %s +v %s",
+                       me.name, chptr->chname, source_p->name);
+    }
+  else
+    {
+       add_user_to_channel(chptr, source_p, CHFL_PEON);
+       if (chptr->chname[0] != '&')
+         sendto_server(client_p, source_p, chptr, NOCAPS, NOCAPS, LL_ICLIENT, 
+                       ":%s SJOIN %lu %s + :%s",
+                       me.name, chptr->channelts,
+		       chptr->chname, source_p->name);
+       sendto_channel_local(ALL_MEMBERS, chptr, ":%s!%s@%s JOIN %s",
+                       source_p->name,
+                       source_p->username,
+                       source_p->host,
+                       root_chptr->chname);
+    }
+
+  /* send the topic... */
+  if (chptr->topic != NULL)
+  {
+    sendto_one(source_p, form_str(RPL_TOPIC), me.name,
+	       source_p->name, chptr->chname, chptr->topic);
+    sendto_one(source_p, form_str(RPL_TOPICWHOTIME), me.name,
+	       source_p->name, chptr->chname, chptr->topic_info,
+	       chptr->topic_time);
+  }
+
+  /* XXX - check this isn't too big above... */
+#ifdef VCHANS
+  if (on_vchan)
+    add_vchan_to_client_cache(source_p,root_chptr,chptr);
+#endif
+
+  source_p->localClient->last_join_time = CurrentTime;
+  channel_member_names(source_p, chptr, chptr->chname, 1);
+}
+
diff -ruN ircd-hybrid-7.0/chatjunkies/m_opme.c ircd-hybrid-7.0cj0/chatjunkies/m_opme.c
--- ircd-hybrid-7.0/chatjunkies/m_opme.c	1969-12-31 16:00:00.000000000 -0800
+++ ircd-hybrid-7.0cj0/chatjunkies/m_opme.c	2003-07-28 18:29:40.000000000 -0700
@@ -0,0 +1,226 @@
+/*   contrib/m_opme.c
+ *   Copyright (C) 2002 Hybrid Development Team
+ *
+ *   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 1, 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.
+ *
+ *   $Id: m_opme.c,v 1.28 2002/09/19 16:14:32 bill Exp $
+ */
+#include "stdinc.h"
+#include "tools.h"
+#include "handlers.h"
+#include "channel.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 "hash.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+#include "vchannel.h"
+
+
+static void mo_opme(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[]);
+static int chan_is_opless(struct Channel *chptr);
+
+struct Message opme_msgtab = {
+  "OPME", 0, 0, 2, 0, MFLG_SLOW, 0,
+  {m_unregistered, m_not_oper, m_ignore, mo_opme}
+};
+
+void
+_modinit(void)
+{
+  mod_add_cmd(&opme_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&opme_msgtab);
+}
+
+char *_version = "$Revision: 1.28 $";
+
+static int chan_is_opless(struct Channel *chptr)
+{
+  if (chptr->chanops.head)
+	  return 0;
+  else
+	  return 1;
+}
+
+/*
+** mo_opme
+**      parv[0] = sender prefix
+**      parv[1] = channel
+*/
+static void mo_opme(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[])
+{
+  struct Channel *chptr, *root_chptr;
+  int on_vchan = 0;
+  dlink_node *ptr;
+  dlink_node *locptr;
+  
+  /* admins only */
+  if (!IsAdmin(source_p))
+    {
+      sendto_one(source_p, ":%s NOTICE %s :You have no A flag", me.name,
+                 parv[0]);
+      return;
+    }
+
+  /* XXX - we might not have CBURSTed this channel if we are a lazylink
+   * yet. */
+  chptr= hash_find_channel(parv[1]);
+  root_chptr = chptr;
+
+#ifdef VCHANS
+  if (chptr && parc > 2 && parv[2][0] == '!')
+    {
+      chptr = find_vchan(chptr, parv[2]);
+      if (root_chptr != chptr)
+		  on_vchan++;
+    }
+#endif
+  
+  if( chptr == NULL )
+    {
+      sendto_one(source_p, form_str(ERR_NOSUCHCHANNEL),
+		 me.name, parv[0], parv[1]);
+      return;
+    }
+
+  if (!chan_is_opless(chptr))
+  {
+    sendto_one(source_p, ":%s NOTICE %s :%s Channel is not opless",
+               me.name, parv[0], parv[1]);
+    return;
+  }
+
+  if ((ptr = find_user_link(&chptr->peons, source_p)))
+	  dlinkDelete(ptr, &chptr->peons);
+  else if ((ptr = find_user_link(&chptr->voiced, source_p)))
+	  dlinkDelete(ptr, &chptr->voiced);
+#ifdef HALFOPS
+  else if ((ptr = find_user_link(&chptr->halfops, source_p)))
+	  dlinkDelete(ptr, &chptr->halfops);
+#endif
+  else if ((ptr = find_user_link(&chptr->chanops, source_p)))
+	  dlinkDelete(ptr, &chptr->chanops);
+#ifdef REQUIRE_OANDV
+  else if((ptr = find_user_link(&chptr->chanops_voiced, source_p)))
+    dlinkDelete(ptr, &chptr->chanops_voiced);
+#endif
+  else
+    {
+       /* Theyre not even on the channel, bail. */
+       return;      
+    }
+
+  if((locptr = find_user_link(&chptr->locpeons, source_p)))
+    dlinkDelete(locptr, &chptr->locpeons);
+  else if((locptr = find_user_link(&chptr->locvoiced, source_p)))
+    dlinkDelete(locptr, &chptr->locvoiced);
+#ifdef HALFOPS
+  else if((locptr = find_user_link(&chptr->lochalfops, source_p)))
+    dlinkDelete(locptr, &chptr->lochalfops);
+#endif
+  else if((locptr = find_user_link(&chptr->locchanops, source_p)))
+    dlinkDelete(locptr, &chptr->locchanops);
+  
+#ifdef REQUIRE_OANDV
+  else if((locptr = find_user_link(&chptr->locchanops_voiced, source_p)))
+    dlinkDelete(locptr, &chptr->locchanops_voiced);
+#endif
+
+  else
+    return;
+
+  dlinkAdd(source_p, ptr, &chptr->chanops);
+  dlinkAdd(source_p, locptr, &chptr->locchanops);
+
+  if (!on_vchan)
+    {
+     if (parv[1][0] == '&')
+     {
+       sendto_wallops_flags(FLAGS_LOCOPS, &me,
+                            "OPME called for [%s] by %s!%s@%s",
+                            parv[1], source_p->name, source_p->username,
+                            source_p->host);
+     }
+     else
+     {
+       sendto_wallops_flags(FLAGS_WALLOP, &me,
+                            "OPME called for [%s] by %s!%s@%s",
+                            parv[1], source_p->name, source_p->username,
+                            source_p->host);
+       sendto_server(NULL, source_p, NULL, NOCAPS, NOCAPS, LL_ICLIENT,
+                     ":%s WALLOPS :OPME called for [%s] by %s!%s@%s",
+                     me.name, parv[1], source_p->name, source_p->username,
+                     source_p->host);
+     }
+     ilog(L_NOTICE, "OPME called for [%s] by %s!%s@%s",
+                   parv[1], source_p->name, source_p->username,
+                   source_p->host);
+    }
+  else
+    {
+     if (parv[1][0] == '&')
+     {
+       sendto_wallops_flags(FLAGS_LOCOPS, &me,
+                            "OPME called for [%s %s] by %s!%s@%s",
+                            parv[1], parv[2], source_p->name,
+                            source_p->username, source_p->host);
+     }
+     else
+     {
+       sendto_wallops_flags(FLAGS_WALLOP, &me,
+                            "OPME called for [%s %s] by %s!%s@%s",
+                            parv[1], parv[2], source_p->name,
+                            source_p->username, source_p->host);
+       sendto_server(NULL, source_p, NULL, NOCAPS, NOCAPS, LL_ICLIENT,
+                     ":%s WALLOPS :OPME called for [%s %s] by %s!%s@%s",
+                     me.name, parv[1], parv[2], source_p->name,
+                     source_p->username, source_p->host);
+     }
+     ilog(L_NOTICE, "OPME called for [%s %s] by %s!%s@%s",
+                   parv[1], parv[2], source_p->name, source_p->username,
+                   source_p->host);
+    }
+
+  sendto_server(NULL, source_p, chptr, CAP_UID, NOCAPS, NOFLAGS,
+                 ":%s PART %s", ID(source_p), parv[1]);
+  sendto_server(NULL, source_p, chptr, NOCAPS, CAP_UID, NOFLAGS,
+                ":%s PART %s", source_p->name, parv[1]);
+  sendto_server(NULL, source_p, chptr, CAP_UID, NOCAPS, NOFLAGS,
+                ":%s SJOIN %ld %s + :@%s",
+                me.name, (signed long) chptr->channelts,
+                parv[1],
+                source_p->name /* XXX ID(source_p) */ );
+  sendto_server(NULL, source_p, chptr, NOCAPS, CAP_UID, NOFLAGS,
+                ":%s SJOIN %ld %s + :@%s",
+                me.name, (signed long) chptr->channelts,
+                parv[1], source_p->name);
+  sendto_channel_local(ALL_MEMBERS, chptr,
+                       ":%s MODE %s +o %s",
+                       me.name, parv[1], source_p->name);
+}
diff -ruN ircd-hybrid-7.0/chatjunkies/m_sethost.c ircd-hybrid-7.0cj0/chatjunkies/m_sethost.c
--- ircd-hybrid-7.0/chatjunkies/m_sethost.c	1969-12-31 16:00:00.000000000 -0800
+++ ircd-hybrid-7.0cj0/chatjunkies/m_sethost.c	2003-07-29 00:40:20.000000000 -0700
@@ -0,0 +1,175 @@
+/************************************************************************
+ *   IRC - Internet Relay Chat, doc/example_module.c
+ *   Copyright (C) 2001 Hybrid Development Team
+ *
+ *   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 1, 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.
+ *
+ *   $Id: m_sethost.c,v 1.0 2003/07/21 23:36:00 PC^God Exp $
+ */
+
+/* List of ircd includes from ../include/ */
+#include "stdinc.h"
+#include "handlers.h"
+#include "client.h"
+#include "common.h"     /* FALSE bleah */
+#include "ircd.h"
+#include "irc_string.h"
+#include "numeric.h"
+#include "fdlist.h"
+#include "s_bsd.h"
+#include "s_conf.h"
+#include "s_log.h"
+#include "s_serv.h"
+#include "send.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+
+
+static void m_sethost(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[]);
+static int valid_hostname(const char* hostname);
+
+struct Message sethost_msgtab = {
+  "SETHOST", 0, 0, 2, 3, MFLG_SLOW, 0,
+  {m_unregistered, m_not_oper, m_sethost, m_sethost}
+};
+
+#ifndef STATIC_MODULES
+
+void
+_modinit(void)
+{
+  mod_add_cmd(&sethost_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&sethost_msgtab);
+}
+
+const char *_version = "$Revision: 1.0 $";
+#endif
+
+/*
+ * m_sethost
+ *      parv[0] = sender prefix
+ *      parv[1] = target (optional)
+ *      parv[2] = username
+ */
+static void m_sethost(struct Client *cptr, struct Client *sptr,
+                   int parc, char *parv[])
+{
+  struct Client *acptr;
+  char *hostname, *target;
+
+  target = parv[1];
+  hostname = parv[2];
+
+  if(!IsPrivileged(cptr))
+    {
+      sendto_one(cptr, form_str(ERR_UNKNOWNCOMMAND),
+		 me.name, parv[0], "SETHOST");
+      return;
+    }
+
+  if (parc < 2 || *parv[1] == '\0')
+    {
+      sendto_one(sptr, form_str(ERR_NEEDMOREPARAMS),
+		 me.name, parv[0], "SETHOST");
+      return;
+    }
+
+  if (parc == 2)
+    {
+      hostname = parv[1];
+      target = sptr->name;
+    }
+
+  if (!valid_hostname(hostname) || strlen(hostname) > HOSTLEN)
+    {
+      sendto_one(sptr, ":%s NOTICE %s :SETHOST Error [%s]: A hostname may "
+		 "contain a-z, A-Z, 0-9, '-' & '.' - please use "
+		 "only these", me.name, parv[0], hostname);
+      return;
+    }
+  if ((acptr = find_person(target)))
+    {
+      sendto_realops_flags(FLAGS_SPY, L_ALL, "%s is rehosting %s (%s@%s) to "
+			   "\"%s\" while whistling innocently", sptr->name, 
+			   acptr->name, acptr->username, acptr->host, hostname);
+      if (sptr == acptr)
+	{
+	  if (MyClient(acptr))
+	    sendto_one(acptr, ":%s NOTICE %s :your hostname is now set to \"%s\"",
+		       me.name, sptr->name, hostname);
+	}
+      else
+	{
+	  if(MyClient(acptr))
+	    sendto_one(acptr, ":%s NOTICE %s :%s set your hostname to \"%s\"",
+		       me.name, acptr->name, sptr->name, hostname);
+	  if(MyClient(sptr))
+	    sendto_one(sptr, ":%s NOTICE %s :%s's hostname has been set to \"%s\""
+		       , me.name, sptr->name, acptr->name, hostname);
+	}
+      sendto_server(cptr, NULL, NULL, NOCAPS, NOCAPS, NOFLAGS,
+		    ":%s SETHOST %s :%s", sptr->name, target, hostname);
+      ircsprintf(acptr->host, "%s", hostname);
+    }
+  else
+    {
+      sendto_one(sptr, form_str(ERR_NOSUCHNICK), me.name, sptr->name, target);
+      return;
+    }
+
+  return;
+}
+
+/* 
+ * valid_hostname - check hostname for validity
+ *
+ * Inputs       - pointer to user
+ * Output       - YES if valid, NO if not
+ * Side effects - NONE
+ *
+ * NOTE: this doesn't allow a hostname to begin with a dot and
+ * will not allow more dots than chars.
+ */
+static int
+valid_hostname(const char* hostname)
+{
+  const char* p     = hostname;
+
+  assert(NULL != p);
+  
+  if(hostname == NULL)
+    return NO;
+
+  if ('.' == *p)
+    return NO;
+
+  while (*p)
+    {
+      if (!IsHostChar(*p))
+        return NO;
+      p++;
+    }
+  return (YES);
+}
+
+
+/* END OF SETHOST MODULE */
diff -ruN ircd-hybrid-7.0/chatjunkies/m_setident.c ircd-hybrid-7.0cj0/chatjunkies/m_setident.c
--- ircd-hybrid-7.0/chatjunkies/m_setident.c	1969-12-31 16:00:00.000000000 -0800
+++ ircd-hybrid-7.0cj0/chatjunkies/m_setident.c	2003-07-29 00:40:34.000000000 -0700
@@ -0,0 +1,193 @@
+/************************************************************************
+ *   IRC - Internet Relay Chat, doc/example_module.c
+ *   Copyright (C) 2001 Hybrid Development Team
+ *
+ *   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 1, 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.
+ *
+ *   $Id: m_setident.c,v 1.0 2003/07/21 19:13:00 PC^God Exp $
+ */
+
+/* List of ircd includes from ../include/ */
+#include "stdinc.h"
+#include "handlers.h"
+#include "client.h"
+#include "common.h"     /* FALSE bleah */
+#include "ircd.h"
+#include "irc_string.h"
+#include "numeric.h"
+#include "fdlist.h"
+#include "s_bsd.h"
+#include "s_conf.h"
+#include "s_log.h"
+#include "s_serv.h"
+#include "send.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+
+
+static void m_setident(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[]);
+static int valid_username(const char* username);
+
+struct Message setident_msgtab = {
+  "SETIDENT", 0, 0, 2, 3, MFLG_SLOW, 0,
+  {m_unregistered, m_not_oper, m_setident, m_setident}
+};
+
+#ifndef STATIC_MODULES
+
+void
+_modinit(void)
+{
+  mod_add_cmd(&setident_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&setident_msgtab);
+}
+
+const char *_version = "$Revision: 1.0 $";
+#endif
+
+/*
+ * m_setident
+ *      parv[0] = sender prefix
+ *      parv[1] = target (optional)
+ *      parv[2] = username
+ */
+static void m_setident(struct Client *cptr, struct Client *sptr,
+                   int parc, char *parv[])
+{
+  struct Client *acptr;
+  char *username, *target;
+
+  target = parv[1];
+  username = parv[2];
+
+  if(!IsPrivileged(cptr))
+    {
+      sendto_one(cptr, form_str(ERR_UNKNOWNCOMMAND),
+		 me.name, parv[0], "SETIDENT");
+      return;
+    }
+
+  if (parc < 2 || *parv[1] == '\0')
+    {
+      sendto_one(sptr, form_str(ERR_NEEDMOREPARAMS),
+		 me.name, parv[0], "SETIDENT");
+      return;
+    }
+
+  if (parc == 2)
+    {
+      username = parv[1];
+      target = sptr->name;
+    }
+
+  if (!valid_username(username) || strlen(username) > USERLEN)
+    {
+      sendto_one(sptr, ":%s NOTICE %s :SETIDENT Error [%s]: A username may "
+		 "contain a-z, A-Z, 0-9, '-', '~' & '.' - please use "
+		 "only these", me.name, parv[0], username);
+      return;
+    }
+  if ((acptr = find_person(target)))
+    {
+      sendto_realops_flags(FLAGS_SPY, L_ALL, "%s is identing %s (%s@%s) to "
+			   "\"%s\" while whistling innocently", sptr->name, 
+			   acptr->name, acptr->username, acptr->host, username);
+      if (sptr == acptr)
+	{
+	  if (MyClient(acptr))
+	    sendto_one(acptr, ":%s NOTICE %s :your ident is now set to \"%s\"",
+		       me.name, sptr->name, username);
+	}
+      else
+	{
+	  if(MyClient(acptr))
+	    sendto_one(acptr, ":%s NOTICE %s :%s set your ident to \"%s\"",
+		       me.name, acptr->name, sptr->name, username);
+	  if(MyClient(sptr))
+	    sendto_one(sptr, ":%s NOTICE %s :%s's ident has been set to \"%s\""
+		       , me.name, sptr->name, acptr->name, username);
+	}
+      /*      sendto_serv_butone(cptr, ":%s SETIDENT %s :%s", sptr->name, 
+	      target, username); */
+      sendto_server(cptr, NULL, NULL, NOCAPS, NOCAPS, NOFLAGS,
+		    ":%s SETIDENT %s :%s", sptr->name, target, username);
+      ircsprintf(acptr->username, "%s", username);
+    }
+  else
+    {
+      sendto_one(sptr, form_str(ERR_NOSUCHNICK), me.name, sptr->name, target);
+      return;
+    }
+
+  return;
+}
+
+/* 
+ * valid_username - check username for validity
+ *
+ * Inputs       - pointer to user
+ * Output       - YES if valid, NO if not
+ * Side effects - NONE
+ * 
+ * Absolutely always reject any '*' '!' '?' '@' in an user name
+ * reject any odd control characters names.
+ * Allow '.' in username to allow for "first.last"
+ * style of username
+ */
+static int
+valid_username(const char* username)
+{
+  int dots = 0;
+  const char *p = username;
+
+  assert(NULL != p);
+
+  if(username == NULL)
+    return NO;
+
+ if ('~' == *p)
+    ++p;
+
+  /* reject usernames that don't start with an alphanum
+   * i.e. reject jokers who have '-@somehost' or '.@somehost'
+   * or "-hi-@somehost", "h-----@somehost" would still be accepted.
+   */
+  if (!IsAlNum(*p))
+    return NO;
+
+  while (*++p)
+    {
+      if((*p == '.') && ConfigFileEntry.dots_in_ident)
+        {
+          dots++;
+          if(dots > ConfigFileEntry.dots_in_ident)
+            return NO;
+          if(!IsUserChar(p[1]))
+            return NO;
+        }
+      else if (!IsUserChar(*p))
+        return NO;
+    }
+  return YES;
+}
+
+/* END OF SETIDENT MODULE */
diff -ruN ircd-hybrid-7.0/chatjunkies/m_setname.c ircd-hybrid-7.0cj0/chatjunkies/m_setname.c
--- ircd-hybrid-7.0/chatjunkies/m_setname.c	1969-12-31 16:00:00.000000000 -0800
+++ ircd-hybrid-7.0cj0/chatjunkies/m_setname.c	2003-07-29 00:40:53.000000000 -0700
@@ -0,0 +1,141 @@
+/************************************************************************
+ *   IRC - Internet Relay Chat, doc/example_module.c
+ *   Copyright (C) 2001 Hybrid Development Team
+ *
+ *   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 1, 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.
+ *
+ *   $Id: m_setname.c,v 1.0 2003/07/22 00:44:00 PC^God Exp $
+ */
+
+/* List of ircd includes from ../include/ */
+#include "stdinc.h"
+#include "handlers.h"
+#include "client.h"
+#include "common.h"     /* FALSE bleah */
+#include "ircd.h"
+#include "irc_string.h"
+#include "numeric.h"
+#include "fdlist.h"
+#include "s_bsd.h"
+#include "s_conf.h"
+#include "s_log.h"
+#include "s_serv.h"
+#include "send.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+
+
+static void m_setname(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[]);
+
+struct Message setname_msgtab = {
+  "SETNAME", 0, 0, 2, 3, MFLG_SLOW, 0,
+  {m_unregistered, m_not_oper, m_setname, m_setname}
+};
+
+#ifndef STATIC_MODULES
+
+void
+_modinit(void)
+{
+  mod_add_cmd(&setname_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&setname_msgtab);
+}
+
+const char *_version = "$Revision: 1.0 $";
+#endif
+
+/*
+ * m_setname
+ *      parv[0] = sender prefix
+ *      parv[1] = target (optional)
+ *      parv[2] = real name
+ */
+static void m_setname(struct Client *cptr, struct Client *sptr,
+                   int parc, char *parv[])
+{
+  struct Client *acptr;
+  char *realname, *target;
+
+  target = parv[1];
+  realname = parv[2];
+
+  if(!IsPrivileged(cptr))
+    {
+      sendto_one(cptr, form_str(ERR_UNKNOWNCOMMAND),
+		 me.name, parv[0], "SETNAME");
+      return;
+    }
+
+  if (parc < 2 || *parv[1] == '\0')
+    {
+      sendto_one(sptr, form_str(ERR_NEEDMOREPARAMS),
+		 me.name, parv[0], "SETNAME");
+      return;
+    }
+
+  if (parc == 2)
+    {
+      realname = parv[1];
+      target = sptr->name;
+    }
+
+  if (strlen(realname) > REALLEN)
+    {
+      sendto_one(sptr, ":%s NOTICE %s :SETNAME Error [%s]: The gecos field "
+		 "may not be that long",
+		 me.name, parv[0], realname);
+      return;
+    }
+  if ((acptr = find_person(target)))
+    {
+      sendto_realops_flags(FLAGS_SPY, L_ALL, "%s is making %s's realname "
+			   "\"%s\" while whistling innocently", sptr->name, 
+			   acptr->name, realname);
+      if (sptr == acptr)
+	{
+	  if (MyClient(acptr))
+	    sendto_one(acptr, ":%s NOTICE %s :your realname is now set to \"%s\"",
+		       me.name, sptr->name, realname);
+	}
+      else
+	{
+	  if(MyClient(acptr))
+	    sendto_one(acptr, ":%s NOTICE %s :%s set your realname to \"%s\"",
+		       me.name, acptr->name, sptr->name, realname);
+	  if(MyClient(sptr))
+	    sendto_one(sptr, ":%s NOTICE %s :%s's realname has been set to \"%s\""
+		       , me.name, sptr->name, acptr->name, realname);
+	}
+      sendto_server(cptr, NULL, NULL, NOCAPS, NOCAPS, NOFLAGS,
+		    ":%s SETNAME %s :%s", sptr->name, target, realname);
+      ircsprintf(acptr->info, "%s", realname);
+    }
+  else
+    {
+      sendto_one(sptr, form_str(ERR_NOSUCHNICK), me.name, sptr->name, target);
+      return;
+    }
+
+  return;
+}
+
+/* END OF SETIDENT MODULE */
diff -ruN ircd-hybrid-7.0/chatjunkies/m_tburst.c ircd-hybrid-7.0cj0/chatjunkies/m_tburst.c
--- ircd-hybrid-7.0/chatjunkies/m_tburst.c	1969-12-31 16:00:00.000000000 -0800
+++ ircd-hybrid-7.0cj0/chatjunkies/m_tburst.c	2003-07-28 18:29:40.000000000 -0700
@@ -0,0 +1,162 @@
+/*  contrib/m_tburst.c
+ *  Copyright (C) 2002 Hybrid Development Team
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are
+ *  met:
+ *
+ *  1.Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *  2.Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *  3.The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ *  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ *  DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+ *  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ *  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ *  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ *  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ *  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ *  IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ *  POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  $Id: m_tburst.c,v 1.12 2002/12/18 05:33:29 db Exp $
+ */
+
+#include "stdinc.h"
+#include "handlers.h"
+#include "client.h"
+#include "common.h"
+#include "ircd.h"
+#include "send.h"
+#include "msg.h"
+#include "modules.h"
+#include "hook.h"
+#include "hash.h"
+#include "s_serv.h"
+#include "s_conf.h"
+
+
+/* TBURST_PROPAGATE
+ *
+ * If this is defined, when we receive a TBURST thats successful
+ * (ie: our topic changes), the TBURST will be propagated to other
+ * servers that support TBURST
+ */
+#define TBURST_PROPAGATE
+
+
+
+static void ms_tburst(struct Client *, struct Client *, int, char **);
+static void set_topic(struct Client *, struct Channel *, 
+		      time_t, char *, char *);
+static void set_tburst_capab();
+static void unset_tburst_capab();
+int send_tburst(struct hook_burst_channel *);
+
+struct Message tburst_msgtab = {
+  "TBURST", 0, 0, 6, 0, MFLG_SLOW, 0,
+  {m_ignore, m_ignore, ms_tburst, m_ignore}
+};
+
+#ifndef STATIC_MODULES
+void
+_modinit(void)
+{
+  mod_add_cmd(&tburst_msgtab);
+  hook_add_hook("burst_channel", (hookfn *)send_tburst);
+  set_tburst_capab();
+}
+
+void
+_moddeinit(void)
+{
+  mod_del_cmd(&tburst_msgtab);
+  hook_del_hook("burst_channel", (hookfn *)send_tburst);
+  unset_tburst_capab();
+}
+
+const char *_version = "$Revision: 1.12 $";
+#endif
+
+/* ms_tburst()
+ * 
+ *      parv[0] = sender prefix
+ *      parv[1] = channel timestamp
+ *      parv[2] = channel
+ *      parv[3] = topic timestamp
+ *      parv[4] = topic setter
+ *      parv[5] = topic
+ */
+static void ms_tburst(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[])
+{
+  struct Channel *chptr;
+  time_t newchannelts;
+  time_t newtopicts;
+
+  newchannelts = atol(parv[1]);
+  newtopicts = atol(parv[3]);
+
+  if((chptr = hash_find_channel(parv[2])))
+  {
+    if(chptr->channelts < newchannelts)
+      return;
+
+    else if(chptr->channelts == newchannelts)
+    {
+      if(chptr->topic == NULL || (chptr->topic_time > newtopicts))
+	set_topic(source_p, chptr, newtopicts, parv[4], parv[5]);
+      else
+	return;
+    }
+
+    else
+      set_topic(source_p, chptr, newtopicts, parv[4], parv[5]);
+  }
+}
+
+static void set_topic(struct Client *source_p, struct Channel *chptr, 
+		      time_t newtopicts, char *topicwho, char *topic)
+{
+  set_channel_topic(chptr, topic, topicwho, newtopicts);
+
+  sendto_channel_local(ALL_MEMBERS, chptr, ":%s TOPIC %s :%s",
+		       ConfigServerHide.hide_servers ? me.name : me.name,
+		       chptr->chname, chptr->topic == NULL ? "" : chptr->topic);
+
+#ifdef TBURST_PROPAGATE
+  sendto_server(source_p, NULL, chptr, CAP_TBURST, NOCAPS, NOFLAGS,
+		":%s TBURST %ld %s %ld %s :%s",
+		me.name, chptr->channelts, chptr->chname,
+		chptr->topic_time, 
+                chptr->topic_info == NULL ? "" : chptr->topic_info,
+                chptr->topic == NULL ? "" : chptr->topic);
+#endif
+}
+
+static void set_tburst_capab()
+{
+  default_server_capabs |= CAP_TBURST;
+}
+
+static void unset_tburst_capab()
+{
+  default_server_capabs &= ~CAP_TBURST;
+}
+
+int send_tburst(struct hook_burst_channel *data)
+{
+  if(data->chptr->topic != NULL && IsCapable(data->client, CAP_TBURST))
+    sendto_one(data->client, ":%s TBURST %ld %s %ld %s :%s",
+               me.name, data->chptr->channelts, data->chptr->chname,
+	       data->chptr->topic_time, data->chptr->topic_info, 
+	       data->chptr->topic);
+
+  return 0;
+}
diff -ruN ircd-hybrid-7.0/chatjunkies/m_whois.c ircd-hybrid-7.0cj0/chatjunkies/m_whois.c
--- ircd-hybrid-7.0/chatjunkies/m_whois.c	1969-12-31 16:00:00.000000000 -0800
+++ ircd-hybrid-7.0cj0/chatjunkies/m_whois.c	2003-07-28 18:29:40.000000000 -0700
@@ -0,0 +1,742 @@
+/*
+ *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
+ *  m_whois.c: Shows who a user is.
+ *
+ *  Copyright (C) 2002 by the past and present ircd coders, and others.
+ *
+ *  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307
+ *  USA
+ *
+ *  $Id: m_whois.c,v 1.10 2003/02/16 22:06:45 bill Exp $
+ */
+
+#include "stdinc.h"
+#include "tools.h"
+#include "common.h"  
+#include "handlers.h"
+#include "client.h"
+#include "hash.h"
+#include "channel.h"
+#include "channel_mode.h"
+#include "vchannel.h"
+#include "hash.h"
+#include "ircd.h"
+#include "numeric.h"
+#include "s_conf.h"
+#include "s_serv.h"
+#include "send.h"
+#include "list.h"
+#include "irc_string.h"
+#include "s_conf.h"
+#include "msg.h"
+#include "parse.h"
+#include "modules.h"
+#include "hook.h"
+
+/* Add the bahamut style WHOISACTUALLY to show the users real ip on
+   remote (or local) WHOIS.
+   Added 2002-07-15 by Gozem
+   Updated 2003-01-17 by MeTaLRoCk
+*/
+
+
+static int do_whois(struct Client *client_p, struct Client *source_p,
+                    int parc, char *parv[]);
+static int single_whois(struct Client *source_p, struct Client *target_p,
+                        int wilds, int glob);
+static void whois_person(struct Client *source_p,struct Client *target_p,int glob);
+static int global_whois(struct Client *source_p, char *nick, int wilds, int glob);
+
+static void m_whois(struct Client*, struct Client*, int, char**);
+static void ms_whois(struct Client*, struct Client*, int, char**);
+static void mo_whois(struct Client*, struct Client*, int, char**);
+
+
+/* show_ip() should really be a global function, but since im hacking
+   up m_whois.c it stays here thsi time -Gozem */
+/*
+ * show_ip() - asks if the true IP shoudl be shown when source is
+ *             askin for info about target 
+ *
+ * Inputs	- source_p who is asking
+ *		- target_p who do we want the info on
+ * Output	- returns 1 if clear IP can be showed, otherwise 0
+ * Side Effects	- none
+ *
+ *
+ * Truth tables, one if source_p is local to target_p and one if not. 
+ * Key:
+ *  x  Show IP
+ *  -  Don't show IP
+ *  ?  Ask IsIPSpoof()
+ */
+
+static char show_ip_local[7][7] =
+{
+  /*Target:        A   O   L   H   S   C   E */
+  /*Source:*/    
+  /*Admin*/      {'x','x','x','x','x','x','-'},
+  /*Oper*/       {'-','?','x','?','?','?','-'},
+  /*Luser*/      {'-','-','?','-','-','-','-'},
+  /*Handshaker*/ {'-','-','-','-','-','-','-'},
+  /*Server*/     {'-','-','-','-','-','-','-'},
+  /*Connecting*/ {'-','-','-','-','-','-','-'},
+  /*Else*/       {'-','-','-','-','-','-','-'}
+};
+
+static char show_ip_remote[7][7] =
+{
+  /*Target:        A   O   L   H   S   C   E */
+  /*Source:*/    
+  /*Admin*/      {'?','?','?','?','?','-','-'},
+  /*Oper*/       {'-','?','?','?','?','-','-'},
+  /*Luser*/      {'-','-','?','-','-','-','-'},
+  /*Handshake*/  {'-','-','-','-','-','-','-'},
+  /*Server*/     {'-','-','-','-','-','-','-'},
+  /*Connecting*/ {'-','-','-','-','-','-','-'},
+  /*Else*/       {'-','-','-','-','-','-','-'}
+};
+
+int
+show_ip(struct Client* source_p, struct Client* target_p)
+{
+  int s, t, res;
+
+  if (IsAdmin(source_p))
+    s = 0;
+  else if (IsOper(source_p))
+    s = 1;
+  else if (IsClient(source_p))
+    s = 2;
+  else if (IsHandshake(source_p))
+    s= 3;
+  else if (IsServer(source_p))
+    s = 4;
+  else if (IsConnecting(source_p))
+    s = 5;
+  else
+    s = 6;
+
+  if (IsAdmin(target_p))
+    t = 0;
+  else if (IsOper(target_p))
+    t = 1;
+  else if (IsClient(target_p))
+    t = 2;
+  else if (IsHandshake(target_p))
+    t= 3;
+  else if (IsServer(target_p))
+    t = 4;
+  else if (IsConnecting(target_p))
+    t = 5;
+  else
+    t = 6;
+
+  if (MyClient(source_p) && MyClient(target_p))
+    res = show_ip_local[s][t];
+  else
+    res = show_ip_remote[s][t];
+
+  if (res == '-')
+    return 0;
+
+#ifdef HIDE_SPOOF_IPS
+  if (IsIPSpoof(target_p))
+    return 0;
+#endif
+
+#ifdef HIDE_SERVERS_IPS
+  if (IsServer(target_p) || IsConnecting(target_p) || IsHandshake(target_p))
+    return 0;
+#endif
+
+  if (res == '?')
+    return !IsIPSpoof(target_p);
+
+  if (res == 'x')
+    return 1;
+
+  /* This should never happen */
+  return 0;
+}
+
+
+
+struct Message whois_msgtab = {
+  "WHOIS", 0, 0, 0, 0, MFLG_SLOW, 0L,
+  {m_unregistered, m_whois, ms_whois, mo_whois}
+};
+
+#ifndef STATIC_MODULES
+void
+_modinit(void)
+{
+  hook_add_event("doing_whois");
+  mod_add_cmd(&whois_msgtab);
+}
+
+void
+_moddeinit(void)
+{
+  hook_del_event("doing_whois");
+  mod_del_cmd(&whois_msgtab);
+}
+
+const char *_version = "$Revision: 1.10 $";
+#endif
+/*
+** m_whois
+**      parv[0] = sender prefix
+**      parv[1] = nickname masklist
+*/
+static void
+m_whois(struct Client *client_p, struct Client *source_p,
+        int parc, char *parv[])
+{
+  static time_t last_used = 0;
+  
+  if (parc < 2 || BadPtr(parv[1]))
+    {
+      sendto_one(source_p, form_str(ERR_NONICKNAMEGIVEN),
+                 me.name, parv[0]);
+      return;
+    }
+
+  if (parc > 2)
+    {
+      /* seeing as this is going across servers, we should limit it */
+      if ((last_used + ConfigFileEntry.pace_wait_simple) > CurrentTime)
+        {             
+          if(MyClient(source_p))
+            sendto_one(source_p,form_str(RPL_LOAD2HI),me.name,source_p->name);
+          return;
+        }
+      else
+        last_used = CurrentTime;
+
+      /* if we have serverhide enabled, they can either ask the clients
+       * server, or our server.. I dont see why they would need to ask
+       * anything else for info about the client.. --fl_
+       */
+      if (ConfigServerHide.disable_remote)
+        parv[1] = parv[2];
+	
+      if (hunt_server(client_p,source_p,":%s WHOIS %s :%s", 1, parc, parv) !=
+          HUNTED_ISME)
+        {
+          return;
+        }
+      parv[1] = parv[2];
+
+    }
+  do_whois(client_p,source_p,parc,parv);
+}
+
+/*
+** mo_whois
+**      parv[0] = sender prefix
+**      parv[1] = nickname masklist
+*/
+static void 
+mo_whois(struct Client *client_p, struct Client *source_p,
+         int parc, char *parv[])
+{
+  /* XXX Need BadPtr */
+  if (parc < 2 || BadPtr(parv[1]))
+    {
+      sendto_one(source_p, form_str(ERR_NONICKNAMEGIVEN),
+                 me.name, parv[0]);
+      return;
+    }
+
+  if(parc > 2)
+    {
+      if (hunt_server(client_p,source_p,":%s WHOIS %s :%s", 1, parc, parv) !=
+          HUNTED_ISME)
+        {
+          return;
+        }
+      parv[1] = parv[2];
+    }
+
+  do_whois(client_p,source_p,parc,parv);
+}
+
+
+/* do_whois
+ *
+ * inputs	- pointer to 
+ * output	- 
+ * side effects -
+ */
+static int 
+do_whois(struct Client *client_p, struct Client *source_p,
+         int parc, char *parv[])
+{
+  struct Client *target_p;
+  char  *nick;
+  char  *p = NULL;
+  int   found=NO;
+  int   wilds;
+  int   glob=0;
+  
+  /* This lets us make all "whois nick" queries look the same, and all
+   * "whois nick nick" queries look the same.  We have to pass it all
+   * the way down to whois_person() though -- fl */
+
+  if(parc > 2)
+    glob = 1;
+
+  nick = parv[1];
+  while (*nick == ',')
+    nick++;
+  if ((p = strchr(nick,',')) != NULL)
+    *p = '\0';
+
+  (void)collapse(nick);
+  wilds = (strchr(nick, '?') || strchr(nick, '*'));
+
+  if (!wilds)
+    {
+      if ((target_p = find_client(nick)) != NULL)
+	{
+	  /* im being asked to reply to a client that isnt mine..
+	   * I cant answer authoritively, so better make it non-detailed
+	   */
+	  if(!MyClient(target_p))
+	    glob=0;
+	    
+	  if (IsServer(client_p))
+	    client_burst_if_needed(client_p,target_p);
+
+	  if (IsPerson(target_p))
+	    {
+	      (void)single_whois(source_p,target_p,wilds,glob);
+	      found = YES;
+            }
+        }
+      else
+	{
+	  if (!ServerInfo.hub && uplink && IsCapable(uplink,CAP_LL))
+	    {
+	      if(glob)
+   	        sendto_one(uplink,":%s WHOIS %s :%s",
+		  	   source_p->name, nick, nick);
+	      else
+		sendto_one(uplink,":%s WHOIS %s",
+			   source_p->name, nick);
+	      return (0);
+	    }
+	}
+    }
+  else /* wilds is true */
+    {
+      /* disallow wild card whois on lazylink leafs for now */
+
+      if (!ServerInfo.hub && uplink && IsCapable(uplink,CAP_LL))
+	{
+	  return (0);
+	}
+      /* Oh-oh wilds is true so have to do it the hard expensive way */
+      found = global_whois(source_p,nick,wilds,glob);
+    }
+
+  if (!found)
+    sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name, parv[0], nick);
+
+  sendto_one(source_p, form_str(RPL_ENDOFWHOIS), me.name, parv[0], parv[1]);
+
+  return (0);
+}
+
+/*
+ * global_whois()
+ *
+ * Inputs	- source_p client to report to
+ *		- target_p client to report on
+ *		- wilds whether wildchar char or not
+ * Output	- if found return 1
+ * Side Effects	- do a single whois on given client
+ * 		  writing results to source_p
+ */
+static int 
+global_whois(struct Client *source_p, char *nick, int wilds, int glob)
+{
+  struct Client *target_p;
+  int found = NO;
+
+  for (target_p = GlobalClientList; (target_p = next_client(target_p, nick));
+       target_p = target_p->next)
+    {
+      if (IsServer(target_p))
+	continue;
+      /*
+       * I'm always last :-) and target_p->next == NULL!!
+       */
+      if (IsMe(target_p))
+	break;
+      /*
+       * 'Rules' established for sending a WHOIS reply:
+       *
+       *
+       * - if wildcards are being used dont send a reply if
+       *   the querier isnt any common channels and the
+       *   client in question is invisible and wildcards are
+       *   in use (allow exact matches only);
+       *
+       * - only send replies about common or public channels
+       *   the target user(s) are on;
+       */
+
+      if(!IsRegistered(target_p))
+	continue;
+
+      if(single_whois(source_p, target_p, wilds, glob))
+	found = (YES);
+    }
+
+  return (found);
+}
+
+/*
+ * single_whois()
+ *
+ * Inputs	- source_p client to report to
+ *		- target_p client to report on
+ *		- wilds whether wildchar char or not
+ *		- glob
+ * Output	- if found return 1
+ * Side Effects	- do a single whois on given client
+ * 		  writing results to source_p
+ */
+static int 
+single_whois(struct Client *source_p,struct Client *target_p,
+             int wilds, int glob)
+{
+  dlink_node *ptr;
+  struct Channel *chptr;
+  char *name;
+  int invis;
+  int member;
+  int showperson;
+  
+  if (target_p->name[0] == '\0')
+    name = "?";
+  else
+    name = target_p->name;
+
+  if (target_p->user == NULL)
+    {
+      sendto_one(source_p, form_str(RPL_WHOISUSER), me.name,
+		 source_p->name, name,
+		 target_p->username, target_p->host, target_p->info);
+	  sendto_one(source_p, form_str(RPL_WHOISSERVER),
+		 me.name, source_p->name, name, "<Unknown>",
+		 "*Not On This Net*");
+      return (NO);
+    }
+
+  invis = IsInvisible(target_p);
+  member = (target_p->user->channel.head) ? 1 : 0;
+  showperson = (wilds && !invis && !member) || !wilds;
+
+  DLINK_FOREACH(ptr, target_p->user->channel.head)
+    {
+      chptr = ptr->data;
+      member = IsMember(source_p, chptr);
+      if (invis && !member)
+	continue;
+      if (member || (!invis && PubChannel(chptr)))
+	{
+	  showperson = 1;
+	  break;
+	}
+      if (!invis && HiddenChannel(chptr) && !SecretChannel(chptr))
+	{
+	  showperson = 1;
+	  break;
+	}
+    }
+
+  if (showperson)
+    whois_person(source_p,target_p,glob);
+  return (YES);
+}
+
+/*
+ * whois_person()
+ *
+ * Inputs	- source_p client to report to
+ *		- target_p client to report on
+ * Output	- NONE
+ * Side Effects	- 
+ */
+static void 
+whois_person(struct Client *source_p,struct Client *target_p, int glob)
+{
+  char buf[BUFSIZE];
+  char *chname;
+  char *server_name;
+  dlink_node  *lp;
+  struct Client *a2client_p;
+  struct Channel *chptr;
+  int cur_len = 0;
+  int mlen;
+  char *t;
+  int tlen;
+  int reply_to_send = NO;
+  struct hook_mfunc_data hd;
+#ifdef VCHANS
+  struct Channel *bchan;
+#endif
+  
+  a2client_p = find_server(target_p->user->server);
+          
+  sendto_one(source_p, form_str(RPL_WHOISUSER), me.name,
+	 source_p->name, target_p->name,
+	 target_p->username, target_p->host, target_p->info);
+  server_name = (char *)target_p->user->server;
+
+  ircsprintf(buf, form_str(RPL_WHOISCHANNELS),
+	       me.name, source_p->name, target_p->name, "");
+
+  mlen = strlen(buf);
+  cur_len = mlen;
+  t = buf + mlen;
+
+  DLINK_FOREACH(lp, target_p->user->channel.head)
+    {
+      chptr = lp->data;
+      chname = chptr->chname;
+
+#ifdef VCHANS
+      if (IsVchan(chptr))
+	{
+	  bchan = find_bchan (chptr);
+	  if (bchan != NULL)
+	    chname = bchan->chname;
+	}
+#endif
+
+      if (ShowChannel(source_p, chptr))
+	{
+
+          if ((cur_len + strlen(chname) + 2) > (BUFSIZE - 4))
+            {
+              sendto_one(source_p, "%s", buf);
+              cur_len = mlen;
+              t = buf + mlen;
+            }
+
+	  if (chptr->mode.mode & MODE_HIDEOPS && !is_any_op(chptr,source_p))
+            {
+              ircsprintf(t,"%s ",chname);
+            }
+          else
+            {
+              ircsprintf(t,"%s%s ", channel_chanop_or_voice(chptr,target_p),
+                       chname);
+	    }
+
+	  tlen = strlen(t);
+	  t += tlen;
+	  cur_len += tlen;
+	  reply_to_send = YES;
+
+	}
+    }
+
+  if (reply_to_send)
+    sendto_one(source_p, "%s", buf);
+          
+  if ((IsOper(source_p) || !ConfigServerHide.hide_servers) || target_p == source_p)
+    sendto_one(source_p, form_str(RPL_WHOISSERVER),
+	       me.name, source_p->name, target_p->name, server_name,
+	       a2client_p?a2client_p->info:"*Not On This Net*");
+  else
+    sendto_one(source_p, form_str(RPL_WHOISSERVER),
+	       me.name, source_p->name, target_p->name,
+               ServerInfo.network_name,
+	       ServerInfo.network_desc);
+
+  if (target_p->user->away)
+    sendto_one(source_p, form_str(RPL_AWAY), me.name,
+	       source_p->name, target_p->name, target_p->user->away);
+
+  if (IsOper(target_p))
+    sendto_one(source_p, form_str(RPL_WHOISOPERATOR),
+               me.name, source_p->name, target_p->name);
+
+  if (MyConnect(target_p)) /* Can't do any of this if not local! db */
+  {
+    if ( (glob) ||
+         ( MyClient(source_p) && (IsOper(source_p) ||
+                                  !ConfigServerHide.hide_servers) ) ||
+         (source_p == target_p) )
+    {
+      sendto_one(source_p, form_str(RPL_WHOISACTUALLY), 
+		 me.name, source_p->name, target_p->name,
+		 target_p->username, target_p->host, 
+		 show_ip(source_p, target_p) ? 
+		 target_p->localClient->sockhost : "255.255.255.255");
+
+      sendto_one(source_p, form_str(RPL_WHOISIDLE),
+                 me.name, source_p->name, target_p->name,
+                 CurrentTime - target_p->user->last,
+                 target_p->firsttime);
+    }
+  }
+  hd.client_p = target_p;
+  hd.source_p = source_p;
+
+  /* although we should fill in parc and parv, we don't ..
+   * be careful of this when writing whois hooks
+   */
+  if(MyClient(source_p)) 
+    hook_call_event("doing_whois", &hd);
+  
+  return;
+}
+
+/*
+** ms_whois
+**      parv[0] = sender prefix
+**      parv[1] = nickname masklist
+*/
+/* Be warned, this is heavily commented, as theres loads of possibilities
+ * that can happen, and as people might not understand the code, I
+ * stuck heavy comments in it.. it looks ugly.. but at least you
+ * know what it does.. --fl_ */
+static void 
+ms_whois(struct Client *client_p, struct Client *source_p,
+         int parc, char *parv[])
+{
+  /* its a misconfigured server */
+  /* XXX Need BadPtr */
+  if (parc < 2 || BadPtr(parv[1]))
+    {
+      sendto_one(source_p, form_str(ERR_NONICKNAMEGIVEN),
+                 me.name, parv[0]);
+      return;
+    }
+
+  /* its a client doing a remote whois:
+   * :parv[0] WHOIS parv[1] :parv[2]
+   *
+   * parv[0] == sender
+   * parv[1] == server to reply to the request
+   * parv[2] == the client we are whois'ing
+   */
+  if (parc > 2)
+  {
+    struct Client *target_p;
+    
+    /* check if parv[1] is a client.. (most common) */
+    if ((target_p = find_client(parv[1])) == NULL)
+    {
+      /* ok, parv[1] isnt a client, is it a server? */
+      if((target_p = find_server(parv[1])) == NULL)
+      {
+        /* its not a server either.. theyve sent a bad whois */
+        sendto_one(source_p, form_str(ERR_NOSUCHSERVER), me.name,
+	           parv[0], parv[1]);
+        return;
+      }
+    }
+
+    /* its been found as a client.. to save extra work later, change
+     * target_p to be the clients uplink.. you cant check if a client
+     * supports being a LL :P
+     */
+    else
+      target_p = target_p->servptr;
+
+    /* if parv[1] isnt my client, or me, someone else is supposed
+     * to be handling the request.. so send it to them 
+     */
+    if (!MyClient(target_p) && !IsMe(target_p))
+    {
+
+      /* we're being asked to forward a whois request to a LL to answer,
+       * if the target isnt on that server.. answer it for them, as the
+       * LL might not know that the target exists..
+       */
+      if(MyConnect(target_p) && ServerInfo.hub && 
+         IsCapable(target_p, CAP_LL))
+      {
+        struct Client *whois_p;
+
+        /* try to find the client */
+	whois_p = find_client(parv[2]);
+	if (whois_p)
+	{
+	  /* check the server being asked to perform the whois, is that
+	   * clients uplink */
+	  if(whois_p->servptr != target_p)
+	  {
+	    /* they asked the LL for info on a client it didnt know about..
+	     * as we're answering for them, make sure its non-detailed
+	     */
+	    parv[1] = parv[2];
+	    parc = 2;
+	    
+            do_whois(client_p, source_p, parc, parv);
+	    return;
+	  }
+	  
+	  /* the server is that clients uplink, get them to do it */
+	  else
+	  {
+	    client_burst_if_needed(target_p->from, source_p);
+	    sendto_one(target_p->from, ":%s WHOIS %s :%s", parv[0], parv[1],
+	               parv[2]);
+            return;
+          }
+	}
+
+	/* the client doesnt exist.. erk! */
+	else
+	{
+	  /* set parv[1] = parv[2], then let do_whois handle the error */
+	  parv[1] = parv[2];
+	  do_whois(client_p, source_p, parc, parv);
+	  return;
+	}
+      }
+
+      /* its not a lazylink.. forward it as it is */
+      else
+      {
+        /* client_burst_if_needed(target_p->from, source_p); 
+	 * the target isnt a LL.. why would I need to burst? */
+        sendto_one(target_p->from, ":%s WHOIS %s :%s", parv[0], parv[1],
+                   parv[2]);
+        return;	       
+      }
+    }
+
+  /* ok, the target is either us, or a client on our server, so perform the whois
+   * but first, parv[1] == server to perform the whois on, parv[2] == person
+   * to whois, so make parv[1] = parv[2] so do_whois is ok -- fl_
+   */
+    parv[1] = parv[2];
+    do_whois(client_p,source_p,parc,parv);
+    return;
+  }
+
+  /* parc == 2, so its a lazylink client asking us about a nick, so do it */
+  do_whois(client_p, source_p, parc, parv);
+  return;
+}
diff -ruN ircd-hybrid-7.0/configure ircd-hybrid-7.0cj0/configure
--- ircd-hybrid-7.0/configure	2003-05-31 00:30:18.000000000 -0700
+++ ircd-hybrid-7.0cj0/configure	2003-07-28 18:29:40.000000000 -0700
@@ -8357,7 +8357,7 @@
 
 
 
-ac_config_files="$ac_config_files Makefile iauth/Makefile iauth/source/Makefile servlink/Makefile contrib/Makefile src/Makefile adns/Makefile include/Makefile messages/Makefile messages/translations/Makefile modules/Makefile tools/Makefile doc/Makefile help/Makefile"
+ac_config_files="$ac_config_files Makefile iauth/Makefile iauth/source/Makefile servlink/Makefile contrib/Makefile chatjunkies/Makefile src/Makefile adns/Makefile include/Makefile messages/Makefile messages/translations/Makefile modules/Makefile tools/Makefile doc/Makefile help/Makefile"
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
@@ -8834,6 +8834,7 @@
   "iauth/source/Makefile" ) CONFIG_FILES="$CONFIG_FILES iauth/source/Makefile" ;;
   "servlink/Makefile" ) CONFIG_FILES="$CONFIG_FILES servlink/Makefile" ;;
   "contrib/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/Makefile" ;;
+  "chatjunkies/Makefile" ) CONFIG_FILES="$CONFIG_FILES chatjunkies/Makefile" ;;
   "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
   "adns/Makefile" ) CONFIG_FILES="$CONFIG_FILES adns/Makefile" ;;
   "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
diff -ruN ircd-hybrid-7.0/help/opers/index ircd-hybrid-7.0cj0/help/opers/index
--- ircd-hybrid-7.0/help/opers/index	2002-01-06 22:26:11.000000000 -0800
+++ ircd-hybrid-7.0cj0/help/opers/index	2003-07-28 18:29:40.000000000 -0700
@@ -15,9 +15,10 @@
 PART            PASS            PING            PONG
 POST            PRIVMSG         QUIT            REHASH
 RESTART         RESV            SERVER          SET
-SJOIN           SQUIT           STATS           SVINFO
-TESTLINE        TIME            TOPIC           TRACE
-UHELP           UMODE           UNDLINE         UNGLINE
-UNKLINE         UNRESV          USER            USERHOST
-USERS           VERSION         WALLOPS         WHO
-WHOIS           WHOWAS
+SETHOST         SETIDENT        SETNAME         SJOIN
+SQUIT           STATS           SVINFO          TESTLINE
+TIME            TOPIC           TRACE           UHELP
+UMODE           UNDLINE         UNGLINE         UNKLINE
+UNRESV          USER            USERHOST        USERS
+VERSION         WALLOPS         WHO             WHOIS
+WHOWAS
diff -ruN ircd-hybrid-7.0/help/opers/sethost ircd-hybrid-7.0cj0/help/opers/sethost
--- ircd-hybrid-7.0/help/opers/sethost	1969-12-31 16:00:00.000000000 -0800
+++ ircd-hybrid-7.0cj0/help/opers/sethost	2003-07-28 18:29:40.000000000 -0700
@@ -0,0 +1,11 @@
+SETHOST [nick] <hostname>
+
+SETHOST allows you to change your (or another user's) hostname
+This command is only available to opers
+
+*NEW*   Opers and clients doing a /whois on themselves can now
+*NEW*   see their true hostname after this command has been used
+
+/QUOTE SETHOST my.new.host        -- Change your hostname to "my.new.host"
+/QUOTE SETHOST Mike my.new.host   -- Change Mike's hostname to "my.new.host"
+
diff -ruN ircd-hybrid-7.0/help/opers/setident ircd-hybrid-7.0cj0/help/opers/setident
--- ircd-hybrid-7.0/help/opers/setident	1969-12-31 16:00:00.000000000 -0800
+++ ircd-hybrid-7.0cj0/help/opers/setident	2003-07-28 18:29:40.000000000 -0700
@@ -0,0 +1,8 @@
+SETIDENT [nick] <ident>
+
+SETIDENT allows you to change your (or another user's) ident string
+This command is only available to opers
+
+/QUOTE SETIDENT tim        -- Change your ident to "tim"
+/QUOTE SETIDENT Mike tim   -- Change Mike's ident to "tim"
+
diff -ruN ircd-hybrid-7.0/help/opers/setname ircd-hybrid-7.0cj0/help/opers/setname
--- ircd-hybrid-7.0/help/opers/setname	1969-12-31 16:00:00.000000000 -0800
+++ ircd-hybrid-7.0cj0/help/opers/setname	2003-07-28 18:29:40.000000000 -0700
@@ -0,0 +1,8 @@
+SETNAME [nick] <name>
+
+SETNAME allows you to change your (or another user's) gecos field (real name)
+This command is only available to opers
+
+/QUOTE SETNAME tim        -- Change your gecos field to "tim"
+/QUOTE SETNAME Mike tim   -- Change Mike's gecos field to "tim"
+
diff -ruN ircd-hybrid-7.0/include/client.h ircd-hybrid-7.0cj0/include/client.h
--- ircd-hybrid-7.0/include/client.h	2003-02-16 14:54:35.000000000 -0800
+++ ircd-hybrid-7.0cj0/include/client.h	2003-07-29 23:58:05.000000000 -0700
@@ -181,6 +181,10 @@
    */
   char              host[HOSTLEN + 1];     /* client's hostname */
   /*
+   * client->realhost contains the real hostname (because I change host above
+   */
+  char              realhost[HOSTLEN + 1]; /* client's REAL hostname */
+  /*
    * client->info for unix clients will normally contain the info from the 
    * gcos field in /etc/passwd but anything can go here.
    */
@@ -422,6 +426,7 @@
 /* user information flags, only settable by remote mode or local oper */
 #define FLAGS_OPER         0x20000 /* Operator */
 #define FLAGS_ADMIN        0x40000 /* Admin on server */
+#define FLAGS_NOKICK       0x80000 /* cannot be kicked and can see +i users */
 
 #define FLAGS_ALL	   FLAGS_SERVNOTICE
 
@@ -460,7 +465,7 @@
                                                * been ended. */
 
 #define SEND_UMODES  (FLAGS_INVISIBLE | FLAGS_OPER | FLAGS_WALLOP | \
-                      FLAGS_ADMIN)
+                      FLAGS_ADMIN | FLAGS_NOKICK)
 #define ALL_UMODES   (SEND_UMODES | FLAGS_SERVNOTICE | FLAGS_CCONN | \
                       FLAGS_REJ | FLAGS_SKILL | FLAGS_FULL | FLAGS_SPY | \
                       FLAGS_NCHANGE | FLAGS_OPERWALL | FLAGS_DEBUG | \
diff -ruN ircd-hybrid-7.0/include/config.h ircd-hybrid-7.0cj0/include/config.h
--- ircd-hybrid-7.0/include/config.h	2003-02-06 00:46:11.000000000 -0800
+++ ircd-hybrid-7.0cj0/include/config.h	2003-07-28 18:29:40.000000000 -0700
@@ -296,9 +296,9 @@
  * If you have enabled efnet specific code these will be disabled automatically
  * else they are here for anyone else.
  */
-#define VCHANS
-#define ANONOPS
-#define HALFOPS
+#undef VCHANS
+#undef ANONOPS
+#undef HALFOPS
 
 /*
  * The maximum number of local clients that are likely to close at once. If
@@ -358,7 +358,13 @@
  * might do due to bugs.  ircd might be slightly more efficient with 
  * these disabled, who knows. keep this enabled during development.
  */
-#define INVARIANTS
+#undef INVARIANTS
+
+/*
+ * See if there is a majority agreement on a GLINE on the given user
+ * There myst be at least 3 different opers agreeing on this GLINE
+ */
+#undef USE_MAJORITY_GLINE
 
 #define CONFIG_H_LEVEL_7
 
diff -ruN ircd-hybrid-7.0/include/numeric.h ircd-hybrid-7.0cj0/include/numeric.h
--- ircd-hybrid-7.0/include/numeric.h	2002-11-27 07:46:24.000000000 -0800
+++ ircd-hybrid-7.0cj0/include/numeric.h	2003-07-28 18:29:40.000000000 -0700
@@ -353,6 +353,8 @@
 #define ERR_NOLOGIN          444
 #define ERR_SUMMONDISABLED   445
 #define ERR_USERSDISABLED    446
+#define ERR_NOKICK           447           /* added by PC^God for umode +Q */
+#define ERR_NODEOP           448
 
 #define ERR_NOTREGISTERED    451
 
diff -ruN ircd-hybrid-7.0/include/patchlevel.h ircd-hybrid-7.0cj0/include/patchlevel.h
--- ircd-hybrid-7.0/include/patchlevel.h	2003-06-10 21:38:40.000000000 -0700
+++ ircd-hybrid-7.0cj0/include/patchlevel.h	2003-07-28 18:29:40.000000000 -0700
@@ -23,5 +23,5 @@
  */
 
 #ifndef PATCHLEVEL
-#define PATCHLEVEL   "hybrid-7.0"
+#define PATCHLEVEL   "hybrid-7.0cj0"
 #endif
diff -ruN ircd-hybrid-7.0/include/s_user.h ircd-hybrid-7.0cj0/include/s_user.h
--- ircd-hybrid-7.0/include/s_user.h	2002-05-24 16:34:08.000000000 -0700
+++ ircd-hybrid-7.0cj0/include/s_user.h	2003-07-28 18:29:40.000000000 -0700
@@ -44,7 +44,7 @@
 			   char* ,char *,char *,char *);
 
 extern int   do_remote_user(char* ,struct Client* ,struct Client*,
-			    char* ,char *,char *,char *,char *);
+			    char* ,char *,char *,char *,char *,char *);
 
 extern int   user_modes_from_c_to_bitmask[];
 extern void  show_isupport(struct Client *);
diff -ruN ircd-hybrid-7.0/modules/core/m_kick.c ircd-hybrid-7.0cj0/modules/core/m_kick.c
--- ircd-hybrid-7.0/modules/core/m_kick.c	2003-02-01 12:12:24.000000000 -0800
+++ ircd-hybrid-7.0cj0/modules/core/m_kick.c	2003-07-28 18:29:40.000000000 -0700
@@ -184,7 +184,7 @@
       return;
     }
 
-  if (IsMember(who, chptr))
+  if (IsMember(who, chptr) && !(who->umodes & FLAGS_NOKICK))
     {
       /* half ops cannot kick other halfops on private channels */
 #ifdef HALFOPS
@@ -248,6 +248,9 @@
       if (!IsDefunct(who))
 	remove_user_from_channel(chptr, who);
     }
+  else if(who->umodes & FLAGS_NOKICK) /* error if +Q kicked */
+    sendto_one(source_p, form_str(ERR_NOKICK), 
+	       me.name, parv[0], user, name);
   else
     sendto_one(source_p, form_str(ERR_USERNOTINCHANNEL),
                me.name, parv[0], user, name);
diff -ruN ircd-hybrid-7.0/modules/core/m_kill.c ircd-hybrid-7.0cj0/modules/core/m_kill.c
--- ircd-hybrid-7.0/modules/core/m_kill.c	2003-02-14 15:01:53.000000000 -0800
+++ ircd-hybrid-7.0cj0/modules/core/m_kill.c	2003-07-28 18:29:40.000000000 -0700
@@ -128,6 +128,13 @@
       return;
     }
 
+  if((target_p->umodes & FLAGS_NOKICK))
+    {
+      sendto_one(source_p, ":%s NOTICE %s :%s cannot be killed",
+		 me.name, parv[0], target_p->name);
+      return;
+    }
+
   if(MyConnect(target_p))
     sendto_one(target_p, ":%s!%s@%s KILL %s :%s", 
 	       source_p->name, source_p->username, source_p->host,
diff -ruN ircd-hybrid-7.0/modules/core/m_nick.c ircd-hybrid-7.0cj0/modules/core/m_nick.c
--- ircd-hybrid-7.0/modules/core/m_nick.c	2003-04-02 17:29:02.000000000 -0800
+++ ircd-hybrid-7.0cj0/modules/core/m_nick.c	2003-07-28 18:29:40.000000000 -0700
@@ -431,8 +431,8 @@
   char    *id;
   char    *name;
 
-  id = parv[8];
-  name = parv[9];
+  id = parv[9];
+  name = parv[10];
 
   /* XXX can this happen ? */
   if (BadPtr(parv[1]))
@@ -736,7 +736,7 @@
       }
 
       return do_remote_user(nick, client_p, source_p, parv[5], parv[6],
-                            parv[7], parv[8], NULL);
+                            parv[7], parv[7], parv[8], NULL);
     }
   }
   else if(source_p->name[0])
@@ -785,8 +785,8 @@
   int flag;
   char *m;
 
-  id = parv[8];
-  name = parv[9];
+  id = parv[9];
+  name = parv[10];
 
   source_p = make_client(client_p);
   add_client_to_list(source_p);
@@ -819,7 +819,7 @@
   }
 
   return do_remote_user(nick, client_p, source_p, parv[5], parv[6],
-                        parv[7], name, id);
+                        parv[7], parv[8], name, id);
 }			
   
 static int 
@@ -900,7 +900,7 @@
 	
 	if(parc == 9)
 	  nick_from_server(client_p,source_p,parc,parv,newts,nick);
-	else if(parc == 10)
+	else if(parc == 11)
 	  client_from_server(client_p,source_p,parc,parv,newts,nick);
 	  
 	return 0;
diff -ruN ircd-hybrid-7.0/modules/m_gline.c ircd-hybrid-7.0cj0/modules/m_gline.c
--- ircd-hybrid-7.0/modules/m_gline.c	2003-04-10 20:41:40.000000000 -0700
+++ ircd-hybrid-7.0cj0/modules/m_gline.c	2003-07-28 18:29:40.000000000 -0700
@@ -66,6 +66,7 @@
                               const char* oper_server,
                               const char *,const char *,const char *);
 
+#ifdef USE_MAJORITY_GLINE
 static void log_gline(struct Client *,struct gline_pending *,
                       const char *, const char *,const char *,
                       const char* oper_server,
@@ -79,6 +80,7 @@
 				const char *oper_server,
 				const char *user, const char *host,
 				const char *reason);
+#endif /* USE_MAJORITY_GLINE */
 
 static void add_new_majority_gline(const char *, const char *, const char *,
                                    const char *, const char *, const char *,
@@ -205,6 +207,7 @@
   /* call these two functions first so the 'requesting' notice always comes
    * before the 'has triggered' notice.  -bill
    */
+#ifdef USE_MAJORITY_GLINE
   sendto_realops_flags(FLAGS_ALL, L_ALL,
                        "%s!%s@%s on %s is requesting gline for [%s@%s] [%s]",
                        source_p->name, source_p->username, source_p->host,
@@ -224,6 +227,10 @@
 	       me.name, parv[0]);
     return;
   }
+#else
+  set_local_gline(source_p->name, source_p->username, source_p->host, 
+		  source_p->user->server, user, host, reason);
+#endif /* USE_MAJORITY_GLINE */
 
   /* 4 param version for hyb-7 servers */
   sendto_server(NULL, source_p, NULL, CAP_GLN|CAP_UID, NOCAPS,
@@ -304,16 +311,18 @@
 
   /* Its plausible that the server and/or client dont actually exist,
    * and its faked, as the oper isnt sending the gline..
-   * check they're real --fl_ */
+   * check they're real --fl_ 
+   * This breaks hybserv's gline implementation, removing --PC^God
+   */
   /* we need acptr for LL introduction anyway -davidt */
-  if((acptr = find_server(oper_server)))
+  /*  if((acptr = find_server(oper_server)))
   {
     if((acptr = find_client(oper_nick)) == NULL)
       return;
   }
   else
     return;
-
+  */
  if(invalid_gline(acptr, user, host, (char *)reason))
     return;
     
@@ -346,6 +355,7 @@
       log_gline_request(oper_nick,oper_user,oper_host,oper_server,
 			user,host,reason);
       
+#ifdef USE_MAJORITY_GLINE
       sendto_realops_flags(FLAGS_ALL, L_ALL,
 			   "%s!%s@%s on %s is requesting gline for [%s@%s] [%s]",
 			   oper_nick, oper_user, oper_host, oper_server,
@@ -359,6 +369,10 @@
 	sendto_realops_flags(FLAGS_ALL, L_ALL,
 			     "oper or server has already voted");
       }
+#else
+      set_local_gline(oper_nick, oper_user, oper_host, oper_server, user, host,
+		      reason);
+#endif /* USE_MAJORITY_GLINE */
     }
 }
 
@@ -426,13 +440,27 @@
 invalid_gline(struct Client *source_p, char *luser, char *lhost,
                        char *lreason)
 {
+  struct Client *cptr;
+
   if(strchr(luser, '!'))
   {
     sendto_one(source_p, ":%s NOTICE %s :Invalid character '!' in gline",
                me.name, source_p->name);
     return (1);
   }
-
+  
+  /* test if gline is set against a +Q user */
+  for(cptr = GlobalClientList; cptr; cptr = cptr->next)
+    {
+      if(((cptr->umodes & FLAGS_NOKICK)) && (match(luser, cptr->username)) 
+	 && (match(lhost, cptr->host)))
+	{
+	  sendto_one(source_p, ":%s NOTICE %s :%s@%s matches unglinable user",
+		     me.name, source_p->name, luser, lhost);
+	  return (1);
+	}
+	    
+    }
   return (0);
 }
 
diff -ruN ircd-hybrid-7.0/modules/m_join.c ircd-hybrid-7.0cj0/modules/m_join.c
--- ircd-hybrid-7.0/modules/m_join.c	2003-04-02 17:29:00.000000000 -0800
+++ ircd-hybrid-7.0cj0/modules/m_join.c	2003-07-28 18:29:40.000000000 -0700
@@ -315,12 +315,13 @@
       if (flags & CHFL_CHANOP)
 	{
 	  chptr->channelts = CurrentTime;
-	  chptr->mode.mode |= MODE_TOPICLIMIT;
-	  chptr->mode.mode |= MODE_NOPRIVMSGS;
+	  /*chptr->mode.mode |= MODE_TOPICLIMIT;
+	  chptr->mode.mode |= MODE_NOPRIVMSGS; */
 	  modebuf[0] = '+';
-	  modebuf[1] = 'n';
+	  /*modebuf[1] = 'n';
 	  modebuf[2] = 't';
-	  modebuf[3] = '\0';
+	  modebuf[3] = '\0'; */
+	  modebuf[1] = '\0';
 
           /*
            * XXX - this is a rather ugly hack.
diff -ruN ircd-hybrid-7.0/modules/m_names.c ircd-hybrid-7.0cj0/modules/m_names.c
--- ircd-hybrid-7.0/modules/m_names.c	2002-08-15 08:00:59.000000000 -0700
+++ ircd-hybrid-7.0cj0/modules/m_names.c	2003-07-28 18:29:40.000000000 -0700
@@ -282,7 +282,7 @@
    * then allow leaf to use normal client m_names()
    * other wise, ignore it.
    */
-
+  /*
   if( ServerInfo.hub )
     {
       if(!IsCapable(client_p->from,CAP_LL))
@@ -290,6 +290,7 @@
     }
 
   if(IsClient(source_p))
+  */
     m_names(client_p,source_p,parc,parv);
 }
 
diff -ruN ircd-hybrid-7.0/modules/m_stats.c ircd-hybrid-7.0cj0/modules/m_stats.c
--- ircd-hybrid-7.0/modules/m_stats.c	2003-05-05 22:32:16.000000000 -0700
+++ ircd-hybrid-7.0cj0/modules/m_stats.c	2003-07-28 18:29:41.000000000 -0700
@@ -147,7 +147,7 @@
   { 'E',	stats_events,		1,	1,	},
   { 'f',	fd_dump,		1,	1,	},
   { 'F',	fd_dump,		1,	1,	},
-  { 'g',	stats_pending_glines,	1,	0,	},
+  { 'g',	stats_glines,	        1,	0,	},
   { 'G',	stats_glines,		1,	0,	},
   { 'h',	stats_hubleaf,		1,	0,	},
   { 'H',	stats_hubleaf,		1,	0,	},
diff -ruN ircd-hybrid-7.0/modules/m_unkline.c ircd-hybrid-7.0cj0/modules/m_unkline.c
--- ircd-hybrid-7.0/modules/m_unkline.c	2002-11-18 11:54:58.000000000 -0800
+++ ircd-hybrid-7.0cj0/modules/m_unkline.c	2003-07-28 18:29:41.000000000 -0700
@@ -47,6 +47,7 @@
 static void mo_unkline(struct Client*, struct Client*, int, char**);
 static void mo_undline(struct Client*, struct Client*, int, char**);
 static void mo_ungline(struct Client*, struct Client*, int, char**);
+static void ms_ungline(struct Client*, struct Client*, int, char**);
 
 struct Message msgtabs[] = {
   {"UNKLINE", 0, 0, 2, 0, MFLG_SLOW, 0,
@@ -54,7 +55,7 @@
   {"UNDLINE", 0, 0, 2, 0, MFLG_SLOW, 0,
    {m_unregistered, m_not_oper, m_error, mo_undline}}, 
   {"UNGLINE", 0, 0, 2, 0, MFLG_SLOW, 0,
-   {m_unregistered, m_not_oper, m_error, mo_ungline}}
+   {m_unregistered, m_not_oper, ms_ungline, mo_ungline}}
 };
 
 #ifndef STATIC_MODULES
@@ -482,6 +483,9 @@
       sendto_realops_flags(FLAGS_ALL, L_ALL,
 			   "%s has removed the G-Line for: [%s@%s]",
 			   get_oper_name(source_p), user, host );
+      sendto_server(NULL, NULL, NULL, NOCAPS, NOCAPS, NOFLAGS,
+                ":%s UNGLINE %s %s %s",
+                me.name, parv[0], user, host);
       ilog(L_NOTICE, "%s removed G-Line for [%s@%s]",
           get_oper_name(source_p), user, host);
       return;
@@ -494,4 +498,30 @@
     }
 }
 
+/*
+** ms_ungline
+**      parv[0] = sender name
+**      parv[1] = name of oper issuing command
+**      parv[2] = username of gline to remove
+**      parv[3] = hostname of gline to remove
+*/
 
+static void ms_ungline(struct Client *client_p, struct Client *source_p,
+		       int parc, char **parv)
+{
+
+  if(ConfigFileEntry.glines)
+    {
+      if(parc < 4)
+	return;
+      if(remove_gline_match(parv[2], parv[3]))
+	{
+	  sendto_server(source_p, NULL, NULL, NOCAPS, NOCAPS, NOFLAGS,
+			":%s UNGLINE %s %s %s",
+			me.name, parv[1], parv[2], parv[3]);
+	  sendto_realops_flags(FLAGS_ALL, L_ALL, 
+			       "%s has removed the G-Line for: [%s@%s]",
+			       parv[1], parv[2], parv[3]);
+	}
+    }
+}
diff -ruN ircd-hybrid-7.0/src/channel.c ircd-hybrid-7.0cj0/src/channel.c
--- ircd-hybrid-7.0/src/channel.c	2003-05-28 21:02:36.000000000 -0700
+++ ircd-hybrid-7.0cj0/src/channel.c	2003-07-28 18:29:41.000000000 -0700
@@ -754,7 +754,8 @@
         {
           who = members_ptr[i]->data;
 
-          if (IsInvisible(who) && !is_member)
+          if (IsInvisible(who) && (!is_member &&
+				   !(source_p->umodes & FLAGS_NOKICK)))
           {
             /* We definitely need this code -A1kmm. */
             members_ptr[i] = members_ptr[i]->next;
diff -ruN ircd-hybrid-7.0/src/channel_mode.c ircd-hybrid-7.0cj0/src/channel_mode.c
--- ircd-hybrid-7.0/src/channel_mode.c	2003-04-19 19:33:41.000000000 -0700
+++ ircd-hybrid-7.0cj0/src/channel_mode.c	2003-07-28 18:29:41.000000000 -0700
@@ -1307,6 +1307,18 @@
     ))
     return;
 
+  /* do not deop +Q users unless it is them requesting it */
+  
+  if((targ_p->umodes & FLAGS_NOKICK) && (targ_p != source_p))
+    {
+      if(dir == MODE_DEL)
+	{
+	  sendto_one(source_p, form_str(ERR_NODEOP), 
+		   me.name, source_p->name, targ_p->name, chptr->chname);
+	  return;
+	}
+    }
+
   if (MyClient(source_p) && (++mode_limit > MAXMODEPARAMS))
     return;
 
diff -ruN ircd-hybrid-7.0/src/messages.tab ircd-hybrid-7.0cj0/src/messages.tab
--- ircd-hybrid-7.0/src/messages.tab	2003-05-05 22:32:17.000000000 -0700
+++ ircd-hybrid-7.0cj0/src/messages.tab	2003-07-28 18:29:41.000000000 -0700
@@ -472,8 +472,8 @@
 /* 444 ERR_NOLOGIN, */          ":%s 444 %s %s :User not logged in",
 /* 445 ERR_SUMMONDISABLED, */   ":%s 445 %s :SUMMON has been removed",
 /* 446 ERR_USERSDISABLED, */    ":%s 446 %s :USERS has been removed",
-/* 447 */       NULL,
-/* 448 */       NULL,
+/* 447 ERR_NOKICK, */		":%s 447 %s %s %s :User cannot be kicked",
+/* 448 ERR_NODEOP, */		":%s 448 %s %s %s :User cannot be deoped",
 /* 449 */       NULL,
 /* 450 */       NULL,
 /* 451 ERR_NOTREGISTERED, */    ":%s 451 %s :You have not registered",
diff -ruN ircd-hybrid-7.0/src/s_serv.c ircd-hybrid-7.0cj0/src/s_serv.c
--- ircd-hybrid-7.0/src/s_serv.c	2003-05-31 00:30:34.000000000 -0700
+++ ircd-hybrid-7.0cj0/src/s_serv.c	2003-07-28 18:29:41.000000000 -0700
@@ -816,13 +816,14 @@
   }
  
   if (HasID(target_p) && IsCapable(client_p, CAP_UID))
-	  sendto_one(client_p, "CLIENT %s %d %lu %s %s %s %s %s :%s",
+	  sendto_one(client_p, "CLIENT %s %d %lu %s %s %s %s %s %s :%s",
 				 target_p->name,
 				 target_p->hopcount + 1,
 				 (unsigned long) target_p->tsinfo,
 				 ubuf,
-				 target_p->username, target_p->host,
-				 target_p->user->server, target_p->user->id, target_p->info);
+				 target_p->username, target_p->host, 
+		                 target_p->realhost, target_p->user->server, 
+		                 target_p->user->id, target_p->info);
   else
 	  sendto_one(client_p, "NICK %s %d %lu %s %s %s %s :%s",
 				 target_p->name, 
@@ -830,7 +831,7 @@
 				 (unsigned long) target_p->tsinfo,
 				 ubuf,
 				 target_p->username, target_p->host,
-				 target_p->user->server, target_p->info);
+		                 target_p->user->server, target_p->info);
 }
 
 /*
diff -ruN ircd-hybrid-7.0/src/s_user.c ircd-hybrid-7.0cj0/src/s_user.c
--- ircd-hybrid-7.0/src/s_user.c	2003-05-28 21:58:03.000000000 -0700
+++ ircd-hybrid-7.0cj0/src/s_user.c	2003-07-28 18:29:41.000000000 -0700
@@ -91,6 +91,7 @@
   {FLAGS_EXTERNAL, 'x'},
   {FLAGS_SPY, 'y'},
   {FLAGS_OPERWALL, 'z'},
+  {FLAGS_NOKICK, 'Q'},
   {0, 0}
 };
 
@@ -119,7 +120,7 @@
   0,            /* N */
   0,            /* O */
   0,            /* P */
-  0,            /* Q */
+  FLAGS_NOKICK, /* Q */
   0,            /* R */
   0,            /* S */
   0,            /* T */
@@ -330,6 +331,8 @@
 		 me.name, source_p->name );
       strncpy(source_p->host,source_p->localClient->sockhost,HOSTIPLEN+1);
     }
+    else
+      strncpy(source_p->realhost, source_p->host, sizeof(source_p->realhost));
 
   ptr = source_p->localClient->confs.head;
   aconf = ptr->data;
@@ -630,13 +633,13 @@
     {
       if (IsCapable(uplink, CAP_UID) && HasID(source_p))
 	{
-	  sendto_one(uplink, "CLIENT %s %d %lu %s %s %s %s %s :%s",
+	  sendto_one(uplink, "CLIENT %s %d %lu %s %s %s %s %s %s :%s",
 		     nick,
 		     source_p->hopcount+1,
 		     (unsigned long) source_p->tsinfo,
 		     ubuf,
-		     source_p->username, source_p->host, user->server,
-		     user->id, source_p->info);
+		     source_p->username, source_p->host, source_p->realhost,
+		     user->server, user->id, source_p->info);
 	}
       else
 	{
@@ -659,13 +662,13 @@
 	    continue;
 		  
 	  if (IsCapable(server, CAP_UID) && HasID(source_p))
-	    sendto_one(server, "CLIENT %s %d %lu %s %s %s %s %s :%s",
+	    sendto_one(server, "CLIENT %s %d %lu %s %s %s %s %s %s :%s",
 		       nick,
 		       source_p->hopcount+1,
 		       (unsigned long) source_p->tsinfo,
 		       ubuf,
-		       source_p->username, source_p->host, user->server,
-		       user->id, source_p->info);
+		       source_p->username, source_p->host, source_p->realhost,
+		       user->server, user->id, source_p->info);
 	  else
 	    sendto_one(server, "NICK %s %d %lu %s %s %s %s :%s",
 		       nick,
@@ -887,8 +890,8 @@
  */
 int
 do_remote_user(char* nick, struct Client* client_p, struct Client* source_p,
-		   char* username, char *host, char *server, char *realname,
-		   char *id)
+		   char* username, char *host, char *realhost, char *server, 
+	           char *realname, char *id)
 {
   unsigned int oflags;
   struct User* user;
@@ -907,6 +910,7 @@
    */
   user->server = find_or_add(server);
   strlcpy(source_p->host, host, sizeof(source_p->host)); 
+  strlcpy(source_p->realhost, realhost, sizeof(source_p->realhost));
   strlcpy(source_p->info, realname, sizeof(source_p->info));
   if (id != NULL)
     strcpy(source_p->user->id, id);
@@ -1044,7 +1048,15 @@
         case '\r' :
         case '\t' :
           break;
-
+	case 'Q':
+	  if(!IsOper(source_p)) /* if not an oper, ignore Q mode, otherwise */
+	    {                     /* continue on with the default behavior */
+	      if(MyConnect(source_p))
+		{
+		  badflag = YES;
+		  break;
+		}
+	    }
         default :
           if( (flag = user_modes_from_c_to_bitmask[(unsigned char)*m]))
             {
