Ich seh gerade das das was in die newthread.php datei soll die daten in eine Datei schreibt...
Nur: Ich habe keine newthread.php

bye
-- Maik --
Code: Alles auswählen
$postdate = create_date($board_config['default_dateformat'], time(), $board_config['board_timezone']);
$forumfile = fopen("newthread.dat", "a");
fputs($forumfile,"(-) NEW THREAD (-) \"$subject\" by $username at[$postdate] (-) $forum_name (-)\n");
fclose($forumfile);
Code: Alles auswählen
[15:15:57] <Akira> [new thread in Talking Lounge]!
[15:15:58] <Akira> [topic is: ich schwitz gerade die schokomilch aus, die ich in der 8.klasse getrunken hab.]!
[15:16:02] <Akira> [posted by doctormord at 31.05.2003 - 15:18]!
Code: Alles auswählen
[Thu 05.06 - 17:48:40] <@Maik> 1 neuer Beiträge in:
[Thu 05.06 - 17:48:40] <@Maik> "[Umfrage] Templates - Poll" von Maik (posted: 05.06.2003 17:42 (http://www.boardurl.de/viewtopic.php?p=840#840))
Code: Alles auswählen
on *:load:{
set %board.url $?="Board URL (http://www.boardurl.de/ (OHNE /phpBB2/))"
set %board.int $?="Abstand in Sekunden in der die neuen Posts abgefragt werden"
set %board.chan $?="Channel in den gepostet werden soll"
}
on *:start:{
timer 0 %board.int portal
}
on *:sockopen:portal:{
sockwrite -n portal GET %board.url $+ /phpBB2/portal.php
sockwrite -n portal
}
alias portal {
unset %go
write -c portal.txt
set -u2 %portal 1
sockopen portal %board.url 80
}
on *:sockread:portal:{
if ($sockerr > 0) return
:nextread
sockread %temp
if ($sockbr == 0) { return }
if (%temp == $null) %temp = -
if (</body> isin %temp) { goto end }
if ( Die letzten Beiträge: isin %temp ) { set %go 1 }
if (( row1 isin %temp ) || ( row2 isin %temp )) && ( %go == 1 ) { write portal.txt %temp }
unset %temp
goto nextread
:end
ch.np
}
alias ch.np {
set %y $lines(portal.txt)
set %isin <td class="row1" align="center" valign="middle" nowrap="nowrap"><span class="genmed">
while (%y > 0) {
if ( %isin isin $read(portal.txt,%y) ) && ( $gettok($gettok($read(portal.txt,%y),2,35),1,34) > %np ) {
set %line $read(portal.txt,$calc($readn -2))
if ( wichtig isin %line ) { set %thema [Wichtig] $remove($gettok(%line,6,62),</a) | goto weiter }
if ( umfrage isin %line ) { set %thema [Umfrage] $remove($gettok(%line,6,62),</a) | goto weiter }
if ( Ankündigung isin %line ) { set %thema [Ankündigung] $remove($gettok(%line,6,62),</a) | goto weiter }
set %thema $remove($gettok(%line,4,62),</a)
:weiter
set %aut $remove($gettok($read(portal.txt,$calc($readn +2)),5,62),</a)
set %line2 $read(portal.txt,$readn)
set %date.tmp $remove(%line2,$chr(44))
set %date $remove($gettok(%date.tmp,3,62),<br /)
set %post.tmp $gettok($gettok($read(portal.txt,%y),2,35),1,34)
set %post %board.url $+ /phpBB2/viewtopic.php?p= $+ %post.tmp $+ $chr(35) $+ %post.tmp
if ( %posting != 1 ) { set -u2 %posting 1 | msg %board.chan neue Beiträge in: }
msg %board.chan " $+ %thema $+ " von %aut (posted: %date ( $+ %post $+ ))
}
dec %y
}
set %np %post.tmp
}
Code: Alles auswählen
###############
# öffne /posting.php
###############
###############
# suche
###############
case 'editpost':
case 'newtopic':
###############
# ersetzen mit
###############
case 'newtopic':
// Bot-Output Start
$poster = ($userdata['session_logged_in']) ? $userdata['username'] : '';
$postdate = create_date($board_config['default_dateformat'], time(), $board_conf
$forumfile = fopen("newthread.dat", "a");
fputs($forumfile,"\0035[\003\0037guys, we got a new thread in $forum_name\003\00
fclose($forumfile);
// Bot-Output End
case 'editpost':
###############
# datei schliessen
###############
Code: Alles auswählen
###############
# neue datei erstellen.
# z.B. /scripts/phpbb.tcl
###############
###############
# einfügen
###############
utimer 2 newthreads
proc newthreads { } {
set forumfile [open /var/www/forum/newthread.dat r]
while {![eof $forumfile]} {
gets $forumfile lalala
if {$lalala != ""} { puthelp "PRIVMSG #reality :$lalala!" }
}
close $forumfile
set forumfile [open /var/www/forum/newthread.dat w]
puts $forumfile ""
close $forumfile
utimer 2 newthreads
}
###############
# datei schliessen
###############