Hide user.
 

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

Hide user.

Started by Jaakko, 09 May, 2005, 20:55:00

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jaakko

Is it possible to make a script that can hide someone in the hub so that he won't show in then nicklist.
I'm using DCDM++ as a bot for cleaning at my hub, but it would be better if my alter ego wouldn't show for ordinary users.

PPK

Is easy, SendToAll("$Quit nick") on hide and curUser:SendData("$Quit nick") to new users on login :)) Btw if user is not in userlist then most clients not allow upload to this user  :rolleyes:
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Cêñoßy†ê

--//-- Hider by C??o?y??--//--

Bot = frmHub:GetHubBotName()
kMenu = "?~UserHider~?"

CanDo = {
[0] = 1,	-- Master
[1] = 0,	-- Operator
[4] = 0,	-- Moderator
[5] = 0,	-- Netfounder
}

OpConnected = function(user)
if CanDo[user.iProfile] == 1 and  user.bUserCommand then
user:SendData("$UserCommand 1 3 "..kMenu.."\\Hide from userlist$<%[mynick]> !hideme %[mynick]|")
user:SendData("$UserCommand 1 3 "..kMenu.."\\Return to userlist$<%[mynick]> !unhideme %[mynick]|")
user:SendData("$UserCommand 1 3 "..kMenu.."\\Hide user from userlist$<%[mynick]> !hiduser %[nick]|")
user:SendData("$UserCommand 1 3 "..kMenu.."\\Return user to userlist$<%[mynick]> !unhiduser %[line:Nick]|")
end
end

ChatArrival = function(user, data)
	local s, e, cmd,arg = string.find( data, "%b<>%s+(%S+)%s+(.*)")
	if(cmd == "!hideme") then
		if CanDo[user.iProfile] == 1 then
				SendToAll("*** "..user.sName.." went to Ghost mode.")
				SendToAll("$Quit "..user.sName)

		else
			user:SendData(Bot, "No,No,NO... You are not allowed to use this command!")
end
	return 1
end
	local s, e, cmd,arg = string.find( data, "%b<>%s+(%S+)%s+(.*)")
	if(cmd == "!unhideme") then
		if CanDo[user.iProfile] == 1 then
				SendToAll("*** "..user.sName.." got back from Ghost mode.")
				SendToAll("$OpList "..user.sName)
		else
			user:SendData(Bot, "No,No,NO... You are not allowed to use this command!")
end
	return 1
end
	local s, e, cmd,victim = string.find( data, "%b<>%s+(%S+)%s+(.*)")
	if(cmd == "!hideuser") then
		if (user.iProfile == 0) then
				SendToAll("*** Ghost mode activated to "..victim)
				SendToAll("$Quit "..victim)

		else
			user:SendData(Bot, "No,No,NO... You are not allowed to use this command!")
end
	return 1
end
	local s, e, cmd,victim = string.find( data, "%b<>%s+(%S+)%s+(.*)")
	if(cmd == "!unhideuser") then
		if (user.iProfile == 0) then
				SendToAll("*** Ghost mode disabled from "..victim)
				SendToAll("$OpList "..victim)
		else
			user:SendData(Bot, "No,No,NO... You are not allowed to use this command!")
end
	return 1
end
end
Powered By Leviathan™ 2nd Generation v. 1.9

Ubikk

Is it possible to comunicate via PM with a user that's not in the userlist?

jiten

QuoteOriginally posted by Ubikk
Is it possible to comunicate via PM with a user that's not in the userlist?
The hidden user may send PMs to anyone, but, normal users won't be able to reply as he's "offline".

Cheers

kunal

hey if a user is hidden his share also goes away
can someone modify he script so that the share of the user wont go when he is hidden

jiten

QuoteOriginally posted by kunal
hey if a user is hidden his share also goes away
can someone modify he script so that the share of the user wont go when he is hidden
If we do that, the user turns visible again.
Unless you login with a "blank" nick (with the ALT+255 character).

Cheers

Dessamator

QuoteOriginally posted by kunal
hey if a user is hidden his share also goes away
can someone modify he script so that the share of the user wont go when he is hidden

