/* IRC notifs */
if ($site_config["IRCANNOUNCE"]) {
$bport = 6543; /// change this to what ever you set in your eggdrop for the announce to listen on
$bip = $site_config["66.90.118.18"]; // this maybe your bot ip?? lol
$bot['message_line_1'] = chr(3)."2 Novo Torrent: (".chr(3)."10 $torrent".chr(3)."2 ) Size: (".chr(3)."10 $size ".chr(3)."2 ) Category: (".chr(3)."10 $cat ".chr(3)."2 ) Link: (".chr(3)."10 ".$site_config['SITEURL']."/details.php?id=$id&hit=1".chr(3)."2 )rn";
$fp = fsockopen($site_config["ANNOUNCEIP"],$site_config["is 6543"],$errno,$errstr,5);
if($fp) {
sleep(2);
fwrite($fp, "PaSSwoRds" . " " . $bot['message_line_1'] . "n");
fclose($fp);
}
}
// End of IRC-Annnounce and IRC-Formatting Quote:osamigos@osamigos.tuxsp.eu [~/eggdrops]# ps xPID TTY STAT TIME COMMAND
6975 ? S 0:00 sshd: osamigos@pts/74
6982 pts/74 Ss+ 0:00 -bash
8011 ? S 0:00 sshd: osamigos@notty
8012 ? Ss 0:00 /usr/libexec/openssh/sftp-server
18320 ? S 0:00 sshd: osamigos@notty
18321 ? Ss 0:00 /usr/libexec/openssh/sftp-server
19768 ? S 0:00 sshd: osamigos@pts/75
19776 pts/75 Rs 0:00 -bash
20287 pts/75 Sl 0:00 ./eggdrop -m OsAmigos.conf
20524 ? S 0:00 sshd: osamigos@notty
20525 ? Ss 0:00 /usr/libexec/openssh/sftp-server
20555 pts/75 R+ 0:00 ps x
osamigos@osamigos.tuxsp.eu [~/eggdrops]# kill -9 20287
osamigos@osamigos.tuxsp.eu [~/eggdrops]# ./eggdrop -m OsAmigos.conf
Eggdrop v1.6.19 © 1997 Robey Pointer © 2008 Eggheads
[16:00] --- Loading eggdrop v1.6.19 (Sat Aug 11 2012)
[16:00] Listening at telnet port 6665 (all).
[16:00] Module loaded: dns
[16:00] Module loaded: channels
[16:00] Module loaded: server
[16:00] Module loaded: ctcp
[16:00] Module loaded: irc
[16:00] Module loaded: notes (with lang support)
[16:00] Module loaded: console (with lang support)
[16:00] Module loaded: blowfish
[16:00] Module loaded: uptime
[16:00] Userinfo TCL v1.07 loaded (URL BF GF IRL EMAIL DOB PHONE ICQ).
[16:00] use '.help userinfo' for commands.
[16:00] ### Torrent announcer loaded
[16:00] hahaha TCL by NOTEBOOK - vIRCio.com.br is loaded.
[16:00] BotCall -=> Loaded.
[16:00] *Auto Welcome Script* by *Rana Usman* (www.ranausman.tk) has been su
ccessfully LOADED
[16:00] Userfile loaded, unpacking...
USERFILE ALREADY EXISTS (drop the '-m')
[16:00] === OsAmigos: 2 channels, 1 users.
Launched into the background (pid: 21299)
osamigos@osamigos.tuxsp.eu [~/eggdrops]#
Quote:listen 6543 script xxGRAB
proc xxGRAB { NewIDX } {
control $NewIDX torrent:CTL
putlog "TORRENT: Received connection $NewIDX"
}
proc torrent:CTL { IDX Args } {
putlog "TORRENT: $Args"
putserv "PRIVMSG #My.Channel :$Args"
}
putlog "### Torrent announcer loaded"
Quote:# If you would like the bot to listen for users and bots in separate ports,# use the following format.
#
# listen 3333 bots
# listen 4444 users
# listen 6543 script xxGRAB
# If you wish to use only one port, use this format:
listen 6665 all
Credit goes to FLASH, this is all his code!
For those who used it in 1.x, the same code works fine in 2.x.
Here's the TCL (not using the one from 1.x, made my own using eggdrop's TCL instead of pure TCL sockets).
Save as tcl and load into eggdrop... if you don't know how, you probably shouldn't be trying to run this....
listen 6543 script xxGRAB #CHANGE THIS TO YOUR EGGDROP'S LISTEN PORT!
proc xxGRAB { NewIDX } {
control $NewIDX torrent:CTL
putlog "TORRENT: Received connection $NewIDX"
}
proc torrent:CTL { IDX Args } {
putlog "TORRENT: $Args"
putserv "PRIVMSG #My.Channel :$Args"
}
putlog "### Torrent announcer loaded"
Open up backend/config.php, and the bottom, add:
//Setup IRC Announcer
$IRCANNOUNCE = true;
$ANNOUNCEIP = "1.2.3.4"; //Change this to your eggdrop IP
$ANNOUNCEPORT= "1234"; //Change this to your eggdrop listen port
In torrents-upload.php, find:
//END SCRAPE
write_log("Torrent $id ($name) was Uploaded by $CURUSER[username]");
//insert email notif, irc, req notif, etc here
Below, add:
// start irc announce hack v1.0 by FLASH
if ($IRCANNOUNCE)
{
$rs = mysql_query(" SELECT * FROM categories WHERE id='" . intval($catid) . "' LIMIT 1");
$cat_details = mysql_fetch_assoc($rs);
$msg_bt = chr(3)."2 New Torrent: (".chr(3)."10 $torrent".chr(3)."2 ) Size: (".chr(3)."10 ".mksize($torrentsize).chr(3)."2 )
Category: (".chr(3)."10 ". $cat_details["parent_cat"].": ". $cat_details["name"].chr(3)."2 ) Link: (".chr(3)."10 {$site_config['SITEURL']}/torrents-details.php?id=$id&hit=1".chr(3)."2 )rn";
$fs = fsockopen($ANNOUNCEIP, $ANNOUNCEPORT, $errno, $errstr);
if($fs) {
sleep(2);
fwrite($fs, $msg_bt);
fclose($fs);
}
}
//end irc announce hack v1.0 by FLASH
Dont forget to edit where it says to...
And voila, your IRC announce works again! I've modified the code to NOT show the uploader's name, I changed the colors, and I added a sleep(2) delay since eggdrop's sockets are slower.. we need to wait for the socket to open before sending out the data.
If you want the exact code from 1.x, just go get it from torrents-upload.php
config file
//Eggdrop IRC TCL
//Setup IRC Announcer
$site_config["IRCANNOUNCE"] = true;
$site_config["ANNOUNCEIP"] = "ip.eggdrop"; //Change this to your eggdrop IP
$site_config["ANNOUNCEPORT"] = "7698"; //Change this to your eggdrop listen port
uploand file
/* IRC notifs */
if ($site_config["IRCANNOUNCE"]) {
$bot['message_line_1'] = chr(3)."2 Novo Torrent: (".chr(3)."10 $torrent".chr(3)."2 ) Size: (".chr(3)."10 $size ".chr(3)."2 ) Category: (".chr(3)."10 $cat ".chr(3)."2 ) Link: (".chr(3)."10 ".$site_config['SITEURL']."/details.php?id=$id&hit=1".chr(3)."2 )rn";
$fp = fsockopen($site_config["ANNOUNCEIP"],$site_config["ANNOUNCEPORT"],$errno,$errstr,5);
if($fp) {
sleep(2);
fwrite($fp, "PaSSwoRds" . " " . $bot['message_line_1'] . "n");
fclose($fp);
}
}
// End of IRC-Annnounce and IRC-Formatting
the my eggdrop
listen 7698 script torrent.listen
set canal "#torrents"
proc torrent.listen {idx} {control $idx torrent.announce}
proc torrent.announce {idx args} {
global canal
set args [join $args]
putlog "$args"
if {[lindex [split $args] 0] != "PaSSwoRds"} {return 0}
set toutput [lrange [split $args] 1 end]
putquick "PRIVMSG $canal :$toutput"
}
putlog "### Torrent announcer loaded"
[/code] # If you would like the bot to listen for users and bots in separate ports,
# use the following format.
#
# listen 3333 bots
# listen 4444 users
# listen 6543 script xxGRAB
# If you wish to use only one port, use this format:
listen 6665 allDatabase Error in account.php on line 461: Unknown column 'yahoo' in 'field list'. Query was: UPDATE users SET avatar = 'http://r11.imgfast.net/users/1117/16/06/46/avatars/3-80.png',icq = '',msn = '',aim = '',yahoo = '',skype = '',stylesheet = '5',country = 24,age = '26',hideshoutbox = 'no',acceptpms = 'yes',commentpm = 'yes',recommended = 'rcm',notifs = '[pm]',privacy = 'normal',gender = 'Male',client = '',signature = '',title = '',tzoffset = 0 WHERE id = 1.[/code]
[/url]

