myDC.ru

Здравствуйте, гость ( Вход | Регистрация )

 

> Скрипт чтобы прятал шару Админа

Теги
Нет тегов для показа
Sinsei
сообщение 28.6.2010, 14:05
Сообщение #1


Активный участник
***

Группа: Пользователи
Сообщений: 65
Регистрация: 29.5.2010
Пользователь №: 6 945
Спасибо сказали: 2 раза




Цитата
Нужен скрипт чтобы прятал шару Админа


Существует такой скрипт?

Go to the top of the page
+Quote Post
 
Начать новую тему
Ответов
ustas
сообщение 28.6.2010, 14:36
Сообщение #2


Продвинутый участник
****

Группа: Пользователи
Сообщений: 177
Регистрация: 20.5.2008
Пользователь №: 5
Спасибо сказали: 26 раз




в настройках профиля указать для админа, что нет ограничений по шаре, тогда на хаб можно заходить с нулевой шарой --такой вариант устраивает?
Go to the top of the page
+Quote Post
переподвыподверт
сообщение 28.6.2010, 15:30
Сообщение #3


Активный участник
***

Группа: Пользователи
Сообщений: 57
Регистрация: 4.2.2009
Пользователь №: 2 108
Спасибо сказали: 3 раза




Скрипт существует, но это УГ.Во флайлинке и других клиентах в свойствах избранного хаба галочка "прятать шару на этом хабе"
Go to the top of the page
+Quote Post
Sinsei
сообщение 28.6.2010, 16:05
Сообщение #4


Активный участник
***

Группа: Пользователи
Сообщений: 65
Регистрация: 29.5.2010
Пользователь №: 6 945
Спасибо сказали: 2 раза




Все что вы предложили это не пойдет. Мне нужен скрипт чтобы прятал шару админа но она реальна есть просто её не видно.
Go to the top of the page
+Quote Post
Артём
сообщение 28.6.2010, 16:56
Сообщение #5


Наруто на аваторке
***********

Группа: Пользователи
Сообщений: 2 606
Регистрация: 11.10.2008
Из: Харькова
Пользователь №: 771
Спасибо сказали: 774 раза




HideShare
Код
--[[

    HideShare 2.2 LUA 5.1x [Strict] [API 2]

    By Mutor        07/30/08

    A share hider script. Nothing new but the code method.
    Imperfect because MyINFO is not blockable, nor should it be.
    I never liked any such script that resends MyINFO, but I try
    not to force my opinions on others.  :P

    - Hides user shares per profile
    - Shares restored on script exit

    +Changes from 2.0    08/14/08
        + Added hideprof and hidenick commands. Request by kalle370
        + Added command permission per profile
        + Added context menus [right click]
        + Added configuration saved to file for hub/script restarts
        + Added script is restated if profile settings are changed

    +Changes from 2.01    03/04/10
        + Added CTM/RCTM block for hidden users
        + Added Search block for hidden users
]]


--[[ Start User Settings ]]--

