please request convert 4 to 5 page 1
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

please request convert 4 to 5 page 1

Started by gemini, 06 June, 2005, 18:31:10

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gemini

i have this script
-- RightClicker for RoboCopv9.0-Beta
--
-- Made by Optimus & TiMeTrAVelleR
-- USE SCRIPT AT YOUR OWN RISK, IT MAY NOT BE COMPATIBLE WITH ALL CLIENTS
--
-- Editable Settings --

-- 1=on / 0=off
SendTo = {
[0] = 1,   -- Masters
[1] = 1,   -- Operators
[2] = 1,   -- Vips
[3] = 0,   -- Regs
[4] = 1,   -- Moderator
[5] = 1,   -- NetFounder
[-1] = 0,  -- Users
}

sMenu = "?=RoboCop Commands=?"

-- End Editable Settings --

assert(dofile("tbl/scriptlevel.tbl"),"tbl/scriptlevel.tbl not found")
assert(dofile("tbl/inbuildlevel.tbl"),"tbl/inbuildlevel.tbl not found")

function customCMDs(user)
   --user:SendData("$UserCommand 1 3 zCUSTOM\\Test$<%[mynick]> +test||")   -- test
if (user.iProfile ~=-1 ) and (user.iProfile ~= 2) and (user.iProfile ~= 3) then
  -- non ai vips , regs e user
    user:SendData("$UserCommand 1 3 ?=FAKERS=?\\Lista Utenti Loggati$<%[mynick]> !listlogged||")   --Lista Utenti Loggati
    user:SendData("$UserCommand 1 3 ?=FAKERS=?\\Scanner Utenti Faker$<%[mynick]> !scanfakers||")  --Scanner Utenti Faker
    user:SendData("$UserCommand 1 3 ?=FAKERS=?\\Imposta Intervallo di Scann$<%[mynick]> !faketime %[line:Time (any to view)]||")   --Imposta Intervallo di Scann
    user:SendData("$UserCommand 1 3 ?=FAKERS=?\\Esclude Utente dallo Scann$<%[mynick]> !fcexclude %[nick]||")   --Esclude Utente dallo Scann
    user:SendData("$UserCommand 1 3 ?=FAKERS=?\\Include Utente da Scannerizzare$<%[mynick]> !fcinclude %[nick]||")   --Include Utente da Scannerizzare
    user:SendData("$UserCommand 1 3 ?=FAKERS=?\\Lista Utenti Esclusi$<%[mynick]> !fclist||")   --Lista Utenti Esclusi
    user:SendData("$UserCommand 1 3 ?=FAKERS=?\\Mostra i Comandi$<%[mynick]> !commands||")   --Mostra i Comandi  
  end
  user:SendData("$UserCommand 1 3 ?=COUNTRY=?\\Rileva Nazione di Connessione Utente$<%[mynick]> +getcountry %[nick]||")   --Mostra Nazione di Provenienza dell'Utente
  user:SendData("$UserCommand 1 3 ?=STATISTICHE=?\\Mostra la Tua Statistica$<%[mynick]> !mystats||") --Mostra la tua statistica
  user:SendData("$UserCommand 1 3 ?=STATISTICHE=?\\Mostra la Statistica di un Utente$<%[mynick]> !show %[nick]||")  -- Mostra la statistica di un user
  user:SendData("$UserCommand 1 3 ?=STATISTICHE=?\\Statistica dei  10 Utenti sempre connessi$<%[mynick]> !top10alltime||")  -- top 10 alltime utenti online
  user:SendData("$UserCommand 1 3 ?=STATISTICHE=?\\Statistica dei  50 Utenti sempre connessi$<%[mynick]> !top50alltime||") -- top 50 alltime utenti online
  user:SendData("$UserCommand 1 3 ?=STATISTICHE=?\\Statistica dei 100 Utenti sempre connessi$<%[mynick]> !top100alltime||") -- top 100 alltime utenti online
  user:SendData("$UserCommand 1 3 ?=STATISTICHE=?\\Statistica dei  10 Utenti connessi attualmente$<%[mynick]> !top10now||") -- top 10 degli utenti online attuale
  user:SendData("$UserCommand 1 3 ?=STATISTICHE=?\\Statistica dei  50 Utenti connessi attualmente$<%[mynick]> !top50now||") -- top 50 degli utenti online attuale
  user:SendData("$UserCommand 1 3 ?=STATISTICHE=?\\Statistica dei 100 Utenti connessi attualmente$<%[mynick]> !top100now||") -- top 100 degli utenti online attuale
  user:SendData("$UserCommand 1 3 ?=STATISTICHE=?\\Mostra i Comandi$<%[mynick]> !help||") -- mostra i comandi
  user:SendData("$UserCommand 1 3 ?=CHAT ROOM PERSONALI=?\\Entra$<%[mynick]> !entra %[line:nome stanza]||") --Entra in una stanza, se non c'? una stanza con questo nome creala
  user:SendData("$UserCommand 1 3 ?=CHAT ROOM PERSONALI=?\\Esci$<%[mynick]> !esci||") --Esci dalla stanza dove sei
  user:SendData("$UserCommand 1 3 ?=CHAT ROOM PERSONALI=?\\Lista stanze$<%[mynick]> !lista||") --Visualizza la lista degli utenti e le stanze  
end


gemini

function NewUserConnected(user)
   if (SendTo[user.iProfile]==1) then
      user:SendData("$UserCommand 255 7 |")
      user:SendData("$UserCommand 0 3 |")
      GetRightClick(user, ScriptLevel, ScriptCmds)
      GetRightClick(user, InbuildLevel, InbuildCmds)
      customCMDs(user)
      user:SendData("ATTENZIONE!!!! il tasto destro del mouse per i comandi del RoboCop e' abilitato!")
   end
end

OpConnected=NewUserConnected

function GetRightClick(user, table1, table2)
   for cmd,_ in table1 do
      if table1[cmd][user.iProfile] == 1 then
         for value,command in table2 do
            if cmd == value then
               user:SendData(command)
            end
         end
      end
   end
end

