Community Forums Today's Posts     Member List     Archive    
Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2006
    Posts
    1,573

    Useful tools: ts3pwgen, notify

    notify.php
    Sends a message to all connected users on all virtual servers of a teamspeak3 server instance
    Requirements:

    Examples:
    Code:
    # send bold message in red color
    ./notify "The server is going down for a restart"
    
    # send unformatted message
    ./notify --plain "Plain Message"
    PHP Code:
    #!/usr/bin/php
    <?php
    // define where your local copy of the ts3 php framework is located
    $framework "./libraries/TeamSpeak3/TeamSpeak3.php";

    if(
    $argc || $argc 3) {
      
    fprintf(STDERR"Usage: %s [--plain] \"MESSAGE\"\n"basename(__FILE__));
      exit(
    1);
    }
    $plain $argv[1] == "--plain" true false;
    require_once(
    $framework);
    try {
      
    $instance TeamSpeak3::factory("serverquery://serveradmin:password@127.0.0.1:10011/");
      if(!
    $plain) {
        
    $message "[color=red][b]" $argv[1] . "[/b][/color]";
      } else {
        
    $message $argv[2];
      }
      
    $instance->message($message);
      
    } catch (
    Exception $e) {
      
    fprintf(STDERR"Error " $e->getCode() . ": " $e->getMessage() . "\n");
      exit(
    1);
    }
    ?>
    You might need to grant execution rights to the script: chmod u+x notify.php

    ----


    ts3pwgen.php
    • generates random passwords
    • is able to use user specified passwords
    • and encodes them with the standard teamspeak3 password hash algorithm

    Requirements:
    • Linux
    • php
    • `pwgen' installed on your machine (by the way: you always want to generate save passwords on the machine you are using it on. Never ever use online password generators to prevent anyone from sniffing it over the network)


    Examples:
    Code:
    ./ts3pwgen.php --help
    Usage: ts3pwgen.php [PASSWORD(S)...]
    Code:
    ./ts3pwgen.php
    Password: aiYee2ka Encoded: 6Qwy+EYkZHFbefh5n1Jgx3EpIgk=
    Code:
    ./ts3pwgen.php mySecretPassword anotherPassword
    Password: mySecretPassword Encoded: 8DJoApmwd6+5UJPeQIL2JVArglE=
    Password: anotherPassword Encoded: 7u8iwNsQCspG51eh8unbMTzUjw0=
    PHP Code:
    #!/usr/bin/php
    <?php

    function encodeAndPrint($password) {
        
    $encoded base64_encode(sha1($passwordtrue));
        
    fprintf(STDOUT"Password: %s Encoded: %s\n"$password$encoded);
    }
    function 
    printUsageAndExit() {
      
    fprintf(STDERR"Usage: %s [PASSWORD(S)...]\n"basename(__FILE__));
      exit(
    1);
    }

    if(
    in_array("-h"$argv) || in_array("--help"$argv)) {
        
    printUsageAndExit();
    }

    $passwords = array();
    for(
    $i 1$i sizeof($argv); $i++) {
        
    array_push($passwords$argv[$i]);
    }

    if(
    sizeof($passwords) > 0) {
      foreach(
    $passwords as $password) {
        
    encodeAndPrint($password);
      }
    } else {
      
    exec("pwgen -c -n 8 1"$output);
      
    encodeAndPrint($output[0]);
    }

    ?>
    You might need to grant execution rights to the script: chmod u+x ts3pwgen.php
    Last edited by maxi1990; 05-07-2012 at 21:29.

  2. #2
    Join Date
    Jul 2006
    Posts
    1,573
    Added tool notify.php

  3. #3
    Join Date
    Jul 2012
    Posts
    13

    Question Auto message?

    Is there a plugin for TS3 that is an automatic global message sender? for example I would like to have it set to every 15Minutes it would send a GM (Global Message) to everyone in the TS saying something like "[Advertisement] Blah blah blah blah".

    If there is a plugin could you please send me a link, but if there isn't a plugin is there anyway you guys/girls could tell me how to make this sort of plugin for my server.

    Thank you.
    -BloopzTV

    merged - Please use the search function next time.
    Last edited by dante696; 23-07-2012 at 09:32.

  4. #4
    Join Date
    Jul 2006
    Posts
    1,573
    There is no inbuilt "easy" way.
    But an easy way would be a cronjob + php script.
    Something like: http://forum.teamspeak.com/showthrea...tools-ts3pwgen

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Ts2-Tools
    By Bayalon in forum [TeamSpeak 2] Addons & Scripts
    Replies: 3
    Last Post: 18-03-2008, 11:48
  2. No admin tools
    By ChaosNova in forum [TeamSpeak 2] Server Support
    Replies: 2
    Last Post: 31-10-2004, 20:42

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
  •