Script for hiding share
 

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 hiding share

Started by ReNeGaDe, 06 June, 2006, 08:41:02

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ReNeGaDe

Hello there!
It's my first post.. I am looking for a script that would let my operators, hide their share..
I dont know if a similar request was posted before..
Hope it's possible to create!
Thnx ijn advance ;)
ReNeGaDe

Dessamator

It has indeed been posted before, search the forum for ur answer.
Ignorance is Bliss.

-SkA-

-- Ops Share Hider Script By ??????Hawk??????
-- 28/11/2005
-- Hides Your Share From the user list
-- Compatible with Terminator One
-- http://www.hawks-world.com

function Main()
	sTable["loadfile"]()
end


OpConnected = NewUserConnected

function OnTimer()
	for a,b in pairs(sTable.Hiders) do
		Nick = GetItemByName(a)
		if Nick then
			s,e,name,desc,speed,email,share = string.find(Nick.sMyInfoString, "$MyINFO $ALL (%S+)%s+([^$]*)$ $([^$]*)$([^$]*)$([^$]+)")
			SendToAll( "$MyINFO $ALL "..name.." "..desc.."$ $"..speed.."$"..email.."$0$")
		end
	end
  StopTimer()
end


function ChatArrival(user, data) 
	local s, e, cmd = string.find(data, "%b<>%s+(%S+).*|") 
	if sTable.tAllowList[user.iProfile] == 1 and cmd and sTable.commands[cmd] then
		return sTable.commands[cmd](user, data)
	end
end 

sTable = {
	["Menu"] = "Share-Hider",
	["Bot"] = frmHub:GetHubBotName(),
	Hiders = {},

	tAllowList = { 
		[0] = 1,
		[1] = 1, 
		[2] = 0,			--// Profiles Allowed to use the command  1 yes  / 0 No
		[3] = 0,
		[4] = 0,
		[5] = 1,
	}, 

	commands = {
		["!unhideshare"] = function(user, data)
			if sTable.Hiders[user.sName] then
				local s,e,name,desc,speed,email,share = string.find(user.sMyInfoString, "$MyINFO $ALL (%S+)%s+([^$]*)$ $([^$]*)$([^$]*)$([^$]+)")
				SendToAll( "$MyINFO $ALL "..name.." "..desc.."$ $"..speed.."$"..email.."$"..share.."$")
				sTable.Hiders[user.sName] = nil
				user:SendData(sTable["Bot"],"Your Share Has been added to userlist!") 
			end
			return 1 
		end, 

		["!hideshare"] = function(user, data)
				local s,e,name,desc,speed,email,share = string.find(user.sMyInfoString, "$MyINFO $ALL (%S+)%s+([^$]*)$ $([^$]*)$([^$]*)$([^$]+)")
				SendToAll( "$MyINFO $ALL "..name.." "..desc.."$ $"..speed.."$"..email.."$0$")
				sTable.Hiders[user.sName] = 1
				sTable["SaveTable"]()
				user:SendData(sTable["Bot"]," Your Share Has been removed from userlist!") 
			return 1 
		end ,
	},

	["loadfile"] = function()
	local f,e = io.open("ShareHidden.lst","r")
		if f then
			while 1 do
				line = f:read("*l")
					if line ==  nil then
						break
					end
					local s,e,InfoOne,InfoTwo = string.find(line, "(.+)$$$(.+)")
						if InfoOne ~= nil then
							sTable.Hiders[InfoOne]=InfoTwo
						end
			end
			 f:close(f)
		else
			f,e = io.open("ShareHidden.lst", "w" )
			f:write()
			f:close()
		end
	end,

	["SaveTable"] = function()
		local ipairs f,e = io.open("ShareHidden.lst", "w" )
			for aaa,bbb in pairs(sTable.Hiders) do
				f:write(aaa.."$$$"..bbb.."\n")
			 end
		 f:close()
	end,
}

???:::??x??em?-N????:::??? ?wN??

BrianzaLand Blog" style="border:0

Markitos

local ipairs f,e = io.open("ShareHidden.lst", "w" )???

bastya_elvtars

I have updated this script before. Search the forums.
Everything could have been anything else and it would have just as much meaning.

speedX

hello,
Is it possible in this script tht if i hide some one's share it is still added to the total hub share ?
Thanking You,

speedX

Rincewind

I believe the total share shown below the userlist in the client is calculated by the client based on the information about the users it receives. If a user is hiding their share then their share information is not available to the client for inclusion in the calculation.

SMF spam blocked by CleanTalk