Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Template Shares (http://www.bvlist.com/forumdisplay.php?f=26)
-   -   [Tutorial] Setting up Eggdrop for TSSE (http://www.bvlist.com/showthread.php?t=5886)

draconian 6th January 2011 10:16

[Tutorial] Setting up Eggdrop for TSSE
 
I was looking up why i couldnt get eggdrop to work with my TSSE5.6

Credit goes to Cyberlock. (http://www.bvlist.com/tsse/885-setti...s-channel.html)

EggDrop setup, here is a tutorial how : http://www.egghelp.org/setup.htm

Edit all text in red with your own information

Now lets get to the takeupload.php.
SEARCH
Code:

$size = mksize ($totallen);
ADD AFTER
Code:

$bot['ip'] = "IP ADRESSE FOR BOT SERVER"; // your bot ip
$bot['port'] = "PORT TO BOT USING"; // your script listen port
$bot['password'] = "PASSWORD"; // password which you have set in script
$bot['message'] = "7,1[New torrent was uploaded] 0,1-> 3,1Name: \002$torrent\002 .:. Category: \002$cat\002 0,1.:. 4,1URL: \002$BASEURL/details.php?id=$id"; // your message

$fp = fsockopen($bot['ip'], $bot['port'], $errno, $errstr, 40);

if($fp)
{
    fputs($fp, $bot['password'] . " " . $bot['message'] . "\n");
    sleep(15);
    fclose($fp);
}
//botmsg("New Torrent :: ($torrent) :: ($cat) :: ($s) :: ($BASEURL/details.php?id=$id)");
// Bot IRC end

Now we add the tcl script to EggDrop for the takeupload to connect.
I assume you are using a shell or a linux to install EggDrop since its only available on linux.

nano /whereyoueggdropfolderislocated/scripts/announce.tcl

ADD
Code:

# port for your script you want to listen on (you need to set same port in php script)
set botlisten(port) "SAME PORT AS TAKEUPLOAD"
# password (you need to set same password in php script)
set botlisten(password) "PASSWORD"
# channel you want to send output to
set botlisten(channel) "#IRCCHAN"
listen $botlisten(port) script botlisten
proc botlisten {idx} {
    control $idx botlisten2
}
proc botlisten2 {idx args} {
global botlisten newTorrentChannel
set args [join $args]
set botlisten(pass) [lindex [split $args] 0]
set botlisten(message) [join [lrange [split $args] 1 end]]
if {[string match $botlisten(pass) $botlisten(password)]} then {
  putquick "PRIVMSG $botlisten(channel) :$botlisten(message)"
 } else {
  putlog "Unauthorized person tried to connect to the bot"
  }
}

Next Open youeggdropconfig.conf
SEARCH
Code:

TCL Scripts
ADD
Code:

source scripts/announce.tcl
If you dont like the format the bot announces the uploads, you can edit "$bot['message']" in takeupload.php

P/S remember to login to setting panel and edit your irc settings.

Cyberlock 20th April 2011 22:43

Yea
 
hi there i have change my settings now. i have take a closer look at the source, so i using this lines for make it work.
You will still have to add your information to the bot in Tracker Settings. of the eggdrop bot.

First of all you starting here:

Code:

$res = sql_query ('SELECT name FROM categories WHERE id=' . sqlesc ($catid));
  $arr = mysql_fetch_assoc ($res);
  $cat = $arr['name'];

And now it was i have input the other information from http://www.bvlist.com/tsse/885-setti...s-channel.html

but this not needed...... afther this line you have this after:

Code:

$fp = fsockopen($bot['ip'], $bot['port'], $errno, $errstr, 40);

if($fp)
{
    fputs($fp, $bot['password'] . " " . $bot['message'] . "\n");
    sleep(15);
    fclose($fp);
}

and for now you need alle this and it migt allready be there in you source.

Code:

$res = sql_query ('' . 'SELECT u.email FROM users u LEFT JOIN usergroups g ON (u.usergroup=g.gid) WHERE u.enabled=\'yes\' AND u.status=\'confirmed\' AND u.notifs LIKE \'%[cat' . $catid . ']%\' AND u.notifs LIKE \'%[email]%\' AND u.notifs != \'\' AND g.isvipgroup=\'yes\'');
  $size = mksize ($totallen);
  $body = sprintf ($lang->upload['emailbody'], $torrent, $size, $cat, $anon, $descr, $BASEURL, $id, $SITENAME);
  $to = '';
  $nmax = 100;
  $nthis = $ntotal = 0;
  $total = mysql_num_rows ($res);
  if (0 < $total)
  {
    while ($arr = mysql_fetch_row ($res))
    {
      if ($nthis == 0)
      {
        $to = $arr[0];
      }
      else
      {
        $to .= ',' . $arr[0];
      }

      ++$nthis;
      ++$ntotal;
      if (($nthis == $nmax OR $ntotal == $total))
      {
        $sm = sent_mail ($to, sprintf ($lang->upload['emailsubject'], $SITENAME, $torrent), $body, 'takeupload', false);
        $nthis = 0;
        continue;
      }
    }
  }

  include_once INC_PATH . '/readconfig_pjirc.php';
  if (($ircbot == 'yes' AND $connect = @fsockopen ($botip, $botport, $errno, $errstr)))
  {
    $botmessage = chr (3) . '9' . chr (2) . ('' . ' ' . $SITENAME) . chr (2) . ' -' . chr (3) . '10 New Torrent: (' . chr (3) . ('' . '13 ' . $torrent) . chr (3) . '10 ) Size: (' . chr (3) . '13 ' . $size . chr (3) . '10 )  Category: (' . chr (3) . '13 ' . $cat . chr (3) . '10 ) Uploader: (' . chr (3) . ('' . '13 ' . $anon) . chr (3) . '10 ) Link: (' . chr (3) . ('' . '13 ' . $BASEURL . '/details.php?id=' . $id) . chr (3) . '10 )
';
    @fwrite ($connect, $botmessage);
    @fclose ($connect);
  }

  if (($tsshoutbot == 'yes' AND preg_match ('#upload#', $tsshoutboxoptions)))
  {
    $seo_link = ts_seo ($id, $torrent, 's');
    $shoutbOT = sprintf ($lang->upload['shoutbOT'], $seo_link, $torrent, $anon);
    $shout_sql = 'INSERT INTO shoutbox (userid, date, content) VALUES (\'999999999\', \'' . TIMENOW . '\', ' . sqlesc ('{systemnotice}' . $shoutbOT) . ')';
    $shout_result = sql_query ($shout_sql);
  }

And the end. all this have to be in takeupload before

Code:

if (file_exists (TSDIR . '/' . $cache . '/latesttorrents.html'))

wMan 9th May 2011 20:25

irc chats
 
Ok how to do a private irc chat ? Just for my site

mehr672 25th March 2014 07:00

These setting are very necessary for it and You have to mentioned the charts too.

killgame1 14th June 2016 06:41

Ok how to do a private irc chat ? Just for my site


All times are GMT +2. The time now is 15:07.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.