Enjoy the P2p Blocker! Try and click About one in a while please :)
Script was LIGHTLY tested, so please if you find any problems, please post a comment so I can fix it, ASAP. Thanks!
alias cp2pblock {
if (%blockall == on) && ($group(#p2pblock) == on) { echo -a P2p Blocker is Currently Enabled & Block All Mode is Enabled. | halt }
if ($group(#p2pblock) == on) { echo -a P2p Block is Currently Enabled. | halt }
if ($group(#p2pblock) == off) { echo -a P2p Block is Currently Disabled. | halt }
else { echo -a Unknown Status. Check your script. }
}
dialog p2pblocker {
title "P2p Blocker"
size -1 -1 90 69
option dbu
button "Close", 1, 46 44 37 12, ok cancel
button "Turn Off", 2, 46 2 37 12
button "Turn On", 3, 7 2 37 12
button "Block All", 4, 46 16 37 12
button "Normal", 5, 7 16 37 12
button "Del Allowed", 6, 46 30 37 12
button "Add Allowed", 7, 7 30 37 12
text "Adamz P2p Blocker", 8, 20 59 48 8
button "About", 9, 7 44 37 12
}
on *:DIALOG:p2pblocker:sclick:2:{
.disable #p2pblock
echo -a P2p Block is now disabled.
amsg P2p Block is now Disabled.
}
on *:DIALOG:p2pblocker:sclick:3:{
.enable #p2pblock
echo -a P2p Block is now enabled.
amsg P2p Block is now Enabled.
}
on *:DIALOG:p2pblocker:sclick:4:{
set %blockall on
echo -a Block All Mode Enabled
}
on *:DIALOG:p2pblocker:sclick:5:{
unset %blockall
echo -a Normal Mode Enabled
}
on *:DIALOG:p2pblocker:sclick:6:{
.ruser $$?="Who should I Delete from the Allowed list?"
echo -a They were removed
}
on *:DIALOG:p2pblocker:sclick:7:{
.auser allowed $$?="Who should I Add to the Allowed list?"
echo -a They were added
}
on *:DIALOG:p2pblocker:sclick:9:{ amsg I am using Adamz P2p Blocker. www.AdamzWEB.com }
menu channel {
P2p Block
.On:.enable #p2pblock | echo -a P2p Block is now enabled. | amsg P2p Block is now Enabled.
.Off:.disable #p2pblock | unset %blockall | echo -a P2p Block is now disabled. | amsg P2p Block is now Disabled.
.Set Block All:set %blockall on | echo -a Block All Mode Enabled
.Set Normal:unset %blockall | echo -a Normal Mode Enabled
.Check Status:cp2pblock
.Add Allowed User:.auser allowed $$?="Who should I Add to the Allowed list?" | echo -a They were added
.Del Allowed User:.ruser $$?="Who should I Delete from Allowed list?" | echo -a They were removed
}
menu * {
.Open P2p Blocker:dialog -m p2pblocker p2pblocker
}
menu nicklist {
P2p Block
.Allow User:.auser allowed $1
.Del User:.ruser $1
}
#p2pblock off
on *:text:*:?:{
if ($level($nick) == deny) { closemsg $nick | halt }
elseif ($level($nick) == deny-allowed) && (%blockall == on) { closemsg $nick | halt }
elseif ($level($nick) == allowed) && (%blockall == on) {
echo -a Allowed Nickname, $nick tried to message you when Block All Mode was enabled.
.msg $nick 4 P2p Blocked. - Block All Mode Enabled -
.auser deny-allowed $nick
.timer 1 120 auser allowed $nick
halt
}
elseif (%blockall == on) {
.msg $nick P2p Blocked. - Block All Mode Enabled -
.auser deny $nick
.timer 1 120 ruser $nick
}
elseif (%blockall == $null) {
if ($level($nick) == allowed) { halt }
else {
.msg $nick P2p Blocked.
.auser deny $nick
.timer 1 120 ruser $nick
}
}
}
#p2pblock end