Kaynağa Gözat

TeamSpeak 3 PHP Framework update

OGP's version is 1.1.23 from 10/11/2013.
Latest version is 1.1.25 from 18/06/2016.

Main site: https://www.planetteamspeak.com/
GitHub: https://github.com/planetteamspeak/ts3phpframework

From the changelog:
===============================================================================
   + Added feature or noticable improvement
   - Bug fix or something removed
   * Changed or Information
   ! Important - Take note!
===============================================================================

=== Release 1.1.24 - 18 Jun 2016 ===
- fixed PHP 7.1 incompatibile `unset($this)`, fixed by @venyii
- fixed `serverqueryWaitTimeout` event, reverts #16 (string vs. object reference) until cyclic reference fix, fixed by @I-MrFixIt-I
- minor bug fixes, documentation update

=== Release 1.1.24 - 18 Jun 2016 ===
 + added IPv6 support
 + added subsystem parameter to TeamSpeak3_Node_Host::bindingList()
 - fixed an infinite recursion issue in TeamSpeak3_Node_Client t
rocco27 9 yıl önce
ebeveyn
işleme
8cf79b34f3
44 değiştirilmiş dosya ile 276 ekleme ve 279 silme
  1. 2 2
      protocol/TeamSpeak3/Adapter/Abstract.php
  2. 2 2
      protocol/TeamSpeak3/Adapter/Blacklist.php
  3. 2 2
      protocol/TeamSpeak3/Adapter/Blacklist/Exception.php
  4. 2 2
      protocol/TeamSpeak3/Adapter/Exception.php
  5. 2 2
      protocol/TeamSpeak3/Adapter/FileTransfer.php
  6. 2 2
      protocol/TeamSpeak3/Adapter/FileTransfer/Exception.php
  7. 2 2
      protocol/TeamSpeak3/Adapter/ServerQuery.php
  8. 2 2
      protocol/TeamSpeak3/Adapter/ServerQuery/Event.php
  9. 2 2
      protocol/TeamSpeak3/Adapter/ServerQuery/Exception.php
  10. 4 4
      protocol/TeamSpeak3/Adapter/ServerQuery/Reply.php
  11. 2 2
      protocol/TeamSpeak3/Adapter/TSDNS.php
  12. 2 2
      protocol/TeamSpeak3/Adapter/TSDNS/Exception.php
  13. 2 2
      protocol/TeamSpeak3/Adapter/Update.php
  14. 2 2
      protocol/TeamSpeak3/Adapter/Update/Exception.php
  15. 3 3
      protocol/TeamSpeak3/Exception.php
  16. 2 2
      protocol/TeamSpeak3/Helper/Char.php
  17. 2 2
      protocol/TeamSpeak3/Helper/Convert.php
  18. 2 2
      protocol/TeamSpeak3/Helper/Crypt.php
  19. 2 2
      protocol/TeamSpeak3/Helper/Exception.php
  20. 2 2
      protocol/TeamSpeak3/Helper/Profiler.php
  21. 2 2
      protocol/TeamSpeak3/Helper/Profiler/Exception.php
  22. 2 2
      protocol/TeamSpeak3/Helper/Profiler/Timer.php
  23. 2 2
      protocol/TeamSpeak3/Helper/Signal.php
  24. 2 2
      protocol/TeamSpeak3/Helper/Signal/Exception.php
  25. 2 2
      protocol/TeamSpeak3/Helper/Signal/Handler.php
  26. 2 2
      protocol/TeamSpeak3/Helper/Signal/Interface.php
  27. 24 24
      protocol/TeamSpeak3/Helper/String.php
  28. 4 4
      protocol/TeamSpeak3/Helper/Uri.php
  29. 3 4
      protocol/TeamSpeak3/Node/Abstract.php
  30. 16 16
      protocol/TeamSpeak3/Node/Channel.php
  31. 8 8
      protocol/TeamSpeak3/Node/Channelgroup.php
  32. 18 18
      protocol/TeamSpeak3/Node/Client.php
  33. 2 2
      protocol/TeamSpeak3/Node/Exception.php
  34. 17 8
      protocol/TeamSpeak3/Node/Host.php
  35. 8 6
      protocol/TeamSpeak3/Node/Server.php
  36. 10 10
      protocol/TeamSpeak3/Node/Servergroup.php
  37. 83 90
      protocol/TeamSpeak3/TeamSpeak3.php
  38. 6 4
      protocol/TeamSpeak3/Transport/Abstract.php
  39. 2 2
      protocol/TeamSpeak3/Transport/Exception.php
  40. 4 4
      protocol/TeamSpeak3/Transport/TCP.php
  41. 4 4
      protocol/TeamSpeak3/Transport/UDP.php
  42. 8 16
      protocol/TeamSpeak3/Viewer/Html.php
  43. 2 2
      protocol/TeamSpeak3/Viewer/Interface.php
  44. 2 2
      protocol/TeamSpeak3/Viewer/Text.php

+ 2 - 2
protocol/TeamSpeak3/Adapter/Abstract.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Abstract.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Abstract.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 2 - 2
protocol/TeamSpeak3/Adapter/Blacklist.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Blacklist.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Blacklist.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 2 - 2
protocol/TeamSpeak3/Adapter/Blacklist/Exception.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Exception.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Exception.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 2 - 2
protocol/TeamSpeak3/Adapter/Exception.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Exception.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Exception.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 2 - 2
protocol/TeamSpeak3/Adapter/FileTransfer.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: FileTransfer.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: FileTransfer.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 2 - 2
protocol/TeamSpeak3/Adapter/FileTransfer/Exception.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Exception.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Exception.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 2 - 2
protocol/TeamSpeak3/Adapter/ServerQuery.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: ServerQuery.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: ServerQuery.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 2 - 2
protocol/TeamSpeak3/Adapter/ServerQuery/Event.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Event.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Event.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 2 - 2
protocol/TeamSpeak3/Adapter/ServerQuery/Exception.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Exception.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Exception.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 4 - 4
protocol/TeamSpeak3/Adapter/ServerQuery/Reply.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Reply.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Reply.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */
@@ -194,7 +194,7 @@ class TeamSpeak3_Adapter_ServerQuery_Reply
 
     foreach($nodes as $node)
     {
-      if(array_key_exists($ident, $node))
+      if(isset($node[$ident]))
       {
         $array[(is_object($node[$ident])) ? $node[$ident]->toString() : $node[$ident]] = $node;
       }
@@ -315,7 +315,7 @@ class TeamSpeak3_Adapter_ServerQuery_Reply
       {
         $suffix = "";
       }
-
+      
       throw new TeamSpeak3_Adapter_ServerQuery_Exception($this->getErrorProperty("msg") . $suffix, $this->getErrorProperty("id"));
     }
   }

+ 2 - 2
protocol/TeamSpeak3/Adapter/TSDNS.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: TSDNS.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: TSDNS.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 2 - 2
protocol/TeamSpeak3/Adapter/TSDNS/Exception.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Exception.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Exception.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 2 - 2
protocol/TeamSpeak3/Adapter/Update.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Update.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Update.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 2 - 2
protocol/TeamSpeak3/Adapter/Update/Exception.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Exception.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Exception.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 3 - 3
protocol/TeamSpeak3/Exception.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Exception.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Exception.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */
@@ -112,7 +112,7 @@ class TeamSpeak3_Exception extends Exception
       throw new self("custom message for code 0x" . strtoupper(dechex($code)) . " is not registered");
     }
 
-    unset(self::$messages[intval($code)]);
+    unset(self::$messages[(int) $code]);
   }
 
   /**

+ 2 - 2
protocol/TeamSpeak3/Helper/Char.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Char.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Char.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 2 - 2
protocol/TeamSpeak3/Helper/Convert.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Convert.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Convert.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 2 - 2
protocol/TeamSpeak3/Helper/Crypt.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Crypt.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Crypt.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 2 - 2
protocol/TeamSpeak3/Helper/Exception.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Exception.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Exception.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 2 - 2
protocol/TeamSpeak3/Helper/Profiler.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Profiler.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Profiler.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 2 - 2
protocol/TeamSpeak3/Helper/Profiler/Exception.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Exception.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Exception.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 2 - 2
protocol/TeamSpeak3/Helper/Profiler/Timer.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Timer.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Timer.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 2 - 2
protocol/TeamSpeak3/Helper/Signal.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Signal.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Signal.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 2 - 2
protocol/TeamSpeak3/Helper/Signal/Exception.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Exception.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Exception.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 2 - 2
protocol/TeamSpeak3/Helper/Signal/Handler.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Handler.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Handler.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 2 - 2
protocol/TeamSpeak3/Helper/Signal/Interface.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Interface.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Interface.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 24 - 24
protocol/TeamSpeak3/Helper/String.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: String.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: String.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */
@@ -51,7 +51,7 @@ class TeamSpeak3_Helper_String implements ArrayAccess, Iterator, Countable
    */
   public function __construct($string)
   {
-    $this->string = strval($string);
+    $this->string = (string) $string;
   }
 
   /**
@@ -177,7 +177,7 @@ class TeamSpeak3_Helper_String implements ArrayAccess, Iterator, Countable
    * Returns true if the string contains $pattern.
    *
    * @param  string  $pattern
-   * @param  booean  $regexp
+   * @param  boolean $regexp
    * @return boolean
    */
   public function contains($pattern, $regexp = FALSE)
