PtokaX forum

Archive => Archived 4.0 boards => Finished Lua 4 scripts => Topic started by: Herodes on 09 August, 2004, 15:37:54

Title: :InterCom for Ops:
Post by: Herodes on 09 August, 2004, 15:37:54
Nice way for communication across the Operators in the Mainchat ...
--- Op InterCom by Herodes
--------- --------- --------- --------- --------- --------- ---------
--- Provides an easy way to communicate in the main chat for operators ...
--- Who needs OpChat when you have InterCom ... lol
--------- --------- --------- --------- --------- --------- ---------
--- Just type: " [-] " in the MainChat ...
--- Note : You DO need the ' [-] ' .. :)
--------- --------- --------- --------- --------- --------- ---------

function DataArrival(oper, msg)
if strsub(msg, 1, 1) == "<" then
if oper.bOperator then
local s, e, txt = strfind(msg, "%b<>%s+(.+)")
if strsub(txt, 1 ,3) == "[-]" then
local s, e, txt = strfind(txt, "%[-%](.*)")
SendToOps("OpsOnly", "<"..oper.sName.."> "..txt)
end
end
end
end
Title:
Post by: ARCHANGEL on 09 August, 2004, 16:15:03
And if you forget the prefix or type it wrong you could end up in deep s**t with some of your users methinks.....lol        Stick with Op Chat mate, tis safer.
Title:
Post by: TiMeTrAVelleR on 09 August, 2004, 16:27:02
16:20:51] <:T??:.T?M??r?V?ll?R> [-] test
[16:20:51] <:T??:.T?M??r?V?ll?R>  test
[16:21:19] <:T??:.T?M??r?V?ll?R> [-] test
[16:21:19] <:T??:.T?M??r?V?ll?R>  test
[16:21:26] <:T??:Cy?e??o?> hmm.
[16:21:33] <:T??:.T?M??r?V?ll?R> yup  hmmm
[16:21:57] <:T??:.T?M??r?V?ll?R> seen this on forum  if its coreckt only ops see this in main


first  line   users  see in main

Time
Title:
Post by: ARCHANGEL on 09 August, 2004, 17:17:37
You are missing the point, if an OP screws up with his prefix then it could open a nasty can of worms, Op Chat should be kept as Op chat, away from main chat, a simple mistake is all it takes.
Title:
Post by: lynyrd on 09 August, 2004, 18:06:38
nice work herodes =) i like the idea
it's similar to the whisper thingy that nerbos created
keep up the work
cheers
Title:
Post by: Cyberia on 09 August, 2004, 18:21:29
Yups, know what ARCHANGEL means.
If you messed up the prefix, message will be visible for everyone.  :D
Operator chat can contain messages that are for OP eyes only. lol  :D
Title:
Post by: Herodes on 09 August, 2004, 20:33:33
Sorry for that guys I was missing a line there ...

--- Op InterCom by Herodes
--------- --------- --------- --------- --------- --------- ---------
--- Provides an easy way to communicate in the main chat for operators ...
--- Who needs OpChat when you have InterCom ... lol
--------- --------- --------- --------- --------- --------- ---------
--- Just type: " [-] " in the MainChat ...
--- Note : You DO need the ' [-] ' .. :)
--------- --------- --------- --------- --------- --------- ---------

function DataArrival(oper, msg)
if strsub(msg, 1, 1) == "<" then
if oper.bOperator then
local s, e, txt = strfind(msg, "%b<>%s+(.+)")
if strsub(txt, 1 ,3) == "[-]" then
local s, e, txt = strfind(txt, "%[-%](.*)")
SendToOps("OpsOnly", "<"..oper.sName.."> "..txt)
[COLOR=red] return 1[/COLOR]
end
end
end
end

--- I couldnt think of a better way to signify that a message is for ops only so that it doesn't interfere with any other DataArrival in any other script ...
If someone has another way I have no problem to adjust it .. ;)
Title:
Post by: TiMeTrAVelleR on 09 August, 2004, 22:50:16
Oki  works  fine  now    and  i like it   not to hard  to use  commands  in a good way ;)
Title:
Post by: Herodes on 10 August, 2004, 07:59:23
uhmmm what do u call this ? update ? or morning coffee ?

--- Op InterCom v2
--- by Herodes
--------- --------- --------- --------- --------- --------- ---------
--- Provides an easy way to communicate in the main chat for operators ...
--- Who needs OpChat when you have InterCom ... lol
--- Just type: " [-] " in the MainChat ...
--- Note : You DO need the ' [-] ' .. :)
--------- --------- --------- --------- --------- --------- ---------
--- 10 / 8 - 2004
--- added ' [+] ' for going into permanent OpsOnly mode..
--- added ' [=] ' for going out of OpsOnly mode...
--------- --------- --------- --------- --------- --------- ---------

