Disclamer bot
 

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

Disclamer bot

Started by OpiumVolage, 10 October, 2003, 23:39:36

Previous topic - Next topic

0 Members and 16 Guests are viewing this topic.

OpiumVolage

-- vim:ts=4:sw=4:noet:syntax=lua
-- Disclamer Bot. (OpiumVolage 26/09/2003)

tabAccept = {}
msgOui = "I AGREE"

tabCommands = { "ConnectToMe", "MultiConnectToMe", "RevConnectToMe", "Search", "MultiSearch" }

function Main()
	frmHub:EnableFullData(1)
end

function NewUserConnected(user)
	if user.iProfile > 0 then return end
	user:SendData("Disclamer", "Envoyez un message contenant "..msgOui.." dans le Chat Central pour valider toutes les fonctionnalit? du hub.")
	tabAccept[user.sName] = 1
end

function DataArrival(user, data)
	-- On teste le niveau de l'utilisateur.
	if (user.iProfile > 0) or not tabAccept[user.sName] then return end
	if strfind(data, "^%b<>%s+"..msgOui) then
		tabAccept[user.sName] = nil
		user:SendData("Disclamer", "Merci d'avoir accept?.")
		return 1 end
	local s, e, cmd = strfind(data, "^$(%S+)")
	return foreach(tabCommands, function(id, value)
		if value == %cmd then return 1 end end)
end

BlazeXxX

WoW :D

I have been looking for something like this.. Great work m8 :)

BaNdiT

Do we have an English translation of this please?

would appreciate it

 :)  :)  :)  :)  :)  :)  :)  :)  :)  :)

OpiumVolage

[-- vim:ts=4:sw=4:noet:syntax=lua
-- Disclamer Bot. (OpiumVolage 26/09/2003)

tabAccept = {}
msgOui = "I AGREE"

tabCommands = { "ConnectToMe", "MultiConnectToMe", "RevConnectToMe", "Search", "MultiSearch" }

function Main()
	frmHub:EnableFullData(1)
end

function NewUserConnected(user)
	if user.iProfile > 0 then return end
	user:SendData("Disclamer", "Send a message containing "..msgOui.." in CC to enable full hub.")
	tabAccept[user.sName] = 1
end

function DataArrival(user, data)
	-- On teste le niveau de l'utilisateur.
	if (user.iProfile > 0) or not tabAccept[user.sName] then return end
	if strfind(data, "^%b<>%s+"..msgOui) then
		tabAccept[user.sName] = nil
		user:SendData("Disclamer", "Thank you to agree.")
		return 1 end
	local s, e, cmd = strfind(data, "^$(%S+)")
	return foreach(tabCommands, function(id, value)
		if value == %cmd then return 1 end end)
end

BaNdiT

thank you OpiumVolage.

I appreciate your help.

keep up the good work

 :)  :)  :)  :)  :)  :)  :)  :)  :)  :)

acethecase

Syntax error: expected;
  last token read: `[' at line 1 in string "[-- vim:ts=4:sw=4:noet:syntax=lua..."

nErBoS

Hi,

Remove "[" in this line...

[-- vim:ts=4:sw=4:noet:syntax=lua

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

DoD_Owner

Will someone please guide me trough using this script ??

When I add this, and then connect to the hub I get disconnected right away...

//DoD_Owner
Owner of [??] Dimension of Deamons Private.

A nice private hub ... 100 GB min. share... wanna get regged, pm me.. ;)  (200+ users, 60TB+ share)

SMF spam blocked by CleanTalk