Converted to lua 5...
damm... I just realized..
i got this script in lua 4, lua 5 for px and lua 5 for dch++
--//TagChecker Made By Madman
--//Stripped From -Dark-Mind- Made By ?
--//And Ofcourse Modded By Madman =)
--//Modded To OpOnly
--//Small changes by Optimus
--//Some Stuff Added By Madman
--//+1 If User Is Op In This Hub
--//Redir Options Requested By Daywalker
--//MOTD Will Be Shown When Redirecting
--//Nothing We Can Do About It
--//Thanks For The Help LUA Hub Tho...
--//To See If Anything Could Be Done
---------------------------------------
--//Rewritten to lua5
--//Thanks to PPK's wonderful work, i could remove lots of lines
--//If no tag, even if Px is accepting users without tag they will be droped...
--==Important!==--
--If using the redirect option
--Make sure that you have redirect address written in the field under the Network tab
Bot = "OpOnly"
NrOpHub = 2 --//Minimum number of ophubs
SendInfo = 1 --//Send info on connect
DisRedir = 1 --//Disconnect = 1, Redirect = 0
function MyINFOArrival(curUser, data)
if curUser.bHasTag then
if curUser.iOpHubs < NrOpHub then
if DisRedir == 0 then
curUser:Redirect(frmHub:GetRedirectAddress(), "You are not op in " ..NrOpHub.. " hubs.")
elseif DisRedir == 1 then
curUser:SendData(Bot, "You are not op in " ..NrOpHub.. " hubs. You are being disconnected.")
curUser:Disconnect()
end
end
else
if DisRedir == 0 then
curUser:Redirect(frmHub:GetRedirectAddress(), "Cant read your tag, go away!")
elseif DisRedir == 1 then
curUser:SendData(Bot, "Cant read your tag, go away!")
curUser:Disconnect()
end
end
end
--//The info on connect ;p
function NewUserConnected(curUser)
if SendInfo == 1 then
if curUser.bOperator then
--//Added +1 to this line beacuse it dosent count your hub
curUser:SendData(Bot, "Hi, Op " ..curUser.sName.. " you are Op in " ..(curUser.iOpHubs+1).." hubs. The minimum number of ophubs allowed is " ..NrOpHub)
elseif not curUser.bOperator then
curUser:SendData(Bot, "Hi, " ..curUser.sName.. " you are Op in " ..(curUser.iOpHubs).. " hubs. The minimum number of ophubs allowed is " ..NrOpHub)
end
end
end
OpConnected = NewUserConnected
--//TagChecker Made By Madman
--//Stripped From -Dark-Mind- Made By ?
--//And Ofcourse Modded By Madman =)
--//Modded To OpOnly
--//Small changes by Optimus
--//Some Stuff Added By Madman
--//+1 If User Is Op In This Hub
--//Redir Options Requested By Daywalker
--//MOTD Will Be Shown When Redirecting
--//Nothing We Can Do About It
--//Thanks For The Help LUA Hub Tho...
--//To See If Anything Could Be Done
---------------------------------------
--//Rewritten to lua5
--//Thanks to PPK's wonderful work, i could remove lots of lines
--//If no tag, even if Px is accepting users without tag they will be droped...
--//MOTD wont be shown anymore when redirecting
--//Removed option to drop users with no tag
--//If user is regged then dont check
--//if useing DCGUI user will be disconnected, beacuse, they use old style tag, and there for cant be checked
--==Important!==--
--If using the redirect option
--Make sure that you have redirect address written in the field under the Network tab
Bot = "OpOnly"
NrOpHub = 2 --//Minimum number of ophubs
SendInfo = 1 --//Send info on connect
DisRedir = 1 --//Disconnect = 1, Redirect = 0
function MyINFOArrival(curUser, data)
if curUser.bHasTag then
if curUser.sClient == "Valknut" then
curUser:SendData(Bot, "Your client cant be checked for op hubs, there for you will be disconneted")
curUser:Disconnect()
end
if curUser.iOpHubs < NrOpHub then
if curUser.bRegistered then
else
if DisRedir == 0 then
curUser:Redirect(frmHub:GetRedirectAddress(), "You are not op in " ..NrOpHub.. " hubs.")
elseif DisRedir == 1 then
curUser:SendData(Bot, "You are not op in " ..NrOpHub.. " hubs. You are being disconnected.")
curUser:Disconnect()
end
end
end
end
end
--//The info on connect ;p
function NewUserConnected(curUser)
if SendInfo == 1 then
if curUser.bOperator then
--//Added +1 to this line beacuse it dosent count your hub
curUser:SendData(Bot, "Hi, Op " ..curUser.sName.. " you are Op in " ..(curUser.iOpHubs+1).." hubs. The minimum number of ophubs allowed is " ..NrOpHub)
elseif not curUser.bOperator then
curUser:SendData(Bot, "Hi, " ..curUser.sName.. " you are Op in " ..(curUser.iOpHubs).. " hubs. The minimum number of ophubs allowed is " ..NrOpHub)
end
end
end
OpConnected = NewUserConnected
a little update...
--//MOTD wont be shown anymore when redirecting
--//Removed option to drop users with no tag
--//If user is regged then dont check
--//if useing DCGUI user will be disconnected, beacuse, they use old style tag, and there for cant be checked
--//TagChecker Made By Madman
--//Stripped From -Dark-Mind- Made By ?
--//And Ofcourse Modded By Madman =)
--//Modded To OpOnly
--//Small changes by Optimus
--//Some Stuff Added By Madman
--//+1 If User Is Op In This Hub
--//Redir Options Requested By Daywalker
--//MOTD Will Be Shown When Redirecting
--//Nothing We Can Do About It
--//Thanks For The Help LUA Hub Tho...
--//To See If Anything Could Be Done
---------------------------------------
--//Rewritten to lua5
--//Thanks to PPK's wonderful work, i could remove lots of lines
--//If no tag, even if Px is accepting users without tag they will be droped...
--//MOTD wont be shown anymore when redirecting
--//Removed option to drop users with no tag
--//If user is regged then dont check
--//if useing DCGUI user will be disconnected, beacuse, they use old style tag, and there for cant be checked
-- Added: OnError function
-- Fixed: if using old style tag they got in, fixed now, (Thanks to the stupid faker who made me notice it =))
-- Removed: Anti DcGui, shouldnt be able to enter anyway beacuse of the iOopHubs nil check....
--==Important!==--
--If using the redirect option
--Make sure that you have redirect address written in the field under the Network tab
Bot = "OpOnly"
NrOpHub = 2 --//Minimum number of ophubs
SendInfo = 1 --//Send info on connect
DisRedir = 1 --//Disconnect = 1, Redirect = 0
function MyINFOArrival(curUser, data)
if curUser.bHasTag then
if curUser.iOpHubs == nil or curUser.iOpHubs < NrOpHub then
if curUser.bRegistered then
else
if DisRedir == 0 then
curUser:Redirect(frmHub:GetRedirectAddress(), "You are not op in " ..NrOpHub.. " hubs.")
elseif DisRedir == 1 then
curUser:SendData(Bot, "You are not op in " ..NrOpHub.. " hubs. You are being disconnected.")
curUser:Disconnect()
end
end
end
end
end
--//The info on connect ;p
function NewUserConnected(curUser)
if SendInfo == 1 then
if curUser.bOperator then
--//Added +1 to this line beacuse it dosent count your hub
curUser:SendData(Bot, "Hi, Op " ..curUser.sName.. " you are Op in " ..(curUser.iOpHubs+1).." hubs. The minimum number of ophubs allowed for unregs is " ..NrOpHub)
elseif not curUser.bOperator then
curUser:SendData(Bot, "Hi, " ..curUser.sName.. " you are Op in " ..(curUser.iOpHubs).. " hubs. The minimum number of ophubs allowed for unregs is " ..NrOpHub)
end
end
end
function OnError(ErrorMsg)
SendToOps(Bot, "Error!\t" ..ErrorMsg)
end
OpConnected = NewUserConnected
Another Update...
-- Added: OnError function
-- Fixed: if using old style tag they got in, fixed now, (Thanks to the stupid faker who made me notice it =))
-- Removed: Anti DcGui, shouldnt be able to enter anyway beacuse of the iOopHubs nil check....