Everytime you're AFK, someone can check your mIRC or can mess with it...
Screen Block can Block your screen from any person
right click on screen, then choose Screen Blocker, set a pass and click Block now
dialog sb {
title "Screen Blocker"
size -1 -1 125 81
option dbu
text "Clicking on Block now, will Block this screen and only you password can unblock this", 1, 6 37 112 27, disable
edit "", 2, 6 15 62 10
text "Set a password:", 3, 6 6 41 8
button "ok", 4, 70 14 22 12
button "Block now", 5, 45 66 37 12
text "A password has been set", 6, 6 26 73 8, hide
text "You need to set a password first", 7, 6 26 82 8, hide
}
menu channel,status,menubar {
Screen Blocker: dialog $iif($dialog(SB), -v, -m sb) sb
}
on *:dialog:sb:sclick:*:{
if (($did == 4) && ($did(2) != $null)) {
set %Sblocker $encode($did(2).text,mu)
did -h sb 7 | did -v sb 6
}
if (($did == 5) && (!%Sblocker)) {
did -v sb 7
}
if (($did == 5) && (%Sblocker)) {
set %Sb on
dialog -x sb
timer -m 1 1 asb
}
}
on *:start:{
if (%Sb == on) {
var %Squest = $?*="Type the password to unblock"
if (%Squest != $decode(%Sblocker,mu)) { echo -a 4Invalid password, type again | timerblock -m 1 1 asb }
else {
echo -a 12Password accepted
set %Sb off
}
}
}
alias asb {
var %Squest = $?*="Type the password to unblock"
if (%Squest != $decode(%Sblocker,mu)) { echo -a 4Invalid password, type again | timerblock -m 1 1 asb }
else {
echo -a 12Password accepted
set %Sb off
}
}
SReject wrote:
Code:
on :START:if (%block:pass) block $?="Please enter the password:"
on :INPUT::if (%block:pass) block $?="Please enter the password:"
on :ACTIVE:*:{
if ($active != @Block && %block:pass) {
block $?="Please enter the password:"
}
}
alias Block {
if (%block:pass && $md5($encode($1-,mu)) == %block:pass) {
.treebar %block:treebar
.switchbar %block:switchbar
.menubar %block:menubar
.toolbar %block:toolbar
unset %block:*
close -@ @Block
return
}
if (!%block:Pass) {
set %block:pass $md5($encode($$iif($1-,$1-,$$?="Enter a password:"),mu))
set %block:treebar $iif($treebar,on,off)
set %block:switchbar $iif($switchbar,on,off)
set %block:menubar $iif($menubar,on,off)
set %block:toolbar $iif($toolbar,on,off)
}
if (%block:Pass) {
.treebar off
.switchbar off
.menubar off
.toolbar off
window -ax @Block
halt
}
}
menu @Block {
Unblock: block $?="Please enter the password:"
}Nice work on that
SReject why didnt you post this as script ._.?
since it wasnt a comment to improve the code or alternative methods... its far away from the original code
by the way, someone may say that, using $encode its easy enough to break the pass
i think that $md5 comparation its safer, i didnt think in that when i did the code long time ago
Window based blocking system:
To use: /block
on *:START:if (%block:pass) block $?="Please enter the password:"
on *:INPUT:*:if (%block:pass) block $?="Please enter the password:"
on *:ACTIVE:*:{
if ($active != @Block && %block:pass) {
block $?="Please enter the password:"
}
}
alias Block {
if (%block:pass && $md5($encode($1-,mu)) == %block:pass) {
.treebar %block:treebar
.switchbar %block:switchbar
.menubar %block:menubar
.toolbar %block:toolbar
unset %block:*
close -@ @Block
return
}
if (!%block:Pass) {
set %block:pass $md5($encode($$iif($1-,$1-,$$?="Enter a password:"),mu))
set %block:treebar $iif($treebar,on,off)
set %block:switchbar $iif($switchbar,on,off)
set %block:menubar $iif($menubar,on,off)
set %block:toolbar $iif($toolbar,on,off)
}
if (%block:Pass) {
.treebar off
.switchbar off
.menubar off
.toolbar off
window -ax @Block
halt
}
}
menu @Block {
Unblock: block $?="Please enter the password:"
}
Edited: I fixed the code