PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: kEwL on 15 July, 2005, 11:19:10

Title: toppers
Post by: kEwL on 15 July, 2005, 11:19:10
can anyone make me a script which shows the top used direct connect softwares
eg
+topdcs
there are 10 users using dc++
          there are 10 users using odc
          blah blah blah :]
Title:
Post by: kEwL on 16 July, 2005, 08:35:18
can anyone make me this script :(
Title:
Post by: Dessamator on 16 July, 2005, 09:09:02
hmm, indeed it shouldnt be hard , but its not 100% effective most users use dcs which emulate  dc++, so ull probably end up with a lot of dc++ users !
Title:
Post by: Dessamator on 16 July, 2005, 09:37:47
--Client Stats By Dessamator
tClients = {}
BotName = "Client_Stats"

function ChatArrival(user,data)
local s,e,cmd = string.find(data,"%b<>%s+(%S+)|")
local temp = " Top Dcs On The hub\r\n\t"..string.rep("><",20).."\r\n\t"
if cmd == "!topdc" then
for i,usr in frmHub:GetOnlineUsers() do
if not tClients[usr.sClient] then
tClients[usr.sClient] = {}
tClients[usr.sClient]["count"] = 1
elseif tClients[usr.sClient] then
tClients[usr.sClient]["count"] = tClients[usr.sClient]["count"] + 1
end
end
for client,table in tClients do
temp = temp.."Client Name : "..client..", Users : "..tClients[client]["count"]
end
tClients = {}
user:SendData(BotName,temp)
end
end


Done !