Nukemods Forum  
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 45
0 members and 45 guests
No Members online
Most users ever online was 611, 03-21-2008 at 10:10 PM.
» .::.
Online Degree - search for 1000+ online degrees, online colleges & online universities.
Tattoo - we are a group of tattoo enthusiasts
Gexa Energy - your absolute best choice in electric service
Texas Electric Choice

Go Back   Nukemods Forum > PHP-Nuke 7.x > Nuke 7.x - Blocks

Reply
 
LinkBack Thread Tools Display Modes
teamspeak problem
Old
  (#1 (permalink))
Junior Member
 
Status: Offline
Posts: 5
Join Date: Feb 2006
teamspeak problem - 02-18-2006, 05:34 PM

// **** Configuration ****
var $sitetitle = "blades of death"; // The Title of your Teamspeak Server
var $serverAddress = "66.55.134.18"; // The IP of your Teamspeak server, (don't include the port here)
var $serverQueryPort = 51234; // TeamSpeak QueryPort.. You usually don't need to change this (Standard 51234)
var $serverUDPPort = 8767; // UDP Port of your Teamspeak, This is the port that goes with the IP (Standard 8767)
var $tablewidth = "153"; // The Width of the teamspeak block (optimal 153)
var $serverpassword = "bod"; // Server Password. If you don't have a password set to "".
//
// **** Configuration ****
//-------------------------------------------------------------------------------------------------
var $themename = "ts-viewer"; // Do not change this, directory where graphics are found under templates.
//-------------------------------------------------------------------------------------------------
//
// This is the end of the configuration section. Don't modify anything below this line.
//
//-------------------------------------------------------------------------------------------------
var $socket;
var $serverStatus = "offline";
var $playerList = array();
var $channelList = array();
function getSocket($host, $port, $errno, $errstr, $timeout) {
unset($socket);
$socket=0;// added
$attempts = 1;
while($attempts <= 1 and !$socket) {
$attempts++;
@$socket = fsockopen($host, $port, $errno, $errstr, $timeout);
$this->errno = $errno;
$this->errstr = $errstr;
if($socket and fread($socket, 4) == "[TS]") {
fgets($socket, 128);
return $socket;
}
}
return false;
}
function sendQuery($socket, $query) {
fputs($socket, $query."\n");
}
function getOK($socket) {
$result = fread($socket, 2);
fgets($socket, 128);
return($result == "OK");
}
function closeSocket($socket) {
fputs($socket, "quit");
fclose($socket);
}
function getNext($evalString) {
$pos = strpos($evalString, "\t");
if(is_integer($pos)) {
return substr($evalString, 0, $pos);
} else {
return $evalString;
}
}
function chopNext($evalString) {
$pos = strpos($evalString, "\t");
if(is_integer($pos)) {
return substr($evalString, $pos + 1);
} else {
return "";
}
}
function stripQuotes($evalString) {
if(strpos($evalString, '"') == 0) $evalString = substr($evalString, 1, strlen($evalString) - 1);
if(strrpos($evalString, '"') == strlen($evalString) - 1) $evalString = substr($evalString, 0, strlen($evalString) - 1);
return $evalString;
}
function getVerboseCodec($codec) {
if($codec == 0) {
$codec = "CELP 5.1 Kbit";
} elseif($codec == 1) {
$codec = "CELP 6.3 Kbit";
} elseif($codec == 2) {
$codec = "GSM 14.8 Kbit";
} elseif($codec == 3) {
$codec = "GSM 16.4 Kbit";
} elseif($codec == 4) {
$codec = "CELP Windows 5.2 Kbit";
} elseif($codec == 5) {
$codec = "Speex 3.4 Kbit";
} elseif($codec == 6) {
$codec = "Speex 5.2 Kbit";
} elseif($codec == 7) {
$codec = "Speex 7.2 Kbit";
} elseif($codec == 8) {
$codec = "Speex 9.3 Kbit";
} elseif($codec == 9) {
$codec = "Speex 12.3 Kbit";
} elseif($codec == 10) {
$codec = "Speex 16.3 Kbit";
} elseif($codec == 11) {
$codec = "Speex 19.5 Kbit";
} elseif($codec == 12) {
$codec = "Speex 25.9 Kbit";
} else {
$codec = "unknown (".$codec.")";
}
return $codec;
}
function getInfo() {
$errno=0; // added
$errstr=0; // added
$isdefault=0; // added
$this->socket = $this->getSocket($this->serverAddress, $this->serverQueryPort, $errno, $errstr, 0.3);
if($this->socket == false) {
return;
echo ("No Server");
} else {
$this->serverStatus = "online";
$this->sendQuery($this->socket, "sel ".$this->serverUDPPort);
if(!$this->getOK($this->socket)) {
echo "Server didn't answer \"OK\" after last command. Aborting.";
return;
}
$this->sendQuery($this->socket,"pl");
$this->playerList = array();
do {
$playerinfo = fscanf($this->socket, "%s %d %d %d %d %d %d %d %d %d %d %d %d %s %s %s");
list($playerid, $channelid, $receivedpackets, $receivedbytes, $sentpackets, $sentbytes, $paketlost, $pingtime, $totaltime, $idletime, $privileg, $userstatus, $attribute, $s, $playername, $playername2) = $playerinfo;
if($playerid != "OK") {
if (strcmp($playername2,"\"\"")&& $playername2[0]!="\"") $playername=$playername." ".$playername2;
$this->playerList[$playerid] = array(
"playerid" => $playerid,
"channelid" => $channelid,
"receivedpackets" => $receivedpackets,
"receivedbytes" => $receivedbytes,
"sentpackets" => $sentpackets,
"sentbytes" => $sentbytes,
"paketlost" => $paketlost / 100,
//-------------------------------------------------------------------------------------------------
"pingtime" => $pingtime,
"totaltime" => $totaltime,
"idletime" => $idletime,
"privileg" => $privileg,
"userstatus" => $userstatus,
"attribute" => $attribute,
//-------------------------------------------------------------------------------------------------
"s" => $s,
"playername" => $this->stripQuotes($playername)
);
}
} while($playerid != "OK");
$this->sendQuery($this->socket,"cl");
$this->channelList = array();
do {
$channelinfo = "";
do {
$input = fread($this->socket, 1);
if($input != "\n" && $input != "\r") $channelinfo .= $input;
} while($input != "\n");
$channelid = $this->getNext($channelinfo);
$channelinfo = $this->chopNext($channelinfo);
$codec = $this->getNext($channelinfo);
$channelinfo = $this->chopNext($channelinfo);
$parent = $this->getNext($channelinfo);
$channelinfo = $this->chopNext($channelinfo);
$d = $this->getNext($channelinfo);
$channelinfo = $this->chopNext($channelinfo);
$maxplayers = $this->getNext($channelinfo);
$channelinfo = $this->chopNext($channelinfo);
$channelname = $this->getNext($channelinfo);
$channelinfo = $this->chopNext($channelinfo);
$d = $this->getNext($channelinfo);
$channelinfo = $this->chopNext($channelinfo);
$d = $this->getNext($channelinfo);
$channelinfo = $this->chopNext($channelinfo);
$topic = $this->getNext($channelinfo);
if($channelid != "OK") {
if($isdefault == "Default") $isdefault = 1; else $isdefault = 0;
$playercount = 0;
foreach($this->playerList as $playerInfo) {
if($playerInfo['channelid'] == $channelid) $playercount++;
}
$this->channelList[$channelid] = array(
"channelid" => $channelid,
"codec" => $codec,
"parent" => $parent,
"maxplayers" => $maxplayers,
"channelname" => $this->stripQuotes($channelname),
"isdefault" => $isdefault,
"topic" => $this->stripQuotes($topic),
"currentplayers" => $playercount);
}
} while($channelid != "OK");
$this->closeSocket($this->socket);
}
}
}
$tss2info = new tss2info;
//-------------------------------------------------------------------------------------------------
?>






