!hideme !unhideme standalone 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

!hideme !unhideme standalone script

Started by Vntalk, 04 August, 2004, 12:29:42

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Vntalk

anyone know that script ?? that command in Channel Bot make the admin of the hub invisible,but i only want the script to do that only not the whole CB. :))

Typhoon

you could try this script by Phatty ...

--Lance Evol v1.00
--Hider Bot, this one does not give the nick taken error ;)
--Written by Phatty 12th December 2k3
--Need to sort the Logged in LogedIn not work neither any ideas?

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, 4) == "$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


** Typhoon?



Psycho_Chihuahua

i'm using

--Requested by Bladerunneruk
--Made by nErBoS

sBot = "HubBot"

hide = {}
hidesv = "hide.dat"

function Main()
	frmHub:RegBot(sBot)
	frmHub:EnableFullData(1)
	LoadFromFile(hidesv)
	RefreshHide()
end

function OnExit()
	SaveToFile(hidesv , hide , "hide")
end

function OpDisconnect(user, data)
	if (user.iProfile == 0) then
		hide[user.sName] = nil
		frmHub:UnregBot(user.sName)
	end
end

function DataArrival(user, data)
	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
			if (hide[user.sName] == nil) then
				hide[user.sName] = 1
				frmHub:UnregBot(user.sName)
				user:SendPM(sBot, "You are now hide from the user list")
			else
				user:SendPM(sBot, "You are already hide from the user list")
			end
			return 1
		elseif (cmd == "!unhide" and user.iProfile == 0) then
			if (hide[user.sName] ~= nil) then
				hide[user.sName] = nil
				frmHub:RegBot(user.sName)
				user:SendPM(sBot, "You are now back to the user list")
			else
				user:SendPM(sBot, "You are not hide from the Hub")
			end
			return 1
		end
	end
	if (strsub(data,1,12) == "$GetNickList") then
		RefreshHide()
	end
	if (strsub(data,1,5) == "$To: ") then
		local s,e,usr = strfind(data, "$To:%s+(%S+)")
		if (hide[usr] ~= nil) then
			return 1
		end
	end
end

function RefreshHide()
	local usr,aux
	for usr, aux in hide do
		frmHub:UnregBot(usr)
	end
end

function Serialize(tTable, sTableName, sTab)
	assert(tTable, "tTable equals nil");
	assert(sTableName, "sTableName equals nil");

	assert(type(tTable) == "table", "tTable must be a table!");
	assert(type(sTableName) == "string", "sTableName must be a string!");

	sTab = sTab or "";
	sTmp = ""

	sTmp = sTmp..sTab..sTableName.." = {\n"

	for key, value in tTable do
		local sKey = (type(key) == "string") and format("[%q]",key) or format("[%d]",key);

		if(type(value) == "table") then
			Serialize(value, sKey, sTab.."\t");
		else
			local sValue = (type(value) == "string") and format("%q",value) or tostring(value);
			sTmp = sTmp..sTab.."\t"..sKey.." = "..sValue
		end

		sTmp = sTmp..",\n"
	end

	sTmp = sTmp..sTab.."}"
	return sTmp
end

function SaveToFile(file , table , tablename)
	writeto(file)
	write(Serialize(table, tablename))
	writeto()
end

function LoadFromFile(file)
	if (readfrom(file) ~= nil) then
		readfrom(file)
		dostring(read("*all"))
		readfrom()
	end
end
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

QuikThinker

The script by Nerbos is excellent but I need a mod so OPs can use it 2. At the moment it jus works 4 Masters :s

Snooze

That should do it ..

--Requested by Bladerunneruk
--Made by nErBoS

sBot = "HubBot"

hide = {}
hidesv = "hide.dat"

function Main()
	frmHub:RegBot(sBot)
	frmHub:EnableFullData(1)
	LoadFromFile(hidesv)
	RefreshHide()
end

function OnExit()
	SaveToFile(hidesv , hide , "hide")
end

function OpDisconnect(user, data)
	if (user.iProfile == 0) then
		hide[user.sName] = nil
		frmHub:UnregBot(user.sName)
	end
end

function DataArrival(user, data)
	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 <= 1) then
			if (hide[user.sName] == nil) then
				hide[user.sName] = 1
				frmHub:UnregBot(user.sName)
				user:SendPM(sBot, "You are now hide from the user list")
			else
				user:SendPM(sBot, "You are already hide from the user list")
			end
			return 1
		elseif (cmd == "!unhide" and user.iProfile <= 1) then
			if (hide[user.sName] ~= nil) then
				hide[user.sName] = nil
				frmHub:RegBot(user.sName)
				user:SendPM(sBot, "You are now back to the user list")
			else
				user:SendPM(sBot, "You are not hide from the Hub")
			end
			return 1
		end
	end
	if (strsub(data,1,12) == "$GetNickList") then
		RefreshHide()
	end
	if (strsub(data,1,5) == "$To: ") then
		local s,e,usr = strfind(data, "$To:%s+(%S+)")
		if (hide[usr] ~= nil) then
			return 1
		end
	end
end

function RefreshHide()
	local usr,aux
	for usr, aux in hide do
		frmHub:UnregBot(usr)
	end
end

function Serialize(tTable, sTableName, sTab)
	assert(tTable, "tTable equals nil");
	assert(sTableName, "sTableName equals nil");

	assert(type(tTable) == "table", "tTable must be a table!");
	assert(type(sTableName) == "string", "sTableName must be a string!");

	sTab = sTab or "";
	sTmp = ""

	sTmp = sTmp..sTab..sTableName.." = {\n"

	for key, value in tTable do
		local sKey = (type(key) == "string") and format("[%q]",key) or format("[%d]",key);

		if(type(value) == "table") then
			Serialize(value, sKey, sTab.."\t");
		else
			local sValue = (type(value) == "string") and format("%q",value) or tostring(value);
			sTmp = sTmp..sTab.."\t"..sKey.." = "..sValue
		end

		sTmp = sTmp..",\n"
	end

	sTmp = sTmp..sTab.."}"
	return sTmp
end

function SaveToFile(file , table , tablename)
	writeto(file)
	write(Serialize(table, tablename))
	writeto()
end

function LoadFromFile(file)
	if (readfrom(file) ~= nil) then
		readfrom(file)
		dostring(read("*all"))
		readfrom()
	end
end

QuikThinker

Appreciate that man but would u mind showin me exactly wat u changed so I can learn a bit maself?

Thanx again,
Quik.

Snooze

In the DataArrival I changed this:

function DataArrival(user, data)
	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 <= 1) then [COLOR=red](Used to be: "if (cmd == "!hide" and user.iProfile == 0) then")[/COLOR] 
			if (hide[user.sName] == nil) then
				hide[user.sName] = 1
				frmHub:UnregBot(user.sName)
				user:SendPM(sBot, "You are now hide from the user list")
			else
				user:SendPM(sBot, "You are already hide from the user list")
			end
			return 1
		elseif (cmd == "!unhide" and user.iProfile <= 1) then [COLOR=red](Used to be: "if (cmd == "!unhide" and user.iProfile == 0) then")[/COLOR] 
			if (hide[user.sName] ~= nil) then
				hide[user.sName] = nil
				frmHub:RegBot(user.sName)
				user:SendPM(sBot, "You are now back to the user list")
			else
				user:SendPM(sBot, "You are not hide from the Hub")
			end
			return 1
		end
	end
	if (strsub(data,1,12) == "$GetNickList") then
		RefreshHide()
	end
	if (strsub(data,1,5) == "$To: ") then
		local s,e,usr = strfind(data, "$To:%s+(%S+)")
		if (hide[usr] ~= nil) then
			return 1
		end
	end
end

0 = Master
1 = Operator


"<= 1" means that if the users profile is less or equal  to 1 ( 1 or 0) then execute the command.

Hope it helped..

Best regards,

Snooze

h!mz316

#7
[20:58] The nick you are using is reserved for someone other. Change your nick and get back again.

cant get back into QuikThinkers hub :(:(:(

using Nerbos script
been trying for last 10 minutes.

p.s. biggup Snooze, doin a great job mate ;)

Snooze

#8
In that case i suggest that you use the script by Phatty..


--Hider Bot, this one does not give the nick taken error ;)

Edit: Will work for all users with Op status
(if user.bOperator then)

QuikThinker

Thanx 4 the pointers snooze

SMF spam blocked by CleanTalk