-- can somebody chance the script to english och swedish
-- 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: servidor.dc@gmail.com")
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: servidor.dc@gmail.com")
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
Hi, i think this script it's not working well, yet ..
Bot = "BotName"
PmOps = "yes"
CheckOps = "no"
OkClones = {
["SomeNick"]=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..", clones are not allowed in the Hub.")
user:Disconnect()
Nick:SendData(Bot, ""..Nick.sName..", clones are not allowed in the Hub.")
Nick:Disconnect()
if PmOps == "yes" then
SendToOps(Bot, "OP MSG - Users: "..user.sName.." and "..Nick.sName..", were disconnected from Hub - Reason: Clones")
local file = io.open("clones.txt", "a+") -- "a+"
file:write( os.date("DC:CLP - Date: %d/%m/%Y - Hours: %T").." - Users: "..user.sName.." and "..Nick.sName..", were disconnected from Hub - Reason: Clones\r\n")
file:close()
end
end
end
end
end
end
local _,_, user1 = string.find(sdata,"$GetINFO%s+(%S+)%s+")
1) On a chat message you won't find $GetINFO
2) $GetINFO is deprecated anyway.
As I said before, working on a version that is quicklist compatible.