diff -uNr aMule-2.2.6/po/zh_CN.po aMule-2.2.6-DLP4302/po/zh_CN.po
--- aMule-2.2.6/po/zh_CN.po	2009-09-17 05:03:29.000000000 +0800
+++ aMule-2.2.6-DLP4302/po/zh_CN.po	2011-02-17 20:41:00.000000000 +0800
@@ -1842,6 +1842,12 @@
 msgid " http://kademlia.scs.cs.nyu.edu\n"
 msgstr " http://kademlia.scs.cs.nyu.edu\n"
 
+msgid "\nDynamic Leech Protection\n"
+msgstr "\n动态吸血保护\n"
+
+msgid " Homepage: http://amule-dlp.googlecode.com \n"
+msgstr " 主页：http://amule-dlp.googlecode.com \n"
+
 #: src/amuleDlg.cpp:476 src/PrefsUnifiedDlg.cpp:561
 #: src/PrefsUnifiedDlg.cpp:661 src/PrefsUnifiedDlg.cpp:750 src/KadDlg.cpp:177
 #: src/PartFile.cpp:922 src/PartFile.cpp:930
@@ -5663,6 +5669,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 +7083,36 @@
 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 "Check ghost mod"
+msgstr "检测幽灵客户端(Ghost Mod)"
+
+#~ msgid "Ban VeryCD easyMule2"
+#~ msgstr "屏蔽 VeryCD easyMule2"
+
+msgid "Ban eMule VeryCD mod(Please consider carefully whether to use)"
+msgstr "屏蔽 VeryCD eMule（请慎重考虑是否使用）"
+
+#~ msgid "Ban VeryCD miniMule"
+#~ msgstr "屏蔽 VeryCD miniMule"
+
 #~ msgid "Fetching status..."
 #~ msgstr "正在获取状态..."
 
diff -uNr aMule-2.2.6/src/amuled.cpp aMule-2.2.6-DLP4302/src/amuled.cpp
--- aMule-2.2.6/src/amuled.cpp	2009-09-10 04:46:31.000000000 +0800
+++ aMule-2.2.6-DLP4302/src/amuled.cpp	2011-02-17 20:41:03.000000000 +0800
@@ -764,4 +764,8 @@
 	CamuleApp::AddLogLine(evt.Message());
 }
 
+void CamuleDaemonApp::AddDLPMessageLine(wxString &msg)
+{
+}
+
 // File_checked_for_headers
