--- src/antiLeech.h	1970-01-01 08:00:00.000000000 +0800
+++ src/antiLeech.h	2009-10-16 18:24:58.000000000 +0800
@@ -0,0 +1,117 @@
+#define DLPVERSION 39
+
+
+#pragma once
+
+class CantiLeech 
+{
+public:
+	//BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD,LPVOID);
+	DWORD	__declspec(dllexport) GetDLPVersion(){return DLPVERSION;}
+	//old versions to keep compatible
+	/* //drop old version support
+	LPCTSTR __declspec(dllexport) DLPCheckModstring(LPCTSTR modversion, LPCTSTR clientversion);
+	LPCTSTR __declspec(dllexport) DLPCheckUsername(LPCTSTR username);
+	LPCTSTR __declspec(dllexport) DLPCheckNameAndHash(CString username, CString& userhash);
+	*/
+	//new versions
+	LPCTSTR __declspec(dllexport) DLPCheckModstring_Hard(LPCTSTR modversion, LPCTSTR clientversion);
+	LPCTSTR __declspec(dllexport) DLPCheckModstring_Soft(LPCTSTR modversion, LPCTSTR clientversion);
+	LPCTSTR __declspec(dllexport) DLPCheckUsername_Hard(LPCTSTR username);
+	LPCTSTR __declspec(dllexport) DLPCheckUsername_Soft(LPCTSTR username);
+	LPCTSTR __declspec(dllexport) DLPCheckNameAndHashAndMod(CString username, CString& userhash, CString& modversion);
+	LPCTSTR __declspec(dllexport) DLPCheckMessageSpam(LPCTSTR messagetext);
+
+
+	LPCTSTR __declspec(dllexport) DLPCheckUserhash(const PBYTE userhash);
+
+
+	LPCTSTR __declspec(dllexport) DLPCheckHelloTag(UINT tagnumber);
+	LPCTSTR __declspec(dllexport) DLPCheckInfoTag(UINT tagnumber);
+
+	void __declspec(dllexport)  TestFunc();
+
+
+private:
+	const bool IsTypicalHex (CString& addon) const;
+};
+
+//<<< new tags from eMule 0.04x
+#define CT_UNKNOWNx0			0x00 // Hybrid Horde protocol
+#define CT_UNKNOWNx12			0x12 // http://www.haspepapa-welt.de (DodgeBoards)
+#define CT_UNKNOWNx13			0x13 // http://www.haspepapa-welt.de (DodgeBoards)
+#define CT_UNKNOWNx14			0x14 // http://www.haspepapa-welt.de (DodgeBoards)
+#define CT_UNKNOWNx15			0x15 // http://www.haspepapa-welt.de (DodgeBoards) & DarkMule |eVorte|X|
+#define CT_UNKNOWNx16			0x16 // http://www.haspepapa-welt.de (DodgeBoards)
+#define CT_UNKNOWNx17			0x17 // http://www.haspepapa-welt.de (DodgeBoards)
+#define CT_UNKNOWNx4D			0x4D // pimp my mule (00de)
+#define CT_UNKNOWNxE6			0xE6 // http://www.haspepapa-welt.de
+#define CT_UNKNOWNx22			0x22 // DarkMule |eVorte|X|
+#define CT_UNKNOWNx5D			0x5D // md4 
+#define CT_UNKNOWNx63			0x63 // ?
+#define CT_UNKNOWNx64			0x64 // ?
+#define CT_UNKNOWNx69			0x69 // eMuleReactor //Xman don't use this, it's webcache!
+#define CT_UNKNOWNx6B			0x6B // md4
+#define CT_UNKNOWNx6C			0x6C // md4
+#define CT_UNKNOWNx74			0x74 // md4
+#define CT_UNKNOWNx76			0x76 // www.donkey2002.to
+#define CT_UNKNOWNx79			0x79 // Bionic
+#define CT_UNKNOWNx7A			0x7A // NewDarkMule
+#define CT_UNKNOWNx83			0x83 // Fusspi
+#define CT_UNKNOWNx87			0x87 // md4
+#define CT_UNKNOWNx88			0x88 // DarkMule v6 |eVorte|X|
+#define CT_UNKNOWNx8c			0x8c // eMule v0.27c [LSD7c] 
+#define CT_UNKNOWNx8d			0x8d // unknown Leecher - (client version:60)
+#define CT_UNKNOWNx94			0x94 // 00.de community  //Xman 20.08.05
+#define CT_UNKNOWNx97			0x97 // Emulereactor Community Mod
+#define CT_UNKNOWNx98			0x98 // Emulereactor Community Mod
+#define CT_UNKNOWNx99			0x99 // eMule v0.26d [RAMMSTEIN 8b]
+#define CT_UNKNOWNx9C			0x9C // Emulereactor Community Mod
+#define CT_UNKNOWNxbb			0xbb // emule.de (client version:60)
+#define CT_UNKNOWNxc4			0xc4 //MD5 Community from new bionic - hello
+#define CT_UNKNOWNxC8			0xc8 // MD5 Community from new bionic - hello //Xman x4
+#define CT_UNKNOWNxCA			0xCA // NewDarkMule
+#define CT_UNKNOWNxCD			0xCD // www.donkey2002.to
+#define CT_UNKNOWNxCE			0xCE // FRZ community  //Xman 20.08.05
+#define CT_UNKNOWNxCF			0xCF // FRZ community  //Xman 20.08.05
+#define CT_UNKNOWNxDA			0xDA // Emulereactor Community Mod
+#define CT_UNKNOWNxEC			0xec // SpeedMule and clones	//Xman x4
+#define CT_UNKNOWNxF0			0xF0 // Emulereactor Community Mod
+#define CT_UNKNOWNxF4			0xF4 // Emulereactor Community Mod
+#define CT_UNKNOWNxD2			0xD2 // Chinese Leecher //SquallATF
+//#define CT_UNKNOWNx85			0x85 // viper-israel.org and eChanblardNext  //zz_fly, viper become good
+
+#define CT_FRIENDSHARING		0x66 //eWombat  [SNAFU]
+#define CT_DARK					0x54 //eWombat [SNAFU]
+#define FRIENDSHARING_ID 0x5F73F1A0 // Magic Key, DO NOT CHANGE!
+
+// unknown eMule tags
+#define ET_MOD_UNKNOWNx12		0x12 // http://www.haspepapa-welt.de
+#define ET_MOD_UNKNOWNx13		0x13 // http://www.haspepapa-welt.de
+#define ET_MOD_UNKNOWNx14		0x14 // http://www.haspepapa-welt.de
+#define ET_MOD_UNKNOWNx17		0x17 // http://www.haspepapa-welt.de
+#define ET_MOD_UNKNOWNx2F		0x2F // eMule v0.30 [OMEGA v.07 Heiko]
+#define ET_MOD_UNKNOWNx30		0x30 // aMule 1.2.0
+#define ET_MOD_UNKNOWNx36		0x36 // eMule v0.26
+#define ET_MOD_UNKNOWNx3C		0x3C // enkeyDev.6 / LamerzChoice 9.9a
+#define ET_MOD_UNKNOWNx41		0x41 // CrewMod (pre-release mod based on Plus) identification
+#define ET_MOD_UNKNOWNx42		0x42 // CrewMod (pre-release mod based on Plus) key verification
+#define ET_MOD_UNKNOWNx43		0x43 // CrewMod (pre-release mod based on Plus) version info
+#define ET_MOD_UNKNOWNx50		0x50 // Bionic 0.20 Beta]
+#define ET_MOD_UNKNOWNx59		0x59 // emule 0.40 / eMule v0.30 [LSD.12e]
+#define ET_MOD_UNKNOWNx5B		0x5B // eMule v0.26
+#define ET_MOD_UNKNOWNx60		0x60 // eMule v0.30a Hunter.6 + eMule v0.26
+#define ET_MOD_UNKNOWNx64		0x64 // LSD.9dT / Athlazan(0.29c)Alpha.3
+#define ET_MOD_UNKNOWNx76		0x76 // http://www.haspepapa-welt.de (DodgeBoards)
+#define ET_MOD_UNKNOWNx84		0x84 // eChanblardv3.2
+#define ET_MOD_UNKNOWNx85		0x85 // ? 
+#define ET_MOD_UNKNOWNx86		0x86 // ? 
+#define ET_MOD_UNKNOWNx93		0x93 // ?
+#define ET_MOD_UNKNOWNxA6		0xA6 // eMule v0.26
+#define ET_MOD_UNKNOWNxB1		0xB1 // Bionic 0.20 Beta]
+#define ET_MOD_UNKNOWNxB4		0xB4 // Bionic 0.20 Beta]
+#define ET_MOD_UNKNOWNxC8		0xC8 // Bionic 0.20 Beta]
+#define ET_MOD_UNKNOWNxC9		0xC9 // Bionic 0.20 Beta]
+#define ET_MOD_UNKNOWNxDA		0xDA // Rumata (rus)(Plus v1f) - leecher mod?
+//>>> eWombat [SNAFU_V3]
+
--- src/antiLeech_unix.h	1970-01-01 08:00:00.000000000 +0800
+++ src/antiLeech_unix.h	2009-10-18 14:26:08.000000000 +0800
@@ -0,0 +1,134 @@
+
+#include <string.h>
+#include <iostream>
+
+#define LPCTSTR const char*
+#define BOOL int
+#define _DLPT(var)	(var)
+#define DWORD int
+#define UINT unsigned int
+#define WINAPI
+#define HINSTANCE
+#define LPVOID void*
+#define PBYTE char*
+#define dlpwchar_t char
+#define DLPTCHAR char
+#define _TINT int
+
+#include <stdlib.h>
+
+#define __declspec(var)
+
+void tolowers(char* str){
+	int i = 0;
+	while (str[i] != 0){
+		str[i] = tolower(str[i]);
+		i++;
+	}
+}
+
+const char* _tcsstr(const char* a, const char* b){
+	return strstr(a, b);
+}
+size_t _tcslen(const char* str){
+	return strlen(str);
+}
+const char* StrStr(const char* a, const char* b){
+	return strstr(a, b);
+}
+
+const char* StrStrI(const char* a, const char* b){
+	char aa[501] = {0};
+	char bb[501] = {0};
+	const char* ret;
+
+	strncpy(aa, a, 500);
+	strncpy(bb, b, 500);
+
+	tolowers(aa);
+	tolowers(bb);
+	ret = strstr(aa, bb);
+	
+	if (ret != NULL) {
+		ret = (const char*)(ret - aa + a);
+	}
+
+	return ret;	
+}
+
+int _tcsicmp(const char* a, const char* b){
+	char aa[501] = {0};
+	char bb[501] = {0};
+	int ret;
+	
+	strncpy(aa, a, 500); strncpy(bb, b, 500);
+	tolowers(aa); tolowers(bb);
+	
+	ret = strcmp(aa, bb);
+
+	return ret;
+}
+#define StrCmpI _tcsicmp
+
+int _istcntrl(char c){
+	return ((c >= 0x00 && c <= 0x1F) || c == 0x7F) ? 1 : 0;
+}
+int _istpunct(char c){
+	return ispunct(c);
+}
+int _istspace(char c){
+	return isspace(c);
+}
+int _istdigit(char c){
+	return isdigit(c);
+}
+int _istxdigit(char c){
+	return isxdigit(c);
+}
+double _tstof(const char* str){
+	return atof(str);
+}
+
+
+
+/*
+class CString{
+	private:
+		char* m_str;
+	public:
+		CString();
+		CString(const char*& str);
+		~CString();
+		int GetLength();
+		char GetAt(unsigned int index);
+		bool IsEmpty();
+		CString operator =(const char* str);
+};
+
+CString::CString(){
+	m_str = new char;
+	m_str[0] = 0;
+}
+CString::CString(const char*& st){
+	m_str = new char[strlen(st)];
+	strcpy(m_str, st);
+}
+CString::~CString(){
+	delete m_str;
+}
+char CString::GetAt(unsigned int index){
+	if (index >= strlen(m_str)) {
+		return 0;
+	}
+	else {
+		return m_str[index];
+	}
+}
+int CString::GetLength(){
+	return strlen(m_str);
+}
+bool CString::IsEmpty(){
+	return m_str[0] == 0 ? true : false;
+}*/
+
+#include "antiLeech_STL.h"
--- src/antiLeech.cpp	1970-01-01 08:00:00.000000000 +0800
+++ src/antiLeech.cpp	2009-10-20 10:24:33.000000000 +0800
@@ -0,0 +1,1326 @@
+//DLP = Dynamic Leecher Protection
+//this code is part of Xtreme-Mod
+//author: Xman
+
+//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., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+#include "antiLeech_unix.h"
+
+#include "antiLeech.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+//>>> eWombat [SNAFU_V3]
+LPCTSTR apszSnafuTag[]=
+{
+	_DLPT("[DodgeBoards]"),									//0
+		_DLPT("[DodgeBoards & DarkMule eVorteX]"),					//1
+		_DLPT("[DarkMule v6 eVorteX]"),							//2
+		_DLPT("[eMuleReactor]"),									//3
+		_DLPT("[Bionic]"),											//4
+		_DLPT("[LSD7c]"),											//5
+		_DLPT("[0x8d] unknown Leecher - (client version:60)"),		//6
+		_DLPT("[RAMMSTEIN]"),										//7
+		_DLPT("[MD5 Community]"),									//8
+		_DLPT("[new DarkMule]"),									//9
+		_DLPT("[OMEGA v.07 Heiko]"),								//10
+		_DLPT("[eMule v0.26 Leecher]"),							//11
+		_DLPT("[Hunter]"),											//12
+		_DLPT("[Bionic 0.20 Beta]"),								//13
+		_DLPT("[Rumata (rus)(Plus v1f)]"),							//14
+		_DLPT("[Fusspi]"),											//15
+		_DLPT("[donkey2002]"),										//16
+		_DLPT("[md4]"),									        //17
+		_DLPT("[SpeedMule]"),										//18 Xman 
+		_DLPT("[pimp]")											//19 Xman 
+		,_DLPT("[Chinese Leecher]")								//20 SquallATF
+		//,_DLPT("[eChanblardNext]")								//21 zz_fly
+};
+
+/*
+BOOL WINAPI  DllMain (
+					  HANDLE    hModule,
+					  DWORD     dwFunction,
+					  LPVOID    lpNot)
+{
+	switch (dwFunction)
+	{
+	case DLL_PROCESS_ATTACH:
+	case DLL_THREAD_ATTACH:
+	case DLL_THREAD_DETACH:
+	case DLL_PROCESS_DETACH:
+		break;
+	}
+
+	return TRUE;
+}
+
+
+void __declspec(dllexport)  TestFunc()
+{
+	::MessageBox(NULL,_DLPT("Inside the DLL!"),_DLPT("Nix"),0);
+}
+*/
+
+//old versions just to keep compatible
+/* //drop old version support
+LPCTSTR __declspec(dllexport) DLPCheckModstring(LPCTSTR modversion, LPCTSTR clientversion)
+{
+	if(modversion==NULL || clientversion==NULL)
+		return NULL;
+
+	if (StrStrI(modversion,_DLPT("Freeza"))||
+		StrStrI(modversion,_DLPT("d-unit"))||
+		//StrStrI(modversion,_DLPT("NOS"))|| //removed for the moment
+		StrStrI(modversion,_DLPT("imperator"))||
+		StrStrI(modversion,_DLPT("SpeedLoad"))||
+		StrStrI(modversion,_DLPT("gt mod"))||
+		StrStrI(modversion,_DLPT("egomule"))||
+		StrStrI(modversion,_DLPT("aldo"))|| 
+		StrStrI(modversion,_DLPT("darkmule"))||
+		StrStrI(modversion,_DLPT("LegoLas"))||
+		StrStrI(modversion,_DLPT("dodgethis"))|| //Updated
+		StrStrI(modversion,_DLPT("DM-"))|| 
+		StrStrI(modversion,_DLPT("|X|"))||
+		StrStrI(modversion,_DLPT("eVorte"))||
+		StrStrI(modversion,_DLPT("Mison"))||
+		StrStrI(modversion,_DLPT("father"))||
+		StrStrI(modversion,_DLPT("Dragon"))||
+		StrStrI(modversion,_DLPT("booster"))|| //Temporaly added, must check the tag
+		StrStrI(modversion,_DLPT("$motty"))||
+		StrStrI(modversion,_DLPT("Thunder"))||
+		StrStrI(modversion,_DLPT("BuzzFuzz"))||
+		StrStrI(modversion,_DLPT("Speed-Unit"))|| 
+		StrStrI(modversion,_DLPT("Killians"))||
+		StrStrI(modversion,_DLPT("Element"))|| 
+		StrStrI(modversion,_DLPT("]"))||
+		StrStrI(modversion,_DLPT("Rappi"))||
+		StrStrI(modversion,_DLPT("EastShare")) && StrStrI(clientversion,_DLPT("0.29"))||
+		StrStrI(modversion,_DLPT("eChanblard v7.0")) ||
+		//StrStrI(modversion,_DLPT("ACAT")) ||
+		StrStrI(modversion,_DLPT("!FREEANGEL!")) ||
+		StrStrI(modversion,_DLPT("          ")) ||
+		StrStrI(modversion,_DLPT("Stonehenge")) ||
+		StrStrI(modversion,_DLPT("@RAPTOR")) ||
+		StrStrI(modversion,_DLPT("pwNd muLe")) ||
+		StrStrI(modversion,_DLPT("HARDPAW")) ||
+		StrStrI(modversion,_DLPT("XX")) ||
+		StrStrI(modversion,_DLPT("LSD")) ||			
+		StrStrI(modversion,_DLPT("Rockese")) || //WiZaRd
+		StrStrI(modversion,_DLPT("Bad Donkey")) || //WiZaRd
+		StrStrI(modversion,_DLPT("DSL-Light-Client")) || //WiZaRd
+		StrStrI(modversion,_DLPT("Elben")) || //WiZaRd
+		StrStrI(modversion,_DLPT("PROeMule")) || //WiZaRd
+		StrStrI(modversion,_DLPT("OO.de")) ||	//WiZaRd		
+		StrStrI(modversion,_DLPT("00.de")) || //WiZaRd
+		StrStrI(modversion,_DLPT("OOde")) || //WiZaRd
+		StrStrI(modversion,_DLPT("00de")) ||
+		StrStrI(modversion,_DLPT("Devi")) ||
+		StrStrI(modversion,_DLPT("Elfen")) ||
+		StrStrI(modversion,_DLPT("Ef-mod ")) || //Xman this mod can be abused as a full leecher
+		StrStrI(modversion,_DLPT("HARDMULE")) ||
+		StrStrI(modversion,_DLPT("Xtreme Xtended")) || //Xman 15.08.05
+		StrStrI(modversion, _DLPT("MirageMod"))||		 // "
+		StrStrI(modversion, _DLPT("SpeedX"))||
+		StrStrI(modversion, _DLPT("AIDEADS"))||
+		StrStrI(modversion, _DLPT("Hypnotix"))||
+		StrStrI(modversion, _DLPT("blackviper"))||
+		StrStrI(modversion, _DLPT("BlackAnge"))||
+		StrStrI(modversion, _DLPT("Community"))|| 
+		StrStrI(modversion, _DLPT("rabbit"))|| 
+		StrStrI(modversion, _DLPT("rabb_it"))|| 
+		StrStrI(modversion, _DLPT("Speedmule"))|| 
+		StrStrI(modversion, _DLPT("Raptor"))|| 
+		StrStrI(modversion, _DLPT("Hawkstar"))|| 
+		StrStrI(modversion, _DLPT("ServerClient"))|| 
+		StrStrI(modversion, _DLPT("Love-Ange"))|| 
+		StrStrI(modversion, _DLPT("SuperKiller"))|| 
+		StrStrI(modversion, _DLPT("Ultimativ"))||
+		StrStrI(modversion, _DLPT("uptempo"))||
+		StrStrI(modversion, _DLPT("ZamBoR"))||
+		StrStrI(modversion, _DLPT("Arabella"))||
+		StrStrI(modversion,_DLPT("Morph")) && (StrStrI(modversion,_DLPT("Max")) || StrStrI(modversion,_DLPT("+")) || StrStrI(modversion,_DLPT(""))) ||
+		StrStrI(modversion, _DLPT("Morph XT"))||	//very bad mod (MPAA ?)
+		StrStrI(modversion, _DLPT("BlueHex"))||
+		StrStrI(modversion, _DLPT("FlowerPower"))||
+		StrStrI(modversion, _DLPT("Fincan"))||
+		StrStrI(modversion, _DLPT("Heartbreaker"))||
+		StrStrI(modversion, _DLPT("Administrator"))||
+		StrStrI(modversion, _DLPT("B@d-D3vi7"))||
+		StrStrI(modversion, _DLPT("CryptedSpeed"))||
+		StrStrI(modversion, _DLPT("DarkDragon"))||
+		StrStrI(modversion, _DLPT("OS_"))||	//Xman most are found via other checks, but not all
+		_tcslen(modversion) > 0 && (StrStrI(clientversion,_DLPT("edonkey")) || modversion[0]==_DLPT('['))   ||  //1. donkey user with modstring, 2. modstring begins with [ this is a known leecher
+		(StrStrI(modversion, _DLPT("Xtreme")) && StrStrI(modversion, _DLPT("]")))  //bad Xtreme mod
+		)
+			return _DLPT("Bad MODSTRING");
+
+	return NULL;
+}
+
+LPCTSTR __declspec(dllexport) DLPCheckUsername(LPCTSTR username)
+{
+	if(username==NULL)
+		return NULL;
+
+	if (StrStrI(username,_DLPT("$GAM3R$"))||
+		StrStrI(username,_DLPT("G@m3r"))||
+		StrStrI(username,_DLPT("$WAREZ$"))||
+		//StrStrI(username,_DLPT("RAMMSTEIN"))||//	//Xman 21.06.05 SNAFU should filter the right ones out
+		//StrStr(username,_DLPT("toXic"))||	//Xman 19.10.05 too old
+		StrStrI(username,_DLPT("Leecha"))||
+		StrStr(username,_DLPT("eDevi"))|| 
+		StrStrI(username,_DLPT("darkmule"))||
+		//StrStrI(username,_DLPT("phArAo"))||	//Xman 19.10.05 too old
+		//StrStrI(username,_DLPT("dodgethis"))|| //Xman 21.06.05 not seen for a long time
+		StrStrI(username,_DLPT("Reverse"))||
+		//StrStrI(username,_DLPT("eVortex"))|| //Xman didn't see it for a long time
+		//StrStrI(username,_DLPT("|eVorte|X|"))||	//"
+		//StrStrI(username,_DLPT("Chief"))|| //Xman 17.5.08 old and no more needed
+		StrStrI(username,_DLPT("$motty"))||
+		StrStrI(username,_DLPT("emule-speed"))||
+		StrStrI(username,_DLPT("celinesexy"))||
+		StrStrI(username,_DLPT("Gate-eMule"))||
+		StrStrI(username,_DLPT("energyfaker"))||
+		StrStrI(username,_DLPT("BuzzFuzz"))||
+		StrStrI(username,_DLPT("Speed-Unit"))|| 
+		StrStrI(username,_DLPT("Killians"))||
+		StrStrI(username,_DLPT("pubsman"))||
+		StrStrI(username,_DLPT("emule-element"))||
+		StrStrI(username,_DLPT("00de.de"))|| 
+		StrStrI(username,_DLPT("00de")) ||
+		StrStrI(username,_DLPT("OO.de"))|| 
+		StrStrI(username,_DLPT("OOde")) ||
+		StrStrI(username,_DLPT("emule")) && StrStrI(username,_DLPT("booster")) ||
+		StrStrI(username,_DLPT("Rappi")) ||
+		StrStrI(username,_DLPT("Ketamine")) ||
+		StrStrI(username,_DLPT("HARDMULE")) ||
+		StrStrI(username,_DLPT("emuleech")) ||
+		//Xman 15.08.05
+		StrStrI(username, _DLPT("SchlumpMule"))|| //"
+		StrStrI(username, _DLPT("Saftys"))||
+		StrStrI(username, _DLPT("UnKnOwN pOiSoN"))||
+		StrStrI(username, _DLPT("ElfenPower"))||
+		StrStrI(username, _DLPT("eMule Cow"))||
+		StrStrI(username, _DLPT("Freezamule"))||
+		StrStr(username, _DLPT("EGOmule"))||
+		StrStrI(username, _DLPT("-=EGOist=-"))||
+		StrStrI(username, _DLPT("FreezaVamp"))||
+		StrStrI(username, _DLPT("Muli_Checka"))||
+		StrStr(username, _DLPT("PrOjEcT-SaNdStOrM"))||
+		StrStr(username, _DLPT("NotHer eDitiOn"))||
+		StrStrI(username, _DLPT("eSl@d3vi"))||
+		StrStrI(username, _DLPT(" AgentSmith"))||
+		StrStrI(username, _DLPT("rabb_it"))||
+		StrStrI(username, _DLPT("ServerClient"))||
+		StrStrI(username, _DLPT(">>Power-Mod"))||
+		StrStr(username, _DLPT("DM_X"))|| //darkmule
+		StrCmpI(username, _DLPT("Muse"))==0 || //ketamine mod
+		StrStr(username, _DLPT("ZamBoR"))||
+		StrStr(username, _DLPT("emule.razorback3.com"))||
+
+		StrStrI(username,_DLPT("[LSD.19"))	//Xman 21.06.2005 definitive not a good mod, with protocol bugs
+		)
+		return _DLPT("Bad USERNAME");
+
+	//bad mods, where every second sign is
+	//enough to check two places
+
+	if(_tcslen(username) >=4 
+		&&	username[3]<=0x1F
+		&& username[1]<=0x1F
+		)
+		return _DLPT("Leecher-Username");
+
+	return NULL;
+}
+
+LPCTSTR __declspec(dllexport) DLPCheckNameAndHash(CString username, CString& userhash)
+{
+	if(username.IsEmpty() || userhash.IsEmpty())
+		return NULL;
+
+	//community check
+	if(username.GetLength()>=7 && username.Right(1)==_DLPT("]"))
+	{
+		//check for gamer
+		//two checks should be enough.
+		if(username.Right(6).Left(1)==userhash.Mid(5,1)
+			&& username.Right(3).Left(1)==userhash.Mid(7,1)
+			)
+			return _DLPT("Gamers");
+		//check for snake
+		int find=username.ReverseFind(_DLPT('['));
+		if(find>=0)
+		{
+			CString addon=username.Mid(find+1);
+			int endpos=addon.GetLength()-1;
+			for(int i=0; i<endpos;i++)
+			{
+				if( !(addon.GetAt(i)>=_DLPT('0') && addon.GetAt(i)<=_DLPT('9')) )
+				{
+					i=endpos+1;
+				}
+			}
+			if(i==endpos)
+				return _DLPT("Snake");
+		}
+	}
+
+	return NULL;
+}
+*/
+//end old version ------------------------------------------
+
+bool IsTypicalHex(CString addon)
+{
+	if(addon.GetLength()>25 || addon.GetLength()<5)
+		return false;
+	short bigalpha=0;
+	short smallalpha=0;
+	short numeric=0;
+	
+	int endpos=addon.GetLength();
+	
+	int i;
+	for(i=0; i<endpos;i++)
+	{
+		if( (addon.GetAt(i)>=_DLPT('0') && addon.GetAt(i)<=_DLPT('9')) )
+			numeric++;
+		else if( (addon.GetAt(i)>=_DLPT('A') && addon.GetAt(i)<=_DLPT('F')) )
+			bigalpha++;
+		else if( (addon.GetAt(i)>=_DLPT('a') && addon.GetAt(i)<=_DLPT('f')) )
+			smallalpha++;
+		else
+			break;
+	}
+	if(i==endpos)
+	{
+		if(numeric>0 &&
+			((smallalpha>0 && bigalpha==0) || (smallalpha==0 && bigalpha>0))
+			)
+			return true;
+	}
+	return false;
+}
+
+LPCTSTR __declspec(dllexport) DLPCheckUserhash(const PBYTE userhash)
+{
+	// No more AJ check
+	return NULL;
+}
+
+//new versions
+LPCTSTR __declspec(dllexport) DLPCheckModstring_Hard(LPCTSTR modversion, LPCTSTR clientversion)
+{
+	if(modversion==NULL || clientversion==NULL)
+		return NULL;
+
+	if(_tcsstr(clientversion, "eMule Compat v0.26.2"))
+		return "Flashget";
+
+	if (
+//Chinese Leecher - http://forum.emule-project.net/index.php?showtopic=134097&hl=
+		_tcsstr(modversion,"TM0910") ||
+//Chinese Leecher - http://forum.emule-project.net/index.php?showtopic=134097&hl=
+		//StrStrI(modversion,_DLPT("Freeza"))||
+		StrStrI(modversion,_DLPT("FXeMule"))||
+		StrStrI(modversion,_DLPT("FX eMule"))||
+		StrStrI(modversion,_DLPT("RIAA"))||
+		//StrStrI(modversion,_DLPT("d-unit"))||
+		//StrStrI(modversion,_DLPT("NOS"))|| //removed for the moment
+		//StrStrI(modversion,_DLPT("imperator"))||
+		StrStrI(modversion,_DLPT("SpeedLoad"))||
+		//StrStrI(modversion,_DLPT("gt mod"))|| //outdated
+		//StrStrI(modversion,_DLPT("egomule"))|| //outdated
+		//StrStrI(modversion,_DLPT("aldo"))|| //outdated
+		//StrStrI(modversion,_DLPT("darkmule"))|| //outdated
+		//StrStrI(modversion,_DLPT("LegoLas"))||
+		//StrStrI(modversion,_DLPT("dodgethis"))|| //Updated
+		//StrStrI(modversion,_DLPT("DM-"))|| 
+		//StrStrI(modversion,_DLPT("|X|"))||
+		//StrStrI(modversion,_DLPT("eVorte"))||
+		//StrStrI(modversion,_DLPT("Mison"))||
+		//StrStrI(modversion,_DLPT("father"))||
+		//StrStrI(modversion,_DLPT("Dragon"))||
+		//StrStrI(modversion,_DLPT("$motty"))||
+		//StrStrI(modversion,_DLPT("Thunder"))||
+		//StrStrI(modversion,_DLPT("BuzzFuzz"))||
+		//StrStrI(modversion,_DLPT("Speed-Unit"))|| 
+		//StrStrI(modversion,_DLPT("Killians"))||
+		StrStrI(modversion,_DLPT("Element"))|| 
+		//StrStrI(modversion,_DLPT("]"))|| //outdated
+		StrStrI(modversion,_DLPT("Rappi"))||
+		(StrStrI(modversion,_DLPT("EastShare")) && StrStrI(clientversion,_DLPT("0.29")))||
+		StrStrI(modversion,_DLPT("eChanblard v7.0")) ||
+		//StrStrI(modversion,_DLPT("ACAT")) ||
+		//StrStrI(modversion,_DLPT("!FREEANGEL!")) ||
+		StrStrI(modversion,_DLPT("          ")) ||
+		//StrStrI(modversion,_DLPT("Stonehenge")) ||
+		StrStrI(modversion,_DLPT("@RAPTOR")) ||
+		StrStr(modversion,_DLPT("pwNd muLe")) ||
+		StrStrI(modversion,_DLPT("HARDPAW")) ||
+		//StrStrI(modversion,_DLPT("XX")) ||
+		StrStrI(modversion,_DLPT("LSD")) ||			
+		StrStrI(modversion,_DLPT("Bad Donkey")) || //WiZaRd
+		StrStrI(modversion,_DLPT("DSL-Light-Client")) || //WiZaRd
+		StrStrI(modversion,_DLPT("Elben")) || //WiZaRd
+		StrStr(modversion,_DLPT("PROeMule")) || //WiZaRd
+		StrStrI(modversion,_DLPT("Devi")) ||
+		StrStrI(modversion,_DLPT("Elfen")) ||
+		StrStrI(modversion,_DLPT("Ef-mod 2.0 ")) || //Xman this mod can be abused as a full leecher
+		StrStrI(modversion,_DLPT("Xtreme Xtended")) || //Xman 15.08.05
+		StrStrI(modversion, _DLPT("MirageMod"))||		 // "
+		StrStrI(modversion, _DLPT("SpeedX"))||
+		StrStrI(modversion, _DLPT("AIDEADS"))||
+		StrStrI(modversion, _DLPT("Hypnotix"))||
+		StrStrI(modversion, _DLPT("BLACKMULE"))|| 
+		StrStrI(modversion, _DLPT("blackviper"))||
+		StrStrI(modversion, _DLPT("BlackAnge"))||
+		StrStrI(modversion, _DLPT("rabbit"))|| 
+		StrStrI(modversion, _DLPT("rabb_it"))|| 
+		StrStrI(modversion, _DLPT("Raptor"))|| 
+		StrStrI(modversion, _DLPT("Hawkstar"))|| 
+		StrStrI(modversion, _DLPT("ServerClient"))|| 
+		StrStrI(modversion, _DLPT("Love-Ange"))|| 
+		StrStrI(modversion, _DLPT("SuperKiller"))|| 
+		StrStrI(modversion, _DLPT("ZamBoR"))||
+		(StrStrI(modversion,_DLPT("Morph")) && (StrStrI(modversion,_DLPT("Max")) || StrStrI(modversion,_DLPT("+")) || StrStrI(modversion,_DLPT("")))) ||
+		StrStrI(modversion, _DLPT("Morph XT"))||	//very bad mod (MPAA ?)
+		StrStrI(modversion, _DLPT("Mrph"))||
+		StrStrI(modversion, _DLPT("BlueHex"))||
+		StrStrI(modversion, _DLPT("FlowerPower"))||
+		StrStrI(modversion, _DLPT("Fincan"))||
+		StrStrI(modversion,_DLPT("OO.de")) ||	//WiZaRd		
+		StrStrI(modversion,_DLPT("00.de")) || //WiZaRd
+		StrStrI(modversion,_DLPT("OOde")) || //WiZaRd
+		StrStrI(modversion,_DLPT("00de")) ||
+		StrStrI(modversion, _DLPT("OS_")) ||	//Xman most are found via other checks, but not all
+		StrStrI(modversion, _DLPT("Heartbreaker"))||
+		StrStrI(modversion, _DLPT("Arabella"))||
+		StrStrI(modversion, _DLPT("Administrator"))||
+		StrStrI(modversion, _DLPT("B@d-D3vi7"))||
+		StrStrI(modversion, _DLPT("Dying Ange"))||
+		StrStrI(modversion, _DLPT("FREAK MOD VENOM"))||
+		StrStrI(modversion, _DLPT("CryptedSpeed"))||
+		StrStrI(modversion, _DLPT("h34r7b34k3r"))||
+		StrStrI(modversion, _DLPT("Exorzist"))||
+		StrStrI(modversion, _DLPT("A.i.d.e-A.D.S."))||
+		StrStrI(modversion, _DLPT("albaR"))||
+		StrStrI(modversion, _DLPT("AngelDr"))||	//5/2006
+		StrStrI(modversion, _DLPT("Tombstone Reloaded"))|| //5/2006
+		StrStrI(modversion, _DLPT("Tombstone Next"))|| //10/2006
+		StrStrI(modversion, _DLPT("pP.r8b"))|| //5/2006
+		StrStrI(modversion, _DLPT("x0Rz!$T"))|| //E/xorzist
+		StrStrI(modversion, _DLPT("xORz!T"))||
+		_tcsstr(clientversion,_DLPT("eMule Compat v0.40")) || //7/2006
+		_tcsstr(clientversion,_DLPT("eMule Compat v127.")) || //8/2006
+		StrStrI(modversion, _DLPT("No Ratio"))|| //based on scarangel 7/2006
+		StrStrI(modversion, _DLPT("DeathAnge"))|| //based on Xtreme 8/2006
+		StrStrI(modversion, _DLPT("PROemule"))||	//9/2006
+		StrStrI(modversion, _DLPT("Simple Leecher"))||	//9/2006
+		StrStrI(modversion, _DLPT("oFF *+*"))||	//10/2006
+		StrStrI(modversion, _DLPT("0FF "))||	//6/2007
+		StrStrI(modversion, _DLPT("SmartMuli"))||	//12/2006
+		StrStrI(modversion, _DLPT("D10T"))||	//12/2006
+		StrStrI(modversion, _DLPT("the fonz"))||	//12/2006
+		StrStrI(modversion, _DLPT("TurkMule"))||	//1/2007
+		StrStrI(modversion, _DLPT("Hyperdrive"))||	//1/2007
+		StrStrI(modversion, _DLPT("NextEvolution"))||	//1/2007
+		StrStrI(modversion, _DLPT("Pimp"))||	//3/2007
+		StrStrI(modversion, _DLPT("XDP "))||	//6/2007
+		StrStrI(modversion, _DLPT("AeOnFlux"))||	//8/2007
+		//8/2007 from dlarge:
+		StrStrI(modversion, _DLPT("Final Fight"))|| //added dlarge
+		StrStrI(modversion, _DLPT("Firebal"))||	//added dlarge "standart String"
+		StrStrI(modversion, _DLPT("SunPower"))||	//added dlarge "standart String"
+		StrStrI(modversion, _DLPT("SuperKiller"))|| //added dlarge
+		StrStrI(modversion, _DLPT("X-Cite"))|| //added dlarge
+		StrStrI(modversion, _DLPT("waZZa"))|| //added dlarge
+		StrStrI(modversion, _DLPT("Merza"))|| //added dlarge
+		StrStrI(modversion, _DLPT("K.O.T."))|| //added dlarge
+		StrStrI(modversion, _DLPT("Licokine"))|| //added dlarge
+		StrStrI(modversion, _DLPT("BlackStar"))|| //added dlarge
+		StrStrI(modversion, _DLPT("nEwLoGic"))|| //added dlarge
+		//end
+		StrStrI(modversion, _DLPT("Applejuice"))|| //6/2007 now ban instead score reduce
+//more AJ modstrings
+		StrStrI(modversion, "Wikinger") ||
+		StrStrI(modversion, "ROCKFORCE") ||
+		StrStrI(modversion, "RC-ATLANTIS") ||
+//more AJ modstrings
+//zz_fly Start 
+		//modstring of XL
+		/*
+		_tcsstr(modversion, _DLPT("20071122")) || _tcsstr(modversion, _DLPT("20080228")) ||
+		_tcsstr(modversion, _DLPT("080620")) || _tcsstr(modversion, _DLPT("080307")) || 
+		_tcsstr(modversion, _DLPT("080509")) || _tcsstr(modversion, _DLPT("20080505")) || 
+		_tcsstr(modversion, _DLPT("v 080828")) || _tcsstr(modversion, _DLPT("XL8828")) ||
+		_tcsstr(modversion, _DLPT("build 11230")) || _tcsstr(modversion, _DLPT("20080923")) ||
+		_tcsstr(modversion, _DLPT("ZZUL")) || _tcsstr(modversion, _DLPT("XunaLei")) || 
+		_tcsstr(modversion, _DLPT("Xun")) || _tcsstr(modversion, _DLPT("Xthunder")) ||
+		_tcsstr(modversion, _DLPT("xl build")) ||
+		*/
+		//end
+		((_tcsstr(modversion, _DLPT("MorphXT v9.6")) || _tcsstr(modversion, _DLPT("Xtreme 7")) || _tcsstr(modversion, _DLPT("ZZUL Plus 1"))) && _tcsstr(clientversion, _DLPT("0.48a"))) || //should not 0.48a
+		_tcsstr(modversion, _DLPT("NetF WARP 9")) || //should be NetF WARP 0.3a.9
+		_tcsstr(modversion, _DLPT("VeryCD 080730")) || //Fake VeryCD
+		_tcsstr(modversion, _DLPT("FreeCD")) || //BitComet, changed to hardban
+		_tcsstr(modversion, _DLPT("PlayMule")) || //PlayMule
+		( !CString(modversion).IsEmpty() && CString(modversion).Trim().IsEmpty() ) || //pruma, korean leecher, modversion is a space
+		_tcsstr(modversion,_DLPT("VMULE")) || //israel
+		StrStrI(modversion,_DLPT("Goop.co.i")) ||
+		StrStrI(modversion,_DLPT("Razorback")) ||
+		StrStrI(modversion,_DLPT("UlTiMaTiC ")) || //based on MA 3.5
+		_tcsstr(modversion,_DLPT("Peizheng 090304")) || //gpl-breaker
+		_tcsstr(modversion,_DLPT("amule")) || //fake version, amule never write a modstring here
+		_tcsstr(modversion,_DLPT("Amule")) ||
+//zz_fly End
+		_tcsstr(modversion, _DLPT("Neo-R")) ||
+		_tcsstr(modversion, _DLPT("Neo-RS")) ||
+		StrStrI(modversion, _DLPT("Apace")) ||
+		StrStrI(modversion, _DLPT("L!()Netw0rk")) ||
+		StrStrI(modversion, _DLPT("L!ONetwork")) ||
+		StrStrI(modversion, _DLPT("l!onet"))||
+		StrStrI(modversion, _DLPT("l!0net"))||
+		StrStrI(modversion, _DLPT("lionet"))||
+		StrStrI(modversion, _DLPT("li0net"))||
+		StrStrI(modversion, _DLPT("li()net"))||
+		StrStrI(modversion, _DLPT("L!()Net"))||
+		StrStrI(modversion, _DLPT("800STER")) ||
+		StrStrI(modversion, _DLPT("8OOSTER")) ||
+		StrStrI(modversion, _DLPT("BOO$T")) ||
+		StrStrI(modversion, _DLPT("B00ST")) ||
+		StrStrI(modversion, _DLPT("T-L-N BO0ST")) || //by briandgwx
+		StrStrI(modversion, _DLPT("T L N B O O S T")) ||	//by taz-me
+		StrStrI(modversion, _DLPT("iberica")) ||  //by briandgwx
+//from Riso64bit
+		_tcsstr(modversion, _DLPT("Thor ")) ||
+		_tcsstr(modversion, _DLPT("DeSfAlko")) ||
+		_tcsstr(modversion, _DLPT("The Killer Bean")) ||
+		_tcsstr(modversion, _DLPT("ZZ-R ")) ||
+		_tcsstr(modversion, _DLPT("ZZ-RS ")) ||
+		_tcsstr(modversion, _DLPT("Reptil-Crew-3")) ||
+		_tcsstr(modversion, _DLPT("Anonymous Mod")) ||
+		StrStrI(modversion, _DLPT("NFO.Co.i")) ||
+		_tcsstr(modversion, _DLPT("Down.co.i")) ||
+		_tcsstr(modversion, _DLPT("Red Projekt")) ||
+		_tcsstr(modversion, _DLPT("centraldivx.com")) || //no source
+		StrStrI(modversion, _DLPT("emule.co.i")) ||
+		StrStrI(modversion, _DLPT("Fire eMule")) ||
+		StrStrI(modversion, _DLPT("PirateMule")) ||
+		StrStrI(modversion, _DLPT("HighTime")) ||
+		StrStrI(modversion, _DLPT("GPS2Crew")) ||
+		StrStrI(modversion, _DLPT("TLN eMule")) ||
+		StrStrI(modversion, _DLPT("DVD-RS")) ||
+		_tcsstr(modversion, _DLPT("ZZULtimativ-R")) ||
+		_tcsstr(modversion, _DLPT("Div eMule")) ||
+		_tcsstr(modversion, _DLPT("Pwr eMule")) ||
+		//_tcsstr(modversion, _DLPT("VipeR")) || //it become good
+		_tcsstr(modversion, _DLPT("Methadone")) ||
+		_tcsstr(modversion, _DLPT("Titandonkey")) ||
+		_tcsstr(modversion, _DLPT("SpeedShare")) ||
+		_tcsstr(modversion, _DLPT("Wodan")) ||
+		_tcsstr(modversion, _DLPT("Sikombious")) ||
+		_tcsstr(modversion, _DLPT("HyperTraxx")) ||
+		_tcsstr(modversion, _DLPT("Div pro")) ||
+		_tcsstr(modversion, _DLPT("GangBang")) ||
+		_tcsstr(modversion, _DLPT("WarezFaw")) ||
+		_tcsstr(modversion, _DLPT("Rastak")) ||
+		_tcsstr(modversion, _DLPT("Okinawa")) ||
+		_tcsstr(modversion, _DLPT("Hiroshima")) ||
+		_tcsstr(modversion, _DLPT("Kamikaze")) ||
+		_tcsstr(modversion, _DLPT("Yotoruma")) ||
+		_tcsstr(modversion, _DLPT("Nagasaki")) ||
+		_tcsstr(modversion, _DLPT("Addiction")) ||
+		_tcsstr(modversion, _DLPT("Bondage")) ||
+		_tcsstr(modversion, _DLPT("eMuleLife")) ||
+		StrStrI(modversion, _DLPT("PP-edition")) ||
+		StrStrI(modversion, _DLPT("ZZULtra")) ||
+		_tcsstr(modversion, _DLPT("eMulix")) ||
+		_tcsstr(modversion, _DLPT("BigBang")) ||
+		_tcsstr(modversion, _DLPT("PR0 ")) || //0(zero)
+		_tcsstr(modversion, _DLPT("LoCMuLe")) ||
+		_tcsstr(modversion, _DLPT("Flux ")) ||
+		_tcsstr(modversion, _DLPT("Aurora")) ||
+		//_tcsstr(modversion, _DLPT("Alias")) || //although it is the base-version of leechermods, but it has no leecher function, unban it
+		//_tcsstr(modversion, _DLPT("R-Mod"))|| //same as Alias
+		_tcsstr(modversion, _DLPT("UniATeam")) ||
+		StrStrI(modversion, _DLPT("Torenkey")) ||
+		StrStrI(modversion, _DLPT("RSVCD")) ||
+		_tcsstr(modversion, _DLPT("BlueEarth")) ||
+		_tcsstr(modversion, _DLPT("RocketMule")) ||
+		_tcsstr(modversion, _DLPT("eMule 0.4")) || //some bad mods write clientversion in modstring
+		_tcsstr(modversion, _DLPT("Emule")) ||
+		_tcsstr(modversion, _DLPT("eMule v")) ||
+		_tcsstr(modversion, _DLPT("OrAnGe")) ||
+		StrStrI(modversion, _DLPT("Evil Mod")) ||
+		StrStrI(modversion, _DLPT("StulleMule v")) || //real modstring is "StulleMule #.#", no 'v'
+		StrStrI(modversion, _DLPT("X-Ray v")) || 
+		StrStrI(modversion, _DLPT("Ulti F"))||
+		StrStrI(modversion, _DLPT("Chmr"))||
+		StrStrI(modversion, _DLPT("hmer"))||
+		StrStrI(modversion, _DLPT("Plus Plus"))|| //some of them did not banned in bin
+		_tcsstr(modversion, _DLPT("UMatic"))||
+		_tcsstr(modversion, _DLPT("BRAZILINJAPAN"))|| //no source
+		StrStrI(modversion, _DLPT("Pigpen"))||
+		_tcsstr(modversion, _DLPT("TCMod"))||
+		_tcsstr(modversion, _DLPT("UltiMatiX"))||
+		_tcsstr(modversion, _DLPT("Perestroika"))||
+		_tcsstr(modversion, _DLPT("Ebola")) ||
+		StrStrI(modversion, _DLPT("StulleMule Plus")) ||
+		_tcsstr(modversion, _DLPT("DVD-START.COM")) ||
+		(_tcsicmp(clientversion, _DLPT("eMule"))==0) || //the client did not send client version
+		_tcsstr(modversion, _DLPT("Penthota")) ||
+		_tcsstr(clientversion,_DLPT("eMule Compat v2.1")) || //+Ultra
+		_tcsstr(modversion, _DLPT("TSmod")) ||
+		_tcsstr(modversion, _DLPT("Okaemule")) ||
+		_tcsstr(modversion, _DLPT("Okamula")) ||
+		_tcsstr(modversion, _DLPT("Potenza")) ||
+		_tcsstr(modversion, _DLPT("AntraX MoD")) ||
+		_tcsstr(modversion, _DLPT("Picapica")) ||
+		_tcsstr(modversion, _DLPT("PeaceMule")) ||
+		_tcsstr(modversion, _DLPT("0.49b")) ||
+		_tcsstr(modversion, _DLPT("Metha")) ||
+		_tcsstr(modversion, _DLPT("XTreme")) ||
+//end
+//from XRAY antileecher start
+		StrStrI(modversion, "SPEED EMULE") || //MyTh	
+		StrStrI(modversion, "SPIKE2 +") || //MyTh hard leecher
+		//StrStrI(modversion, "Adunanza") || //MyTh italian ISP-spec com user
+		StrStrI(modversion, "Asiklar") || //MyTh apple-com
+		StrStrI(modversion, "Shadow") || //MyTh
+		StrStrI(modversion, "EPB") || //MyTh
+		StrStrI(modversion, "Tyrantmule") || //MyTh
+		StrStrI(modversion, "APRC") || //MyTh
+		StrStrI(modversion, "Hardstyle") || //MyTh
+		StrStrI(modversion, "pP.r12b") || //MyTh
+		StrStrI(modversion, "Simple Life") || //MyTh
+		StrStrI(modversion, "TYRANUS") || //MyTh
+		StrStrI(modversion, _DLPT("[OO.de-L33CH4")) ||	//Stulle
+		( StrStrI(modversion, _DLPT("sivka v12e8")) && StrStrI(clientversion, "0.42e") ) || //m_nClientVersion != MAKE_CLIENT_VERSION(0, 42, 4)	// added - Stulle
+		StrStrI(modversion, "RapCom Mod") || //added dlarge 
+		StrStrI(modversion, "SBI leecher") || //added dlarge 
+		StrStrI(modversion, "TS Next Lite") || //added dlarge  
+//from XRAY antileecher end
+		StrStrI(modversion, "Dein Modstring") || // JvA: moved up from soft because also used by Applejuice
+		StrStrI(modversion, "Angelmule") || // JvA: no sources, no changelog, community username,...
+		StrStrI(modversion, "TR-P2P-MoD") || // JvA: bad client
+		StrStrI(modversion, "Esekci") || // JvA: no sources, no changelog, ...
+		(_tcslen(modversion) > 0 && (StrStrI(clientversion,_DLPT("edonkey")) || modversion[0]==_DLPT('[')))   ||  //1. donkey user with modstring, 2. modstring begins with [ this is a known leecher
+		(StrStrI(modversion, _DLPT("Xtreme")) && StrStrI(modversion, _DLPT("]")))  //bad Xtreme mod
+		)
+		return _DLPT("Bad MODSTRING");
+	
+	//zz_fly Start 
+		//modstring of XL
+		if(
+		_tcsstr(modversion, _DLPT("20071122")) || _tcsstr(modversion, _DLPT("20080228")) ||
+		_tcsstr(modversion, _DLPT("080620")) || _tcsstr(modversion, _DLPT("080307")) || 
+		_tcsstr(modversion, _DLPT("080509")) || _tcsstr(modversion, _DLPT("20080505")) || 
+		_tcsstr(modversion, _DLPT("v 080828")) || _tcsstr(modversion, _DLPT("XL8828")) ||
+		_tcsstr(modversion, _DLPT("build 11230")) || _tcsstr(modversion, _DLPT("20080923")) ||
+		_tcsstr(modversion, _DLPT("ZZUL")) || _tcsstr(modversion, _DLPT("XunaLei")) || 
+		_tcsstr(modversion, _DLPT("Xun")) || _tcsstr(modversion, _DLPT("Xthunder")) ||
+		_tcsstr(modversion, _DLPT("xl build"))
+		//end
+		)
+		return _DLPT("Xunlei");	
+	
+	if(StrStr(modversion, _DLPT("xtreme"))) //case sensitive!
+		return _DLPT("Fake Xtreme");
+
+	//WiZaRd Bad Modstring Scheme
+	CString strMod = CString(modversion);
+	if( strMod.IsEmpty() ||
+		(strMod.Find(_DLPT("CHN "))==0 && strMod.GetLength() > 8) ||
+		(strMod.Find(_DLPT("Apollo"))==0) ||  //Apollo is a Portugal Mod
+		(strMod.Find(_DLPT("sivka"))==0) 
+	  )
+	{
+		;//do nothing
+	}
+	else
+	{
+		if(_tcsstr(clientversion, _DLPT("eMule v")) && (strMod.GetLength() <= 4)) //most of them are fincan
+			return "Bad Modstring Scheme";
+		int iNumberFound = -1;
+		_TINT ch;
+		bool bBad = false;
+		bool bNotEnd = false;
+		for(int i = 0; i < strMod.GetLength() && bBad == false; ++i)
+		{
+			ch = strMod.GetAt(i); 
+			if( ch == L'.' || ch == L' ' )
+			{
+				bNotEnd = true; //these chars should not be the end of modstring
+				iNumberFound = -1; //this is a simple hack to not punish mods like TK4 or Spike2 :)
+				continue; //skip "lega" chars
+			}
+			if( ch == L'-' /*|| ch == L'+'*/ ) //connector characters, connect two string or two numbers
+			{
+				bNotEnd = true; //these chars should not be the end of modstring
+				if(iNumberFound != -1) 
+					iNumberFound++; //exclude some modstring like v#.#-a1
+				continue;
+			}
+			if( _istpunct(ch) || _istspace(ch))
+				bBad = true; //illegal punctuation or whitespace character
+			else if(_istcntrl(ch))
+				bBad = true; //control character in modstring!?
+			else
+			{
+				bNotEnd = false;
+				if( _istdigit(ch) )
+					iNumberFound = i;
+				else if ( (iNumberFound == i-1) && _istxdigit(ch) ) //abcdef is legal in the end of version number, also exclude bowlfish tk4 and so on
+				{
+					;//do nothing
+				}
+				else if(iNumberFound != -1)
+					bBad = true; //that is: number out of row, e.g. not MorphXT v11.9 but Morph11XT.9
+			}
+		}
+		if(bBad || bNotEnd)
+			return "Bad Modstring Scheme";
+	}
+	//WiZaRd
+
+	return NULL;
+}
+
+LPCTSTR __declspec(dllexport) DLPCheckModstring_Soft(LPCTSTR modversion, LPCTSTR clientversion)
+{
+	if(modversion==NULL || clientversion==NULL)
+		return NULL;
+
+	if (StrStrI(modversion,_DLPT("Rockese")) || 
+		StrStrI(modversion,_DLPT("HARDMULE")) ||
+		StrStrI(modversion, _DLPT("Community"))|| 
+		StrStrI(modversion,_DLPT("IcE-MoD"))||
+		StrStrI(modversion,_DLPT("a-eDit"))||
+		StrStrI(modversion, _DLPT("Ultimativ"))||
+		StrStrI(modversion, _DLPT("Ultimate"))||
+		//StrStrI(modversion, _DLPT("Ulti F"))|| //move to hard ban
+		StrStrI(modversion, _DLPT("Enter MoD Name"))||	
+//		StrStrI(modversion, _DLPT("Dein Modstring"))||	// 3/2007
+		//StrStrI(modversion, _DLPT("choose your modstring"))|| // 3/2007
+		StrStrI(modversion, _DLPT("La tua Modstring"))||	//italian
+		//8/2007 from dlarge:
+		//StrStrI(modversion, _DLPT("Enter Your Modstring"))|| //added dlarge
+		StrStrI(modversion, _DLPT("Your Modstring")) ||
+		StrStrI(modversion, _DLPT("C-E-R-E-B-R-O")) || //added dlarge
+		//end
+		StrStrI(modversion, _DLPT("NewMule"))||
+		StrStrI(modversion, _DLPT("smart- muli"))||
+		StrStrI(modversion, _DLPT("TCMatic 3"))|| //1/2007  //version 3 is the public version and used as leecher
+		//StrStrI(clientversion, _DLPT("eMule v2.0")) || //6/2007 fake Xtreme / GPL-breaker
+		StrStrI(modversion, _DLPT("uptempo"))
+//zz_fly Start
+		||_tcsstr(clientversion, _DLPT("eMule v0.95g")) //korea
+		||_tcsstr(clientversion, _DLPT("eMule v0.47f"))
+		||_tcsstr(modversion, _DLPT("Bowlfish")) //international filter, change to softban.
+		||StrStrI(modversion, _DLPT("BLACKMULE")) //no completely source, but it seems it do not have leecher functions.
+		||_tcsstr(clientversion, _DLPT("eMule v1.")) //ban all version number >= 1.0
+		||_tcsstr(clientversion, _DLPT("eMule v2."))
+		||_tcsstr(clientversion, _DLPT("eMule v3."))
+		||_tcsstr(clientversion, _DLPT("Shareaza v6.")) //Shareaza's current version is 2.4 
+		||_tcsstr(clientversion, _DLPT("Shareaza v5."))
+		||_tcsstr(clientversion, _DLPT("Shareaza v4."))
+		||_tcsstr(clientversion, _DLPT("Shareaza v3."))
+		//||_tcsstr(modversion, _DLPT("easyMule2")) //maybe gpl breaker, need confirm.
+		||StrStrI(modversion, _DLPT(".COM")) //no domain name in modstring
+		||StrStrI(modversion, _DLPT(".ORG"))
+		||StrStrI(modversion, _DLPT(".NET"))
+		||StrStrI(modversion, _DLPT(".BIZ"))
+		||StrStrI(modversion, _DLPT(".INFO"))
+//zz_fly End
+		||(_tcsstr(clientversion, _DLPT("lphant v2.01")) && _tcsstr(modversion, _DLPT("Plus"))) //www.lphantplus.com, no src
+		)
+		return _DLPT("Bad MODSTRING");
+
+	return NULL;
+}
+
+LPCTSTR __declspec(dllexport) DLPCheckUsername_Hard(LPCTSTR username)
+{
+	if(username==NULL)
+		return NULL;
+
+	if (
+//Chinese Leecher - http://forum.emule-project.net/index.php?showtopic=134097&hl=
+		_tcsstr(username,"dianlei.com") ||
+		_tcsstr(username,"[eMuleBT]") ||
+		_tcsstr(username,"[PPMule]") ||
+		StrStrI(username,"TUOTU") ||
+		_tcsstr(username,"kaggo.com") ||
+		_tcsstr(username,"[Chinfo]") ||
+		_tcsstr(username,"vgo.21cn") ||
+//Chinese Leecher - http://forum.emule-project.net/index.php?showtopic=134097&hl=
+		//StrStrI(username,_DLPT("$WAREZ$"))||
+		//StrStrI(username,_DLPT("Leecha"))||
+		//StrStrI(username,_DLPT("Reverse"))||
+		//StrStrI(username,_DLPT("$motty"))||
+		StrStrI(username,_DLPT("emule-speed"))||
+		StrStrI(username,_DLPT("Intuition"))||
+		//StrStrI(username,_DLPT("W.I.P."))|| //outdated
+		//StrStrI(username,_DLPT("celinesexy"))||
+		//StrStrI(username,_DLPT("Gate-eMule"))||
+		//StrStrI(username,_DLPT("energyfaker"))||
+		//StrStrI(username,_DLPT("BuzzFuzz"))||
+		//StrStrI(username,_DLPT("Speed-Unit"))|| 
+		//StrStrI(username,_DLPT("Killians"))||
+		//StrStrI(username,_DLPT("pubsman"))||
+		StrStrI(username,_DLPT("emule-element"))||
+		//StrStrI(username,_DLPT("emule")) && StrStrI(username,_DLPT("booster")) ||
+		//StrStrI(username,_DLPT("Rappi")) ||
+		StrStrI(username,_DLPT("Ketamine")) ||
+		StrStrI(username,_DLPT("emuleech.com")) ||
+		//StrStrI(username, _DLPT("SchlumpMule"))|| //"
+		//StrStrI(username, _DLPT("Saftys"))||
+		StrStr(username, _DLPT("UnKnOwN pOiSoN"))||
+		//StrStrI(username, _DLPT("ElfenPower"))||
+		//StrStrI(username, _DLPT("eMule Cow"))||
+		//StrStrI(username, _DLPT("Freezamule"))||
+		StrStrI(username, _DLPT("EGOmule"))||
+		StrStrI(username, _DLPT("-=EGOist=-"))||
+		//StrStrI(username, _DLPT("FreezaVamp"))||
+		StrStrI(username, _DLPT("Muli_Checka"))||
+		StrStrI(username,_DLPT("00de.de"))|| 
+		//StrStrI(username,_DLPT("00de")) ||
+		//StrStrI(username,_DLPT("OO.de"))|| 
+		//StrStrI(username,_DLPT("OOde")) ||
+		//StrStrI(username, _DLPT("PrOjEcT-SaNdStOrM"))||
+		//StrStrI(username, _DLPT("NotHer eDitiOn"))||
+		//StrStrI(username, _DLPT("eSl@d3vi"))||
+		//StrStrI(username, _DLPT(" AgentSmith"))||
+		//StrStrI(username, _DLPT("rabb_it"))||
+		//StrStrI(username, _DLPT("ServerClient"))||
+		StrCmpI(username, _DLPT("Muse"))==0 || //ketamine mod
+		//StrStr(username, _DLPT("ZamBoR"))||
+		//StrStrI(username,_DLPT("HARDMULE")) ||
+		StrStrI(username,_DLPT("futurezone-reloaded")) ||
+		StrStrI(username,_DLPT("Gate-To-Darkness.com")) ||
+		StrStrI(username,_DLPT("Razorback")) ||
+		StrStrI(username,_DLPT("Titanesel.tk")) ||
+		StrStrI(username,_DLPT("bigbang.to")) ||
+		StrStrI(username,_DLPT("leecherclients.org")) ||  //Xman 10/06
+		StrStrI(username,_DLPT("futuremods.de")) ||  //Xman 10/06
+		StrStrI(username,_DLPT(".::Stenoco-Zone::.")) ||
+		StrStrI(username,_DLPT("emule-mods.cc")) || //Xman 01/07
+		StrStrI(username,_DLPT("leecher-mod.net")) || //Xman 02/07
+		//08/2007 from dlarge:
+		StrStrI(username,_DLPT("leecher-world.com")) || //added dlarge
+		StrStrI(username,_DLPT("leecher.biz")) || //added dlarge
+		//end
+		//Xman 6/2007:
+//more AJ modstrings
+		//( StrStrI(username, "[") && StrStrI(username, "]")
+		//&& (
+			StrStrI(username, "Applejuice") ||
+			StrStrI(username, "Wikinger") ||
+			StrStrI(username, "ROCKFORCE") ||
+			StrStrI(username, "RC-ATLANTIS") ||
+			StrStrI(username, "Firebal") ||
+			StrStrI(username, "SunPower") ||
+		//	)
+		//) ||
+//		StrStrI(username,_DLPT("AppleJuice")) && StrStrI(username,_DLPT("[")) && StrStrI(username,_DLPT("]")) ||
+		StrStrI(username, "futuremod.de") || // JvA: apple-com adress
+//more AJ modstrings
+		StrStrI(username, "@ Raptor") ||     //added dlarge
+		StrStrI(username, "FUCKLW") ||         //added dlarge
+//zz_fly Start
+		_tcsstr(username,_DLPT("a1[VeryCD]xthame")) || //XL
+		StrStrI(username,_DLPT("Flashget")) || //FlashGet
+		_tcsstr(username,_DLPT("http://www.net-xfer.com")) || //netxfer
+		_tcsstr(username,_DLPT("emuIe-project.net")) || //phishing site
+		_tcsstr(username,_DLPT("QQDownload")) || //tencent
+//zz_fly End
+		StrStrI(username, _DLPT("lionetwork"))||
+		StrStrI(username, _DLPT("[lionheart"))||
+		StrStrI(username, _DLPT("li@network"))||
+		StrStrI(username, _DLPT("l!onetwork"))||
+		StrStrI(username, _DLPT("li()net"))||
+		StrStrI(username, _DLPT("l!0net"))||
+		StrStrI(username, _DLPT("L!()Network")) ||
+		StrStrI(username, _DLPT("Li()Network")) ||
+		StrStrI(username, _DLPT("L!0Network")) ||
+		StrStrI(username, _DLPT("Li@Network")) ||	 
+//from Riso64bit
+		_tcsstr(username, _DLPT("FincanMod")) || //fincan
+		_tcsstr(username, _DLPT("Finc@nMod")) ||
+		StrStrI(username, _DLPT("titanmule")) ||
+		StrStrI(username, _DLPT(".c0.i")) || //0, zero
+		StrStrI(username, _DLPT("Goop.Co.i")) || //israel community
+		StrStrI(username, _DLPT("Div.Co.i")) ||
+		StrStrI(username, _DLPT("emule.co.i")) ||
+		StrStrI(username, _DLPT("pwr.co.i")) ||
+		StrStrI(username, _DLPT("nFo.Co.i")) ||
+		StrStrI(username, _DLPT("lhnet.co.i")) ||
+		StrStrI(username, _DLPT("ynet.co.i")) ||
+		StrStrI(username, _DLPT("wnet.co.i")) ||
+		StrStrI(username, _DLPT("Paf.co.i")) ||
+		StrStrI(username, _DLPT("finder.co.i")) ||
+		StrStrI(username, _DLPT("joop.Co.i")) ||
+		StrStrI(username, _DLPT("Www.NFOil.com")) ||
+		StrStrI(username, _DLPT("TLN eMule")) ||
+		StrStrI(username, _DLPT("LHeMule")) ||
+		StrStrI(username, _DLPT("VMULE 2007")) ||
+		StrStrI(username, _DLPT("TLNGuest")) ||
+		StrStrI(username, _DLPT("Div eMule 2007")) ||
+		StrStrI(username, _DLPT("eMulePro.de.vu")) ||
+		StrStrI(username, _DLPT("emuIe-co.net")) ||
+		StrStrI(username, _DLPT("AE CoM UseR")) ||
+		StrStrI(username, _DLPT("BTFaw.Com")) ||
+		StrStrI(username, _DLPT("warezfaw")) ||
+		StrStrI(username, _DLPT("lh.2y.net")) ||
+		//StrStrI(username, _DLPT("viper-istraeL.Org")) ||
+		StrStrI(username, _DLPT("[Pwr Mule]Usuario")) ||
+		StrStrI(username, _DLPT("Www.D-iL.Net")) ||
+		StrStrI(username, _DLPT("www.aideadsl.com")) ||
+		StrStrI(username, _DLPT("tangot.com")) ||
+		StrStrI(username, _DLPT("r3wlx.com")) ||
+		StrStrI(username, _DLPT("http://yo.com")) ||
+		StrStrI(username, _DLPT("Angel eMule")) ||
+		StrStrI(username, _DLPT("AngelMule")) ||
+		//MyTh NOT to ban!
+		/* //they are some release groups, although some of them use bad mods, but rest of them is good one.
+		_tcsstr(username, _DLPT("Ultimativ"))||
+		StrStrI(username, _DLPT("gps2c.6x.to")) ||	
+		StrStrI(username, _DLPT("maultier-power")) ||	
+		_tcsstr(username, _DLPT("RSVCD-Forum")) ||
+		StrStrI(username, _DLPT("rsvcd-crew")) ||
+		StrStrI(username, _DLPT("Ulti-Board")) ||
+		_tcsstr(username, _DLPT("R-Mod"))||
+		StrStrI(username, _DLPT("gps2crew")) ||
+		*/
+		StrStrI(username, _DLPT("www.eChanblardNext.org")) ||	
+		//StrStrI(username, _DLPT("www.e-sipa.de")) ||
+		StrStrI(username, _DLPT("[TEC]")) || //fincan
+		StrStrI(username, _DLPT("e-Sipa")) ||	
+		StrStrI(username, _DLPT("emuleech")) ||
+		StrStrI(username, _DLPT("mkp2p")) ||
+		_tcsstr(username, _DLPT("[ CHN]")) || //a space after bracket
+		StrStrI(username, _DLPT("PlayMule")) ||
+		StrStrI(username, _DLPT("eDonkey2008")) ||
+		StrStrI(username, _DLPT("Torenkey")) ||
+		StrStrI(username, _DLPT("sdjtuning")) ||
+		StrStrI(username, _DLPT("RAPCOM User")) ||
+		_tcsstr(username, _DLPT("ZZULtimativ-R")) ||
+		_tcsstr(username, _DLPT("ZZ-R ")) ||
+		StrStrI(username, _DLPT("OFF +")) ||
+		StrStrI(username, _DLPT("OFF+")) ||
+		StrStrI(username, _DLPT("Ultim@tiv")) ||
+		StrStrI(username, _DLPT("[CHN][VeryCD][Your")) ||
+		_tcsstr(username, _DLPT("eMuleUniATeam")) ||
+		StrStrI(username, _DLPT("mods.sub.cc")) ||
+		_tcsstr(username, _DLPT("ExtrEMule")) ||
+		_tcsstr(username, _DLPT("Titandonkey")) ||
+		_tcsstr(username, _DLPT("xtmhtl [ePlus]"))|| //same name, same userhash
+
+		//all sites below are phishing sites
+		StrStrI(username, _DLPT("www.extremule.com")) ||
+		StrStrI(username, _DLPT("www.emuleproject.com")) ||
+		StrStrI(username, _DLPT("bigbang-emule.de.vu")) ||
+		StrStrI(username, _DLPT("emulenet.de.vu")) ||
+		_tcsstr(username, _DLPT("http://emule.net")) ||
+		StrStrI(username, _DLPT("http://emulo.net")) ||
+		StrStrI(username, _DLPT("http://projekt.org")) ||
+		StrStrI(username, _DLPT("CryptMule.de.vu")) ||
+		StrStrI(username, _DLPT("titanload.to")) ||
+		StrStrI(username, _DLPT("http://emule-projekt.net")) ||
+		StrStrI(username, _DLPT("emuleitalianogratis.com")) ||
+		StrStrI(username, _DLPT("http://www.official-emule.com")) ||
+		StrStrI(username, _DLPT("emulepro.6x.to")) ||
+		//StrStrI(username, _DLPT("power-porta")) || //MyTh NOT to ban!
+		StrStrI(username, _DLPT("e-mule.nu")) ||
+		StrStrI(username, _DLPT("emulesoftware.com")) ||
+		StrStrI(username, _DLPT("emuleitaliano.com")) ||
+		StrStrI(username, _DLPT("scaricareemule.com")) ||
+		StrStrI(username, _DLPT("emule--it.com")) ||
+		StrStrI(username, _DLPT("italian.eazel.com")) ||
+		StrStrI(username, _DLPT("speed-downloading.com")) ||
+		StrStrI(username, _DLPT("nuovaversione.com")) ||
+		StrStrI(username, _DLPT("emuleplus.com")) ||
+		StrStrI(username, _DLPT("emuleultra.com")) ||
+		StrStrI(username, _DLPT("emule.org")) ||
+		StrStrI(username, _DLPT("[emule.de v")) || //default name: [emule.de v ##]
+		StrStrI(username, _DLPT("emule.fr")) ||
+		StrStrI(username, _DLPT("emule.ru")) ||
+		StrStrI(username, _DLPT("emule.com")) ||
+		StrStrI(username, _DLPT("emule-mods.biz")) || 
+		StrStrI(username, _DLPT("emule-projet")) ||
+		StrStrI(username, _DLPT("maomao.eu")) ||
+		StrStrI(username, _DLPT("donkey.com")) ||
+		StrStrI(username, _DLPT("super4.com")) ||
+		StrStrI(username, _DLPT("emule.cc")) ||
+		StrStrI(username, _DLPT("emule.net")) ||
+		StrStrI(username, _DLPT("emulegratis.net")) ||
+//End
+		StrStrI(username,_DLPT("[LSD.19"))	//Xman 21.06.2005 definitive not a good mod, with protocol bugs
+		)
+		return _DLPT("Bad USERNAME");
+
+
+	//new ketamine
+	//if(StrStrI(username, _DLPT("[ePlus]")) != StrRStrI(username,NULL, _DLPT("[ePlus]"))) //old version
+	if(_tcslen(username) >=14)
+	{
+		LPCTSTR tempstr=StrStr(username, _DLPT("[ePlus]"));
+		if(tempstr && _tcslen(tempstr)>=7)
+			if(StrStr(tempstr + 7, _DLPT("[ePlus]")))
+				return _DLPT("new Ketamine");
+	}
+
+	return NULL;
+}
+
+LPCTSTR __declspec(dllexport) DLPCheckUsername_Soft(LPCTSTR username)
+{
+	if(username==NULL)
+		return NULL;
+
+	if (
+		
+		//Xman 15.08.05
+		StrStrI(username, _DLPT(">>Power-Mod"))
+		//Xman 1/2007 
+		/*
+		StrStrI(username,_DLPT("AppleJuice [")) && StrStrI(username,_DLPT("]")) ||
+		StrStrI(username,_DLPT("AppleJuice Mod [")) && StrStrI(username,_DLPT("]")) ||
+		StrStrI(username,_DLPT("AppleJuice eMule [")) && StrStrI(username,_DLPT("]")) //5/2007
+		*/
+//zz_fly Start korea
+		||_tcsstr(username, _DLPT("DONKEY2007")) //korea
+		||_tcsstr(username, _DLPT("www.Freang.com"))
+		||_tcsstr(username, _DLPT("www.pruna.com"))
+		||_tcsstr(username, _DLPT("[KOREA]"))
+		||_tcsstr(username, _DLPT("superemule"))
+		||_tcsstr(username, _DLPT("PRUNA 2008"))
+		||_tcsstr(username, _DLPT("MOYAM"))
+		||_tcsstr(username, _DLPT("eDonkey2009")) 
+//zz_fly End
+		)
+		return _DLPT("Bad USERNAME");
+
+	//bad mods, where every second sign is
+	//enough to check two places
+
+	if(_tcslen(username) >=4 
+		&&	(unsigned char)username[3]<=0x1F
+		&& (unsigned char)username[1]<=0x1F
+		)
+		return _DLPT("Community-Username"); //community (based on LSD or it's smasher)
+
+	if(_tcslen(username) >=4 
+		&& username[0]==_DLPT('v')
+		&& StrStr(username, _DLPT(":com "))
+		)
+		return _DLPT("X-Treme");
+
+	return NULL;
+}
+
+LPCTSTR __declspec(dllexport) DLPCheckNameAndHashAndMod(CString username, CString& userhash, CString& modversion)
+{
+	if(username.IsEmpty() || userhash.IsEmpty())
+		return NULL;
+//zz_fly Start
+	//Fake VeryCD
+	if((_tcsstr(modversion,_DLPT("VeryCD 071107")) || _tcsstr(modversion,_DLPT("VeryCD 080307")) )
+		&& _tcsstr(username, _DLPT("[CHN][VeryCD]yourname")) ) //all fake VeryCD have a default username
+		return _DLPT("Fake VeryCD"); 
+
+	//community userhash check 
+	static const DLPTCHAR refuserhash0[] = _DLPT("154CE646120E96CC798C439A20D26F8D"); // (windows ue)
+	static const DLPTCHAR refuserhash1[] = _DLPT("455361F9D95C3CD7E6BF2192D1CB3D02"); // (windows ue)
+	static const DLPTCHAR refuserhash2[] = _DLPT("C8B5F41441C615FBABAD9A7E55294D01");
+	static const DLPTCHAR refuserhash6[] = _DLPT("A2221641460E961C8B7FF21A53FB6F6C"); //**Riso64Bit**
+	static const DLPTCHAR refuserhash7[] = _DLPT("888F4742450EF75F9DD8B7E53FA06FF0"); //**Riso64Bit**
+	static const DLPTCHAR refuserhash8[] = _DLPT("0B76CC42CB0E81B0DC6120D2BCB36FF9"); //**Riso64Bit**
+    static const DLPTCHAR refuserhash9[] = _DLPT("EAA383FD9E0E68538C7AC8AD15526F7A"); //**Riso64Bit**
+	static const DLPTCHAR refuserhash10[]= _DLPT("65C3B2E8940E582630A7F58AF9F26F9E"); //from TaiWan
+	if(_tcsicmp(userhash,refuserhash0)==0 || _tcsicmp(userhash,refuserhash1)==0 || _tcsicmp(userhash,refuserhash2)==0 
+		|| _tcsicmp(userhash,refuserhash6)==0 || _tcsicmp(userhash,refuserhash7)==0 || _tcsicmp(userhash,refuserhash8)==0
+		|| _tcsicmp(userhash,refuserhash9)==0 || _tcsicmp(userhash,refuserhash10)==0)
+		return _DLPT("Community Userhash");
+
+	//corrupt userhash check
+	static const DLPTCHAR refuserhash3[] = _DLPT("00000000000E00000000000000006F00");
+	static const DLPTCHAR refuserhash4[] = _DLPT("FE000000000E00000000000000006F00");
+	if(_tcsicmp(userhash,refuserhash3)==0 || _tcsicmp(userhash,refuserhash4)==0)
+		return _DLPT("Corrupt Userhash");
+
+	//community userhash check, thanks SquallATF 
+	static const DLPTCHAR refuserhash5[] = _DLPT("DA1CEEE05B0E5319B3B48CAED24C6F4A");
+	if(_tcsicmp(userhash,refuserhash5)==0)
+		return _DLPT("Bad Userhash");
+//zz_fly End
+
+	//Check for aedit
+	//remark: a unmodded emule can't send a space at last sign
+	if(modversion.IsEmpty() && username.Right(1)==CString(32))
+		return _DLPT("AEdit");
+
+	//Check for Hex-Modstring
+	if(IsTypicalHex(modversion))
+		return _DLPT("Hex-Modstring");
+
+	//community check
+	if(username.GetLength()>=7 && username.Right(1)==CString(']'))
+	{
+		/* no more needed
+		//check for gamer
+		//two checks should be enough.
+		if(username.Right(6).Left(1)==userhash.Mid(5,1)
+			&& username.Right(3).Left(1)==userhash.Mid(7,1)
+			)
+			return _DLPT("old united");
+		*/
+		
+		//check for special nickaddon
+		int find=username.ReverseFind(_DLPT('['));
+		if(find >= 0)
+		{
+			CString addon=username.Mid(find+1);
+			int endpos=addon.GetLength()-1;
+			if(addon.GetLength()>2)
+			{
+				//check for snake //12/2006
+				/* no more needed, better detection inside Xtreme
+				for(int i=0; i<endpos;i++)
+				{
+					if( !(addon.GetAt(i)>=_DLPT('0') && addon.GetAt(i)<=_DLPT('9')) )
+					{
+						i=endpos+1;
+					}
+				}
+				if(i==endpos)
+					return _DLPT("Snake");
+				*/
+			
+				//Chek for Hex (e.g. X-Treme)
+				if(IsTypicalHex(addon.Left(addon.GetLength()-1)))
+					return _DLPT("Hex-Code-Addon");
+			}
+			//zz_fly :: start (test method)
+			if(find == username.GetLength()-6){
+				bool bFoundRandomPadding = false;
+				_TINT ch;
+				for(int i=1;i<5;i++){
+					ch = username.GetAt(find+i);
+					if( _istpunct(ch) || /*_istspace(ch) ||*/ _istcntrl(ch)){
+						bFoundRandomPadding = true;
+						break;
+					}
+				}
+				if(bFoundRandomPadding && !modversion.IsEmpty() && (username.Find(_DLPT("http://emule-project.net ["))==0) && (find==25))
+					return _DLPT("TLH Community"); //username like "http://emule-project.net [random]"
+				if(bFoundRandomPadding && modversion.IsEmpty() && (find==username.Find(_DLPT('['))))
+					return _DLPT("GhostMod"); //username has a random padding [random], it should be a mod function, but there is no modstring
+				if(bFoundRandomPadding && (username.Find(_DLPT("Silver Surfer User"))==0) && (modversion.Find(_DLPT("Silver"))==-1))
+					return _DLPT("Fake Silver Surfer"); //**Riso64Bit** :: fake silver surfer
+			}
+			//zz_fly :: end
+		}
+	}
+
+	//thx cyrex
+	if(modversion.GetLength() == 10 && username.GetLength()>4 &&  
+	StrStr(username.Right(4),_DLPT("/]")) 
+	 && StrStr(username,_DLPT("[SE]")))
+		return _DLPT("Mystery ModString");
+
+	//zz_fly :: anti some modstring thief :: start
+	//if((username.Find(_DLPT("[CHN][VeryCD]["))==0) && (username.Right(1)==_DLPT(']')) && (username.ReverseFind(_DLPT('['))==13) &&
+	//	(modversion.IsEmpty() || (modversion.Find(_DLPT("VeryCD"))==-1)))
+	//	return _DLPT("Fake VeryCD (username)"); //username like [CHN][VeryCD][anystring]
+
+	if(modversion.IsEmpty())
+		return NULL;
+	
+#define NUMBERSOFSTRING 9
+	static const CString testModString[] = {CString("Xtreme"), CString("ScarAnge"), CString("Mephisto"), CString("MorphXT"), CString("EastShare"), CString("StulleMule"), /*_DLPT("Magic Ange"),*/ CString("DreaMule"), CString("X-Mod"), CString("RaJi")};
+	static const float testMinVer[] = {4.4f, 2.5f, 1.5f, 10.0f, 13.0f, 6.0f, /*3.0f,*/ 3.0f, 0.0f, 2.2f};
+	for(int i=0; i<NUMBERSOFSTRING; i++){
+		bool tag1 = (username.Find(CString('') + testModString[i]) != -1);
+		if(modversion.Find(testModString[i]) != -1) {
+			float version = (float)_tstof(modversion.Right(4));
+			if(!tag1 && ((testMinVer[i] == 0.0f) || (version == 9.7f) || (version >= testMinVer[i])))
+				return _DLPT("ModString Thief");
+		}
+		else if(tag1)
+			return _DLPT("ModString Thief");
+		//doubled  ... in username
+		int posl1 = username.Find(_DLPT(''));
+		int posl2 = username.ReverseFind(_DLPT(''));
+		if((posl1 != -1) && (posl2 - posl1 > 5) && ((username.GetAt(posl1 + 5) == _DLPT('')) || (username.GetAt(posl2 + 5) == _DLPT(''))))
+			return _DLPT("Bad Username Paddings");
+	}
+	//zz_fly :: end
+
+	return NULL; 
+}
+
+LPCTSTR __declspec(dllexport) DLPCheckMessageSpam(LPCTSTR messagetext)
+{
+	if(messagetext==NULL)
+		return NULL;
+
+	if(
+		_tcsstr(messagetext, _DLPT("ZamBoR")) ||
+		_tcsstr(messagetext, _DLPT("DI-Emule")) ||
+		_tcsstr(messagetext, _DLPT("Join the L33cher")) ||
+		_tcsstr(messagetext, _DLPT("eMule FX")) ||
+		_tcsstr(messagetext, _DLPT("---> ed2k://|file|Ketamine")) ||
+		_tcsstr(messagetext, _DLPT("robot from RIAA, you can't fight")) ||
+		_tcsstr(messagetext, _DLPT("agent from PeerFactor, she advises you to stop")) ||
+		_tcsstr(messagetext, _DLPT("bot from MPAA, you can't do anything against her")) ||
+		_tcsstr(messagetext, _DLPT("[Sangue-Suga]")) || //3 /2007
+		_tcsstr(messagetext, _DLPT("[te@m projekt")) || //5 /2007
+		_tcsstr(messagetext, _DLPT("eMule PRO Ultra")) || //8/2007 //include ultra 1 2 3
+		_tcsstr(messagetext, _DLPT("HyperMule")) || //8/2007
+		_tcsstr(messagetext, _DLPT("FXeMule")) ||
+		_tcsstr(messagetext, _DLPT("angelmule.com")) //**Riso64Bit**
+		)
+		return (_DLPT("Spam-Message"));
+
+	if(CString(messagetext).Trim().IsEmpty())
+		return (_DLPT("Spam-Message"));
+
+	return NULL;
+}
+
+LPCTSTR __declspec(dllexport) DLPCheckHelloTag(UINT tagnumber)
+{
+	LPCTSTR strSnafuTag=NULL;
+	switch(tagnumber)
+	{
+		case CT_UNKNOWNx12:
+		case CT_UNKNOWNx13:
+		case CT_UNKNOWNx14:
+		case CT_UNKNOWNx16:
+		case CT_UNKNOWNx17:
+		case CT_UNKNOWNxE6:			strSnafuTag=apszSnafuTag[0];break;//buffer=_DLPT("DodgeBoards");break;
+		case CT_UNKNOWNx15:			strSnafuTag=apszSnafuTag[1];break;//buffer=_DLPT("DodgeBoards & DarkMule |eVorte|X|");break;
+		case CT_UNKNOWNx22:			strSnafuTag=apszSnafuTag[2];break;//buffer=_DLPT("DarkMule v6 |eVorte|X|");break;
+		case CT_UNKNOWNx5D:
+		case CT_UNKNOWNx6B:
+		case CT_UNKNOWNx6C:			strSnafuTag=apszSnafuTag[17];break;
+		case CT_UNKNOWNx74:
+		case CT_UNKNOWNx87:			strSnafuTag=apszSnafuTag[17];break;
+		case CT_UNKNOWNxF0:
+		case CT_UNKNOWNxF4:			strSnafuTag=apszSnafuTag[17];break;
+			//case CT_UNKNOWNx69:			strSnafuTag=apszSnafuTag[3];break;//buffer=_DLPT("eMuleReactor");break;
+		case CT_UNKNOWNx79:			strSnafuTag=apszSnafuTag[4];break;//buffer=_DLPT("Bionic");break;
+		case CT_UNKNOWNx83:			strSnafuTag=apszSnafuTag[15];break;//buffer=_DLPT("Fusspi");break;
+		case CT_UNKNOWNx76:			
+		case CT_UNKNOWNxCD:			strSnafuTag=apszSnafuTag[16];break;//buffer=_DLPT("www.donkey2002.to");break;
+		case CT_UNKNOWNx88:
+				strSnafuTag=apszSnafuTag[5];//[LSD7c]
+			break;
+		case CT_UNKNOWNx8c:			strSnafuTag=apszSnafuTag[5];break;//buffer=_DLPT("[LSD7c]");break; 
+		case CT_UNKNOWNx8d:			strSnafuTag=apszSnafuTag[6];break;//buffer=_DLPT("[0x8d] unknown Leecher - (client version:60)");break;
+		case CT_UNKNOWNx99:			strSnafuTag=apszSnafuTag[7];break;//buffer=_DLPT("[RAMMSTEIN]");break;		//STRIKE BACK
+		case CT_UNKNOWNx97:
+		case CT_UNKNOWNx98:
+		case CT_UNKNOWNx9C:
+		case CT_UNKNOWNxDA:			strSnafuTag=apszSnafuTag[3];break;//buffer=_DLPT("eMuleReactor");break;
+		case CT_UNKNOWNxC8:			//Xman x4
+		case CT_UNKNOWNxCE:			//Xman 20.08.05
+		case CT_UNKNOWNxCF:			//Xman 20.08.05
+		case CT_UNKNOWNx94:			//Xman 20.08.05
+		case CT_UNKNOWNxc4:			strSnafuTag=apszSnafuTag[8];break;//buffer=_DLPT("[MD5 Community]");break;	//USED BY NEW BIONIC => 0x12 Sender
+		case CT_UNKNOWNxEC:			strSnafuTag=apszSnafuTag[18];break; //Xman x4 Speedmule
+		//case CT_FRIENDSHARING:		//STRIKE BACK
+			//break;
+		case CT_DARK:				//STRIKE BACK
+		case CT_UNKNOWNx7A:
+		case CT_UNKNOWNxCA:
+			strSnafuTag=apszSnafuTag[9];break;//buffer=_DLPT("new DarkMule");
+		case CT_UNKNOWNx4D:
+			strSnafuTag=apszSnafuTag[19];break;// pimp my mule misuse an official tag in hello
+		case CT_UNKNOWNxD2:
+			strSnafuTag=apszSnafuTag[20];break;//SquallATF
+		//case CT_UNKNOWNx85:
+		//	strSnafuTag=apszSnafuTag[21];break;//zz_fly
+	}
+
+	return strSnafuTag;
+}
+
+LPCTSTR __declspec(dllexport) DLPCheckInfoTag(UINT tagnumber)
+{
+	LPCTSTR strSnafuTag=NULL;
+
+	switch(tagnumber)
+	{
+	case ET_MOD_UNKNOWNx12:
+	case ET_MOD_UNKNOWNx13:
+	case ET_MOD_UNKNOWNx14:
+	case ET_MOD_UNKNOWNx17:		strSnafuTag=apszSnafuTag[0];break;//("[DodgeBoards]")
+	case ET_MOD_UNKNOWNx2F:		strSnafuTag=apszSnafuTag[10];break;//buffer=_DLPT("[OMEGA v.07 Heiko]");break;
+	case ET_MOD_UNKNOWNx36:
+	case ET_MOD_UNKNOWNx5B:
+	case ET_MOD_UNKNOWNxA6:		strSnafuTag=apszSnafuTag[11];break;//buffer=_DLPT("eMule v0.26 Leecher");break;
+	case ET_MOD_UNKNOWNx60:		strSnafuTag=apszSnafuTag[12];break;//buffer=_DLPT("[Hunter]");break; //STRIKE BACK
+	case ET_MOD_UNKNOWNx76:		strSnafuTag=apszSnafuTag[0];break;//buffer=_DLPT("[DodgeBoards]");break;
+	case ET_MOD_UNKNOWNx50:		
+	case ET_MOD_UNKNOWNxB1:		
+	case ET_MOD_UNKNOWNxB4:		
+	case ET_MOD_UNKNOWNxC8:		
+	case ET_MOD_UNKNOWNxC9:		strSnafuTag=apszSnafuTag[13];break;//buffer=_DLPT("[Bionic 0.20 Beta]");break;
+	case ET_MOD_UNKNOWNxDA:		strSnafuTag=apszSnafuTag[14];break;//buffer=_DLPT("[Rumata (rus)(Plus v1f)]");break;
+	}
+
+	return strSnafuTag;
+}
+
+/* DLP for Unix API */
+
+char* DLPCheck(const char* modversion, const char* clientversion, const char* username, const char* userhash, UINT tagnumber){
+	static char ret[1001] = {0};
+	const char* tmp;
+	CString modver(modversion);
+	CString clientver(clientversion);
+	CString uname(username);
+	CString uhash(userhash);
+	if((tmp = DLPCheckNameAndHashAndMod(uname, uhash, modver)) != NULL) {
+		snprintf(ret, 1000, "[NameHashMod %s]", tmp);
+	}
+	else if ((tmp = DLPCheckModstring_Hard(modversion, clientversion)) != NULL) {
+		snprintf(ret, 1000, "[Modstring_Hard %s]", tmp);
+	}
+	else if((tmp = DLPCheckModstring_Soft(modversion, clientversion)) != NULL) {
+		snprintf(ret, 1000, "[Modstring_Soft %s]", tmp);
+	}
+	else if((tmp = DLPCheckUsername_Hard(username)) != NULL) {
+		snprintf(ret, 1000, "[Username_Hard %s]", tmp);
+	}
+	else if((tmp = DLPCheckUsername_Soft(username)) != NULL) {
+		snprintf(ret, 1000, "[Username_Soft %s]", tmp);
+	}
+	else if((tmp = DLPCheckHelloTag(tagnumber)) != NULL) {
+		snprintf(ret, 1000, "[HelloTag %s]", tmp);
+	}
+	else {
+		return NULL;
+	}
+	
+	return ret;
+}
--- src/antiLeech_STL.h	1970-01-01 08:00:00.000000000 +0800
+++ src/antiLeech_STL.h	2009-10-18 22:49:19.000000000 +0800
@@ -0,0 +1,354 @@
+/********************************************************************
+** STL HEAH FILE USE FOR 徐岩柏
+** Copyright(c) 2001 -2003
+**-------------------------------------------------------------
+Filename: 	stl.h
+Author	:	徐岩柏
+Email		baikeley@hotmail.com		
+Date：		2001-4-29
+If you find any bug or you want to add some useful function 
+please email to me.Redistribution and use in source are permitted
+provided that: source distributions retain this entire copyright
+notice and comment.
+如果你在使用中发现BUG或添加了功能，请Email我。你可以使用与发布该文件
+，但不得进行商业用途。你的发布要包含完整的本文件头。
+*********************************************************************/
+#ifndef STL_H_BAIKELKEY
+#define STL_H_BAIKELKEY
+
+#include "string.h"
+
+#include <iostream>
+
+#include <string>
+
+#include <algorithm>
+#include <vector>
+
+#include <cctype>   //isalpha()
+#include <new>
+#include <cstdarg>  //number not knowing arguments.such as :pringf
+#include <utility>
+#include <cstdio>
+#include <cstdlib>
+#include <cassert>
+
+#include <stdexcept>
+
+#define _min(a,b) ((a)<(b)?(a):(b))
+#define _max(a,b) ((a)>(b)?(a):(b))
+#define bzero(ptr,n) memset(ptr,0,n)
+//////////以下是一个string的包装类/////////////////////
+class CString : public std::string  
+{	
+public:
+	int Delete( int nIndex, int nCount = 1 )
+	{
+		this->erase(nIndex,nCount);
+		return this->GetLength();
+	}
+	int Insert( int nIndex, const char * pstr )
+	{
+		this->insert(nIndex,pstr);
+		return this->GetLength();	
+	}
+	int Insert( int nIndex, char ch )
+	{	
+		CString strTmp(ch);
+		this->insert(nIndex,strTmp);
+		strTmp.Empty();
+		return this->GetLength();
+	}
+	int Remove( char ch )
+	{
+		CString::iterator iter;
+		int count = 0;
+		for(iter = this->begin(); iter != this->end();iter ++)
+		{
+			if(*iter == ch)
+			{
+				this->erase(iter);count++;
+			}
+		}
+		return count;
+	}
+	void MakeReverse( )
+	{
+		CString strTmp;
+		CString::iterator iter;
+		iter=this->end();
+		iter--;
+		for(; iter != this->begin(); iter--)
+		{
+			strTmp += *iter;
+		}
+		strTmp += *iter;
+		*this = strTmp;
+		strTmp.Empty();
+	}
+	int Find( char ch ) const
+	{
+		return this->find(ch);
+	}
+	int Find( const char * lpszSub ) const
+	{
+		return this->find(lpszSub);
+	}
+	int Find( char ch, int nStart ) const
+	{
+		return this->find(ch,nStart);
+	}
+	int Find( const char * pstr, int nStart ) const
+	{
+		return this->find(pstr,nStart);
+	}
+	int ReverseFind( char ch ) const
+	{
+		return this->find_last_of(ch);	
+	}
+	int FindOneOf( const char * lpszCharSet ) const
+	{
+		return this->find_first_of(lpszCharSet);
+	}
+	int GetLength() const
+	{
+		return this->length();
+	}
+	CString Left(int nCount) const
+	{
+		if (nCount <=0) 
+			return CString("");	
+		CString strTmp;
+		strTmp = this->substr(0,nCount);
+		return strTmp;
+	}
+	CString Right(int nCount) const
+	{
+		if (nCount <=0) 
+			return CString("");
+		CString strTmp;
+		if (nCount > GetLength())
+			strTmp = this->substr(0);
+		else
+			strTmp = this->substr(GetLength()-nCount);
+		return strTmp;
+	}
+	/*
+	int Right(int nCount)
+	{
+		return GetAt(GetLength() - 1);
+	}
+	*/
+	CString Mid(int nFirst) const
+	{
+		CString strTmp;
+		if (nFirst >= GetLength())
+			return CString("");
+		if (nFirst <= 0)
+			strTmp = this->substr(0);
+		else
+			strTmp = this->substr(nFirst);
+		return strTmp;		
+	}
+	CString Mid( int nFirst, int nCount) const
+	{
+		if (nCount <= 0) 
+			return CString("");
+		if (nFirst >= GetLength())
+			return CString("");
+		CString strTmp;
+		if (nFirst <= 0)
+			strTmp = this->substr(0,nCount);
+		else
+			strTmp = this->substr(nFirst,nCount);
+		return strTmp;				
+	}
+	CString& operator=(const std::string str)
+	{
+		if (this->compare(str) == 0) return *this;
+		this->assign(str);
+		return *this;
+	}
+	CString& operator=(char ch)
+	{
+		this->Empty();
+		this->insert(this->begin(),ch);
+		return *this;
+	}
+	CString& operator =( const char * lpsz )
+	{
+		this->Empty();
+		this->append(lpsz);
+		return *this;
+	}
+	void MakeUpper()
+	{
+		std::transform(this->begin (),
+			this->end (),this->begin (),
+			toupper);
+	}
+	void MakeLower()
+	{
+		std::transform(this->begin (),
+			this->end (),this->begin (),
+			tolower);
+	}
+	bool IsEmpty( ) const
+	{
+		return this->empty(); 
+	}
+	void Empty( )
+	{//清除
+		this->erase(this->begin(),this->end());
+	}
+	char GetAt( int nIndex ) const
+	{
+		char ret;
+		try {
+			ret = this->at(nIndex);
+		}
+		catch (std::out_of_range &e) {
+			ret = 0;
+			printf("%s(%d) %s: %s\n", __FILE__, __LINE__, __FUNCTION__, e.what());
+		}
+		return ret;
+	}
+	char operator []( int nIndex ) const
+	{
+		return this->at(nIndex);
+	}
+	void SetAt( int nIndex, char ch )
+	{
+		this->at(nIndex) = ch;
+	}
+	operator const char * ( ) const
+	{
+		return this->c_str();
+	}
+	friend CString operator + (const CString& string1, const CString& string2)
+	{
+		CString str;
+		str.append(string1);
+		str.append(string2);
+		return str;
+	}
+	friend CString operator + ( const CString& string1, char ch )
+	{
+		CString str;
+		str.append(string1);
+		str.insert(str.end(),ch);
+		return str;
+	}
+	friend CString operator + ( const CString& string1, char* ch )
+	{
+		CString str;
+		str.append(string1);
+		str.append(ch);
+		return str;
+	}
+	int Compare( const char * lpsz ) const
+	{
+		CString str;
+		str.append(lpsz);
+		return this->compare(str);
+	}
+	int Compare( const CString& string1 ) const
+	{
+		return this->compare(string1);
+	}
+	int CompareNoCase( const char * lpsz ) const
+	{
+		CString str,strThis;
+		str.append(lpsz);
+		strThis = (*this);
+		str.MakeLower();
+		strThis.MakeLower();
+		return strThis.compare(str);
+	}
+	int CompareNoCase( const CString& string1 ) const
+	{
+		CString str,strThis;
+		str = string1;
+		strThis = (*this);
+		str.MakeLower();
+		strThis.MakeLower();
+		return strThis.compare(str);
+	}
+	void TrimRight( )
+	{
+		TrimRight (' ');
+	}
+	void TrimLeft( )
+	{   
+		TrimLeft(' ');
+	}
+	CString Trim()
+	{
+		CString ret;
+		ret = *this;
+		ret.TrimLeft();
+		ret.TrimRight();
+		return ret;
+	}
+	void TrimLeft( char chTarget )
+	{
+		std::string::size_type pos;
+		pos = this->find_first_not_of(chTarget);
+		if (pos == 0) return; 
+		this->erase(this->begin(),this->begin()+pos);		
+	}
+	void TrimRight( char chTarget )
+	{
+		std::string::size_type pos;
+		pos = this->find_last_not_of(chTarget);
+		++pos;
+		if (pos == this->GetLength())
+			return; 
+		this->erase(this->begin()+pos,this->end());		
+	}
+	void Replace( char chOld, char chNew )
+	{
+		for(int i=0;i<this->GetLength();i++)
+		{
+			if (this->at(i) == chOld)
+				this->at(i) = chNew;
+		}		
+	}
+	void Replace(const char* chOld,const char* chNew )
+	{
+		int index = this->find(chOld);
+		while (index > -1)
+		{
+			this->erase(index,strlen(chOld));
+			this->insert(index,chNew);
+			index = this->find(chOld);
+		}
+	}
+	/*		
+	char * GetBuffer( int nMinBufLength )
+	{
+		this->resize(nMinBufLength);
+		return this->begin();
+	}
+	*/
+	void ReleaseBuffer( int nNewLength = -1 )
+	{
+		this->TrimRight('\0');
+	}
+	CString(const CString& string1)
+	{
+		this->append(string1);
+	}
+	CString(const char *ch)
+	{
+		this->append(ch);
+	}
+	CString(const char ch)
+	{
+		*this += ch;
+	}
+	CString()
+	{}
+};
+#endif
+
--- src/UploadQueue.cpp	2009-03-29 03:29:59.000000000 +0800
+++ src/UploadQueue.cpp	2009-10-18 14:37:33.000000000 +0800
@@ -23,6 +23,8 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA
 //
 
