PtokaX forum

Archive => Archived 5.0 boards => Finished Scripts => Topic started by: [NL]Daddy-Bear? on 16 September, 2006, 23:03:26

Title: Double loginredictor v1.0
Post by: [NL]Daddy-Bear? on 16 September, 2006, 23:03:26
So I hope a nice script
A script for getting users out the hub which logs in twice.

And:  !!
Tthe User will be redict to a hub what is in advance given up
So he stays in the network.  ;)

Have Fun.
[NL]Daddy-Bear?

--------------------------------------------------------------------------------

-- **************************************************************************************
-- Double loginredictor v1.0 by NL]Daddy-Bear? on 16 Sept. 2006
-- with thanks to a friend for his help.
-- LUA 5.0/5.1 version

-- Users with same ip get redict to a hub what is in advance given up
-- **************************************************************************************

-- Which profile YOU want give a redict  1=yes 0=no 
 
RedProfiles = {  
[0] = 0, -- Master 
[1] = 0, -- Operator 
[2] = 0, -- VIP 
[3] = 0, -- Registered 
[4] = 0, -- Moderator 
[5] = 0, -- Netfounder
[6] = 0, -- Owner 
[-1] = 1, -- Unregistered 
}

Bot = "Ip_redictor" 
 
function Main() 
frmHub:RegBot(Bot) 
end

-- ************************************************************************************** 
 
--       >>>>>>>>>> The Data. <<<<<<<<<<< 
 
-- **************************************************************************************
   
-- the redict hub bla bla hub no-ip.org:58475 below chance it in the correct address of the hub to redict to.
-- (same as in Ptotax when hub is full recommended)

sredicthub = ("hub bla bla hub no-ip.org:58475")


sNaam = ("\r\n\r\n                                          ********        Double Login is not allowed!!!        ********\r\n\r\n                                                     You are Redict to a other nice hub.\r\n\r\n                                  take a look in ower Network type in main !network there is more!!\r\n\r\n")

redictstart = 0 -- Yust a counter do not change it!
aanOp = 1    -- send message to Ops  1=yes 0=no


-- **************************************************************************************

-- change nothing here under

-- **************************************************************************************

NewUserConnected = function(user,sdata)
online = frmHub:GetUsersCount()
for _,Nick in pairs(frmHub:GetOnlineUsers()) do
if RedProfiles[user.iProfile] == 1 then
redictstart = redictstart + 1   
local txt = ""..user.sName.." at this moment redicted he had logged in with double Ip. Users at this moment online "..online.."  of maximum "..frmHub:GetMaxUsers().." since lua have been starting on redict  "..redictstart..""
if aanOp == 1 then 
SendPmToOps(frmHub:GetHubBotName(),txt)       
end
user:Redirect(sredicthub,sNaam); break     
end     
end   
end

Title: Re: Double loginredictor v1.0
Post by: Herodes on 17 September, 2006, 18:54:20
nice try
I sorry to be a party-breaker but there are more than one scripts that do this thing,..
search around,.. I think this is the most complete( #1 (http://forum.ptokax.org/index.php?topic=4127#msg43397), #2 (http://forum.ptokax.org/index.php?topic=6170.0)).