diff -uNr aMule-2.2.6/src/amuleDlg.cpp aMule-2.2.6-DLP4302/src/amuleDlg.cpp
--- aMule-2.2.6/src/amuleDlg.cpp	2009-03-29 03:29:59.000000000 +0800
+++ aMule-2.2.6-DLP4302/src/amuleDlg.cpp	2011-02-17 20:41:03.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) {
@@ -470,7 +470,13 @@
 		_(" Part of aMule is based on \n") <<
 		_("Kademlia: Peer-to-peer routing based on the XOR metric.\n") <<
 		_(" Copyright (C) 2002 Petar Maymounkov\n") <<
-		_(" http://kademlia.scs.cs.nyu.edu\n");
+		_(" http://kademlia.scs.cs.nyu.edu\n") <<
+		_("\nDynamic Leech Protection\n") <<
+		_(" Homepage: http://amule-dlp.googlecode.com \n") <<
+		_(" Copyright (C) 2002-2007 Xtreme-Mod \n") <<
+		_(" Copyright (C) 2009 greensea \n") <<
+		_(" Copyright (C) 2009-2011 Bill Lee \n") <<
+		_(" Copyright (C) 2011 Orzogc \n");
 	
 	if (m_is_safe_state) {
 		wxMessageBox(msg, _("Message"), wxOK | wxICON_INFORMATION, this);
@@ -638,6 +644,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 +1454,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());
diff -uNr aMule-2.2.6/src/amuleDlg.h aMule-2.2.6-DLP4302/src/amuleDlg.h
--- aMule-2.2.6/src/amuleDlg.h	2009-03-29 03:29:59.000000000 +0800
+++ aMule-2.2.6-DLP4302/src/amuleDlg.h	2011-02-17 20:41:03.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); 
diff -uNr aMule-2.2.6/src/amule-gui.cpp aMule-2.2.6-DLP4302/src/amule-gui.cpp
--- aMule-2.2.6/src/amule-gui.cpp	2009-09-10 04:46:31.000000000 +0800
+++ aMule-2.2.6-DLP4302/src/amule-gui.cpp	2011-02-17 20:41:03.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)
 {
diff -uNr aMule-2.2.6/src/amule.h aMule-2.2.6-DLP4302/src/amule.h
--- aMule-2.2.6/src/amule.h	2009-09-10 04:46:31.000000000 +0800
+++ aMule-2.2.6-DLP4302/src/amule.h	2011-02-17 20:41:03.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();
diff -uNr aMule-2.2.6/src/antiLeech_amule.h aMule-2.2.6-DLP4302/src/antiLeech_amule.h
--- aMule-2.2.6/src/antiLeech_amule.h	1970-01-01 07:00:00.000000000 +0700
+++ aMule-2.2.6-DLP4302/src/antiLeech_amule.h	2011-02-17 20:41:03.000000000 +0800
@@ -0,0 +1,15 @@
+#ifndef ANTILEECH_AMULE_H
+#define ANTILEECH_AMULE_H
+
+/* 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
+//#define PF_MINIMULE	0x80
+#define PF_GHOSTMOD	0x100
+
+#endif
diff -uNr aMule-2.2.6/src/antiLeech.cpp aMule-2.2.6-DLP4302/src/antiLeech.cpp
--- aMule-2.2.6/src/antiLeech.cpp	1970-01-01 07:00:00.000000000 +0700
+++ aMule-2.2.6-DLP4302/src/antiLeech.cpp	2011-02-17 20:41:03.000000000 +0800
@@ -0,0 +1,1503 @@
+//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 <atlstr.h>
+#include "CString_wx.h"
+#include "antiLeech.h"
+#include "antiLeech_wx.cpp"
+#define __declspec(var)	CantiLeech::
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+//>>> eWombat [SNAFU_V3]
+LPCTSTR apszSnafuTag[]=
+{
+	_T("[DodgeBoards]"),									//0
+		_T("[DodgeBoards & DarkMule eVorteX]"),					//1
+		_T("[DarkMule v6 eVorteX]"),							//2
+		_T("[eMuleReactor]"),									//3
+		_T("[Bionic]"),											//4
+		_T("[LSD7c]"),											//5
+		_T("[0x8d] unknown Leecher - (client version:60)"),		//6
+		_T("[RAMMSTEIN]"),										//7
+		_T("[MD5 Community]"),									//8
+		_T("[new DarkMule]"),									//9
+		_T("[OMEGA v.07 Heiko]"),								//10
+		_T("[eMule v0.26 Leecher]"),							//11
+		_T("[Hunter]"),											//12
+		_T("[Bionic 0.20 Beta]"),								//13
+		_T("[Rumata (rus)(Plus v1f)]"),							//14
+		_T("[Fusspi]"),											//15
+		_T("[donkey2002]"),										//16
+		_T("[md4]"),									        //17
+		_T("[SpeedMule]"),										//18 Xman 
+		_T("[pimp]")											//19 Xman 
+		,_T("[Chinese Leecher]")								//20 SquallATF
+		//,_T("[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,_T("Inside the DLL!"),_T("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,_T("Freeza"))||
+		StrStrI(modversion,_T("d-unit"))||
+		//StrStrI(modversion,_T("NOS"))|| //removed for the moment
+		StrStrI(modversion,_T("imperator"))||
+		StrStrI(modversion,_T("SpeedLoad"))||
+		StrStrI(modversion,_T("gt mod"))||
+		StrStrI(modversion,_T("egomule"))||
+		StrStrI(modversion,_T("aldo"))|| 
+		StrStrI(modversion,_T("darkmule"))||
+		StrStrI(modversion,_T("LegoLas"))||
+		StrStrI(modversion,_T("dodgethis"))|| //Updated
+		StrStrI(modversion,_T("DM-"))|| 
+		StrStrI(modversion,_T("|X|"))||
+		StrStrI(modversion,_T("eVorte"))||
+		StrStrI(modversion,_T("Mison"))||
+		StrStrI(modversion,_T("father"))||
+		StrStrI(modversion,_T("Dragon"))||
+		StrStrI(modversion,_T("booster"))|| //Temporaly added, must check the tag
+		StrStrI(modversion,_T("$motty"))||
+		StrStrI(modversion,_T("Thunder"))||
+		StrStrI(modversion,_T("BuzzFuzz"))||
+		StrStrI(modversion,_T("Speed-Unit"))|| 
+		StrStrI(modversion,_T("Killians"))||
+		StrStrI(modversion,_T("Element"))|| 
+		StrStrI(modversion,_T("§¯Å]"))||
+		StrStrI(modversion,_T("Rappi"))||
+		StrStrI(modversion,_T("EastShare")) && StrStrI(clientversion,_T("0.29"))||
+		StrStrI(modversion,_T("eChanblard v7.0")) ||
+		//StrStrI(modversion,_T("ACAT")) ||
+		StrStrI(modversion,_T("!FREEANGEL!")) ||
+		StrStrI(modversion,_T("          ")) ||
+		StrStrI(modversion,_T("Stonehenge")) ||
+		StrStrI(modversion,_T("@RAPTOR")) ||
+		StrStrI(modversion,_T("pwNd muLe")) ||
+		StrStrI(modversion,_T("HARDPAW")) ||
+		StrStrI(modversion,_T("XXL")) ||
+		StrStrI(modversion,_T("LSD")) ||			
+		StrStrI(modversion,_T("Rockesel")) || //WiZaRd
+		StrStrI(modversion,_T("Bad Donkey")) || //WiZaRd
+		StrStrI(modversion,_T("DSL-Light-Client")) || //WiZaRd
+		StrStrI(modversion,_T("Elben")) || //WiZaRd
+		StrStrI(modversion,_T("PROeMule")) || //WiZaRd
+		StrStrI(modversion,_T("OO.de")) ||	//WiZaRd		
+		StrStrI(modversion,_T("00.de")) || //WiZaRd
+		StrStrI(modversion,_T("OOde")) || //WiZaRd
+		StrStrI(modversion,_T("00de")) ||
+		StrStrI(modversion,_T("Devil")) ||
+		StrStrI(modversion,_T("Elfen")) ||
+		StrStrI(modversion,_T("Ef-mod ")) || //Xman this mod can be abused as a full leecher
+		StrStrI(modversion,_T("HARDMULE")) ||
+		StrStrI(modversion,_T("Xtreme Xtended")) || //Xman 15.08.05
+		StrStrI(modversion, _T("MirageMod"))||		 // "
+		StrStrI(modversion, _T("SpeedX"))||
+		StrStrI(modversion, _T("AIDEADSL"))||
+		StrStrI(modversion, _T("Hypnotix"))||
+		StrStrI(modversion, _T("blackviper"))||
+		StrStrI(modversion, _T("BlackAngel"))||
+		StrStrI(modversion, _T("Community"))|| 
+		StrStrI(modversion, _T("rabbit"))|| 
+		StrStrI(modversion, _T("rabb_it"))|| 
+		StrStrI(modversion, _T("Speedmule"))|| 
+		StrStrI(modversion, _T("Raptor"))|| 
+		StrStrI(modversion, _T("Hawkstar"))|| 
+		StrStrI(modversion, _T("ServerClient"))|| 
+		StrStrI(modversion, _T("Love-Angel"))|| 
+		StrStrI(modversion, _T("SuperKiller"))|| 
+		StrStrI(modversion, _T("Ultimativ"))||
+		StrStrI(modversion, _T("uptempo"))||
+		StrStrI(modversion, _T("ZamBoR"))||
+		StrStrI(modversion, _T("Arabella"))||
+		StrStrI(modversion,_T("Morph")) && (StrStrI(modversion,_T("Max")) || StrStrI(modversion,_T("+")) || StrStrI(modversion,_T("×"))) ||
+		StrStrI(modversion, _T("Morph XT"))||	//very bad mod (MPAA ?)
+		StrStrI(modversion, _T("BlueHex"))||
+		StrStrI(modversion, _T("FlowerPower"))||
+		StrStrI(modversion, _T("Fincan"))||
+		StrStrI(modversion, _T("Heartbreaker"))||
+		StrStrI(modversion, _T("Administrator"))||
+		StrStrI(modversion, _T("B@d-D3vi7"))||
+		StrStrI(modversion, _T("CryptedSpeed"))||
+		StrStrI(modversion, _T("DarkDragon"))||
+		StrStrI(modversion, _T("OS_"))||	//Xman most are found via other checks, but not all
+		_tcslen(modversion) > 0 && (StrStrI(clientversion,_T("edonkey")) || modversion[0]==_T('['))   ||  //1. donkey user with modstring, 2. modstring begins with [ this is a known leecher
+		(StrStrI(modversion, _T("Xtreme")) && StrStrI(modversion, _T("]")))  //bad Xtreme mod
+		)
+			return _T("Bad MODSTRING");
+
+	return NULL;
+}
+
+LPCTSTR __declspec(dllexport) DLPCheckUsername(LPCTSTR username)
+{
+	if(username==NULL)
+		return NULL;
+
+	if (StrStrI(username,_T("$GAM3R$"))||
+		StrStrI(username,_T("G@m3r"))||
+		StrStrI(username,_T("$WAREZ$"))||
+		//StrStrI(username,_T("RAMMSTEIN"))||//	//Xman 21.06.05 SNAFU should filter the right ones out
+		//StrStr(username,_T("toXic"))||	//Xman 19.10.05 too old
+		StrStrI(username,_T("Leecha"))||
+		StrStr(username,_T("eDevil"))|| 
+		StrStrI(username,_T("darkmule"))||
+		//StrStrI(username,_T("phArAo"))||	//Xman 19.10.05 too old
+		//StrStrI(username,_T("dodgethis"))|| //Xman 21.06.05 not seen for a long time
+		StrStrI(username,_T("Reverse"))||
+		//StrStrI(username,_T("eVortex"))|| //Xman didn't see it for a long time
+		//StrStrI(username,_T("|eVorte|X|"))||	//"
+		//StrStrI(username,_T("Chief"))|| //Xman 17.5.08 old and no more needed
+		StrStrI(username,_T("$motty"))||
+		StrStrI(username,_T("emule-speed"))||
+		StrStrI(username,_T("celinesexy"))||
+		StrStrI(username,_T("Gate-eMule"))||
+		StrStrI(username,_T("energyfaker"))||
+		StrStrI(username,_T("BuzzFuzz"))||
+		StrStrI(username,_T("Speed-Unit"))|| 
+		StrStrI(username,_T("Killians"))||
+		StrStrI(username,_T("pubsman"))||
+		StrStrI(username,_T("emule-element"))||
+		StrStrI(username,_T("00de.de"))|| 
+		StrStrI(username,_T("00de")) ||
+		StrStrI(username,_T("OO.de"))|| 
+		StrStrI(username,_T("OOde")) ||
+		StrStrI(username,_T("emule")) && StrStrI(username,_T("booster")) ||
+		StrStrI(username,_T("Rappi")) ||
+		StrStrI(username,_T("Ketamine")) ||
+		StrStrI(username,_T("HARDMULE")) ||
+		StrStrI(username,_T("emuleech")) ||
+		//Xman 15.08.05
+		StrStrI(username, _T("SchlumpMule"))|| //"
+		StrStrI(username, _T("SaftyŽs"))||
+		StrStrI(username, _T("UnKnOwN pOiSoN"))||
+		StrStrI(username, _T("ElfenPower"))||
+		StrStrI(username, _T("eMule Cow"))||
+		StrStrI(username, _T("Freezamule"))||
+		StrStr(username, _T("EGOmule"))||
+		StrStrI(username, _T("-=EGOist=-"))||
+		StrStrI(username, _T("FreezaVamp"))||
+		StrStrI(username, _T("Muli_Checka"))||
+		StrStr(username, _T("PrOjEcT-SaNdStOrM"))||
+		StrStr(username, _T("NotHer eDitiOn"))||
+		StrStrI(username, _T("eSl@d3vil"))||
+		StrStrI(username, _T(" AgentSmith"))||
+		StrStrI(username, _T("rabb_it"))||
+		StrStrI(username, _T("ServerClient"))||
+		StrStrI(username, _T(">>Power-Mod"))||
+		StrStr(username, _T("DM_X"))|| //darkmule
+		StrCmpI(username, _T("Muse"))==0 || //ketamine mod
+		StrStr(username, _T("ZamBoR"))||
+		StrStr(username, _T("emule.razorback3.com"))||
+
+		StrStrI(username,_T("[LSD.19"))	//Xman 21.06.2005 definitive not a good mod, with protocol bugs
+		)
+		return _T("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 _T("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)==_T("]"))
+	{
+		//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 _T("Gamers");
+		//check for snake
+		int find=username.ReverseFind(_T('['));
+		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)>=_T('0') && addon.GetAt(i)<=_T('9')) )
+				{
+					i=endpos+1;
+				}
+			}
+			if(i==endpos)
+				return _T("Snake");
+		}
+	}
+
+	return NULL;
+}
+*/
+//end old version ------------------------------------------
+
+bool CantiLeech::IsTypicalHex(const CString& addon) //Modified by Bill Lee
+{
+	if(addon.GetLength()>25 || addon.GetLength()<5)
+		return false;
+	short bigalpha=0;
+	short smallalpha=0;
+	short numeric=0;
+
+	int endpos=addon.GetLength();
+	int i=0;
+	for(; i<endpos;i++)
+	{
+		if( (addon.GetAt(i)>=_T('0') && addon.GetAt(i)<=_T('9')) )
+			numeric++;
+		else if( (addon.GetAt(i)>=_T('A') && addon.GetAt(i)<=_T('F')) )
+			bigalpha++;
+		else if( (addon.GetAt(i)>=_T('a') && addon.GetAt(i)<=_T('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, L"eMule Compat v0.26.2"))
+		return L"Flashget";
+
+	if (
+//Chinese Leecher - http://forum.emule-project.net/index.php?showtopic=134097&hl=
+		_tcsstr(modversion,L"TM0910") ||
+//Chinese Leecher - http://forum.emule-project.net/index.php?showtopic=134097&hl=
+		//StrStrI(modversion,_T("Freeza"))||
+		StrStrI(modversion,_T("FXeMule"))||
+		StrStrI(modversion,_T("FX eMule"))||
+		StrStrI(modversion,_T("RIAA"))||
+		//StrStrI(modversion,_T("d-unit"))||
+		//StrStrI(modversion,_T("NOS"))|| //removed for the moment
+		//StrStrI(modversion,_T("imperator"))||
+		StrStrI(modversion,_T("SpeedLoad"))||
+		//StrStrI(modversion,_T("gt mod"))|| //outdated
+		//StrStrI(modversion,_T("egomule"))|| //outdated
+		//StrStrI(modversion,_T("aldo"))|| //outdated
+		//StrStrI(modversion,_T("darkmule"))|| //outdated
+		//StrStrI(modversion,_T("LegoLas"))||
+		//StrStrI(modversion,_T("dodgethis"))|| //Updated
+		//StrStrI(modversion,_T("DM-"))|| 
+		//StrStrI(modversion,_T("|X|"))||
+		//StrStrI(modversion,_T("eVorte"))||
+		//StrStrI(modversion,_T("Mison"))||
+		//StrStrI(modversion,_T("father"))||
+		//StrStrI(modversion,_T("Dragon"))||
+		//StrStrI(modversion,_T("$motty"))||
+		//StrStrI(modversion,_T("Thunder"))||
+		//StrStrI(modversion,_T("BuzzFuzz"))||
+		//StrStrI(modversion,_T("Speed-Unit"))|| 
+		//StrStrI(modversion,_T("Killians"))||
+		StrStrI(modversion,_T("Element"))|| 
+		//StrStrI(modversion,_T("§¯Å]"))|| //outdated
+		StrStrI(modversion,_T("Rappi"))||
+		StrStrI(modversion,_T("EastShare")) && StrStrI(clientversion,_T("0.29"))||
+		StrStrI(modversion,_T("eChanblard v7.0")) ||
+		//StrStrI(modversion,_T("ACAT")) ||
+		//StrStrI(modversion,_T("!FREEANGEL!")) ||
+		StrStrI(modversion,_T("          ")) ||
+		//StrStrI(modversion,_T("Stonehenge")) ||
+		StrStrI(modversion,_T("@RAPTOR")) ||
+		StrStr(modversion,_T("pwNd muLe")) ||
+		StrStrI(modversion,_T("HARDPAW")) ||
+		//StrStrI(modversion,_T("XXL")) ||
+		StrStrI(modversion,_T("LSD")) ||			
+		StrStrI(modversion,_T("Bad Donkey")) || //WiZaRd
+		StrStrI(modversion,_T("DSL-Light-Client")) || //WiZaRd
+		StrStrI(modversion,_T("Elben")) || //WiZaRd
+		StrStr(modversion,_T("PROeMule")) || //WiZaRd
+		StrStrI(modversion,_T("Devil")) ||
+		StrStrI(modversion,_T("Elfen")) ||
+		StrStrI(modversion,_T("Ef-mod 2.0 ")) || //Xman this mod can be abused as a full leecher
+		StrStrI(modversion,_T("Xtreme Xtended")) || //Xman 15.08.05
+		StrStrI(modversion, _T("MirageMod"))||		 // "
+		StrStrI(modversion, _T("SpeedX"))||
+		StrStrI(modversion, _T("AIDEADSL"))||
+		StrStrI(modversion, _T("Hypnotix"))||
+		StrStrI(modversion, _T("BLACKMULE"))|| 
+		StrStrI(modversion, _T("blackviper"))||
+		StrStrI(modversion, _T("BlackAngel"))||
+		StrStrI(modversion, _T("rabbit"))|| 
+		StrStrI(modversion, _T("rabb_it"))|| 
+		StrStrI(modversion, _T("Raptor"))|| 
+		StrStrI(modversion, _T("Hawkstar"))|| 
+		StrStrI(modversion, _T("ServerClient"))|| 
+		StrStrI(modversion, _T("Love-Angel"))|| 
+		StrStrI(modversion, _T("SuperKiller"))|| 
+		StrStrI(modversion, _T("ZamBoR"))||
+		StrStrI(modversion,_T("Morph")) && (StrStrI(modversion,_T("Max")) || StrStrI(modversion,_T("+")) || StrStrI(modversion,_T("×"))) ||
+		StrStrI(modversion, _T("Morph XT"))||	//very bad mod (MPAA ?)
+		StrStrI(modversion, _T("Mørph"))||
+		StrStrI(modversion, _T("BlueHex"))||
+		StrStrI(modversion, _T("FlowerPower"))||
+		StrStrI(modversion, _T("Fincan"))||
+		StrStrI(modversion,_T("OO.de")) ||	//WiZaRd		
+		StrStrI(modversion,_T("00.de")) || //WiZaRd
+		StrStrI(modversion,_T("OOde")) || //WiZaRd
+		StrStrI(modversion,_T("00de")) ||
+		StrStrI(modversion, _T("OS_")) ||	//Xman most are found via other checks, but not all
+		StrStrI(modversion, _T("Heartbreaker"))||
+		StrStrI(modversion, _T("Arabella"))||
+		StrStrI(modversion, _T("Administrator"))||
+		StrStrI(modversion, _T("B@d-D3vi7"))||
+		StrStrI(modversion, _T("Dying Angel"))||
+		StrStrI(modversion, _T("FREAK MOD VENOM"))||
+		StrStrI(modversion, _T("CryptedSpeed"))||
+		StrStrI(modversion, _T("h34r7b34k3r"))||
+		StrStrI(modversion, _T("Exorzist"))||
+		StrStrI(modversion, _T("A.i.d.e-A.D.S.L"))||
+		StrStrI(modversion, _T("albaR"))||
+		StrStrI(modversion, _T("AngelDr"))||	//5/2006
+		StrStrI(modversion, _T("Tombstone Reloaded"))|| //5/2006
+		StrStrI(modversion, _T("Tombstone Next"))|| //10/2006
+		StrStrI(modversion, _T("pP.r8b"))|| //5/2006
+		StrStrI(modversion, _T("x0Rz!$T"))|| //E/€xorzist
+		StrStrI(modversion, _T("€xORz!§T"))||
+		_tcsstr(clientversion,_T("eMule Compat v0.40")) || //7/2006
+		_tcsstr(clientversion,_T("eMule Compat v127.")) || //8/2006
+		StrStrI(modversion, _T("No Ratio"))|| //based on scarangel 7/2006
+		StrStrI(modversion, _T("DeathAngel"))|| //based on Xtreme 8/2006
+		StrStrI(modversion, _T("PROemule"))||	//9/2006
+		StrStrI(modversion, _T("Simple Leecher"))||	//9/2006
+		StrStrI(modversion, _T("oFF *+*"))||	//10/2006
+		StrStrI(modversion, _T("0FF "))||	//6/2007
+		StrStrI(modversion, _T("SmartMuli"))||	//12/2006
+		StrStrI(modversion, _T("D10T"))||	//12/2006
+		StrStrI(modversion, _T("the fonz"))||	//12/2006
+		StrStrI(modversion, _T("TurkMule"))||	//1/2007
+		StrStrI(modversion, _T("Hyperdrive"))||	//1/2007
+		StrStrI(modversion, _T("NextEvolution"))||	//1/2007
+		StrStrI(modversion, _T("Pimp"))||	//3/2007
+		StrStrI(modversion, _T("XDP "))||	//6/2007
+		StrStrI(modversion, _T("AeOnFlux"))||	//8/2007
+		//8/2007 from dlarge:
+		StrStrI(modversion, _T("Final Fight"))|| //added dlarge
+		StrStrI(modversion, _T("Fireball"))||	//added dlarge "standart String"
+		StrStrI(modversion, _T("SunPower"))||	//added dlarge "standart String"
+		StrStrI(modversion, _T("SuperKiller"))|| //added dlarge
+		StrStrI(modversion, _T("X-Cite"))|| //added dlarge
+		StrStrI(modversion, _T("waZZa"))|| //added dlarge
+		StrStrI(modversion, _T("Merza"))|| //added dlarge
+		StrStrI(modversion, _T("K.O.T."))|| //added dlarge
+		StrStrI(modversion, _T("Licokine"))|| //added dlarge
+		StrStrI(modversion, _T("BlackStar"))|| //added dlarge
+		StrStrI(modversion, _T("nEwLoGic"))|| //added dlarge
+		//end
+		StrStrI(modversion, _T("Applejuice"))|| //6/2007 now ban instead score reduce
+//more AJ modstrings
+		StrStrI(modversion, L"Wikinger") ||
+		StrStrI(modversion, L"ROCKFORCE") ||
+		StrStrI(modversion, L"RC-ATLANTIS") ||
+//more AJ modstrings
+//zz_fly Start 
+		//modstring of XL
+		_tcsstr(modversion, _T("20071122")) || _tcsstr(modversion, _T("20080228")) ||
+		_tcsstr(modversion, _T("080620")) || _tcsstr(modversion, _T("080307")) || 
+		_tcsstr(modversion, _T("080509")) || _tcsstr(modversion, _T("20080505")) || 
+		_tcsstr(modversion, _T("v 080828")) || _tcsstr(modversion, _T("XL8828")) ||
+		_tcsstr(modversion, _T("build 11230")) || _tcsstr(modversion, _T("20080923")) ||
+		_tcsstr(modversion, _T("ZZULL")) || _tcsstr(modversion, _T("XunaLei")) || 
+		_tcsstr(modversion, _T("XunL")) || _tcsstr(modversion, _T("Xthunder")) ||
+		_tcsstr(modversion, _T("xl build")) ||
+		//end
+		_tcsstr(modversion, _T("FreeCD")) || //BitComet, changed to hardban
+		_tcsstr(modversion, _T("PlayMule")) || //PlayMule
+		( !CString(modversion).IsEmpty() && CString(modversion).Trim().IsEmpty() ) || //pruma, korean leecher, modversion is a space
+		_tcsstr(modversion,_T("VMULE")) || //israel
+		StrStrI(modversion,_T("Goop.co.il")) ||
+		StrStrI(modversion,_T("Razorback")) ||
+		StrStrI(modversion,_T("UlTiMaTiC ")) || //based on MA 3.5
+		StrStrI(modversion,_T("Peizheng")) || //gpl-breaker
+		_tcsstr(modversion,_T("amule")) || //fake version, amule never write a modstring here
+		_tcsstr(modversion,_T("Amule")) ||
+		//2010/5/29
+		_tcsstr(modversion,_T("miniMule")) || //a compatible client, but without share file option.
+		StrStrI(modversion,_T("EYE888")) || //compatible client in china, but no src
+		StrStrI(modversion,_T("WebeSo")) || //compatible client in china, but no src //Chengr28
+		(_tcsstr(modversion,_T(" 091113")) && !_tcsstr(modversion,_T("VeryCD"))) || //compatible client in china, but no src //tetris
+		StrStrI(modversion,_T("Unbuyi")) || //a client announced that it is based on a its framework, but in fact it just copy VeryCD's code //Chengr28
+		//2010/12/11
+		_tcsstr(modversion, _T("easyMule2")) || //protocol bug, lack maintaince, ban
+//zz_fly End
+		_tcsstr(modversion, _T("Neo-R")) ||
+		_tcsstr(modversion, _T("Neo-RS")) ||
+		StrStrI(modversion, _T("Apace")) ||
+		StrStrI(modversion, _T("L!()Netw0rk")) ||
+		StrStrI(modversion, _T("L!ONetwork")) ||
+		StrStrI(modversion, _T("l!onet"))||
+		StrStrI(modversion, _T("l!0net"))||
+		StrStrI(modversion, _T("lionet"))||
+		StrStrI(modversion, _T("li0net"))||
+		StrStrI(modversion, _T("li()net"))||
+		StrStrI(modversion, _T("L!()Net"))||
+		StrStrI(modversion, _T("800STER")) ||
+		StrStrI(modversion, _T("8OOSTER")) ||
+		StrStrI(modversion, _T("BOO$T")) ||
+		StrStrI(modversion, _T("B00ST")) ||
+		StrStrI(modversion, _T("T-L-N BO0ST")) || //by briandgwx
+		StrStrI(modversion, _T("T L N B O O S T")) ||	//by taz-me
+		StrStrI(modversion, _T("iberica")) ||  //by briandgwx
+//from **Riso64Bit**
+		_tcsstr(modversion, _T("Thor ")) ||
+		_tcsstr(modversion, _T("DeSfAlko")) ||
+		_tcsstr(modversion, _T("The Killer Bean")) ||
+		_tcsstr(modversion, _T("ZZ-R ")) ||
+		_tcsstr(modversion, _T("ZZ-RS ")) ||
+		_tcsstr(modversion, _T("Reptil-Crew-3")) ||
+		_tcsstr(modversion, _T("Anonymous Mod")) ||
+		StrStrI(modversion, _T("NFO.Co.iL")) ||
+		_tcsstr(modversion, _T("Down.co.il")) ||
+		_tcsstr(modversion, _T("Red Projekt")) ||
+		_tcsstr(modversion, _T("centraldivx.com")) || //no source
+		StrStrI(modversion, _T("emule.co.il")) ||
+		StrStrI(modversion, _T("Fire eMule")) ||
+		StrStrI(modversion, _T("PirateMule")) ||
+		StrStrI(modversion, _T("HighTime")) ||
+		StrStrI(modversion, _T("GPS2Crew")) ||
+		StrStrI(modversion, _T("TLN eMule")) ||
+		StrStrI(modversion, _T("DVD-RS")) ||
+		_tcsstr(modversion, _T("ZZULtimativ-R")) ||
+		_tcsstr(modversion, _T("Div eMule")) ||
+		_tcsstr(modversion, _T("Pwr eMule")) ||
+		//_tcsstr(modversion, _T("VipeR")) || //it become good
+		_tcsstr(modversion, _T("Methadone")) ||
+		_tcsstr(modversion, _T("Titandonkey")) ||
+		_tcsstr(modversion, _T("SpeedShare")) ||
+		_tcsstr(modversion, _T("Wodan")) ||
+		_tcsstr(modversion, _T("Sikombious")) ||
+		_tcsstr(modversion, _T("HyperTraxx")) ||
+		_tcsstr(modversion, _T("Div pro")) ||
+		_tcsstr(modversion, _T("GangBang")) ||
+		_tcsstr(modversion, _T("WarezFaw")) ||
+		_tcsstr(modversion, _T("Rastak")) ||
+		_tcsstr(modversion, _T("Okinawa")) ||
+		_tcsstr(modversion, _T("Hiroshima")) ||
+		_tcsstr(modversion, _T("Kamikaze")) ||
+		_tcsstr(modversion, _T("Yotoruma")) ||
+		_tcsstr(modversion, _T("Nagasaki")) ||
+		_tcsstr(modversion, _T("Addiction")) ||
+		_tcsstr(modversion, _T("Bondage")) ||
+		_tcsstr(modversion, _T("eMuleLife")) ||
+		StrStrI(modversion, _T("PP-edition")) ||
+		StrStrI(modversion, _T("ZZULtra")) ||
+		_tcsstr(modversion, _T("eMulix")) ||
+		_tcsstr(modversion, _T("BigBang")) ||
+		_tcsstr(modversion, _T("PR0 ")) || //0(zero)
+		_tcsstr(modversion, _T("PRO ")) || //o
+		_tcsstr(modversion, _T("LoCMuLe")) ||
+		_tcsstr(modversion, _T("Flux ")) ||
+		//_tcsstr(modversion, _T("Aurora")) ||
+		//_tcsstr(modversion, _T("Alias")) || //although it is the base-version of leechermods, but it has no leecher function, unban it
+		//_tcsstr(modversion, _T("R-Mod"))|| //same as Alias
+		_tcsstr(modversion, _T("UniATeam")) ||
+		StrStrI(modversion, _T("Torenkey")) ||
+		StrStrI(modversion, _T("RSVCD")) ||
+		_tcsstr(modversion, _T("BlueEarth")) ||
+		_tcsstr(modversion, _T("RocketMule")) ||
+		_tcsstr(modversion, _T("eMule 0.4")) || //some bad mods write clientversion in modstring
+		_tcsstr(modversion, _T("Emule")) ||
+		_tcsstr(modversion, _T("eMule v")) ||
+		_tcsstr(modversion, _T("OrAnGe")) ||
+		StrStrI(modversion, _T("Evil Mod")) ||
+		StrStrI(modversion, _T("StulleMule v")) || //real modstring is "StulleMule #.#", no 'v'
+		StrStrI(modversion, _T("X-Ray v")) || 
+		StrStrI(modversion, _T("Ulti F"))||
+		StrStrI(modversion, _T("ChímÊrÂ"))||
+		StrStrI(modversion, _T("ÇhïmerÀ"))||
+		StrStrI(modversion, _T("Plus Plus"))|| //some of them did not banned in bin
+		_tcsstr(modversion, _T("UMatic"))||
+		_tcsstr(modversion, _T("BRAZILINJAPAN"))|| //no source
+		StrStrI(modversion, _T("Pigpen"))||
+		_tcsstr(modversion, _T("TCMod"))||
+		StrStrI(modversion, _T("UltiMatiX"))||
+		_tcsstr(modversion, _T("Perestroika"))||
+		_tcsstr(modversion, _T("Ebola")) ||
+		StrStrI(modversion, _T("StulleMule Plus")) ||
+		_tcsstr(modversion, _T("DVD-START.COM")) ||
+		(_tcsicmp(clientversion, _T("eMule"))==0) || //the client did not send client version
+		_tcsstr(modversion, _T("Penthotal")) ||
+		_tcsstr(clientversion,_T("eMule Compat v2.1")) || //+Ultra
+		//_tcsstr(modversion, _T("TSmod")) ||
+		_tcsstr(modversion, _T("Okaemule")) ||
+		_tcsstr(modversion, _T("Okamula")) ||
+		_tcsstr(modversion, _T("Potenza")) ||
+		_tcsstr(modversion, _T("AntraX MoD")) ||
+		//_tcsstr(modversion, _T("Picapica")) ||
+		//_tcsstr(modversion, _T("PeaceMule")) ||
+		_tcsstr(modversion, _T("0.49b")) ||
+		_tcsstr(modversion, _T("0.49c")) ||
+		_tcsstr(modversion, _T("Metha")) ||
+		//_tcsstr(modversion, _T("XTreme")) || move to fake area
+		//newlines 2009/11/8
+		_tcsstr(modversion, _T("UMatiX-45a")) ||
+		StrStrI(modversion, _T("maultierpower")) || // maultier-power.com sponsorize applejuice
+		StrStrI(modversion, _T("PoWeR MoD")) ||
+		StrStrI(modversion, _T("UltiAnalyzer")) ||
+		StrStrI(modversion, _T("UBR-Mod")) ||
+		//2009/11/29
+		StrStrI(modversion, _T("UltraFast")) || //thl
+		//2010/4/4
+		_tcsstr(modversion, _T("Devils Mod")) ||
+		StrStrI(modversion, _T("-XDP-")) ||
+		//2010/6/6
+		_tcsstr(modversion, _T("Sharinghooligan")) ||
+//end
+//from XRAY antileecher start
+		StrStrI(modversion, L"SPEED EMULE") || //MyTh	
+		StrStrI(modversion, L"SPIKE2 +") || //MyTh hard leecher
+		//StrStrI(modversion, L"Adunanza") || //MyTh italian ISP-spec com user
+		StrStrI(modversion, L"Asiklar") || //MyTh apple-com
+		StrStrI(modversion, L"Shadow") || //MyTh
+		StrStrI(modversion, L"EPB") || //MyTh
+		StrStrI(modversion, L"Tyrantmule") || //MyTh
+		StrStrI(modversion, L"APRC") || //MyTh
+		StrStrI(modversion, L"Hardstyle") || //MyTh
+		StrStrI(modversion, L"pP.r12b") || //MyTh
+		StrStrI(modversion, L"Simple Life") || //MyTh
+		StrStrI(modversion, L"TYRANUS") || //MyTh
+		StrStrI(modversion, _T("[OO.de-L33CH4")) ||	//Stulle
+		( StrStrI(modversion, _T("sivka v12e8")) && StrStrI(clientversion, L"0.42e") ) || //m_nClientVersion != MAKE_CLIENT_VERSION(0, 42, 4)	// added - Stulle
+		StrStrI(modversion, L"RapCom") || //added dlarge 
+		StrStrI(modversion, L"SBI leecher") || //added dlarge 
+		StrStrI(modversion, L"TS Next Lite") || //added dlarge  
+//from XRAY antileecher end
+		StrStrI(modversion, L"Dein Modstring") || // JvA: moved up from soft because also used by Applejuice
+		StrStrI(modversion, L"Angelmule") || // JvA: no sources, no changelog, community username,...
+		StrStrI(modversion, L"TR-P2P-MoD") || // JvA: bad client
+		StrStrI(modversion, L"Esekci") || // JvA: no sources, no changelog, ...
+		_tcslen(modversion) > 0 && (StrStrI(clientversion,_T("edonkey")) || modversion[0]==_T('['))   ||  //1. donkey user with modstring, 2. modstring begins with [ this is a known leecher
+		(StrStrI(modversion, _T("Xtreme")) && StrStrI(modversion, _T("]")))  //bad Xtreme mod
+		)
+		return _T("Bad MODSTRING");
+	if(_tcsstr(modversion, _T("xtreme")) || _tcsstr(modversion, _T("XTreme"))) //case sensitive!
+		return _T("Fake Xtreme");
+
+//zz_fly :: fake modstring area
+//move some entries from above
+	if(((_tcsstr(modversion, _T("MorphXT v9.6")) || _tcsstr(modversion, _T("Xtreme 7")) || _tcsstr(modversion, _T("ZZUL Plus 1"))) && _tcsstr(clientversion, _T("0.48a"))) || //should not 0.48a
+		_tcsstr(modversion, _T("NetF WARP 9")) || //should be NetF WARP 0.3a.9
+		_tcsstr(modversion, _T("VeryCD 080126")) || //Fake VeryCD
+		_tcsstr(modversion, _T("VeryCD 080730")) || //Fake VeryCD
+		_tcsstr(modversion, _T("VeryCD 080509")) || //Fake VeryCD
+		_tcsstr(modversion, _T("VeryCD 080606")) || //Fake VeryCD
+		_tcsstr(modversion, _T("VeryCD 080624")) || //Fake VeryCD
+		_tcsstr(modversion, _T("VeryCD 080630")) || //Fake VeryCD
+		(_tcsstr(modversion, _T("easyMule 10")) && _tcsstr(clientversion, _T("0.48a"))) ||  //easymule 10#### are not based on .48a
+		(_tcsstr(modversion, _T("VeryCD 080919")) && _tcsstr(clientversion, _T("0.49b"))) //fake clientversion, should be 0.48a
+		)
+		return _T("Fake MODSTRING");
+//zz_fly :: end
+
+	//WiZaRd Bad Modstring Scheme
+	CString strMod = CString(modversion);
+	if( strMod.IsEmpty() ||
+		(strMod.Find(_T("CHN "))==0 && strMod.GetLength() > 8) ||
+		(strMod.Find(_T("Apollo"))==0) ||  //Apollo is a Portugal Mod
+		(strMod.Find(_T("sivka"))==0) ||
+		(strMod.Find(_T("aMule CVS"))==0)
+	  )
+	{
+		;//do nothing
+	}
+	else
+	{
+		if(_tcsstr(clientversion, _T("eMule v")) && (strMod.GetLength() <= 4)) //most of them are fincan
+			return L"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 "legal" 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 L"Bad Modstring Scheme";
+	}
+	//WiZaRd
+
+//SDC Add
+
+//Some Bad MODSTRING Check
+	if (
+		_tcsstr(modversion, _T("eMule-GIFC")) || //GPL-Breaker, no source [DargonD] //It's a old version [Chengr28]
+		_tcsstr(modversion, _T("X-Ray 2.")) || //Fake X-Ray Mod [**Riso64Bit**]
+		_tcsstr(modversion, _T("OS")) || //GPL-Breaker, no source [ieD2k]
+		modversion[0]==32 || //It isn't a real ModString [ieD2k]
+		(_tcsstr(clientversion, _T("0.48a")) && _tcsstr(modversion, _T("MorphCA"))) || //Fake MorphCA, MorphCA hasn't any 0.48a version [DargonD]
+		_tcsstr(modversion, _T("0.50a")) //It should be a ClientVersion not a ModString [DargonD]
+		)
+		return _T("Bad MODSTRING");
+
+/*
+//Non-Standard ModString Check [Chengr28]
+	int SDC_Non_Standard[] = {strMod.GetLength(), 0};
+	if (_tcsstr(modversion, _T("Apollo")) || //Apollo Mod
+		(_tcsstr(modversion, _T("CHN ")) && SDC_Non_Standard[0]>8) //CN Mod
+		)
+	{
+		; //Do nothing
+	}
+	else {
+		for (SDC_Non_Standard[1]=0;SDC_Non_Standard[1]<SDC_Non_Standard[0];SDC_Non_Standard[1]++)
+		{
+			int SDC_ModString_Common = (int)strMod[SDC_Non_Standard[1]];
+			if (SDC_ModString_Common==32 || SDC_ModString_Common==43 || SDC_ModString_Common==45 || SDC_ModString_Common==46 || //All the ModString must have space, ".", "+" and "-"
+				(SDC_ModString_Common>=48 && SDC_ModString_Common<=57) || //All ModStrings have number
+				(SDC_ModString_Common>=65 && SDC_ModString_Common<=90) || //All ModStrings have uppercase words
+				(SDC_ModString_Common>=97 && SDC_ModString_Common<=122)) //All ModStrings have lowercase words
+			{
+				; //Continue
+			}
+			else {
+				return _T("Non-Standard ModString");
+			}
+		}
+	}
+*/
+
+//End
+
+	return NULL;
+}
+
+LPCTSTR __declspec(dllexport) DLPCheckModstring_Soft(LPCTSTR modversion, LPCTSTR clientversion)
+{
+	if(modversion==NULL || clientversion==NULL)
+		return NULL;
+
+	if (
+		StrStrI(modversion,_T("Rockesel")) || 
+		StrStrI(modversion,_T("HARDMULE")) ||
+		StrStrI(modversion, _T("Community"))|| 
+		StrStrI(modversion,_T("IcE-MoD"))||
+		StrStrI(modversion,_T("a-eDit"))||
+		StrStrI(modversion, _T("Ultimativ"))||
+		StrStrI(modversion, _T("Ultimate"))||
+		//StrStrI(modversion, _T("Ulti F"))|| //move to hard ban
+		StrStrI(modversion, _T("Enter MoD Name"))||	
+//		StrStrI(modversion, _T("Dein Modstring"))||	// 3/2007
+		//StrStrI(modversion, _T("choose your modstring"))|| // 3/2007
+		StrStrI(modversion, _T("La tua Modstring"))||	//italian
+		//8/2007 from dlarge:
+		//StrStrI(modversion, _T("Enter Your Modstring"))|| //added dlarge
+		StrStrI(modversion, _T("Your Modstring")) ||
+		StrStrI(modversion, _T("C-E-R-E-B-R-O")) || //added dlarge
+		//end
+		StrStrI(modversion, _T("NewMule"))||
+		StrStrI(modversion, _T("smart- muli"))||
+		StrStrI(modversion, _T("TCMatic 3"))|| //1/2007  //version 3 is the public version and used as leecher
+		//StrStrI(clientversion, _T("eMule v2.0")) || //6/2007 fake Xtreme / GPL-breaker
+		StrStrI(modversion, _T("uptempo"))
+//zz_fly Start
+		||_tcsstr(clientversion, _T("eMule v0.95g")) //korea
+		||_tcsstr(clientversion, _T("eMule v0.47f"))
+		||_tcsstr(modversion, _T("Bowlfish")) //international filter, change to softban.
+		||StrStrI(modversion, _T("BLACKMULE")) //no completely source, but it seems it do not have leecher functions.
+		||_tcsstr(clientversion, _T("eMule v1.")) //ban all version number >= 1.0
+		||_tcsstr(clientversion, _T("eMule v2."))
+		//||_tcsstr(clientversion, _T("eMule v3."))
+		||_tcsstr(clientversion, _T("Shareaza v6.")) //Shareaza's current version is 2.5.2 
+		||_tcsstr(clientversion, _T("Shareaza v5."))
+		||_tcsstr(clientversion, _T("Shareaza v4."))
+		||_tcsstr(clientversion, _T("Shareaza v3."))
+		//i believe that it is based on its new framework. but i do not believe that it do not use any code from amule and/or emule.
+		//wait the decision of official emule team. 
+		//easyMule2 has been banned in DLPCheckModstring_Hard. by Orzogc Lee
+		//||_tcsstr(modversion, _T("easyMule2")) //enabled by Bill Lee
+		||StrStrI(modversion, _T(".COM")) //no domain name in modstring
+		||StrStrI(modversion, _T(".ORG"))
+		||StrStrI(modversion, _T(".NET"))
+		||StrStrI(modversion, _T(".BIZ"))
+		||StrStrI(modversion, _T(".INFO"))
+//zz_fly End
+		||(_tcsstr(clientversion, _T("lphant v2.01")) && _tcsstr(modversion, _T("Plus"))) //www.lphantplus.com, no src
+		)
+		return _T("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,L"dianlei.com") ||
+		_tcsstr(username,L"[eMuleBT]") ||
+		_tcsstr(username,L"[PPMule]") ||
+		StrStrI(username,L"TUOTU") ||
+		_tcsstr(username,L"kaggo.com") ||
+		_tcsstr(username,L"[Chinfo]") ||
+		_tcsstr(username,L"vgo.21cn") ||
+//Chinese Leecher - http://forum.emule-project.net/index.php?showtopic=134097&hl=
+		//StrStrI(username,_T("$WAREZ$"))||
+		//StrStrI(username,_T("Leecha"))||
+		//StrStrI(username,_T("Reverse"))||
+		//StrStrI(username,_T("$motty"))||
+		StrStrI(username,_T("emule-speed"))||
+		StrStrI(username,_T("Intuition"))||
+		//StrStrI(username,_T("W.I.P."))|| //outdated
+		//StrStrI(username,_T("celinesexy"))||
+		//StrStrI(username,_T("Gate-eMule"))||
+		//StrStrI(username,_T("energyfaker"))||
+		//StrStrI(username,_T("BuzzFuzz"))||
+		//StrStrI(username,_T("Speed-Unit"))|| 
+		//StrStrI(username,_T("Killians"))||
+		//StrStrI(username,_T("pubsman"))||
+		StrStrI(username,_T("emule-element"))||
+		//StrStrI(username,_T("emule")) && StrStrI(username,_T("booster")) ||
+		//StrStrI(username,_T("Rappi")) ||
+		StrStrI(username,_T("Ketamine")) ||
+		StrStrI(username,_T("emuleech.com")) ||
+		//StrStrI(username, _T("SchlumpMule"))|| //"
+		//StrStrI(username, _T("SaftyŽs"))||
+		StrStr(username, _T("UnKnOwN pOiSoN"))||
+		//StrStrI(username, _T("ElfenPower"))||
+		//StrStrI(username, _T("eMule Cow"))||
+		//StrStrI(username, _T("Freezamule"))||
+		StrStrI(username, _T("EGOmule"))||
+		StrStrI(username, _T("-=EGOist=-"))||
+		//StrStrI(username, _T("FreezaVamp"))||
+		StrStrI(username, _T("Muli_Checka"))||
+		StrStrI(username,_T("00de.de"))|| 
+		//StrStrI(username,_T("00de")) ||
+		//StrStrI(username,_T("OO.de"))|| 
+		//StrStrI(username,_T("OOde")) ||
+		//StrStrI(username, _T("PrOjEcT-SaNdStOrM"))||
+		//StrStrI(username, _T("NotHer eDitiOn"))||
+		//StrStrI(username, _T("eSl@d3vil"))||
+		//StrStrI(username, _T(" AgentSmith"))||
+		//StrStrI(username, _T("rabb_it"))||
+		//StrStrI(username, _T("ServerClient"))||
+		StrCmpI(username, _T("Muse"))==0 || //ketamine mod
+		//StrStr(username, _T("ZamBoR"))||
+		//StrStrI(username,_T("HARDMULE")) ||
+		StrStrI(username,_T("futurezone-reloaded")) ||
+		StrStrI(username,_T("Gate-To-Darkness.com")) ||
+		StrStrI(username,_T("Razorback")) ||
+		StrStrI(username,_T("Titanesel.tk")) ||
+		StrStrI(username,_T("bigbang.to")) ||
+		StrStrI(username,_T("leecherclients.org")) ||  //Xman 10/06
+		StrStrI(username,_T("futuremods.de")) ||  //Xman 10/06
+		StrStrI(username,_T(".::Stenoco-Zone::.")) ||
+		StrStrI(username,_T("emule-mods.cc")) || //Xman 01/07
+		StrStrI(username,_T("leecher-mod.net")) || //Xman 02/07
+		//08/2007 from dlarge:
+		StrStrI(username,_T("leecher-world.com")) || //added dlarge
+		StrStrI(username,_T("leecher.biz")) || //added dlarge
+		//end
+		//Xman 6/2007:
+//more AJ modstrings
+		//( StrStrI(username, L"[") && StrStrI(username, L"]")
+		//&& (
+			StrStrI(username, L"Applejuice") ||
+			StrStrI(username, L"Wikinger") ||
+			StrStrI(username, L"ROCKFORCE") ||
+			StrStrI(username, L"RC-ATLANTIS") ||
+			StrStrI(username, L"Fireball") ||
+			StrStrI(username, L"SunPower") ||
+		//	)
+		//) ||
+//		StrStrI(username,_T("AppleJuice")) && StrStrI(username,_T("[")) && StrStrI(username,_T("]")) ||
+		StrStrI(username, L"futuremod.de") || // JvA: apple-com adress
+//more AJ modstrings
+		StrStrI(username, L"@ Raptor") ||     //added dlarge
+		StrStrI(username, L"FUCKLW") ||         //added dlarge
+//zz_fly Start
+		_tcsstr(username,_T("a1[VeryCD]xthame")) || //XL
+		StrStrI(username,_T("Flashget")) || //FlashGet
+		_tcsstr(username,_T("http://www.net-xfer.com")) || //netxfer
+		_tcsstr(username,_T("emuIe-project.net")) || //phishing site
+		_tcsstr(username,_T("QQDownload")) || //tencent
+//		_tcsstr(username,_T("[Devils][")) || //2009/12/25 // removed due to claim to stop using badmods
+		//2010/5/29
+		//_tcsstr(username,_T("btbbt.com")) || //community username
+		//_tcsstr(username,_T("Greendown.Cn")) || //community username //these two sites provide some modified versions. they only hacked the title and changed the default username. i think the users are innocent. unban.
+		_tcsstr(username,_T("MTVP2P")) || //community username from Chengr28
+		_tcsstr(username,_T("qobfxb")) || //community username
+		_tcsstr(username,_T("[CHN][VeryCD]QQ"))|| //QQDownload
+//zz_fly End
+		StrStrI(username, _T("lionetwork"))||
+		StrStrI(username, _T("[lionheart"))||
+		StrStrI(username, _T("li@network"))||
+		StrStrI(username, _T("l!onetwork"))||
+		StrStrI(username, _T("li()net"))||
+		StrStrI(username, _T("l!0net"))||
+		StrStrI(username, _T("L!()Network")) ||
+		StrStrI(username, _T("Li()Network")) ||
+		StrStrI(username, _T("L!0Network")) ||
+		StrStrI(username, _T("Li@Network")) ||	 
+//from **Riso64Bit**
+		_tcsstr(username, _T("FincanMod")) || //fincan
+		_tcsstr(username, _T("Finc@nMod")) ||
+		StrStrI(username, _T("titanmule")) ||
+		StrStrI(username, _T(".c0.il")) || //0, zero
+		StrStrI(username, _T("Goop.Co.il")) || //israel community
+		StrStrI(username, _T("Div.Co.il")) ||
+		StrStrI(username, _T("emule.co.il")) ||
+		StrStrI(username, _T("pwr.co.il")) ||
+		StrStrI(username, _T("nFo.Co.il")) ||
+		StrStrI(username, _T("lhnet.co.il")) ||
+		StrStrI(username, _T("ynet.co.il")) ||
+		StrStrI(username, _T("wnet.co.il")) ||
+		StrStrI(username, _T("Paf.co.il")) ||
+		StrStrI(username, _T("finder.co.il")) ||
+		StrStrI(username, _T("joop.Co.il")) ||
+		StrStrI(username, _T("Www.NFOil.com")) ||
+		StrStrI(username, _T("TLN eMule")) ||
+		StrStrI(username, _T("LHeMule")) ||
+		StrStrI(username, _T("VMULE 2007")) ||
+		StrStrI(username, _T("TLNGuest")) ||
+		StrStrI(username, _T("Div eMule 2007")) ||
+		StrStrI(username, _T("eMulePro.de.vu")) ||
+		StrStrI(username, _T("emuIe-co.net")) ||
+		StrStrI(username, _T("AE CoM UseR")) ||
+		StrStrI(username, _T("BTFaw.Com")) ||
+		StrStrI(username, _T("warezfaw")) ||
+		StrStrI(username, _T("lh.2y.net")) ||
+		//StrStrI(username, _T("viper-istraeL.Org")) ||
+		StrStrI(username, _T("[Pwr Mule]Usuario")) ||
+		StrStrI(username, _T("Www.D-iL.Net")) ||
+		StrStrI(username, _T("www.aideadsl.com")) ||
+		StrStrI(username, _T("tangot.com")) ||
+		StrStrI(username, _T("r3wlx.com")) ||
+		StrStrI(username, _T("http://yo.com")) ||
+		StrStrI(username, _T("Angel eMule")) ||
+		StrStrI(username, _T("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, _T("Ultimativ"))||
+		StrStrI(username, _T("gps2c.6x.to")) ||	
+		StrStrI(username, _T("maultier-power")) ||	
+		_tcsstr(username, _T("RSVCD-Forum")) ||
+		StrStrI(username, _T("rsvcd-crew")) ||
+		StrStrI(username, _T("Ulti-Board")) ||
+		_tcsstr(username, _T("R-Mod"))||
+		StrStrI(username, _T("gps2crew")) ||
+		*/
+		//StrStrI(username, _T("www.eChanblardNext.org")) ||	
+		//StrStrI(username, _T("www.e-sipa.de")) ||
+		StrStrI(username, _T("[TEC]")) || //fincan
+		StrStrI(username, _T("e-Sipa")) ||	
+		StrStrI(username, _T("emuleech")) ||
+		StrStrI(username, _T("mkp2p")) ||
+		_tcsstr(username, _T("[ CHN]")) || //a space after bracket
+		StrStrI(username, _T("PlayMule")) ||
+		StrStrI(username, _T("eDonkey2008")) ||
+		StrStrI(username, _T("Torenkey")) ||
+		//StrStrI(username, _T("sdjtuning")) ||
+		StrStrI(username, _T("RAPCOM")) ||
+		_tcsstr(username, _T("ZZULtimativ-R")) ||
+		_tcsstr(username, _T("ZZ-R ")) ||
+		StrStrI(username, _T("OFF +")) ||
+		StrStrI(username, _T("OFF+")) ||
+		StrStrI(username, _T("Ultim@tiv")) ||
+		StrStrI(username, _T("[CHN][VeryCD][Your")) ||
+		_tcsstr(username, _T("eMuleUniATeam")) ||
+		StrStrI(username, _T("mods.sub.cc")) ||
+		_tcsstr(username, _T("ExtrEMule")) ||
+		_tcsstr(username, _T("Titandonkey")) ||
+		_tcsstr(username, _T("xtmhtl [ePlus]"))|| //same name, same userhash
+		_tcsstr(username, _T("eMule Accelerator")) ||
+		//2010/4/4
+		StrStrI(username, _T("eMule Pro Ultra")) ||
+		StrStrI(username, _T("[CHN][VeryCD][username]")) || //[CHN][VeryCD][username] eMule v0.48a [xl build58]
+		//2010/5/29
+		StrStrI(username, _T("Fireb@ll")) ||
+		//2010/6/6
+		StrStrI(username, _T("monster-mod.com")) ||
+		StrStrI(username, _T("Reptil-Crew-3")) || //Reptil mod
+		StrStrI(username, _T("!Lou-Nissart!")) || //no src only BIN (kick from upload)
+
+		//all sites below are phishing sites
+		StrStrI(username, _T("www.extremule.com")) ||
+		StrStrI(username, _T("www.emuleproject.com")) ||
+		StrStrI(username, _T("bigbang-emule.de.vu")) ||
+		StrStrI(username, _T("emulenet.de.vu")) ||
+		_tcsstr(username, _T("http://emule.net")) ||
+		StrStrI(username, _T("http://emulo.net")) ||
+		StrStrI(username, _T("http://projekt.org")) ||
+		StrStrI(username, _T("CryptMule.de.vu")) ||
+		StrStrI(username, _T("titanload.to")) ||
+		StrStrI(username, _T("http://emule-projekt.net")) ||
+		StrStrI(username, _T("emuleitalianogratis.com")) ||
+		StrStrI(username, _T("http://www.official-emule.com")) ||
+		StrStrI(username, _T("emulepro.6x.to")) ||
+		//StrStrI(username, _T("power-portal")) || //MyTh NOT to ban!
+		StrStrI(username, _T("e-mule.nu")) ||
+		StrStrI(username, _T("emulesoftware.com")) ||
+		StrStrI(username, _T("emuleitaliano.com")) ||
+		StrStrI(username, _T("scaricareemule.com")) ||
+		StrStrI(username, _T("emule--it.com")) ||
+		StrStrI(username, _T("italian.eazel.com")) ||
+		StrStrI(username, _T("speed-downloading.com")) ||
+		StrStrI(username, _T("nuovaversione.com")) ||
+		StrStrI(username, _T("emuleplus.com")) ||
+		StrStrI(username, _T("emuleultra.com")) ||
+		StrStrI(username, _T("emule.org")) ||
+		StrStrI(username, _T("[emule.de v")) || //default name: [emule.de v ##]
+		StrStrI(username, _T("emule.fr")) ||
+		StrStrI(username, _T("emule.ru")) ||
+		StrStrI(username, _T("emule.com")) ||
+		StrStrI(username, _T("emule-mods.biz")) || 
+		StrStrI(username, _T("emule-projet")) ||
+		StrStrI(username, _T("maomao.eu")) ||
+		StrStrI(username, _T("donkey.com")) ||
+		StrStrI(username, _T("super4.com")) ||
+		StrStrI(username, _T("emule.cc")) ||
+		StrStrI(username, _T("emule.net")) ||
+		StrStrI(username, _T("emulegratis.net")) ||
+		//new lines 2009/11/8
+		StrStrI(username, _T("emulespeedup.de.vu")) ||
+		StrStrI(username, _T("superemule.6x.to")) ||
+		StrStrI(username, _T("emulea.com")) ||
+		StrStrI(username, _T("emule24horas.com")) ||
+		StrStrI(username, _T("emule.es")) ||
+		StrStrI(username, _T("emulext.net")) ||
+		StrStrI(username, _T("netemule.com")) ||
+		StrStrI(username, _T("gratis-emule.com")) ||
+		StrStrI(username, _T("emuleproject.com")) ||
+		StrStrI(username, _T("emuleplusplus.de")) ||
+		StrStrI(username, _T("wikingergilde")) ||
+		StrStrI(username, _T("emuleclassic.com")) ||
+		StrStrI(username, _T("mega-emule.com")) ||
+		StrStrI(username, _T("speedyp2p.com")) ||
+		StrStrI(username, _T("anubisp2p.com")) ||
+		StrStrI(username, _T("cruxp2p.com")) ||
+		StrStrI(username, _T("downloademulegratis.com")) ||
+		StrStrI(username, _T("emulegold.com")) ||
+		StrStrI(username, _T("pro-sharing.com")) ||
+		StrStrI(username, _T("turbomule ")) ||
+		StrStrI(username, _T("devhancer.com")) ||
+		StrStrI(username, _T("emulefileswap.com")) ||
+		StrStrI(username, _T("p2psharing.biz")) ||
+		StrStrI(username, _T("fastsearchbooster.biz")) ||
+		StrStrI(username, _T("emule-features.6x.to")) ||
+		StrStrI(username, _T("emule-pro.blogspot.com")) ||
+		StrStrI(username, _T("emule-ng.com")) ||
+		StrStrI(username, _T("version049c-official.com")) ||
+		StrStrI(username, _T("emule.to")) ||
+		StrStrI(username, _T("adunanza.italiazip.com")) ||
+		StrStrI(username, _T("emulesoftware.com")) ||
+		StrStrI(username, _T("phpnuke.org")) ||
+		//new lines 2009/11/29
+		StrStrI(username, _T("gratis.emule49-info.com")) ||
+		StrStrI(username, _T("emuleds.com")) ||
+		StrStrI(username, _T("scarica-emule-gratis.com")) ||
+		StrStrI(username, _T("mp3edonkeysearch.com")) ||
+		StrStrI(username, _T("mp3rocket.com")) ||
+		StrStrI(username, _T("emule-rocket.com")) ||
+		StrStrI(username, _T("MonkeyP2P")) ||
+		//new lines 2010/01/17
+		StrStrI(username, _T("http://alpha-gaming.net")) ||
+		//new lines 2010/4/4
+		StrStrI(username, _T("piolet.com")) ||
+		StrStrI(username, _T("hermesp2p.com")) ||
+		StrStrI(username, _T("shareghost.com")) ||
+		StrStrI(username, _T("zultrax.com")) ||
+		StrStrI(username, _T("getfasterp2p.com")) ||
+		StrStrI(username, _T("pro-sharing.com")) ||
+		StrStrI(username, _T("truxshare.com")) ||
+		StrStrI(username, _T("meteorshare.com")) ||
+		StrStrI(username, _T("manolito.com")) ||
+		StrStrI(username, _T("blubster.com")) ||
+		StrStrI(username, _T("fastsearchbooster.biz")) ||
+		StrStrI(username, _T("e-mule-")) || // detect any mirror simil to "e-mule-it.com"
+		StrStrI(username, _T("download-gratis-emule.com")) ||
+		StrStrI(username, _T("emule-italy.it")) ||
+		StrStrI(username, _T("e-mule.be")) ||
+		StrStrI(username, _T("official-emule")) ||
+		StrStrI(username, _T("emule-gratis.it")) ||
+		StrStrI(username, _T("devhancer")) ||
+		//2010/5/29
+		StrStrI(username, _T("dbgo.com")) ||
+		StrStrI(username, _T("net2search.com")) ||
+		//2010/6/6
+		StrStrI(username, _T("p2phood.com")) ||
+		StrStrI(username, _T("intelpeers.com")) ||
+//End
+		StrStrI(username,_T("[LSD.19"))	//Xman 21.06.2005 definitive not a good mod, with protocol bugs
+		)
+		return _T("Bad USERNAME");
+
+
+	//new ketamine
+	//if(StrStrI(username, _T("[ePlus]")) != StrRStrI(username,NULL, _T("[ePlus]"))) //old version
+	if(_tcslen(username) >=14)
+	{
+		LPCTSTR tempstr=StrStr(username, _T("[ePlus]"));
+		if(tempstr && _tcslen(tempstr)>=7)
+			if(StrStr(tempstr + 7, _T("[ePlus]")))
+				return _T("new Ketamine");
+	}
+
+//SDC Add
+//Some Bad USERNAME Check
+	if (_tcsstr(username, _T("ED2000.COM")) //GPL-Breaker, no source [eMuleFans]
+		)
+		return _T("Bad USERNAME");
+
+//End
+
+	return NULL;
+}
+
+LPCTSTR __declspec(dllexport) DLPCheckUsername_Soft(LPCTSTR username)
+{
+	if(username==NULL)
+		return NULL;
+
+	if (
+		
+		//Xman 15.08.05
+		StrStrI(username, _T(">>Power-Mod"))
+		//Xman 1/2007 
+		/*
+		StrStrI(username,_T("AppleJuice [")) && StrStrI(username,_T("]")) ||
+		StrStrI(username,_T("AppleJuice Mod [")) && StrStrI(username,_T("]")) ||
+		StrStrI(username,_T("AppleJuice eMule [")) && StrStrI(username,_T("]")) //5/2007
+		*/
+//zz_fly Start korea
+		||_tcsstr(username, _T("DONKEY2007")) //korea
+		||_tcsstr(username, _T("www.Freang.com"))
+		||_tcsstr(username, _T("www.pruna.com"))
+		||_tcsstr(username, _T("[KOREA]"))
+		||_tcsstr(username, _T("superemule"))
+		||_tcsstr(username, _T("PRUNA 2008"))
+		||_tcsstr(username, _T("MOYAM"))
+		||_tcsstr(username, _T("eDonkey2009")) 
+//zz_fly End
+		)
+		return _T("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 _T("Community-Username"); //community (based on LSD or it's smasher)
+
+	if(_tcslen(username) >=4 
+		&& username[0]==_T('v')
+		&& StrStr(username, _T(":com "))
+		)
+		return _T("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,_T("VeryCD 071107")) || _tcsstr(modversion,_T("VeryCD 080307")) )
+		&& _tcsstr(username, _T("[CHN][VeryCD]yourname")) ) //all fake VeryCD have a default username
+		return _T("Fake VeryCD"); 
+
+	//community userhash check 
+	static const TCHAR refuserhash0[] = _T("154CE646120E96CC798C439A20D26F8D"); // (windows ue)
+	static const TCHAR refuserhash1[] = _T("455361F9D95C3CD7E6BF2192D1CB3D02"); // (windows ue)
+	static const TCHAR refuserhash2[] = _T("C8B5F41441C615FBABAD9A7E55294D01");
+	static const TCHAR refuserhash6[] = _T("A2221641460E961C8B7FF21A53FB6F6C"); //**Riso64Bit**
+	static const TCHAR refuserhash7[] = _T("888F4742450EF75F9DD8B7E53FA06FF0"); //**Riso64Bit**
+	static const TCHAR refuserhash8[] = _T("0B76CC42CB0E81B0DC6120D2BCB36FF9"); //**Riso64Bit**
+    static const TCHAR refuserhash9[] = _T("EAA383FD9E0E68538C7AC8AD15526F7A"); //**Riso64Bit**
+	static const TCHAR refuserhash10[]= _T("65C3B2E8940E582630A7F58AF9F26F9E"); //from TaiWan
+	static const TCHAR refuserhash11[]= _T("9BA09B83DC0EE78BE20280C387936F00"); //from SS1900
+	static const TCHAR refuserhash12[]= _T("C92859E4860EA0F15F7837750C886FB6"); //from SS1900
+	static const TCHAR refuserhash13[]= _T("CB42F563EE0EA7907395420CAC146FF5"); //From "qobfxb" multi user [DargonD] 
+	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
+		|| _tcsicmp(userhash,refuserhash11)==0 || _tcsicmp(userhash,refuserhash12)==0 || _tcsicmp(userhash,refuserhash13)==0)
+		return _T("Community Userhash");
+
+	//corrupt userhash check
+	static const TCHAR refuserhash3[] = _T("00000000000E00000000000000006F00");
+	static const TCHAR refuserhash4[] = _T("FE000000000E00000000000000006F00");
+	if(_tcsicmp(userhash,refuserhash3)==0 || _tcsicmp(userhash,refuserhash4)==0)
+		return _T("Corrupt Userhash");
+
+//SDC Fixed
+	//community userhash check, thanks SquallATF 
+	static const TCHAR refuserhash5[] = _T("DA1CEEE05B0E5319B3B48CAED24C6F4A");
+	if(_tcsicmp(userhash,refuserhash5)==0 && (!(_tcsstr(username,_T("QQDownload"))))) //Don't check with the Tencent XuanFeng [Chengr28]
+		return _T("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)==32)
+		return _T("AEdit");
+
+	//Check for Hex-Modstring
+	if(IsTypicalHex(modversion))
+		return _T("Hex-Modstring");
+
+	//community check
+	if(username.GetLength()>=7 && username.Right(1)==_T("]"))
+	{
+		/* 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 _T("old united");
+		*/
+		
+		//check for special nickaddon
+		int find=username.ReverseFind(_T('['));
+		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)>=_T('0') && addon.GetAt(i)<=_T('9')) )
+					{
+						i=endpos+1;
+					}
+				}
+				if(i==endpos)
+					return _T("Snake");
+				*/
+			
+				//Chek for Hex (e.g. X-Treme)
+				if(IsTypicalHex(addon.Left(addon.GetLength()-1)))
+					return _T("Hex-Code-Addon");
+			}
+			//zz_fly :: start
+			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(_T("http://emule-project.net ["))==0) && (find==25))
+					return _T("TLH Community"); //username like "http://emule-project.net [random]"
+				if(bFoundRandomPadding && modversion.IsEmpty() && (find==username.Find(_T('['))))
+					return _T("GhostMod"); //username has a random padding [random], it should be a mod function, but there is no modstring
+				if(bFoundRandomPadding && (username.Find(_T("Silver Surfer User"))==0) && (modversion.Find(_T("Silver"))==-1))
+					return _T("Fake Silver Surfer"); //**Riso64Bit** :: fake silver surfer
+			}
+			//zz_fly :: end
+		}
+	}
+
+	//thx cyrex
+	if(modversion.GetLength() == 10 && username.GetLength()>4 &&  StrStr(username.Right(4),_T("/]"))  && StrStr(username,_T("[SE]")))
+		return _T("Mystery ModString");
+
+	if(modversion.IsEmpty())
+		return NULL;
+	
+#define NUMBERSOFSTRING 9
+	static const CString testModString[] = {_T("Xtreme"), _T("ScarAngel"), _T("Mephisto"), _T("MorphXT"), _T("EastShare"), _T("StulleMule"), /*_T("Magic Angel"),*/ _T("DreaMule"), _T("X-Mod"), _T("RaJiL")};
+	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(_T('«') + 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 _T("ModString Thief");
+		}
+		else if(tag1)
+			return _T("ModString Thief");
+	}
+
+	//doubled  «...» in the username, like "username «Xtreme #.#» «abcd»"
+	int posr1 = username.Find(_T('»'));
+	int posr2 = username.ReverseFind(_T('»'));
+	if((posr1 > 5) && (posr2 - posr1 > 5) && ((username.GetAt(posr1 - 5) == _T('«')) || (username.GetAt(posr2 - 5) == _T('«'))))
+		return _T("Bad Username Paddings");
+	//zz_fly :: end
+
+//SDC Add
+
+//Some Community UserHash Check
+	static const TCHAR SDC_refuserhash1[]= _T("66B002DADE0E6DBEDF4FCCAA380E6FD4"); //From Multi user (TW&CN) [DargonD]
+	static const TCHAR SDC_refuserhash2[]= _T("AAEE84C0C30E247CBB99B459255D6F99"); //From NAS_01G Multi user [DargonD]
+	static const TCHAR SDC_refuserhash3[]= _T("5E02F74DBA0E8A19DBF6733F0AE66F4A"); //Community UserHash [FzH/DargonD]
+	static const TCHAR SDC_refuserhash4[]= _T("B6491292AE0E07AC8C6045CAC2DD6F9F"); //Community UserHash [FzH/DargonD]
+	static const TCHAR SDC_refuserhash5[]= _T("596B305E050EA842CE38DF3811216F3F"); //Community UserHash [FzH/DargonD]
+	static const TCHAR SDC_refuserhash6[]= _T("B1798B2F620E0B676452C6E2EF706F13"); //Invalid UserHash [DargonD]
+	static const TCHAR SDC_refuserhash7[]= _T("C1533316C00E3E0D0218843A05E46FAC"); //Invalid UserHash [DargonD]
+	static const TCHAR SDC_refuserhash8[]= _T("FE10F3C0610E0A925B85204CE8456F42"); //Invalid UserHash [DargonD]
+	static const TCHAR SDC_refuserhash9[]= _T("C9E61DEEF30E0360E2741C9CF1396F94"); //Invalid UserHash [DargonD]
+	static const TCHAR SDC_refuserhash10[]= _T("559ACC89D80E90C50A7A0CD3224F6F57"); //Invalid UserHash [DargonD]
+	static const TCHAR SDC_refuserhash11[]= _T("6AE1D2DF4B0E8707B6F6BC29E8746F0F"); //Invalid UserHash [DargonD]
+	static const TCHAR SDC_refuserhash12[]= _T("8A537F20B80EF9AF02E59E6C087C6F6B"); //Invalid UserHash [DargonD]
+	static const TCHAR SDC_refuserhash13[]= _T("3F44A7996F0E17D1F4B319EB58B26F64"); //Invalid UserHash [DargonD]
+	static const TCHAR SDC_refuserhash14[]= _T("D0D897BD360EEFF329903E04990B6F86"); //Community UserHash that often be used in Xunlei [Chengr28]
+	static const TCHAR SDC_refuserhash15[]= _T("36725093E00E9350F7680C871E946FD1"); //Tencent Offline Downloading Server UserHash [DargonD]
+	
+	if(
+		_tcsicmp(userhash,SDC_refuserhash1)==0 || _tcsicmp(userhash,SDC_refuserhash2)==0 || _tcsicmp(userhash,SDC_refuserhash3)==0 || 
+		_tcsicmp(userhash,SDC_refuserhash4)==0 || _tcsicmp(userhash,SDC_refuserhash5)==0 || _tcsicmp(userhash,SDC_refuserhash6)==0 || 
+		_tcsicmp(userhash,SDC_refuserhash7)==0 || _tcsicmp(userhash,SDC_refuserhash8)==0 || _tcsicmp(userhash,SDC_refuserhash9)==0 || 
+		_tcsicmp(userhash,SDC_refuserhash10)==0 || _tcsicmp(userhash,SDC_refuserhash11)==0 || _tcsicmp(userhash,SDC_refuserhash12)==0 || 
+		_tcsicmp(userhash,SDC_refuserhash13)==0 || 
+		(_tcsicmp(userhash,SDC_refuserhash14)==0 && (!(_tcsstr(modversion, _T("xl build"))))) || //Don't check to the latest Xunlei that will check in DLPCheckModstring_Hard
+		(_tcsicmp(userhash,SDC_refuserhash15)==0 && (!(_tcsstr(username,_T("[CHN][VeryCD]QQ"))))) //Don't check to the username of Tencent Offline Downloading Server that will check in DLPCheckUserName_Hard
+		)
+		return _T("Community UserHash");
+
+//Israel Community Check [Chengr28]
+	int SDC_Check_Number[] = {modversion.GetLength(), username.GetLength(), username.ReverseFind(91)};
+	if ((SDC_Check_Number[1]<6 || SDC_Check_Number[2]<1) || (SDC_Check_Number[0]<10 || SDC_Check_Number[0]>15) || 
+		_tcsstr(modversion, _T("AnalyZZUL")) || //AnalyZZUL Mod
+		_tcsstr(modversion, _T("AcKroNiC"))) //AcKroNiC Mod
+	{
+		; //Do nothing
+	}
+	else {
+		int SDC_First_Word[] = {(int)modversion[0], (int)username[0]};
+		if (((SDC_First_Word[0]>=65 && SDC_First_Word[0]<=90) && //Check for the first uppercase word in ModString
+			((SDC_First_Word[1]>=65 && SDC_First_Word[1]<=90) || //Check for the first uppercase word in ModString
+			(SDC_First_Word[1]>=97 && SDC_First_Word[1]<=122))) && //Check for the first lowercase word in NickName
+			(modversion[SDC_Check_Number[0]-2]==46 && username[SDC_Check_Number[1]-1]==93 && username[SDC_Check_Number[2]-1]==32)) //ModString is usually "ModString *.*(ModVersion)" but its NickName without "«ModString»" and Before "[" is space
+				return _T("Israel Community");
+	}
+
+//End
+
+	return NULL; 
+}
+
+LPCTSTR __declspec(dllexport) DLPCheckMessageSpam(LPCTSTR messagetext)
+{
+	if(messagetext==NULL)
+		return NULL;
+
+	if(
+		_tcsstr(messagetext, _T("ZamBoR")) ||
+		_tcsstr(messagetext, _T("DI-Emule")) ||
+		_tcsstr(messagetext, _T("Join the L33cher")) ||
+		_tcsstr(messagetext, _T("eMule FX")) ||
+		_tcsstr(messagetext, _T("---> ed2k://|file|Ketamine")) ||
+		_tcsstr(messagetext, _T("robot from RIAA, you can't fight")) ||
+		_tcsstr(messagetext, _T("agent from PeerFactor, she advises you to stop")) ||
+		_tcsstr(messagetext, _T("bot from MPAA, you can't do anything against her")) ||
+		_tcsstr(messagetext, _T("[Sangue-Suga]")) || //3 /2007
+		_tcsstr(messagetext, _T("[te@m projekt")) || //5 /2007
+		_tcsstr(messagetext, _T("eMule PRO Ultra")) || //8/2007 //include ultra 1 2 3
+		_tcsstr(messagetext, _T("HyperMule")) || //8/2007
+		_tcsstr(messagetext, _T("FXeMule")) ||
+		_tcsstr(messagetext, _T("angelmule.com")) || //**Riso64Bit**
+		_tcsstr(messagetext, _T("RocketMule")) //**Riso64Bit**
+		)
+		return (_T("Spam-Message"));
+
+	if(CString(messagetext).Trim().IsEmpty())
+		return (_T("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=_T("DodgeBoards");break;
+		case CT_UNKNOWNx15:			strSnafuTag=apszSnafuTag[1];break;//buffer=_T("DodgeBoards & DarkMule |eVorte|X|");break;
+		case CT_UNKNOWNx22:			strSnafuTag=apszSnafuTag[2];break;//buffer=_T("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=_T("eMuleReactor");break;
+		case CT_UNKNOWNx79:			strSnafuTag=apszSnafuTag[4];break;//buffer=_T("Bionic");break;
+		case CT_UNKNOWNx83:			strSnafuTag=apszSnafuTag[15];break;//buffer=_T("Fusspi");break;
+		case CT_UNKNOWNx76:			
+		case CT_UNKNOWNxCD:			strSnafuTag=apszSnafuTag[16];break;//buffer=_T("www.donkey2002.to");break;
+		case CT_UNKNOWNx88:
+				strSnafuTag=apszSnafuTag[5];//[LSD7c]
+			break;
+		case CT_UNKNOWNx8c:			strSnafuTag=apszSnafuTag[5];break;//buffer=_T("[LSD7c]");break; 
+		case CT_UNKNOWNx8d:			strSnafuTag=apszSnafuTag[6];break;//buffer=_T("[0x8d] unknown Leecher - (client version:60)");break;
+		case CT_UNKNOWNx99:			strSnafuTag=apszSnafuTag[7];break;//buffer=_T("[RAMMSTEIN]");break;		//STRIKE BACK
+		case CT_UNKNOWNx97:
+		case CT_UNKNOWNx98:
+		case CT_UNKNOWNx9C:
+		case CT_UNKNOWNxDA:			strSnafuTag=apszSnafuTag[3];break;//buffer=_T("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=_T("[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=_T("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=_T("[OMEGA v.07 Heiko]");break;
+	case ET_MOD_UNKNOWNx36:
+	case ET_MOD_UNKNOWNx5B:
+	case ET_MOD_UNKNOWNxA6:		strSnafuTag=apszSnafuTag[11];break;//buffer=_T("eMule v0.26 Leecher");break;
+	case ET_MOD_UNKNOWNx60:		strSnafuTag=apszSnafuTag[12];break;//buffer=_T("[Hunter]");break; //STRIKE BACK
+	case ET_MOD_UNKNOWNx76:		strSnafuTag=apszSnafuTag[0];break;//buffer=_T("[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=_T("[Bionic 0.20 Beta]");break;
+	case ET_MOD_UNKNOWNxDA:		strSnafuTag=apszSnafuTag[14];break;//buffer=_T("[Rumata (rus)(Plus v1f)]");break;
+	}
+
+	return strSnafuTag;
+}
diff -uNr aMule-2.2.6/src/antiLeech.h aMule-2.2.6-DLP4302/src/antiLeech.h
--- aMule-2.2.6/src/antiLeech.h	1970-01-01 07:00:00.000000000 +0700
+++ aMule-2.2.6-DLP4302/src/antiLeech.h	2011-02-17 20:41:03.000000000 +0800
@@ -0,0 +1,127 @@
+#ifndef ANTILEECH_H
+#define ANTILEECH_H
+#define DLPVERSION 42
+
+
+#pragma once
+
+#include "antiLeech_wx.h"
+#include "CString_wx.h"
+#define __declspec(var)
+
+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:
+	bool IsTypicalHex (const CString& addon);
+};
+
+//<<< 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]
+
+#include "antiLeech_amule.h"
+
+#undef __declspec
+#endif
diff -uNr aMule-2.2.6/src/antiLeech_wx.cpp aMule-2.2.6-DLP4302/src/antiLeech_wx.cpp
--- aMule-2.2.6/src/antiLeech_wx.cpp	1970-01-01 07:00:00.000000000 +0700
+++ aMule-2.2.6-DLP4302/src/antiLeech_wx.cpp	2011-02-17 20:41:03.000000000 +0800
@@ -0,0 +1,25 @@
+//Author:	greensea <gs@bbxy.net>
+#include "antiLeech_wx.h" //Modified by Bill Lee.
+
+//Bug fixed by Orzogc Lee
+LPCTSTR StrStrI(LPCTSTR haystack, LPCTSTR needle){
+	//Bill Lee: allocate wchar array on the stack
+	wchar_t haystacki[512];
+	wchar_t needlei[512];
+	int i = 0;
+	do{
+		haystacki[i] = towlower(haystack[i]);
+		if(i == 511)
+			break;
+	}while(haystack[i++]); //As haystacki is allocated on the stack, it wans't set 0. So the NULL needs to be copy.
+	i = 0;
+	do{
+		needlei[i] = towlower(needle[i]);
+		if(i == 511)
+			break;
+	}while(needle[i++]);
+	const wchar_t* ret = wcsstr(haystacki, needlei);
+	if(ret != NULL)
+		ret = ret - haystacki + haystack;
+	return ret;
+}
diff -uNr aMule-2.2.6/src/antiLeech_wx.h aMule-2.2.6-DLP4302/src/antiLeech_wx.h
--- aMule-2.2.6/src/antiLeech_wx.h	1970-01-01 07:00:00.000000000 +0700
+++ aMule-2.2.6-DLP4302/src/antiLeech_wx.h	2011-02-17 20:41:03.000000000 +0800
@@ -0,0 +1,49 @@
+#ifndef ANTILEECH_WX_H
+#define ANTILEECH_WX_H
+
+#include <wx/defs.h>
+#include <string.h>
+
+#define LPCTSTR		const wxChar* 
+#define BOOL		bool
+//#define _T(var)		wxT(var)	//defined in wxWidgets
+#define DWORD		wxUint32
+#define UINT		wxUint16
+#define WINAPI
+#define HINSTANCE
+#define LPVOID		void*
+#define PBYTE		unsigned char*
+#define TCHAR		wxChar
+#define _TINT		wxInt32
+
+#define StrCmpI _tcsicmp
+
+#define _istdigit(var)		iswdigit(var)
+#define _istcntrl(var)		iswcntrl(var)
+#define _istpunct(var)		iswpunct(var)
+#define _istspace(var)		iswspace(var)
+#define _istxdigit(var)		iswxdigit(var)
+inline float _tstof(const wchar_t* str){
+	wchar_t** ptail = NULL;
+	return wcstof(str, ptail);
+}
+//This function is not used. by Orzogc Lee
+//But I think there is no need to removing, linker will remove it.
+/*
+inline void tolowers(wxChar* str){
+	int i = 0;
+	do{
+		str[i] = towlower(str[i]);
+	}while(str[++i]);
+}
+*/
+#define _tcsstr(haystack, needle)	wcsstr(haystack, needle)
+#define _tcslen(var)		wcslen(var)
+#define StrStr(a, b)		wcsstr(a, b)
+
+LPCTSTR StrStrI(LPCTSTR haystack, LPCTSTR needle);
+//Bill Lee: I think inlining this function make no senses, because it is a very large operation.
+
+#define _tcsicmp(a, b)		wcscasecmp(a, b)
+
+#endif
diff -uNr aMule-2.2.6/src/BaseClient.cpp aMule-2.2.6-DLP4302/src/BaseClient.cpp
--- aMule-2.2.6/src/BaseClient.cpp	2009-09-10 04:46:31.000000000 +0800
+++ aMule-2.2.6-DLP4302/src/BaseClient.cpp	2011-02-17 20:41:01.000000000 +0800
@@ -1,4 +1,3 @@
-//
 // This file is part of the aMule Project.
 //
 // Copyright (c) 2003-2009 aMule Team ( admin@amule.org / http://www.amule.org )
