PtokaX forum

Archive => Archived 5.1 boards => Help with scripts => Topic started by: ?[-?Genius?-]? on 08 March, 2007, 03:25:36

Title: Anti Clone
Post by: ?[-?Genius?-]? on 08 March, 2007, 03:25:36
Hi ppl

I have problems in this script


fAntiClone = {
fOnOff = 1, -- 1 = On , 0 = Off
fPermitDifShare = 1, -- 1 = On , 0 = Off
fPmOps = 1, -- 1 = On , 0 = Off
fExcepcoes = {
["[PT]?Genius??"] = 1, -- Nick da excep??o, apagar s? esta linha se n?o desejado / Exception nick, erase only this line if not wanted
[""] = 1,  -- Nick da excep??o, apagar s? esta linha se n?o desejado / Exception nick, erase only this line if not wanted
[""] = 1,  -- Nick da excep??o, apagar s? esta linha se n?o desejado / Exception nick, erase only this line if not wanted
[""] = 1,  -- Nick da excep??o, apagar s? esta linha se n?o desejado / Exception nick, erase only this line if not wanted
},
}
OpChatName = "![ PT??w?s ]"

function NewUserConnected(oUser, Data)
if fAntiClone.fOnOff == 1 then
for _,Nick in frmHub:GetOnlineUsers() do
if (fAntiClone.fExcepcoes[oUser.sName] == nil) then
if oUser.sIP == Nick.sIP and not (oUser.bOperator or Nick.bOperator) then
if oUser.iShare ~= Nick.iShare then
if fAntiClone.fPermitDifShare == 1 then
if fAntiClone.fPmOps == 1 then
SendPmToOps(OpChatName, "\r\n\r\n\tO Utilizador "..oUser.sName.." era um clone de "..Nick.sName.." \r\n")
SendPmToOps(OpChatName, "\r\n\r\n\tO Utilizador  "..oUser.sName.." tem o mesmo IP de "..Nick.sName.." mas com um share diferente. \r\n")
end
else
if fAntiClone.fPmOps == 1 then
SendPmToOps(OpChatName, "\r\n\r\n\tO Utilizador "..oUser.sName.." era um clone de "..Nick.sName.." com um share diferente. O user foi reenviado.\r\n")
end
oUser:SendPM(sBot,"\r\n\r\n\tO Utilizador J? est?s conectado com o nick "..Nick.sName.." e o mesmo IP. Usa apenas 1 user por IP\r\n")
oUser:Redirect("127.0.0.1")
end
end
if oUser.iShare == Nick.iShare then
if fAntiClone.fPmOps == 1 then
SendPmToOps(OpChatName, "\r\n\r\n\tO Utilizador "..oUser.sName.." era um clone de "..Nick.sName.." com o mesmo share. O user foi reenviado.\r\n")
end
oUser:SendPM(sBot,"\r\n\r\n\tO Utilizador J? est?s conectado com o nick "..Nick.sName.." e o mesmo IP. Usa apenas 1 user por IP")
oUser:Redirect("127.0.0.1")
end
end
end
end
end
end


The error is

[02:18] Syntax ...] [Ptokax 0.3.5.2]\scripts\[PT ??w?s] Anti Clone.lua:16: attempt to call a table value
Title: Re: Anti Clone
Post by: ?[-?Genius?-]? on 08 March, 2007, 12:37:44
Tank You

Woks fine :)
Title: Re: Anti Clone
Post by: bastya_elvtars on 08 March, 2007, 12:48:19
This is a clonealert ripoff by the way, we would like to see the credits.
Title: Re: Anti Clone
Post by: ?[-?Genius?-]? on 08 March, 2007, 13:16:14
Hi

I have another problem.

Script Redirect user but don?t send message.

ex:


[12:06] *** Connecting to LocalHost...
[12:06] *** Connected
[12:06] <![ PT??w?s ]> This hub is running PtokaX DC Hub 0.3.5.2 (UpTime: 0 days, 9 hours, 36 minutes)
[12:06] *** Disconnected


I want this


[12:06] *** Connecting to LocalHost...
[12:06] *** Connected
[12:06] <![ PT??w?s ]> This hub is running PtokaX DC Hub 0.3.5.2 (UpTime: 0 days, 9 hours, 36 minutes)
[12:06] <![ PT??w?s ]> Ja tavas ligado no hub com outro nick [PT]?Genius??.
[12:06] *** Disconnected


PS: I change redirect to disconnect a think is not a problem

Sory about my bad inglish
Quote from: bastya_elvtars on 08 March, 2007, 12:48:19
This is a clonealert ripoff by the way, we would like to see the credits.

Ok men. Sory about that
Title: Re: Anti Clone
Post by: Cêñoßy†ê on 08 March, 2007, 13:29:22
Quote from: ?[-?Genius?-]? on 08 March, 2007, 13:16:14
Hi

I have another problem.

Script Redirect user but don?t send message.
change
Code ( geshi) Select

oUser:Redirect("127.0.0.1")

to
Code (geshi) Select

oUser:Redirect("127.0.0.1","You have been redirected ....")
Title: Re: Anti Clone
Post by: ?[-?Genius?-]? on 08 March, 2007, 13:44:30
Hi

The mensage not send by bot is:  You are already connectd in the hub whit "..nick.."

Tankx
Title: Re: Anti Clone
Post by: Cêñoßy†ê on 08 March, 2007, 14:03:13
Quote from: ?[-?Genius?-]? on 08 March, 2007, 13:44:30
Hi

The mensage not send by bot is:  You are already connectd in the hub whit "..nick.."

Tankx

If you try it with your own hub.. it tryes to redirect back ;) 127.0.0.1 & localhost are both your own pc  :P
Title: Re: Anti Clone
Post by: ?[-?Genius?-]? on 08 March, 2007, 14:11:41
The preoblem is not redirect our disconnect. The problem is a message.

User are redirectd our disconectd and don?t noo whi :S