home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
PCBOARD
/
BADBOY.ZIP
/
BADBOY.PPS
< prev
next >
Wrap
Text File
|
1994-03-17
|
5KB
|
121 lines
;BADBOY.ppe
;A fully-functional "example" file to stop and punish users from
;accessing any command you wish.
;By: gorilla of 516
;Install: Enter the command you wish to restrict in your Cmdlist and
;point to this PPE.
;
;NOTE: By re-naming this file and making "copies" with different commands
;you can restrict and punish multiple activities.
;
;NOTE: This example file is set up to restrict the "9" key (access DOS
;from remote).
;
;NOTE: For some reason, the sysop sometimes doesn't have his mail
;waiting flag set. This might be a PCB15.x bug. If I revise this PPE
;in the future, I will examine the PPE commands to set and check the
;mail-waiting flags
;Variables & Initializations
INTEGER LEVEL
INTEGER conf ' The conference to post in
STRING to ' The sysop or whoever
STRING from ' The user the message is from
STRING subj ' The message subject
STRING msec ' Message Security
DATE pack ' Pack out date
BOOLEAN rr ' Return receipt flag
BOOLEAN echo ' Net Echo
STRING file ' The file with the message text
STRING excuse1,excuse2,excuse3 ' Their lame excuse
;Get the users info
getuser
;See if the user is allowed to access the resticted command. You could
;make it complicated by using an EXEMPT or .CFG file but why bother? Only
;you, your co's or your most trusted users would have high security level
;anyway. So just check if the users level is high enough. I use SL 50
;as the cut-off point but you can use whatever you wish.
;Get the users current security level
LET LEVEL = U_SEC
if (level=>50) goto OK
;Security Level you wish user reduced to. Level 5 (on my system) allows
;them on but all they can do is read the msg. You could set this to a
;level that bars them from entering your BBS completely and use DELUSER
;to mark them for deletion
LET LEVEL=5
;Defaults for the message to the sysop
;You can make the message whatever you wish
LET conf = 0 ' Post message in Main base
LET to = "SYSOP" ' The sysop or whoever
LET from = "" ' The User
LET subj = "BAD BOY!" ' Subject
LET msec = "R" ' Receiver only
LET pack = DATE()+30 ' Pack it out in 30 days
LET rr = FALSE ' No need for a return receipt
LET echo = FALSE ' Don't echo
LET file = PPEPATH()+"BadBoy"+".MSG" ' Path and file name of message
;Send the message
MESSAGE conf,to,from,subj,msec,pack,rr,echo,file
;This changes the security level of user
IF (LEVEL=>10) U_SEC=5
LET U_sec=LEVEL
PUTUSER
;Log attempt to Call Log. Change message to whatever you wish
log "User Attempted to DROP to DOS. SL reduced to 5", 1
;Get rid of the bum
STRING command ;line 1
command = TOKENSTR() ;line 2
;Here you display a msg to the user before dumping them. You could
;use DISPFILE or DISPSTR to display a text file, string or run
;another PPE if you wanna get fancy. I'm a monkey. I ain't fancy :)
cls
println "@X8CMistake!@X0F"
println ""
println "You attempted to access a command or function you had no"
println "right to think about, much less try."
println ""
println "But, we all make mistakes at one time or another so I will"
println "give you a chance to explain your action."
println ""
println "Depending on your response, and my mood, I may or may not"
println "reduce your access or, perhaps, delete you from MY board."
println ""
println "You'll have 3 lines. Make them good."
println ""
wait
println ""
;Here we let him write a message to the user log before we disconnect
'him or her.
inputtext "Well ",excuse1,@X0C,65
println ""
inputtext " ",excuse2,@X0C,65
println
inputtext " ",excuse3,@X0C,65
;Post their excuse to the caller log
log excuse1, 1
log excuse2, 1
log excuse3, 1
;Now, we actually dump them
KBDSTUFF "BYE" + command + CHR(13)
END
:OK
;User has the proper SL so they can access the command.
;Put the command they typed between the quotes. In this case, "9"
STRING typed
typed = Tokenstr()
KBDSTUFF "9" + typed + CHR(13)
end