@@ -23,6 +22,9 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA
 //
 
+//Dynamic Leech Protect - Bill Lee
+#include "antiLeech.cpp"
+
 #include <wx/wx.h>
 
 #include "updownclient.h"	// Needed for CUpDownClient
@@ -74,10 +76,8 @@
 #include "kademlia/kademlia/UDPFirewallTester.h"
 #include "kademlia/routing/RoutingZone.h"
 
-
 //#define __PACKET_DEBUG__
 
-
 // some client testing variables
 static wxString crash_name = wxT("[Invalid User Name]");
 static wxString empty_name = wxT("[Empty User Name]");
@@ -270,6 +270,9 @@
 	m_dwDirectCallbackTimeout = 0;
 
 	m_hasbeenobfuscatinglately = false;
+
+	dlp_nonofficalopcodes = false; //Dynamic Leecher Protect
+
 }
 
 
@@ -426,6 +429,14 @@
 	m_bUnicodeSupport = false;
 	uint32 dwEmuleTags = 0;
 
+	//Dynamic Leecher Protect - Bill Lee
+	bool wronghello = false; //Xman Anti-Leecher
+	uint32 hellotagorder = 1; //Xman Anti-Leecher
+	//zz_fly :: Fake Shareaza Detection
+	bool bWasUDPPortSent = false;
+	bool bIsFakeShareaza = false;
+	//zz_fly :: Fake Shareaza Detection end
+
 	CMD4Hash hash = data.ReadHash();
 	SetUserHash( hash );
 	SetUserIDHybrid( data.ReadUInt32() );
