Hello guys,
Can you help me, please?
At this time PtokaX write this:
This hub is running PtokaX DC Hub 0.3.3.1f [debug] Jul 16 2005 19:20:15 (UpTime: 0 days, 0 hours, 29 minutes)
Please change your client, isn't allowed in this hub, because can't TTH leaves. Use: original DC++, CZDC++, StrongDC++ or DCGUI!!
*** Disconnected
Please, how can I edit this line:
["oDC"] = {"6.0", "Please change your client, isn't allowed in this hub, because can't TTH leaves. Use: original DC++, CZDC++, StrongDC++ or DCGUI!!"},
So that PtokaX will be write this:
This hub is running PtokaX DC Hub 0.3.3.1f [debug] Jul 16 2005 19:20:15 (UpTime: 0 days, 0 hours, 29 minutes)
Please change your client, isn't allowed in this hub, because can't TTH leaves. Use: original DC++, CZDC++, StrongDC++ or DCGUI!!
*** Disconnected
Thank you in advance for help!
As i understand it, the only change you want is that the 2nd line should be send from the bot, is that correct?
If so, please supply a bit more code so we'll have something to work on..
Snooze
QuoteOriginally posted by Snooze
As i understand it, the only change you want is that the 2nd line should be send from the bot, is that correct?
Snooze
Yes, this is I think!
QuoteOriginally posted by Snooze
If so, please supply a bit more code so we'll have something to work on..
Snooze
OK, here is it:
-- Simply script to disallow old DC++ clients without TTH support by PPK
-- Changed into a minversion script by blackwings
-- Made It Into Tables by Herodes ( not tested @all but hopefully it works )
-- FIXED: version numbers with more than one numbers work - by Herodes & blackwings
-- ADDED: Bad clients to be blocked
-- ADDED: Option to block Dc++ versions 0.403-0.665
-- Stuff by Madman
-- FIXED: Bad client block error, missing then
-- ADDED: tCl2 beacuse of syntax error: attempt to compare nil with number
-- CHANGED: MyInfoArrival, from (User, data) to (curUser, data)
-- REMOVED: No need to check bOperator in NewUserConnected
-- FIXED: Detected CDM as Phantom
-- FIXED: badVer, it only checked if client version was below 401
-- FIXED: StrongDC++ giving error on badVer check
-- CHANGED: BCDC stuff =)
-- ADDED: Table to block unwanted clients
-- UPDATED: Minver for strongdc is now 1.00 RC5, 1.00 RC5 = 0.401
-- if version 0.403-0.665 of DC++ should be blocked
badVer = 1
tCl = {
["DC++"] = { "0.401" , "Please upgrade your client, min version for in this hub is <0.401>" },
["oDC"] = {"6.0", "Please change your client, isn't allowed in this hub, because can't TTH leaves. Use: original DC++, CZDC++, StrongDC++ or DCGUI!!"},
["DCGUI"] = { "0.2.20" , "Please upgrade your client, min version for in this hub is <0.2.20>" },
["NMDC2"] = { "2.02" , "Please upgrade your client, min version for in this hub is <2.02>" },
["iDC"] = { "1.03" , "Please upgrade your client, min version for in this hub is <1.03>" },
}
tCl2 = {
["StrongDC++"] = { "1.00 RC5" , "Please upgrade your client, min version for in this hub is <1.00 RC5>" }
}
tClBad = {
{"<.P>", "PhantomDC++","cccc"},
{"
{"
{"reverseconnect.sf.net","ReverseConnect","cccc"},
{"www.RevConnect.com","ReverseConnect","cccc"},
{"[BL]:","BCDC++","<.P>"},
}
tClBad2 = {
["Client"] = { "Your client isn't allowed in this hub" },
}
function NewUserConnected(curUser)
if curUser.bHasTag then
if badVer == 1 then
if curUser.sClient == "StrongDC++" then
if (curUser.sClientVersion >= "1.00 RC7") and (curUser.sClientVersion <= "1.00 RC8") then
curUser:SendData("------------------------------------------------------------------------------")
curUser:SendData("Clients with version numbers 403-665 isn't allowed in this hub.")
curUser:SendData("------------------------------------------------------------------------------")
curUser:Disconnect()
end
else
if ((tonumber(curUser.sClientVersion) >= 0.403) and (tonumber(curUser.sClientVersion) <= 0.665)) then
curUser:SendData("------------------------------------------------------------------------------")
curUser:SendData("Clients with version numbers 403-665 isn't allowed in this hub.")
curUser:SendData("------------------------------------------------------------------------------")
curUser:Disconnect()
end
end
end
if tCl2[curUser.sClient] then
if (curUser.sClientVersion) < (tCl2[curUser.sClient][1]) then
curUser:SendData(tCl2[curUser.sClient][2])
curUser:Disconnect()
return 1
end
elseif tCl[curUser.sClient] then
if tonumber(curUser.sClientVersion) < tonumber(tCl[curUser.sClient][1]) then
curUser:SendData(tCl[curUser.sClient][2])
curUser:Disconnect()
return 1
end
elseif tClBad2[curUser.sClient] then
curUser:SendData(tClBad2[curUser.sClient][1])
curUser:Disconnect()
return 1
end
end
end
--OpConnected = NewUserConnected --Uncomment to check op as well
function MyINFOArrival(curUser , data)
if not curUser.bOperator then
for i=1,table.getn(tClBad) do
tClBad[i][1] = string.gsub(tClBad[i][1], "<" , "")
if string.find(data,tClBad[i][1]) and not string.find(data,tClBad[i][3]) then
local Client=tClBad[i][2]
curUser:SendData("------------------------------------------------------------------------------")
curUser:SendData("*** The Client <"..Client.."> isn't allowed in this hub.")
curUser:SendData("*** Use Original DC++, NMDC, oDC or DCGUI")
curUser:SendData("------------------------------------------------------------------------------")
curUser:Disconnect()
end
end
end
end
Thank you in advance for help with this :-)