@@ -270,7 +270,7 @@ class TeamSpeak3_Helper_String implements ArrayAccess, Iterator, Countable
 
     $total = count($sections);
     $first = intval($first);
-    $last = intval($last);
+    $last  = intval($last);
 
     if($first > $total) return null;
     if($first > $last) $last = $first;
@@ -393,7 +393,7 @@ class TeamSpeak3_Helper_String implements ArrayAccess, Iterator, Countable
    */
   public function isInt()
   {
-    return (is_numeric($this->string) && !$this->contains(".")) ? TRUE : FALSE;
+    return (is_numeric($this->string) && !$this->contains(".") && !$this->contains("x")) ? TRUE : FALSE;
   }
 
   /**
@@ -491,7 +491,7 @@ class TeamSpeak3_Helper_String implements ArrayAccess, Iterator, Countable
   /**
    * Decodes the string with MIME base64 and returns the result as an TeamSpeak3_Helper_String
    *
-   * @param  string
+   * @param  string $base64
    * @return TeamSpeak3_Helper_String
    */
   public static function fromBase64($base64)
@@ -519,7 +519,7 @@ class TeamSpeak3_Helper_String implements ArrayAccess, Iterator, Countable
   /**
    * Returns the TeamSpeak3_Helper_String based on a given hex value.
    *
-   * @param  string
+   * @param  string $hex
    * @throws TeamSpeak3_Helper_Exception
    * @return TeamSpeak3_Helper_String
    */