+#include "antiLeech.cpp"
+
 #include "UploadQueue.h"	// Interface declarations
 
 #include <protocol/Protocols.h>
@@ -313,6 +315,61 @@
 	if ( client->IsBanned() ) {
 		return;
 	}
+	
+	// DLP Start
+	char *dlp_result;
+	char modstring[201] = {0};
+	char clientstring[201] = {0};
+	char username[201] = {0};
+	char userhash[101] = {0};
+	
+	strncpy(modstring, client->GetClientModString().mb_str(wxConvUTF8), 200);
+	strncpy(clientstring, client->GetClientVerString().mb_str(wxConvUTF8), 200);
+	strncpy(username, client->GetUserName().mb_str(wxConvUTF8), 200);
+	strncpy(userhash, client->GetUserHash().EncodeSTL().c_str(), 100);
+	
+	dlp_result = DLPCheck(modstring, clientstring, username, userhash, client->GetClientSoft());
+	if (dlp_result != NULL) {
+		char info[1001] = {0};
+		char tmp[1001] = {0};
+		strncpy(tmp, client->GetClientFullInfo().mb_str(wxConvUTF8), 1000);
+		snprintf(info, 1000, "%s %s (%.2x/(null)/(null))", dlp_result, tmp, client->GetClientSoft());
+		theApp->clientlist->AddBannedClient(client->GetIP());
+		wxString winfo(info, wxConvUTF8);
+		theApp->AddDLPMessageLine(winfo);
+		return ;
+	}
+#ifdef __DEBUG__
+	else {
+		printf("------DLP------\n");
+		AddLogLineM(true, client->GetClientFullInfo());
+		printf("tag=%.2x, userhash=%s\n", client->GetClientSoft(), client->GetUserHash().EncodeSTL().c_str());
+		AddLogLineM(true, client->GetSoftStr());
+		AddLogLineM(true, client->GetSoftVerStr());
+		AddLogLineM(true, client->GetClientModString());
+		AddLogLineM(true, client->GetClientVerString());
+		AddLogLineM(true, client->GetVersionString());
+		printf("------DLP------\n");
+	}
+#endif
+	/* GetSoftStr()
+	 * GetSoftVerStr()
+	 * GetClientModString() ModVersion
+	 * GetClientVerString() ClientVersion
+	 * GetVersionString()
+2009-10-16 13:24:23: UploadQueue.cpp(325): eMule
+2009-10-16 13:24:23: UploadQueue.cpp(326): v0.48a - VeryCD 080902
+2009-10-16 13:24:23: UploadQueue.cpp(327): VeryCD 080902
+2009-10-16 13:24:23: UploadQueue.cpp(328): eMule v0.48a - VeryCD 080902
+2009-10-16 13:24:23: UploadQueue.cpp(329): v0.48a
+* 
+2009-10-16 13:23:31: UploadQueue.cpp(325): New MLDonkey
+2009-10-16 13:23:31: UploadQueue.cpp(326): v2.9d
+2009-10-16 13:23:31: UploadQueue.cpp(327): 
+2009-10-16 13:23:31: UploadQueue.cpp(328): New MLDonkey v2.9d
+2009-10-16 13:23:31: UploadQueue.cpp(329): v2.9d
+	*/
+	// DLP End
 
 	client->AddAskedCount();
 	client->SetLastUpRequest();