why doesnt this work i thought had everything on there right but i guess not

heres the site bladesofdeath.net/bod
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#2 (permalink))
Super Moderator
 
Duke's Avatar
 
Status: Offline
Posts: 1,015
Join Date: Dec 2005
Location: Under your bed
02-18-2006, 06:44 PM

I think you'd have better success if you asked the people where you got the block from.
  Send a message via AIM to Duke  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#3 (permalink))
Member
 
Status: Offline
Posts: 484
Join Date: Nov 2004
Location: UK Derby
02-19-2006, 12:54 PM

Hi bro Cant help u at the moment as im havin internet problems at home, problem with modem so sumone is coming round to sort it 2morrow. if its sorted 2marrow I will hook u up with old teamspeak block I use2 use on my site simulasr to this one at www.BADHQ.com but its a teamspeak block. houpe this will help u bro peace Boris
  Send a message via MSN to killerbee  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#4 (permalink))
Junior Member
 
Status: Offline
Posts: 5
Join Date: Feb 2006
02-19-2006, 02:27 PM

yeah it still isnt working idk whats wrong im pretty positive i have everything on there right idk. can can i get that ts block your talking about thanks
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#5 (permalink))
Member
 
Status: Offline
Posts: 484
Join Date: Nov 2004
Location: UK Derby
02-20-2006, 12:49 PM

I will post u up the link when I get home
  Send a message via MSN to killerbee  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#6 (permalink))
Junior Member
 
Status: Offline
Posts: 5
Join Date: Feb 2006
02-20-2006, 03:19 PM

ok thanks :P
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#7 (permalink))
Member
 
Status: Offline
Posts: 484
Join Date: Nov 2004
Location: UK Derby
02-20-2006, 08:15 PM

ok I cant find myone but i found 1 other might help u here are the links

http://phpnuke-downloads.com/downloa...lock_v2.0.html


I will have a good look for it 2marrow and will post it up :-)
  Send a message via MSN to killerbee  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#8 (permalink))
Junior Member
 
Status: Offline
Posts: 5
Join Date: Feb 2006
02-20-2006, 10:31 PM

k thanks ill try it out . hope it works
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#9 (permalink))
Junior Member
 
Status: Offline
Posts: 3
Join Date: Dec 2007
10-29-2008, 01:42 PM

I have tried 2 different Teamspeak blocks and keep getting this

An error connecting to the TeamSpeak server has occured!
Error number:
Error description:
Please contact a the Server Admin


I have put every thing in there that it asks for
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#10 (permalink))
Junior Member
 
Status: Offline
Posts: 35
Join Date: Dec 2005
10-29-2008, 02:01 PM

There are a ton of different Teamspeak blocks out there. Try a different one.
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Teamspeak Block Request VoN Open topics 0 09-20-2006 11:51 PM
Poll/Survey problem! (restriced area?) EDIT: new problem! erazor Nuke 7.x - General 3 04-12-2005 11:27 AM
teamspeak block for phpnuke romer Open topics 5 01-14-2005 07:50 PM
Problem with smartDark problem. Sign up doesn't work. DJ-Loki Theme packs 4 02-18-2003 03:40 PM




vBulletin Skin developed by: vBStyles.com


LinkBacks Enabled by vBSEO 3.3.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31