MultiProfile Chat
 

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

MultiProfile Chat

Started by chaggydawg, 28 April, 2004, 18:28:24

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

chaggydawg

I wrote this for my hub, maybe someone else can use it too...  Enjoy...  ;)

Oh, if you add any new ops or whatever, you must restart the script to rebuild profile tables... maybe I'll add a command for it, but prolly not....

--// MultiProfile Chat Room
--// By Chaggydawg
--// This is a multiprofile Secondary Chat Bot, You could in theory rename script and bot and run mutliple seperate chats too
--// Uncomment and Rename People# Profiles appropriately ("within quotes")
--// Prolly a bunch of these around, But I wrote it, so I'm sharing it, plus its nice and simple ;)
--// Version... oh I don't know... v17.1854a   yah that looks good....

BotName = "AdminChat"


--// Uncomment who will use this chat, also possible to change profile names, but don't try to add People6, etc.
People1 = GetUsersByProfile("Master")
People2 = GetUsersByProfile("Administrator")
--//People3 = GetUsersByProfile("Operator")
--//People4 = GetUsersByProfile("VIP")
--//People5 = GetUsersByProfile("Reg")

function Main()
frmHub:RegBot(BotName)
end

function DataArrival(curUser,Data)
s,e,mess = strfind(Data,"%b<>%s+(.*)")
if strsub(Data,1,3) == "$To" and strsub(Data,6,strlen(BotName)+5) == BotName then
DoChatter(curUser,mess)
end
end

function DoChatter(curUser,mess)
if (People1) then
for i,v in People1 do
if strlower(v) ~= strlower(curUser.sName) then
   SendToNick(v, "$To: "..v.." From: "..BotName.." $<"..curUser.sName.."> "..mess)
end
end
end
if (People2) then
for i,v in People2 do
if strlower(v) ~= strlower(curUser.sName) then
   SendToNick(v, "$To: "..v.." From: "..BotName.." $<"..curUser.sName.."> "..mess)
end
end
end
if (People3) then
for i,v in People3 do
if strlower(v) ~= strlower(curUser.sName) then
   SendToNick(v, "$To: "..v.." From: "..BotName.." $<"..curUser.sName.."> "..mess)
end
end
end
if (People4) then
for i,v in People4 do
if strlower(v) ~= strlower(curUser.sName) then
   SendToNick(v, "$To: "..v.." From: "..BotName.." $<"..curUser.sName.."> "..mess)
end
end
end
if (People5) then
for i,v in People5 do
if strlower(v) ~= strlower(curUser.sName) then
   SendToNick(v, "$To: "..v.." From: "..BotName.." $<"..curUser.sName.."> "..mess)
end
end
end
end

SMF spam blocked by CleanTalk