--- src/ServerWnd.h	2009-03-29 03:29:59.000000000 +0800
+++ src/ServerWnd.h	2009-10-17 12:53:15.000000000 +0800
@@ -50,6 +50,7 @@
 	void OnBnClickedUpdateservermetfromurl(wxCommandEvent& evt);
 	void OnBnClickedResetLog(wxCommandEvent& evt);
 	void OnBnClickedResetServerLog(wxCommandEvent& evt);
+	void OnBnClickedResetDLPLog(wxCommandEvent& evt);
 
 	DECLARE_EVENT_TABLE()
 };
--- src/ServerWnd.cpp	2009-03-29 03:29:59.000000000 +0800
+++ src/ServerWnd.cpp	2009-10-17 13:45:09.000000000 +0800
@@ -47,6 +47,7 @@
 	EVT_BUTTON(ID_BTN_RESET, CServerWnd::OnBnClickedResetLog)
 	EVT_BUTTON(ID_BTN_RESET_SERVER, CServerWnd::OnBnClickedResetServerLog)
 	EVT_SPLITTER_SASH_POS_CHANGED(ID_SRV_SPLITTER,CServerWnd::OnSashPositionChanged)
+	EVT_BUTTON(ID_BTN_RESET_DLP, CServerWnd::OnBnClickedResetDLPLog)
 END_EVENT_TABLE()
 
 	
@@ -153,6 +154,11 @@
 	theApp->GetServerLog(true); // Reset it
 }
 
+void CServerWnd::OnBnClickedResetDLPLog(wxCommandEvent& WXUNUSED(evt))
+{
+	wxTextCtrl* cv= CastByID( ID_DLPINFO, this, wxTextCtrl );
+	cv->Clear();
+}
 
 void CServerWnd::UpdateED2KInfo()
 {
--- src/amuleDlg.h	2009-03-29 03:29:59.000000000 +0800
+++ src/amuleDlg.h	2009-10-17 12:00:55.000000000 +0800
@@ -115,6 +115,7 @@
 
 	void AddLogLine(bool addtostatusbar, const wxString& line);
 	void AddServerMessageLine(wxString& message);
+	void AddDLPMessageLine(wxString& msg);
 	void ResetLog(int id);
 	
 	void ShowUserCount(const wxString& info = wxEmptyString);
@@ -232,7 +233,7 @@
 	wxZipEntry *entry;
 	ZipCatalog cat;
 
-	PageType m_logpages[4];
+	PageType m_logpages[5];
 	PageType m_networkpages[2];
 
 	bool LoadGUIPrefs(bool override_pos, bool override_size); 
--- src/amuleDlg.cpp	2009-03-29 03:29:59.000000000 +0800
+++ src/amuleDlg.cpp	2009-10-17 12:00:49.000000000 +0800
@@ -283,7 +283,7 @@
 	wxNotebook* logs_notebook = CastChild( ID_SRVLOG_NOTEBOOK, wxNotebook);
 	wxNotebook* networks_notebook = CastChild( ID_NETNOTEBOOK, wxNotebook);
 	
-	wxASSERT(logs_notebook->GetPageCount() == 4);
+	wxASSERT(logs_notebook->GetPageCount() == 5);
 	wxASSERT(networks_notebook->GetPageCount() == 2);
 	
 	for (size_t i = 0; i < logs_notebook->GetPageCount(); ++i) {
@@ -638,6 +638,18 @@
 	}
 }
 
