/***********************************************\
* Killer V2.0 (c)16.12.1993 by Quickfinger      *
* Bei Problemen oder Sonderwuenschen einfach    *
* Paranoia Complex BBS +49(0)6251-75324 anrufen *
* Das Programm bitte nicht veraendern.          *
* Einfach vom BBSmenu aus starten               *
\***********************************************/

options results
quick=0
getuser 1100452 ; bbstext=result
getuser 15 ; ag=result
getuser 1307363 ; behind=upper(result)


/****************************************************************/
/* CONFIGURATION HERE!! DON'T CHANGE --ANYTHING-- ELSE !!!   */


sysop=23            /* Access group of sysop */
ack.0="y"           /* Acknowledge (Yes, Ja, Oui,...) of bbstext 0  LOWER CASE! */
ack.1="j"           /* Acknowledge (Yes, Ja, Oui,...) of bbstext 1  LOWER CASE! */
prompt.1=1          /* Delete File from HD (not from list! (1=Yes, 0=No)) */
prompt.3=5          /* Reduce how many times BYTECREDITS (-3 rewards credits 3x) */
prompt.9=3          /* Reduce how many times FILECREDITS (-----------\\--------) */
prompt.5=1          /* Write text into scanlist (1=Yes, 0=No) */
prompt.6="READ RULES!"  /* Nukecause (e.g:LAME! FAKE!) max. 11 chars  */
/*        12345678901 */
prompt.7="       FINAL WARNING!!"   /* Write additional 28 char nukemess (into scanlist) */
/*       >1234567890123456789012345678<   */
passwort="LMAA"  /* Password for users who don't have sysop access */

/***********************************************************/



kill="!Kill"
mail="!Mail"
nukelist="!Nukelist"
if prompt1=1 then kill="Kill"
times=prompt.3
if prompt5=1 then nukelist="Nukelist"
cause=prompt.6
mess=prompt.7

macro=kill","prompt.3","prompt.9","nukelist","cause","mess


prompt.7=left(prompt.7,28)
prompt.4=1
prompt.6=left(prompt.6,11)
prompt.8=1
prompt.2=1
passwort=upper(passwort)
ack=ack.bbstext
ackc=upper(ack)

if behind="CLEAR" then do
		getuser 1310882 ; name=result
		getuser 1306724 ; path=result
		getuser 1306724 ; path=result
		name=path"data/"name".nuk"
		prompt 2 yesno "n1Clear CURRENT NUKE-Entry ("ackc"/n)?:" ; janein=result
		if janein="Yes" then do
			com="c:delete "name
			address command com
		transmit "n1Done!"
		end
		exit
end
if ag=sysop & behind="CLALL" then do
		getuser 1310882 ; name=result
		getuser 1306724 ; path=result
		getuser 1306724 ; path=result
		name=path"data/"
		prompt 2 noyes "n1Clear ALL NUKE-Entries ("ack"/N)?:" ; janein=result
		if janein="Yes" then do
			com="c:delete "name"#?.nuk"
			address command com
		transmit "n1Done!"
		end
		exit
end

if ag~=sysop then do
	prompt 8 hide "n1Passwort: " ; pw=result
	if pw~=passwort then do
		transmit "n1Ask the Sysop for the correct PW."
		exit
	end
end
prompt 1 yesno "n1Fastnuke ("macro") ("ackc"/n)?:" ; yesno=result
if yesno="Yes" then do
quick=1
end



getuser 1310882 ; name=result
getuser 1306724 ; path=result
getuser 1305896 ; info=left(result,78)
getuser 84      ; size=result
getuser 1511084 ; date=result
getuser 2400088 ; userzahl=result
getuser 1410922 ; byacc=result
getuser 1	; sysop=result
datum=date()
zeit=time()
loadscratch byacc
getscratch 1300744 ; user=result
getscratch 34 ; fcredits=result
getscratch 35 ; bcredits=result
savescratch byacc

pfad2file=path""name

Transmit "f1n1c3Warning: Do not nuke credits if User is online.c7"
transmit "n1Do you really want to c1NUKEc7 the following file:?n1"
transmit "File Information:"
transmit "-----------------"
transmit "c2Path to File    :c7"pfad2file
transmit "c2Size            :c7"size
transmit "c2Uploaded by     :c7"user","byacc
transmit "c2Date of Upload  :c7"date
transmit "c2Description     :c7n2"info" ..."
transmit "n1"

if quick=1 & prompt.1=1 then do
janein="Yes"
call p1
end
if quick=1 & prompt.1=0 then do
janein="No"
call p1
end

prompt 2 noyes "Delete File from HD...("ack"/N):" ; janein=result

p1:
if janein="Yes" then do
	text="Geloescht am "datum" um "zeit" Uhr, Uploader war "user
	if kill=0 then do
		open("raus",pfad2file,"W")
		writeln("raus",text)
		close("raus")
	end
	if kill=1 then do
	com="c:delete "pfad2file
	address command com
	end
	sendstring "n1Killing...."

	transmit "....done!n1"
	address command kill
end
if quick=1 & prompt.2=1 then do
janein="Yes"
call p2
end
if quick=1 & prompt.2=0 then do
janein="No"
call p2
end