@@ -436,10 +447,20 @@
 		switch(temptag.GetNameID()){
 			case CT_NAME:
 				m_Username = temptag.GetStr();
+				//Xman Anti-Leecher
+				if(hellotagorder!=1)
+					wronghello=true;
+				hellotagorder++;
+				//Xman end
 				break;
 				
 			case CT_VERSION:
 				m_nClientVersion = temptag.GetInt();
+				//Xman Anti-Leecher
+				if(hellotagorder!=2)
+					wronghello=true;
+				hellotagorder++;
+				//Xman end
 				break;
 				
 			case ET_MOD_VERSION:
@@ -466,6 +487,8 @@
 				#ifdef __PACKET_DEBUG__
 				printf("Hello type packet processing with eMule ports UDP=%i KAD=%i\n",m_nUDPPort,m_nKadPort);
 				#endif
+				//Dynamic Leecher Protect - Bill Lee
+				bWasUDPPortSent = true; //zz_fly :: Fake Shareaza Detection
 				break;
 				
 			case CT_EMULE_BUDDYIP:
@@ -525,6 +548,9 @@
 				printf("That's all.\n");
 				#endif
 				SecIdentSupRec +=  1;
+				//Dynamic Leecher Proctect - Bill Lee
+				bIsFakeShareaza = !bWasUDPPortSent;
+					
 				break;
 			}
 
