Community Forums Today's Posts     Member List     Archive    
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2005
    Location
    Cologne / GER
    Posts
    64

    Line endings in ServerQuery - \n\r instead of \r\n

    Hey there,

    I hope I'm posting in the right section of this forum... I didn't yet run my ServerQuery tests against a Windows or Mac Teamspeak 3 server, so for now I hope I am.

    I just noticed while trying to do some ServerQuery programming that the line endings used there are in fact \n\r. This isn't used by any operating system (Windows: \r\n, Mac: \r, Linux: \n), so I'd like to ask if there is a specific reason for the line endings being like this.

    These \n\r line endings are a bit bothersome when trying to parse the line endings with PHP. It ain't impossible, but if it can be fixed, I'd be all for it

    Best regards,
    Stalker
    Last edited by St4Lk3R; 21-12-2009 at 22:42.

  2. #2
    Join Date
    Dec 2009
    Location
    Germany
    Posts
    66
    Actually this is a really nice (simple but amazing) way to differ between single ServerQuery responses (such as error id=0 msg=ok) and multi-line texts that are however to be treated as a single ServerQuery response.

    So help returns a text with \r\n as multi-line separator, terminates that response with \n\r, sends the error response terminating with \n\r.

    I like it, because that way responses are much easier to separate, and I would like to keep it like that

  3. #3
    Join Date
    Jun 2003
    Posts
    246
    So basically, you're saying it really isn't a bug and it really is a feature. :P

  4. #4
    Join Date
    Dec 2009
    Location
    Germany
    Posts
    66
    Yes, exactly

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 31
    Last Post: 19-01-2010, 21:25
  2. TeamSpeak 2 Anti-Flood Daemon
    By ScP in forum [TeamSpeak 2] Addons & Scripts
    Replies: 193
    Last Post: 07-09-2009, 18:27
  3. Server startet nicht
    By djlars in forum [TeamSpeak 2] Server Support
    Replies: 6
    Last Post: 19-01-2009, 19:07
  4. PHP on windows 2003 server help line 45
    By cyberxn in forum [TeamSpeak 2] Addons & Scripts
    Replies: 4
    Last Post: 01-04-2006, 18:44
  5. TS Client command line: Full list.
    By Perma-n00b in forum [TeamSpeak 2] Client Support
    Replies: 0
    Last Post: 18-04-2004, 16:34

Tags for this Thread

Posting Permissions

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