--- src/antiLeech.h	1970-01-01 08:00:00.000000000 +0800
+++ src/antiLeech.h	2009-12-08 21:58:10.000000000 +0800
@@ -0,0 +1,132 @@
+#ifndef __ANTILEECH_H__
+#define __ANTILEECH_H__
+
+#define DLPVERSION 3904
+
+#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);
+
+	LPCTSTR __declspec(dllexport) DLPCheckVeryCDeMule(CString& modversion);
+	LPCTSTR __declspec(dllexport) DLPCheckEasyMule(CString& modversion);
+
+	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]
+
+/* Define DLPCheck prefs arg */
+#define PF_MODSTRING	0x1
+#define PF_USERHASH		0x2
+#define PF_USERNAME		0x4
+#define PF_HELLOTAG		0x8
+#define PF_INFOTAG		0x10
+#define PF_VERYCDEMULE	0x20
+#define PF_EASYMULE		0x40
+
+#endif	// End __ANTILEECH_H__
--- src/antiLeech_unix.h	1970-01-01 08:00:00.000000000 +0800
+++ src/antiLeech_unix.h	2009-12-08 22:05:19.000000000 +0800
@@ -0,0 +1,41 @@
+#ifndef __ANTILEECH_UNIX_H__
+#define __ANTILEECH_UNIX_H__
+
+#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)
+#define StrCmpI _tcsicmp
+
+
+int _istcntrl(char c);
+int _istpunct(char c);
+int _istspace(char c);
+int _istdigit(char c);
+int _istxdigit(char c);
+double _tstof(const char* str);
+void tolowers(char* str);
+const char* _tcsstr(const char* a, const char* b);
+size_t _tcslen(const char* str);
+const char* StrStr(const char* a, const char* b);
+const char* StrStrI(const char* a, const char* b);
+int _tcsicmp(const char* a, const char* b);
+
+#include "antiLeech_CString.h"
+
+#endif	// __ANTILEECH_UNIX_H__
--- src/antiLeech_unix.cpp	1970-01-01 08:00:00.000000000 +0800
+++ src/antiLeech_unix.cpp	2009-12-08 22:04:19.000000000 +0800
@@ -0,0 +1,72 @@
+#include "antiLeech.h"
+
+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);
+}
+
+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;
+}
--- src/antiLeech.cpp	1970-01-01 08:00:00.000000000 +0800
+++ src/antiLeech.cpp	2009-12-08 22:02:14.000000000 +0800
@@ -0,0 +1,1393 @@
+//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_unix.cpp"
+
+#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("Safty�s"))||
+		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("M�rph"))||
+		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("20080409")) || _tcsstr(modversion, _DLPT("20080409")) || //Added by Bill Lee.
+		_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("Ch�m�r�"))||
+		StrStrI(modversion, _DLPT("�h�mer�"))||
+		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
+		||
+		// greensea Start
+		_tcsstr(modversion, _DLPT("20080409"))	// Bill Lee post at http://forum.ubuntu.org.cn/viewtopic.php?f=73&t=232845&p=1593958#p1593958
+		// greensea 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("Safty�s"))||
+		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;
+}
+
+/* Check VeryCD eMule and easyMule */
+
+LPCTSTR __declspec(dllexport) DLPCheckVeryCDeMule(CString& modversion)
+{
+	if (StrStrI(modversion, _DLPT("VeryCD"))) {
+		return  _DLPT("VeryCD eMule");
+	}
+	else {
+		return NULL;
+	}
+}
+
+LPCTSTR __declspec(dllexport) DLPCheckEasyMule(CString& modversion)	
+{	
+	if (StrStrI(modversion, _DLPT("easyMule"))) {
+		return _DLPT("easyMule");
+	}
+	else {
+		return NULL;
+	}
+}
+/* DLP for Unix API */
+
+char* DLPCheck(const char* modversion, const char* clientversion, const char* username, const char* userhash, UINT tagnumber, unsigned int prefs){
+	static char ret[512] = {0};
+	const char* tmp = NULL;
+	
+	CString modver(modversion);
+	CString clientver(clientversion);
+	CString uname(username);
+	CString uhash(userhash);
+	
+	// Check bad modstring
+	if (prefs & PF_MODSTRING) {
+		if((tmp = DLPCheckModstring_Soft(modversion, clientversion)) != NULL) {
+			snprintf(ret, 500, "[Modstring_Soft %s]", tmp);
+		}
+		else if((tmp = DLPCheckModstring_Hard(modversion, clientversion)) != NULL) {
+			snprintf(ret, 500, "[Modstring_Hard %s]", tmp);
+		}
+	}
+	
+	if ((prefs & PF_USERHASH) && (tmp == NULL)) {
+		// not finished
+	}
+	
+	// Check bad username
+	if ((prefs & PF_USERNAME) && (tmp == NULL)) {
+		if ((tmp = DLPCheckNameAndHashAndMod(uname, uhash, modver)) != NULL) {
+				snprintf(ret, 500, "[NameHashMod %s]", tmp);
+		}
+		else if((tmp = DLPCheckUsername_Hard(username)) != NULL) {
+			snprintf(ret, 500, "[Username_Hard %s]", tmp);
+		}
+		else if((tmp = DLPCheckUsername_Soft(username)) != NULL) {
+			snprintf(ret, 500, "[Username_Soft %s]", tmp);
+		}
+	}
+	
+	// Check HelloTag
+	if ((prefs & PF_HELLOTAG) && (tmp == NULL)) {
+		if((tmp = DLPCheckHelloTag(tagnumber)) != NULL) {
+			snprintf(ret, 500, "[HelloTag %s]", tmp);
+		}
+	}
+	
+	// Check InfoTag
+	if ((prefs & PF_INFOTAG) && (tmp == NULL)) {
+		if((tmp = DLPCheckInfoTag(tagnumber)) != NULL) {
+			snprintf(ret, 500, "[InfoTag %s]", tmp);
+		}
+	}
+	
+	// Check easyMule
+	if ((prefs & PF_EASYMULE) && (tmp == NULL)) {
+		if ((tmp = DLPCheckEasyMule(modver)) != NULL) {
+			snprintf(ret, 500, "[easyMule]");
+		}
+	}
+	
+	// Check VeryCD eMule
+	if ((prefs & PF_VERYCDEMULE) && (tmp == NULL)) {
+		if ((tmp = DLPCheckVeryCDeMule(modver)) != NULL) {
+			snprintf(ret, 500, "[VeryCD eMule]");
+		}
+	}
+		
+	if (tmp == NULL) {
+		return NULL;
+	}
+	else {
+		return ret;
+	}
+}
--- src/antiLeech_CString.h	1970-01-01 08:00:00.000000000 +0800
+++ src/antiLeech_CString.h	2009-12-08 21:59:19.000000000 +0800
@@ -0,0 +1,214 @@
+/**
+ * Author:	greensea <gs@bbxy.net> @Guangxi.Baise
+ * Date:	2009-11-30
+ * License:	BSD License
+ * 
+ * CString class for DLP
+ * 
+ * This class is ONLY written for DLP, functions not called by DLP is NOT written.
+ * 
+ * 该 CString 类仅仅是为了在 Linux 下编译 DLP 而写的，只实现了 DLP 需要调用的 CString 函数，其他 CString 函数没有实现。
+ */
+
+#ifndef __ANTILEECH_CSTRING_H__
+#define __ANTILEECH_CSTRING_H__
+
+#include <stdexcept>
+#include <stdio.h>
+
+class CString : public std::string
+{
+	public:
+		CString()
+		{
+		}
+		
+		CString(char c)
+		{
+			*this += c;
+		}
+		
+		CString(const char *str)
+		{
+			this->append(str);
+		}
+		
+		friend CString operator +(const CString& str1, const CString& str2)
+		{
+			CString ret;
+			
+			ret.append(str1);
+			ret.append(str2);
+			
+			return ret;
+		}
+	
+		CString& operator =(const char* str)
+		{
+			this->Clear();
+			this->append(str);
+			
+			return *this;
+		}
+	
+		CString& operator =(const std::string str)
+		{
+			if (this->compare(str) == 0) return *this;
+			this->assign(str);
+			
+			return *this;
+		}
+		
+		operator const char *()
+		{
+			return this->c_str();
+		}
+	
+		int GetLength() const
+		{
+			return this->length();
+		}
+		
+		char GetAt( int nIndex ) const
+		{
+			char ret;
+			
+			try {
+				ret = this->at(nIndex);
+			}
+			catch (std::out_of_range &e) {
+				ret = 0;
+			}
+			
+			return ret;
+		}
+	
+		bool IsEmpty() const
+		{
+			return this->empty();
+		}
+		
+		void TrimLeft(char c)
+		{
+			std::string::size_type pos;
+			
+			pos = this->find_first_not_of(c);
+			if (pos == 0) return;
+			
+			const char* str = *this;
+			printf("TrimLeft: \"%s\"\nHex:", str);
+			for (unsigned int i = 0; i <= strlen(str); i++) {
+				printf("%.2x ", str[i]);
+				fflush(stdout);
+			}
+			printf("\n");
+				
+			pos = 0;
+			this->erase(this->begin(), this->begin() + pos);
+		}
+		
+		void TrimRight(char c)
+		{
+			std::string::size_type pos;
+			
+			pos = this->find_last_not_of(c) + 1;
+			if (pos == this->length()) return;
+			this->erase(this->begin() + pos, this->end());
+		}
+		
+		CString Trim()
+		{
+			CString ret;
+			size_t len = this->length();
+			size_t i;
+			char tmp[len + 1];
+			
+			for (i = 0; i <= len; i++) tmp[i] = 0;
+			strncpy(tmp, this->c_str(), this->length());
+			
+			// 截尾
+			i = len - 1;
+			while (i >= 0 && tmp[i] == ' ') i--;
+			tmp[i + 1] = 0;
+			
+			// 计算开头
+			for (i = 0; i < strlen(tmp); i++) {
+				if (tmp[i] != ' ') break;
+			}
+			
+			ret = (char*)(tmp + i);
+			
+			return ret;
+		}
+			
+	
+		int Find(char c) const
+		{
+			return this->find(c);
+		}
+		
+		int Find(const char* str) const
+		{
+			return this->find(str);
+		}
+		
+		int Find(const CString& str) const
+		{
+			return this->find(str.c_str());
+		}
+		
+		int ReverseFind(char c) const
+		{
+			return this->find_last_of(c);
+		}
+		
+		CString Right(int len) const
+		{
+			CString ret;
+			
+			if (len <= 0) return CString("");
+			
+			if (len >= GetLength()) {
+				ret = this->substr(0);
+			}
+			else {
+				ret = this->substr(GetLength() - len);
+			}
+			
+			return ret;
+		}
+		
+		CString Left(int len) const
+		{
+			CString ret;
+			
+			if (len <= 0) return CString("");
+			
+			ret = this->substr(0, len);
+			
+			return ret;
+		}
+		
+		CString Mid(int pos) const
+		{
+			CString ret;
+			
+			if (pos >= GetLength()) return CString("");
+			
+			if (pos <= 0) {
+				ret = this->substr(0);
+			}
+			else {
+				ret = this->substr(pos);
+			}
+			
+			return ret;
+		}
+		
+		void Clear()
+		{
+			this->erase(this->begin(), this->end());
+		}
+};
+
+#endif	// __ANTILEECH_CSTRING_H__
--- src/UploadQueue.cpp	2009-03-29 03:29:59.000000000 +0800
+++ src/UploadQueue.cpp	2009-12-08 22:10:39.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,68 @@
 	if ( client->IsBanned() ) {
 		return;
 	}
