P2P Blocker with dialog, ALT + R save in a NEW remote.
Click anywhere on mIRC or type /P2PBlock
[size=8]Thanks to EL[/size]
menu * {
P2P Block:/dialog -m P2P_Blocker P2P_Blocker
}
alias P2Pblock { dialog -m P2P_Blocker P2P_Blocker
}
dialog P2P_Blocker {
title "P2P Blocker"
size -1 -1 160 70
option dbu
button "Block", 1, 86 8 33 13
button "Allow", 2, 123 8 32 13
box "Exception List Options", 3, 84 23 73 42
button "Add", 4, 88 33 32 12
button "Spam!", 5, 122 33 32 12
button "Remove", 6, 88 49 32 12
button "Done", 7, 122 49 32 12, cancel
box "Exception List", 8, 5 5 75 60
list 9, 10 13 66 50, vsbar
}
on *:DIALOG:P2P_Blocker:sclick:1: {
if (%P2P.block == on) { noop $input(P2P Block is already Enabled.,uwo,Error!) | halt }
set %P2P.block on
amsg 15,1P0,012P 15,1B0,1lock 15,1E0,1nabled!
}
on *:DIALOG:P2P_Blocker:sclick:2: {
if (%P2P.block == off) { noop $input(P2P Block is already Disabled.,uwo,Error!) | halt }
set %P2P.block off
amsg 15,1P0,012P 15,1B0,1lock 15,1D0,1isabled!
}
on *:DIALOG:P2P_Blocker:sclick:4: {
var %p2pallowed $input(Enter a nickname to add to the exception list,e)
if (%p2pallowed == $null) { halt }
if (%p2pallowed == $read(P2Pallowlist.txt,w,%p2pallowed)) { noop $input(%P2Pallowed is already in the Exception list.,uwo,Error!) | halt }
write P2Pallowlist.txt %p2pallowed
did -a $dname 9 %p2pallowed
}
on *:DIALOG:P2P_Blocker:sclick:5: {
if (!%blocked) { amsg 14,1I 14,1H15,1ave 15,1B0,1locked 0 | halt }
amsg 15,1I H0,1ave 15,1B0,1locked %blocked 15,01P0,012P's!
}
on *:DIALOG:P2P_Blocker:Sclick:6: {
if (!$did(9).sel) { noop $input(You did not select a nick to remove.,uwo,Error!) | halt }
write -dl $+ $did(9).sel P2Pallowlist.txt
did -d $dname 9 $did(9).sel
}
on *:dialog:P2P_Blocker:init:*: {
var %P2Plist = 1
while (%P2Plist <= $lines(P2Pallowlist.txt)) {
did -a $dname 9 $read(P2Pallowlist.txt,%P2Plist))
inc %P2Plist
}
}
on 1:open:?:*: {
var %P2Pnick $nick
if (%P2Pnick == $read(P2Pallowlist.txt,w,%p2pnick)) { halt }
if (%p2p.block == on) {
if (%p2p.block != on) { halt }
inc -u30 $+(%,_P2P_lock,.,$nick)) 1
if ($($+(%,_P2P_Lock,.,$nick),2) == 2) { close -m $nick | halt }
if ($($+(%,_P2P_Lock,.,$nick),2) >= 6) { ignore -u30 $nick | close -m $nick | halt }
if (!$appactive) { flash }
inc %blocked
window @P2P Messages | echo -t @P2P 0,1 $nick 15,1M0,1essaged 15,1Y0,1ou 15,1O0,1n $server 15,1S0,1aying15,1: " $1- 15,1" 15,1A0,1t $time
write P2P.txt 0,1 $nick 15,1M0,1essaged 15,1Y0,1ou 15,1O0,1n $server 15,1S0,1aying15,1: " $1- 15,1" 15,1A0,1t $time
.msg $nick 0,1 $nick 15,1T0,1his 15,1M0,1essage 15,1I0,1s 15,1T0,1he %blocked 15,1M0,1essage 15,1T0,1o 15,1B0,1e 15,1B0,1locked!
beep 1 1
close -m $nick
}
}
on ^*:TEXT:*:?:{
if (%P2Pnick == $read(P2Pallowlist.txt,w,%p2pnick)) && (!$appactive) {
beep 1 1 | flash
}
}