PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: NemeziS on 26 September, 2004, 00:35:25

Title: User info....
Post by: NemeziS on 26 September, 2004, 00:35:25
Hi!
I'm using this userinfo script:
Bot = "Hub-Security"

function Main()
frmHub:RegBot(Bot)
end

function DataArrival(user, data)
if( strsub(data, 1, 1) == "<" ) then
-- remove end pipe
data=strsub(data,1,strlen(data)-1)
-- parse the command
s,e,cmd = strfind( data, "%b<>%s+(%S+)" )

 
if (cmd=="~info" or cmd=="~info" ) then
UserInfo(user, data)
return 1
end
end
end

function GetArgML(data)
s,e,cmd,arg = strfind(data, "%b<>%s+(%S+)%s+(%S+)%s*")
return arg
end

function UserInfo(user, data)
who=GetArgML(data)
local usr = GetItemByName(who)
user:SendPM(Bot, "here is the info from: "..who.." |")
-- now whe know the user lets extract the info
-- ip of the user
user:SendPM(Bot, "ip: "..usr.sIP.." |")
-- client type and version
if (strfind(usr.sMyInfoString,"_,b, dcgui = strfind(usr.sMyInfoString,"V:0.(%x+.%x+)")
user:SendPM(Bot, "DCgui version: 0."..dcgui.." |")
elseif (strfind(usr.sMyInfoString,"<+")) then
if strfind(usr.sMyInfoString,"clienttype = "oDC"
elseif strfind(usr.sMyInfoString,"V:0.%x+%a") then
clienttype = "czdc++"
elseif strfind(usr.sMyInfoString,"L:") or strfind(usr.sMyInfoString,"B:") then
clienttype = "bcdc++"
else
clienttype = "dc++"
end
_,b, dcver = strfind(usr.sMyInfoString,"V:0.(%x+)")
user:SendPM(Bot, clienttype.." client |")
user:SendPM(Bot, "version: 0."..dcver.." |")
end
-- active or pasive
if strfind(usr.sMyInfoString,"M:A") then
mode = "active"
else
mode = "pasive"
end
user:SendPM(Bot, mode.." mode |")
-- hub info
_,b, guest = strfind(usr.sMyInfoString,"H:(%x+)/")
if guest == nil then
_,b, hubs = strfind(usr.sMyInfoString,"H:(%x+)")
user:SendPM(Bot, hubs.." - hub(s) |")
else
_,b, regged = strfind(usr.sMyInfoString,"H:%x+/(%x+)/")
_,b, opped = strfind(usr.sMyInfoString,"H:%x+/%x+/(%x+)")
user:SendPM(Bot, guest.." - hub(s) as regular user |")
user:SendPM(Bot, regged.." - hub(s) as registered user |")
user:SendPM(Bot, opped.." - hub(s) as operator |")
end
-- slot info
_,b, slots = strfind(usr.sMyInfoString,"S:(%x+)")
user:SendPM(Bot, slots.." - slot(s) |")
-- bandwidth upload limiter
if strfind(usr.sMyInfoString,"L:") or strfind(usr.sMyInfoString,"B:") then
_,b, limiter = strfind(usr.sMyInfoString,"B:(%x+)")
if limiter == nil then
_,b, limiter = strfind(usr.sMyInfoString,"L:(%x+)")
if limiter == nil then
_,b, limiter = strfind(usr.sMyInfoString,"U:(%x+)")
if limiter == nil or limiter == "*" then
limiter = "not limited"
end
end
end
if tonumber(limiter) ~= nil then
if strlen(limiter) > 4 then
limiter = limiter / 1024
end
end
user:SendPM(Bot, "upload limited: "..limiter.." Kb/s |")
end
-- bandwidth download limiter
_,b, dlimiter = strfind(usr.sMyInfoString,"D:(%x+)")
if dlimiter ~= nil then
user:SendPM(Bot, "download limited: "..dlimiter.." Kb/s |")
end
end


I wanted also to add here an info about sharesize, email, connection type, tag, description of user, user segment (example 255.255.255.*** or 111.111.111.***) and how many hubs are open (including my hub).

Who can help me with that?
Title:
Post by: nErBoS on 26 September, 2004, 19:48:43
Hi,

Search in the Finished scripts section for the Offline userinfo by NightLitch.

Best regards, nErBoS
Title:
Post by: BottledHate on 02 October, 2004, 05:46:20
QuoteOriginally posted by Mutor
Stop pulling the authors notes/credits out of the scripts.

Would it kill you jerks to leave this in?



-- user info script by lallo82
-- functions by plop (great work)

 
 
This shit is really starting to tick me off.
They didnt spend time on this so you could blow them off

indeed.

-BH