diff -uNrd operstats-1.2.0/NOTES operstats-1.2.0+malkier/NOTES
--- operstats-1.2.0/NOTES	Wed Dec 31 19:00:00 1969
+++ operstats-1.2.0+malkier/NOTES	Sun Dec 14 16:06:05 2003
@@ -0,0 +1,32 @@
+OperStats 1.2.0 port for ircd-hybrid-7 and ircd-ratbox.
+
+All servers must add a shared block for the services so that AKILL works.
+
+For Hybrid 7.0:
+
+shared {
+  name = "services.network.tld";
+  kline = yes;
+  unkline = yes;
+};
+
+For ircd-ratbox:
+
+shared {
+  name = "services.networkd.tld";
+  type = kline, unkline;
+};
+
+Replacing the name for whatever you name your operstats server.
+
+If you run Hybrid 7, you MUST run the +demon patch, or AKILL's will never
+be removed.
+
+SnoopChan must be -n if the services are not joining it (like ircu).
+
+It will not forcefully take ops in the JoinChan.  If there are users in it,
+  the services will join like normal users and will not be "server opped".
+
+SecuritySetting must be None on Hybrid 7 if you wish to access services when
+  you are not /oper'ed.
+
diff -uNrd operstats-1.2.0/dist/operstats.conf operstats-1.2.0+malkier/dist/operstats.conf
--- operstats-1.2.0/dist/operstats.conf	Sun Jan 26 00:31:15 2003
+++ operstats-1.2.0+malkier/dist/operstats.conf	Sun Dec 14 16:06:05 2003
@@ -40,12 +40,13 @@
 # this is not set properly, OperStats will not work properly on your network.
 # If your IRCd is not listed below, you can try a similar IRCd, but there
 # are no gaurantees with any IRCds not listed.
-# There are 5 supported IRCds:
+# There are 6 supported IRCds:
 #      DreamForge
 #      Prometheus
 #      Bahamut
 #      Unreal 3
 #      Unreal 3.2
+#      Hybrid
 # You must include any spaces shown above. For example:
 # IRCdType Unreal 3.2
 # This is required.
diff -uNrd operstats-1.2.0/doc/CHANGES operstats-1.2.0+malkier/doc/CHANGES
--- operstats-1.2.0/doc/CHANGES	Sat Apr  5 06:09:06 2003
+++ operstats-1.2.0+malkier/doc/CHANGES	Sun Dec 14 16:20:37 2003
@@ -1,3 +1,11 @@
+OperStats -- v1.2.0+malkier - rakaur <rakaur@malkier.net>
+-----
+
+* Added +hybrid patch
+* ircd-ratbox doesn't have GLOBOPS, changed it to OPERWALL.
+* SRA's don't trigger flood protection.
+* Fixed network wide notices not working because of $$ vs $
+
 OperStats -- v1.2.0 - skold <skold@habber.net>
 -----
 
diff -uNrd operstats-1.2.0/inc/config.h operstats-1.2.0+malkier/inc/config.h
--- operstats-1.2.0/inc/config.h	Sun Jan 26 00:31:40 2003
+++ operstats-1.2.0+malkier/inc/config.h	Sun Dec 14 16:06:05 2003
@@ -45,6 +45,7 @@
 #define BAHAMUT		3
 #define UNREAL3		4
 #define UNREAL3_2	5
