Ejemplo n.º 1
0
 internal ServerErrorEventArgs(ServerConnectionHandler handler, TS3Error err, string msg, string extraMsg)
 {
     ServerConnectionHandler = handler;
     Error        = err;
     Message      = msg;
     ExtraMessage = extraMsg;
 }
Ejemplo n.º 2
0
        public static void SendPluginCommand(ServerConnectionHandler serverConnectionHandler, string command,
                                             PluginTargetMode targetMode, ICollection <AnyID> targetIDs = null)
        {
            if (command == null)
            {
                throw new ArgumentNullException(nameof(command));
            }

            UInt16[] unwrappedIDs = null;
            if (targetIDs != null)
            {
                unwrappedIDs = new UInt16[targetIDs.Count + 1];
                int i = 0;
                foreach (var targetID in targetIDs)
                {
                    unwrappedIDs[i] = targetID.ID;
                    ++i;
                }
                //Terminate array as TS3 requires it, so the managed array data can be used directly
                unwrappedIDs[i] = 0;
            }
            TS3Interface.SendPluginCommand(serverConnectionHandler.ID, command, (int)targetMode, unwrappedIDs);
        }
Ejemplo n.º 3
0
 public PluginCommandEventArgs(ServerConnectionHandler serverConnectionHandler, string pluginCommand)
 {
     ServerConnectionHandler = serverConnectionHandler;
     PluginCommand           = pluginCommand;
 }
Ejemplo n.º 4
0
 internal ProcessCommandEventArgs(ServerConnectionHandler handler, string command)
 {
     ServerConnectionHandler = handler;
     Command = command;
 }