Clone Kill
 

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

Clone Kill

Started by witch, 10 September, 2005, 19:00:16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

witch

Hola !
Reqest for converting to lua 5 please.
_____________________________________________

MysBot = "Clone_Kill"

function Main()
frmHub:EnableFullData(1)
frmHub:UnregBot(MysBot)
end

function DataArrival(curUser,sdata)

local _,_, test = strfind(sdata,"$GetINFO%s+(%S+)%s+")
if test ~= curUser.sName then
   Test = GetItemByName(test)
      
      
if Test ~= nil then
   if Test.sIP == curUser.sIP    then
      SendToOps(MysBot,"The Name/ip "..curUser.sName.." / "..curUser.sIP.." was trying too connect but he/she already has an connection with Name/Ip "..Test.sName.." / "..Test.sIP)
      curUser:SendPM(MysBot,"Do not ENTER this hub with a second connection..You are already connected with Name/Ip "..Test.sName.." / "..Test.sIP)
      curUser:Disconnect()      
      end
   end
end
end
_____________________________________________

thx in advince  :))



bastya_elvtars

Already converted, with more features. See  for more information.
Everything could have been anything else and it would have just as much meaning.

witch

QuoteOriginally posted by bastya_elvtars
Already converted, with more features. See  for more information.
well i did use it, like always...but can't find anything uless it's got defferent name sorry. i would apriciate if u could gimme the link.

thx




witch

QuoteOriginally posted by kunal
is this what u r looking for
thx dude  ;)



kunal

btw i just searched for clone and i got this result.dunno y u couldnt find it.

witch

QuoteOriginally posted by kunal
btw i just searched for clone and i got this result.dunno y u couldnt find it.
damn i searched on PtokaX Lua 5 forum and no results, if u search on all forums than yeah lot's of matches. but how u know if topic ralated to lua 4 or lua 5 till u open topic?

...

but thx 4 help  :))



witch

i've tryed 3 defferent clone scripts, none of them workin...PLEASE SCRIPTERS convert this little 1...

thx in advince  :))



bastya_elvtars

Check the 4th page of the thread kunal posted.
Everything could have been anything else and it would have just as much meaning.

kunal

not the 4 th page.check the third page.the 4th page has just got a smiley by jiten

bastya_elvtars

QuoteOriginally posted by kunal
not the 4 th page.check the third page.the 4th page has just got a smiley by jiten

Eh, yes, true, sorry. Now this topic should be moved to the HOWTO section. :D
Everything could have been anything else and it would have just as much meaning.

witch

hehe ok, i get that ;)

so i tryed finial edition of Clone Alert 1.6 posted by Dessamator on that thread. And damn script shows no syntacs errors but some how ppl could log in twice from same IP, so that's means something is really wrong hehe. I made all settings with name of op-chat and bot name on script.....please tell me where i made misstake?

thx  :))



bastya_elvtars

QuoteOriginally posted by witch
hehe ok, i get that ;)

so i tryed finial edition of Clone Alert 1.6 posted by Dessamator on that thread. And damn script shows no syntacs errors but some how ppl could log in twice from same IP, so that's means something is really wrong hehe. I made all settings with name of op-chat and bot name on script.....please tell me where i made misstake?

thx  :))

What PtokaX version are you using, what other scripts are you running etc.? Also post the script please.
Everything could have been anything else and it would have just as much meaning.

witch

QuoteOriginally posted by bastya_elvtars

What PtokaX version are you using, what other scripts are you running etc.? Also post the script please.
ptokax 0.3.3.21.nt.dbg powered by RCv10.01e, Artbot 2.0 L5.lua, releaseBot.lua, zRightClicker.lua

-- Clone Alert 1.6

-- 1.0b by Mutor The Ugly

-- PM Clone login to Opchat

-- Applied to latest PtokaX by bastya_elvtars

-- Also added share checking, if different, only notifies ops.

--thx NightLitch

-- Added: Clone check immunity (add, remove and list immune users) by jiten

--- -- touched by Herodes

-- heavily optimised

-- moved to 1.5

