Author Topic: Hide user.  (Read 7924 times)

0 Members and 1 Guest are viewing this topic.

Offline Jaakko

  • Fulll Member
  • ****
  • Posts: 56
  • Karma: +1/-0
Hide user.
« on: 09 May, 2005, 20:55:00 »
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.

PtokaX forum

Hide user.
« on: 09 May, 2005, 20:55:00 »

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 480
  • Karma: +209/-22
  • PtokaX developer
(No subject)
« Reply #1 on: 09 May, 2005, 21:44:27 »
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

Offline Cêñoßy†ê

  • Scripter
  • Triple Ace
  • ******
  • Posts: 190
  • Karma: +31/-3
(No subject)
« Reply #2 on: 24 May, 2005, 13:14:33 »
Code: [Select]
--//-- 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 v5.2 ;)

Offline Ubikk

  • Triple Ace
  • **
  • Posts: 154
  • Karma: +0/-0
(No subject)
« Reply #3 on: 24 May, 2005, 14:18:09 »
Is it possible to comunicate via PM with a user that's not in the userlist?

Offline jiten

  • Scripter
  • Forum Legend
  • ******
  • Posts: 1 577
  • Karma: +71/-5
(No subject)
« Reply #4 on: 24 May, 2005, 14:21:17 »
Quote
Originally 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

Offline kunal

  • Double Ace
  • *
  • Posts: 144
  • Karma: +1/-0
(No subject)
« Reply #5 on: 31 May, 2005, 11:11:18 »
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

Offline jiten

  • Scripter
  • Forum Legend
  • ******
  • Posts: 1 577
  • Karma: +71/-5
(No subject)
« Reply #6 on: 31 May, 2005, 11:22:47 »
Quote
Originally 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

Offline Dessamator

  • Scripter
  • Emperor
  • ******
  • Posts: 1 262
  • Karma: +13/-9
(No subject)
« Reply #7 on: 31 May, 2005, 11:28:47 »
Quote
Originally 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.

Offline bastya_elvtars

  • Forum God
  • ****
  • Posts: 3 744
  • Karma: +173/-7
  • The rock n' roll doctor
    • The FreshStuff3 Site
(No subject)
« Reply #8 on: 31 May, 2005, 11:38:01 »
Can users like this respond to searches?
Everything could have been anything else and it would have just as much meaning.

Offline XPMAN

  • Double Ace
  • *
  • Posts: 106
  • Karma: +1/-0
Typos
« Reply #9 on: 31 May, 2005, 20:05:55 »
Fixed a couple typos i found that wouldnt let the rightclick work  :)

Code: [Select]

--//-- 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



Offline jiten

  • Scripter
  • Forum Legend
  • ******
  • Posts: 1 577
  • Karma: +71/-5
(No subject)
« Reply #10 on: 31 May, 2005, 20:14:05 »
Quote
Originally posted by bastya_elvtars
Can users like this respond to searches?
Tested it a while ago and they do respond.
« Last Edit: 31 May, 2005, 20:50:40 by jiten »

Offline CaSaNoVa

  • Member
  • ***
  • Posts: 43
  • Karma: +1/-0
re:
« Reply #11 on: 03 June, 2005, 15:50:08 »
Hide share only??

Offline bastya_elvtars

  • Forum God
  • ****
  • Posts: 3 744
  • Karma: +173/-7
  • The rock n' roll doctor
    • The FreshStuff3 Site
(No subject)
« Reply #12 on: 03 June, 2005, 17:01:34 »
Quote
Originally posted by CaSaNoVa
Hide share only??

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

Offline Dessamator

  • Scripter
  • Emperor
  • ******
  • Posts: 1 262
  • Karma: +13/-9
(No subject)
« Reply #13 on: 21 June, 2005, 23:05:10 »
Code: [Select]
-- 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.

Offline Zeel

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: Hide user.
« Reply #14 on: 18 September, 2006, 21:24:50 »
  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...
« Last Edit: 18 September, 2006, 21:42:10 by Zeel »

Herodes

  • Guest
Re: Hide user.
« Reply #15 on: 18 September, 2006, 22:09:59 »
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 :)
Code: [Select]
--//-- 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;

Offline bastya_elvtars

  • Forum God
  • ****
  • Posts: 3 744
  • Karma: +173/-7
  • The rock n' roll doctor
    • The FreshStuff3 Site
Re: Hide user.
« Reply #16 on: 18 September, 2006, 22:14:22 »
I love scripts that rape the DC protocol.  ::)
Everything could have been anything else and it would have just as much meaning.

Offline osse

  • Member
  • ***
  • Posts: 44
  • Karma: +0/-0
Re: Hide user.
« Reply #17 on: 28 October, 2006, 12:07:08 »
I got this mess

lua:35: attempt to call a nil value

:(:(

Offline 6Marilyn6Manson6

  • Scripter
  • King
  • ******
  • Posts: 869
  • Karma: +47/-35
    • http://www.marilynmanson986.altervista.org
Re: Hide user.
« Reply #18 on: 28 October, 2006, 12:31:23 »
I got this mess

lua:35: attempt to call a nil value

:(:(

Change:

Code: [Select]
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:

Code: [Select]
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

PtokaX forum

Re: Hide user.
« Reply #18 on: 28 October, 2006, 12:31:23 »