+#define HYBRID		6
 
 /* Do you want OperStats to generate a core file if it crashes?
    I'd suggest you leave this option on. If you experience crashes,
diff -uNrd operstats-1.2.0/misc/makeconf operstats-1.2.0+malkier/misc/makeconf
--- operstats-1.2.0/misc/makeconf	Sun Jan 26 00:32:12 2003
+++ operstats-1.2.0+malkier/misc/makeconf	Sun Dec 14 16:06:05 2003
@@ -174,6 +174,7 @@
 echo "    3) Bahamut"
 echo "    4) UnrealIRCd 3"
 echo "    5) UnrealIRCd 3.2"
+echo "    6) Hybrid 7.0/ircd-ratbox 1.x"
 while [ $ok -eq 0 ] ; do
 	echo2 "[$IRCDTYPE] "
 	if read INPUT ; then : ; else echo "" ; exit 1 ; fi
@@ -181,7 +182,7 @@
 		INPUT=$IRCDTYPE
 	fi
 	case $INPUT in
-		[1-5])
+		[1-6])
 			ok=1
 			;;
 		*)
@@ -277,12 +278,13 @@
 # this is not set properly, OperStats will not work properly on your network.
 # If your IRCd is not listed below, you can try a similar IRCd, but there
 # are no gaurantees with any IRCds not listed.
-# There are 5 supported IRCds:
+# There are 6 supported IRCds:
 #      DreamForge
 #      Prometheus
 #      Bahamut
 #      Unreal 3
 #      Unreal 3.2
+#      Hybrid
 # You must include any spaces shown above. For example:
 # IRCdType Unreal 3.2
 # This is required.
@@ -311,6 +313,11 @@
 
 if [ "$IRCDTYPE" -eq "5" ] ; then cat <<_EOT_ >>operstats.conf
 IRCdType Unreal 3.2
+_EOT_
+fi
+
+if [ "$IRCDTYPE" -eq "6" ] ; then cat <<_EOT_ >>operstats.conf
+IRCdType Hybrid
 _EOT_
 fi
 
diff -uNrd operstats-1.2.0/src/Makefile operstats-1.2.0+malkier/src/Makefile
--- operstats-1.2.0/src/Makefile	Sat Apr  5 06:08:47 2003
+++ operstats-1.2.0+malkier/src/Makefile	Sun Dec 14 16:06:05 2003
@@ -2,7 +2,7 @@
 
 include ../Makefile.inc
 
-VERSION=1.2.0
+VERSION=1.2.0+malkier
 
 OBJS=main.o shared.o operserv.o statserv.o process.o socket.o function.o server.o conf.o help.o
 
diff -uNrd operstats-1.2.0/src/conf.c operstats-1.2.0+malkier/src/conf.c
--- operstats-1.2.0/src/conf.c	Tue Feb  4 21:14:09 2003
+++ operstats-1.2.0+malkier/src/conf.c	Sun Dec 14 16:06:05 2003
@@ -225,6 +225,9 @@
 	    else if (stristr (s, "Unreal 3.2"))
 		ircdtype = UNREAL3_2;
 
+            else if (stristr (s, "Hybrid"))
+                ircdtype = HYBRID;
+
 	    else
 		fatal (0, "Config: IRCdType is not set properly: Invalid value.");
 
diff -uNrd operstats-1.2.0/src/function.c operstats-1.2.0+malkier/src/function.c
--- operstats-1.2.0/src/function.c	Sat Apr  5 08:35:53 2003
+++ operstats-1.2.0+malkier/src/function.c	Sun Dec 14 16:06:05 2003
@@ -237,7 +237,7 @@
     va_start (args, fmt);
     vsnprintf (buf, sizeof (buf), fmt, args);
 
-    send_cmd (sender ? sender : me.name, "%s :%s", me.token ? "]" : "GLOBOPS", buf);
+    send_cmd (sender ? sender : me.name, "%s :%s", me.token ? "]" : "OPERWALL", buf);
 }
 
 /* PRIVMSG our snooping channel */
@@ -305,7 +305,7 @@
     /* If a destination for the notice was specifically given, notice that. */
     if (dest)
     {
-	send_cmd (s_GlobalNoticer, "%s $*.%s :%s", me.token ? "B" : "NOTICE", dest, buf);
+	send_cmd (s_GlobalNoticer, "%s $$*.%s :%s", me.token ? "B" : "NOTICE", dest, buf);
 	return;
     }
 
