PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: yoonohoo on 16 June, 2005, 13:51:39

Title: Basic user info
Post by: yoonohoo on 16 June, 2005, 13:51:39
Can some1 make this into a script?
Must send info (main) on connection.
ConnectInfo = function(user)
local sTag = user.bHasTag
if sTag then
local hName = frmHub:GetHubName()
local sPace = string.char(32)..string.char(32)..string.char(32)..string.char(32)
local info = "\r\n\r\n\t-=-=-=-=-=-=-= Welcome to "..hName.." =-=-=-=-=-=-=-\r\n\r\n"
info = info.."\t"..sPace.."O teu nick: "..(user.sName  or "n/a").."\r\n"
info = info.."\t"..sPace.."O teu IP: "..(user.sIP or "n/a").."\r\n"
info = info.."\t"..sPace.."O teu perfil: "..tProfileName(user.iProfile).."\r\n"
info = info.."\t"..sPace.."Est?s ligado em modo: "..(tMode[user.sMode] or "n/a").."\r\n"
info = info.."\t"..sPace.."Est?s ligado a "..(user.iHubs or "n/a").." hubs com "..(user.iSlots or "n/a").." slots abertas".."\r\n"
info = info.."\t"..sPace.."Est?s a partilhar: "..ConvShare(user.iShareSize).."\r\n\r\n"
info = info.."\t-=-=-=-=-=-=-= Welcome to "..hName.." =-=-=-=-=-=-=-\r\n"
user:SendData(tSettings.sBot, info)
end
end


Thanks
Title:
Post by: Dessamator on 16 June, 2005, 14:00:25
change this ConnectInfo = function(user)

to this :

NewUserConnected = function(user)
Title:
Post by: yoonohoo on 16 June, 2005, 14:18:44
Too good to be true!
It doesn't do anything...
Title:
Post by: jiten on 16 June, 2005, 14:49:56
Maybe this:
NewUserConnected = function(user)
if user.bHasTag then
if user.sMode == "A" then tmp = "Activo" else tmp = "Passivo" end
local Share = string.format("%0.2f",tonumber(user.iShareSize)/(1024*1024*1024)).." GB"
local sPace = string.char(32)..string.char(32)..string.char(32)..string.char(32)
local info = "\r\n\r\n\t-=-=-=-=-=-=-= Welcome to "..frmHub:GetHubName().." =-=-=-=-=-=-=-\r\n\r\n"
info = info.."\t"..sPace.."O teu nick: "..(user.sName  or "n/a").."\r\n"
info = info.."\t"..sPace.."O teu IP: "..(user.sIP or "n/a").."\r\n"
info = info.."\t"..sPace.."O teu perfil: "..(GetProfileName(user.iProfile) or "Not Registered").."\r\n"
info = info.."\t"..sPace.."Est?s ligado em modo: "..(tmp or "n/a").."\r\n"
info = info.."\t"..sPace.."Est?s ligado a "..(user.iHubs or "n/a").." hubs com "..(user.iSlots or "n/a").." slots abertas".."\r\n"
info = info.."\t"..sPace.."Est?s a partilhar: "..(Share or "n/a").."\r\n\r\n"
info = info.."\t-=-=-=-=-=-=-= Welcome to "..frmHub:GetHubName().." =-=-=-=-=-=-=-\r\n"
user:SendData(frmHub:GetHubBotName(), info)
end
end

OpConnected = NewUserConnected
Title:
Post by: yoonohoo on 16 June, 2005, 15:27:40
eheheh :D
Jiten came to the rescue and done it! u da man...
Thanks jiten and Dessamator for the reply
Title:
Post by: Dessamator on 16 June, 2005, 16:07:15
ur welcome !