+void CamuleDlg::AddDLPMessageLine(wxString& msg)
+{
+	wxTextCtrl* cv = CastByID( ID_DLPINFO, m_serverwnd, wxTextCtrl );
+	if(cv) {
+		if (msg.Length() > 500) {
+			cv->AppendText(msg.Left(500) + wxT("\n"));
+		} else {
+			cv->AppendText(msg + wxT("\n"));
+		}
+		cv->ShowPosition(cv->GetLastPosition()-1);
+	}
+}
 
 void CamuleDlg::ShowConnectionState(bool skinChanged)
 {
@@ -1436,6 +1448,8 @@
 		logs_notebook->AddPage(m_logpages[3].page, m_logpages[3].name);
 	}
 	
+	logs_notebook->AddPage(m_logpages[4].page, m_logpages[4].name);
+	
 	m_networkpages[1].page->Show(thePrefs::GetNetworkKademlia());		
 
 	networks_notebook->Show(thePrefs::GetNetworkED2K() && thePrefs::GetNetworkKademlia());
--- src/amule.h	2009-09-10 04:46:31.000000000 +0800
+++ src/amule.h	2009-10-17 15:30:13.000000000 +0800
@@ -347,6 +347,7 @@
 	wxString GetLog(bool reset = false);
 	wxString GetServerLog(bool reset = false);
 	void AddServerMessageLine(wxString &msg);