that would defeat the purpose of hidden user, the user will be visible but he/she wont have a nick  !
Ignorance is Bliss.

bastya_elvtars

Can users like this respond to searches?
Everything could have been anything else and it would have just as much meaning.

XPMAN

Fixed a couple typos i found that wouldnt let the rightclick work  :)

--//-- Hider by C??o?y†?--//--



Bot = frmHub:GetHubBotName()

kMenu = "•~UserHider~•"



CanDo = {

[0] = 1,-- Master

[1] = 0,-- Operator

[4] = 0,-- Moderator

[5] = 0,-- Netfounder

}



OpConnected = function(user)

if CanDo[user.iProfile] == 1 and  user.bUserCommand then

user:SendData("$UserCommand 1 3 "..kMenu.."\\Hide from userlist$<%[mynick]> !hideme %[mynick]|")

user:SendData("$UserCommand 1 3 "..kMenu.."\\Return to userlist$<%[mynick]> !unhideme %[mynick]|")

user:SendData("$UserCommand 1 3 "..kMenu.."\\Hide user from userlist$<%[mynick]> !hideuser %[nick]|")

user:SendData("$UserCommand 1 3 "..kMenu.."\\Return user to userlist$<%[mynick]> !unhideuser %[line:Nick]|")

end

end



ChatArrival = function(user, data)

local s, e, cmd,arg = string.find( data, "%b<>%s+(%S+)%s+(.*)")

if(cmd == "!hideme") then

if CanDo[user.iProfile] == 1 then

SendToAll("*** "..user.sName.." went to Ghost mode.")

SendToAll("$Quit "..user.sName)



else

user:SendData(Bot, "No,No,NO... You are not allowed to use this command!")

end

return 1

end

local s, e, cmd,arg = string.find( data, "%b<>%s+(%S+)%s+(.*)")

if(cmd == "!unhideme") then

if CanDo[user.iProfile] == 1 then

SendToAll("*** "..user.sName.." got back from Ghost mode.")

SendToAll("$OpList "..user.sName)

else

user:SendData(Bot, "No,No,NO... You are not allowed to use this command!")

end

return 1

end

local s, e, cmd,victim = string.find( data, "%b<>%s+(%S+)%s+(.*)")

if(cmd == "!hideuser") then

if (user.iProfile == 0) then

SendToAll("*** Ghost mode activated to "..victim)

SendToAll("$Quit "..victim)



else

user:SendData(Bot, "No,No,NO... You are not allowed to use this command!")

end

return 1

end

local s, e, cmd,victim = string.find( data, "%b<>%s+(%S+)%s+(.*)")

if(cmd == "!unhideuser") then

if (user.iProfile == 0) then

SendToAll("*** Ghost mode disabled from "..victim)

SendToAll("$OpList "..victim)

else

user:SendData(Bot, "No,No,NO... You are not allowed to use this command!")

end

return 1

end

end

jiten

#10
QuoteOriginally posted by bastya_elvtars
Can users like this respond to searches?
Tested it a while ago and they do respond.

CaSaNoVa

Hide share only??

bastya_elvtars

QuoteOriginally posted by CaSaNoVa
Hide share only??

Please do search first.
Everything could have been anything else and it would have just as much meaning.

Dessamator

-- added hide user on reconnect -- By Dessamator
--//-- Hider by C??o?y†?--//--

Bot = frmHub:GetHubBotName()
kMenu = "•~UserHider~•"

tOP={}

CanDo = {
[0] = 1,	-- Master
[1] = 0,	-- Operator
[4] = 0,	-- Moderator
[5] = 0,	-- Netfounder
}

OpConnected = function(user)
	if CanDo[user.iProfile] == 1 and  user.bUserCommand then
		user:SendData("$UserCommand 1 3 "..kMenu.."\\Hide from userlist$<%[mynick]> !hideme %[mynick]|")
		user:SendData("$UserCommand 1 3 "..kMenu.."\\Return to userlist$<%[mynick]> !unhideme %[mynick]|")
		user:SendData("$UserCommand 1 3 "..kMenu.."\\Hide user from userlist$<%[mynick]> !hideuser %[nick]|")
		user:SendData("$UserCommand 1 3 "..kMenu.."\\Return user to userlist$<%[mynick]> !unhideuser %[line:Nick]|")
	end
