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

delay in chat

Started by bastya_elvtars, 01 June, 2004, 13:57:34

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bastya_elvtars

I need a bot that checks the delay in chat so i can avoid situations like this:

Quote[13:58:12] <[HUN]bastya_elvtars> re
[13:58:12] <[HUN]bastya_elvtars> g
[13:58:12] <[HUN]bastya_elvtars> frg
[13:58:12] <[HUN]bastya_elvtars> bg
[13:58:13] <[HUN]bastya_elvtars> hnmhj
[13:58:13] <[HUN]bastya_elvtars> mjk,
[13:58:14] <[HUN]bastya_elvtars> lk.,kl
[13:58:14] <[HUN]bastya_elvtars> ,k
[13:58:15] <[HUN]bastya_elvtars>  jk,m
[13:58:15] <[HUN]bastya_elvtars> jkmhj
[13:58:15] <[HUN]bastya_elvtars> mnhjmnh
[13:58:16] <[HUN]bastya_elvtars> mhjm
[13:58:17] <[HUN]bastya_elvtars> hnbv
[13:58:17] <[HUN]bastya_elvtars> cf
[13:58:18] <[HUN]bastya_elvtars> dafsd
[13:58:18] <[HUN]bastya_elvtars> fasf

:D
Everything could have been anything else and it would have just as much meaning.

nErBoS

Hi,

Not getting your request ??? You want a script to give you the time that the data has longed to be computed ??

Best regards, nErBoS
--## nErBoS Spot ##--

bastya_elvtars

Nope
Just wanna set that between 2 mainchat posts from same user min. 2 seconds should pass - otherwise his message is blocked...
Everything could have been anything else and it would have just as much meaning.

tezlo

#3
will this do?
list = {}
delay = 2
-- in seconds

function DataArrival(user, data)
	if strsub(data, 1, 1) == "<" and not user.bOperator then
		local time, now = list[user.sName], clock()
		if time and time+delay > now then
			user:SendData(">> wait")
			return 1
		else
			list[user.sName] = now
		end
	end
end

bastya_elvtars

Thx a lot, Tezlo, u r the second most used scripter @ me now lol

(can u make an option 2 exclude ops? just for fun lol)
Everything could have been anything else and it would have just as much meaning.

tezlo

done :) let me guess.. plop is in the lead?

plop

QuoteOriginally posted by tezlo
done :) let me guess.. plop is in the lead?
i made him see the light of ptokax. lol

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

SMF spam blocked by CleanTalk