-- 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
WoW :D
I have been looking for something like this.. Great work m8 :)
Do we have an English translation of this please?
would appreciate it
:) :) :) :) :) :) :) :) :) :)
[-- 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
thank you OpiumVolage.
I appreciate your help.
keep up the good work
:) :) :) :) :) :) :) :) :) :)
Syntax error: expected;
last token read: `[' at line 1 in string "[-- vim:ts=4:sw=4:noet:syntax=lua..."
Hi,
Remove "[" in this line...
[-- vim:ts=4:sw=4:noet:syntax=lua
Best regards, nErBoS
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