@@ -589,6 +615,23 @@
 				m_fSharedDirectories = 1;
 				dwEmuleTags |= 4;
 				break;				
+			//Bill Lee start
+			//Dynamic Leecher Protection
+			default:	//if tag isn't those above, it may be used by leecher.
+				if(!IsBanned()){
+					if(thePrefs::GetDLPCheckMask() & PF_HELLOTAG) {
+						const wxChar* dlp_result = CantiLeech().DLPCheckHelloTag(temptag.GetNameID());
+						if(dlp_result != NULL) {
+							wxString ret;
+							ret.Printf(wxT("[HelloTag %s(%.2x)] %s"), dlp_result, temptag.GetNameID(), GetClientFullInfo().c_str());
+							Ban();
+							theApp->AddDLPMessageLine(ret);
+						}
+					}
+				}
+				dlp_nonofficalopcodes = true; //to detect Ghost Mod
+					break;
+			//Bill Lee end
 		}
 	}
 
@@ -674,6 +717,35 @@
 		Kademlia::CKademlia::Bootstrap(wxUINT32_SWAP_ALWAYS(GetIP()), GetKadPort(), GetKadVersion() > 1);
 	}
 
+	//Dynamic Leecher Protection - Added by Bill Lee
+	//	It doesn't work properly for unknown reason
+//	if(!IsBanned() && bIsFakeShareaza && m_clientSoft == SO_EMULE && (thePrefs::GetDLPCheckMask() & PF_HELLOTAG) ){
+//		const char* ret = "Fake Shareaza";
+//		char info[1024] = {0};
+//		char tmp[1024] = {0};
+//		
+//		strncpy(tmp, GetClientFullInfo().mb_str(wxConvUTF8), 1000);
+//		snprintf(info, 1000, "[%s] %s", ret, tmp);
+//		Ban();
+//		wxString winfo(info, wxConvUTF8);
+//		theApp->AddDLPMessageLine(winfo);
+//	}
+	if(!IsBanned()){
+		if(wronghello && (thePrefs::GetDLPCheckMask() & PF_HELLOTAG) ){
+			const char* ret = "[Wrong Hello Order: German Leecher]";
+			char info[1024] = {0};
+			char tmp[1024] = {0};
+			
+			strncpy(tmp, GetClientFullInfo().mb_str(wxConvUTF8), 1000);
+			snprintf(info, 1000, "%s %s", ret, tmp);
+			Ban();
+			wxString winfo(info, wxConvUTF8);
+			theApp->AddDLPMessageLine(winfo);
+		}
+	DLPCheck();
+	}
+	//Bill Lee end
+
 	return bIsMule;
 }
 