@@ -315,7 +315,7 @@
     else
     {
 	/* Notice the first TLD */
-	send_cmd (s_GlobalNoticer, "%s $*.%s :%s", me.token ? "B" : "NOTICE",
+	send_cmd (s_GlobalNoticer, "%s $$*.%s :%s", me.token ? "B" : "NOTICE",
 	    tmp, buf);
         
 	/* Now run through the list and notice the remaining tlds.
@@ -326,7 +326,7 @@
 	    tmp = strtok (NULL, " ");
 
 	    if (tmp)
-		send_cmd (s_GlobalNoticer, "%s $*.%s :%s", me.token ? "B" :
+		send_cmd (s_GlobalNoticer, "%s $$*.%s :%s", me.token ? "B" :
 		    "NOTICE", tmp, buf);
 	    else
 		break;
@@ -1769,6 +1769,9 @@
 	if (ircdtype == BAHAMUT || ircdtype == PROMETHEUS)
 	    send_cmd (s_OperServ, "SJOIN %ld %ld %s + :%s", time (NULL), time (NULL),
 		joinchan, s_OperServ);
+        else if (ircdtype == HYBRID)
+            send_cmd (me.name, "SJOIN %ld %s + :@%s", time (NULL), joinchan,
+                s_OperServ);
 	else
 	    send_cmd (s_OperServ, "%s %s", me.token ? "C" : "JOIN", joinchan);
     }
@@ -1778,6 +1781,9 @@
 	if (ircdtype == BAHAMUT || ircdtype == PROMETHEUS)
 	    send_cmd (s_StatServ, "SJOIN %ld %ld %s + :%s", time (NULL), time (NULL),
 		joinchan, s_StatServ);
+        else if (ircdtype == HYBRID)
+            send_cmd (me.name, "SJOIN %ld %s + :@%s", time (NULL), joinchan,    
+                s_StatServ);
 	else
 	    send_cmd (s_StatServ, "%s %s", me.token ? "C" : "JOIN", joinchan);
     }
@@ -1787,6 +1793,9 @@
 	if (ircdtype == BAHAMUT || ircdtype == PROMETHEUS)
 	    send_cmd (s_GlobalNoticer, "SJOIN %ld %ld %s + :%s", time (NULL), time (NULL),
 		joinchan, s_GlobalNoticer);
+        else if (ircdtype == HYBRID)
+            send_cmd (me.name, "SJOIN %ld %s + :@%s", time (NULL), joinchan,    
+                s_GlobalNoticer);
 	else
 	    send_cmd (s_GlobalNoticer, "%s %s", me.token ? "C" : "JOIN", joinchan);
     }
diff -uNrd operstats-1.2.0/src/main.c operstats-1.2.0+malkier/src/main.c
--- operstats-1.2.0/src/main.c	Sun Jan 26 00:33:32 2003
+++ operstats-1.2.0+malkier/src/main.c	Sun Dec 14 16:06:05 2003
@@ -320,11 +320,14 @@
     if (ircdtype == DREAMFORGE)
 	send_cmd (NULL, "PROTOCTL TOKEN NOQUIT");
 
-    if (ircdtype == BAHAMUT || ircdtype == PROMETHEUS)
-	send_cmd (NULL, "PASS %s :TS", me.pass);
+    if (ircdtype == BAHAMUT || ircdtype == PROMETHEUS || ircdtype == HYBRID)
+	send_cmd (NULL, "PASS %s TS", me.pass);
     else
 	send_cmd (NULL, "PASS :%s", me.pass);
 
+    if (ircdtype == HYBRID)
+        send_cmd (NULL, "CAPAB QS KLN UNKLN");
+
     if (ircdtype == UNREAL3 || ircdtype == UNREAL3_2)
 	send_cmd (NULL, "SERVER %s 1 :U0-*-%d %s", me.name, unreal_numeric, me.desc);
     else
@@ -336,6 +339,9 @@
 	send_cmd (NULL, "CAPAB TS3 NOQUIT");
     }
 
+    if (ircdtype == HYBRID)
+        send_cmd (NULL, "SVINFO 5 3 0 :%lu", time (NULL));
+
     /* Now bring on our clients.. */
     if (operserv_on == TRUE)
     {
@@ -374,7 +380,8 @@
     if (ircdtype == BAHAMUT)
 	bursting = 2;
 
-    if (ircdtype == PROMETHEUS || ircdtype == UNREAL3 || ircdtype == UNREAL3_2)
+    if (ircdtype == PROMETHEUS || ircdtype == UNREAL3 ||
+        ircdtype == UNREAL3_2 || ircdtype == HYBRID)
 	bursting = 1;
 
     runflags &= ~RUN_STARTING;
@@ -436,6 +443,10 @@
 	send_cmd (NULL, "NICK %s 1 %lu %s %s %s %s 0 :%s", nick, time (NULL), modes,
 	    user, host, me.name, real);
 
+    if (ircdtype == HYBRID)
+        send_cmd (NULL, "NICK %s 1 %lu %s %s %s %s :%s", nick, time (NULL),
+            modes, user, host, me.name, real);
+
     if (ircdtype == DREAMFORGE)
     {
 	send_cmd (NULL, "%s %s 1 %lu %s %s %s 1 :%s", me.token ? "&" : "NICK",
@@ -492,7 +503,10 @@
     }	
 
     /* Change to the new nickname */
-    send_cmd (sp.nick, "%s %s", me.token ? "&" : "NICK", guest);
+    if (ircdtype == HYBRID)
+        send_cmd (sp.nick, "NICK %s :%ld", guest, time (NULL));
+    else
+        send_cmd (sp.nick, "%s %s", me.token ? "&" : "NICK", guest);
 
     /* Now replace the nick */
     strscpy (sp.nick, guest, sizeof (sp.nick));
diff -uNrd operstats-1.2.0/src/operserv.c operstats-1.2.0+malkier/src/operserv.c
--- operstats-1.2.0/src/operserv.c	Thu Jan 30 05:20:54 2003
+++ operstats-1.2.0+malkier/src/operserv.c	Sun Dec 14 16:06:05 2003
@@ -726,6 +726,9 @@
 		if (ircdtype == BAHAMUT || ircdtype == PROMETHEUS)
 		    send_cmd (me.name, "AKILL %s %s 0 %s %ld :%s", hostname,
 			username, s_OperServ, time (NULL), akill->reason);
+                else if (ircdtype == HYBRID)
+                    send_cmd (s_OperServ, "KLINE * %d %s %s :%s",
+                        akill->expires, username, hostname, akill->reason);
 		else
 		    send_cmd (me.name, "%s %s %s :%s", me.token ? "V" : "AKILL",
 			hostname, username, akill->reason);
@@ -742,6 +745,9 @@
 			if (ircdtype == BAHAMUT || ircdtype == PROMETHEUS)
 			    send_cmd (me.name, "AKILL %s * 0 %s %ld :%s", u->host,
 				s_OperServ, time (NULL), akill->reason);
+                        else if (ircdtype == HYBRID)  
+                            send_cmd (s_OperServ, "KLINE * %d * %s :%s",
+                                akill->expires, u->host, akill->reason);
 			else
 			    send_cmd (me.name, "%s %s * :%s", me.token ? "V" :
 				"AKILL", u->host, akill->reason);
@@ -785,8 +791,12 @@
 		{
 		    *hostname++ = 0;
 
-		    send_cmd (me.name, "%s %s %s", me.token ? "Y" : "RAKILL",
-			hostname, username);
+                    if (ircdtype == HYBRID)
+                        send_cmd (s_OperServ, "UNKLINE * %s %s", username,
+                            hostname);
+                    else
+		        send_cmd (me.name, "%s %s %s", me.token ? "Y" : "RAKILL",
+			    hostname, username);
 		}
 
 		/* Send it out to Services */
@@ -831,8 +841,12 @@
 		    {
 			*hostname++ = 0;
 
-			send_cmd (me.name, "%s %s %s", me.token ? "Y" :
-			    "RAKILL", hostname, username);
+                        if (ircdtype == HYBRID)
+                            send_cmd (s_OperServ, "UNKLINE * %s %s", username,
+                                hostname);
+                        else
+                            send_cmd (me.name, "%s %s %s", me.token ? "Y" :
+			        "RAKILL", hostname, username);
 		    }
 
 		    /* Send it out to Services */
@@ -949,8 +963,12 @@
 		{
 		    *host++ = 0;
 
-		    send_cmd (me.name, "%s %s %s", me.token ? "Y" :
-			"RAKILL", host, user);
+                    if (ircdtype == HYBRID)
+                        send_cmd (s_OperServ, "UNKLINE * %s %s", user,
+                            host);
+                    else
+		        send_cmd (me.name, "%s %s %s", me.token ? "Y" :
+			    "RAKILL", host, user);
 		}
 
 		/* Send it out to Services */
@@ -1007,6 +1025,9 @@
 	    if (ircdtype == BAHAMUT || ircdtype == PROMETHEUS)
 		send_cmd (me.name, "AKILL %s * 0 %s %ld :%s", host,
 		    s_OperServ, time (NULL), akills[i].reason);
+            else if (ircdtype == HYBRID)  
+                send_cmd (s_OperServ, "KLINE * %d * %s :%s",
+                    akills[i].expires, host, akills[i].reason);
 	    else
 		send_cmd (me.name, "%s %s * :%s", me.token ? "V" : "AKILL",
 		    host, akills[i].reason);
diff -uNrd operstats-1.2.0/src/process.c operstats-1.2.0+malkier/src/process.c
--- operstats-1.2.0/src/process.c	Sat Apr  5 08:35:53 2003
+++ operstats-1.2.0+malkier/src/process.c	Sun Dec 14 16:20:27 2003
@@ -853,7 +853,8 @@
     /* Bahamut, Prometheus and Unreal 3.2 only send SQUITs for the splitting server,
        not servers linked to it. So we have to free those servers and their users here.
      */
-    if (ircdtype == BAHAMUT || ircdtype == PROMETHEUS || ircdtype == UNREAL3_2)
+    if (ircdtype == BAHAMUT || ircdtype == PROMETHEUS ||
+        ircdtype == UNREAL3_2 || ircdtype == HYBRID)
     {
 	for (s = firstserv (); s; s = nextserv ())
 	{
@@ -1475,7 +1476,12 @@
     }
 
     /* Run it through flood checks */
-    if (floodmsgs)
+    /* We don't care about SRA's flooding, chances are they're
+     * trying to remove a metric assload of bots/clones/etc.
+     *
+     *    -- rakaur
+     */
+    if ( (floodmsgs) && (!is_sra (u)) )
     {
 	time_t now = time (NULL);
 
@@ -1616,6 +1622,9 @@
 		if (ircdtype == BAHAMUT || ircdtype == PROMETHEUS)
 		    send_cmd (me.name, "AKILL %s %s 0 %s %ld :%s", hostname,
 			username, s_OperServ, time (NULL), akill->reason);
+                else if (ircdtype == HYBRID)  
+                    send_cmd (s_OperServ, "KLINE * %d %s %s :%s",
+                        akill->expires, username, hostname, akill->reason);
 		else
 		    send_cmd (me.name, "%s %s %s :%s", me.token ? "V" : "AKILL",
 			hostname, username, akill->reason);
diff -uNrd operstats-1.2.0/src/server.c operstats-1.2.0+malkier/src/server.c
--- operstats-1.2.0/src/server.c	Fri Jan 31 06:25:02 2003
+++ operstats-1.2.0+malkier/src/server.c	Sun Dec 14 16:06:05 2003
@@ -266,6 +266,9 @@
 		if (ircdtype == BAHAMUT || ircdtype == PROMETHEUS)
 		    send_cmd (me.name, "AKILL %s * 0 %s %ld :%s", u->host,
 			s_OperServ, time (NULL), akill->reason);
+                else if (ircdtype == HYBRID)  
+                    send_cmd (s_OperServ, "KLINE * %d * %s :%s",
+                        akill->expires, u->host, akill->reason);
 		else
 		    send_cmd (me.name, "%s %s * :%s", me.token ? "V" : "AKILL",
 			u->host, akill->reason);
@@ -419,6 +422,11 @@
 	    if (check_akill (av[0], av[4], av[5], av[8]))
 		return;
 	}
+        if (ircdtype == HYBRID)
+        {
+            if (check_akill (av[0], av[4], av[5], av[7]))
+                return;
+        }
 	else
 	{
 	    if (check_akill (av[0], av[3], av[4], av[7]))
@@ -438,6 +446,16 @@
 	    av[1] = av[3];
 	    do_umode (av[0], 2, av);
 	}
+        if (ircdtype == HYBRID)
+        {
+            user->user = sstrdup (av[4]);
+            user->host = sstrdup (av[5]);
+            user->server = sstrdup (av[6]);
+            user->real = sstrdup (av[7]);
+
+            av[1] = av[3];
+            do_umode (av[0], 2, av);
+        }
 	else if (ircdtype == UNREAL3 || ircdtype == UNREAL3_2)
 	{
 	    user->user = sstrdup (av[3]);
@@ -987,6 +1005,9 @@
 	    if (ircdtype == BAHAMUT || ircdtype == PROMETHEUS)
 		send_cmd (av[1], "SJOIN %ld %ld %s + :%s", time (NULL), time (NULL),
 		    joinchan, av[1]);
+            else if (ircdtype == HYBRID)
+                send_cmd (me.name, "SJOIN %ld %s + :@%s", time (NULL),
+                    joinchan, av[1]);
 	    else
 		send_cmd (av[1], "%s %s", me.token ? "C" : "JOIN", joinchan);
 
diff -uNrd operstats-1.2.0/src/socket.c operstats-1.2.0+malkier/src/socket.c
--- operstats-1.2.0/src/socket.c	Sun Jan 26 00:33:06 2003
+++ operstats-1.2.0+malkier/src/socket.c	Sun Dec 14 16:06:05 2003
@@ -172,8 +172,6 @@
     va_start (args, fmt);
     vsnprintf (buf, BUFSIZE, fmt, args);
 
-    sstrlcat (buf, "\n", BUFSIZE);
-
     if ((write (servsock, buf, strlen (buf))) == -1)
     {
 	log (RPL_WRITE_ERROR);
diff -uNrd operstats-1.2.0/src/version.sh operstats-1.2.0+malkier/src/version.sh
--- operstats-1.2.0/src/version.sh	Sun Jan 26 00:33:14 2003
+++ operstats-1.2.0+malkier/src/version.sh	Sun Dec 14 16:11:03 2003
@@ -35,6 +35,8 @@
 #ifdef WIN32
     "Ported to Win32 by Matthew Millman <matthew.m@ihug.co.nz>",
 #endif
+    "+malkier by Eric Will <rakaur@malkier.net>",
+    "+malkier patch contains +hybrid patch by W. Campbell <wcampbel@botbay.net",
     " ",
     "All rights reserved.",
     " ",
@@ -66,7 +68,7 @@
     "The following people have donated money or hardware to the developer:",
     " ",
     "madragoran         Mike Campbell      madragoran@avendesora.net",
-    "Lan                Eric Will          daishan@malkier.net",
+    "rakaur             Eric Will          rakaur@malkier.net",
     " ",
     0,
 };