+	void AddDLPMessageLine(wxString &msg);
 	DECLARE_EVENT_TABLE()
 };
 
@@ -470,6 +471,8 @@
 	
 	void OnLoggingEvent(CLoggingEvent& evt);
 	
+	void AddDLPMessageLine(wxString &msg);
+	
 	DECLARE_EVENT_TABLE()
 	
 	wxAppTraits *CreateTraits();
--- src/amuled.cpp	2009-09-10 04:46:31.000000000 +0800
+++ src/amuled.cpp	2009-10-17 15:29:26.000000000 +0800
@@ -764,4 +764,8 @@
 	CamuleApp::AddLogLine(evt.Message());
 }
 
+void CamuleDaemonApp::AddDLPMessageLine(wxString &msg)
+{
+}
+
 // File_checked_for_headers
--- src/muuli_wdr.h	2008-08-05 19:12:49.000000000 +0800
+++ src/muuli_wdr.h	2009-10-17 10:30:16.000000000 +0800
@@ -339,6 +339,10 @@
 #define ID_BTN_RESET_SERVER 10244
 wxSizer *ServerInfoLog( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE );
 
+#define ID_DLPINFO 22001
+#define ID_BTN_RESET_DLP 22002
+wxSizer *DLPInfoLog( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE );
+
 #define ID_LOGVIEW 10245
 #define ID_BTN_RESET 10246
 wxSizer *aMuleLog( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE );
