PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: nEgativE on 14 March, 2004, 03:53:54

Title: Hum.. Login with a Share MSG
Post by: nEgativE on 14 March, 2004, 03:53:54
Hi there, is it possible to do a login message that contains the user actual share ? something like this:

[123GB] user has just entered the Hub.

in this case, just 100 GB (up) users will activate the message, and for 200 Gb also.

TkS in Advance.

Title:
Post by: nErBoS on 14 March, 2004, 04:58:45
Hi,

Hope it helps..

--Requested by Luso
--Made by nErBoS

Bot = "W-BShare"

bigusers = "100" --The min share of big users in GB

function Main()
frmHub:RegBot(Bot)
end

function NewUserConnected(user, data)
local s,e,share = strfind(user.sMyInfoString, "%$%s*(%d+)%$")
share = format("%0.2f", tonumber(share)/(1024*1024*1024))
if (share >= bigusers) then
SendToOps(Bot, "The user "..user.sName.." has joined in the Hub with "..share.." GB.")  --Only Send to ops
end
end

Best regards, nErBoS
Title:
Post by: nEgativE on 14 March, 2004, 06:23:45
QuoteOriginally posted by nErBoS
Hi,

Hope it helps..

--Requested by Luso
--Made by nErBoS

Bot = "W-BShare"

bigusers = "100" --The min share of big users in GB

function Main()
frmHub:RegBot(Bot)
end

function NewUserConnected(user, data)
local s,e,share = strfind(user.sMyInfoString, "%$%s*(%d+)%$")
share = format("%0.2f", tonumber(share)/(1024*1024*1024))
if (share >= bigusers) then
SendToOps(Bot, "The user "..user.sName.." has joined in the Hub with "..share.." GB.")  --Only Send to ops
end
end

Best regards, nErBoS

Yes, that's what i want :)

But i got this --> The user [PT]Nick has joined in the Hub with 39.60 GB.

Hehe.. could it be 100 GB min. and also a way to have another min. of 200 and 1 TB. TkS nErBoS !!

PS: are the operators also check 100 GB ? :)
Title:
Post by: [NL]Pur on 14 March, 2004, 11:24:55
you can easily use the ptokax settings to change the min share too 100gb.
Title:
Post by: nEgativE on 14 March, 2004, 18:23:23
QuoteOriginally posted by [NL]Pur
you can easily use the ptokax settings to change the min share too 100gb.

???
Title:
Post by: nErBoS on 14 March, 2004, 19:00:06
Hi,

Sorry Luso my bad, made also to OPs..

--Requested by Luso
--Made by nErBoS

Bot = "W-BShare"

bigusers = "100" --The min share of big users in GB

function Main()
frmHub:RegBot(Bot)
end

function NewUserConnected(user, data)
local s,e,share = strfind(user.sMyInfoString, "%$%s*(%d+)%$")
share = format("%0.2f", tonumber(share)/(1024*1024*1024))
if (tonumber(share) >= tonumber(bigusers)) then
SendToOps(Bot, "The user "..user.sName.." has joined in the Hub with "..share.." GB.")  --Only Send to ops
end
end

OpConnected = NewUserConnected

Best regards, nErBoS