myDC.ru

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

 
История благодарностей участнику fmit. Спасибо сказали: 1
Дата поста: В теме: За сообщение: Спасибо сказали:
27.1.2012, 9:36 Список пользователей
Может кому понадобиться ) Вроде работает.
Код
local sBotMsg = "<"..SetMan.GetString(21).."> *** Где префикс?"
local sBotMsg2 = "<"..SetMan.GetString(21).."> *** Запрещенные символы!"
local tExNicks = {
    "admin1",
    "admin2",
}
local tExChar = {
    "=",
    "+",
    "-",
    "/",
    "@",
}
function ValidateNickArrival(tUser, sData)
    local b = false
    for i in pairs(tExNicks) do
        if tUser.sNick == tExNicks[i] then
            b = true
            break
        end
    end
    
    for _,v in pairs(tExChar) do
        if tUser.sNick:find(v,1,true) then
            Core.SendToUser(tUser, sBotMsg2)
            Core.Disconnect(tUser)
        end
    end
    
    if not b then
        if not tUser.sNick:find"^%[ADSL%]" and not tUser.sNick:find"^%[FTTB%]" then
            Core.SendToUser(tUser, sBotMsg)
            Core.Disconnect(tUser)
        end
    end
end
shullz

RSS Сейчас: 27.7.2024, 3:35