ScriptCmds = {
["kick"]="$UserCommand 1 3 "..sMenu.."\\?=ESPULSIONI=?\\Kikka Utente$<%[mynick]> !kick %[nick] %[line:Reason]||",  -- kick
["ban"]="$UserCommand 1 3 "..sMenu.."\\?=ESPULSIONI=?\\Banna Utente$<%[mynick]> !ban %[nick] %[line:Reason]||",  -- ban
["nameban"]="$UserCommand 1 3 "..sMenu.."\\?=ESPULSIONI=?\\Banna il Nick$<%[mynick]> !nameban %[nick] %[line:Reason]||",  -- nameban
["timeban"]="$UserCommand 1 3 "..sMenu.."\\?=ESPULSIONI=?\\Imposta il tempo di ban$<%[mynick]> !timeban %[nick] %[line:hr:mn] %[line:Reason]||",  -- timeban
["kill"]="$UserCommand 1 3 "..sMenu.."\\?=ESPULSIONI=?\\Uccidi Utente$<%[mynick]> !kill %[nick] %[file] %[line:Reason]||",  -- kill
["warn"]="$UserCommand 1 3 "..sMenu.."\\?=ESPULSIONI=?\\Avvisa Utente$<%[mynick]> !warn %[nick] %[line:Reason]||",  -- warn
["flood"]="$UserCommand 1 3 "..sMenu.."\\?=ESPULSIONI=?\\Flodda Utente$<%[mynick]> !flood %[nick] %[line:Nr] %[line:Reason]||",  -- flood
["hconfig"]="$UserCommand 1 3 "..sMenu.."\\?=SETTAGGI=?\\Configurazione Hub$<%[mynick]> !hconfig||",  -- hconfig
["hstat"]="$UserCommand 1 3 "..sMenu.."\\?=SETTAGGI=?\\Statistica Hub$<%[mynick]> !hstat||",  -- hsta
["info"]="$UserCommand 1 3 "..sMenu.."\\?=INFORMAZIONI=?\\Informazioni su Utente$<%[mynick]> !info %[nick]||",  -- info
["mass"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 1=?\\Messaggio di massa$<%[mynick]> !mass %[line:Message]||",  -- mass
["banner"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 1=?\\Invia Banner$<%[mynick]> !banner %[line:Advert]||",  -- banner
["sendhubad"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 1=?\\Invia messaggio di aiuto per l'autoregistrazione$<%[mynick]> !sendhubad %[line:main/pm]||",  -- sendhubad
["talk"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 1=?\\Parla senza mostrare il tuo Nick$<%[mynick]> !talk %[line:Message]||",  -- talk
["online"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 1=?\\Controllo utente/i online$<%[mynick]> !online %[nick]||",  -- online
["offline"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 1=?\\Invia messaggio offline all'utente/i$<%[mynick]> !offline %[nick] %[line:Message]||",  -- offline
["watch"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 1=?\\Spia un Utente$<%[mynick]> !watch %[nick]||",  -- watch
["watchoff"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 1=?\\Disabilita lo spionaggio di un Utente$<%[mynick]> !watchoff||",  -- watchoff
["getwatch"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 1=?\\Mostra gli Utenti Sotto Spionaggio$<%[mynick]> !getwatch||",  -- getwatch
["cmdspy"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 1=?\\Setta il comando spia su on/off$<%[mynick]> !cmdspy %[line:on/off]||",  -- cmdspy
["topkickers"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI BASE=?\\Mostra i Topkickers$<%[mynick]> !topkickers||",  -- topkickers
["tophubbers"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI BASE=?\\Mostra i TopHubbers Online Time$<%[mynick]> !tophubbers||",  -- tophubbers
["sminslots"]="$UserCommand 1 3 "..sMenu.."\\?=SETTAGGI=?\\Set Script Minslots$<%[mynick]> !sminslots %[line:user/reg/vip/op/mod/master/founder] %[line:slots]||",  -- sminslots %[line:user/reg/vip/op/mod/master/founder] %[line:slots]||",   -- sminslots
["smaxslots"]="$UserCommand 1 3 "..sMenu.."\\?=SETTAGGI=?\\Set Script Maxslots$<%[mynick]> !smaxslots %[line:user/reg/vip/op/mod/master/founder] %[line:slots]||",  -- smaxslots%[line:user/reg/vip/op/mod/master/founder] %[line:slots]||",   -- smaxslots
["smaxshubs"]="$UserCommand 1 3 "..sMenu.."\\?=SETTAGGI=?\\Set Script Max Hubs$<%[mynick]> !smaxhubs %[line:user/reg/vip/op/mod/master/founder] %[line:hubs]||",  -- smaxshubs%[line:user/reg/vip/op/mod/master/founder] %[line:hubs]||",   -- smaxshubs
["sratio"]="$UserCommand 1 3 "..sMenu.."\\?=SETTAGGI=?\\Set Script Slots/Hubs Ratio$<%[mynick]> !sratio  %[line:user/reg/vip/op/mod/master/founder] %[line:slots]||",   -- sratio
["sminshare"]="$UserCommand 1 3 "..sMenu.."\\?=SETTAGGI=?\\Set Script MinShare$<%[mynick]> !sminshare %[line:user/reg/vip/op/mod/master/founder] %[line:share] %[line:mb/gb]||",  -- sminshare
["smaxshare"]="$UserCommand 1 3 "..sMenu.."\\?=SETTAGGI=?\\Set Script Maxshare$<%[mynick]> !smaxshare %[line:user/reg/vip/op/mod/master/founder] %[line:share] %[line:mb/gb]||",  -- smaxshare
["hminshare"]="$UserCommand 1 3 "..sMenu.."\\?=SETTAGGI=?\\Set Hub Minshare$<%[mynick]> !hminshare %[line:Number] %[line:b/kb/mb/gb]||",  -- hminshare
["hmaxusr"]="$UserCommand 1 3 "..sMenu.."\\?=SETTAGGI=?\\Set Max Users$<%[mynick]> !hmaxusr %[line:Number]||",  -- hmaxusr
["hdesc"]="$UserCommand 1 3 "..sMenu.."\\?=SETTAGGI=?\\Set Hub Descrizione$<%[mynick]> !hdesc %[line:Hub_Description]||",  -- hdesc
["chhubname"]="$UserCommand 1 3 "..sMenu.."\\?=SETTAGGI=?\\Set Nome Hub$<%[mynick]> !chhubname %[line:New Hubname]||",  -- chhubname
["regserver"]="$UserCommand 1 3 "..sMenu.."\\?=SETTAGGI=?\\Set Registrazione Server$<%[mynick]> !regserver %[line:New_Reg_Address]||",  -- regserver %[line:New_Reg_Address]||",   -- regserver
["redirect"]="$UserCommand 1 3 "..sMenu.."\\?=SETTAGGI=?\\Set Indirizzo di Redirect$<%[mynick]> !redirect %[line:Host /Ip]||",  -- redirect
["redirectfull"]="$UserCommand 1 3 "..sMenu.."\\?=SETTAGGI=?\\Set Redireziona quando pieno on/off$<%[mynick]> !redirectfull %[line:on/off]||",  -- redirectfull
["autoredirect"]="$UserCommand 1 3 "..sMenu.."\\?=SETTAGGI=?\\Set Auto Redireziona on/off$<%[mynick]> !autoredirect %[line:on/off]||",   -- autoredirect
["addredirect"]="$UserCommand 1 3 "..sMenu.."\\?=REDIREZIONE=?\\Aggiungi un nuovo indirizzo di redirect alla lista$<%[mynick]> !addredirect %[line:Url/Ip]||", -- add new url to redirect list
["delredirect"]="$UserCommand 1 3 "..sMenu.."\\?=REDIREZIONE=?\\Cancella un indirizzo di redirect dalla lista $<%[mynick]> !delredirect %[line:Url/Ip]||", -- del url from redirect list
["showredirect"]="$UserCommand 1 3 "..sMenu.."\\?=REDIREZIONE=?\\Mostra tutti gli indirizzi di redirect$<%[mynick]> !showredirect||", -- show all redirect url
["hubprotect"]="$UserCommand 1 3 "..sMenu.."\\?=SETTAGGI=?\\Set Protezione Hub on/off$<%[mynick]> !hubprotect %[line:on/off]||",   -- hubprotect
["getblocked"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 1=?\\Mostra gli Utenti bloccati$<%[mynick]> !getblocked||",  -- getblocked
["massblocked"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 1=?\\Invia MSG di Massa agli utenti bloccati$<%[mynick]> !massblocked %[line:Message]||",  -- massblocked
["kickblocked"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 1=?\\Kick Blocked Users$<%[mynick]> !kickblocked ||",   -- kickblocked
["regreg"]="$UserCommand 1 3 "..sMenu.."\\?=REGISTRAZIONE=?\\Registra Utente$<%[mynick]> !regreg %[line:Tag Reg]%[nick] %[line:Password]||",  -- regreg
["regvip"]="$UserCommand 1 3 "..sMenu.."\\?=REGISTRAZIONE=?\\Registra Vip$<%[mynick]> !regvip %[line:Tag Vip]%[nick] %[line:Password]||",  -- regvip
["regop"]="$UserCommand 1 3 "..sMenu.."\\?=REGISTRAZIONE=?\\Registra Operatore$<%[mynick]> !regop %[line:Tag Operator]%[nick] %[line:Password]||",  -- regop
["regmod"]="$UserCommand 1 3 "..sMenu.."\\?=REGISTRAZIONE=?\\Registra Moderatore$<%[mynick]> !regmod %[line:Tag Mod]%[nick] %[line:Password]||",  -- regmop
["regmaster"]="$UserCommand 1 3 "..sMenu.."\\?=REGISTRAZIONE=?\\Registra Master$<%[mynick]> !regmaster %[line:Tag Master]%[nick] %[line:Password]||",  -- regmaster
["regfounder"]="$UserCommand 1 3 "..sMenu.."\\?=REGISTRAZIONE=?\\Registra NetFounder$<%[mynick]> !regfounder %[line:Tag NetFounder]%[nick] %[line:Password]||",  -- regfounder
["deluser"]="$UserCommand 1 3 "..sMenu.."\\?=REGISTRAZIONE=?\\Elimina Utente Registrato$<%[mynick]> !deluser %[nick]||",  -- deluser
["upgrade"]="$UserCommand 1 3 "..sMenu.."\\?=REGISTRAZIONE=?\\Aggiona Utente a Grado Superiore$<%[mynick]> !upgrade %[nick] %[line:reg/vip/op/mod/master/founder]||",  -- upgrade
["getpass"]="$UserCommand 1 3 "..sMenu.."\\?=REGISTRAZIONE=?\\Prendi Password Utente$<%[mynick]> !getpass %[nick]||", -- getpass
["resethstat"]="$UserCommand 1 3 "..sMenu.."\\?=SETTAGGI=?\\Resetta i contatori$<%[mynick]> !resethstat||",  -- resethstat
["clear"]="$UserCommand 1 3 "..sMenu.."\\?=GESTIONE LOG=?\\Cancella log dei Nick$<%[mynick]> !clear %[nick]||",  -- clear
["showiplog"]="$UserCommand 1 3 "..sMenu.."\\?=GESTIONE LOG=?\\Mostra log degli IP$<%[mynick]> !showiplog||",  -- showiplog
["showkicklog"]="$UserCommand 1 3 "..sMenu.."\\?=GESTIONE LOG=?\\Mostra log dei KIkk$<%[mynick]> !showkicklog||",  -- showkicklog
["showbanlog"]="$UserCommand 1 3 "..sMenu.."\\?=GESTIONE LOG=?\\Mostra log dei Ban$<%[mynick]> !showbanlog||",  -- showbanlog
["showwarnlog"]="$UserCommand 1 3 "..sMenu.."\\?=GESTIONE LOG=?\\Mostra log dei warn$<%[mynick]> !showwarnlog||",  -- showwarnlog
["delkicklog"]="$UserCommand 1 3 "..sMenu.."\\?=GESTIONE LOG=?\\Cancella log dei Kikk$<%[mynick]> !delkicklog||",  -- delkicklog
["delbanlog"]="$UserCommand 1 3 "..sMenu.."\\?=GESTIONE LOG=?\\Cancella log dei Ban$<%[mynick]> !delbanlog||",  -- delbanlog
["delwarnlog"]="$UserCommand 1 3 "..sMenu.."\\?=GESTIONE LOG=?\\Cancella log dei Warn$<%[mynick]> !delwarnlog||",  -- delwarnlog
["showlog"]="$UserCommand 1 3 "..sMenu.."\\?=GESTIONE LOG=?\\Mostra log NIck/IP$<%[mynick]> !showlog %[line:Name/Ip] ||",   -- showlog
["follow"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 1=?\\Segui Kick/Ban Messaggi on/off$<%[mynick]> !follow %[line:On/Off] ||",    -- follow
["rules"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI BASE=?\\Regole$<%[mynick]> !rules||",  -- rules
["network"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI BASE=?\\Lista degli Hub del Network$<%[mynick]> !network||",  -- network
["faq"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI BASE=?\\Mostra le Faq di DC++$<%[mynick]> !faq||",  -- faq
["myip"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI BASE=?\\Mostra il tuo IP$<%[mynick]> !myip||",  -- myip
["myinfo"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI BASE=?\\Mostra tutte le tue Informazioni Disponibili$<%[mynick]> !myinfo||",  -- myinfo
["version"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI BASE=?\\Mostra la Versione degli Scripts$<%[mynick]> !version||",  -- version
["regme"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI BASE=?\\Auto registrazione$<%[mynick]> !regme %[line:Password]||",  -- regme
["repass"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI BASE=?\\Cambia la Tua Password$<%[mynick]> !repass %[line:New Pass]||",  -- repass
["showreg"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI BASE=?\\Mostra gli Utenti in base al Profilo$<%[mynick]> !showreg %[line:reg/vip/op/mod/master/founder]||",  -- showreg
["away"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI BASE=?\\Inserisci il tuo Messaggio di Away$<%[mynick]> !away %[line:Message]||",  -- away
["back"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI BASE=?\\Rientra dall'Away$<%[mynick]> !back||",  -- back
["getaways"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI BASE=?\\Mostra tutti i Messaggi di Away$<%[mynick]> !getaways||",  -- getaways
["report"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI BASE=?\\Invia MSG agli OP in PVT$<%[mynick]> !report %[nick] %[line:Message]||",  -- report
["myhubtime"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI BASE=?\\Mostra il tuo tempo nell'hub$<%[mynick]> !myhubtime|| ",  -- myhubtime

gemini

["slots"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI BASE=?\\Mostra gli utenti con slot liberi$<%[mynick]> !slots||",  -- slots
["jump"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI BASE=?\\Mostra gli indirizzi possibili per il redirect$<%[mynick]> !jump||",  -- jump
["help"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI BASE=?\\Mostra i comandi$<%[mynick]> !help||",  -- help
["inbuild"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI BASE=?\\Mostra comandi extra$<%[mynick]> !inbuild%||",  -- inbuild
}

InbuildCmds = {
["drop"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 2\\Drop User$<%[mynick]> !drop %[nick]||",   -- drop
["gag"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 2\\Gag User$<%[mynick]> !gag %[nick]||",   -- gag
["ungag"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 2\\UnGag User$<%[mynick]> !ungag %[nick]||",   -- ungag
["banip"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 2\\Banna l'IP di Utente offline$<%[mynick]> !banip %[line:Ipnumber]||",  -- banip
["unban"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 2\\Sbanna Utente$<%[mynick]> !unban %[nick] %[line:nick/ip]||",  -- unban
["nickban"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 2\\Banna il Nick Utente$<%[mynick]> !nickban %[nick] %[line:Reason]||",  -- nickban
["getbanlist"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 2\\Visualizza lista dei bannati$<%[mynick]> !getbanlist||",  -- getbanlist
["clrpermban"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 2\\Cancella lista dei bannati$<%[mynick]> !clrpermban||",  -- clrpermban
["clrtempban"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 2\\Cancella lista dei bannati temporanei$<%[mynick]> !clrtempban||",  -- clrtempban
["op"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 2\\Imposta stato di Op Temporaneo$<%[mynick]> !op %[nick]||",   -- op
["getinfo"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 2\\Informazioni base di Utente$<%[mynick]> !getinfo %[nick]||",  -- getinfo
["ipinfo"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 2\\Mostra Utente con IP$<%[mynick]> !getinfo %[line:Ipnumber]||",  -- ipinfo
["iprangeinfo"]="$UserCommand 1 3 "..sMenu.."\\?=COMANDI EXTRA 2\\Mostra gli Utenti con l'IPrange$<%[mynick]> !iprangeinfo %[line:Ipnumber]||",  -- iprangeinfo
["restart"]="$UserCommand 1 3 "..sMenu.."\\?=SETTAGGI=?\\Riavvia Hub$<%[mynick]> !restart||",  -- restart
["restartscripts"]="$UserCommand 1 3 "..sMenu.."\\?=SETTAGGI=?\\Riavvia gli Scripts$<%[mynick]> !restartscripts||",  -- restartscripts
}

gemini

- GeoIP V 003 by chill
-- Syntax +getcountry IP
-- Binary search + string parsing = speed and little mem

-- GLOBALS
GeoIP= {}
GeoIP.bot = "= Geo IP ="
GeoIP.strlen = 0
GeoIP.string = ""
GeoIP.entries = 0
dofile("GeoIP.conf")

function Main()
   FillGeoIPString()
end

function DataArrival(curUser,data)
   if (strsub(data,1,1) == "<") then
      local _,_,cmd,arg = strfind(data,"^%b<>%s+(%S+)%s+(%S+)|$")
      if cmd and (cmd == "+getcountry") then
         local who = GetItemByName(arg)
         if who then
            curUser:SendData(GeoIP.bot,CheckSearchResults(who.sIP))
         elseif strfind(arg,"^%d+%.%d+%.%d+%.%d+$") then
            curUser:SendData(GeoIP.bot,CheckSearchResults(arg))
         else
            curUser:SendData(GeoIP.bot,"Syntax: +getcountry /")
         end
         return 1
      end
   end
end

function SaveGeoIPTable()
   local handle = openfile("GeoIP.conf","w")
   write(handle,"GeoIP.strlen = "..GeoIP.strlen.."\n")
   write(handle,"GeoIP.entries = "..GeoIP.entries.."\n")
   closefile(handle)
end

function FillGeoIPString()
   local handle = openfile("GeoIPTable.txt","r")
   if not handle then
      GetLenNum()
      WriteGeoIpTable()
      FillGeoIPString()
   else
      GeoIP.string = read(handle,"*a")
      closefile(handle)
      if (GeoIP.strlen == 0) then
         GetLenNum()
      end
   end
   SaveGeoIPTable()
end

function CheckSearchResults(ip)
   local t1 = clock()
   local ret = SearchGeoIP(ip)
   local msg = "Searched for: \""..ip.."\" Used Time: "..format("%3.2f",(clock()-t1)).." sec\r\n"
   if ret ~= "NOTFOUND" then
      msg = msg.."\tRange: "..DeComputeIP(ret[1]).."-"..DeComputeIP(ret[2])..", Country: "..ret[4]..", Countrycode: "..ret[3]
   else
      msg = msg.."\tNOTFOUND"
   end
   return(msg)
end

function SearchGeoIP(curIP)
   local compIP = ComputeIP(curIP)
   local iStart,iEnd,iMid = 1,GeoIP.entries,0
   while (iStart <= iEnd) do
      iMid = floor((iStart+iEnd)/2)
      local siMid = iMid*GeoIP.strlen
      local table = GetValues(siMid)
      if (table[1] <= compIP) and (table[2] >= compIP) then
         return table
      elseif (table[1] > compIP) then
         iEnd = iMid - 1
      elseif (table[1] < compIP) then
         iStart = iMid + 1
      end
   end
   return("NOTFOUND")
end

function GetValues(s)
   local string = strsub(GeoIP.string,s,s+GeoIP.strlen)
   dostring("strtable = "..string)
   return strtable
end
----------------------------------------------------------------------------------
--//          Create GeoIP Tables
----------------------------------------------------------------------------------
function GetLenNum()
   local handle = openfile("GeoIPSort.txt","r")
   local line = read(handle)
   local count = 0
   local longlenght = 0
   while line do
      count = count + 1
      local _,_,ip1,ip2,cc,c = strfind(line,"^(%d+),(%d+),(%S+),(.*)$")
      local string = "{[1]="..ip1..",[2]="..ip2..",[3]=\""..c.."\",[4]=\""..cc.."\"}"
      local stringlen = strlen(string)
      if stringlen > longlenght then
         longlenght = stringlen
      end
      line = read(handle)
   end
   closefile(handle)
   GeoIP.strlen = longlenght
   GeoIP.entries = count
   collectgarbage()
end
function WriteGeoIpTable()
   local handle = openfile("GeoIPSort.txt","r")
   local handle2 = openfile("GeoIPTable.txt","w")
   local line = read(handle)
   while line do
      local _,_,ip1,ip2,cc,c = strfind(line,"^(%d+),(%d+),(%S+),(.*)$")
      local string = "{[1]="..ip1..",[2]="..ip2..",[3]=\""..c.."\",[4]=\""..cc.."\"}"
      local diff = GeoIP.strlen - strlen(string)
      string = string..strrep(" ",diff)
      write(handle2,string)
      line = read(handle)
   end
   closefile(handle2)
   closefile(handle)
   collectgarbage()
end

----------------------------------------------------------------------------------
--//          Compute IP
----------------------------------------------------------------------------------
function ComputeIP(curIP)
   local _,_,a,b,c,d = strfind(curIP, "^(%d+)%.(%d+)%.(%d+)%.(%d+)$")
   return a*16777216 + b*65536 + c*256 + d
end
----------------------------------------------------------------------------------
--//          DeCompute IP
----------------------------------------------------------------------------------
function DeComputeIP(cIP)
   local temp1 = mod(cIP,16777216)
   local temp2 = mod(temp1,65536)
   return (floor(cIP/16777216).."."..floor(temp1/65536).."."..floor(temp2/256).."."..floor(mod(temp2,256)))
end

gemini

--//
--//  Nabucodonosor Production  developed by [?NetFounder?]-=((Ap?K?lip??))=-
--//  for infos & bugs contact me .nabucodonosorhub@tele2.it
--//
snoopTable = {}
botname = "[Hub Italiano Chat Rooms]"
commandin= "!entra"
commandout= "!esci"
commandlist= "!lista"
commandhelp= "!help"
function Main()
    frmHub:RegBot(botname)
end
function UserDisconnected(curUser)
    snoopTable[curUser.sName] = 0
end

function DataArrival(user, data)
  local check = 0
  local listrequested=0
--  user:SendPM(botname,"-"..data)
  --Enter from PM
  if (strsub(data, 1,strlen(user.sName)+strlen(user.sName)+17+strlen(commandin)+strlen(botname)) ==   "$To: "..botname.." From: "..user.sName.." $<"..user.sName.."> "..commandin) then
    if (snoopTable[user.sName] ~= 0) and (snoopTable[user.sName] ~= nil) then
      SendPmToNick(user.sName, botname, "Sei uscito da "..snoopTable[user.sName]) --Entering new room force exit from older
    end
    snoopTable[user.sName] = strsub(data,strlen(user.sName)+strlen(user.sName)+17+strlen(commandin)+strlen(botname)+2,strlen(data))
    SendPmToNick(user.sName, botname, "Stai entrando nella "..snoopTable[user.sName])
    check = 1
  end
  --Enter from Main
  if (strsub(data, 1,strlen(user.sName)+strlen(commandin)+3) == "<"..user.sName.."> "..commandin ) then
    if (snoopTable[user.sName] ~= 0) and (snoopTable[user.sName] ~= nil) then
      SendPmToNick(user.sName, botname, "Sei uscito da "..snoopTable[user.sName]) --Entering new room force exit from older
    end
    snoopTable[user.sName] = strsub(data,strlen(user.sName)+3+strlen(commandin)+2,strlen(data))
    SendPmToNick(user.sName, botname, "Stai entrando nella "..snoopTable[user.sName])
    check = 1
  end
  --Exit from PM  
  if(strsub(data, 1,strlen(user.sName)+strlen(user.sName)+17+strlen(commandout)+strlen(botname)) ==   "$To: "..botname.." From: "..user.sName.." $<"..user.sName.."> "..commandout) then
    SendPmToNick(user.sName, botname, "Stai uscendo da "..snoopTable[user.sName])
    snoopTable[user.sName] = 0
    check = 1
  end
  --Exit from Main
  if (strsub(data, 1,strlen(user.sName)+strlen(commandout)+3) == "<"..user.sName.."> "..commandout ) then
    SendPmToNick(user.sName, botname, "Stai uscendo da "..snoopTable[user.sName])
    snoopTable[user.sName] = 0
    check = 1
  end
  --List from PM
  if(strsub(data, 1,strlen(user.sName)+strlen(user.sName)+17+strlen(commandlist)+strlen(botname)) ==   "$To: "..botname.." From: "..user.sName.." $<"..user.sName.."> "..commandlist) then
    for name,b in snoopTable do
      if (b ~= 0) then
        user:SendPM(botname,name.." in "..b)
      end
    end
    listrequested=1
    check = 0
  end
  --List from Main
  if (strsub(data, 1,strlen(user.sName)+strlen(commandlist)+3) == "<"..user.sName.."> "..commandlist ) then
    --SendPmToNick(user.sName, botname, (strsub(data, 1,strlen(user.sName)+strlen(commandlist)+3) == "<"..user.sName.."> "..commandlist ))
    for name,b in snoopTable do
      if (b ~= 0) then
        user:SendPM(botname,name.." in "..b)
      end
    end
    listrequested=1
    check = 0
  end
 
 
  if (strsub(data, 1,strlen(user.sName)+strlen(user.sName)+17+strlen(commandhelp)+strlen(botname)) ==   "$To: "..botname.." From: "..user.sName.." $<"..user.sName.."> "..commandhelp) then
    SendPmToNick(user.sName, botname, "Chat Rooms... servizio di stanze by Nabucodonosor")
    SendPmToNick(user.sName, botname, "(puoi entrare in una stanza sola per volta..)")
    SendPmToNick(user.sName, botname, "!entra - Entra in una stanza, se non c'? una stanza con questo nome creala.")
    SendPmToNick(user.sName, botname, "!esci - Esce dalla stanza dove sei.")
    SendPmToNick(user.sName, botname, "!lista - Visualizza la lista degli utenti e le stanze dove si trovano.")
    SendPmToNick(user.sName, botname, "!help - Visualizza questo help.")
    check = 1
  end
 
  --if(check == 0 and strsub(data, 1,strlen(user.sName)+strlen(user.sName)+17+strlen(botname)) ==   "$To: "..botname.." From: "..user.sName.." $<"..user.sName.."> ") then
  if listrequested==1 then
    if (snoopTable[user.sName] == 0) or (snoopTable[user.sName] == nil) then
      SendPmToNick(user.sName, botname, "Non sei in nessuna stanza...")  
    else
      for name,b in snoopTable do
        if ( b == snoopTable[user.sName] and not(user.sName == name)) then
          SendPmToNick(name, botname, "<"..user.sName.."> "..strsub(data, strlen(user.sName)+strlen(user.sName)+17+strlen(botname)+1, strlen(data)))
        end
      end
    end
  end  
end

gemini

---------------------------------------------------------------------------
-- Conta utenti online by plop v:1.2 Release by [Master]-=((Ap?K?lip??))=- v: 1.3 ita  
-- basato su un bot di annuncio il quale mostra le info dell'Hub di base agli utenti in entrata
-- Fixed profile Ntfounder , Moderator.
-- Translation italian  
-----------------------------------------------------------------------------  
-- LEVELSTOT[number] = numero totale di utenti con quel livello  
-- LEVELS[number] = numero online e totale di utenti con quel livello  
-- i comandi = tavola usata dagli utenti dell'Hub per add/cancellare utenti  
-- aggiungi lo script di comando se stai usando uno script per add/cancellare utenti  
-- Lo stesso pu? essere fatto se tu hai pi? livelli di utenti di default  
-----------------------------------------------------------------------------  
-- Credo di aver detto tutto, ma sembra che abbia dimenticato di aggiungere due sedie. snif snif  
-----------------------------------------------------------------------------
-- Manuale Stuff
-----------------------------------------------------------------------------
-- LEVELSTOT["0"] -- totale Master
-- LEVELSTOT["1"] -- totale Operator
-- LEVELSTOT["2"] -- totale Vip
-- LEVELSTOT["3"] -- totale Reg
-- LEVELSTOT["4"] -- totale Moderator
-- LEVELSTOT["5"] -- totale Netfounder
-- tmp -- totale Master,Moderator,Operator
-- frmHub:GetUsersCount() -- totale utenti online
----------
-- LEVELS["0"] -- totale online Master
-- LEVELS["1"] -- totale online Operator
-- LEVELS["2"] -- totale online Vip
-- LEVELS["3"] -- totale online Reg
-- LEVELS["4"] -- totale online Moderator
-- LEVELS["5"] -- totale online Netfounder
-- LEVELS["-1"] -- totale online utenti
-- tmp4 -- totale Master e Moderatori e Operatori online
----------
-- utenti offline
-- tmp1 -- totale VIPs offline
-- tmp2 -- totale utenti registrati offline
-- tmp3 -- totale NetFuonder offline
-- tmp5 -- totale Operator offline
-----------------------------------------------------------------------------


-- nome del bot
Bot = "[Hub Italiano Operserv]"

-- couter tables, if you have more levels add there numbers in BOTH tables,
-- except unreg users, those only work in the lower table
LEVELSTOT = {["0"]=0, ["1"]=0, ["2"]=0, ["3"]=0,  ["4"]=0,  ["5"]=0}
LEVELS = {["0"]=0, ["1"]=0, ["2"]=0, ["3"]=0,  ["4"]=0,  ["5"]=0,  ["-1"]=0}

-- table holding the commands ptokax uses 2 add/delete users
-- add your bot s commands 2 this table if you use a bot 2 add/delete ppl
commands = {["!addreguser"]=1, ["!delreguser"]=1}

function Message(user)
   local s,e,share = strfind(user.sMyInfoString, "$(%d+)%$")
   if share ~= nil then
      share = format("%0.2f", ( share / (1024*1024*1024)))
   else
      share = 0
   end
   local hubshare = format("%0.2f",  ( frmHub:GetCurrentShareAmount() / (1024*1024*1024)))
   local tmp =  LEVELSTOT["0"] + LEVELSTOT["1"] + LEVELSTOT["4"]  --- total ops  (adding Master, Moderator,Operator)
   local tmp1 = (LEVELSTOT["2"] - LEVELS["2"]) if tmp1 < 0 then tmp1 = 0 end --- offline vips
   local tmp2 = (LEVELSTOT["3"] - LEVELS["3"]) if tmp2 < 0 then tmp2 = 0 end --- offline regs
   local tmp3 = (LEVELSTOT["5"] - LEVELS["5"]) if tmp3 < 0 then tmp3 = 0 end --- offline Netfounder
   local tmp4 = (LEVELS["0"] + LEVELS["1"] + LEVELS["4"])  -- online Master, Moderators and Operator
   local tmp5 = (tmp - tmp4) if tmp5 < 0 then tmp5 = 0 end   --- offline Master, Moderator and Operator
   user:SendData(Bot, "-=[?]=-------------------------------------------------------------------------------------------------------------------------------------------------------------=[?]=-")
   user:SendData(Bot, "                                                                           <-----=[- "..frmHub:GetHubName().." ? "..GetDate().." -]=----->")
   user:SendData(Bot, "-=[?]=-------------------------------------------------------------------------------------------------------------------------------------------------------------=[?]=-")
   user:SendData(Bot, "          ? Comunit? Italiana di ?irect C?nnect - P2P ?")
   user:SendData(Bot, "          ? "..user.sName..", benvenuto nel nostro Server.")
   user:SendData(Bot, "          ? Stai uscendo con questo IP : "..user.sIP)
   user:SendData(Bot, "          ? Il tuo stato nell'Hub e' : "..(GetProfileName(user.iProfile) or "Non registrato"))
   user:SendData(Bot, "          ? Stai condividendo : " ..share.." GB.")
   user:SendData(Bot, "          ? Utenti online nell'Hub : "..frmHub:GetUsersCount()..".")
   user:SendData(Bot, "          ? Totale Netfounder Registrati : "..LEVELSTOT["5"]..".")
   user:SendData(Bot, "          ? NetFounder online nell'Hub : "..LEVELS["5"]..".")
   user:SendData(Bot, "          ? NetFounder offline : "..tmp3..".")
   user:SendData(Bot, "          ? Totale Operatori Registrati : "..tmp..".")
   user:SendData(Bot, "          ? Operatori online nell'Hub : "..tmp4..". Master: "..LEVELS["0"]..". Moderator: "..LEVELS["4"]..". Operator: "..LEVELS["1"]..".")
   user:SendData(Bot, "          ? Operatori offline : "..tmp5..".")
   user:SendData(Bot, "          ? Totale Vip registrati : "..LEVELSTOT["2"]..".")
   user:SendData(Bot, "          ? Vip online nell'Hub : "..LEVELS["2"]..".")
   user:SendData(Bot, "          ? Totale Reg registrati : "..LEVELSTOT["3"]..".")
   user:SendData(Bot, "          ? Reg online nell'Hub : "..LEVELS["3"]..".")
   user:SendData(Bot, "          ? Reg offline : "..tmp2..".")
   user:SendData(Bot, "          ? Totale Utenti Registrati online : "..LEVELS["-1"]..".")
   user:SendData(Bot, "          ? Share totale dell'Hub : "..hubshare.." GB.")
   user:SendData(Bot, "          ? Per visualizzare la lista dei comandi digita : !help (per gli utenti registrati)")
   user:SendData(Bot, "          ? Per visualizzare la lista dei comandi digita : !userhelp (per utenti non registrati)")    
   user:SendData(Bot, "-=[?]=-------------------------------------------------------------------------------------------------------------------------------------------------------------=[?]=-")
   user:SendData(Bot, "                                                                           <-----=[- "..frmHub:GetHubName().." ? "..GetDate().." -]=----->")
   user:SendData(Bot, "-=[?]=-------------------------------------------------------------------------------------------------------------------------------------------------------------=[?]=-")
end

-------------------------------------------------------------------------------------------------------------------------------------------------

function GetDate()
    d = date("%d")
    mm = date("%m")
    y = date("%y")
    Date = ""..d.."/"..mm.."/"..y
    return Date
end
-------------------------------------------------------------------------------------------------------------------------------------------------
ALLUSERS={}

function NewUserConnected(user)
   if ALLUSERS[user.sName]==nil then
      ALLUSERS[user.sName]=1
      LEVELS[tostring(user.iProfile)]=LEVELS[tostring(user.iProfile)]+1
   end
   Message(user)
end

function OpConnected(user)
   if ALLUSERS[user.sName]==nil then
      ALLUSERS[user.sName]=1
      LEVELS[tostring(user.iProfile)]=LEVELS[tostring(user.iProfile)]+1
   end
   Message(user)
end

function DataArrival(user, data)
   if ALLUSERS[user.sName]==nil then
      ALLUSERS[user.sName]=1
      LEVELS[tostring(user.iProfile)]=LEVELS[tostring(user.iProfile)]+1
   end
   s,e,cmd= strfind(data, "%b<>%s+(%S+)")
   if cmd ~= nil and commands[cmd] then
      SetTimer(5 * 1000)
      StartTimer()
   end
end

function OnTimer()
   StopTimer()
   OpenRegisterdUsersFile()
end

function UserDisconnected(user)
   if ALLUSERS[user.sName] then
      ALLUSERS[user.sName]=nil
      if LEVELS[tostring(user.iProfile)] > 0 then
         LEVELS[tostring(user.iProfile)]=LEVELS[tostring(user.iProfile)]-1
      end
   end
end

function OpDisconnected(user)
   if ALLUSERS[user.sName] then
      ALLUSERS[user.sName]=nil
      if LEVELS[tostring(user.iProfile)] > 0 then
         LEVELS[tostring(user.iProfile)]=LEVELS[tostring(user.iProfile)]-1
      end
   end
end

function Main()
   frmHub:RegBot(Bot)
   OpenRegisterdUsersFile()
end

function OpenRegisterdUsersFile()
   readfrom("../RegisteredUsers.dat")
   for a,b in LEVELSTOT do
      LEVELSTOT[a]=0
   end
   while 1 do
      local line = read()
      local level
      if line == nil then
         readfrom()
         break
      end
      s,e,level = strfind(line,".+|.+|(.+)")
      if LEVELSTOT[level] then
         LEVELSTOT[level] = LEVELSTOT[level] +1
      end
   end  
end

gemini

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---- Faker Chaser ?2004 MASH - Double MM Connection
----  for - Nabucodonosor network
----  Ver 0.2b
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- 0.2b : improved graphics (main chat)
-- 0.2a : moved exclusion list to file and added commands to handle it
-- 0.1g : improved graphics - thx to Apokalipse
-- 0.1f : bugfix for IPLogfilename
-- 0.1e : fixed messages by !scanfakers
-- 0.1d : GetLoggedUserList : changed IPLog user recognition
-- 0.1c : Robocop8 -> IP log is generated dynamically
--         moved exclusion list out from scripts dir.
--         formatted commands
-- 0.1b : Added exclusion list
------------------------------------------------------------------------------------
---- Sends a fake share warning to user / Op(s)
------------------------------------------------------------------------------------
--debugOP=GetItemByName("~*?????h????*~") --Op used for debuggin'
--debugOP=GetItemByName("~*?????h????*~") --Op used for debuggin'
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--Config Section
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
sBot = "=Faker Chaser="
-- Change here your language here
sRuleBar         = "-=[x]=>:-]---------------------------------------------------------------------------------------->:-]=[x]=-"
sBotHeader       = "\n"..sRuleBar.."\n                                           "..sBot.."\n                                    "..date("%d %b %Y ore %H:%M:%S") .."\n"
sBannerMessage   = sBotHeader.."                                         Scansione avviata \n                       Tremate Fakers Vi Sto Dando La Caccia ...\n"..sRuleBar.."\n"
sGlobalMsgHeader = "\n>:-] ? Scansione Automatica Avviata Rilevati i Seguenti () utenti Faker ? >:-]"
sUserMsg         = sBotHeader.."Sei stato scannerizzato hai un fake share di . \nSei pregato di correggerlo e rientrare grazie !"
sManualScanMsg   = sBotHeader.."                                       ? Rilevati Fakers ?"
--sAutoScanMsg     = "\n>:-] ? Scansione Automatica Avviata Rilevati i Seguenti () utenti Faker ? >:-]\n"
sReservedCMD     = "Non hai abbastanza diritti per  usare il comando "
sLoggedUsers     = "\n-=[x]=>:-]------------------------------------? Lista degli utenti loggati ?------------------------------------>:-]=[x]=-\n"
sScanTiming      = sBotHeader.."     Impostato

gemini

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Bad share numbers Section
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
dofile("FakerChaser/FakerChaser-BadShares.lua")
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Script Section
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

function Main()
   frmHub:RegBot(sBot)
   loadExclusionList()
   SendToAll(sBot, sBannerMessage)
   chaseAllFakers()  --Is 1st already on timer ?
   if TimeMins>0 then
     SetTimer(TimeMins*60000)
     StartTimer()
  else
    StopTimer()
  end
end

function NewUserConnected(curUser)
  chaseFaker(curUser)
end

function UserDisconnected(curUser)
  collectgarbage()
  flush()
end

OpDisconnected = UserDisconnected
OpConnected = NewUserConnected

function OnTimer()
  chaseAllFakers()
  collectgarbage()
  flush()
end

function DataArrival(curUser,data)
  if strsub(data, 1, 1) == "<" then
    data=strsub(data,1,strlen(data)-1)
    local s,e,cmdr = strfind(data,"%b<>%s+(%S+)")
    _,_,arg = strfind(data,"%b<>%s+%S+%s+(%S+)")
-------------------------------------------------------------------------------------------------------------
    if (cmdr == cmd[1].cmd) then
      SendUserListToOP(curUser)
-------------------------------------------------------------------------------------------------------------
    elseif (cmdr == cmd[2].cmd) then
      local fcount,cAFMsg =chaseAllFakers()
      curUser:SendPM(sBot,replace(sManualScanMsg,"",fcount)..'\n'..sRuleBar..'\n'..cAFMsg)
      --curUser:SendPM(sBot,cAFMsg)
      --curUser:SendPM(sBot,sBotHeader)
-------------------------------------------------------------------------------------------------------------
    elseif (cmdr == cmd[3].cmd) then
      if arg~=nil and tonumber(arg)>=0 then
        TimeMins=arg
      end
      curUser:SendPM(sBot,replace(sScanTiming,"

gemini

--
-- USER UPTIME SCRIPT v1.00
-- By Pur      Januari 2004
--
-- Special Thanks too Phatty and Guibs for refreshing me with some lua table help :)
--
--
--   Commands
--   
--   !mystats         - mostra la tua statistica
--   !show       - mostra la statistica di un user
--   !top10alltime         - top 10 alltime utenti online
--   !top50alltime         - top 50 alltime utenti online
--   !top100alltime         - top 100 alltime utenti online
--   !top10now         - top 10 degli utenti online attuale
--   !top50now         - top 50 degli utenti online attuale
--   !top100now         - top 100 degli utenti online attuale
--   !help            - mostra i comandi
--
--
-- The Translators:
--
-- Trucker: german
-- xfiles: german, Portuguese
-- Pur: English, Nederlands
-- Angelsanges: italian
-- xjrl3sp: French
-- Gnuff: Danish
-- Phatty: espanol, English, (Latvian <== Note: I heard from piglja that it is a horrible translation.)
-- Nightlitch: Swedish
-- Kepp: Swedish
-- Tarokkk: Hungaryan
--
--
--
--   Plz feel free too give feedback
--   Mail:                    nabucodonosorhub@tele2.it
--   ICQ:               
--


function Main()
   dofile("italian.lan")         -- Change here your language file
   
   dofile("cmd.dat")         -- contains the commands edit this file too
                  -- change them
   
   dofile("hubs.dat")         -- Alltime hub uptime      
   dofile("table.dat")         -- Contains the uptime of every user

   msecs = 1000            -- Some time variables
   secs = 1*msecs
   min = secs * 60
   quarter = min * 15

   Bot = "[Hub Italiano Stats]"      -- Botname can be changed here   
   frmHub:RegBot(Bot)         -- Bot registreren bij hub

   tablenow={}            -- Table containing the uptime of all users
                  -- since last login

   hubs["now"] = 1            -- Set hub uptime too 1
      
   SetTimer(quarter)         -- Sets the timer (setting on quarter)
                  -- not wise the change timer settings
   StartTimer()            -- Starts the timer
end

function NewUserConnected(curUser)
   if table[curUser.sName] == nil then
      table[curUser.sName] = 1   
   end
   if tablenow[curUser.sName] == nil then
      tablenow[curUser.sName] = 1
   end
end

function UserDisconnected(curUser)
   tablenow[curUser.sName] = nil
   collectgarbage()
   flush()
end

OpDisconnected = UserDisconnected
OpConnected = NewUserConnected

function OnTimer()

   hubs["uptime"] = hubs["uptime"]+1
   hubs["now"] = hubs["now"]+1
   WriteFile(hubs,"hubs","hubs.dat")

   if tablenow == nil then
   else
      for i,v in tablenow do
         tablenow = tablenow + 1
      end
   end

   for i,v in table do
      ret = inhub(table)
      if (ret == true) then
         table = table + 1
      end
   end
   WriteFile(table,"table","table.dat")
end

function DataArrival(curUser,data)
   if strsub(data, 1, 1) == "<" then
      data=strsub(data,1,strlen(data)-1)
      local s,e,cmdr = strfind(data,"%b<>%s+(%S+)")
      _,_,arg = strfind(data,"%b<>%s+%S+%s+(%S+)")
      
      if (cmdr == cmd[1]) then
         curUser:SendPM(Bot,showstats(curUser.sName,1))
      elseif (cmdr == cmd[2]) then
         curUser:SendPM(Bot,showtable(tablenow,10,"\r\n"..lan[13].."\t\t\t Hub uptime: "..rs(hubs["now"]-1),"now"))
      elseif (cmdr == cmd[3]) then
         curUser:SendPM(Bot,showstats(arg,0))
      elseif (cmdr == cmd[4]) then      
         curUser:SendPM(Bot,showtable(table,10,"\r\n"..lan[12].."\t\t\t Alltime hub uptime: "..rs(hubs["uptime"]-1),"uptime"))
      elseif (cmdr == cmd[5]) then
         curUser:SendPM(Bot,showtable(table,50,"\r\n"..lan[12].."\t\t\t Alltime hub uptime: "..rs(hubs["uptime"]-1),"uptime"))
      elseif (cmdr == cmd[6]) then
         curUser:SendPM(Bot,showtable(table,100,"\r\n"..lan[12].."\t\t\t Alltime hub uptime: "..rs(hubs["uptime"]-1),"uptime"))
      elseif (cmdr == cmd[7]) then
         curUser:SendPM(Bot,showtable(tablenow,50,"\r\n"..lan[13].."\t\t\t Hub uptime: "..rs(hubs["now"]-1),"now"))
      elseif (cmdr == cmd[8]) then
         curUser:SendPM(Bot,showtable(tablenow,100,"\r\n"..lan[13].."\t\t\t Hub uptime: "..rs(hubs["now"]-1),"now"))
      elseif (cmdr == cmd[9]) then
         output = "\r\n Commands \r\n"
         for i,v in cmd do
            output = output.."\t\t"..cmd.."\r\n"
         end
         curUser:SendPM("Help",output)
      end
   
   end     
end
function procent(num,field)
   if (hubs[field]) then
      oneprocent=(hubs[field]-1) / 100      
      ret = num / oneprocent
      ret= format("%0.2f",ret)      
   end
   return ret
end


function inhub(user)
   if tablenow[user] and tablenow[user] ~= 1 then
      ret = true
   else
      ret = false
   end
   return ret
end

function rs(num)
   out = ""

   years = mod(num,34944)
   years = (num - years)/34944
   if ( years > 0 ) then
      out = out..years..lan[1]
      num = num - (years * 34944)
   end

   weeks = mod(num,672)
   weeks = (num - weeks)/672
   if ( weeks > 0 ) then
      out = out..weeks..lan[2]
      num = num - (weeks * 672)
   end

   days = mod(num,96)
   days = (num - days) / 96
   if ( days > 0 ) then
      out = out..days..lan[3]
      num = num - (days * 96)
   end

   hours = mod(num, 4)
   hours = (num - hours) /4
   if ( hours > 0) then
      out = out..hours..lan[4]
      num = num - ( hours * 4)
   end

   if (num > 0) then
      quarters = num
      out = out..(quarters*15)..lan[5]
   end
   

   return ""..out
end


-- Screens


headerT = " _____________________________________________________________________________".."\r\n"
headerT = headerT.."                                ".."\r\n"

footerT = " _____________________________________________________________________________".."\r\n"

function showtable(showtable,tonum,title,field)
   output = "\r\n"..title.."\r\n"
   output = output..headerT

   local Index = sorting(showtable)
   for i = 1, Index.n do
      local key = Index
      if showtable[key] ~= 0 then
         output = output.."\t".."<"..i..".>".."\t"..key.."\r\n"                  
         output = output.."\t\t\t\t\t"..procent(showtable[key]-1,field).."%\t"..rs(showtable[key]-1).."\r\n"            
      end
      if (i >= tonum) then
         break
      end
   end

   output = output..footerT
   return output
end

function showstats(user)
      
   output = "\r\n".."\r\n"..lan[6].."\r\n"
   output = output..headerT      
         
   output = output.."\t"..lan[7]..user.."\r\n"  
         
   
   if (table[user] == nil) then   
      output = output.."\t"..lan[8]..lan[10].."\r\n"
   elseif (table[user]==1) then      
      output = output.."\t"..lan[8]..lan[11].."\r\n"
   else         
      output = output.."\t"..lan[8]..rs(table[user]-1).."\r\n"
   end

   if (tablenow[user] == nil) then   
      output = output.."\t"..lan[9]..lan[10].."\r\n"
   elseif (tablenow[user]==1) then      
      output = output.."\t"..lan[9]..lan[11].."\r\n"   
   else         
      output = output.."\t"..lan[9]..rs(tablenow[user]-1).."\r\n"
   end
      
   output = output..footerT
   return output
end

-- Table functions

function sorting(table)
   local index = {n=0}
   foreach(table, function(key, value) tinsert(%index, key) end)
   local func = function(a, b) return %table[a] > %table end
   sort(index, func) return index
end

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

function WriteFile(table,tablename,file)
   local handle = openfile(file,"w")
   Serialize(table,tablename,handle)
     closefile(handle)
end

gemini

----------------------------------------------------------------------
--                 deflood version 4.x
----------------------------------------------------------------------
-- pre V4.x things
-----
-- only filter chat for unreged users.
-- bounch the flood msg back to the sender.
-- now kicks after x times (user is warned).
-- added phatty's ban on description.
-- added chilla's script against the myInfo flooder.
-- added share check thx psf8500.
-- added choise on were to show the msg's to the ops (own window or opchat).
-- added test by removing numbers from the msg, so chat flooders can't count in there msg.
-- added detection for user flooders which show a number behind the tag.
-- added filter for me mode.
-- added filter so away msg don't get seen as flooding.
----------------------------------------------------------------------
-- V4+
-----
-- added filter for crimson.
-- added filter for omega.
-- added filter for midnight.
-- changed logs now also store the ip's of the banned users.
-- thx to ruri_ruri for helping on this new version of deflood,
----------------------------------------------------------------------
-- V4.1
-----
-- fixed strfind error.
----------------------------------------------------------------------
-- V4.2
-----
-- added direct kick/ban for the pm/chat flooders.
-- small optimization on the description table.
----------------------------------------------------------------------
-- V4.3
-----
-- added protection against GetNickList floods (thx to psf8500).
-- added protection against fake MyInfo's with random chars (thx to psf8500).
-- added protection against fake IP's on ConnectToMe (thx to psf8500).
-- changed removed the need for 2 versions of deflood, mode can be set from the script now.
-- changed made it optional to set what to do with flooders (no need 2 mod the script anymore).
----------------------------------------------------------------------
-- V4.3.1
-----
-- changed the amount of times a user can do $GetNickList can be set from the config.
-- added table with imune IP's on the fake $ConnectToMe's (some hubowners need this).
----------------------------------------------------------------------
-- V4.3.2
-----
-- changed the $ConnectToMe has now only the option to do a timeban of x minutes.
-- instead of showing "you banned" it gives the correct IP and links to some site's
-- with info about how to setup active mode while being behind a router.
----------------------------------------------------------------------
-- V4.3.3
-----
-- changed the $ConnectToMe check now disconnects private ip ranges, and tells them the right IP to use
-- changed reason msg send to the kicked/banned users matched the kick/ban type.
----------------------------------------------------------------------
-- V4.3.4
-----
-- fixed bug on not kicking/banning (thx reefa)
-- fixed bug on level checking (thx reefa)
----------------------------------------------------------------------
-- V4.3.5
-----
-- quick fix for the !me flooder from TE.
----------------------------------------------------------------------
-- V4.3.6
-----
-- added filter for the scrolling statusbar flooder (thx uffetjur/plop/sUiCiDeMAniC).
----------------------------------------------------------------------
-- V4.4
-----
-- added filter for the OpZone hub flooder.
-- this way filters all flooders which use a new connection for every chat/pm msg.
----------------------------------------------------------------------
-- V4.4.1
-----
-- fixed conflict on double used table (tIPs changed to tUIPs on the hammer check).
----------------------------------------------------------------------
-- V4.4.2
-----
-- removed the cleaning of the table in UserDisconnected on the hammer.
----------------------------------------------------------------------
-- V4.4.3
-----
-- added bad share table.
----------------------------------------------------------------------
-- V4.5
-----
-- added filter for the search flooder. (thx uffetjur)
-- changed chatcheck so it's open to accept tables from all kinds of checks (future work).
-- added "anime & music" to the description table.
-- added the 666GB share to the badshare table.
-- done some cleaning.
-- added comments all over the script.
-- found a cleaning lady willing to work for free for you ppl.
----------------------------------------------------------------------
-- V4.5.1
-----
-- changed iMaxCon from 10 to 5, so the yhub flooder in ruri's OMEGA flooder is also filtered.
----------------------------------------------------------------------
-- v4.5.1 ita
-- released by =[NetFounder]=-=((Ap?K?lip??))=-
-- traduzione messaggi in italiano
-- implementata la funzione anti cloni
-- fixed messaggio di hammer filter da main a solo per op in pvt
----------------------------------------------------------------------
-- V4.5.2
-----
-- fixed error on incorrect IP's (forgotten numbers).
----------------------------------------------------------------------
-- paybacks a biotch!!
-- enjoy. plop
-- http://www.plop.nl
----------------------------------------------------------------------
---- the script only kicks by default altho the message says banned.
---- change this if you want it 2 really ban.
---- check my website reguarly, there are more updates then you think.
----------------------------------------------------------------------

----------------------------------------------------------------------
--                 Config part.
----------------------------------------------------------------------
-- name of the bot.
Bot = "=Deflood="

-- maximum msg's stored from the user.
iMaxStored = 6

-- maximum amount of warnings before it bans for chat flooding.
iMaxWarn = 3

-- location/name of the log file.
fFile = "logs/flood.log"

-- filter levels. use 1 for everything but OP's, nil for the table with level numbers.
iMode = 1
tMode = { [-1] = 1 }

gemini

------- do what to flooders.
-- use nil for disconnect, 1 for a kick, 2 for a ban, 3 for a tempban, 4 for a timeban.
iKill = nil
-- if timeban then how many minutes.
iTimeBan = 15
-- time the tempban on bad IP's in the dc active setup should last
-- (don't make it 2 long, mostly this check hits on bad settings but it could be a flooder
-- but keep it above 5 so the automatic reconnect from dc++ doesn't make it flood your opchat/logs).
iConnect = 8

-- maximum amount of times an ip can connect per xx seconds (table flush timer).
iMaxCon = 5

-- the table for banning by description (["search string"] = number).
tDesc = {
   ["Ruri_Ruri"]=1,
   ["R u r i_ R u r i "]=2,
   ["TEAMELITE"]=3,
   ["F8X0R"]=4,
   ["KNUCKLES"]=5,
   ["OPZONE"]=6,
   ["K-N-U-C-K-L-E-S"]=7,
   ["Meka_Meka"]=8,
   ["O-M-E-G-A"]=9,
   ["OMEGA"]=10,
   ["HaX0R"]=11,
   ["HaXOR"]=12,
   ["Anime&Music"]=13
}

-- name of the opchat so the output of this script shows up there instead of it's own window.
-- comment this for own window (aka place -- before it like this text has).
opchat = ""  -- fill in the name here if you use a scripted opchat.
--opchat = frmHub:GetOpChatName()     -- uncomment this and make the above a comment if you use the ptokax build-in opchat.

-- filter away msg's (use nil to disable, 1 to enable).
AWAY = 1

-- don't check the next IP's on fake $ConnectToMe's.
-- (for hub owners who are behind a NAT router)
tIPs = {
   ["127.0.0.1"] = 1,
   ["127.0.0.2"] = 1
}

-- known bad shares from flooders.
tBadShare = {
   [166430355311] = 1,
   [715112427375] = 2
}

-- max amount of times someone can do $GetNickList before deflood treads it as a flooder.
iMaxGetNick = 5

-- max amount of the searches a user can do (flush interval is halved here).
iMaxSrch = 4

-- explain the script what seconds, minutes, hours and day's are.
iSec = 1000
iMin = 60 * iSec
iHour = 60 * iMin
iDay = 24 * iHour

-- time between table flushes.
-- 10 * sec == 10 sec memory
-- 2 * hour == 2 hour memory
iFlushTime = 10 * iSec

----------------------------------------------------------------------
--                 main script starts here
----------------------------------------------------------------------

----------------------------------------------------------------------
-- don't even think about changing the next table (private ip ranges in decimal format).
tPriv = {
   [3232235520] = 3232301055,
   [2886729728] = 2887778303,
   [167772160] = 184549375
}
----------------------------------------------------------------------

----------------------------------------------------------------------
-- the tables needed.
tMsg= {}
tSearch = {}
tShare = {}
tNames = {}
tMyInfo = {}
tGetNick = {}
tUIPs = {}
----------------------------------------------------------------------

----------------------------------------------------------------------
-- starting up the script.
function Main()
   -- setting script mode.
   frmHub:EnableFullData(1)
   -- regging the bot.
   frmHub:RegBot(Bot)
   -- setting the timer.
   SetTimer(iFlushTime)
   StartTimer()
   -- pre-processing the description table.
   tDesc2 = {}
   for i,v in tDesc do
      local a = gsub(gsub(gsub(i, "-",""), " ", ""), " ","")
      a = strlower(a)
      tDesc2[a]=1
   end
   tDesc = nil
end
----------------------------------------------------------------------

----------------------------------------------------------------------
-- the flush timer.
function OnTimer()
   -- flushing the tables.
   tMsg= nil
   tShare = nil
   tNames = nil
   tMyInfo = nil
   tGetNick = nil
   tUIPs = nil
   -- the flush with halved interval
   if (iSC or 0) > 1 then
   tSearch = nil
   -- call the cleaning lady
   Clear()
   tSearch = {}
   else
   iSC = (iSC or 0) + 1
   -- call the cleaning lady
   Clear()
   end
   -- building the empty tables
   tMsg= {}
   tShare = {}
   tNames = {}
   tMyInfo = {}
   tGetNick = {}
   tUIPs = {}
end
----------------------------------------------------------------------

----------------------------------------------------------------------
-- the kick/ban stuff.
function ByeBye(user)
   if iKill == 1 then
      user:SendPM(Bot,  "Sei stato kickato per il sospetto uso di un hub flooder!!|")
      user:Kick()
   elseif iKill == 2 then
      user:SendPM(Bot,  "Sei stato bannato per il sospetto uso di un hub flooder!!|")
      user:Ban()
   elseif iKill == 3 then
      user:SendPM(Bot,  "Sei stato temporaneamente bannato per il sospetto uso di un hub flooder!!|")
      user:TempBan()
   elseif iKill == 4 then
      user:SendPM(Bot,  "Sei stato bannato per "..iTimeBan.." minuti per il sospetto uso di un hub flooder!!|")
      user:TimeBan(iTimeBan)
   else
      user:SendPM(Bot,  "Sei stato disconnesso per il sospetto uso di un hub flooder!!|")
      user:Disconnect()
   end
   return 1
end
----------------------------------------------------------------------

----------------------------------------------------------------------
-- level check.
function CheckLevel(user)
   if iMode then
      return user.bOperator
   else
      return not tMode[user.iProfile]
   end
end
----------------------------------------------------------------------

----------------------------------------------------------------------
-- share check.
function CheckShare(user)
   if user.sMyInfoString then
      local i,j,temp = strfind(user.sMyInfoString, "$(%d+)%$")
      if tBadShare[temp] then
         return 1
      end
   end
end
----------------------------------------------------------------------

----------------------------------------------------------------------
-- the cleaning lady.
function Clear()
   collectgarbage()
   flush()
end
----------------------------------------------------------------------

----------------------------------------------------------------------
-- main filters.
function DataArrival(user, data)
   -- bad share.
   if CheckShare(user) then
      msg = user.sName.." - "..user.sIP.." - "..date().." - bannato per l'uso di un hub flooder!! (badshare table)"
      StoreLog(user.sName, msg)
      return ByeBye(user)
   end

   -- me/hard flood msg filter.
   if strfind(data, "?AM?LiT? OWN?D YOU") then
      msg = user.sName.." - "..user.sIP.." - "..date().." - bannato per l'uso di un hub flooder!! (!me flooder)"
      StoreLog(user.sName, msg)
      return ByeBye(user)

   -- mainchat msg.
   elseif( strsub(data, 1, 1) == "<" ) then
      if not CheckLevel(user) then
         data = strsub(data, 1, (strlen(data)-1))
         s,e,nick, data = strfind(data, "^(%b<>)(.+)")
         nick = GetItemByName(strsub(nick, 2, -2))
         if nick == nil then
            msg = user.sName.." - "..user.sIP.." - "..date().." - bannato per l'uso di un hub flooder!! (fake nick version)"
            StoreLog(user.sName, msg)
            return ByeBye(user)
         elseif ChatCheck(user, data,tMsg) then
            return 1
         end
      end

   -- me filter msg.
   elseif( strsub(data, 1, 1) == "*" ) then
      if not CheckLevel(user) then
         data = strsub(data, 1, (strlen(data)-1))
         s,e,data = strfind(data, "^%*%s*(.+)")
         if ChatCheck(user, data, tMsg) then
            return 1
         end
      end

   -- pm filter msg.
   elseif(strsub(data, 1, 4) == "$To:") then
      if not CheckLevel(user) then
         data = strsub(data, 1, (strlen(data)-1))
         s,e,data = strfind(data, "$%b<>(.+)")
         local t,c = gsub(data, "xXxX", "")
         if c >1 then
            msg = user.sName.." - "..user.sIP.." - "..date().." - sei stato bannato per l'uso di un client flooder!!"
            StoreLog(user.sName, msg)
            return ByeBye(user)
         elseif ChatCheck(user, data, tMsg) then
            return 1
         end
      end

   -- search filter.
   elseif strsub(data, 1, 7) == "$Search" then
   if tSearch[user.sName] then
      tSearch[user.sName] = tSearch[user.sName] + 1
      if tSearch[user.sName] > iMaxSrch then
      msg = user.sName.." - "..user.sIP.." - "..date().." - bannato perche' stai usando una ricerca flooder!!"
      StoreLog(user.sName, msg)
      return ByeBye(user)
      end
   else
      tSearch[user.sName] = 1
   end

   -- GetNickList filter.
   elseif strsub(data, 1, 12) == "$GetNickList" then
      if tGetNick[user.sName] == nil then
         tGetNick[user.sName] = 1
      else
         tGetNick[user.sName] = tGetNick[user.sName] +1
         if tGetNick[user.sName] >= iMaxGetNick then
            tGetNick[user.sName] = nil
            msg = user.sName.." - "..user.sIP.." - "..date().." - sei stato bannato per l'uso di un hub flooder!! (GetNickList flood)"
            StoreLog(user.sName, msg)
            return ByeBye(user)
         end
      end

gemini

-- ConnectToMe filter.
--  elseif strsub(data, 1, 12) == "$ConnectToMe" then
--     local s,e,ip = strfind(data, "(%S+):%d+|$")
--    if ip and tIPs[user.sIP] == nil then
--        if ip ~= user.sIP then
--           local s,e,dIP1,dIP2,dIP3,dIP4 = strfind(ip, "(%d+)%.(%d+)%.(%d+)%.(%d+)")
--           dIP1 = (tonumber(dIP1) * 16777216) + (tonumber(dIP2) *65536) + (tonumber(dIP3) * 256) + (tonumber(dIP4))
--           for a,b in tPriv do
--              if dIP1 >= a and dIP1 <= b then
--                 user:SendPM(Bot, "Sei in modalit? attiva e il tuo IP dichiarato in configurazione ? nullo oppure hai messo un IP privato per errore!\r\n"..
--                    "IP come questi non possono essere risolti al di fuori della tua rete cambia il valore in "..user.sIP.." e rientra|")
--                 user:Disconnect()
--                 return 1
--              end
--           end
--            user:SendPM(Bot, "Hai messo l'IP sbagliato nei settaggi del tuo client DC!!\r\n"..
--              "Hai messo il valore "..ip..", ma l'IP che dovresti mettere ?: "..user.sIP..".\r\n"..
--               "Per ragioni di sicurezza sei stato bannato per "..iConnect.." minuti\r\n"..
--               "Per sapere di pi? su come impostare DC visita i seguenti siti:\r\n"..
--               "Impostazioni dei router: --->  http://www.plop.nl/lua_tools/dc-active.zip\r\n"..
--               "Manualistica specializzata su router : ---> http://www.portforward.com\r\n"..
--               "FAQ DC++ ufficiale: ---> http://dcplusplus.sourceforge.net/faq/faq.php?display=faq&faqnr=11&catnr=2&prog=1&lang=en&onlynewfaq=1 |")
--           msg = user.sName.." - "..user.sIP.." - "..date().." - bannato temporaneamente per un IP sbagliato in fase di $ConnectToMe, ma questo potrebbe essere un flood dell'hub!! (bad/fake ConnectToMe)"
--            StoreLog(user.sName, msg)
--      if iKill then
--         user:TimeBan(iConnect)
--      else
--                   user:SendPM(Bot, "Un IP contiene 4 numeri separati da 3 punti. il tuo IP corretto e' "..user.sIP.."|")
--         user:Disconnect()
--      end
--           return 1
--         end
--      end

   -- MyInfo filter.
   elseif strsub(data, 1, 7) == "$MyINFO" then
      if tMyInfo[user.sName] then
         tMyInfo[user.sName] = tMyInfo[user.sName] +1
         local t =(frmHub:GetUsersCount()+10)
         if tMyInfo[user.sName] >= t then
            tMyInfo[user.sName] = nil
            msg = user.sName.." - "..user.sIP.." - "..date().." - sei stato bannato per l'uso di un hub flooder!! (myInfo flood)"
            StoreLog(user.sName, msg)
            return ByeBye(user)
         end
   else
      tMyInfo[user.sName] = 1
      end

      -- bad share filter (same ending size).
      local i,j,temp = strfind(data, "$(%d+)%$")
      if temp then
         if strlen(temp) >= 11 then
            temp = strsub(temp, -11, -1)
            if tonumber(temp) ==  99511627776 then
               msg = user.sName.." - "..user.sIP.." - "..date().." - sei stato bannato per l'uso di un hub flooder!! (share version)"
               StoreLog(user.sName, msg)
               return ByeBye(user)
            end
         end
   end

      -- bad tag filter.
      local _,_,tmp = strfind(data, "%b<>(%d+)%$")
      if tmp then
         msg = user.sName.." - "..user.sIP.." - "..date().." - sei stato bannato per l'uso di un hub flooder!! (tag version)"
         StoreLog(user.sName, msg)
      return ByeBye(user)
   end

      -- fake MyInfo flooder.
      local _,_,nick = strfind(data,"^%$MyINFO %$ALL (%S+)")
      if nick and (nick ~= user.sName) then
         msg = user.sName.." - "..user.sIP.." - "..date().." - bsei stato bannato per l'uso di un hub flooder!! (myInfo version)"
         StoreLog((nick.." -"..user.sName), msg)
         nick = GetItemByName(nick)
         if nick then
            ByeBye(nick)
         end
      return ByeBye(user)
   end

      -- nil/counting nick filter.
      local name = gsub(user.sName, "%d", "")
      if strlen(name) == 0 then
         msg = user.sName.." - "..user.sIP.." - "..date().." - sei stato bannato per l'uso di un hub flooder!! (banned on nickname)"
         StoreLog(user.sName, msg)
         return ByeBye(user)
      end

      -- description filter.
      s,e,data = strfind(data, "%$ALL%s+%S+(.*)%b<>%$")
      if data then
         data = strlower(data)
         data = gsub(gsub(gsub(data, "-", ""), " ", ""), " ", "")
         for i,v in tDesc2 do
            local s,e,no = strfind(data, ".*("..i..").*")
            if no then
               msg = user.sName.." - "..user.sIP.." - "..date().." - sei stato bannato per l'uso di un hub flooder!! (banned on description)"
               StoreLog(user.sName, msg)
               return ByeBye(user)
            end
         end

         -- share match filter (also solves clones).
         local s,e,share = strfind(data, "$(%d+)%$")
         if share then
            if tShare[share] == nil then
               tShare[share] = 1
               tNames[user.sName] = 1
            elseif tNames[user.sName] == nil then
               msg = user.sName.." - "..user.sIP.." - "..date().." - sei stato bannato per l'uso di un hub flooder!! (banned on share match)"
               StoreLog(user.sName, msg)
               return ByeBye(user)
            end
         end
      end
   end
end

gemini

----------------------------------------------------------------------

----------------------------------------------------------------------
-- the repeating msg filter.
function ChatCheck(user, data, Table)
   data = gsub(data, "[%s%d]", "")
   -- filter away msg's or not.
   if AWAY then
   s,e,away = strfind(data,"(%b<>)$")
   if away then
      return
   end
   end
   -- back to normal.
   local name = user.sName
   local count = 0
   if Table[name] == nil then
      Table[name] = {}
      Table[name][1]=data
      return
   else
      for i=1,iMaxStored do
         if Table[name] then
            if data == Table[name] then
               if Table[name]["count"] == nil then
                  user:SendPM(Bot, "Smetti di floodare : "..data.."|")
                  user:SendPM(Bot, "Questo ? l'ultimo avvertimento. Dopo "..iMaxWarn.." sarai bannato!!|")
                  Table[name]["count"]=1
                  msg = user.sName.." - "..user.sIP.." - "..date().." - avviso di flooding numero: 1. messaggio: "..data
                  StoreLog(user.sName, msg)
                  count = 1
                  return 1
               else
                  Table[name]["count"]=Table[name]["count"] +1
                  if Table[name]["count"] >= iMaxWarn then
                     what = "Eri stato avvisato!! Ora sei bannato per aver floodato l'hub!!"
                     msg = user.sName.." - "..user.sIP.." - "..date().." - sei stato bannato per flooding. messaggio: "..data
                     StoreLog(user.sName, msg)
                     Table[name] = nil
                     user:SendPM(Bot, what.."|")
                     return ByeBye(user)
                  else
                     user:SendPM(Bot, "Questo ? l'avviso numero "..Table[name]["count"]..". Dopo "..iMaxWarn.." sarai bannato!!|")
                     msg = user.sName.." - "..user.sIP.." - "..date().." - avviso di flooding numero: "..Table[name]["count"]..". messaggio: "..data
                     StoreLog(user.sName, msg)
                     return 1
                  end
               end
            end
         end
      end
   end
   -- cleaning the table.
   if count == 0 then
      local count2 = 0
      for i=1,iMaxStored do
         if Table[name] then
            count2 = count2 +1
         else
            break
         end
      end
      if count2 >= iMaxStored then
         for i=1,iMaxStored do
            if Table[name] ~= nil then
               local tmp = i+1
               if Table[name][tmp] then
                  Table[name] = Table[name][tmp]
               else
                  Table[name]=data
                  break
               end
            end
         end
      else
         count2 = count2 +1
         Table[name][count2]=data
      end
   end
end
----------------------------------------------------------------------

----------------------------------------------------------------------
-- write the log file, and notifying the OP's.
function StoreLog(nick, msg)
   appendto(fFile)
   if opchat then
      SendPmToOps(opchat, msg.."|")
   else
      SendPmToOps(Bot, msg.."|")
   end
   write(msg.."\n")
   writeto()
   msg = nil
end
----------------------------------------------------------------------

----------------------------------------------------------------------
-- check's done on entry.
function NewUserConnected(user)
   -- bad share filter.
   if CheckShare(user) then
      msg = user.sName.." - "..user.sIP.." - "..date().." - sei stato bannato per l'uso di un hub flooder!! (badshare table)"
      StoreLog(user.sName, msg)
      return ByeBye(user)
   end
   -- hammer filter.
   user:SendPM(Bot, user.sName.." "..user.sIP.." "..date()) --SendToAll
   if tUIPs[user.sIP] then
      tUIPs[user.sIP] = tUIPs[user.sIP] +1
      if tUIPs[user.sIP] >= iMaxCon then
         msg = user.sName.." - "..user.sIP.." - "..date().." - sei stato bannato per l'uso di un hub flooder!! (IP connected more then "..iMaxCon.."x within "..(iFlushTime / 1000).." seconds)"
         StoreLog(user.sName, msg)
         return ByeBye(user)
      end
   else
      tUIPs[user.sIP] = 1
   end
end
-------------------------------------------------------
-- Elimina i numeri dal nick
function cleanNick (dirtyNick)
local temp=dirtyNick
for i, ch in {"0","1","2","3","4","5","6","7","8","9"} do
  temp=gsub(temp,ch,"")
end
return temp
end  

------------------------------------------------------------------------------------
--// Questa funzione controlla se l'ip dell'utente appartiene ai range indicati (1=in range)
------------------------------------------------------------------------------------
function Skip(tmpip)
local r1,g1,a1,b1,c1,d1 = strfind(tmpip, "(%d*).(%d*).(%d*).(%d*)")
for s,e in SkipIP do
  local r2,g2,a2,b2,c2,d2 = strfind(s, "(%d*).(%d*).(%d*).(%d*)")
  local r3,g3,a3,b3,c3,d3 = strfind(e, "(%d*).(%d*).(%d*).(%d*)")
  if a1 > a2 and a1 < a3 then
    return 1
  elseif a1==a2 and a1==a3 then
    if b1 > b2 and b1 < b3 then
      return 1
    elseif b1==b2 and b1==b3 then
      if c1 > c2 and c2 < c3 then
        return 1
      elseif c1==c2 and c1==c3 then
        if d1 > d2 and d1 < d3 then
          return 1
        else
          return 0
        end
      elseif c1==c2 then
        if d1 >d2 then
          return 1
        else
          return 0
        end
      elseif c1==c3 then
        if d1           return 1
        else
          return 0
        end
      else
        return 0
      end
    elseif b1==b2 then
      if c1>c2 then
        return 1
      elseif c1==c2 then
        if d1 > d2 then
          return 1
        else
          return 0
        end
      else
        return 0
      end
    elseif b1==b3 then
      if c1        return 1
      elseif c1==c3 then
        if d1          return 1
        else
          return 0
        end
      else
        return 0
      end
    else
      return 0
    end
  elseif a1==a2 then
    if b1>b2 then
      return 1
    elseif b1==b2 then
      if c1>c2 then
        return 1
      elseif c1==c2 then
        if d1>c2 then
          return 1
        else
          return 0
        end
      else
        return 0
      end
    else
      return 0
    end
  elseif a1==a3 then
    if b1      return 1
    elseif b1==b3 then
      if c1        return 1
      elseif c1==c3 then
        if d1          return 1
        else
          return 0
        end
      else
        return 0
      end
    else
      return 0
    end
  else
    return 0
  end
end
end

gemini

request convert lua 4 to lua 5

with geo ip for ptokax 17.08 with the orders that I have

with fake chaser for ptokax 17.08 with the orders that I have

and all my script for ptokax 17.08 with the orders that I have

cordial greetings
 I wait a positive result to my request even if long


thanks
bye

jiten

Most of these scripts have already been converted to Lua 5. Search and you'll find them ;)
Btw, there's no need for Deflood as the new PtokaX has an inbuilt Deflood system.

Cheers

gemini

[19:13] No syntax errors in script file Anti+Ruri_Ruri.lua
[19:13] No syntax errors in script file Chat Rooms.lua
[19:13] No syntax errors in script file deflood4.5.2 Ita.lua
[19:13] No syntax errors in script file GeoIP.V.003.lua
[19:13] No syntax errors in script file Statistiche.lua
[19:13] Syntax ...g\0.3.3.0.b17.08.nt.dbg\scripts\deflood4.5.2 Ita.lua:237: attempt to call method `EnableFullData' (a nil value)
[19:13] Syntax ...p\prog\0.3.3.0.b17.08.nt.dbg\scripts\GeoIP.V.003.lua:42: attempt to call global `openfile' (a nil value)
[19:13] Syntax ...p\prog\0.3.3.0.b17.08.nt.dbg\scripts\Statistiche.lua:167: attempt to call global `readfrom' (a nil value)

Markitos

QuoteOriginally posted by gemini
[19:13] No syntax errors in script file Anti+Ruri_Ruri.lua
[19:13] No syntax errors in script file Chat Rooms.lua
[19:13] No syntax errors in script file deflood4.5.2 Ita.lua
[19:13] No syntax errors in script file GeoIP.V.003.lua
[19:13] No syntax errors in script file Statistiche.lua
[19:13] Syntax ...g\0.3.3.0.b17.08.nt.dbg\scripts\deflood4.5.2 Ita.lua:237: attempt to call method `EnableFullData' (a nil value)
[19:13] Syntax ...p\prog\0.3.3.0.b17.08.nt.dbg\scripts\GeoIP.V.003.lua:42: attempt to call global `openfile' (a nil value)
[19:13] Syntax ...p\prog\0.3.3.0.b17.08.nt.dbg\scripts\Statistiche.lua:167: attempt to call global `readfrom' (a nil value)

Geo IP Lua 5

Now the statistiche can u post again (if already post) the script. And next time use the monospace function to be more easy to visualise the script


Cheers...

SMF spam blocked by CleanTalk