Notice to all users

We are migrating towards a new forum system located at, as such this forum will become read-only on January 29, 2020

Results 1 to 2 of 2
  1. #1
    Join Date
    April 2003

    Help with onClientMoveEvent()

    Hi TS community,

    I'm currently working on a LUA-script that is parsing my current channel and all the online people within that channel into a text file so I can use it with Rainmeter.

    After a while of digging around on the internet, I found this repo with a script that is working:

    However due to the nature of this script (including talkers, etc.) Rainmeter is getting very unresponsive when reading the text file. So I decided to get rid of the talker mechanism and only parse the text file as follows:
    - First line: Channel name I'm currently in
    - Following lines: users that are currently in the channel

    Since the linked script only hooks into onTalkStatusChangeEvent(), I decided to further modify the script to only update the text file when a person is leaving/joining my channel (according to Google, that should be onClientMoveEvent()).

    However now it broke and I'm unfortunately not able to pinpoint where it fails (not a coder )

    This is the code I'm currently working with:

    The part I commented out is the part with the onTalkStatusChangeEvent() which is working perfectly fine.

    From what I've gathered my logic should (??) be correct:
    - When the onClientMoveEvent()is triggered (serverwide?), I call updateTxt() with the newChannelID of that particular client.
    - In the updateTxt function, I grab nickname, my own ID, the ID of the channel I'm currently in, the ID of the channel the user is in, open the text file etc.
    - Then I compare my current channel ID with the channelID (former "newChannelID) the user that triggered the event is in because I want to find out if that user joined my channel or not
    - If that's the case, I loop the clientList of my channel and write it to txt
    - If not, I print "Fail"

    Unfortunately when I changed this, the script stopped working and I cannot find out how to get it working again (except rolling back to the onTalkStatusChangeEvent(), which then only updates the channel list when I'm talking (i.e. not when I'm muted/afk).

    I also cannot figure out how to find some sort of debug log, my Client Log (Ctrl+L in TS) is empty, even if I tick "DEBUG" for the log browser... I tried putting in some debugPrint() messages, but they show up nowhere (or at least I cannot find them..)

    Any help would be greatly appreciated. I'm aware this might be a ridiculous solution, but I just don't know better - if anybody has an easier way to do this (keep a text file of channelname + people in the channel which is updated whenever somebody joins/leaves, please let me know!)

    Thanks in advance
    Last edited by enderep12; November 14th, 2018 at 04:02 PM.

  2. #2
    Join Date
    April 2003
    Sorry for double posting:

    I finally figured it out after some trial and error.

    Here's the working code in case anyone's interested:

    Cleaned up code without the unnecessary prints (just used them for debugging):

    If you have a way to improve this, please let me know. I'm not sure if those nested for loops are the most efficient way.
    Last edited by enderep12; November 14th, 2018 at 05:44 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Client Notification [OnClientMoveEvent -- CHANNEL_GROUPS_ID]
    By FrancT in forum Client Plugins / Lua Scripts
    Replies: 12
    Last Post: February 2nd, 2013, 10:15 AM
  2. onClientMoveEvent behaviour on connection
    By Philosound in forum Client Plugins / Lua Scripts
    Replies: 2
    Last Post: November 8th, 2012, 09:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts