Redirect user before TempBan
 

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

Redirect user before TempBan

Started by user, 26 June, 2005, 22:39:19

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

user

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?

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

TTB

#2
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.
TTB

(? ?.??.-> Admin @ Surfnet hubs <-.??.???)

jiten

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

SMF spam blocked by CleanTalk