Author Topic: DataArrival  (Read 2513 times)

0 Members and 1 Guest are viewing this topic.

Offline Losik

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
DataArrival
« 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.
« Last Edit: 15 October, 2005, 10:56:21 by Losik »

PtokaX forum

DataArrival
« on: 15 October, 2005, 10:53:58 »

Offline Rincewind

  • Scripter
  • Lord
  • ******
  • Posts: 403
  • Karma: +60/-7
    • Rincewind's Scripts
(No subject)
« Reply #1 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.

Markitos

  • Guest
Agree...
« Reply #2 on: 15 October, 2005, 11:42:18 »
Quote
Originally 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.

Offline Losik

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
(No subject)
« Reply #3 on: 15 October, 2005, 12:31:02 »
Thank you. There are so many scripts in lua4 that my head messed up...

Offline plop

  • Forum God
  • ****
  • Posts: 2 464
  • Karma: +37/-0
(No subject)
« Reply #4 on: 15 October, 2005, 22:29:48 »
Quote
Originally 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.
Code: [Select]
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
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Offline 6Marilyn6Manson6

  • Scripter
  • King
  • ******
  • Posts: 869
  • Karma: +47/-35
    • http://www.marilynmanson986.altervista.org
(No subject)
« Reply #5 on: 15 October, 2005, 23:02:16 »
Quote
Originally 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

PtokaX forum

(No subject)
« Reply #5 on: 15 October, 2005, 23:02:16 »