Hey guys.. :)
I would like a script that blockes unregistered VIPs from entering the hub... ( fake [-VIP-] tags...) This script was done in LUA 4 but I haven't found a version for LUA 5 yet...
This is the old script.. :
Quote--##Simple Non-VIP Blocking 1.1
--##Made by blackwings
--##If a non-VIP has these in the username = VIP,Vip or vip, the user will get disconnected
bot="robotzel"
function DataArrival(User , data)
if strsub(data, 1, 7) == "$MyINFO" and User.iProfile ~= 2 then
if strfind(data, "VIP") then
User:SendData(bot," Remove VIP from your nick!")
User:Disconnect()
elseif strfind(data, "vip") then
User:SendData(bot," Remove VIP from your nick!")
User:Disconnect()
elseif strfind(data, "Vip") then
User:SendData(bot," Remove VIP from your nick!")
User:Disconnect()
end
end
end
[/size]
Thanks a lot :)
Give this a try:
--###############################################--
-- Simple VIP Check -- By NightLitch 2004-12-23 --
-- Updated:
-- - Checks for users that should not have [VIP] or [REG]
-- in the Nickname.
-- Advanced Tags: [__V--i--P__}, {_V_]i[_P_}
-----
-- Converted to LUA 5 by blackwings
--###############################################--
BotName = "[HubSecurity]"
--###############################################--
function MyINFOArrival(sUser,sData)
local _,_,sTag = string.find(string.lower(sData), "[%[%{%(](%S+)[%]%}%)]")
if sTag then
if string.find(string.lower(sTag), "%p*v%p*i%p*p%p*") and sUser.iProfile ~= 2 then
sUser:SendData(BotName, "You are not registered here, Remove VIP Tag from your nickname! Accounts are deleted after 6 weeks of inactivity, if yours was feel free to re-enter and re-register. Tag: "..sTag)
sUser:Disconnect()
end
end
end
--###############################################--
--// NightLitch
Best regards
Thanks for the fast reply and sorry for not posting in the LUA 5 section :D
use this if you also want to check for fake REG users = function MyINFOArrival(sUser,sData)
local _,_,sTag = string.find(string.lower(sData), "[%[%{%(](%S+)[%]%}%)]")
if sTag then
if string.find(string.lower(sTag), "%p*v%p*i%p*p%p*") and sUser.iProfile ~= 2 then
sUser:SendData(BotName, "Remove VIP Tag from your nickname! - Example of a REG tag = [VIP]")
sUser:Disconnect()
elseif string.find(string.lower(sTag), "%p*r%p*e%p*g%p*") and sUser.iProfile ~= 3 then
sUser:SendData(BotName, "Remove REG Tag from your nickname! - Example of a REG tag = [REG]")
sUser:Disconnect()
end
end
end
Thanks you blackwings ... I'm glad to see how helpful are the users of this forum :)