script for controlled connection
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

script for controlled connection

Started by Helios, 01 March, 2007, 16:28:02

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Helios

anyone have a good script like controlled a connection?

1 modem
2 wire
3 etc....

tnx
best regard
Helios

Madman

We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

Helios

#2
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

Madman

Try this, tested litle, and seems to work...

Code: lua
-- 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
We suffer in silence, we lurk in the shadows, we kill in the night
Site currently down, ETA of returning online is 2099 ;p

Helios

many tnx madman the script work fine

best regard

helios

SMF spam blocked by CleanTalk