Page 1 of 1

Script to check user network status

PostPosted: Fri Sep 16, 2022 11:30 am
by 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?

Re: Script to check user network status

PostPosted: Wed Oct 19, 2022 11:15 am
by Alona Kutsenko
Hello!
We are going to create a script to make this event possible.

Re: Script to check user network status

PostPosted: Tue Nov 08, 2022 8:26 pm
by dzaugg
Great!
When will it be available?
Can't wait [smilie=biggrin.gif]

Re: Script to check user network status

PostPosted: Wed Nov 09, 2022 1:50 pm
by Alona Kutsenko
Hello!
A beta version of the script will be available at the end of the weekend.
Stay tuned :)

Re: Script to check user network status

PostPosted: Tue Feb 28, 2023 2:29 pm
by dzaugg
Hi Alona,
Where can I find that beta version (or the final one :) )

Re: Script to check user network status

PostPosted: Tue Feb 28, 2023 2:42 pm
by 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 29188 times