HIDDEN SCRIPT
 

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

HIDDEN SCRIPT

Started by gazzer, 13 April, 2004, 22:24:52

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gazzer

hi lua guys, anyone have or could please make me a hidden script so hubowner is hidden in hub please.
thanks in advance gazzer
-=U=K=?=E=T=-???? the friendly network from good old blighty.

Flux

I would like to see what will be developed for that. Also do u want to still download off others and them download off you while ypou are invisible hehehe...
? Official HoD Website - http://www.houseofdance.net
? Official HoD Hub Community -  hodhub.dyndns.org:2007

nErBoS

Hi,

Thank to plop for explanions
Hope it helps..

--Requested by gazzer
--Made by nErBoS

sBot = "Hider"

hide = {}

function Main()
	frmHub:RegBot(sBot)
end

function DataArrival(user, data)
	frmHub:EnableFullData(1)
	if (strsub(data,1,12) == "$GetNickList") then
		for aux, usr in GetUsersByProfile("Master") do
			if (GetItemByName(usr) ~= nil and hide[usr] == 1) then
				frmHub:UnregBot(usr)
			end
		end
	frmHub:EnableFullData(0)
	end
	if (strsub(data,1,1) == "<" or strsub(data,1,5+strlen(sBot)) == "$To: "..sBot) then
		data=strsub(data,1,strlen(data)-1)
		s,e,cmd = strfind(data, "%b<>%s+(%S+)")
		if (cmd=="!hide" and user.iProfile == 0) then
			frmHub:UnregBot(user.sName)
			hide[user.sName] = 1
			return 1
		elseif(cmd=="!unhide" and user.iProfile == 0) then
			user:SendData(user.sMyInfoString)
			hide[user.sName] = nil
			return 1
		end
	end
end

Just a minor problem when the op use the !unhide it will appear as a user, just recoonect and it will solve that.

Best regards, nErBoS
--## nErBoS Spot ##--

nErBoS

Hi,

A more effective one...

--Requested by gazzer
--Made by nErBoS

sBot = "Hider"

hide = {}

function Main()
	frmHub:RegBot(sBot)
end

function OpDisconnected(user, data)
	frmHub:UnregBot(user.sName)
end

function DataArrival(user, data)
	frmHub:EnableFullData(1)
	if (strsub(data,1,12) == "$GetNickList") then
		for aux, usr in GetUsersByProfile("Master") do
			if (GetItemByName(usr) ~= nil and hide[usr] == 1) then
				frmHub:UnregBot(usr)
				hide[usr] = 1
			end
		end
	end
	if (strsub(data,1,1) == "<" or strsub(data,1,5+strlen(sBot)) == "$To: "..sBot) then
		data=strsub(data,1,strlen(data)-1)
		s,e,cmd = strfind(data, "%b<>%s+(%S+)")
		if (cmd=="!hide" and user.iProfile == 0) then
			frmHub:UnregBot(user.sName)
			hide[user.sName] = 1
			return 1
		elseif(cmd=="!unhide" and user.iProfile == 0) then
			frmHub:RegBot(user.sName)
			hide[user.sName] = nil
			return 1
		end
	end
end

Best regards, nErBoS
--## nErBoS Spot ##--

pHaTTy

well heres one i wrote earlier if ya get a nick taken error later on try this one ;-)

--Lance Evol v1.00
--Hider Bot, this one does not give the nick taken error ;)
--Written by Phatty 12th December 2k3

Bot = "?????R" 
Hidden = {}

function NewUserConnected(user)
	if Hidden == nil then
		return 1
	else
		for i,v in Hidden do
			user:SendData( "$Quit "..i ) 
		end
	end
end

function OpConnected(user)
	if Hidden == nil then
		return 1
	else
		for i,v in Hidden do
			user:SendData( "$Quit "..i ) 
		end
	end
end

function DataArrival(user, data) 
	if(strsub(data, 1, 5) == "$Quit") then
		if Hidden[user.sName] == 1 then
			Hidden[user.sName] = nil
		end
	end
	
	if strsub(data, 1, 1) == "<" then
		data=strsub(data,1,strlen(data)-1)
		s,e,cmd = strfind(data,"%b<>%s+(%S+)")
		
		if cmd == "hide" then
			if user.bOperator then
				SendToAll( "$Quit "..user.sName )
				Hidden[user.sName] = 1
			end
		elseif cmd == "unhide" then
			if user.bOperator then
				SendToAll( "$Hello "..user.sName )
				Hidden[user.sName] = nil
			end
		end
	end
end

later,,
Resistance is futile!

tezlo

looks familiar..
btw this can never equal
if strsub(data, 1, 4) == "$Quit " then

nErBoS

Hi,

It should give the given nick because of this...

function OpDisconnected(user, data)
   frmHub:UnregBot(user.sName)
end

i think :P

Best regards, nErBoS
--## nErBoS Spot ##--

pHaTTy

QuoteOriginally posted by tezlo
looks familiar..
btw this can never equal
if strsub(data, 1, 4) == "$Quit " then

lol well yea i realised b4 shud be 6, but as it skips n checks the 4 first out of 6 is still works n catchs correct data, so not much differ just change to 6, or remove end space n nock to 5, dont really matter ;-)
Resistance is futile!

pHaTTy

QuoteOriginally posted by nErBoS
Hi,

It should give the given nick because of this...

function OpDisconnected(user, data)
   frmHub:UnregBot(user.sName)
end

i think :P

Best regards, nErBoS

hmm u cud be right im not sure, but remove ,data ;-)
Resistance is futile!

tezlo

Quotebut as it skips n checks the 4 first out of 6 is still works n catchs correct data
no it doesnt.. the interpreter isn't psychic

whereas NewUserConnected(the_cook, the_thief, his_wife, her_lover) works just fine

pHaTTy

QuoteOriginally posted by tezlo
Quotebut as it skips n checks the 4 first out of 6 is still works n catchs correct data
no it doesnt.. the interpreter isn't psychic

whereas NewUserConnected(the_cook, the_thief, his_wife, her_lover) works just fine

yep sorry ur right, ive been getting carried away with cpp n forgetting strsub not like strfind....
Resistance is futile!

pHaTTy

there ya go

--Lance Evol v1.01
--Hider Bot, this one does not give the nick taken error ;)
--Written by Phatty 12th December 2k3
--little update today ehmm today issss 14th april 2k4

Bot = "?????R" ;
Hidden = {}

function NewUserConnected(user)
	if Hidden == nil then
		return 1;	else
		for i,v in Hidden do
			user:SendData( "$Quit "..i ) ;
		end;
	end;
end;

OpConnected = NewUserConnected

function DataArrival(user, data) 
	if(strsub(data, 1, 5) == "$Quit") then
		if Hidden[user.sName] == 1 then
			Hidden[user.sName] = nil;
		end
	elseif strsub(data, 1, 1) == "<" then
		local data=strsub(data,1,strlen(data)-1)
		local s,e,cmd = strfind(data,"%b<>%s+(%S+)")
		
		if cmd == "$hide" and user.bOperator then
			SendToAll( "$Quit "..user.sName )
			Hidden[user.sName] = 1;
		elseif cmd == "$unhide" and user.bOperator then
			SendToAll( "$Hello "..user.sName )
			Hidden[user.sName] = nil;
		end;
	end;
end;

right away for break;
Resistance is futile!

SMF spam blocked by CleanTalk