phpbb -> eggdrop|irc|tcl please help
Verfasst: 18.05.2003 22:43
Code: Alles auswählen
#############################################
# BotThread 1.0 by kiwi (FUSiON) #
# if(rip($someone) eq $source) #
# print "fuck you!!!"; #
#############################################
######### newthread.php #########
#################################
SUCHE:
if ($stopshouting and $subject==strtoupper($subject)) {
$subject=ucwords(strtolower($subject));
}
DARUNTER:
//FUSiON BotThread 1.0
$date1=vbdate("d.m.Y",time());
$date2=vbdate($timeformat,time());
$forumfile = fopen("/tmp/newthread.dat", "a");
fputs($forumfile,"(-) NEW THREAD (-) \"$subject\" by $bbuserinfo[username] [$date1 - $date2] (-) $foruminfo[title] (-)\n");
fclose($forumfile);
#################################
#################################
TCL-Script für den Bot:
#################################
utimer 10 newthreads
proc newthreads { } {
set forumfile [open /tmp/newthread.dat r]
while {![eof $forumfile]} {
gets $forumfile lalala
if {$lalala != ""} { puthelp "PRIVMSG #netcenter :$lalala!" }
}
close $forumfile
set forumfile [open /tmp/newthread.dat w]
puts $forumfile ""
close $forumfile
utimer 10 newthreads
}
#################################
#################################
[22:29:21] <redouble> das ding funzt so:
[22:29:53] <redouble> wenn nen neuer thread erstellt wird (beim vbb geht das über die newthread.php), dann wird in eine *.dat datei nen string mit titel etc. geschrieben
[22:30:03] <redouble> das tcl-script liest all xyz-minuten diese datei
[22:30:07] <redouble> und guggt, ob was drin steht
[22:30:20] <redouble> wenn was drin steht, wirds ausgegeben und der datei-inhalt wird wieder gelöscht
vielen dank schonmal, soweit es mir möglich ist, helfe ich natürlich
cheers