listen 3333 script xxGRAB
proc xxGRAB { NewIDX } {
control $NewIDX torrent:CTL
putlog "TORRENT: Received connection $NewIDX"
}
proc torrent:CTL { IDX Args } {
putlog "TORRENT: $Args"
putserv "PRIVMSG #My.Channel :$Args"
}
putlog "### Torrent announcer loaded"
proc xxGRAB { NewIDX } {
control $NewIDX torrent:CTL
putlog "TORRENT: Received connection $NewIDX"
}
proc torrent:CTL { IDX Args } {
putlog "TORRENT: $Args"
putserv "PRIVMSG #My.Channel :$Args"
}
putlog "### Torrent announcer loaded"
set rss(filmes) {
"url" "osamigos.com/rss.php?cat=42"
"channels" "#osamigos #x-forceteam
"database" "./scripts/Dvd-Hd.db"
"output" "7[002A-F-T002] 4@@item!title@@ - 7[002Kategorie002]4@@item!category@@ 7announce von a-f-t.info"
"trigger" "!anime"
}
//Setup IRC Announcer
$IRCANNOUNCE = true;
$ANNOUNCEIP = "66.90.118.18"; //Change this to your eggdrop IP
$ANNOUNCEPORT= "3333"; //Change this to your eggdrop listen port