Standalone OPChat Needed
 

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

Standalone OPChat Needed

Started by [G-T-E]Gate?, 27 September, 2004, 09:59:40

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

[G-T-E]Gate?

Anyone ?
In need of a standalone OpChat script to solve kick/ban messge in RCv9b for the time being.

Ps , search thru lua but with out sucess. Ds.
G8

D-J Valhala

#1
try this ;)...
-- 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. 

-- Little Fix by nErBoS

-- Simple Modify by WickeD to ChatRoom for All Kye Users by DJ-Valhala ;)



ChatRoom = "-OP-Chat-" 


info_chat = "$MyINFO $ALL "..ChatRoom.."  $ $Cable"..strchar( 1 ).."$$0$|"

Levels = {

[0]=0,--Master

[1]=0,--Operator

} 


function Main()

frmHub:RegBot(ChatRoom)

end



function DataArrival(user,data)

if(strsub(data,1,4) == "$To:") then 

s,e,whoTo = strfind(data,"$To:%s+(%S+)") 

if (whoTo == ChatRoom) then 

if (Levels[user.iProfile] ~= nil) then 

s,e,whoTo,from,msg = strfind(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, OP's And Higher Level!") 


end 

end 

end 

end 





function MasterChatRoom(user,msg) 

local allprofiles = GetProfiles() 

local index, profile, index2, nick 

for index, profile in allprofiles do 

if (Levels[GetProfileIdx(profile)] ~= nil) then

local users = GetUsersByProfile(profile) 

for index2, nick in users do 

local usr = GetItemByName(nick) 

if usr ~= nil then 

if user.sName ~= usr.sName then 

usr:SendData("$To: "..usr.sName.." From: "..ChatRoom.." $<"..user.sName.."> " ..msg) 

end 

end 

end

end 

end 

end

if you have added new profiles to your Ptokax and you like the profile to use op-chat please add to the script your profile and profilename like this...
Levels = {

[0]=0,--Master

[1]=0,--Operator

[4]=0,--SuperOp

}

in my ptokax 4 = SuperOp hope i helpd ya ;)
My PsyIsrael Network
==================
--=[PsyIsrael DC Hub]=--
--=[PsyIsrael Website]=--
==================

[G-T-E]Gate?

Just back from work
Tks D-J will give it a go...
G8

D-J Valhala

My PsyIsrael Network
==================
--=[PsyIsrael DC Hub]=--
--=[PsyIsrael Website]=--
==================

[G-T-E]Gate?

:D

That solved the problem with RCv9a+b GUI kick/ban messeges to Ptx GUI Op-Chat .
Recommend it to all.

Disable and delete Op-Chat in PTx GUI and add the script -Op-Chat- below to ur script folder instead.
Now My ?OpChat? is running clean and all Kick/Bans are sent to my Master bot as it should.

Tks again D-J
G8 Give ya a BIG  :D

 Credits to Guibs=NightLitch=SaintSinner phatty and plop and NL AND D-J Valhala for posting a copy  for me.

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

-- 
Little Fix by nErBoS

-- Simple Modify by WickeD to ChatRoom for All Kye Users by DJ-Valhala ;)



ChatRoom "-OP-Chat-" 


info_chat "$MyINFO $ALL "..ChatRoom.." <The Chat> $ $Cable"..strchar).."$$0$|"

Levels = {

[
0]=0,--Master

[1]=0,--Operator




function 
Main()

frmHub:RegBot(ChatRoom)

end



function DataArrival(user,data)

if(
strsub(data,1,4) == "$To:"then 

s
,e,whoTo strfind(data,"$To:%s+(%S+)"

if (
whoTo == ChatRoomthen 

if (Levels[user.iProfile] ~= nilthen 

s
,e,whoTo,from,msg strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.+)"

MasterChatRoom(user,msg

elseif (
Levels[user.iProfile] == nilthen 

user
:SendPM(ChatRoom"That chat is for, OP's And Higher Level!"


end 

end 

end 

end 





function MasterChatRoom(user,msg

local allprofiles GetProfiles() 

local indexprofileindex2nick 

for indexprofile in allprofiles do 

if (
Levels[GetProfileIdx(profile)] ~= nilthen

local users 
GetUsersByProfile(profile

for 
index2nick in users do 

local usr GetItemByName(nick

if 
usr ~= nil then 

if user.sName ~= usr.sName then 

usr
:SendData("$To: "..usr.sName.." From: "..ChatRoom.." $<"..user.sName.."> " ..msg

end 

end 

end

end 

end 

end

D-J Valhala

My PsyIsrael Network
==================
--=[PsyIsrael DC Hub]=--
--=[PsyIsrael Website]=--
==================

SMF spam blocked by CleanTalk