--- src/muuli_wdr.cpp	2009-03-02 04:11:05.000000000 +0800
+++ src/muuli_wdr.cpp	2009-10-17 12:00:10.000000000 +0800
@@ -2865,6 +2865,42 @@
     return item0;
 }
 
+wxSizer *DLPInfoLog( wxWindow *parent, bool call_fit, bool set_sizer )
+{
+    wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );
+
+    wxBoxSizer *item1 = new wxBoxSizer( wxHORIZONTAL );
+
+    wxStaticBitmap *item2 = new wxStaticBitmap( parent, -1, amuleDlgImages( 3 ), wxDefaultPosition, wxDefaultSize );
+    item2->SetToolTip( _("Display DLP log") );
+    item1->Add( item2, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    wxStaticText *item3 = new wxStaticText( parent, -1, _("DLP Info"), wxDefaultPosition, wxDefaultSize, 0 );
+    item1->Add( item3, 0, wxALIGN_CENTER|wxALL, 5 );
+
+    item0->Add( item1, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+    wxBoxSizer *item4 = new wxBoxSizer( wxHORIZONTAL );
+
+    CMuleTextCtrl *item5 = new CMuleTextCtrl( parent, ID_DLPINFO, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxVSCROLL );
+    item4->Add( item5, 1, wxGROW|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+    wxButton *item6 = new wxButton( parent, ID_BTN_RESET_DLP, _("Reset"), wxDefaultPosition, wxDefaultSize, 0 );
+    item6->SetToolTip( _("Click this button to reset the log.") );
+    item4->Add( item6, 0, wxGROW|wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
+
+    item0->Add( item4, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );
+
+    if (set_sizer)
+    {
+        parent->SetSizer( item0 );
+        if (call_fit)
+            item0->SetSizeHints( parent );
+    }
+    
+    return item0;
+}
+
 wxSizer *serverListDlgDown( wxWindow *parent, bool call_fit, bool set_sizer )
 {
     wxStaticBox *item1 = new wxStaticBox( parent, -1, wxT("") );
@@ -2880,7 +2916,7 @@
     wxPanel *item4 = new wxPanel( item3, -1 );
     aMuleLog( item4, FALSE );
     item3->AddPage( item4, _("aMule Log") );
-
+	
     wxPanel *item5 = new wxPanel( item3, -1 );
     ServerInfoLog( item5, FALSE );
     item3->AddPage( item5, _("Server Info") );
@@ -2892,6 +2928,10 @@
     wxPanel *item7 = new wxPanel( item3, -1 );
     Kad_Info( item7, FALSE );
     item3->AddPage( item7, _("Kad Info") );
+	
+	wxPanel *item8 = new wxPanel( item3, -1);
+	DLPInfoLog( item8, FALSE);
+	item3->AddPage(item8, _("DLP Info"));
 
     item0->Add( item2, 1, wxGROW|wxALIGN_CENTER_VERTICAL, 5 );
 
--- src/amule-gui.cpp	2009-09-10 04:46:31.000000000 +0800
+++ src/amule-gui.cpp	2009-10-18 13:31:28.000000000 +0800
@@ -324,6 +324,19 @@
 	CamuleApp::AddServerMessageLine(msg);
 }
 
+void CamuleGuiApp::AddDLPMessageLine(wxString &msg)
+{
+	wxString message;
+	time_t rawtime;
+	struct tm *timeinfo;
+	char tbuf[101];
+	time(&rawtime);
+	timeinfo = localtime(&rawtime);
+	strftime(tbuf, 100, "%Y-%m-%d %X: ", timeinfo);
+	
+	message = wxString(tbuf, wxConvUTF8) + msg;
+	amuledlg->AddDLPMessageLine(message);
+}
 
 void CamuleGuiApp::OnLoggingEvent(CLoggingEvent& evt)
 {
--- po/zh_CN.po	2009-09-17 05:03:29.000000000 +0800
+++ po/zh_CN.po	2009-10-17 14:23:16.000000000 +0800
@@ -5663,6 +5663,9 @@
 msgid "Server Info"
 msgstr "服务器信息"
 
+msgid "DLP Info"
+msgstr "动态反吸血信息"
+
 #: src/muuli_wdr.cpp:2749 src/muuli_wdr.cpp:2784
 msgid "Click this button to reset the log."
 msgstr "按此按钮清空日志."