-- "Botname" ["" = hub bot]
local Bot = "[RequestChat]"
-- "Command Menu" ["" = hub name]
local Menu = ""
-- "Command SubMenu" ["" = script name]
local SubMenu = ""
-- File to save configuration to. "Filename.ext"
local File = "HideShare.dat"
-- Delay [in ms] to delay resend of MyINFO
local Delay = 250
-- Always send script replies in private message?
local OnlyPm = true
-- Default profile settings
HsCfg = {
    -- Set your profiles / permissions here.
    -- [#] = true/false, (true = Hide Share / false = Show Share)
Profiles = {
    [-1] = false,    -- Unregistered User
    [0] = true,    -- Master
    [1] = false,    -- Operator
    [2] = false,    -- Vip
    [3] = false,    -- Reg
    },
-- Hide these nicks
-- ["Nick"] = true/false,
Exclude = {
    ["Mutor"] = true,
    },
}

--[[ End User Settings ]]--


local Tmr,Temp,Path,Scp = 0,{},Core.GetPtokaXPath().."scripts/","HideShare 2.2"
OnStartup = function()
    if Bot == "" then Bot = SetMan.GetString(21) end
    if Menu == "" then Menu = SetMan.GetString(0) end
    if SubMenu == "" then SubMenu = Scp end
    if not File:find("^"..Path,1,true) then File = Path..File end
    if loadfile(File) then dofile(File) else Save_File(File,HsCfg,"HsCfg") end
    for _,user in ipairs(Core.GetOnlineUsers()) do DoInfo(user) end
    Mem()
end

OnExit = function()
    for _,user in ipairs(Core.GetOnlineUsers()) do local mi = Core.GetUserValue(user,1) Core.SendToAll(mi.."|") end
end

OnTimer = function(Id)
    if Id == Tmr then
        for i,v in pairs(Temp) do Core.SendToAll(v.."|") i = nil end
        TmrMan.RemoveTimer(Tmr)
        Tmr = 0
    end
end

UserConnected = function(user)
    DoInfo(user)
    for _,user in ipairs(Core.GetOnlineUsers()) do DoInfo(user) end
    local str,stp,uc,m,p = "","","$UserCommand 1 3 "..Menu.."\\"..SubMenu.."\\","$<%[mynick]> ","||"
    local pfx = SetMan.GetString(29):sub(1,1)
    for k,v in pairs(HsCmds) do
        if v[2][user.iProfile] then local d,a = v[1]() str = str..uc..d..m..pfx..k..a..p end
    end
    if str:len() > 0 then Core.SendToUser(user,str) end
    Mem()
end
OpConnected,RegConnected = UserConnected,UserConnected

MyINFOArrival = function(user,data) if Core.GetUserValue(user,9) then DoInfo(user) end end

ChatArrival = function(user,data)
    local _,_,cmd = data:find("%b<> ["..SetMan.GetString(29).."](%a+)")
    if cmd and HsCmds[cmd] and HsCmds[cmd][2][user.iProfile] then
        reply = HsCmds[cmd][1](user,data,SetMan.GetString(29):sub(1,1)..cmd)
        if reply then return Core.SendToUser(user,"<"..Bot.."> "..reply.."|"),true end
    end
end
ToArrival = ChatArrival

ConnectToMeArrival = function(user,data)
    local p,n = user.iProfile,user.sNick
    local Ctms = {[1] = "^$ConnectToMe ([^ ]-) ",[2] = "^$RevConnectToMe [^ ]- (.+)",}
    for i,v in ipairs(Ctms) do
        local _,_,s = data:sub(1,-2):find(v)
        if s and not HsCfg.Exclude[s] then
            local msg1,msg2 = "You requested a file from "..s:format("%q")..", transfers from this user are blocked.|",
            "Please clear "..string.format("%q",s).." from your download queue. Thank you.|"
            if OnlyPm then
                return Core.SendPmToUser(user,Bot,msg1),
                Core.SendPmToUser(user,Bot,msg2),true
            else
                return Core.SendToUser(user,"<"..Bot.."> "..msg1),
                Core.SendToUser(user,"<"..Bot.."> "..msg2),true
            end
        end
    end
end
RevConnectToMeArrival = ConnectToMeArrival

SearchArrival = function (user,data)
    local t = Core.GetOnlineUsers()
    if next(t) then
        for _,usr in ipairs(t) do
            local n = usr.sNick
            if not HsCfg.Exclude[n] then Core.SendToUser(usr,data) end
        end
    end
    return true
end

DoInfo = function(user)
    local bool
    if not HsCfg.Exclude[user.sNick] and HsCfg.Profiles[user.iProfile] then bool = true end
    if bool then
        local s = tostring(Core.GetUserValue(user,16))
        Temp[user.sNick] = Core.GetUserValue(user,1):gsub(s,"0")
        if Tmr == 0 then Tmr = TmrMan.AddTimer(Delay) end
    end
end

Mem = function() collectgarbage("collect") return string.format("%-.2f Kb.",collectgarbage("count")) end

GetProf = function(i)
    local Prof = "Unregistered User"
    if i ~= -1 then Prof = ProfMan.GetProfile(i).sProfileName end
    return Prof
end

Save_Serialize = function(tTable, sTableName, hFile, sTab)
    sTab = sTab or "";
    hFile:write(sTab..sTableName.." = {\n" )
    for key, value in pairs(tTable) do
        local sKey = (type(key) == "string") and string.format("[%q]",key) or string.format("[%d]",key)
        if(type(value) == "table") then
            Save_Serialize(value, sKey, hFile, sTab.."\t")
        else
            local sValue = (type(value) == "string") and string.format("%q",value) or tostring(value)
            hFile:write(sTab.."\t"..sKey.." = "..sValue)
        end
        hFile:write(",\n")
    end
    hFile:write(sTab.."}")
end

Save_File = function(file,table, tablename )
    local hFile = io.open (file , "wb")
    Save_Serialize(table, tablename, hFile)
    hFile:close()
    Mem()
end

HsCmds = {
    hideprof = {function(user,data,cmd)
        if user then
            local _,_,prof,val = data:find("%b<> %p%a+ ([-%d]+) ([%a]+)|$")
            if prof then
                if val then
                    local bool,valid,chg
                    if val:lower() == "true" then bool,valid = true,true end
                    if val:lower() == "false" then bool,valid = false,true end
                    if valid then
                        t = {["true"] = "enabled",["false"] = "disabled"}
                        prof = tonumber(prof)
                        if HsCfg.Profiles[prof] ~= bool then chg = true end
                        HsCfg.Profiles[prof] = bool
                        if chg then Save_File(File,HsCfg,"HsCfg") end
                        local restart = function()
                            local scp = ScriptMan.GetScript().sName
                            if scp then return ScriptMan.RestartScript(scp) end
                        end
                        return "Hidden share for "..GetProf(prof).."'s"..
                        " is now "..t[tostring(HsCfg.Profiles[prof])],restart()
                    else
                        return "Error, Invalid Value! Usage:"..cmd.." <profile> '<true/false>'"
                    end
                else
                    return "Error, Value Omitted! Usage:"..cmd.." <profile> '<true/false>'"
                end
            else
                return "Error, Profile Omitted! Usage:"..cmd.." '<profile>' <true/false>"
            end
        else
            local s = "< -1"
            for i = 0,#ProfMan.GetProfiles() do
                s = s.." / "..tostring(i)
            end
            return "Enable / Disable Hidden Share For Profile",
            " %[line:Profile Number "..s.." >] %[line:Setting <*true/false> *true = hide / false = unhide]"
        end
    end,
    {[-1] = false,[0] = true,[1] = true,[2] = false,[3] = false,},
    },
    hidenick = {function(user,data,cmd)
        if user then
            local _,_,val = data:find("%b<> %p%a+ ([%a]+)|$")
            local t = {["true"] = "disabled",["false"] = "enabled",["nil"] = "enabled"}
            if val then
                local bool,valid
                if val:lower() == "true" then bool,valid = true,true end
                if val:lower() == "false" then bool,valid = false,true end
                if valid then
                    HsCfg.Exclude[user.sNick] = bool
                    Save_File(File,HsCfg,"HsCfg")
                    if not bool then
                        DoInfo(user)
                    else
                        Core.SendToAll(Core.GetUserValue(user,1).."|")
                    end
                    return "Hidden share for "..user.sNick..
                    " is now "..t[tostring(HsCfg.Exclude[user.sNick])]
                else
                    return "Error, Invalid Value! Usage:"..cmd.." '<true/false>'"
                end
            else
                return "Hidden share for "..user.sNick..
                " is currently "..t[tostring(HsCfg.Exclude[user.sNick])]
            end
        else
            return "Exclude Your Nick From Hidden Share"," %[line:Setting <true/false> (Blank for current setting))]"
        end
    end,
    {[-1] = false,[0] = true,[1] = true,[2] = true,[3] = false,},
    },
}


Спасибо сказали:
Go to the top of the page
+Quote Post

Ответить в данную темуНачать новую тему
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

Collapse

> Похожие темы

  Тема Ответов Автор Просмотров Последнее сообщение
No new Topic has attachmentsНерабочий скрипт ВИПа по шаре
16 Damaks 18 625 23.2.2023, 7:16 Посл. сообщение: mod
No new Topic has attachmentsMagneto - Бесплатный Скрипт Портала Обмена Dc-ссылками Для Локальной Сети
26 UserSide 39 416 27.8.2019, 11:01 Посл. сообщение: CyberGhost404
No New Posts От: Новогодний Скрипт
От темы с ID: 871
0 Евгений 2 815 15.10.2018, 21:44 Посл. сообщение: Евгений
No New Posts А бывают такой скрипт бота?
Скрипт который создает виртуалных юзеров, но с реальными шарами
5 MarkDark 7 368 26.12.2017, 10:47 Посл. сообщение: мамин_парень
No New Posts Скрипт: Бот который отвечает в лс
4 мамин_парень 7 054 11.11.2017, 5:57 Посл. сообщение: мамин_парень
No New Posts как сделать вот этот скрипт
12 мамин_парень 11 192 13.9.2017, 10:51 Посл. сообщение: dimetro
No New Posts Topic has attachmentsИщу скрипт переадресации (redirect)
Переадресация интернет-юзеров
3 AS_Com 6 663 27.8.2017, 8:05 Посл. сообщение: Ksan
No New Posts Topic has attachmentsСкрипт Thunder.lua
7 Евген76 14 573 9.8.2017, 11:48 Посл. сообщение: Ksan
No New Posts Требуется скрипт
Нужен скрипт запрета на подключение
5 Nikolaevich 8 846 20.8.2016, 19:52 Посл. сообщение: Ksan
No new ВАЖНО: Topic has attachmentsСкрипт банов для RusHub
тестим и комменьтруем
79 Wariner 99 653 28.9.2015, 13:34 Посл. сообщение: NeirRon
No New Posts Скрипт загрузки файла
1 FreeNas 6 020 21.7.2015, 10:58 Посл. сообщение: HackFresse
No new Как вызвать bash скрипт из Lua
14 Iskandark 16 029 3.3.2015, 12:42 Посл. сообщение: Iskandark
No new Topic has attachmentsНовогодний Скрипт
API2
22 Tsd 33 875 12.12.2014, 16:28 Посл. сообщение: Tsd
No New Posts Скрипт запрета видеть чат
запрет видеть чат
2 dimetro 6 854 5.12.2014, 17:37 Посл. сообщение: dimetro
No New Posts Topic has attachmentsпеределать скрипт kinozal.tv
6 BOKOREZ 12 078 30.10.2014, 18:29 Посл. сообщение: Dani_Filth

 



RSS Сейчас: 20.4.2024, 1:25