-- now it's 1.6, after bastya_elvtars did some more optimization to the detector. :P





OpChatName = "OpChat"  -- Rename to opchatbot

Bot = "botname" -- Rename to you main Px bot

kick=0 -- 0 to only disconnect, otherwise enter a number, and user will be kicked for that amount of minutes.

kick_other_too=0 -- 1 to disconnect/kick the already logged in user, 0 to not

PmOps = false -- true:enables / false:disables , operator notifincation (STRONGLY recommended to leave enabled!)





function Main()

tImmune = {}

if loadfile("logs/cloneimmune.txt") then dofile("logs/cloneimmune.txt"); end

end





function OnExit()

collectgarbage()

local f = io.open("logs/cloneimmune.txt", "w+")

local m = "tImmune = { "

for a, b in tImmune do m = m..(string.format("[%q]=",a)..b..","); end

m = m.." }"

f:write( m ); f:flush(); f:close();

end





function NewUserConnected(curUser,sdata) 

for _,Nick in frmHub:GetOnlineUsers() do

if curUser.sIP==Nick.sIP then

local det=function (User)

curUser:SendPM(Bot,"Double Login is not allowed. You are already connected to this hub with this nick: "..Nick.sName)

if kick~=0 then

User:SendPM(Bot,"You're being timebanned. Your IP: "..User.sIP)

User:TimeBan(kick)

if PmOps == true then

SendPmToOps(OpChatName, "*** Cloned user <"..curUser.sName.."> ("..curUser.sIP..") logged in and timebanned for "..kick.." minutes. User is a clone of <"..Nick.sName..">")

end

else

User:SendPM(Bot,"You're being disconnected.")

User:Disconnect()

if PmOps == true then

SendPmToOps(OpChatName, "*** Cloned user <"..curUser.sName.."> ("..curUser.sIP..") logged in and disconnected. User is a clone of <"..Nick.sName..">")

end

end

end

if not(tImmune[curUser.sName]== 1 or tImmune[Nick.sName]== 1)  and not(Nick.bOperator)  then

if curUser.iShareSize==Nick.iShareSize then

det(curUser)

if kick_other_too==1 then

det(Nick)

end

else

if PmOps == true then

SendPmToOps(OpChatName, "*** User "..curUser.sName.." logged in, with same IP as "..Nick.sName.." but with different share, please check.")

end

end

end

end

end

end 



function ChatArrival (user,data)

if (user.bOperator) then

local data = string.sub( data, 1, -2 )

local s,e,cmd = string.find( data, "%b<>%s+([%-%+%?]%S+)" )

if cmd then

return Parse( user, cmd, data, false )

end

end

end



function ToArrival ( user, data )

if ( user.bOperator ) then

local data = string.sub( data , 1, -2 )

local s,e, cmd = string.find( data , "%$%b<>%s+([%-%+%?]%S+)" )

if cmd then

return Parse ( user, cmd , data , true )

end

end

end



function Parse( user, cmd, data, how )



local function SendBack( user, msg , from, how )

if how then user:SendPM( from or Bot , msg );return 1; end;

user:SendData( from or Bot, msg );return 1;

end



