Public feed
#887175
;------------NEWS UPLOAD SYSTEM
on *:text:!addsitenews*:#tr.priv: {
if ($sockopen(ftp)) sockclose ftp
set %2news $2-
write -il59 index2.html <p><b>NEWS: $date </b><br /> $2- </p>
msg #tr.priv 0,1[ 14SITE NEWS SYSTEM 0] 0-14 " $+ %2news $+ " is being uploaded to the site. Please be patient...
set %fileToUpload index2.html
sockopen ftp alpro.al.funpic.de 21
}
;------------MATCH REPORTER
on *:text:!win*:#tr.priv:{
if ($sockopen(ftp)) sockclose ftp
set %enemyclan $2
set %player1 $3
set %player2 $4
set %player3 $5
set %eplayer1 $6
set %eplayer2 $7
set %eplayer3 $8
set %1map $9
set %1score $10
set %2map $11
set %2score $12
set %3map $13
set %3score $14
set %comment $15-
set %number 0
write -il42 wars.html <tr><!-- win -->
write -il43 wars.html <td bgcolor=#12BB55><div style="font-size:11px; color:black;font-family:Arial,Helvetica,sans-serif;"><center> </div></td>
write -il44 wars.html <td bgcolor=#12BB55><div style="font-size:11px; color:black;font-family:Arial,Helvetica,sans-serif;"><center>TeamTurkey</div></td>
write -il45 wars.html <td bgcolor=#12BB55><div style="font-size:11px; color:black;font-family:Arial,Helvetica,sans-serif;"><center> %enemyclan </div></td>
write -il46 wars.html <td bgcolor=#12BB55><div style="font-size:11px; color:black;font-family:Arial,Helvetica,sans-serif;"><center> $date </div></td>
write -il47 wars.html <td bgcolor=#12BB55><div style="font-size:11px; color:black;font-family:Arial,Helvetica,sans-serif;"><center> %player1 $+ , %player2 $+ , %player3 </div></td>
write -il48 wars.html <td bgcolor=#12BB55><div style="font-size:11px; color:black;font-family:Arial,Helvetica,sans-serif;"><center> %eplayer1 $+ , %eplayer2 $+ , %eplayer3 </div></td>
write -il49 wars.html <td bgcolor=#12BB55><div style="font-size:11px; color:black;font-family:Arial,Helvetica,sans-serif;"><center> %1map %1score </div></td>
write -il50 wars.html <td bgcolor=#12BB55><div style="font-size:11px; color:black;font-family:Arial,Helvetica,sans-serif;"><center> %2map %2score </div></a></td>
write -il51 wars.html <td bgcolor=#12BB55><div style="font-size:11px; color:black;font-family:Arial,Helvetica,sans-serif;"><center> %3map %3score </a></td>
write -il52 wars.html <td bgcolor=#12BB55><div style="font-size:11px; color:black;font-family:Arial,Helvetica,sans-serif;"><center> %comment </div></td>
write -il53 wars.html </tr>
msg #tr.priv 0,1[ 14MATCH REPORT 0] 0-14 The match is being uploaded to the site. Please be patient...
set %fileToUpload wars.html
sockopen ftp alpro.al.funpic.de 21
}
on *:sockread:ftp:{
if ($sockopen(ftpa)) sockclose ftpa
sockread %temp
echo -a %temp
; LOGIN
if (220* iswm %temp) { sockwrite -nt ftp USER ***** }
if (331* iswm %temp) { sockwrite -nt ftp PASS ***** }
;Einstellungen, lösche bestehende Datei...
if (230* iswm %temp) {
sockwrite -nt ftp TYPE I
sockwrite -nt ftp CWD stp
sockwrite -nt ftp DELE %fileToUpload
sockwrite -nt ftp PASV
}
;Lege neue Datei an...
if (227* iswm %temp) {
tokenize 44 $remove($gettok(%temp,-1,32),$chr(40),$chr(41),.)
sockwrite -nt ftp REST 0
sockwrite -nt ftp STOR %fileToUpload
sockopen ftpa $+($1,.,$2,.,$3,.,$4) $calc($5 * 256 + $6)
}
if (226* iswm %temp) {
sockwrite -n QUIT
}
}
; Speicher Daten
on *:SOCKOPEN:ftpa:{
if ($sockerr) { echo -s Ein Fehler ist aufgetreten. | return }
var %a = 1, %file
echo -s sending lines
if (%fileToUpload == wars.html) %file = $v2
elseif (%fileToUpload == index2.html) %file = $v2
while ($lines(%file) >= %a) {
sockwrite ftpa $read(%file,%a) $+ $crlf
inc %a
}
echo -s $calc(%a -1) lines sent
sockclose ftpa
}