Need a script that kicks / warns users whos connected to public hubs and wich scans user list once or twice / hour
I do not clearly get what you need. What is 'public hubs'?
Cannot be done..
this was asked Before..
How can you tell if a Registered user is in a public or private hub ... ??????
??????Hawk??????
Im only interested of getting rids of users whos connected to public hubs without being regged there, Users whos tags shows connected as regular user
Im well aknown of the stupidity of this request but a friend of mine still wants it
ok paste this to your m8 and see what he says
this is my Tag
<++ V:0.673,M:P,H:0/1/17,S:5>
How Many Public Hubs am i in ???????????
the fact is im only in 2 Private hubs all the rest are Public ( Registered in Every one of them..
So all your m8 has to do is LImit his hub to a max of 1 Hub Only for all users . that way he will be sure there NOT in a public hub...
??????Hawk??????
okie.. there you go.. very late to test and too dull for a script to support anymore than this .. ;)
If there is someone who can find interestin mixing up with this quitie then take it as if it was your own :)
--[[--- ----- ----- ----- ----- ----- ----- ----- ----- -----
--= HubCut by Herodes v1 =-
----- ----- ----- ----- ----- ----- ----- ----- ----- -----
- Takes care of the users that are bad with their hubs ( see settings. . )
- Works on a timed interval
----- ----- ----- ----- ----- ----- ----- ----- ----- -----
this is a very rough script .. semi-bored in doing it ..
if someone wants to take it up you're more than welcome.. ;)
--]]--- ----- ----- ----- ----- ----- ----- ----- ----- -----
Bot = { --------------------------------------------------------------------------- ADJUST BOT SETTINGS HERE!!
register = 1, -- 1:registers the bot in the userlist..
name = "HubCut" , -- bot's name
email = "postman@mail.me", -- bot's email
desc = "Post messages to other users here..", -- bot's desc
}
sets = { ------------------------------------------------------------------------------------- ADJUST CHECKS SETTINGS HERE !
interval = 45 , -- every how many minutes should the hub be searched
logfile = "hubcut.dat", -- this is where messages will be logged
hubs = {
guest = {
limit = 10 , -- set to nil if you want to disable
action = 1 , -- 0:nothing / 1:disconnect / 2:tempban / 3:logfile
announce = 1 , -- 1:enables / 0:disables , announcing of events to operators
address = "redirect.to-another.hub",
bantime = 5 , -- bantime if action is set to
msg = {
log = "[user] was found with more than [limit] guest hubs on [date]//[time] and was [action]", -- the text that will be logged (if logging)
user = "You were in more than [hubs] guest hubs so you are going to be [action]", -- the notification that the user will receive
ops = "[user] was found with more than [limit] guest hubs on [date]//[time] and was [action]", -- the notification the ops will receive ( if announcing )
},
},
registered = {
limit = 10 , -- set to nil if you want to disable
action = 1 , -- 0:nothing / 1:disconnect / 2:tempban / 3:logfile
announce = 1 , -- 1:enables / 0:disables , announcing of events to operators
address = "redirect.to-another.hub",
bantime = 5 , -- bantime if action is set to
msg = {
log = "[user] was found with more than [limit] reg hubs on [date]//[time] and was [action]", -- the text that will be logged (if logging)
user = "You were in more than [hubs] guest hubs so you are going to be [action]", -- the notification that the user will receive
ops = "[user] was found with more than [limit] guest hubs on [date]//[time] and was [action]", -- the notification the ops will receive ( if announcing )
},
},
operator = {
limit = 10 , -- set to nil if you want to disable
action = 1 , -- 0:nothing / 1:disconnect / 2:tempban / 3:logfile
announce = 1 , -- 1:enables / 0:disables , announcing of events to operators
address = "redirect.to-another.hub",
bantime = 5 , -- bantime if action is set to
msg = {
log = "[user] was found with more than [limit] op hubs on [date]//[time] and was [action]", -- the text that will be logged (if logging)
user = "You were in more than [hubs] guest hubs so you are going to be [action]", -- the notification that the user will receive
ops = "[user] was found with more than [limit] guest hubs on [date]//[time] and was [action]", -- the notification the ops will receive ( if announcing )
},
},
},
levels = {
["-1"] = 1, -- unregs
["0"] = 0, -- masters
["1"] = 0, -- ops
["2"] = 0, -- vips
["3"] = 0, -- regs
["4"] = 0, -- custom profile
["5"] = 0, -- custom profile
},
}
------------ end of settings
function Main()
if (Bot.register == 1) then frmHub:RegBot(Bot.name, 1, Bot.desc, Bot.email ); end
Bot = Bot.name
SetTimer(sets.interval*60000)
StartTimer()
end
function chkHubs(user)
if sets.levels[""..user.iProfile..""] == 1 then
local t = {
{ (user.iHubs or user.iNormalHubs) , sets.hubs.guest },
{ (user.iRegHubs or 0) , sets.hubs.registered },
{ (user.iOpHubs or 0), sets.hubs.ops },
}
local tActions = { [1] = Disco, [2] = TBan, [3] = LogIt, }
for i,v in t do
if v[2].limit and v[2].limit <= v[1] then
tActions[v[2].action]( user, v[2] )
return user.sName
end
end
end
return false
end
function PrepareMsg( t )
local tA = { [1] = "disconnected", [2] = "tempbanned for [bantime] minutes", [3] = "logged to [file]" }
local tS, res= {
["%[action%]"] = tA[t.action],
["%[file%]"] = sets.logfile,
["%[user%]"] = user.sName,
["%[date%]"] = os.date("%x"),
["%[time%]"] = os.date("%X"),
["%[myinfo%]"] = user.sMyInfo,
["%[bantime%]"] = t.bantime,
["%[limit%]"] = t.limit,
["%[address%]"] = t.address,
["%[conn%]"] = user.sConnection,
["%[hubs%]"] = ( (user.iHubs or user.iNormalHubs)+(user.iRegHubs or 0)+(user.iOpHubs or 0) ),
["%[ghubs%]"] = (user.iHubs or user.iNormalHubs),
["%[rhubs%]"] = (user.iRegHubs or 0),
["%[ohubs%]"] = (user.iOpHubs or 0),
}, {}
for idx, txt in t.msg do
for i,v in tS do res[idx] = string.gsub( txt, i, v ); end;
end
return res;
end
function Disco( user, t )
user:SendData( Bot, PrepareMsg( t ) )
user:Disconnect()
end
function TBan( user, t )
user:SendData( Bot , PrepareMsg( t ) )
user:TempBan ( t.bantime )
end
function LogIt( user, t )
local f = io.open( sets.logfile, "a+" )
f:write( PrepareMsg( t ).."\n" )
f:close()
end
function OnTimer()
SendToAll( Bot, "Brace your selves,... hubcut is out..")
SendToAll( Bot, "You'll hear it when I knock on your door! >:)_ _ . _ . . . @" )
local x t, cnt = os.clock(), {}, 0
for i,user in frmHub:GetOnlineUsers() do
local c = chkHubs(user)
if c then table.insert( t, c ) end
cnt = cnt + 1
end
SendToAll( Bot, cnt.." users were checked, "..table.getn(t).." were hubcut.. ( in "..(os.clock()-x).." secs)")
SendToAll( Bot, "Until next time .. keep it trimmed ;)")
end