+	
+	// DLP Start
+	char *dlp_result;
+	unsigned int dlp_prefs = 0;
+	char modstring[201] = {0};
+	char clientstring[201] = {0};
+	char username[201] = {0};
+	char userhash[101] = {0};
+	
+	try {
+		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);
+		/* comment in zh-hans:
+		 * CTag::GetNameID() 返回 InfoTag 和 HelloTag
+		 * 也就是，InfoTag 和 HelloTag 实际上都是 CTag::GetNameID()
+		 */ 
+		dlp_result = DLPCheck(modstring, clientstring, username, userhash, client->GetClientNameID(), thePrefs::GetDLPCheckMask());
+
+		
+		if (dlp_result != NULL) {
+			char info[1024] = {0};
+			char tmp[1024] = {0};
+			strncpy(tmp, client->GetClientFullInfo().mb_str(wxConvUTF8), 1000);
+			snprintf(info, 1000, "%s %s (%.2x/(null)/(null))", dlp_result, tmp, client->GetClientNameID());
+			theApp->clientlist->AddBannedClient(client->GetIP());
+			wxString winfo(info, wxConvUTF8);
+			theApp->AddDLPMessageLine(winfo);
+			return ;
+		}
+	#ifdef __DEBUG__
+		else {
+			AddLogLineM(true, client->GetClientFullInfo());
+			printf("tag=%.2x, userhash=%s\n", client->GetClientNameID(), client->GetUserHash().EncodeSTL().c_str());
+		}
+	#endif
+	}
+	catch (std::exception &e) {
+		char exInfo[128] = {0};
+		snprintf(exInfo, 127, "aMule-DLP function \"DLPCheck\" throw a exception: %s\n", e.what());
+		wxString wxExInfo(exInfo, wxConvUTF8);
+		AddLogLineM(true, wxExInfo);
+	}
+	/* 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/updownclient.h	2009-03-29 03:29:59.000000000 +0800
+++ src/updownclient.h	2009-12-08 11:35:17.000000000 +0800
@@ -549,6 +549,9 @@
 	
 	/* Returns the client hash type (SO_EMULE, mldonkey, etc) */
 	int		GetHashType() const;