@@ -929,6 +1001,22 @@
 							% GetClientFullInfo()
 					);
 
+					//Bill Lee start
+					//Dynamic Leecher Protection
+					if(!IsBanned()){
+						if(thePrefs::GetDLPCheckMask() & PF_INFOTAG) {
+							const wxChar* dlp_result = CantiLeech().DLPCheckInfoTag(temptag.GetNameID());
+							if(dlp_result != NULL) {
+								wxString ret;
+								ret.Printf(wxT("[InfoTag %s(%.2x)] %s"), dlp_result, temptag.GetNameID(), GetClientFullInfo().c_str());
+								Ban();
+								theApp->AddDLPMessageLine(ret);
+							}
+						}
+					}
+					dlp_nonofficalopcodes = true;
+					//Bill Lee end
+
 					break;
 			}
 		}				
@@ -966,6 +1054,8 @@
 		m_byInfopacketsReceived |= IP_EMULEPROTPACK;		
 	}
 
+	if(!IsBanned()) DLPCheck(); //Dynamic Leecher Protection - Added by Bill Lee
+	
 	return (protocol_version == 0xFF); // This was a OS_Info?
 }
 
@@ -2597,3 +2687,64 @@
 	SetDirectUDPCallbackSupport((options & 0x08) != 0 && callback);
 }
 // File_checked_for_headers
