heyaaaa again and again =o)
this is NO SLOW CONNECTIONS ALLOWED IN THE HUB
small script but really usefull for me,i used the converter to chnge it in lua 5 but it still doesn t works
check it out guys :
BotName = "-Inspector-"
function NewUserConnected(curUser)
data=curUser.sMyInfoString
s,e,cmd = string.find( data, "[$]+[^$]+[$]+[^$]+[$]+[^$]+[$]+([^$]+)" )
if (string.find(cmd,"28.8K")) then
curUser:SendPM(BotName,"___SorrY_BuT_Users_With_Slow_Connection_(28.8)_ArE_NoT_AlloweD_In_HerE___!! ")
curUser:Disconnect()
end
if (string.find(cmd,"33.6K")) then
curUser:SendPM(BotName,"___SorrY_BuT_Users_With_Slow_Connection_(33.6)_ArE_NoT_AlloweD_In_HerE___!! ")
curUser:Disconnect()
end
if (string.find(cmd,"56K")) then
curUser:SendPM(BotName,"___SorrY_BuT_Users_With_Slow_Connection_(56k)_ArE_NoT_AlloweD_In_HerE___!! ")
curUser:Disconnect()
end
end
smth like this ?function MyInfoArrival( user, data)
local BotName = "NoDialUps"
local tCons = {
["28.8Kbps"] = { 0, "bye bye no dialups here..." },
["33.6Kbps"] = { 0, "bye bye no dialups here..." },
["56Kbps"] = { 0, "bye bye no dialups here..." },
["ISDN"] = { 1, "no.dial-ups.org", "bye bye no dialups here..." },
}
for i,v in tCons do
if i == user.sConnection then
if v[1] == 0 then
user:SendData( BotName, v[2] )
user:Disconnect()
elseif v[1] == 1 then
user:Redirect(v[2], v[3])
end
break
end
end
end
IMHO it would be a lot better by hashing. :)if tCons[user.sConnection] then punish(user); end
QuoteOriginally posted by bastya_elvtars
IMHO it would be a lot better by hashing. :)if tCons[user.sConnection] then punish(user); end
yeah .. too much php can do that to a scripter ..
QuoteOriginally posted by Herodes
QuoteOriginally posted by bastya_elvtars
IMHO it would be a lot better by hashing. :)if tCons[user.sConnection] then punish(user); end
yeah .. too much php can do that to a scripter ..
That's why when i did my first trial page in HTML, I froze LUA for that time. :D
ok my friends i ve tried this script and i added in my settings 28,8 connction
and i tried to connect as a user and the log me in
note : i have DSL connection
but is this can be done?? the script seems it works in ptoka x no errors but why when i m connection with 54 connection in my settings it log me in the hub??
QuoteOriginally posted by LiqUiD~TrolL
...but why when i m connection with 54 connection in my settings it log me in the hub??
I read this part 7 times and couldnt understand it. can you please explain ?
Indeed ;)
i think he meant 56kb connection setting, :D
sorry guys i wasn t so clear in what i wanted to say
well look,i have a script and when someone have in DC++ settings 58,isdn,28,and 34 KBS connection then the script doesn t allow him to log in the hub.
so how is this script works??
it s the same as mine?? if someone have in his DC++ settings these connections it doesn t allow him to log in the hub???
Well, the code is written in a way that either the user gets disconnected (0) or redirected (1), depending on the settings u chose here:
local tCons = {
["28.8Kbps"] = { 0, "bye bye no dialups here..." },
["33.6Kbps"] = { 0, "bye bye no dialups here..." },
["56Kbps"] = { 0, "bye bye no dialups here..." },
["ISDN"] = { 1, "no.dial-ups.org", "bye bye no dialups here..." },
}
With the settings, I mean the value (0 or 1) behind the reason message.
Best regards,
jiten
;-) i already got that jiten , but look what i m doing
i m adding the script ok,and i m opening the hub .the script is working ok??
and after that i m going on my DC++ settings and change my connection in ["28.8Kbps"] or something else from these not allowed
and the hub log me in,why ??
shouldn t ordinary dissconnect me ?
Yups, it should ;)
It should work.. any how I believe it was working before ...just made it more smooth to configure... function MyInfoArrival( user, data)
local BotName = "NoDialUps"
local tCons = {
-- ["con_type"] = { 0/1=off/on, "address.toredirect.to", "message to send" },
["28.8Kbps"] = { 0, "no.dial-ups.org", "bye bye no dialups here..." },
["33.6Kbps"] = { 0, "no.dial-ups.org", "bye bye no dialups here..." },
["56Kbps"] = { 0, "no.dial-ups.org", "bye bye no dialups here..." },
["ISDN"] = { 1, "no.dial-ups.org", "bye bye no dialups here..." },
}
for conn, tbl in tCons do
if (string.sub( user.sConnection, 1, -1 ) == i) then
if tbl[1] == 0 then
user:SendData( BotName, tbl[3] )
user:Disconnect()
elseif tbl[1] == 1 then
user:Redirect(tbl[2], tbl[3])
end
break;
end
end
end
[*edit*] small typo...
this script doesn t works too =/
i add it,in ptokaX it works
with no errors,but when someone connected to the hub with slow connection it log in him ordinary, =(
why is this ?? is it better maybe to convert this one in LUA 5 ???
code :
------------------------------------------------------------------------
otName = "-Inspector-"
function NewUserConnected(curUser)
data=curUser.sMyInfoString
s,e,cmd = string.find( data, "[$]+[^$]+[$]+[^$]+[$]+[^$]+[$]+([^$]+)" )
if (string.find(cmd,"28.8K")) then
curUser:SendPM(BotName,"___SorrY_BuT_Users_With_Slow_Connection_(28.8)_ArE_NoT_AlloweD_In_HerE___!! ")
curUser:Disconnect()
end
if (string.find(cmd,"33.6K")) then
curUser:SendPM(BotName,"___SorrY_BuT_Users_With_Slow_Connection_(33.6)_ArE_NoT_AlloweD_In_HerE___!! ")
curUser:Disconnect()
end
if (string.find(cmd,"56K")) then
curUser:SendPM(BotName,& quot;___SorrY_BuT_Users_With_Slow_Connection_(56k)_ArE_NoT_AlloweD_In_HerE_ __!! ")
curUser:Disconnect()
end
end
------------------------------------------------------------------------
It happened the same with me.
I am pretty sure users are sending a MyINFO when they connect,... I am not sure if PtokaX passes that first MyINFO through lua ... If PPK is listening (or reading) this I wish he could clarify it ;)
Maybe this ?function GetHim(user, con)
local BotName = "NoDialUps"
local tCons = {
["28.8Kbps"] = { 0, "no.dial-ups.org", "bye bye no dialups here..." },
["33.6Kbps"] = { 0, "no.dial-ups.org", "bye bye no dialups here..." },
["56Kbps"] = { 0, "no.dial-ups.org", "bye bye no dialups here..." },
["ISDN"] = { 1, "no.dial-ups.org", "bye bye no dialups here..." },
}
for conn, tbl in tCons do
if string.find( con, conn ) then
if tbl[1] == 0 then
user:SendData( BotName, tbl[3] )
user:Disconnect()
elseif tbl[1] == 1 then
user:Redirect(tbl[2], tbl[3])
user:Disconnect()
end
break;
end
end
end
function MyInfoArrival( user, data)
if user.sConnection then GetHim(user, user.sConnection) end
end
function UserConnected(user)
if user.sConnection then GetHim(user, user.sConnection) end
end
I'm curious about that one too, because the code seems OK, and it should work.
Let's hear PPK :D
nop not working either m8
=/ shit, why i can t understand?
can you test it on a ptoka x to see ???
in my test it did nt disconnect me
I'm just expecting all the people this disconnects / redirects to change the DC++ setting to sommit else and try again. So you will end up with loads of false connections. If you want to deny slow connections, you are best of with an IP blocker. :)
m8 i alreday know this, and i try it , plz read all the dialogue next time ;-)