+	
+	/* Dynamic Antileecher Protection HelloTag and InfoTag */
+	uint8		GetClientNameID() const		{ return m_clientNameID; }
 
 	/**
 	 * Checks that a client isn't aggressively re-asking for files.
@@ -874,6 +877,9 @@
 	/* Save the encryption status for display when disconnected */
 	bool m_hasbeenobfuscatinglately;
 	
+	/* Dynamic Antileecher Protection */
+	uint8		m_clientNameID;
+	
 	/* Kry - Debug thing. Clients created just to check their data
 	   have this string set to the reason we want to check them. 
 	   Obviously, once checked, we disconect them. Take that, sucker.
--- src/ServerWnd.h	2009-03-29 03:29:59.000000000 +0800
+++ src/ServerWnd.h	2009-10-21 11:18:34.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-21 11:18:34.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-21 11:18:34.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-21 11:18:34.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-21 11:18:34.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-21 11:18:34.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-12-08 19:51:31.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 );
@@ -426,6 +430,16 @@
 #define ID_DEBUGCATS 10309
 wxSizer *PreferencesDebug( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE );
 
+/* Dynamic Leecher Protection */
+#define IDC_CHECKMODSTRING 11001
+#define IDC_CHECKUSERNAME 11002
+#define IDC_CHECKUSERHASH 11003
+#define IDC_CHECKHELLOTAG 11004
+#define IDC_CHECKINFOTAG 11005
+#define IDC_CHECKEASYMULE 11006
+#define IDC_CHECKVERYCDMOD 11007
+wxSizer *PreferencesDLPTab( wxWindow *parent, bool call_fit = TRUE, bool set_sizer = TRUE );
+
 extern wxSizer *IDC_CURJOB;
 #define IDC_CONV_PB_LABEL 10310
 #define IDC_CONV_PROZENT 10311
