PtokaX forum

Archive => Archived 5.0 boards => Help with scripts => Topic started by: north on 29 October, 2005, 11:58:30

Title: need help whit client script
Post by: north on 29 October, 2005, 11:58:30
Hello i need to add another client to this script, the client i want to add is McDC++ v0.34 Core: 0.674


 --Anti rmDC++ script for PtokaX 0.3.3.0 Lua 5.0.2 by PPK
--CHANGED: modded to become a dc++ only script
----version 1.0

--//Start of Config
Bot = frmHub:GetHubBotName()

DcVer = "0.668"
--//End of Config

function NewUserConnected(curUser)
   if not curUser.bOperator then
      if curUser.bHasTag then
         if curUser.sClient=="DC++" then
            if tonumber(curUser.sClientVersion) < tonumber(DcVer) then
               curUser:SendData(Bot,"You aren't using DC++, go away")
               curUser:Disconnect()
               return 1
            end
         else
            curUser:Disconnect()
         end
      else
         curUser:Disconnect()
      end
   end
end


function SupportsArrival(curUser, sData)
   if string.sub(sData, 10, 11) == "  " then
      curUser:SendData( Bot.."Buggy client, go away!")
      SendPmToNick(Bot, " rmDC++ from IP: "..curUser.sIP.." trying to login... he is his wasting time")
      curUser:Disconnect()
      return 1
   elseif not string.find(sData, "Supports UserCommand NoGetINFO NoHello UserIP2 TTHSearch GetZBlock")then
      curUser:SendData( Bot.."You aren't useing DC++, go away")
      SendPmToNick(Bot, " Non-DC++ client from IP: "..curUser.sIP.." trying to login... he is his wasting time")
      curUser:Disconnect()
      return 1
   end
end