Non registered redirect
 

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

Non registered redirect

Started by elpocho, 02 August, 2004, 09:48:04

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

elpocho

I dunno if this is the right place, but I'm looking for a scritp that will redirect non registered user to another hub.

This is for a private hub and there is no need for other functions since there are no rules within the hub.

thanks in adnvance

Snooze

This will redirect non regged users to the default redirect adress set in the PtokaX HubSoft

function DataArrival(user,data)
	if ( strsub(data, 1, 12) == "$MyINFO $ALL" ) then
		if (GetProfileName(user.iProfile) == nil) then
			user:SendData("*** This is a Private Members ONLY hub.")
			user:SendData("$ForceMove "..frmHub:GetRedirectAddress())
		end
	end
end

Best regards,

Snooze

Psycho_Chihuahua

This one works to, and lets in the Hublistpinger from Hublist.org
        --???????????????????????????????????????????????????????????????????????????????
	--?               ???????????? Here some Hubinfo ????????????               ?
        --???????????????????????????????????????????????????????????????????????????????
addy="myhub.homeip.net"			-- ? <<<<< here redirect address	?
					-- ??????????????????????????????????????????????
text=	"This Hub is for registered Users only\n"..
	"  <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>\n"..
	" Interested in becoming a registered User then send an email to the hubadmin [EMAIL]admin@myhub.homeip.net[/EMAIL]\n"..
	"  <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>\n"..
	" You shall now be redirected to our Partner hub\n"			-- ? <<<<< Place Text to send here	?
        --???????????????????????????????????????????????????????????????????????????????
	--?                        ???????????? Oberlausitzer Open Hub ????????????                        ?
        --???????????????????????????????????????????????????????????????????????????????
function NewUserConnected(user)
 if (user.iProfile == -1) then
  if (user.sName =="{HubListPinger}") then
  else
user:SendData(text.."|$ForceMove "..addy.."|")
  end
 end
end
function DataArrival(user,data)
 if (strsub( data, 1, 8 ) == "$MyINFO ") and (user.iProfile == -1) then
  if (user.sName =="{HubListPinger}") then
  else
user:SendData(text.."|$ForceMove "..addy.."|")
  end
 end
end
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

elpocho

Thank you, thank you, thank you, to the both of you.

you have no idea how much this will help.



regards, and I'm in debt

elpocho

#4
Psycho_Chihuahua:

your script is giving me the following error message:

Syntax error: expected;
  last token read: `?' at line 4 in file `C:\HubDD  VIP\scripts\redirect_original.lua'

What I did is I copied your script in an edited lua file which I named redirect _original.lua and put in the scripts folder of PtoKaX.  I dunno if what I did is wrong since I'm quite new with PtoKaX and Lua scripts. Please let me now if I made a mistake, and if I did , please let me know how to load this script.

I seem to be getting a similar error from Snooze's script as well. Obviously I'm doing something wrong. Could you please point me in the right direction.

Syntax error: expected;
  last token read: `function' at line 3 in file `\\Netserver2\NetServer2\HubDD  VIP\scripts\redirect_chico.lua'


Thanks again.

Snooze

#5
If you wanna let the {HubListPinger} in, this should do it..

function DataArrival(user,data)
	if ( strsub(data, 1, 12) == "$MyINFO $ALL" ) then
		if (GetProfileName(user.iProfile) == nil) then
			if (user.sName =="{HubListPinger}") then
			else 
				user:SendData("*** This is a Private Members ONLY hub.")
				user:SendData("$ForceMove "..frmHub:GetRedirectAddress())
			end
		end
	end
end

Best regards,


Snooze

NightLitch

Where is the users redirect now Snooze ??? u only redirecting the HubListPinger...
//NL

Snooze

lol - good that someone is awake

Corrected in script above ..

elpocho

#8
Snooze, thanks for modifying the script, but I'm still getting the same error but now it mentions line 4 instead of 3.

Syntax error: expected;
last token read: `function' at line 4 in file `\\Netserver2\NetServer2\HubDD VIP\scripts\redirect_chico.lua'

What is that expected? Is there something in particular that I have to input there?

Thaks for your patience


Regards

SMF spam blocked by CleanTalk