Jump to content

Archived

This topic is now archived and is closed to further replies.

chain

Teamspeak 3 IRC Bot

Recommended Posts

  • Administrators

Teamspeak 3 IRC Bot

 

This is a teamspeak irc bot, it will connect to your teamspeak 3 server and reply inforamtion back to a channel in irc like, when a user join, a user quits, list a clients and a list of channels. I might be adding more commands like, ban, kick, poke, message and a few more. If you want a command added just let me know.

 

Please read this before you try and connect your teamspeak bot with your teamspeak server, this bot will not take any information from your teamspeak server that could open it for attack.

 

Open your teamspeak and be a Server Admin. When you have Server Admin rights click "Tools" then "ServerQuery Login", type in a username and click "Ok". Now you have a username and a password on the sceen, the username need to replace the username in the client_login alias. Say your username is "Tsbot", your alias should look like "alias client_login return Tsbot" without the quotes. Do the same for your client_password. Make sure you also replace your ts_network alias with your teamspeak address or ip.

 

Now you need to find your Server Query port, this port for most teamspeaks will be 51234 but it may not be for your teamspeak, like mine is 10011. When you get the port replace your query_port with the right query port for your server.

 

Now comes the tricky part, giving your bot who is connecting to the server via the Server Query port Server Query Admin rights, or enough to do some simple commands like "serverlist", "clientlist" and "channellist". If you don't know how to do this please read this:

 

 

If you don't want to download the program he is using in the video you can do it without by first opening your teamspeak, clicking on "Tools" then Server Query. At this point you will need to know the client id of your bot, run the bot with all the inforamtion below filled out right and your bot will connect but not do anything. Now go to "Primissions" and "List all clients", look for your bot client, it should be something like "Client login from Ip" or just "Client Login". Look at the database id and remember it, now back to the Server Query window, type in the left upper box the following.

 

login serveradmin password

use sid=1

servergroupaddclient sgid=2 cldbid=Client ID

 

I hope you remember your serveradmin password from when you first started your teamspeak as it told you to write it down someplace or remember it, if you don't not much you can do without it :(

 

Replace the password with your severadmin password and client ID with your bots client ID, if your not sure of the client ID DO NOT guess, if you guess most likely some random person will get a Red "S" like Server Admin but Admin Server Query and if they know how to use it... Your server WILL be at risk.

 

After setting your bot to Admin Server Query you can now run it without any problems.. hopefully. Type !ts_start in the channel with your bot.

 

>alias ts_network { return Server }alias query_port { return 10011 }alias ts_channel { return #Channel }alias client_login { return User }alias client_password { return Password }alias msg_style { return $+(5[4,$1-,5]) }on *:exit: {   .remove ts3_clients.txt   if ($exists(ts3_clients_temp.txt)) { .remove ts3_clients_temp.txt }}on $*:text:/[!@`~](tsinfo|users|channels|ts_start)/Si:#: {  if ($regml(1) == tsinfo) { $iif($sock(ts3),sockwrite -n ts3 serverlist,msg $chan $msg_style(Error) Not Connected) }  else if ($regml(1) == users) { $iif($sock(ts3),sockwrite -n ts3 clientlist,msg $chan $msg_style(Error) Not Connected) }  else if ($regml(1) == channels) { $iif($sock(ts3),sockwrite -n ts3 channellist,msg $chan $msg_style(Error) Not Connected) }  else if ($regml(1) == ts_start) { ts }}alias ts {  if ($sock(ts3)) { sockclose ts3 }   if ($exists(ts3_clients_temp.txt)) { .remove ts3_clients_temp.txt }  .remove ts3_clients.txt  sockopen ts3 $ts_network $query_port  sockmark ts3 $ts_channel}alias checkclients {  if ($sock(ts3)) {    set %checking_clients yes     sockwrite -n ts3 clientlist    .timerclients 1 3 checkclients  }  else { ts #Hangout }}on *:sockopen:ts3: {  if ($sockerr) { echo -s Socket Error }  else {    sockwrite -n ts3 login client_login_name= $+ $client_login client_login_password= $+ $client_password    sockwrite -n ts3 use sid=1    checkclients  }}on *:sockread:ts3: {  var %read | sockread %read   ;echo -s %read  if (virtualserver_id isin %read) {    var %clients = $replace($gettok(%read,4,32),virtualserver_clientsonline,Clients Online:,=,$chr(32))    var %status = $replace($gettok(%read,3,32),virtualserver_status,Status:,=,$chr(32))    var %uptime = $remove($gettok(%read,7,32),virtualserver_uptime=)    msg $sock(ts3).mark $msg_style(Server Information) %clients %status $+(Server Uptime:,$chr(32),$duration(%uptime))  }  else if (client_nickname isin %read) {    if (!%checking_clients) {      msg $gettok($sock(ts3).mark,1,32) $msg_style(Searching) Please Wait...      var %tokens = 1       while (%tokens ,$replace($remove($gettok(%read,$calc(%tokens + 1),32),client_nickname=),\s,$chr(32)),) ID $+  $remove($gettok(%read,%tokens,32),client_database_id=)          }        }        inc %tokens      }    }    else {      var %tokens = 1       while (%tokens ,$replace($remove($gettok(%read,%tokens,32),channel_name=),\s,$chr(32)),) Clients  $+ $remove($gettok(%read,$calc(%tokens + 1),32),total_clients=)      }      inc %tokens    }  }}

Link to comment
Share on other sites



×
×
  • Create New...