:InterCom for Ops:
 

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

:InterCom for Ops:

Started by Herodes, 09 August, 2004, 15:37:54

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Herodes

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

ARCHANGEL

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.

TiMeTrAVelleR

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

ARCHANGEL

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.

lynyrd

nice work herodes =) i like the idea
it's similar to the whisper thingy that nerbos created
keep up the work
cheers

Cyberia

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

Herodes

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 .. ;)

TiMeTrAVelleR

Oki  works  fine  now    and  i like it   not to hard  to use  commands  in a good way ;)

Herodes

#8
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 :)))

Herodes

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

Psycho_Chihuahua

#10
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?
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

Herodes

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

Herodes

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

bastya_elvtars

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
Everything could have been anything else and it would have just as much meaning.

Herodes

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

AMediaMan

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

Herodes


SMF spam blocked by CleanTalk