Search in all registerd users with part off the name and get a list off users that matches.
maybe something to add directly to the soft?
!find <part_of_nick> or !search/!finduser
min 2 char for search
//Herman
This is for the new API:
-- RegSearch by bastya_elvtars
-- Requested by hermaniii
command = "searchreg" -- no trailing prefix!
minlen = 2 -- minimum search length
-- don't edit below
function ChatArrival (user, data)
local cmd,str=data:match("^%b<>%s+[%!%+%#%?%-](%S+)%s(%S+)%|$")
-- We are parsing the command here
if cmd == command then
if str:len() < 2 then
Core.SendToUser(user, "<RegSearch> Search string must be at least "..minlen.." characters long!|")
else
local found
local rettbl = {}
local regusers = RegMan.GetRegs()
for _,reg in ipairs(regusers) do
if reg.sNick:find(str) then
rettbl[reg.sNick] = ProfMan.GetProfile(reg.iProfile).sProfileName
found = true
end
end
if found then
local msg = "<RegSearch> Found the following users:\r\n\r\n"..("-"):rep(60).."\r\n"
for nick, prof in pairs (rettbl) do
msg=msg..nick.."\t".."(Profile: "..prof..")\r\n"
end
msg=msg..("-"):rep(60).."|"
Core.SendToUser(user,msg)
end
end
return true
end
end
:/ was not a script req.
Have it already in my hub but thought it could be a good feature for the soft.
//Herman
I think this should be done by a script, that's why Px has a nice scripting interface. Things that get into the main hubsoft are usually impossible or too slw via the Lua interface. And don't be so lazy to add a script. :P