tntwebsolutions/ts3query — pull request #3 by whitehat101 (2014-03-26 21:50:19+00:00)
Title: Client or Server Connection Compatibility

This pull implements features suggested in #2

The key feature in this pull is the ability to connect to a TS3 Client through the default ClientQuery plugin.

API

TS3Query.client_connect params
TS3Query.server_connect params

Using `TS3Query.connect params` will print a deprecation warning, and pass the params to `server_connect` to maintain backwards compatibility.

I also broke the project into multiple files (it was a single file before). Each class/module has its own file. Each class is inside the `TS3Query` module -- before some classes were directly in the global scope. `TS3Connection` is now a base class without a `#connect` private method. `ClientConnection` and `ServerConnection` both implement the missing `#connect` private method.

**Also**, minor but important, in a separate commit I convert TS responses to UTF-8. All strings that TeamSpeak sends are UTF-8 encoded, but Net::Telnet returns an ASCII-8BIT encoded string. Forcing the encoding let the server provided UTF-8 strings work client-side without issue.