PtokaX forum

Archive => Archived 4.0 boards => Help with Lua 4 scripts => Topic started by: user on 26 June, 2005, 22:39:19

Title: Redirect user before TempBan
Post by: user on 26 June, 2005, 22:39:19
Hello everyone!

This part of the script is working fine! It does:

1 - Sends the message to the user.
2 - Sends the message to main chat.
3 - Temporary bans the user.

curUser:SendPM(Bot,"MSG TO SEND")
SendToAll("bot","The user "..curUser.sName.." using IP : "..curUser.sIP.." has been banned!")
curUser:TempBan()


...But i wanted it to do:

1 - Sends the message to the user.
2 - Sends the message to main chat.
3 - Redirects the user to hub xxx.xxx.xxx:123
4 - Temporary bans the user.

Can anyone help me?
Title:
Post by: user on 27 June, 2005, 13:23:37
Thank you for your help.

Well, it doesn't seem to work...


PtokaX said:

Syntax error: attempt to call field `Redirect' (a nil value)
stack traceback:
1: function `NewUserConnected' at line ....


Let's see if we can make this work :)
Title:
Post by: TTB on 27 June, 2005, 13:41:27
Hi,

I use this code for another function:

curUser:SendData("$ForceMove "..frmHub:GetRedirectAddress() )I guess that curUser:SendData("$ForceMove xxx.xxx.xxx.xxx:xxxx") also should do the job. Before that, send the reason, and after the redirect, tempban the victim.
Title:
Post by: jiten on 27 June, 2005, 15:46:26
QuoteOriginally posted by user
Thank you for your help.

Well, it doesn't seem to work...


PtokaX said:

Syntax error: attempt to call field `Redirect' (a nil value)
stack traceback:
1: function `NewUserConnected' at line ....


Let's see if we can make this work :)
That error happened because you are using an older version of PtokaX (Lua 4 one) and the Redirect(Address, Reason) was added in the 0.3.3.0 build 16.05.
TTB's hint should solve it.

Cheers