PtokaX forum

Archive => Archived 5.1 boards => Request for scripts => Topic started by: Djdirect on 17 August, 2007, 10:10:34

Title: Usercount in description
Post by: Djdirect on 17 August, 2007, 10:10:34
hello all

can you make that ? please
look this picture

Merci a vous
Title: Re: Usercount in description
Post by: bastya_elvtars on 17 August, 2007, 12:05:53
Please choose an informative topic title.
Otherwise it can be done, however it's bandwidth-intensive.
Title: Re: Usercount in description
Post by: Leun on 17 August, 2007, 15:01:50
Morning,

Add this to your script, or use it stand alone

Give it a try, haven't test it:


--[[
Usercount in discription
- Max length of string is 64 chars
- In nick is not allowed $|<>:?*"/\ and space.
- In Description and Email is not allowed $ and |.
]]

---------------------------------------------------------------------------------------------------
--- BOT  Settings
---------------------------------------------------------------------------------------------------
T = {
sBot = "#[Public]", -- Own hub bot name
--sBot = frmHub:GetHubBotName(), -- Hub BOT name (from PtokaX)
sEmail = "", -- BOT email
iIsOp = 1, -- OP Key (1 = yes , 0 = no)
}


---------------------------------------------------------------------------------------------------
--- Functions
---------------------------------------------------------------------------------------------------
function Main()
local cnt = GetUserCount()
frmHub:RegBot(T.sBot,T.iIsOp,cnt,T.sEmail)
end

function NewUserConnected(curUser)
return SetUserCount()
end
OpConnected = NewUserConnected

UserDisconnected = function(curUser)
return SetUserCount()
end
OpDisconnected = UserDisconnected

SetUserCount = function()
local cnt = GetUserCount()
frmHub:SetHubBotData(T.sBot,cnt,T.sEmail)
end

GetUserCount = function()
return "["..frmHub:GetUsersCount().."] users"
end


Greetz,
Leun
Title: Re: Usercount in description
Post by: Djdirect on 17 August, 2007, 15:27:18
You are Great  ;)

merci a vous incroyable