MyChat add-ons: developing, technical questions, testing, documentation and other useful information
User avatar
dzaugg
Hi!
I hope you are well.
I'd like to get a notification when a users status goes from "away" or "disconnected" to "online".
Is it possible to do that with a script?
User avatar
Alona Kutsenko
Hello!
We are going to create a script to make this event possible.
User avatar
dzaugg
Great!
When will it be available?
Can't wait [smilie=biggrin.gif]
User avatar
Alona Kutsenko
Hello!
A beta version of the script will be available at the end of the weekend.
Stay tuned :)
User avatar
dzaugg
Hi Alona,
Where can I find that beta version (or the final one :) )
User avatar
Alexey Pikurov
Hello. Please update your server to the 2023.1.5 version and try to this example:

Code: Select all
const
  UIN_NOTIFY = 6;
 
procedure OnUserStateChange(const iUIN, iState: integer);
begin
  if (iUIN <> UIN_NOTIFY) and (iState = 0) then
    mSendPrivateMessage(0, UIN_NOTIFY, 'User ' + mGetUserAttribute(iUIN, 'DisplayName') + ' is online', 1);
end;

begin

end.

script_notify_user_online.png
MyChat Script user is online notify
script_notify_user_online.png (71.41 KiB) Viewed 29154 times