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?
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 :)
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.
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