Chatroom by Plop ( i need help )
 

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

Chatroom by Plop ( i need help )

Started by Pit, 08 November, 2004, 18:37:31

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Pit

Greetings again scripters

Plop has made this script but i want a litle modification please:

Bot = "Chat_room"

tUsers = {}

function Main()
   frmHub:RegBot(Bot)
end

function DataArrival(user, data)
   if tUsers[user.sName] == nil then
      tUsers[user.sName] = 1
   end
   if(strsub(data, 1, 4) == "$To:") then
      local s,e,whoTo = strfind(data,"$To:%s+(%S+)")
      if whoTo == Bot then
         data=strsub(data,1,strlen(data)-1)
         local s,e,txt = strfind(data, "%$(%b<>.+)")
         local usr
         if txt then
            for a,b in tUsers do
               if a ~= user.sName then
                  usr = GetItemByName(a)
                  if usr then
                     usr:SendData("$To: "..usr.sName.." From: "..Bot.." $"..txt.."|")
                  else
                     tUsers[a] = nil
                  end
               end
            end
         end
      end
   end
end

function OpConnected(user)
   if tUsers[user.sName] == nil then
      tUsers[user.sName] = 1
   end
end

NewUserConnected = OpConnected

function OpDisconnected(user)
   if tUsers[user.sName] then
      tUsers[user.sName] = nil
   end
end

UserDisconnected = OpDisconnected

-------------------------------------------------------------------

What i want if it's possible,
Is that if this chat can be made only for a specific profile.
I mean, i want a chatroom for 2 ou 3 diferent profiles,
Can you make this script with a profile checker??
And with a nick predifened in the script to be the moderator room??
I'll try to explain it better...

I want to build a chatroom for VIP's only, but with a nick predifined on the script that who can be a VIP or an OP, who can kick from the room anyone.

I've seen the third version of his script but the rooms who we create appears with the user profile behind...don't like it!

Can you help me out please..

Thanks

SMF spam blocked by CleanTalk