PtokaX forum

Archive => Archived 5.0 boards => Help with scripts => Topic started by: nEgativE on 16 March, 2005, 11:30:33

Title: Another Clone Script
Post by: nEgativE on 16 March, 2005, 11:30:33
Hi there, can someone help me with this Clone Script, i think is not working well to me, tks in advance []'s


-- Made By nErBoS

Bot = "[operserv]"

PmOps = "yes"
CheckOps = "no"

OkClones = {["[operlink]"]=1,}
OkIPs = {["192.168.2.1"]=1,["127.0.0.1"]=1,}

function Main()
--frmHub:EnableFullData(1)
end

function ChatArrival(user,sdata)

if CheckOps == "no" and user.bOperator then
else
if not OkClones[user.sName] and not OkIPs[user.sIP] then
local _,_, user1 = string.find(sdata,"$GetINFO%s+(%S+)%s+")
if user1 ~= user.sName then
Nick = GetItemByName(user1)
if Nick ~= nil then
if Nick.sIP == user.sIP then
user:SendData(Bot, ""..user.sName..", n?o ? permitido clones no DC:CLP.")
user:SendData(Bot, ""..user.sName..", se voc? est? conectando em rede informe o seu Nick e/ou IP fixo para: servidor.dc@gmail.com")
user:Disconnect()
Nick:SendData(Bot, ""..Nick.sName..", n?o ? permitido clones no DC:CLP.")
Nick:SendData(Bot, ""..Nick.sName..", se voc? est? conectando em rede informe o seu Nick e/ou IP fixo para: servidor.dc@gmail.com")
Nick:Disconnect()
if PmOps == "yes" then  
SendToOps(Bot, "OP MSG - Usu?rios: "..user.sName.." e "..Nick.sName..", foram ambos desconectados do Hub - Motivo: Clones")
appendto("Data/CLP.Logs.dat")
write("DC:CLP - Data: "..os.date("%d").."/"..os.date("%m").."/"..os.date("%Y").." - Horas: "..os.date("%T").." - Usu?rios: "..user.sName.." e "..Nick.sName..", foram ambos desconectados do DC:CLP - Motivo: Clones\r\n")
writeto()
end
end
end
end
end
end
end

Title:
Post by: Herodes on 16 March, 2005, 11:45:25
Not tested,... and not sure it works, but pls try it out ;)
-- Made By nErBoS
--- touched by Herodes ( L5 Conversion )
Bot = "[operserv]"
PmOps = "yes"
CheckOps = "no"
OkClones = {
["[operlink]"]=1,
}
OkIPs = {
["192.168.2.1"]=1,
["127.0.0.1"]=1,
}

function ChatArrival(user,sdata)
if CheckOps ~= "no" and not user.bOperator then
if not OkClones[user.sName] and not OkIPs[user.sIP] then
local _,_, user1 = string.find(sdata,"$GetINFO%s+(%S+)%s+")
if user1 ~= user.sName then
Nick = GetItemByName(user1)
if Nick and Nick.sIP == user.sIP then
user:SendData(Bot, ""..user.sName..", nao e permitido clones no DC:CLP.")
user:SendData(Bot, ""..user.sName..", se voce esta conectando em rede informe o seu Nick e/ou IP fixo para: [EMAIL]servidor.dc@gmail.com[/EMAIL]")
user:Disconnect()
Nick:SendData(Bot, ""..Nick.sName..", nao e permitido clones no DC:CLP.")
Nick:SendData(Bot, ""..Nick.sName..", se voce esta conectando em rede informe o seu Nick e/ou IP fixo para: [EMAIL]servidor.dc@gmail.com[/EMAIL]")
Nick:Disconnect()
if PmOps == "yes" then
SendToOps(Bot, "OP MSG - Usuarios: "..user.sName.." e "..Nick.sName..", foram ambos desconectados do Hub - Motivo: Clones")
local file = io.open("Data/CLP.Logs.dat", "a+") -- "a+"
file:write( os.date("DC:CLP - Data: %d/%m/%Y - Horas: %T").." - Usuarios: "..user.sName.." e "..Nick.sName..", foram ambos desconectados do DC:CLP - Motivo: Clones\r\n")
file:close()
end
end
end
end
end
end
Title:
Post by: nEgativE on 16 March, 2005, 11:53:33
nop :(
Title:
Post by: Herodes on 16 March, 2005, 14:03:04
QuoteOriginally posted by Luso
nop :(
that's not good enough,...
pls gimme an error or a description of what does/doesn't happen...
In Ptx I get no errors and the script logic (from what I can tell) works ..
Title:
Post by: jiten on 16 March, 2005, 15:43:41
Hum, I also requested some help with a LUA 5 clone script, but, it had some problems with the MyINFOArrival. bastya is having a look at it now, so, as he said, "it will be ready asap" and u can use it too.  :]
By the way, I'm going to have a look at this one.
Best regards.