tCommunicators = {}

function DataArrival(oper, msg)
if strsub(msg, 1, 1) == "<" then
if ( oper.bOperator ) then
local s, e, txt = strfind(msg, "%b<>%s+(.+)")
if ( strsub(txt, 1 ,3) == "[-]" ) then
local s, e, txt = strfind(txt, "%[-%](.*)")
SendToOps("OpsOnly", "<"..oper.sName.."> "..txt)
return 1
elseif ( strsub(txt, 1 ,3) == "[+]" ) then
if (tCommunicators[oper.sName] == 1) then
oper:SendData("OpsOnly", "You are in OpsOnly mode already...")
elseif (tCommunicators[oper.sName] == nil) then
tCommunicators[oper.sName] = 1
oper:SendData("OpsOnly", "You are in opsonly mode now ... to go into normal type ' [=] ' ")
SendToOps("-OpsOnly-","*** "..oper.sName.." went into opsonly mode...")
end
return 1
elseif ( strsub(txt, 1, 3) == "[=]" ) then
if (tCommunicators[oper.sName] == nil) then
oper:SendData("OpsOnly", "You were not in OpsOnly mode ...")
elseif (tCommunicators[oper.sName] == 1) then
tCommunicators[oper.sName] = nil
oper:SendData("OpsOnly", "You are in normal mainchat mode now ... be carefull!!!")
SendToOps("-OpsOnly-","*** "..oper.sName.." is in normal chat mode now")
end
return 1
else
for name , v in tCommunicators do
if (name == oper.sName) then
SendToOps("OpsOnly", "<"..oper.sName.."> "..txt)
return 1
end
end
end
end
end
end

Now it should satisfy most tastes :)))
Title:
Post by: Herodes on 10 August, 2004, 10:49:53
more more more coffee ... :)
--- Op InterCom v 2.1
--- by Herodes
--------- --------- --------- --------- --------- --------- ---------
--- Provides an easy way to communicate in the main chat for operators ...
--- Who needs OpChat when you have InterCom ... lol
--- Just type: " [-] " in the MainChat ...
--- Note : You DO need the ' [-] ' .. :)
--------- --------- --------- --------- --------- --------- ---------
--- 10 / 8 - 2004
--- added ' [+] ' for going into permanent OpsOnly mode..
--- added ' [=] ' for going out of OpsOnly mode...
--- added ' [?] ' for listing the Ops in OpsOnly mode...
--------- --------- --------- --------- --------- --------- ---------

tCommunicators = {}

function DataArrival(oper, msg)
if strsub(msg, 1, 1) == "<" then
if ( oper.bOperator ) then
local s, e, txt = strfind(msg, "%b<>%s+(.+)")
if ( strsub(txt, 1 ,3) == "[-]" ) then
local s, e, txt = strfind(txt, "%[-%](.*)")
SendToOps("OpsOnly", "<"..oper.sName.."> "..txt)
return 1
elseif ( strsub(txt, 1 ,3) == "[+]" ) then
if (tCommunicators[oper.sName] == 1) then
oper:SendData("OpsOnly", "You are in OpsOnly mode already...")
elseif (tCommunicators[oper.sName] == nil) then
tCommunicators[oper.sName] = 1
oper:SendData("OpsOnly", "You are in opsonly mode now ... to go into normal type ' [=] ' ")
SendToOps("-OpsOnly-","*** "..oper.sName.." went into opsonly mode...")
end
return 1
elseif ( strsub(txt, 1, 3) == "[=]" ) then
if (tCommunicators[oper.sName] == nil) then
oper:SendData("OpsOnly", "You were not in OpsOnly mode ...")
elseif (tCommunicators[oper.sName] == 1) then
tCommunicators[oper.sName] = nil
oper:SendData("OpsOnly", "You are in normal mainchat mode now ... be carefull!!!")
SendToOps("-OpsOnly-","*** "..oper.sName.." is in normal chat mode now")
end
return 1
elseif ( strsub(txt, 1,3) == "[?]" ) then
local msg = ""
for nick, t in tCommunicators do msg = msg.."\r\n\t     - "..nick end
if msg == "" then msg = " None are in OpsOnly mode..." end
oper:SendData("OpsOnly", " Operators in OpsOnly Mainchat mode :"..msg)
return 1
else
for name , v in tCommunicators do
if (name == oper.sName) then
SendToOps("OpsOnly", "<"..oper.sName.."> "..txt)
return 1
end
end
end
end
end
end