end

function Main()
	SetTimer(1000)
	StartTimer()
end

function OnTimer()
	for i,v in tOP do
		if GetItemByName(i) then
			SendToAll("$Quit "..i)
			GetItemByName(i):SendData("$Quit "..i)
			GetItemByName(i):SendData("$Quit "..i)
		end
	end
end


ChatArrival = function(user, data)
	data=string.sub(data,1,-2)
	local s, e, cmd = string.find( data, "%b<>%s+(%S+)")
	local _,__,victim = string.find( data, "%b<>%s+%S+%s+(%S+)")
tCmd= {["!hideme"] =function()
			user:SendData("*** "..user.sName.." went to Ghost mode.")
			SendToAll("$Quit "..user.sName)
			tOP[user.sName] = 1
		end,
["!unhideme"] =function()
			user:SendData("*** "..user.sName.." got back from Ghost mode.")
			SendToAll("$OpList "..user.sName)
			tOP[user.sName] = nil
		end,
["!hideuser"] =function()
			user:SendData("*** Ghost mode activated to "..victim)
			SendToAll("$Quit "..victim)
			tOP[user.sName] = 1
		end,
["!unhideuser"] =function()
			user:SendData("*** Ghost mode disabled from "..victim)
			tOP[user.sName] = nil
			if GetItemByName(victim).bOperator then
				SendToAll("$OpList "..user.sName)
			else
				SendToAll(GetItemByName(victim).sMyInfoString)
			end
		end,
}
	if tCmd[cmd] and CanDo[user.iProfile] then
		return tCmd[cmd](),1
	elseif not CanDo[user.iProfile] then
		user:SendData(Bot, "you cant use this command")
	return 1		
	end
end


slight mod  ;)
Ignorance is Bliss.

Zeel

#14
  Script does not seem to work, I tried the !hideme and !hideuser <user> and it didnt do anything.  Am I doing something wrong?  Script reports no errors.



Edit:  I just ran the script on another test server and it worked fine.  I'm not sure why it does not run on my other server...

Herodes

Wow! nice script to play with :D

--- Inspiration hit and ~15mins of scripting on this delivered what follows ..
- I added some functionality to the cmds that resulted in the removal of [un]hideuser
- The [un]hideme cmds were renamed to [un]hide
- Added the [User|Op]Disconnected API function for removing disconnecting users (keeping the tGhosts(previously 'tOp') table clean)
- Added the listhide cmd for watching which users are in Ghost mode
- Made the relevant right click adjustments and here it is ...

I left the OnTimer function, but I have strong feelings for removing it,...
It is a bandwidth overkill,... data is being sent every second and quite a lot of them,...

[*note*] On this script I only check the Syntax,... no checks for functionality although I feel confident about it enough to post :)
--//-- Hider by Cêñoßy†ê--//--
-- added hide user on reconnect -- By Dessamator
--- touched by Herodes [18/09/2006]
-- - added the autocleaner on user disconnections
-- - added the listhide for showing a list with the ghosts

Bot = frmHub:GetHubBotName()
kMenu = "•~UserHider~•"

tGhosts={}

CanDo = {
[0] = 1,	-- Master
[1] = 0,	-- Operator
[4] = 0,	-- Moderator
[5] = 0,	-- Netfounder
}

OpConnected = function(user)
	if CanDo[user.iProfile] == 1 and  user.bUserCommand then
		user:SendData("$UserCommand 1 3 "..kMenu.."\\Hide from userlist$<%[mynick]> !hide|")
		user:SendData("$UserCommand 1 3 "..kMenu.."\\Return to userlist$<%[mynick]> !unhide|")
		user:SendData("$UserCommand 1 3 "..kMenu.."\\Show ghosts$<%[mynick]> !listhide|")
		user:SendData("$UserCommand 1 3 "..kMenu.."\\Hide this user from userlist$<%[mynick]> !hide %[nick]|")
		user:SendData("$UserCommand 1 3 "..kMenu.."\\Return user to userlist$<%[mynick]> !unhide %[line:Nick]|")
	end