+
+bool CUpDownClient::DLPCheck(){
+	const wxChar* tmp = NULL;
+	wxString ret;
+	
+	unsigned int prefs = thePrefs::GetDLPCheckMask();
+
+	CantiLeech DLP;
+
+	CString modver(GetClientModString());
+	CString clientver(GetClientVerString());
+	CString uname(GetUserName());
+	CString uhash(wxString(GetUserHash().EncodeSTL().c_str(), wxConvUTF8));
+	
+	//CheckGhostMod
+	if(prefs & PF_GHOSTMOD) {
+		if(dlp_nonofficalopcodes && (modver.IsEmpty())) {
+			ret = wxT("Ghost Mod");
+			tmp = ret.c_str(); //char pointer
+		}
+	}
+
+	// Check bad modstring
+	if ((prefs & PF_MODSTRING) && (tmp == NULL)) {
+		if((tmp = DLP.DLPCheckModstring_Soft(modver.c_str(), clientver.c_str())) == NULL)
+			tmp = DLP.DLPCheckModstring_Hard(modver.c_str(), clientver.c_str());
+	}
+	/*
+	if ((prefs & PF_USERHASH) && (tmp == NULL)) {
+		// not finished
+	}
+	*/
+	// Check bad username
+	if ((prefs & PF_USERNAME) && (tmp == NULL)) {
+		if ((tmp = DLP.DLPCheckNameAndHashAndMod(uname, uhash, modver)) == NULL){
+			if( (tmp = DLP.DLPCheckUsername_Hard(uname.c_str())) == NULL )
+				tmp = DLP.DLPCheckUsername_Soft(uname.c_str());
+		}
+	}
+	
+
+	// Check VeryCD eMule
+	if ((prefs & PF_VERYCDEMULE) && (tmp == NULL)) {
+		if(modver.Find(wxT("VeryCD")) != wxNOT_FOUND){
+			ret = wxT("VeryCD Mod");
+			tmp = ret.c_str();
+		}
+	}
+	
+	if (tmp != NULL) {
+		ret = tmp;
+		wxString wxInfo;
+		wxInfo.Printf(wxT("[%s] %s"), ret.c_str(), GetClientFullInfo().c_str());
+		Ban();
+		theApp->AddDLPMessageLine(wxInfo);
+		return true;
+	}
+
+	return false;
+
+}
diff -uNr aMule-2.2.6/src/CString_wx.h aMule-2.2.6-DLP4302/src/CString_wx.h
--- aMule-2.2.6/src/CString_wx.h	1970-01-01 07:00:00.000000000 +0700
+++ aMule-2.2.6-DLP4302/src/CString_wx.h	2011-02-17 20:41:01.000000000 +0800
@@ -0,0 +1,59 @@
+/**
+ * Author:	Bill Lee<bill.lee.y@gmail.com>
+ * License:	GNU GPL
+ */
+//---------------------
+#ifndef CSTRING_WX_H
+#define CSTRING_WX_H
+
+//#include <wx/wx.h>
+#include <wx/string.h>
+
+class CString : public wxString{
+	public:
+		CString(){}
+		CString(wxChar c, size_t n=1): wxString(c, n){}
+		CString(const wxChar* str): wxString(str){}
+		CString(const wxString& str): wxString(str){}
+		CString(const CString& str): wxString(str){}
+		//---------------------
+		CString& operator=(const wxChar* str){
+			wxString::operator=(str);
+			return *this;
+		}
+		//operator*() from wxString;
+		size_t GetLength()const{	return Length();	}
+		wxChar GetAt(size_t nIndex)const{	return GetChar(nIndex);	}
+		//IsEmpty() from wxString;
+		CString& TrimLeft(wxChar c){
+			size_t pos = find_first_not_of(c);
+			if(pos == 0)
+				return *this;
+			erase(0, pos);
+			return *this;
+		}
+		CString& TrimRight(wxChar c){
+			size_t pos = find_last_not_of(c) + 1;
+			if(pos == Length())
+				return *this;
+			erase(pos, Length() - pos);
+			return *this;
+		}
+		CString Trim(){
+			CString ret(*this);
+			ret.wxString::Trim(false);        /* wxString::Trim(bool fromright = true) */
+			ret.wxString::Trim(true);
+			return ret;
+		}
+		//Find(wxChar) and Find(wxChar*) from wxString;
+		int Find(const CString& str)const{	return wxString::Find(str.c_str());	}
+		int ReverseFind(const wxChar c)const{	return wxString::Find(c, true);	}
+		int ReverseFind(const wxChar* str)const{	return rfind(str);	}
+		int ReverseFind(const CString& str)const{	return rfind(str);	}
+		CString Right(size_t len)const{	return wxString::Right(len);	}
+		CString Left(size_t len)const{	return wxString::Left(len);	}
+		CString Mid(size_t first, size_t count = wxSTRING_MAXLEN)const{
+			return wxString::Mid(first, count);
+		}
+};
+#endif
diff -uNr aMule-2.2.6/src/DownloadQueue.cpp aMule-2.2.6-DLP4302/src/DownloadQueue.cpp
--- aMule-2.2.6/src/DownloadQueue.cpp	2009-08-19 00:25:44.000000000 +0800
+++ aMule-2.2.6-DLP4302/src/DownloadQueue.cpp	2011-02-17 20:41:01.000000000 +0800
@@ -517,6 +517,13 @@
 		return;
 	}
 
