Can I hide chatbots?
 

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

Can I hide chatbots?

Started by Josecar, 24 June, 2005, 03:59:43

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Josecar

I have 3 chatbots

Opchat (not the one of Ptokax)
Vipchat
RegChat.

Is there a way of hide opchat of regs and vips, and

vipchat and opchat of regs?

Dessamator

Ignorance is Bliss.

Josecar

QuoteOriginally posted by Dessamator
yep

Thanks. Wow, that's hopeful, and what you can call a

laconic response.  I'm glad to know it can be maked.

Sombody can do me any idea of how do it?

PPK

PtokaX automatically hide OpChat to users not allowed to write to it :]
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Dessamator

QuoteOriginally posted by Josecar222000
QuoteOriginally posted by Dessamator
yep

Thanks. Wow, that's hopeful, and what you can call a

laconic response.  I'm glad to know it can be maked.

Sombody can do me any idea of how do it?

simple questions deserve simple answers, and if u had searched for it im sure you would have found it in the forum,

either way, all u need to do is to control the myinfo sent to the person that logs in !
Ignorance is Bliss.

Josecar

QuoteOriginally posted by Dessamator
QuoteOriginally posted by Josecar222000
QuoteOriginally posted by Dessamator
yep

Thanks. Wow, that's hopeful, and what you can call a

laconic response.  I'm glad to know it can be maked.

Sombody can do me any idea of how do it?

simple questions deserve simple answers, and if u had searched for it im sure you would have found it in the forum,

either way, all u need to do is to control the myinfo sent to the person that logs in !

I had searched. And had found may be 40 or 50 trheads on the matter. Nothing that do what i'd ask.

Most of them hide or unhide bots registering and unregigstering bot, so everybody or nobody can see them. Nothing like controlling myinfo to logging users.

May be i must search again.  Thanks anyway for your valuable lead, Dessamator, but i'm afaid my
shortcomings in lua, (i'm a beginner in this) won't allow me do the job.
 I come from neomodus 1 an vb scpritps, there was easy do that not registering the bot and
using $hello. After hours of trying and search, i asked for help.
I?ll be very thankful for some more leads like yours.

Respectfully: Josecar222000

Dessamator

#6
well, here
 is an example of searching power, :), either way all u need is something like this:

ChatRoom = "-=<[ViP_-_ChaT]>=-" 
info_chat = "$MyINFO $ALL "..ChatRoom.."    $ $Cable"..strchar( 1 ).."$$0|$"

function NewUserConnected(user, data)
       if user.iProfile  == 1 then
              user:SendData(info_chat)
       end
end
Ignorance is Bliss.

Josecar

#7
QuoteOriginally posted by Dessamator
well, here
 is an example of searching power, :), either way all u need is something like this:

ChatRoom = "-=<[ViP_-_ChaT]>=-" 
info_chat = "$MyINFO $ALL "..ChatRoom.."    $ $Cable"..strchar( 1 ).."$$0|$"

function NewUserConnected(user, data)
       if user.iProfile  == 1 then
              user:SendData(info_chat)
       end
end

I'm afraid that has not worked for me. I have tryed Kepp's Guarding, it has that:

      local BotInfo = "";
      for i=1,table.getn(Settings.Chatbots) do
         if (Settings.Chatbots.Enabled == 1) then
            if  (Settings.Chatbots.Allowed[user.iProfile] == 1) then
               BotInfo = BotInfo.."$MyINFO $ALL "..Settings.Chatbots.Name.." "..Settings.Chatbots.Description.."$ $"..Settings.Chatbots.Speed..string.char(1).."$"..Settings.Chatbots.Email.."$0$|";
            end
         end
      end
      if (BotInfo ~= "") then
         user:SendData(BotInfo);
      end

Up to where I have seen until the present, the things are this way:  if you register
the bot, anyone can see it, if your unregister it, nobody can see it.
I explain my interest giving an an example:  regs cannot see opchat neither vipchat, operators can see the three bots.

I have proven code like that of your example in a simpler context, and always, despite that them
can or not to use a bot, regs and unreg can SEE THEM.
The object the this is very simple:  not to show people forbidden things, it is not good for the morals.

Maybe I have made it bad, I have omitted particulars, if it is the case, please tell it to me.

I have proven what PPK said, it works fine. Unfortunately this only solves the Opchat.
Let us hope the Ptokax includes a vipchat in the future.

Dessamator

oops there was a tiny error in the code it should be like this :

ChatRoom = "-=<[ViP_-_ChaT]>=-" 

Levels = {
[0]=1,--Master
[1]=1,--Operator
[2]=0,--Vip
[4]=0,--UnKnwon
[5]=0,--UnKnwon
[6]=0--UnKnwon

} 
info_chat = "$MyINFO $ALL "..ChatRoom.."    $ $Cable"..string.char( 1 ).."$$0$"

function NewUserConnected(user)
	if (Levels[user.iProfile] ~= nil) then
		user:SendData(info_chat)
	end
end

OpConnected = NewUserConnected


either way heres a working example :

-- Chat-Room 
-- Original VipChat v1.0 
-- By Guibs 10/11/2003 
-- Enjoy :) 
-- Simple Modify by NightLitch 
-- to Master Bot Only 
-- Simple Mod by SaintSinner thanks to phatty and plop and NL for the hints. 
-- Simple Modify by WickeD to ChatRoom for User/Reg/Vip/Moderator/Op/Admin/Master. 
-- Hide Bot only to accept Users by nErBoS
--lua 5 by Dessamator

ChatRoom = "-=<[ViP_-_ChaT]>=-" 

Levels = {
[0]=1,--Master
[1]=1,--Operator
[2]=0,--Vip
[4]=0,--UnKnwon
[5]=0,--UnKnwon
[6]=0--UnKnwon

} 
info_chat = "$MyINFO $ALL "..ChatRoom.."    $ $Cable"..string.char( 1 ).."$$0$"

function NewUserConnected(user)
	if (Levels[user.iProfile] ~= nil) then
		user:SendData(info_chat)
	end
end

OpConnected = NewUserConnected

function ToArrival(user,data)
	local s,e,whoTo = string.find(data,"$To:%s+(%S+)") 
	if whoTo == ChatRoom then 
		if Levels[user.iProfile] then 
			s,e,whoTo,from,msg = string.find(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.+)") 
			MasterChatRoom(user,msg) 
		elseif Levels[user.iProfile] == nil then 
			user:SendPM(ChatRoom, "That chat is for, User/Reg/Vip/Moderator/Op/Admin/Master. Your message has not been sent.") 
		end 
	end 
end 


function MasterChatRoom(user,msg) 
	local allprofiles = GetProfiles() 
	local index, profile, index2, nick 
	for index, profile in allprofiles do 
		local users = GetUsersByProfile(profile) 
		for index2, nick in users do 
			local usr = GetItemByName(nick) 
			if usr ~= nil then 
				if user.sName == usr.sName then 
				else 
					if Levels[user.iProfile] then 
						usr:SendData("$To: "..usr.sName.." From: "..ChatRoom.." $<"..user.sName.."> " ..msg) 

					end 
				end 
			end 
		end 
	end 
end
Ignorance is Bliss.

Josecar

Thanks Dessamator, i'm really grateful

I'll try the code as fast as possible

Dessamator

Ignorance is Bliss.

SMF spam blocked by CleanTalk