PtokaX forum

Development Section => LUA & PtokaX-Scripting-Interface => Topic started by: Losik on 15 October, 2005, 10:53:58

Title: DataArrival
Post by: Losik on 15 October, 2005, 10:53:58
I need clear anwer... So I try to make clear question too :D
I'm trying to get the "$MyINFO" line. So I do it in the DataArrival function, right?

Ok, if so, then I'm writing some test message in it:
function DataArrival(curUser,data)
 SendToNick(curUser.sName, "call me back")
end
And it won't call back! There are so many examples of use of this function, I've tried them too, but no succes.

1. What have I done wrong?
2. Why does ChatArrival works great, but this DataArrival - not?

That's all.
10x

Sorry, missed forum...
This has to be at Developing Problems...  Sorry.
Title:
Post by: Rincewind on 15 October, 2005, 10:58:16
DataArrival is lua4.

In Lua5 it was broken into two parts; ChatArrival and ToArrival. The former is when the data arrives in main and the latter for data in PM.

If you're using a current PtokaX you need to to use the Lua5 Arrivals.
Title: Agree...
Post by: Markitos on 15 October, 2005, 11:42:18
QuoteOriginally posted by Rincewind
DataArrival is lua4.

In Lua5 it was broken into two parts; ChatArrival and ToArrival. The former is when the data arrives in main and the latter for data in PM.

If you're using a current PtokaX you need to to use the Lua5 Arrivals.
Title:
Post by: Losik on 15 October, 2005, 12:31:02
Thank you. There are so many scripts in lua4 that my head messed up...
Title:
Post by: plop on 15 October, 2005, 22:29:48
QuoteOriginally posted by Rincewind
DataArrival is lua4.

In Lua5 it was broken into two parts; ChatArrival and ToArrival. The former is when the data arrives in main and the latter for data in PM.

If you're using a current PtokaX you need to to use the Lua5 Arrivals.
not broken into 2 parts but a lot more.
Functions
---------
Main()
OnExit()
OnTimer()
NewUserConnected(User)
UserDisconnected(User)
OpConnected(User)
OpDisconnected(User)
OnError(ErrorMsg)
SupportsArrival(User, Data) - Incoming supports from user.
ChatArrival(User, Data) - Incoming chat message from user. If script return 1 hub don't process data.
KeyArrival(User, Data) - Incoming key from user.
ValidateNickArrival(User, Data) - Incoming validate nick from user.
PasswordArrival(User, Data) - Incoming password from user.
VersionArrival(User, Data) - Incoming version from user.
GetNickListArrival(User, Data) - Incoming get nick list request from user.
MyINFOArrival(User, Data) - Incoming user myinfo.
GetINFOArrival(User, Data) - Incoming get info request from user.
SearchArrival(User, Data) - Incoming search request from user. If script return 1 hub don't process data.
ToArrival(User, Data) - Incoming private message from user. If script return 1 hub don't process data.
ConnectToMeArrival(User, Data) - Incoming active connection request from user. If script return 1 hub don't process data.
MultiConnectToMeArrival(User, Data) - Incoming multi connection request from user. If script return 1 hub don't process data.
RevConnectToMeArrival(User, Data) - Incoming pasive connection request from user. If script return 1 hub don't process data.
SRArrival(User, Data) - Incoming search reply from user. If script return 1 hub don't process data.
KickArrival(User, Data) - Incoming kick command from user. If script return 1 hub don't process data.
OpForceMoveArrival(User, Data) - Incoming redirect command from user. If script return 1 hub don't process data.
UserIPArrival(User, Data) - Incoming user ip request from user. If script return 1 hub don't process data.
UnknownArrival(User, Data) - Incoming unknown command from user. If script return 1 hub don't process data (don't disconnect user).

this all can be found in the scripting docs ppk ships with ptokax.

plop
Title:
Post by: 6Marilyn6Manson6 on 15 October, 2005, 23:02:16
QuoteOriginally posted by Losik
I need clear anwer... So I try to make clear question too :D
I'm trying to get the "$MyINFO" line. So I do it in the DataArrival function, right?

Ok, if so, then I'm writing some test message in it:
function DataArrival(curUser,data)
 SendToNick(curUser.sName, "call me back")
end
And it won't call back! There are so many examples of use of this function, I've tried them too, but no succes.

1. What have I done wrong?
2. Why does ChatArrival works great, but this DataArrival - not?

That's all.
10x

Sorry, missed forum...
This has to be at Developing Problems...  Sorry.

DataArrival? Is it death in Lua5 :P