Now it shows who are chatting OpsOnly ...
it is getting nicer and nicer :)
Title:
Post by: Psycho_Chihuahua on 13 September, 2004, 18:05:06
cool script herodes


i wonder whats next.... putting users in OPs only ? *g*

well there aint much more you can do here or is there?
Title:
Post by: Herodes on 14 September, 2004, 00:25:46
I couldnt think of anything else to put there ... as for the users to go into such mode it is possible ... ;)
However if you think of anything else I would gladly give it a try ..
Title:
Post by: Herodes on 02 March, 2005, 16:56:41
smth for the new version of our beloved PtokaX ..
--- OpInterCom v 2.5
--- by Herodes
--------- --------- --------- --------- --------- --------- ---------
--- Provides an easy way to communicate in the main chat for operators ...
--- Who needs OpChat when you have InterCom ... lol
--- Just type: " [-] " in the MainChat ...
--- Note : You DO need the ' [-] ' .. :)
--------- --------- --------- --------- --------- --------- ---------
--- 10 / 8 - 2004
--- added ' [+] ' for going into permanent OpsOnly mode..
--- added ' [=] ' for going out of OpsOnly mode...
--- added ' [?] ' for listing the Ops in OpsOnly mode...
--------- --------- --------- --------- --------- --------- ---------
--- 2 / 3 - 2005
--- converted to Lua 5 for the latest PtokaX
--------- --------- --------- --------- --------- --------- ---------

tCommunicators = {}

function ChatArrival(oper, msg)
if ( oper.bOperator ) then
local s, e, txt = string.find(msg, "%b<>%s+(.+)")
if ( string.sub(txt, 1 ,3) == "[-]" ) then
local s, e, txt = string.find(txt, "%[-%](.*)")
SendToOps("OpsOnly", "["..oper.sName.."] "..txt)
return 1
elseif ( string.sub(txt, 1 ,3) == "[+]" ) then
if (tCommunicators[oper.sName] == 1) then
oper:SendData("OpsOnly", "You are in OpsOnly mode already...")
elseif (tCommunicators[oper.sName] == nil) then
tCommunicators[oper.sName] = 1
oper:SendData("OpsOnly", "You are in OpsOnly mode now ... to go into normal type ' [=] ' ")
SendToOps("OpsOnly", "*** "..oper.sName.." went into OpsOnly mode...")
end
return 1
elseif ( string.sub(txt, 1, 3) == "[=]" ) then
if (tCommunicators[oper.sName] == nil) then
oper:SendData("OpsOnly", "You were not in OpsOnly mode ...")
elseif (tCommunicators[oper.sName] == 1) then
tCommunicators[oper.sName] = nil
oper:SendData("OpsOnly", "You are in normal mainchat mode now ... be carefull!!!")
SendToOps("OpsOnly", "*** "..oper.sName.." is in normal chat mode now")
end
return 1
elseif ( string.sub(txt, 1,3) == "[?]" ) then
local msg = ""
for nick, t in tCommunicators do msg = msg.."\n\t     - "..nick end
if msg == "" then msg = " None are in OpsOnly mode..." else msg = "\n\t Operators in OpsOnly Mainchat mode :"..msg end
oper:SendData("OpsOnly", msg )
return 1
else
for name , v in tCommunicators do
if (name == oper.sName) then
SendToOps("OpsOnly", "["..oper.sName.."] "..txt)
return 1
end
end
end
end
end
Title:
Post by: bastya_elvtars on 02 March, 2005, 20:08:11
Quote--- Who needs OpChat when you have InterCom ... lol

LMFAO.

http://www.plop.nl/ptokaxbots/bastya_elvtars/tuocb.lua

 :D  :D  :D  :D  :D  :D  :D  :D  :D  :D  :D  :D  :D  :D  :D  :D
Title:
Post by: Herodes on 03 March, 2005, 09:05:42
heheheh,... its true, imo this way to "gossip-the-crap-out-of-ppl" is much better .. produces more fun when you talk in front of them and they cant hear you ..  :D  :D  :D
Title: right click
Post by: AMediaMan on 13 March, 2005, 17:43:31
Hey Herodes any chance on making a right click add on for this ? It really seems like a cool script im gonna try it out here in a bit lol, but i think a right click would make it even better :)


AMediaMan
Title:
Post by: Herodes on 15 March, 2005, 11:42:46
Update (http://board.univ-angers.fr/thread.php?threadid=3956&boardid=26&page=1#1) is available ...