Prompt 2 noyes "Reduce/Reward Credits ("ack"/N):" ; janein=result
p2:
if janein="Yes" then do

	if quick=1 then do
		btimes=prompt.3
		ftimes=prompt.9
		call p3
	end

	prompt 3 normal "n1How many times byte?     :" ; btimes=result
	prompt 3 normal "n1How many times file?     :" ; ftimes=result

	p3:
	if ftimes="" | btimes="" then do
		exit
	end
	transmit "n1User's Credits.......(byte/file):	"bcredits"	"fcredits
	transmit "Deducting............(byte/file):	"size*btimes"	"1*ftimes
	transmit "User's New Credits...(byte/file):	"bcredits-size*btimes"	"fcredits-ftimes
	if quick~=1 then do
		transmit "n1RETURN=CONTINUEg1"
	end
	bcredsneu=bcredits-size*btimes
	fcredsneu=fcredits-ftimes
	bweg=size*btimes
	fweg=ftimes

	loadscratch byacc
	setobject bcredsneu
	putscratch 35
	savescratch byacc

	loadscratch byacc
	setobject fcredsneu
	putscratch 34
	savescratch byacc

	sendstring "n1Reducing credits....." ; sendstring "....done!n2"
	nochemal:
	if quick=1 & prompt.5=1 then do
		janein="Yes"
		call p5
	end
	if quick=1 & prompt.5=0 then do
		janein="No"
		call p5
	end

	prompt 2 noyes "n1Nuke in Filescan       ("ack"/N)?:"; janein=result
	p5:
	cause=0
	if janein="Yes" then do
		getuser 1310882 ; name=result
		getuser 1306724 ; path=result
		getuser 1306724 ; path=result
		getuser 1 ; handle=upper(result)
		name=path"data/"name".nuk"
		transmit "n1Select Nukecause:n21=Old, 2=Ancient, 3=Lame, 4=Fake, 5=Reward, 6=<own>"
		causetext.="NO CAUSE!!!"
		if quick=1 then do
		   causetext.=prompt.6
			call p6
		end

		prompt 1 normal "n1Select cause (1-6):" ; cause=result
		p6:    
		if cause>0 & cause<7 then do

			if cause=6 then do
				prompt 10 normal "n1Enter the Titel of deletion (max. 11 chars)n1 12345678901n1: "; causetext.6=upper(result)
				if causetext="" then do
					causetext.6="NO CAUSE!!!"
					transmit "Allright, nothing."
				end
			end

		end            
		causetext.1="VERY OLD!!!"
		causetext.2="ANCIENT!!!!"
		causetext.3="LAME!!!!!!!"
		causetext.4="FAKE!!!!!!!"
		causetext.5="VERY GOOD!!"
		line1="^1>34}c7>>>>>>c2 "left(handle,15)": c1"left(causetext.cause,11)" c7<<<<<<c7"

		prompt noyes "Want to enter a message ("ack"/N)?:" ; janein 
		if janein="Yes" then do
			if quick=1 then do
				nukemess=prompt.7
				call p7
			end

			prompt 27 normal "n1Enter nukemessage (max. 27 chars):n1 123456789012345678901234567n1:" ; nukemess=upper(left(result,28))
			p7:
			if nukemess~="" then do
				line1=line1"n1>34}c7>>>>>>c2 "nukemess" c7<<<<<<c7"
			end
			btimes=left(btimes,2)
	     	word="n1>34}c7>>>>>>c3      c1"btimes"xc2 CREDITS GONE!       c7<<<<<<c7"
			if btimes<0 then do
				btimes=abs(btimes)
				word="n1>34}c7>>>>>>c3      c3"btimes"xc2 CREDITS GIVEN!      c7<<<<<<c7"
			end
			line1=line1""word
			transmit "n1Result:n2"line1
		
			if quick=1 & prompt.8=1 then do
				janein="Yes"
				call p8
			end
			if quick=1 & prompt.8=0 then do
				janein="No"
				call p8
			end
		end
		prompt 2 yesno "n1Does that look ok to you ("ackc"/n)?:";janein=result
		p8:
		if janein="No" then do
			call nochemal
		end
		open("o",name,"W")
		writeln("o",line1)
		close("o")

	if quick=1 & prompt.4=1 then do
		janein="Yes"
		call p4
	end
	if quick=1 & prompt.4=0 then do
		janein="No"
		call p4
	end
	prompt 2 noyes "n1Send Nuke-Mail to user ("ackc"/n)?:"; janein=result
	p4:
	if janein="Yes" then do
		open("raus","ram:nukemail","W")
		getuser 1 ; handle=result
		mail="       File: "name"n1       Size: "size"n1Upload Date: "date"n1       Info: "info"n1n1Times nuked (File/Byte): "ftimes"/"btimes"n1            BCreds left: v35}n1            FCreds left: v34}n2   Nuked by: "handle"n2"line1"n2   c3Killer V2.0a by Quickfinger/LATEXc2n1Paranoia Complex BBS +49(0)625175324 1/3c7"


		writeln("raus",mail)
		close("raus")
		setmailsubj "Byte-Credits"
		loadeditor "ram:nukemail"
		writemail byacc
		transmit "f1n1Message to User "user
		transmit "n1*0ram:nukemail}"
		address command "c:delete ram:nukemail"
	end
end
exit