local t = {

--- Add to cloneList

["+clone"] = function ( user , data , how )

local s,e, name = string.find( data, "%b<>%s+%S+%s+(%S+)" )





if not name then user:SendData(Bot, "*** Error: Type +clone nick") end

if tImmune[name] then user:SendData("nope") end





local nick = GetItemByName(name)

if not nick then user:SendData(Bot, "*** Error: User is not online.") end





tImmune[name] = 1

OnExit()

user:SendData(Bot, name.." is now immune to clone checks!")

return 1





end ,





--- Remove from cloneList

["-clone"] = function ( user , data , how )

local s,e, name = string.find(data, "%b<>%s+%S+%s+(%S+)")





if not name then user:SendData(Bot, "*** Error: Type -clone nick") end

if not tImmune[name] then user:SendData(Bot,"The user "..victim.sName.." is not immune!")  end





local nick = GetItemByName( name )

if not nick then user:SendData(Bot, "*** Error: That user is not online.") end





tImmune[name] = nil

OnExit()

user:SendData(Bot,"Now "..name.." is not no longer immune to clone checks!")

return 1





end,





--- Show cloneList

["?clone"] = function ( user , data, how )





local m = ""

collectgarbage()

for nick, _ in tImmune do

local s = "Offline"

if GetItemByName(nick) then s = "Online" end

m = m.."\r\n\t  • ("..s..")  "..nick

end

if m == "" then return SendBack( user, "There are no users that can have a clone", Bot, how ) end

m = "\r\nThe following users can have clones in this hub:"..m

return SendBack( user, m , Bot, how )

end,

--- Show cloneBot help





["?clonehelp"] = function ( user, data , how )





local m = "\r\n\r\nHere are the commands for the CloneBot:"

m = m.."\r\n\t+clone  \t allows  to have a clone"

m = m.."\r\n\t-clone  \t removes  from the clone list"

m = m.."\r\n\t?clone\t\t shows the users allowed to have a clone"

m = m.."\r\n\t?clonehelp \t allows  to have a clone"

return SendBack( user, m, Bot, how )





end, }





if t[cmd] then return t[cmd]( user, data, how ) end

end

       

thx in advince  :))



bastya_elvtars

OpChatName = "OpChat"  -- Rename to opchatbot
Bot = "botname" -- Rename to you main Px bot
kick=0 -- 0 to only disconnect, otherwise enter a number, and user will be kicked for that amount of minutes.
kick_other_too=0 -- 1 to disconnect/kick the already logged in user, 0 to not
PmOps = true -- true:enables / false:disables , operator notifincation (STRONGLY recommended to leave enabled!)
Everything could have been anything else and it would have just as much meaning.

witch

sure i changed settings on this part, above was posted original version from forum posted by Dessamator. Here is my part
OpChatName = "![pz]?Op-Chat?"  -- Rename to opchatbot
Bot = "![pz]?Robocop?" -- Rename to you main Px bot
kick=10 -- 0 to only disconnect, otherwise enter a number, and user will be kicked for that amount of minutes.
kick_other_too=1 -- 1 to disconnect/kick the already logged in user, 0 to not
PmOps = true -- true:enables / false:disables , operator notifincation (STRONGLY recommended to leave enabled!)

plz correct me, thx :)



bastya_elvtars

Everything could have been anything else and it would have just as much meaning.

witch

QuoteOriginally posted by bastya_elvtars
There should be no ? in botnames.

http://ptxwiki.psycho-chihuahua.net/doku.php/scriptinghelp/ptokaxapi#regbot_botname
well actualy it's not  "?" it's shows "?" cose of forum convert it from robocop dot. in script it's looks like that



kunal

QuoteSendToOps(MysBot,"The Name/ip "..curUser.sName.." / "..curUser.sIP.." was trying too connect but he/she already has an connection with Name/Ip "..Test.sName.." / "..Test.sIP)
curUser:SendPM(MysBot,"Do not ENTER this hub with a second connection..You are already connected with Name/Ip "..Test.sName.." / "..Test.sIP)

isnt this option inbuilt in the new ptokax.

bastya_elvtars

QuoteOriginally posted by kunal
QuoteSendToOps(MysBot,"The Name/ip "..curUser.sName.." / "..curUser.sIP.." was trying too connect but he/she already has an connection with Name/Ip "..Test.sName.." / "..Test.sIP)
curUser:SendPM(MysBot,"Do not ENTER this hub with a second connection..You are already connected with Name/Ip "..Test.sName.." / "..Test.sIP)

isnt this option inbuilt in the new ptokax.

The New Connections From Same IP option is against connection floods (aka too fast reconnects). I will test the clone checker script, however it should work. His script will not work, cause $GetINFO is no longer used.

Also note that if one of the clones is operator, then no checking will be performed.
Everything could have been anything else and it would have just as much meaning.

witch

yes i also thout that new ptokax got inbuld clone function, but it's dosn't work on that way....

also i checked script with bouth clones users profiles, still no result.

thx  8)



SMF spam blocked by CleanTalk