Author Topic: convert to ptokax 0.3.6.0i  (Read 3616 times)

0 Members and 1 Guest are viewing this topic.

Offline ?[-?Genius?-]?

  • Double Ace
  • *
  • Posts: 118
  • Karma: +3/-1
convert to ptokax 0.3.6.0i
« on: 03 February, 2008, 18:47:22 »
Hi its possible convert this scrpit for ptokax 0.3.6.0 i ? 

Code: [Select]

--=[ Nome do Bot ]=--
sBot = "[!???] ??vdRip?"

--=[ Nome do OpChat ]=--
OpChatName = "[!???] ?Op Cha??"

--=[ Exep??es / Deixar entrar um internacional atrav?z do nick ]=--
excepcoes = {
["[PT]Sniffer"] = 4,
}

--=[ Ranges permitidas no Hub ]=--

arrIP = {
   ["127.0.0.1"] = "127.0.0.1", -- ? Test
}



function Main()
   frmHub:RegBot(sBot)
end

--=[ Mensagem ao user n?o constante na Range ]=-

function NewUserConnected(user)
   if (excepcoes[user.sName] == nil) and (isGoodIP(user.sIP) == nil) then
user:SendData(sBot, "??  Este Servidor/Hub apenas permite Ips que constem na nossa Base. Voce ir? ser redirecionado para um Servidor/Hub secund?rio para verifica??o de informa??o do seu provedor de Internet. Gratos pela Prefer?ncia.")
SendPmToOps(sBot, "?? Utilizador ["..user.sName.."] reenviado para SuperDvdRip.sytes.net devido a sua IpRange n?o constar na Base de Dados. ")
      user:SendData("$ForceMove SuperDvdRip.sytes.net")
user:Disconnect()
   end
end

OpConnected = NewUserConnected

function isGoodIP(sIP)
   sIP = ipToNumber(sIP)
   local iFirst,iLast
   for iFirst, iLast in pairs(arrIP) do
      if (sIP >= ipToNumber(iFirst) and sIP <= ipToNumber(iLast)) then
         return 1
      end
   end
   return nil
end

function ipToNumber(sIP)
   iAux = ""
   string.gsub(sIP,"(%d+)", function(w)
      w = tonumber(w)
      if (w < 10) then
         iAux = iAux.."00"..w
      elseif (w < 100) then
         iAux = iAux.."0"..w
      else
         iAux = iAux..w
      end
   end)
   return tonumber(iAux)
end

PtokaX forum

convert to ptokax 0.3.6.0i
« on: 03 February, 2008, 18:47:22 »

Offline ?[-?Genius?-]?

  • Double Ace
  • *
  • Posts: 118
  • Karma: +3/-1
Re: convert to ptokax 0.3.6.0i
« Reply #1 on: 03 February, 2008, 19:05:37 »
Nice script. But i want my script. Its because have redirect and exceptions.

Sory my bad inglish
Tankx

Offline ?[-?Genius?-]?

  • Double Ace
  • *
  • Posts: 118
  • Karma: +3/-1
Re: convert to ptokax 0.3.6.0i
« Reply #2 on: 04 February, 2008, 04:54:31 »
Script dont work :(

Offline ?[-?Genius?-]?

  • Double Ace
  • *
  • Posts: 118
  • Karma: +3/-1
Re: convert to ptokax 0.3.6.0i
« Reply #3 on: 04 February, 2008, 13:40:52 »
I just teste 3rd script you posted and don?t work. but dont send errors.
Today i test scipt 2 and Its working :)

Is not possible change my script for new ptokax?

PtokaX forum

Re: convert to ptokax 0.3.6.0i
« Reply #3 on: 04 February, 2008, 13:40:52 »