PtokaX forum

Archive => Archived 5.1 boards => Finished Scripts => Topic started by: Helios on 01 March, 2007, 16:28:02

Title: script for controlled connection
Post by: Helios on 01 March, 2007, 16:28:02
anyone have a good script like controlled a connection?

1 modem
2 wire
3 etc....

tnx
best regard
Helios
Title: Re: script for controlled connection
Post by: Madman on 01 March, 2007, 18:45:53
Please explain more.
Title: Re: script for controlled connection
Post by: Helios on 02 March, 2007, 15:45:25
ex: i'm searching a script for control connections like access denied a various connection like modem , wireless etc...

setting like this dsl 1 (yes) 0 (no)  t1 etc....

i use a ptokax version 0.3.5.2f

tnx
Title: Re: script for controlled connection
Post by: Madman on 02 March, 2007, 18:02:49
Try this, tested litle, and seems to work...

Code (lua) Select

-- ConDeny
-- Made by Madman
-- Request by Helios

Bot = "ConDeny"
Action = 1 -- 1 = disconnect, 2 = timeban, 3 = redirect
TimeBanTime = 5 -- Minutes to timeban
RedirAddres = "myotherhub.org" -- addy to redirect to
Msg = "Your connection type is not allowed in this hub" -- msg to send
Owner = "Madman"
informOwn = 1 -- if 1, pm owner about connetion not in table

-- 1 = Allow, 0 = Deny
Connection = {
["28.8Kbps"] = 1,
["33.6Kbps"] = 1,
["56Kbps"] = 1,
["ISDN"] = 1,
["Satellite"] = 1,
["Cable"] = 1,
["DSL"] = 1,
["LAN(T1)"] = 1,
["LAN(T3)"] = 1,
}

function NewUserConnected(curUser)
if Connection[curUser.sConnection] == 0 then
if Action == 1 then
curUser:SendData(Bot,Msg)
curUser:Disconnect()
elseif Action == 2 then
curUser:SendData(Bot,Msg)
curUser:TimeBan(TimeBanTime)
elseif Action == 3 then
curUser:Redirect(RedirAddress,Msg)
end
elseif Connection[curUser.sConnection] == nil then
if informOwn == 1 then
SendPmToNick(Owner,frmHub:GetHubBotName(), curUser.sName.. " logged in with an connetion that aren't in the Connnetion table. His/Hers connetion is -->" ..curUser.sConnection.. "<--")
end
end
end
Title: Re: script for controlled connection
Post by: Helios on 03 March, 2007, 17:15:51
many tnx madman the script work fine

best regard

helios