end

function Main()
	SetTimer(1000)
	StartTimer()
end

function OnTimer()  ---- WHy!?!!?
	for i,v in tGhost do
		if GetItemByName(i) then
			SendToAll("$Quit "..i)
			GetItemByName(i):SendData("$Quit "..i)
			GetItemByName(i):SendData("$Quit "..i)
		end
	end
end


ChatArrival = function(user, data)
	data=string.sub(data,1,-2)
	local s, e, cmd, victim = string.find( data, "%b<>%s+[%!](%S+)%s*(%S*)")

	local tCmd= {
		hide = function( user, victim )
			if not CanDo[user.iProfile] then user:SendData(Bot, "you cant use this command"); return 1; end
			if victim then
				victim = GetItemByName(victim)
				if not victim then
					user:SendData( '*** '..victim..' was not found,.. try again.' );
					return 1;
				end
				tGhosts[user.sName] = 1
				SendToAll( '$Quit '..victim.sName )
				user:SendData( '*** You have put '..victim.sName..' into Ghost Mode.' )
				victim:SendData( '*** '..user.sName..' has put you into Ghost Mode.' )
				return 1;
			end
			tGhosts[user.sName] =  1
			user:SendData( '*** You are now in Ghost Mode.' )
			SendToAll( '$Quit '..user.sName )
			return 1;
		end,
		unhide = function( user, victim )
			if not CanDo[user.iProfile] then user:SendData(Bot, "you cant use this command"); return 1; end
			if not victim then
				if tGhosts[user.sName] then
					tGhosts[user.sName] = nil
					SendToAll( user.sMyInfoString )
					if user.bOperator then SendToAll( '$OpList '..user.sName) end
					user:SendData( '*** You are now back from Ghost Mode.' )
					return 1;
				end
			end
			victim = GetItemByName(victim)
			if tGhosts[victim.sName] then
				tGhosts[victim.sName] = nil
				SendToAll( victim.sMyInfoString )
				if victim.bOperator then SendToAll( '$OpList '..victim.sName) end
				victim:SendData( '*** '..user.sName..' has gotten you back from Ghost Mode.' )
				user:SendData( '*** You have taken '..victim.sName..' back from Ghost Mode.' )
				return 1;
			end
		end,
		listhide = function( user )
			local m = '*** List of hidden users\r\n'
			for i,v in pairs(tGhosts) do
				m = m..'\t'..i..'\r\n'
			end
			user:SendData( m )
		end,
	}
	if tCmd[cmd] then
		return tCmd[cmd](user, victim)
	end
end

function UserDisconnected( user )
	if tGhosts[user.sName] then 
		tGhosts[user.sName] = nil
	end
end

OpDisconnected = UserDisconnected;

bastya_elvtars

I love scripts that rape the DC protocol.  ::)
Everything could have been anything else and it would have just as much meaning.

osse

I got this mess

lua:35: attempt to call a nil value

:(:(

6Marilyn6Manson6

Quote from: osse on 28 October, 2006, 12:07:08
I got this mess

lua:35: attempt to call a nil value

:(:(

Change:

function OnTimer()  ---- WHy!?!!?
	for i,v in tGhost do
		if GetItemByName(i) then
			SendToAll("$Quit "..i)
			GetItemByName(i):SendData("$Quit "..i)
			GetItemByName(i):SendData("$Quit "..i)
		end
	end
end


with:

function OnTimer()  ---- WHy!?!!?
	for i,v in pairs(tGhost) do
		if GetItemByName(i) then
			SendToAll("$Quit "..i)
			GetItemByName(i):SendData("$Quit "..i)
			GetItemByName(i):SendData("$Quit "..i)
		end
	end
end


and it may work

SMF spam blocked by CleanTalk