LoginMsg API 2
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

LoginMsg API 2

Started by [ vAiBhAv?], 28 June, 2009, 10:01:36

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

[ vAiBhAv?]

here's the fixed version.. included credits

[ vAiBhAv?]

I Searched For This Name.. Not Getting.. Can You Give Me The Direct Link Of The Script Page ?

[ vAiBhAv?]

Thank You Very Much DUDE !  :)

PTGenius

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?

the-master

--[[

	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
keep on sharing :)

Black-Dragon

hello , its possible pm ?

the-master

Sure, replace    Core.SendToUser(user,Msg)
with   Core.SendPmToUser(user,SetMan.GetString(21),Msg)
keep on sharing :)

Black-Dragon


SMF spam blocked by CleanTalk