Clone script to the new Ptokax 0.4.0.0c
 

Clone script to the new Ptokax 0.4.0.0c

Started by osse, 26 March, 2008, 19:53:22

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

osse

Anyone who can help me with a script. Mutor's script.

-- Clone Alert 1.1
-- 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

OpChatName = frmHub:GetOpChatName()   --Rename to opchatbot - or frmHub:GetOpChatName() for bultin
Bot =frmHub:GetHubBotName()      --Rename to you main Px bot - frmHub:GetHubBotName() for builtin
PMOps = "1"            --Should Ops be notified 1=yes 0=no (STRONGLY recommended to leave enabled!)



function NewUserConnected(curUser,sdata)
   for _,Nick in pairs(frmHub:GetOnlineUsers()) do
      if curUser.sIP==Nick.sIP and not (curUser.bOperator and Nick.bOperator) then
         if curUser.iShare==Nick.iShare then
            curUser:SendPM(Bot,"This hub does not allow the use of clones. Hit the bricks, ya leecher!")
            curUser:SendPM(Bot, "   This message has been sent to all OPs !! ")
            curUser:Disconnect()
            --Nick:SendPM(Bot,"This hub does not allow the use of clones. Hit the bricks, ya leecher!")
            
            --curUser:SendPM(Bot, "This message has been sent to all OPs !! ")
            --Nick:Disconnect()
            if PMOps == "1" then
               SendPmToOps(OpChatName, "*** Cloned user = "..curUser.sName.." logged in, Nick is a clone of = "..Nick.sName)
               SendPmToOps(OpChatName, "***"..curUser.sName.." have been disconnected")  ---and "..Nick.sName.." have been disconnected")
            end
         else
            SendPmToOps(OpChatName, "*** User "..curUser.sName.." logged in, with same IP as "..nick.sName.." but with different share, please check.")
         end
      end
   end
end

Thnx   :D ;D

osse

Quote from: Mutor on 26 March, 2008, 22:22:49
There was a rewrite rather than a conversion.
Clone Killer 1.1d LUA 5.1 [Strict]

I got this msg

18:19] Syntax clone.lua:31: attempt to index global 'frmHub' (a nil value)

:-[ :-[ :'(

thnx 4 ur help Mutor  :D ;D

Psycho_Chihuahua

there is no frmhub Function in the new API

use this as Botname instead                  SetMan.GetString(21)
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

SMF spam blocked by CleanTalk