*** Unreal-unchanged/include/modules.h	2009-04-13 13:03:57.000000000 +0200
--- Unreal3.2/include/modules.h	2009-08-10 16:00:20.000000000 +0200
***************
*** 653,658 ****
--- 653,659 ----
  #define HOOKTYPE_POST_SERVER_CONNECT 48
  #define HOOKTYPE_RAWPACKET_IN 49
  #define HOOKTYPE_LOCAL_NICKPASS 50
+ #define HOOKTYPE_PACKET 51
  
  /* Hook return values */
  #define HOOK_CONTINUE 0
*** Unreal-unchanged/src/send.c	2006-06-16 20:29:16.000000000 +0200
--- Unreal3.2/src/send.c	2009-08-13 19:55:05.000000000 +0200
***************
*** 259,264 ****
--- 259,265 ----
  void sendbufto_one(aClient *to, char *msg, unsigned int quick)
  {
  	int  len;
+ 	Hook *h;
  	
  	Debug((DEBUG_ERROR, "Sending [%s] to %s", msg, to->name));
  
***************
*** 310,315 ****
--- 311,320 ----
  		sendto_ops("%s", tmp_msg); /* recursion? */
  		return;
  	}
+         for(h = Hooks[HOOKTYPE_PACKET]; h; h = h->next) {
+ 		(*(h->func.intfunc))(&me, to, &msg, &len);
+ 		if(!msg) return;
+ 	}
  	if (DBufLength(&to->sendQ) > get_sendq(to))
  	{
  		if (IsServer(to))
*** Unreal-unchanged/src/parse.c	2009-03-01 19:37:58.000000000 +0100
--- Unreal3.2/src/parse.c	2009-08-13 19:49:31.000000000 +0200
***************
*** 179,184 ****
--- 179,186 ----
   */
  int  parse(aClient *cptr, char *buffer, char *bufend)
  {
+ 	Hook *h;
+ 	int buf_len = 0;
  	aClient *from = cptr;
  	char *ch, *s;
  	int  len, i, numeric = 0, paramcount, noprefix = 0;
***************
*** 188,193 ****
--- 190,202 ----
  #endif
  	aCommand *cmptr = NULL;
  
+ 	for(h = Hooks[HOOKTYPE_PACKET]; h; h = h->next) {
+ 		buf_len = (int)(bufend - buffer);
+ 		(*(h->func.intfunc))(from, &me, &buffer, &buf_len);
+ 		if(!buffer) return 0;
+ 		bufend = buffer + buf_len;
+ 	}
+ 
  	Debug((DEBUG_ERROR, "Parsing: %s (from %s)", buffer,
  	    (*cptr->name ? cptr->name : "*")));
  	if (IsDead(cptr))