@@ -550,7 +550,7 @@ class TeamSpeak3_Helper_String implements ArrayAccess, Iterator, Countable
     $utf8_accents = array(
       "à" => "a",
       "ô" => "o",
-      "Ä?" => "d",
+      "Ä" => "d",
       "ḟ" => "f",
       "ë" => "e",
       "Å¡" => "s",
@@ -560,9 +560,9 @@ class TeamSpeak3_Helper_String implements ArrayAccess, Iterator, Countable
       "Å™" => "r",
       "È›" => "t",
       "ň" => "n",
-      "Ä?" => "a",
+      "Ä" => "a",
       "Ä·" => "k",
-      "Å?" => "s",
+      "Å" => "s",
       "ỳ" => "y",
       "ņ" => "n",
       "ĺ" => "l",
@@ -573,7 +573,7 @@ class TeamSpeak3_Helper_String implements ArrayAccess, Iterator, Countable
       "Ä›" => "e",
       "é" => "e",
       "ç" => "c",
-      "�" => "w",
+      "áº" => "w",
       "Ä‹" => "c",
       "õ" => "o",
       "ṡ" => "s",
@@ -591,7 +591,7 @@ class TeamSpeak3_Helper_String implements ArrayAccess, Iterator, Countable
       "ŵ" => "w",
       "ṫ" => "t",
       "Å«" => "u",
-      "Ä?" => "c",
+      "Ä" => "c",
       "ö" => "oe",
       "è" => "e",
       "Å·" => "y",
@@ -622,7 +622,7 @@ class TeamSpeak3_Helper_String implements ArrayAccess, Iterator, Countable
       "ñ" => "n",
       "Å„" => "n",
       "Ä¥" => "h",
-      "Ä?" => "g",
+      "Ä" => "g",
       "Ä‘" => "d",
       "ĵ" => "j",
       "ÿ" => "y",
@@ -639,8 +639,8 @@ class TeamSpeak3_Helper_String implements ArrayAccess, Iterator, Countable
       "Ä«" => "i",
       "ã" => "a",
       "Ä¡" => "g",
-      "á¹?" => "m",
-      "Å?" => "o",
+      "á¹" => "m",
+      "Å" => "o",
       "Ä©" => "i",
       "ù" => "u",
       "į" => "i",
@@ -700,7 +700,7 @@ class TeamSpeak3_Helper_String implements ArrayAccess, Iterator, Countable
       "È" => "E",
       "Ŷ" => "Y",
       "Ä„" => "A",
-      "Å?" => "L",
+      "Å" => "L",
       "Ų" => "U",
       "Å®" => "U",
       "Åž" => "S",
@@ -712,12 +712,12 @@ class TeamSpeak3_Helper_String implements ArrayAccess, Iterator, Countable
       "Ḃ" => "B",
       "Ã…" => "A",
       "Ì" => "I",
-      "Ã?" => "I",
+      "Ã" => "I",
       "Ḋ" => "D",
       "Ť" => "T",
       "Å–" => "R",
       "Ä" => "Ae",
-      "Ã?" => "I",
+      "Ã" => "I",
       "Å”" => "R",
       "Ê" => "E",
       "Ü" => "Ue",
@@ -727,15 +727,15 @@ class TeamSpeak3_Helper_String implements ArrayAccess, Iterator, Countable
       "Ń" => "N",
       "Ĥ" => "H",
       "Ĝ" => "G",
-      "Ä?" => "D",
+      "Ä" => "D",
       "Ä´" => "J",
       "Ÿ" => "Y",
       "Ũ" => "U",
       "Ŭ" => "U",
       "Ư" => "U",
       "Å¢" => "T",
-      "Ã?" => "Y",
-      "Å?" => "O",
+      "Ã" => "Y",
+      "Å" => "O",
       "Â" => "A",
       "Ľ" => "L",
       "Ẅ" => "W",
@@ -749,10 +749,10 @@ class TeamSpeak3_Helper_String implements ArrayAccess, Iterator, Countable
       "Ù" => "U",
       "Ä®" => "I",
       "Ź" => "Z",
-      "Ã?" => "A",
+      "Ã" => "A",
       "Û" => "U",
       "Þ" => "Th",
-      "Ã?" => "Dh",
+      "Ã" => "Dh",
       "Æ" => "Ae",
       "Ä”" => "E",
       "Å’" => "Oe",

+ 4 - 4
protocol/TeamSpeak3/Helper/Uri.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Uri.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Uri.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */
@@ -155,7 +155,7 @@ class TeamSpeak3_Helper_Uri
     $this->query = (isset($matches[6])) ? $matches[6] : '';
     $this->fragment = (isset($matches[8])) ? $matches[8] : '';
 
-    $status = @preg_match("~^(([^:@]*)(:([^@]*))?@)?([^:]+)(:(.*))?$~", (isset($matches[3])) ? $matches[3] : "", $matches);
+    $status = @preg_match("~^(([^:@]*)(:([^@]*))?@)?((?(?=[[])[[][^]]+[]]|[^:]+))(:(.*))?$~", (isset($matches[3])) ? $matches[3] : "", $matches);
 
     if($status === FALSE)
     {
@@ -166,7 +166,7 @@ class TeamSpeak3_Helper_Uri
 
     $this->user = isset($matches[2]) ? $matches[2] : "";
     $this->pass = isset($matches[4]) ? $matches[4] : "";
-    $this->host = isset($matches[5]) ? $matches[5] : "";
+    $this->host = isset($matches[5]) === TRUE ? preg_replace('~^\[([^]]+)\]$~', '\1', $matches[5]) : "";
     $this->port = isset($matches[7]) ? $matches[7] : "";
   }
 

+ 3 - 4
protocol/TeamSpeak3/Node/Abstract.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Abstract.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Abstract.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */
@@ -229,7 +229,6 @@ abstract class TeamSpeak3_Node_Abstract implements RecursiveIterator, ArrayAcces
 
         $props = $node->getInfo(FALSE);
         $props = array_intersect_key($props, $rules);
-        $match = TRUE;
 
         foreach($props as $key => $val)
         {
@@ -403,7 +402,7 @@ abstract class TeamSpeak3_Node_Abstract implements RecursiveIterator, ArrayAcces
    */
   protected function getStorage($key, $default = null)
   {
-    return (array_key_exists($key, $this->storage) && !empty($this->storage[$key])) ? $this->storage[$key] : $default;
+    return !empty($this->storage[$key]) ? $this->storage[$key] : $default;
   }
 
   /**

+ 16 - 16
protocol/TeamSpeak3/Node/Channel.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Channel.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Channel.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */
@@ -168,7 +168,7 @@ class TeamSpeak3_Node_Channel extends TeamSpeak3_Node_Abstract
    *
    * @param  integer $cldbid
    * @param  boolean $permsid
-   * @return void
+   * @return array
    */
   public function clientPermList($cldbid, $permsid = FALSE)
   {
@@ -186,7 +186,7 @@ class TeamSpeak3_Node_Channel extends TeamSpeak3_Node_Abstract
    */
   public function clientPermAssign($cldbid, $permid, $permvalue)
   {
-    return $this->getParent()->channelClientPermAssign($this->getId(), $cldbid, $permid, $permvalue);
+    $this->getParent()->channelClientPermAssign($this->getId(), $cldbid, $permid, $permvalue);
   }
 
   /**
@@ -196,7 +196,7 @@ class TeamSpeak3_Node_Channel extends TeamSpeak3_Node_Abstract
    */
   public function clientPermAssignByName($cldbid, $permname, $permvalue)
   {
-    return $this->clientPermAssign($cldbid, $permname, $permvalue);
+    $this->clientPermAssign($cldbid, $permname, $permvalue);
   }
 
   /**
@@ -208,7 +208,7 @@ class TeamSpeak3_Node_Channel extends TeamSpeak3_Node_Abstract
    */
   public function clientPermRemove($cldbid, $permid)
   {
-    return $this->getParent()->channelClientPermRemove($this->getId(), $cldbid, $permid);
+    $this->getParent()->channelClientPermRemove($this->getId(), $cldbid, $permid);
   }
 
   /**
@@ -218,7 +218,7 @@ class TeamSpeak3_Node_Channel extends TeamSpeak3_Node_Abstract
    */
   public function clientPermRemoveByName($cldbid, $permname)
   {
-    return $this->clientPermRemove($cldbid, $permname);
+    $this->clientPermRemove($cldbid, $permname);
   }
 
   /**
@@ -242,7 +242,7 @@ class TeamSpeak3_Node_Channel extends TeamSpeak3_Node_Abstract
    */
   public function permAssign($permid, $permvalue)
   {
-    return $this->getParent()->channelPermAssign($this->getId(), $permid, $permvalue);
+    $this->getParent()->channelPermAssign($this->getId(), $permid, $permvalue);
   }
 
   /**
@@ -252,7 +252,7 @@ class TeamSpeak3_Node_Channel extends TeamSpeak3_Node_Abstract
    */
   public function permAssignByName($permname, $permvalue)
   {
-    return $this->permAssign($permname, $permvalue);
+    $this->permAssign($permname, $permvalue);
   }
 
   /**
@@ -263,7 +263,7 @@ class TeamSpeak3_Node_Channel extends TeamSpeak3_Node_Abstract
    */
   public function permRemove($permid)
   {
-    return $this->getParent()->channelPermRemove($this->getId(), $permid);
+    $this->getParent()->channelPermRemove($this->getId(), $permid);
   }
 
   /**
@@ -273,7 +273,7 @@ class TeamSpeak3_Node_Channel extends TeamSpeak3_Node_Abstract
    */
   public function permRemoveByName($permname)
   {
-    return $this->permRemove($permname);
+    $this->permRemove($permname);
   }
 
   /**
@@ -282,7 +282,7 @@ class TeamSpeak3_Node_Channel extends TeamSpeak3_Node_Abstract
    * @param  string  $cpw
    * @param  string  $path
    * @param  boolean $recursive
-   * @return void
+   * @return array
    */
   public function fileList($cpw = "", $path = "/", $recursive = FALSE)
   {
@@ -314,7 +314,7 @@ class TeamSpeak3_Node_Channel extends TeamSpeak3_Node_Abstract
    */
   public function fileRename($cpw = "", $oldname = "/", $newname = "/", $tcid = null, $tcpw = null)
   {
-    return $this->getParent()->channelFileRename($this->getId(), $cpw, $oldname, $newname, $tcid, $tcpw);
+    $this->getParent()->channelFileRename($this->getId(), $cpw, $oldname, $newname, $tcid, $tcpw);
   }
 
   /**
@@ -326,7 +326,7 @@ class TeamSpeak3_Node_Channel extends TeamSpeak3_Node_Abstract
    */
   public function fileDelete($cpw = "", $name = "/")
   {
-    return $this->getParent()->channelFileDelete($this->getId(), $cpw, $name);
+    $this->getParent()->channelFileDelete($this->getId(), $cpw, $name);
   }
 
   /**
@@ -338,7 +338,7 @@ class TeamSpeak3_Node_Channel extends TeamSpeak3_Node_Abstract
    */
   public function dirCreate($cpw = "", $dirname = "/")
   {
-    return $this->getParent()->channelDirCreate($this->getId(), $cpw, $dirname);
+    $this->getParent()->channelDirCreate($this->getId(), $cpw, $dirname);
   }
 
   /**
@@ -401,7 +401,7 @@ class TeamSpeak3_Node_Channel extends TeamSpeak3_Node_Abstract
     if($this->iconIsLocal("channel_icon_id") || $this["channel_icon_id"] == 0) return;
 
     $download = $this->getParent()->transferInitDownload(rand(0x0000, 0xFFFF), 0, $this->iconGetName("channel_icon_id"));
-    $transfer = TeamSpeak3::factory("filetransfer://" . $download["host"] . ":" . $download["port"]);
+    $transfer = TeamSpeak3::factory("filetransfer://" . (strstr($download["host"], ":") !== FALSE ? "[" . $download["host"] . "]" : $download["host"]) . ":" . $download["port"]);
 
     return $transfer->download($download["ftkey"], $download["size"]);
   }

+ 8 - 8
protocol/TeamSpeak3/Node/Channelgroup.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Channelgroup.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Channelgroup.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */
@@ -61,7 +61,7 @@ class TeamSpeak3_Node_Channelgroup extends TeamSpeak3_Node_Abstract
    */
   public function rename($name)
   {
-    return $this->getParent()->channelGroupRename($this->getId(), $name);
+    $this->getParent()->channelGroupRename($this->getId(), $name);
   }
 
   /**
@@ -110,7 +110,7 @@ class TeamSpeak3_Node_Channelgroup extends TeamSpeak3_Node_Abstract
    */
   public function permAssign($permid, $permvalue)
   {
-    return $this->getParent()->channelGroupPermAssign($this->getId(), $permid, $permvalue);
+    $this->getParent()->channelGroupPermAssign($this->getId(), $permid, $permvalue);
   }
 
   /**
@@ -120,7 +120,7 @@ class TeamSpeak3_Node_Channelgroup extends TeamSpeak3_Node_Abstract
    */
   public function permAssignByName($permname, $permvalue)
   {
-    return $this->permAssign($permname, $permvalue);
+    $this->permAssign($permname, $permvalue);
   }
 
   /**
@@ -132,7 +132,7 @@ class TeamSpeak3_Node_Channelgroup extends TeamSpeak3_Node_Abstract
    */
   public function permRemove($permid)
   {
-    return $this->getParent()->channelGroupPermRemove($this->getId(), $permid);
+    $this->getParent()->channelGroupPermRemove($this->getId(), $permid);
   }
 
   /**
@@ -142,7 +142,7 @@ class TeamSpeak3_Node_Channelgroup extends TeamSpeak3_Node_Abstract
    */
   public function permRemoveByName($permname)
   {
-    return $this->permRemove($permname);
+    $this->permRemove($permname);
   }
 
   /**
@@ -210,7 +210,7 @@ class TeamSpeak3_Node_Channelgroup extends TeamSpeak3_Node_Abstract
     if($this->iconIsLocal("iconid") || $this["iconid"] == 0) return;
 
     $download = $this->getParent()->transferInitDownload(rand(0x0000, 0xFFFF), 0, $this->iconGetName("iconid"));
-    $transfer = TeamSpeak3::factory("filetransfer://" . $download["host"] . ":" . $download["port"]);
+    $transfer = TeamSpeak3::factory("filetransfer://" . (strstr($download["host"], ":") !== FALSE ? "[" . $download["host"] . "]" : $download["host"]) . ":" . $download["port"]);
 
     return $transfer->download($download["ftkey"], $download["size"]);
   }

+ 18 - 18
protocol/TeamSpeak3/Node/Client.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Client.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Client.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */
@@ -75,7 +75,7 @@ class TeamSpeak3_Node_Client extends TeamSpeak3_Node_Abstract
    */
   public function modifyDb(array $properties)
   {
-    return $this->getParent()->clientModifyDb($this["client_database_id"], $properties);
+    $this->getParent()->clientModifyDb($this["client_database_id"], $properties);
   }
 
   /**
@@ -85,7 +85,7 @@ class TeamSpeak3_Node_Client extends TeamSpeak3_Node_Abstract
    */
   public function deleteDb()
   {
-    return $this->getParent()->clientDeleteDb($this["client_database_id"]);
+    $this->getParent()->clientDeleteDb($this["client_database_id"]);
   }
 
   /**
@@ -118,7 +118,7 @@ class TeamSpeak3_Node_Client extends TeamSpeak3_Node_Abstract
    */
   public function move($cid, $cpw = null)
   {
-    return $this->getParent()->clientMove($this->getId(), $cid, $cpw);
+    $this->getParent()->clientMove($this->getId(), $cid, $cpw);
   }
 
   /**
@@ -130,7 +130,7 @@ class TeamSpeak3_Node_Client extends TeamSpeak3_Node_Abstract
    */
   public function kick($reasonid = TeamSpeak3::KICK_CHANNEL, $reasonmsg = null)
   {
-    return $this->getParent()->clientKick($this->getId(), $reasonid, $reasonmsg);
+    $this->getParent()->clientKick($this->getId(), $reasonid, $reasonmsg);
   }
 
   /**
@@ -141,7 +141,7 @@ class TeamSpeak3_Node_Client extends TeamSpeak3_Node_Abstract
    */
   public function poke($msg)
   {
-    return $this->getParent()->clientPoke($this->getId(), $msg);
+    $this->getParent()->clientPoke($this->getId(), $msg);
   }
 
   /**
@@ -200,7 +200,7 @@ class TeamSpeak3_Node_Client extends TeamSpeak3_Node_Abstract
    */
   public function permAssign($permid, $permvalue, $permskip = FALSE)
   {
-    return $this->getParent()->clientPermAssign($this["client_database_id"], $permid, $permvalue, $permskip);
+    $this->getParent()->clientPermAssign($this["client_database_id"], $permid, $permvalue, $permskip);
   }
 
   /**
@@ -210,7 +210,7 @@ class TeamSpeak3_Node_Client extends TeamSpeak3_Node_Abstract
    */
   public function permAssignByName($permname, $permvalue, $permskip = FALSE)
   {
-    return $this->permAssign($permname, $permvalue, $permskip);
+    $this->permAssign($permname, $permvalue, $permskip);
   }
 
   /**
@@ -221,7 +221,7 @@ class TeamSpeak3_Node_Client extends TeamSpeak3_Node_Abstract
    */
   public function permRemove($permid)
   {
-    return $this->getParent()->clientPermRemove($this["client_database_id"], $permid);
+    $this->getParent()->clientPermRemove($this["client_database_id"], $permid);
   }
 
   /**
@@ -231,7 +231,7 @@ class TeamSpeak3_Node_Client extends TeamSpeak3_Node_Abstract
    */
   public function permRemoveByName($permname)
   {
-    return $this->permRemove($permname);
+    $this->permRemove($permname);
   }
 
   /**
@@ -243,7 +243,7 @@ class TeamSpeak3_Node_Client extends TeamSpeak3_Node_Abstract
    */
   public function setChannelGroup($cid, $cgid)
   {
-    return $this->getParent()->clientSetChannelGroup($this["client_database_id"], $cid, $cgid);
+    $this->getParent()->clientSetChannelGroup($this["client_database_id"], $cid, $cgid);
   }
 
   /**
@@ -254,7 +254,7 @@ class TeamSpeak3_Node_Client extends TeamSpeak3_Node_Abstract
    */
   public function addServerGroup($sgid)
   {
-    return $this->getParent()->serverGroupClientAdd($sgid, $this["client_database_id"]);
+    $this->getParent()->serverGroupClientAdd($sgid, $this["client_database_id"]);
   }
 
   /**
@@ -265,7 +265,7 @@ class TeamSpeak3_Node_Client extends TeamSpeak3_Node_Abstract
    */
   public function remServerGroup($sgid)
   {
-    return $this->getParent()->serverGroupClientDel($sgid, $this["client_database_id"]);
+    $this->getParent()->serverGroupClientDel($sgid, $this["client_database_id"]);
   }
 
   /**
@@ -285,10 +285,10 @@ class TeamSpeak3_Node_Client extends TeamSpeak3_Node_Abstract
    */
   public function avatarDownload()
   {
-    if($this["client_flag_avatar"] == 0) return;
+    if($this["client_flag_avatar"] == NULL) return;
 
     $download = $this->getParent()->transferInitDownload(rand(0x0000, 0xFFFF), 0, $this->avatarGetName());
-    $transfer = TeamSpeak3::factory("filetransfer://" . $download["host"] . ":" . $download["port"]);
+    $transfer = TeamSpeak3::factory("filetransfer://" . (strstr($download["host"], ":") !== FALSE ? "[" . $download["host"] . "]" : $download["host"]) . ":" . $download["port"]);
 
     return $transfer->download($download["ftkey"], $download["size"]);
   }
@@ -340,7 +340,7 @@ class TeamSpeak3_Node_Client extends TeamSpeak3_Node_Abstract
     if($this->iconIsLocal("client_icon_id") || $this["client_icon_id"] == 0) return;
 
     $download = $this->getParent()->transferInitDownload(rand(0x0000, 0xFFFF), 0, $this->iconGetName("client_icon_id"));
-    $transfer = TeamSpeak3::factory("filetransfer://" . $download["host"] . ":" . $download["port"]);
+    $transfer = TeamSpeak3::factory("filetransfer://" . (strstr($download["host"], ":") !== FALSE ? "[" . $download["host"] . "]" : $download["host"]) . ":" . $download["port"]);
 
     return $transfer->download($download["ftkey"], $download["size"]);
   }
@@ -362,7 +362,7 @@ class TeamSpeak3_Node_Client extends TeamSpeak3_Node_Abstract
    */
   protected function fetchNodeInfo()
   {
-    if($this["client_type"] == 1) return;
+    if($this->offsetExists("client_type") && $this["client_type"] == 1) return;
 
     $this->nodeInfo = array_merge($this->nodeInfo, $this->execute("clientinfo", array("clid" => $this->getId()))->toList());
   }

+ 2 - 2
protocol/TeamSpeak3/Node/Exception.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Exception.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Exception.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 17 - 8
protocol/TeamSpeak3/Node/Host.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Host.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Host.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */
@@ -125,7 +125,7 @@ class TeamSpeak3_Node_Host extends TeamSpeak3_Node_Abstract
       $this->version = $this->request("version")->toList();
     }
 
-    return ($ident && array_key_exists($ident, $this->version)) ? $this->version[$ident] : $this->version;
+    return ($ident && isset($this->version[$ident])) ? $this->version[$ident] : $this->version;
   }
 
   /**
@@ -467,9 +467,9 @@ class TeamSpeak3_Node_Host extends TeamSpeak3_Node_Abstract
    *
    * @return array
    */
-  public function bindingList()
+  public function bindingList($subsystem = "voice")
   {
-    return $this->request("bindinglist")->toArray();
+    return $this->execute("bindinglist", array("subsystem" => $subsystem))->toArray();
   }
 
   /**
@@ -906,7 +906,7 @@ class TeamSpeak3_Node_Host extends TeamSpeak3_Node_Abstract
   {
     $this->whoami();
 
-    $this->whoami[$ident] = (is_numeric($value)) ? intval($value) : TeamSpeak3_Helper_String::factory($value);
+    $this->whoami[$ident] = (is_numeric($value)) ? (int) $value : TeamSpeak3_Helper_String::factory($value);
   }
 
   /**
@@ -1175,8 +1175,17 @@ class TeamSpeak3_Node_Host extends TeamSpeak3_Node_Abstract
     {
       $func = array_shift($server);
       $args = array_shift($server);
-
-      call_user_func_array(array($this, $func), $args);
+      
+      try
+      {
+        call_user_func_array(array($this, $func), $args);
+      }
+      catch(Exception $e)
+      {
+        $class = get_class($e);
+        
+        throw new $class($e->getMessage(), $e->getCode());
+      }
     }
   }
 

+ 8 - 6
protocol/TeamSpeak3/Node/Server.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Server.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Server.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */
@@ -137,7 +137,7 @@ class TeamSpeak3_Node_Server extends TeamSpeak3_Node_Abstract
     $cid = $this->execute("channelcreate", $properties)->toList();
     $this->channelListReset();
 
-    if(!isset($properties["client_flag_permanent"]) && !isset($properties["client_flag_semi_permanent"]))
+    if(!isset($properties["channel_flag_permanent"]) && !isset($properties["channel_flag_semi_permanent"]))
     {
       $this->getParent()->whoamiSet("client_channel_id", $cid["cid"]);
     }
@@ -501,7 +501,9 @@ class TeamSpeak3_Node_Server extends TeamSpeak3_Node_Abstract
    */
   public function channelFileInfo($cid, $cpw = "", $name = "/")
   {
-    return array_pop($this->execute("ftgetfileinfo", array("cid" => $cid, "cpw" => $cpw, "name" => $name))->toArray());
+    $info = $this->execute("ftgetfileinfo", array("cid" => $cid, "cpw" => $cpw, "name" => $name))->toArray();
+    
+    return array_pop($info);
   }
 
   /**
@@ -1731,7 +1733,7 @@ class TeamSpeak3_Node_Server extends TeamSpeak3_Node_Abstract
     if($this->iconIsLocal("virtualserver_icon_id") || $this["virtualserver_icon_id"] == 0) return;
 
     $download = $this->transferInitDownload(rand(0x0000, 0xFFFF), 0, $this->iconGetName("virtualserver_icon_id"));
-    $transfer = TeamSpeak3::factory("filetransfer://" . $download["host"] . ":" . $download["port"]);
+    $transfer = TeamSpeak3::factory("filetransfer://" . (strstr($download["host"], ":") !== FALSE ? "[" . $download["host"] . "]" : $download["host"]) . ":" . $download["port"]);
 
     return $transfer->download($download["ftkey"], $download["size"]);
   }
@@ -1748,7 +1750,7 @@ class TeamSpeak3_Node_Server extends TeamSpeak3_Node_Abstract
     $size = strlen($data);
 
     $upload   = $this->transferInitUpload(rand(0x0000, 0xFFFF), 0, "/icon_" . $crc, $size);
-    $transfer = TeamSpeak3::factory("filetransfer://" . $upload["host"] . ":" . $upload["port"]);
+    $transfer = TeamSpeak3::factory("filetransfer://" . (strstr($upload["host"], ":") !== FALSE ? "[" . $upload["host"] . "]" : $upload["host"]) . ":" . $upload["port"]);
 
     $transfer->upload($upload["ftkey"], $upload["seekpos"], $data);
 

+ 10 - 10
protocol/TeamSpeak3/Node/Servergroup.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Servergroup.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: Servergroup.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */
@@ -61,7 +61,7 @@ class TeamSpeak3_Node_Servergroup extends TeamSpeak3_Node_Abstract
    */
   public function rename($name)
   {
-    return $this->getParent()->serverGroupRename($this->getId(), $name);
+    $this->getParent()->serverGroupRename($this->getId(), $name);
   }
 
   /**
@@ -112,7 +112,7 @@ class TeamSpeak3_Node_Servergroup extends TeamSpeak3_Node_Abstract
    */
   public function permAssign($permid, $permvalue, $permnegated = FALSE, $permskip = FALSE)
   {
-    return $this->getParent()->serverGroupPermAssign($this->getId(), $permid, $permvalue, $permnegated, $permskip);
+    $this->getParent()->serverGroupPermAssign($this->getId(), $permid, $permvalue, $permnegated, $permskip);
   }
 
   /**
@@ -122,7 +122,7 @@ class TeamSpeak3_Node_Servergroup extends TeamSpeak3_Node_Abstract
    */
   public function permAssignByName($permname, $permvalue, $permnegated = FALSE, $permskip = FALSE)
   {
-    return $this->permAssign($permname, $permvalue, $permnegated, $permskip);
+    $this->permAssign($permname, $permvalue, $permnegated, $permskip);
   }
 
   /**
@@ -134,7 +134,7 @@ class TeamSpeak3_Node_Servergroup extends TeamSpeak3_Node_Abstract
    */
   public function permRemove($permid)
   {
-    return $this->getParent()->serverGroupPermRemove($this->getId(), $permid);
+    $this->getParent()->serverGroupPermRemove($this->getId(), $permid);
   }
 
   /**
@@ -144,7 +144,7 @@ class TeamSpeak3_Node_Servergroup extends TeamSpeak3_Node_Abstract
    */
   public function permRemoveByName($permname)
   {
-    return $this->permRemove($permname);
+    $this->permRemove($permname);
   }
 
   /**
@@ -166,7 +166,7 @@ class TeamSpeak3_Node_Servergroup extends TeamSpeak3_Node_Abstract
    */
   public function clientAdd($cldbid)
   {
-    return $this->getParent()->serverGroupClientAdd($this->getId(), $cldbid);
+    $this->getParent()->serverGroupClientAdd($this->getId(), $cldbid);
   }
 
   /**
@@ -177,7 +177,7 @@ class TeamSpeak3_Node_Servergroup extends TeamSpeak3_Node_Abstract
    */
   public function clientDel($cldbid)
   {
-    return $this->getParent()->serverGroupClientDel($this->getId(), $cldbid);
+    $this->getParent()->serverGroupClientDel($this->getId(), $cldbid);
   }
 
   /**
@@ -234,7 +234,7 @@ class TeamSpeak3_Node_Servergroup extends TeamSpeak3_Node_Abstract
     if($this->iconIsLocal("iconid") || $this["iconid"] == 0) return;
 
     $download = $this->getParent()->transferInitDownload(rand(0x0000, 0xFFFF), 0, $this->iconGetName("iconid"));
-    $transfer = TeamSpeak3::factory("filetransfer://" . $download["host"] . ":" . $download["port"]);
+    $transfer = TeamSpeak3::factory("filetransfer://" . (strstr($download["host"], ":") !== FALSE ? "[" . $download["host"] . "]" : $download["host"]) . ":" . $download["port"]);
 
     return $transfer->download($download["ftkey"], $download["size"]);
   }

+ 83 - 90
protocol/TeamSpeak3/TeamSpeak3.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: TeamSpeak3.php 10/11/2013 11:35:21 scp@orilla $
+ * $Id: TeamSpeak3.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */
@@ -59,61 +59,61 @@ class TeamSpeak3
   /**
    * TeamSpeak 3 PHP Framework version.
    */
-  const LIB_VERSION = "1.1.23";
+  const LIB_VERSION = "1.1.24";
 
   /*@
    * TeamSpeak 3 protocol separators.
    */
-  const SEPARATOR_LINE               = "\n"; //!< protocol line separator
-  const SEPARATOR_LIST               = "|";  //!< protocol list separator
-  const SEPARATOR_CELL               = " ";  //!< protocol cell separator
-  const SEPARATOR_PAIR               = "=";  //!< protocol pair separator
+  const SEPARATOR_LINE = "\n"; //!< protocol line separator
+  const SEPARATOR_LIST = "|";  //!< protocol list separator
+  const SEPARATOR_CELL = " ";  //!< protocol cell separator
+  const SEPARATOR_PAIR = "=";  //!< protocol pair separator
 
   /*@
    * TeamSpeak 3 log levels.
    */
-  const LOGLEVEL_CRITICAL            = 0x00; //!< 0: these messages stop the program
-  const LOGLEVEL_ERROR               = 0x01; //!< 1: everything that is really bad
-  const LOGLEVEL_WARNING             = 0x02; //!< 2: everything that might be bad
-  const LOGLEVEL_DEBUG               = 0x03; //!< 3: output that might help find a problem
-  const LOGLEVEL_INFO                = 0x04; //!< 4: informational output
-  const LOGLEVEL_DEVEL               = 0x05; //!< 5: development output
+  const LOGLEVEL_CRITICAL = 0x00; //!< 0: these messages stop the program
+  const LOGLEVEL_ERROR    = 0x01; //!< 1: everything that is really bad
+  const LOGLEVEL_WARNING  = 0x02; //!< 2: everything that might be bad
+  const LOGLEVEL_DEBUG    = 0x03; //!< 3: output that might help find a problem
+  const LOGLEVEL_INFO     = 0x04; //!< 4: informational output
+  const LOGLEVEL_DEVEL    = 0x05; //!< 5: development output
 
   /*@
    * TeamSpeak 3 token types.
    */
-  const TOKEN_SERVERGROUP            = 0x00; //!< 0: server group token  (id1={groupID} id2=0)
-  const TOKEN_CHANNELGROUP           = 0x01; //!< 1: channel group token (id1={groupID} id2={channelID})
+  const TOKEN_SERVERGROUP  = 0x00; //!< 0: server group token  (id1={groupID} id2=0)
+  const TOKEN_CHANNELGROUP = 0x01; //!< 1: channel group token (id1={groupID} id2={channelID})
 
   /*@
    * TeamSpeak 3 codec identifiers.
    */
-  const CODEC_SPEEX_NARROWBAND       = 0x00; //!< 0: speex narrowband     (mono, 16bit, 8kHz)
-  const CODEC_SPEEX_WIDEBAND         = 0x01; //!< 1: speex wideband       (mono, 16bit, 16kHz)
-  const CODEC_SPEEX_ULTRAWIDEBAND    = 0x02; //!< 2: speex ultra-wideband (mono, 16bit, 32kHz)
-  const CODEC_CELT_MONO              = 0x03; //!< 3: celt mono            (mono, 16bit, 48kHz)
-  const CODEC_OPUS_VOICE             = 0x04; //!< 3: opus voice           (interactive)
-  const CODEC_OPUS_MUSIC             = 0x05; //!< 3: opus music           (interactive)
+  const CODEC_SPEEX_NARROWBAND    = 0x00; //!< 0: speex narrowband     (mono, 16bit, 8kHz)
+  const CODEC_SPEEX_WIDEBAND      = 0x01; //!< 1: speex wideband       (mono, 16bit, 16kHz)
+  const CODEC_SPEEX_ULTRAWIDEBAND = 0x02; //!< 2: speex ultra-wideband (mono, 16bit, 32kHz)
+  const CODEC_CELT_MONO           = 0x03; //!< 3: celt mono            (mono, 16bit, 48kHz)
+  const CODEC_OPUS_VOICE          = 0x04; //!< 3: opus voice           (interactive)
+  const CODEC_OPUS_MUSIC          = 0x05; //!< 3: opus music           (interactive)
 
   /*@
    * TeamSpeak 3 codec encryption modes.
    */
-  const CODEC_CRYPT_INDIVIDUAL       = 0x00; //!< 0: configure per channel
-  const CODEC_CRYPT_DISABLED         = 0x01; //!< 1: globally disabled
-  const CODEC_CRYPT_ENABLED          = 0x02; //!< 2: globally enabled
+  const CODEC_CRYPT_INDIVIDUAL = 0x00; //!< 0: configure per channel
+  const CODEC_CRYPT_DISABLED   = 0x01; //!< 1: globally disabled
+  const CODEC_CRYPT_ENABLED    = 0x02; //!< 2: globally enabled
 
   /*@
    * TeamSpeak 3 kick reason types.
    */
-  const KICK_CHANNEL                 = 0x04; //!< 4: kick client from channel
-  const KICK_SERVER                  = 0x05; //!< 5: kick client from server
+  const KICK_CHANNEL = 0x04; //!< 4: kick client from channel
+  const KICK_SERVER  = 0x05; //!< 5: kick client from server
 
   /*@
    * TeamSpeak 3 text message target modes.
    */
-  const TEXTMSG_CLIENT               = 0x01; //!< 1: target is a client
-  const TEXTMSG_CHANNEL              = 0x02; //!< 2: target is a channel
-  const TEXTMSG_SERVER               = 0x03; //!< 3: target is a virtual server
+  const TEXTMSG_CLIENT  = 0x01; //!< 1: target is a client
+  const TEXTMSG_CHANNEL = 0x02; //!< 2: target is a channel
+  const TEXTMSG_SERVER  = 0x03; //!< 3: target is a virtual server
   
   /*@
    * TeamSpeak 3 plugin command target modes.
@@ -126,52 +126,52 @@ class TeamSpeak3
   /*@
    * TeamSpeak 3 host message modes.
    */
-  const HOSTMSG_NONE                 = 0x00; //!< 0: display no message
-  const HOSTMSG_LOG                  = 0x01; //!< 1: display message in chatlog
-  const HOSTMSG_MODAL                = 0x02; //!< 2: display message in modal dialog
-  const HOSTMSG_MODALQUIT            = 0x03; //!< 3: display message in modal dialog and close connection
+  const HOSTMSG_NONE      = 0x00; //!< 0: display no message
+  const HOSTMSG_LOG       = 0x01; //!< 1: display message in chatlog
+  const HOSTMSG_MODAL     = 0x02; //!< 2: display message in modal dialog
+  const HOSTMSG_MODALQUIT = 0x03; //!< 3: display message in modal dialog and close connection
 
   /*@
    * TeamSpeak 3 host banner modes.
    */
-  const HOSTBANNER_NO_ADJUST         = 0x00; //!< 0: do not adjust
-  const HOSTBANNER_IGNORE_ASPECT     = 0x01; //!< 1: adjust but ignore aspect ratio
-  const HOSTBANNER_KEEP_ASPECT       = 0x02; //!< 2: adjust and keep aspect ratio
+  const HOSTBANNER_NO_ADJUST     = 0x00; //!< 0: do not adjust
+  const HOSTBANNER_IGNORE_ASPECT = 0x01; //!< 1: adjust but ignore aspect ratio
+  const HOSTBANNER_KEEP_ASPECT   = 0x02; //!< 2: adjust and keep aspect ratio
 
   /*@
    * TeamSpeak 3 client identification types.
    */
-  const CLIENT_TYPE_REGULAR          = 0x00; //!< 0: regular client
-  const CLIENT_TYPE_SERVERQUERY      = 0x01; //!< 1: query client
+  const CLIENT_TYPE_REGULAR     = 0x00; //!< 0: regular client
+  const CLIENT_TYPE_SERVERQUERY = 0x01; //!< 1: query client
 
   /*@
    * TeamSpeak 3 permission group database types.
    */
-  const GROUP_DBTYPE_TEMPLATE        = 0x00; //!< 0: template group     (used for new virtual servers)
-  const GROUP_DBTYPE_REGULAR         = 0x01; //!< 1: regular group      (used for regular clients)
-  const GROUP_DBTYPE_SERVERQUERY     = 0x02; //!< 2: global query group (used for ServerQuery clients)
+  const GROUP_DBTYPE_TEMPLATE    = 0x00; //!< 0: template group     (used for new virtual servers)
+  const GROUP_DBTYPE_REGULAR     = 0x01; //!< 1: regular group      (used for regular clients)
+  const GROUP_DBTYPE_SERVERQUERY = 0x02; //!< 2: global query group (used for ServerQuery clients)
 
   /*@
    * TeamSpeak 3 permission group name modes.
    */
-  const GROUP_NAMEMODE_HIDDEN        = 0x00; //!< 0: display no name
-  const GROUP_NAMEMODE_BEFORE        = 0x01; //!< 1: display name before client nickname
-  const GROUP_NAMEMODE_BEHIND        = 0x02; //!< 2: display name after client nickname
+  const GROUP_NAMEMODE_HIDDEN = 0x00; //!< 0: display no name
+  const GROUP_NAMEMODE_BEFORE = 0x01; //!< 1: display name before client nickname
+  const GROUP_NAMEMODE_BEHIND = 0x02; //!< 2: display name after client nickname
 
   /*@
    * TeamSpeak 3 permission group identification types.
    */
-  const GROUP_IDENTIFIY_STRONGEST    = 0x01; //!< 1: identify most powerful group
-  const GROUP_IDENTIFIY_WEAKEST      = 0x02; //!< 2: identify weakest group
+  const GROUP_IDENTIFIY_STRONGEST = 0x01; //!< 1: identify most powerful group
+  const GROUP_IDENTIFIY_WEAKEST   = 0x02; //!< 2: identify weakest group
 
   /*@
    * TeamSpeak 3 permission types.
    */
-  const PERM_TYPE_SERVERGROUP        = 0x00; //!< 0: server group permission
-  const PERM_TYPE_CLIENT             = 0x01; //!< 1: client specific permission
-  const PERM_TYPE_CHANNEL            = 0x02; //!< 2: channel specific permission
-  const PERM_TYPE_CHANNELGROUP       = 0x03; //!< 3: channel group permission
-  const PERM_TYPE_CHANNELCLIENT      = 0x04; //!< 4: channel-client specific permission
+  const PERM_TYPE_SERVERGROUP   = 0x00; //!< 0: server group permission
+  const PERM_TYPE_CLIENT        = 0x01; //!< 1: client specific permission
+  const PERM_TYPE_CHANNEL       = 0x02; //!< 2: channel specific permission
+  const PERM_TYPE_CHANNELGROUP  = 0x03; //!< 3: channel group permission
+  const PERM_TYPE_CHANNELCLIENT = 0x04; //!< 4: channel-client specific permission
 
   /*@
    * TeamSpeak 3 permission categories.
@@ -207,49 +207,49 @@ class TeamSpeak3
   /*@
    * TeamSpeak 3 file types.
    */
-  const FILE_TYPE_DIRECTORY          = 0x00; //!< 0: file is directory
-  const FILE_TYPE_REGULAR            = 0x01; //!< 1: file is regular
+  const FILE_TYPE_DIRECTORY = 0x00; //!< 0: file is directory
+  const FILE_TYPE_REGULAR   = 0x01; //!< 1: file is regular
 
   /*@
    * TeamSpeak 3 server snapshot types.
    */
-  const SNAPSHOT_STRING              = 0x00; //!< 0: default string
-  const SNAPSHOT_BASE64              = 0x01; //!< 1: base64 string
-  const SNAPSHOT_HEXDEC              = 0x02; //!< 2: hexadecimal string
+  const SNAPSHOT_STRING = 0x00; //!< 0: default string
+  const SNAPSHOT_BASE64 = 0x01; //!< 1: base64 string
+  const SNAPSHOT_HEXDEC = 0x02; //!< 2: hexadecimal string
 
   /*@
    * TeamSpeak 3 channel spacer types.
    */
-  const SPACER_SOLIDLINE             = 0x00; //!< 0: solid line
-  const SPACER_DASHLINE              = 0x01; //!< 1: dash line
-  const SPACER_DOTLINE               = 0x02; //!< 2: dot line
-  const SPACER_DASHDOTLINE           = 0x03; //!< 3: dash dot line
-  const SPACER_DASHDOTDOTLINE        = 0x04; //!< 4: dash dot dot line
-  const SPACER_CUSTOM                = 0x05; //!< 5: custom format
+  const SPACER_SOLIDLINE      = 0x00; //!< 0: solid line
+  const SPACER_DASHLINE       = 0x01; //!< 1: dash line
+  const SPACER_DOTLINE        = 0x02; //!< 2: dot line
+  const SPACER_DASHDOTLINE    = 0x03; //!< 3: dash dot line
+  const SPACER_DASHDOTDOTLINE = 0x04; //!< 4: dash dot dot line
+  const SPACER_CUSTOM         = 0x05; //!< 5: custom format
 
   /*@
    * TeamSpeak 3 channel spacer alignments.
    */
-  const SPACER_ALIGN_LEFT            = 0x00; //!< 0: alignment left
-  const SPACER_ALIGN_RIGHT           = 0x01; //!< 1: alignment right
-  const SPACER_ALIGN_CENTER          = 0x02; //!< 2: alignment center
-  const SPACER_ALIGN_REPEAT          = 0x03; //!< 3: repeat until the whole line is filled
+  const SPACER_ALIGN_LEFT   = 0x00; //!< 0: alignment left
+  const SPACER_ALIGN_RIGHT  = 0x01; //!< 1: alignment right
+  const SPACER_ALIGN_CENTER = 0x02; //!< 2: alignment center
+  const SPACER_ALIGN_REPEAT = 0x03; //!< 3: repeat until the whole line is filled
 
   /*@
    * TeamSpeak 3 reason identifiers.
    */
-  const REASON_NONE                  = 0x00; //!<  0: no reason
-  const REASON_MOVE                  = 0x01; //!<  1: channel switched or moved
-  const REASON_SUBSCRIPTION          = 0x02; //!<  2: subscription added or removed
-  const REASON_TIMEOUT               = 0x03; //!<  3: client connection timed out
-  const REASON_CHANNEL_KICK          = 0x04; //!<  4: client kicked from channel
-  const REASON_SERVER_KICK           = 0x05; //!<  5: client kicked from server
-  const REASON_SERVER_BAN            = 0x06; //!<  6: client banned from server
-  const REASON_SERVER_STOP           = 0x07; //!<  7: server stopped
-  const REASON_DISCONNECT            = 0x08; //!<  8: client disconnected
-  const REASON_CHANNEL_UPDATE        = 0x09; //!<  9: channel information updated
-  const REASON_CHANNEL_EDIT          = 0x0A; //!< 10: channel information edited
-  const REASON_DISCONNECT_SHUTDOWN   = 0x0B; //!< 11: client disconnected on server shutdown
+  const REASON_NONE                = 0x00; //!<  0: no reason
+  const REASON_MOVE                = 0x01; //!<  1: channel switched or moved
+  const REASON_SUBSCRIPTION        = 0x02; //!<  2: subscription added or removed
+  const REASON_TIMEOUT             = 0x03; //!<  3: client connection timed out
+  const REASON_CHANNEL_KICK        = 0x04; //!<  4: client kicked from channel
+  const REASON_SERVER_KICK         = 0x05; //!<  5: client kicked from server
+  const REASON_SERVER_BAN          = 0x06; //!<  6: client banned from server
+  const REASON_SERVER_STOP         = 0x07; //!<  7: server stopped
+  const REASON_DISCONNECT          = 0x08; //!<  8: client disconnected
+  const REASON_CHANNEL_UPDATE      = 0x09; //!<  9: channel information updated
+  const REASON_CHANNEL_EDIT        = 0x0A; //!< 10: channel information edited
+  const REASON_DISCONNECT_SHUTDOWN = 0x0B; //!< 11: client disconnected on server shutdown
 
   /**
    * Stores an array containing various chars which need to be escaped while communicating
@@ -305,6 +305,8 @@ class TeamSpeak3
    * @param  string $uri
    * @return TeamSpeak3_Adapter_Abstract
    * @return TeamSpeak3_Node_Abstract
+   * @return TeamSpeak3_Node_Host
+   * @return TeamSpeak3_Node_Server
    */
   public static function factory($uri)
   {
@@ -313,7 +315,7 @@ class TeamSpeak3
     $uri = new TeamSpeak3_Helper_Uri($uri);
 
     $adapter = self::getAdapterName($uri->getScheme());
-    $options = array("host" => $uri->getHost(), "port" => $uri->getPort(), "timeout" => intval($uri->getQueryVar("timeout", 10)), "blocking" => intval($uri->getQueryVar("blocking", 1)));
+    $options = array("host" => $uri->getHost(), "port" => $uri->getPort(), "timeout" => (int) $uri->getQueryVar("timeout", 10), "blocking" => (int) $uri->getQueryVar("blocking", 1));
 
     self::loadClass($adapter);
 
@@ -328,13 +330,11 @@ class TeamSpeak3
         $node->login($uri->getUser(), $uri->getPass());
       }
 
-      /* option to pre-define nickname */
       if($uri->hasQueryVar("nickname"))
       {
         $node->setPredefinedQueryName($uri->getQueryVar("nickname"));
       }
 
-      /* flag to use offline servers in virtual mode */
       if($uri->getFragment() == "use_offline_as_virtual")
       {
         $node->setUseOfflineAsVirtual(TRUE);
@@ -344,7 +344,6 @@ class TeamSpeak3
         $node->setUseOfflineAsVirtual($uri->getQueryVar("use_offline_as_virtual") ? TRUE : FALSE);
       }
 
-      /* flag to fetch clients before sub-channels */
       if($uri->getFragment() == "clients_before_channels")
       {
         $node->setLoadClientlistFirst(TRUE);
@@ -354,7 +353,6 @@ class TeamSpeak3
         $node->setLoadClientlistFirst($uri->getQueryVar("clients_before_channels") ? TRUE : FALSE);
       }
 
-      /* flag to hide ServerQuery clients */
       if($uri->getFragment() == "no_query_clients")
       {
         $node->setExcludeQueryClients(TRUE);
@@ -364,7 +362,6 @@ class TeamSpeak3
         $node->setExcludeQueryClients($uri->getQueryVar("no_query_clients") ? TRUE : FALSE);
       }
 
-      /* access server node object */
       if($uri->hasQueryVar("server_id"))
       {
         $node = $node->serverGetById($uri->getQueryVar("server_id"));
@@ -386,10 +383,8 @@ class TeamSpeak3
         $node = $node->serverGetByTSDNS($uri->getQueryVar("server_tsdns"));
       }
 
-      /* direct access to node objects */
       if($node instanceof TeamSpeak3_Node_Server)
       {
-        /* access channel node object */
         if($uri->hasQueryVar("channel_id"))
         {
           $node = $node->channelGetById($uri->getQueryVar("channel_id"));
@@ -399,7 +394,6 @@ class TeamSpeak3
           $node = $node->channelGetByName($uri->getQueryVar("channel_name"));
         }
 
-        /* access client node object */
         if($uri->hasQueryVar("client_id"))
         {
           $node = $node->clientGetById($uri->getQueryVar("client_id"));
@@ -574,8 +568,7 @@ class TeamSpeak3
     ob_start();
     var_dump($var);
 
-    $output = ob_get_clean();
-    $output = preg_replace("/\]\=\>\n(\s+)/m", "] => ", $output);
+    $output = preg_replace("/\]\=\>\n(\s+)/m", "] => ", ob_get_clean());
 
     if(PHP_SAPI == "cli")
     {
@@ -583,7 +576,7 @@ class TeamSpeak3
     }
     else
     {
-      $output = "<pre>" . htmlspecialchars($output, ENT_QUOTES) . "</pre>";
+      $output = "<pre>" . htmlspecialchars($output, ENT_QUOTES, "utf-8") . "</pre>";
     }
 
     if($echo) echo($output);

+ 6 - 4
protocol/TeamSpeak3/Transport/Abstract.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Abstract.php 10/11/2013 11:35:22 scp@orilla $
+ * $Id: Abstract.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */
@@ -253,7 +253,8 @@ abstract class TeamSpeak3_Transport_Abstract
   {
     if(!$this->isConnected() || $this->config["blocking"]) return;
 
-    do {
+    do
+    {
       $read = array($this->stream);
       $null = null;
 
@@ -263,6 +264,7 @@ abstract class TeamSpeak3_Transport_Abstract
       }
 
       $time = $time+$this->config["timeout"];
-    } while(@stream_select($read, $null, $null, $this->config["timeout"]) == 0);
+    }
+    while(@stream_select($read, $null, $null, $this->config["timeout"]) == 0);
   }
 }

+ 2 - 2
protocol/TeamSpeak3/Transport/Exception.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Exception.php 10/11/2013 11:35:22 scp@orilla $
+ * $Id: Exception.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 4 - 4
protocol/TeamSpeak3/Transport/TCP.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: TCP.php 10/11/2013 11:35:22 scp@orilla $
+ * $Id: TCP.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */
@@ -44,8 +44,8 @@ class TeamSpeak3_Transport_TCP extends TeamSpeak3_Transport_Abstract
     $host = strval($this->config["host"]);
     $port = strval($this->config["port"]);
 
-    $address = "tcp://" . $host . ":" . $port;
-    $timeout = intval($this->config["timeout"]);
+    $address = "tcp://" . (strstr($host, ":") !== FALSE ? "[" . $host . "]" : $host) . ":" . $port;
+    $timeout = (int) $this->config["timeout"];
 
     $this->stream = @stream_socket_client($address, $errno, $errstr, $timeout);
 

+ 4 - 4
protocol/TeamSpeak3/Transport/UDP.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: UDP.php 10/11/2013 11:35:22 scp@orilla $
+ * $Id: UDP.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */
@@ -44,8 +44,8 @@ class TeamSpeak3_Transport_UDP extends TeamSpeak3_Transport_Abstract
     $host = strval($this->config["host"]);
     $port = strval($this->config["port"]);
 
-    $address = "udp://" . $host . ":" . $port;
-    $timeout = intval($this->config["timeout"]);
+    $address = "udp://" . (strstr($host, ":") !== FALSE ? "[" . $host . "]" : $host) . ":" . $port;
+    $timeout = (int) $this->config["timeout"];
 
     $this->stream = @stream_socket_client($address, $errno, $errstr, $timeout);
 

+ 8 - 16
protocol/TeamSpeak3/Viewer/Html.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Text.php 10/11/2013 11:35:22 scp@orilla $
+ * $Id: Text.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */
@@ -36,15 +36,7 @@ class TeamSpeak3_Viewer_Html implements TeamSpeak3_Viewer_Interface
    *
    * @var string
    */
-    protected $pattern = "<div id='%0' class='%1' summary='%2' style='display:table;'>
-							<div class='%3' style='display:table-row;'>
-								<div class='%4' style='display:table-cell;line-height:14px;vertical-align:middle;'>&nbsp;%5</div>
-								<div class='%6' title='%7' style='display:table-cell;line-height:14px;vertical-align:middle;'>&nbsp;%8
-									<span style='position:relative;bottom:3px;cursor:default;'><b>%9</b></span>
-								</div>
-								<div class='%10' style='display:table-cell;line-height:14px;vertical-align:middle;'>&nbsp;%11%12</div>
-							</div>
-						</div>";
+  protected $pattern = "<table id='%0' class='%1' summary='%2'><tr class='%3'><td class='%4'>%5</td><td class='%6' title='%7'>%8 %9</td><td class='%10'>%11%12</td></tr></table>\n";
 
   /**
    * The TeamSpeak3_Node_Abstract object which is currently processed.
@@ -426,7 +418,7 @@ class TeamSpeak3_Viewer_Html implements TeamSpeak3_Viewer_Interface
 
           if($this->ftclient == "data:image")
           {
-            $download = TeamSpeak3::factory("filetransfer://" . $download["host"] . ":" . $download["port"])->download($download["ftkey"], $download["size"]);
+            $download = TeamSpeak3::factory("filetransfer://" . (strstr($download["host"], ":") !== FALSE ? "[" . $download["host"] . "]" : $download["host"]) . ":" . $download["port"])->download($download["ftkey"], $download["size"]);
           }
 
           $this->cacheIcon[$this->currObj["virtualserver_icon_id"]] = $download;
@@ -496,7 +488,7 @@ class TeamSpeak3_Viewer_Html implements TeamSpeak3_Viewer_Interface
 
           if($this->ftclient == "data:image")
           {
-            $download = TeamSpeak3::factory("filetransfer://" . $download["host"] . ":" . $download["port"])->download($download["ftkey"], $download["size"]);
+            $download = TeamSpeak3::factory("filetransfer://" . (strstr($download["host"], ":") !== FALSE ? "[" . $download["host"] . "]" : $download["host"]) . ":" . $download["port"])->download($download["ftkey"], $download["size"]);
           }
 
           $this->cacheIcon[$this->currObj["channel_icon_id"]] = $download;
@@ -570,7 +562,7 @@ class TeamSpeak3_Viewer_Html implements TeamSpeak3_Viewer_Interface
 
           if($this->ftclient == "data:image")
           {
-            $download = TeamSpeak3::factory("filetransfer://" . $download["host"] . ":" . $download["port"])->download($download["ftkey"], $download["size"]);
+            $download = TeamSpeak3::factory("filetransfer://" . (strstr($download["host"], ":") !== FALSE ? "[" . $download["host"] . "]" : $download["host"]) . ":" . $download["port"])->download($download["ftkey"], $download["size"]);
           }
 
           $this->cacheIcon[$group["iconid"]] = $download;
@@ -605,7 +597,7 @@ class TeamSpeak3_Viewer_Html implements TeamSpeak3_Viewer_Interface
 
           if($this->ftclient == "data:image")
           {
-            $download = TeamSpeak3::factory("filetransfer://" . $download["host"] . ":" . $download["port"])->download($download["ftkey"], $download["size"]);
+            $download = TeamSpeak3::factory("filetransfer://" . (strstr($download["host"], ":") !== FALSE ? "[" . $download["host"] . "]" : $download["host"]) . ":" . $download["port"])->download($download["ftkey"], $download["size"]);
           }
 
           $this->cacheIcon[$this->currObj["client_icon_id"]] = $download;
@@ -673,6 +665,6 @@ class TeamSpeak3_Viewer_Html implements TeamSpeak3_Viewer_Interface
       $src = $this->flagpath;
     }
 
-    return "<img src='" . $src . $name . "' title='" . $text . "' alt='' />";
+    return "<img src='" . $src . $name . "' title='" . $text . "' alt='' align='top' />";
   }
 }

+ 2 - 2
protocol/TeamSpeak3/Viewer/Interface.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Interface.php 10/11/2013 11:35:22 scp@orilla $
+ * $Id: Interface.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */

+ 2 - 2
protocol/TeamSpeak3/Viewer/Text.php

@@ -4,7 +4,7 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Text.php 10/11/2013 11:35:22 scp@orilla $
+ * $Id: Text.php 06/06/2016 22:27:13 scp@Svens-iMac $
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  *
  * @package   TeamSpeak3
- * @version   1.1.23
+ * @version   1.1.24
  * @author    Sven 'ScP' Paulsen
  * @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
  */