--- src/muuli_wdr.cpp	2009-03-02 04:11:05.000000000 +0800
+++ src/muuli_wdr.cpp	2009-12-08 20:53:14.000000000 +0800
@@ -2002,6 +2002,46 @@
     return item0;
 }
 
+wxSizer *PreferencesDLPTab( wxWindow *parent, bool call_fit, bool set_sizer )
+{
+    wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );
+
+    wxStaticBox *item2 = new wxStaticBox( parent, -1, _("Dynamic Leecher Protection Options") );
+    wxStaticBoxSizer *item1 = new wxStaticBoxSizer( item2, wxVERTICAL );
+
+    wxCheckBox *item4 = new wxCheckBox( parent, IDC_CHECKMODSTRING, _("Check bad modstring"), wxDefaultPosition, wxDefaultSize, 0 );
+    item1->Add( item4, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+    wxCheckBox *item5 = new wxCheckBox( parent, IDC_CHECKUSERNAME, _("Check bad username"), wxDefaultPosition, wxDefaultSize, 0 );
+    item1->Add( item5, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+    wxCheckBox *item6 = new wxCheckBox( parent, IDC_CHECKUSERHASH, _("Check bad userhash"), wxDefaultPosition, wxDefaultSize, 0 );
+    item1->Add( item6, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+    wxCheckBox *item7 = new wxCheckBox( parent, IDC_CHECKHELLOTAG, _("Check bad hello tag"), wxDefaultPosition, wxDefaultSize, 0 );
+    item1->Add( item7, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+    wxCheckBox *item8 = new wxCheckBox( parent, IDC_CHECKINFOTAG, _("Check bad info tag"), wxDefaultPosition, wxDefaultSize, 0 );
+    item1->Add( item8, 0, wxALIGN_CENTER_VERTICAL, 5 );
+    
+    wxCheckBox *item9 = new wxCheckBox( parent, IDC_CHECKEASYMULE, _("Ban VeryCD easyMule"), wxDefaultPosition, wxDefaultSize, 0 );
+    item1->Add( item9, 0, wxALIGN_CENTER_VERTICAL, 5 );
+    
+    wxCheckBox *item10 = new wxCheckBox( parent, IDC_CHECKVERYCDMOD, _("Ban eMule VeryCD mod"), wxDefaultPosition, wxDefaultSize, 0 );
+    item1->Add( item10, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ 
+    item0->Add( item1, 0, wxGROW|wxALL, 5 );
+
+    if (set_sizer)
+    {
+        parent->SetSizer( item0 );
+        if (call_fit)
+            item0->SetSizeHints( parent );
+    }
+    
+    return item0;
+}
+
 wxSizer *PreferencesFilesTab( wxWindow *parent, bool call_fit, bool set_sizer )
 {
     wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );
@@ -2865,6 +2905,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 +2956,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 +2968,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-21 11:18:34.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)
 {
--- src/PrefsUnifiedDlg.cpp	2009-03-29 03:29:59.000000000 +0800
+++ src/PrefsUnifiedDlg.cpp	2009-12-08 19:44:49.000000000 +0800
@@ -178,7 +178,8 @@
 	{ wxTRANSLATE("Remote Controls"),	PreferencesRemoteControlsTab,	11 },
 	{ wxTRANSLATE("Online Signature"),	PreferencesOnlineSigTab,	21 },
 	{ wxTRANSLATE("Advanced"),			PreferencesaMuleTweaksTab,	12 },
-	{ wxTRANSLATE("Events"),			PreferencesEventsTab,		5 }
+	{ wxTRANSLATE("Events"),			PreferencesEventsTab,		5 },
+	{ wxTRANSLATE("DLP"),				PreferencesDLPTab,			5}
 #ifdef __DEBUG__
 	,{ wxTRANSLATE("Debugging"),		PreferencesDebug,			25 }
 #endif
--- src/Preferences.h	2009-03-29 03:29:59.000000000 +0800
+++ src/Preferences.h	2009-12-09 12:59:06.000000000 +0800
@@ -534,6 +534,9 @@
 	static void		SetClientCryptLayerSupported(bool v)	{s_IsClientCryptLayerSupported = v;}
 	static void		SetClientCryptLayerRequested(bool v)	{s_bCryptLayerRequested = v; }
 	static void		SetClientCryptLayerRequired(bool v)	{s_IsClientCryptLayerRequired = v;}
+	
+	// Dynamic Leecher Protection
+	static unsigned int GetDLPCheckMask()		{return s_DLPCheckMask;}
 
 protected:
 	static	int32 GetRecommendedMaxConnections();
@@ -555,6 +558,9 @@
 private:
 	void LoadPreferences();
 	void SavePreferences();
+	
+	// Dynamic Leecher Protection
+	void CalcDLPCheckMask();
 
 protected:
 ////////////// USER
@@ -756,6 +762,16 @@
 	static bool s_bCryptLayerRequested;	
 	static uint32	s_dwKadUDPKey;
 	static uint8 s_byCryptTCPPaddingLength;	
+		
+	// Dynamic Leecher Protection
+	static bool s_DLPCheckModString;
+	static bool s_DLPCheckUsername;
+	static bool s_DLPCheckUserHash;
+	static bool s_DLPCheckHelloTag;
+	static bool s_DLPCheckInfoTag;
+	static bool s_DLPCheckEasyMule;
+	static bool s_DLPCheckVeryCDMod;
+	static unsigned int s_DLPCheckMask;
 };
 
 
--- src/Preferences.cpp	2009-03-29 03:29:59.000000000 +0800
+++ src/Preferences.cpp	2009-12-09 13:13:08.000000000 +0800
@@ -50,6 +50,9 @@
 
 #include "UserEvents.h"
 
+#include "antiLeech_unix.h"
+#include "antiLeech.h"
+
 #ifndef AMULE_DAEMON
 #include <wx/valgen.h>
 #include "muuli_wdr.h"
@@ -215,6 +218,15 @@
 wxString CPreferences::s_Ed2kURL;
 wxString CPreferences::s_KadURL;
 
+/* Dynamic Leecher Protection */
+bool CPreferences::s_DLPCheckModString;
+bool CPreferences::s_DLPCheckUsername;
+bool CPreferences::s_DLPCheckUserHash;
+bool CPreferences::s_DLPCheckHelloTag;
+bool CPreferences::s_DLPCheckInfoTag;
+bool CPreferences::s_DLPCheckEasyMule;
+bool CPreferences::s_DLPCheckVeryCDMod;
+unsigned int CPreferences::s_DLPCheckMask;
 
 /**
  * Template Cfg class for connecting with widgets.
@@ -898,6 +910,9 @@
 	s_userhash[5] = 14;
 	s_userhash[14] = 111;
 	
+	// Dynamic Leecher Protection
+	CalcDLPCheckMask();
+	
 #ifndef CLIENT_GUI
 	LoadPreferences();
 	ReloadSharedFolders();
@@ -1009,7 +1024,17 @@
 	NewCfgItem( IDC_NETWORKKAD, (new Cfg_Bool( wxT("/eMule/ConnectToKad"),	s_ConnectToKad, true )) );
 	NewCfgItem( IDC_NETWORKED2K, ( new Cfg_Bool( wxT("/eMule/ConnectToED2K"),	s_ConnectToED2K, true ) ));
 
-
+	/**
+	 * Dynamic Leecher Protection
+	 **/
+	NewCfgItem(IDC_CHECKMODSTRING, 		(new Cfg_Bool( wxT("/DLP/CheckModString"), s_DLPCheckModString, true )));
+	NewCfgItem(IDC_CHECKUSERNAME, 		(new Cfg_Bool( wxT("/DLP/CheckUsername"), s_DLPCheckUsername, true )));
+	NewCfgItem(IDC_CHECKUSERHASH, 		(new Cfg_Bool( wxT("/DLP/CheckUserHash"), s_DLPCheckUserHash, true )));
+	NewCfgItem(IDC_CHECKHELLOTAG, 		(new Cfg_Bool( wxT("/DLP/CheckHelloTag"), s_DLPCheckHelloTag, true )));
+	NewCfgItem(IDC_CHECKINFOTAG, 		(new Cfg_Bool( wxT("/DLP/CheckInfoTag"), s_DLPCheckInfoTag, true )));
+	NewCfgItem(IDC_CHECKEASYMULE, 		(new Cfg_Bool( wxT("/DLP/CheckEasyMule"), s_DLPCheckEasyMule, false )));
+	NewCfgItem(IDC_CHECKVERYCDMOD, 		(new Cfg_Bool( wxT("/DLP/CheckVeryCDMod"), s_DLPCheckVeryCDMod, false )));
+	
 	/**
 	 * Files
 	 **/
@@ -1370,6 +1395,9 @@
 	}
 
 	SavePreferences();
+	
+	// Dynamic Leecher Protection
+	CalcDLPCheckMask();
 
 	#ifndef CLIENT_GUI
 	CTextFile sdirfile;
@@ -1382,6 +1410,17 @@
 	#endif
 }
 
+void CPreferences::CalcDLPCheckMask()
+{
+	s_DLPCheckMask = 0;
+	if (s_DLPCheckModString) s_DLPCheckMask |= PF_MODSTRING;
+	if (s_DLPCheckUsername) s_DLPCheckMask |= PF_USERNAME;
+	if (s_DLPCheckUserHash) s_DLPCheckMask |= PF_USERHASH;
+	if (s_DLPCheckHelloTag) s_DLPCheckMask |= PF_HELLOTAG;
+	if (s_DLPCheckInfoTag) s_DLPCheckMask |= PF_INFOTAG;
+	if (s_DLPCheckEasyMule) s_DLPCheckMask |= PF_EASYMULE;
+	if (s_DLPCheckVeryCDMod) s_DLPCheckMask |= PF_VERYCDEMULE;
+}
 
 CPreferences::~CPreferences()
 {
--- po/zh_CN.po	2009-09-17 05:03:29.000000000 +0800
+++ po/zh_CN.po	2009-12-08 20:52:55.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 "按此按钮清空日志."
@@ -7074,6 +7077,31 @@
 msgid "Failed to open friend list file 'emfriends.met' for writing!"
 msgstr "为写入而打开好友列表文件emfriends.met失败"
 
+msgid "Dynamic Leecher Protection Options"
+msgstr "动态反吸血保护选项"
+
+msgid "Check bad modstring"
+msgstr "根据 Mod 名字检测吸血驴"
+
+msgid "Check bad username"
+msgstr "根据用户名字检测吸血驴"
+
+msgid "Check bad userhash"
+msgstr "检测错误的用户哈希值"
+
+msgid "Check bad hello tag"
+msgstr "根据握手标签(HelloTag)检测吸血驴"
+
+msgid "Check bad info tag"
+msgstr "根据 InfoTag 检测吸血驴"
+
+msgid "Ban VeryCD easyMule"
+msgstr "屏蔽 easyMule（请慎重考虑是否使用）"
+
+msgid "Ban eMule VeryCD mod"
+msgstr "屏蔽 VeryCD eMule（请慎重考虑是否使用）"
+
+
 #~ msgid "Fetching status..."
 #~ msgstr "正在获取状态..."
 
