here's the fixed version.. included credits
I Searched For This Name.. Not Getting.. Can You Give Me The Direct Link Of The Script Page ?
Thank You Very Much DUDE ! :)
Hi dudes
The script don?t work fine, Reg users and Vips don?t see the info but i change the profile and if vip our reg have Opkey can see.
Its possible change the script for all users see the info on login?
--[[
LoginMsg 1.0 LUA 5.0/5.1
By Mutor 01/24/07
Requested by Saurabh
Sends info to new connections on login
Converted To API 2 by [ vAiBhAv?]
]]
function UserConnected(user)
Core.GetUserAllData(user)
local Profile = GetProfileName(user.iProfile)
local Share = Core.GetUserValue(user,16) or 0
local bdr = "\t\t"..string.rep("=",36)..""
local Msg = "\r\n\r\n"..bdr.."\r\n"..
"\t\t? Hub Name : "..SetMan.GetString(0).."\r\n"..
"\t\t? Hub Address : "..SetMan.GetString(2)..":"..SetMan.GetString(3).."\r\n"..
"\t\t? Hub Uptime : "..Core.GetUpTime().." seconds\r\n"..
"\t\t? Registered At : "..SetMan.GetString(7).."\r\n"..
"\t\t? Date And Time : "..os.date("%d %B %Y - %X ").."\r\n"..
"\t\t? Peak Users : "..Core.GetMaxUsersPeak().."\r\n"..
"\t\t? Your Nick : "..user.sNick.."\r\n"..
"\t\t? Your Profile : "..Profile.."\r\n"..
"\t\t? Your Share : "..FormatSize(Share).."\r\n"..
"\t\t? Your IP : "..user.sIP.."\r\n"..bdr
Core.SendToUser(user,Msg)
end
OpConnected,RegConnected,NewUserConnected = UserConnected,UserConnected,UserConnected
-- Format Size By kepp and NotRambitWombat
FormatSize = function(intSize)
local tUnits = { "B", "KB", "MB", "GB", "TB" }
intSize = tonumber(intSize);
if intSize ~= 0 then
local sUnits;
for index = 1, #tUnits do
if(intSize < 1024) then
sUnits = tUnits[index]
break
else
intSize = intSize / 1024
end
end
return string.format("%0.2f %s",intSize, sUnits)
end
return string.format("%0.2f %s",0, tUnits[1])
end
function GetProfileName(nr)
local Prof = ProfMan.GetProfile(nr)
if Prof then
return Prof.sProfileName
else
return "Unregistered User"
end
end
hello , its possible pm ?
Sure, replace Core.SendToUser(user,Msg)
with Core.SendPmToUser(user,SetMan.GetString(21),Msg)
thx the master