+	//Dynamic Leecher Protect - Bill Lee
+	if ( source->IsBanned() ){
+		source->Safe_Delete();
+		return;
+	}
+	//Bill Lee end
+
 	// Filter sources which are known to be dead/useless
 	if ( theApp->clientlist->IsDeadSource( source ) || sender->IsDeadSource(source) ) {
 		source->Safe_Delete();
diff -uNr aMule-2.2.6/src/muuli_wdr.cpp aMule-2.2.6-DLP4302/src/muuli_wdr.cpp
--- aMule-2.2.6/src/muuli_wdr.cpp	2009-03-02 04:11:05.000000000 +0800
+++ aMule-2.2.6-DLP4302/src/muuli_wdr.cpp	2011-02-17 20:41:05.000000000 +0800
@@ -2002,6 +2002,57 @@
     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_CHECKGHOSTMOD, _("Check ghost mod"), wxDefaultPosition, wxDefaultSize, 0);
+
+    /*
+    wxCheckBox *item9 = new wxCheckBox( parent, IDC_CHECKEASYMULE, _("Ban VeryCD easyMule2"), wxDefaultPosition, wxDefaultSize, 0 ); //Modified by Bill Lee.
+    */
+    item1->Add( item9, 0, wxALIGN_CENTER_VERTICAL, 5 );
+    
+    wxCheckBox *item10 = new wxCheckBox( parent, IDC_CHECKVERYCDMOD, _("Ban eMule VeryCD mod(Please consider carefully whether to use)"), wxDefaultPosition, wxDefaultSize, 0 ); //Modified by Bill Lee
+    item1->Add( item10, 0, wxALIGN_CENTER_VERTICAL, 5 );
+    
+    /*
+    //Bill Lee start
+    wxCheckBox *item11 = new wxCheckBox( parent, IDC_CHECKMINIMULE, _("Ban VeryCD miniMule"), wxDefaultPosition, wxDefaultSize, 0);
+    item1->Add( item11, 0, wxALIGN_CENTER_VERTICAL, 5);
+    //Bill Lee end
+    */
+ 
+    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 +2916,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 +2967,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 +2979,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 );
 
diff -uNr aMule-2.2.6/src/muuli_wdr.h aMule-2.2.6-DLP4302/src/muuli_wdr.h
--- aMule-2.2.6/src/muuli_wdr.h	2008-08-05 19:12:49.000000000 +0800
+++ aMule-2.2.6-DLP4302/src/muuli_wdr.h	2011-02-17 20:41:05.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,18 @@
 #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
+#define IDC_CHECKMINIMULE 11008
+#define IDC_CHECKGHOSTMOD 11009
+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
diff -uNr aMule-2.2.6/src/Preferences.cpp aMule-2.2.6-DLP4302/src/Preferences.cpp
--- aMule-2.2.6/src/Preferences.cpp	2009-03-29 03:29:59.000000000 +0800
+++ aMule-2.2.6-DLP4302/src/Preferences.cpp	2011-02-17 20:41:02.000000000 +0800
@@ -50,6 +50,9 @@
 
 #include "UserEvents.h"
 
+#include "antiLeech_amule.h"
+#include "antiLeech.h"
+
 #ifndef AMULE_DAEMON
 #include <wx/valgen.h>
 #include "muuli_wdr.h"
@@ -215,6 +218,17 @@
 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;
+//bool CPreferences::s_DLPCheckminiMule; //Added by Bill Lee
+bool CPreferences::s_DLPCheckGhostMod;
+unsigned int CPreferences::s_DLPCheckMask;
 
 /**
  * Template Cfg class for connecting with widgets.
@@ -898,6 +912,9 @@
 	s_userhash[5] = 14;
 	s_userhash[14] = 111;
 	
+	// Dynamic Leecher Protection
+	CalcDLPCheckMask();
+	
 #ifndef CLIENT_GUI
 	LoadPreferences();
 	ReloadSharedFolders();
@@ -1009,6 +1026,18 @@
 	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, true ))); //Modified by Bill Lee
+	NewCfgItem(IDC_CHECKVERYCDMOD, 		(new Cfg_Bool( wxT("/DLP/CheckVeryCDMod"), s_DLPCheckVeryCDMod, false )));
+	//NewCfgItem(IDC_CHECKMINIMULE,		(new Cfg_Bool( wxT("/DLP/CheckminiMule"), s_DLPCheckminiMule, true))); //Added by Bill Lee
+	NewCfgItem(IDC_CHECKGHOSTMOD, 		(new Cfg_Bool( wxT("/DLP/CheckGhostMod"), s_DLPCheckGhostMod, true ))); //Added by Bill Lee.
 
 	/**
 	 * Files
@@ -1370,6 +1399,9 @@
 	}
 
 	SavePreferences();
+	
+	// Dynamic Leecher Protection
+	CalcDLPCheckMask();
 
 	#ifndef CLIENT_GUI
 	CTextFile sdirfile;
@@ -1382,6 +1414,19 @@
 	#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_DLPCheckGhostMod) s_DLPCheckMask |= PF_GHOSTMOD;
+	//if (s_DLPCheckEasyMule) s_DLPCheckMask |= PF_EASYMULE;
+	if (s_DLPCheckVeryCDMod) s_DLPCheckMask |= PF_VERYCDEMULE;
+	//if (s_DLPCheckminiMule) s_DLPCheckMask |= PF_MINIMULE; //Added by Bill Lee
+}
 
 CPreferences::~CPreferences()
 {
diff -uNr aMule-2.2.6/src/Preferences.h aMule-2.2.6-DLP4302/src/Preferences.h
--- aMule-2.2.6/src/Preferences.h	2009-03-29 03:29:59.000000000 +0800
+++ aMule-2.2.6-DLP4302/src/Preferences.h	2011-02-17 20:41:02.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,18 @@
 	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 bool s_DLPCheckminiMule; //Added by Bill Lee
+	static bool s_DLPCheckGhostMod; //Added by Bill Lee
+	static unsigned int s_DLPCheckMask;
 };
 
 
diff -uNr aMule-2.2.6/src/PrefsUnifiedDlg.cpp aMule-2.2.6-DLP4302/src/PrefsUnifiedDlg.cpp
--- aMule-2.2.6/src/PrefsUnifiedDlg.cpp	2009-03-29 03:29:59.000000000 +0800
+++ aMule-2.2.6-DLP4302/src/PrefsUnifiedDlg.cpp	2011-02-17 20:41:02.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
diff -uNr aMule-2.2.6/src/ServerWnd.cpp aMule-2.2.6-DLP4302/src/ServerWnd.cpp
--- aMule-2.2.6/src/ServerWnd.cpp	2009-03-29 03:29:59.000000000 +0800
+++ aMule-2.2.6-DLP4302/src/ServerWnd.cpp	2011-02-17 20:41:02.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()
 {
diff -uNr aMule-2.2.6/src/ServerWnd.h aMule-2.2.6-DLP4302/src/ServerWnd.h
--- aMule-2.2.6/src/ServerWnd.h	2009-03-29 03:29:59.000000000 +0800
+++ aMule-2.2.6-DLP4302/src/ServerWnd.h	2011-02-17 20:41:02.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()
 };
diff -uNr aMule-2.2.6/src/updownclient.h aMule-2.2.6-DLP4302/src/updownclient.h
--- aMule-2.2.6/src/updownclient.h	2009-03-29 03:29:59.000000000 +0800
+++ aMule-2.2.6-DLP4302/src/updownclient.h	2011-02-17 20:41:06.000000000 +0800
@@ -616,6 +616,8 @@
 	void		SetConnectionReason(const wxString& reason) { connection_reason = reason; }
 	#endif
 
+	bool		DLPCheck(); //Dynamic Leecher Protection - Added by Bill Lee
+
 	// Encryption / Obfuscation / ConnectOptions
 	bool		SupportsCryptLayer() const			{ return m_fSupportsCryptLayer; }
 	bool		RequestsCryptLayer() const			{ return SupportsCryptLayer() && m_fRequestsCryptLayer; }
@@ -881,6 +883,9 @@
 	  #ifdef __DEBUG__
 	  wxString connection_reason;
 	  #endif
+
+	bool dlp_nonofficalopcodes; //Dynamic Leecher Protect - Bill Lee
+
 };
 
 
diff -uNr aMule-2.2.6/src/UploadQueue.cpp aMule-2.2.6-DLP4302/src/UploadQueue.cpp
--- aMule-2.2.6/src/UploadQueue.cpp	2009-03-29 03:29:59.000000000 +0800
+++ aMule-2.2.6-DLP4302/src/UploadQueue.cpp	2011-02-17 20:41:03.000000000 +0800
@@ -314,6 +314,11 @@
 		return;
 	}
 
+	//Dynamic Leecher Protect - Bill Lee
+	#ifdef __DEBUG__
+	AddLogLineM(false, client->GetClientFullInfo());
+	#endif
+
 	client->AddAskedCount();
 	client->SetLastUpRequest();
 
diff -uNr aMule-2.2.6/src/utils/wxCas/src/wxcasframe.cpp aMule-2.2.6-DLP4302/src/utils/wxCas/src/wxcasframe.cpp
--- aMule-2.2.6/src/utils/wxCas/src/wxcasframe.cpp	2008-09-06 23:39:00.000000000 +0800
+++ aMule-2.2.6-DLP4302/src/utils/wxCas/src/wxcasframe.cpp	2011-02-17 20:41:08.000000000 +0800
@@ -285,11 +285,11 @@
 #ifdef __WXMSW__
 
 	memdc.
-	SetFont ( wxFont::wxFont ( 6, wxSWISS, wxNORMAL, wxBOLD ) );
+	SetFont ( wxFont ( 6, wxSWISS, wxNORMAL, wxBOLD ) );
 #else
 
 	memdc.
-	SetFont ( wxFont::wxFont ( 8, wxSWISS, wxNORMAL, wxBOLD ) );
+	SetFont ( wxFont ( 8, wxSWISS, wxNORMAL, wxBOLD ) );
 #endif
 
 	memdc.

