mIRC Home    About    Download    Register    News    Help

Print Thread
CTCP Blocker #238966 13/09/12 01:44 PM
Joined: Dec 2002
Posts: 174
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 174
Hello I made this years ago on an older mIRC version which it worked perfectly but I have noticed it doesn't seem to work now, please could someone run a check on it to see if it needs tweaking.

menu channel {
CTCP Blocker
.$iif($dialog(ctcpblocker),$style(3)) Setup: {
dialog -dm ctcpblocker ctcpblocker
}
.-
.Uninstall CTCP Blocker:/unload -rs ctcp.blocker.mrc
}

dialog ctcpblocker {
title "CTCP Blocker"
size -1 -1 204 196
option dbu
tab "Page 1", 2001, 0 2 204 194
box "", 2101, 12 20 180 155, tab 2001
check "Client Info", 1, 40 40 70 8, tab 2001
check "Time", 2, 120 55 70 8, tab 2001
check "MP3", 3, 40 85 70 8, tab 2001
check "ERRMSG", 4, 40 55 70 8, tab 2001
check "Ping", 5, 40 115 70 8, tab 2001
check "Finger", 6, 40 70 70 8, tab 2001
check "MP3GET", 7, 40 100 70 8, tab 2001
check "RAR", 8, 40 130 70 8, tab 2001
check "SLOTS", 9, 40 145 70 8, tab 2001
check "Sound", 10, 120 40 70 8, tab 2001
check "WAV", 11, 120 85 70 8, tab 2001
check "User Info", 15, 120 70 70 8, tab 2001
button "Cancel", 2008, 120 178 26 14, cancel
button "OK", 2011, 60 178 26 14, ok
}

on 1:Dialog:ctcpblocker:sclick:*: {
if ($did == 1) && ($did(ctcpblocker,1).state == 0) {
set %ctcp_blocker.clientinfo off
}
if ($did == 1) && ($did(ctcpblocker,1).state == 1) {
set %ctcp_blocker.clientinfo on
}
if ($did == 2) && ($did(ctcpblocker,2).state == 0) {
set %ctcp_blocker.time off
}
if ($did == 2) && ($did(ctcpblocker,2).state == 1) {
set %ctcp_blocker.time on
}
if ($did == 3) && ($did(ctcpblocker,3).state == 0) {
set %ctcp_blocker.mp3 off
}
if ($did == 3) && ($did(ctcpblocker,3).state == 1) {
set %ctcp_blocker.mp3 on
}
if ($did == 4) && ($did(ctcpblocker,4).state == 0) {
set %ctcp_blocker.errmsg off
}
if ($did == 4) && ($did(ctcpblocker,4).state == 1) {
set %ctcp_blocker.errmsg on
}
if ($did == 5) && ($did(ctcpblocker,5).state == 0) {
set %ctcp_blocker.ping off
}
if ($did == 5) && ($did(ctcpblocker,5).state == 1) {
set %ctcp_blocker.ping on
}
if ($did == 6) && ($did(ctcpblocker,6).state == 0) {
set %ctcp_blocker.finger off
}
if ($did == 6) && ($did(ctcpblocker,6).state == 1) {
set %ctcp_blocker.finger on
}
if ($did == 7) && ($did(ctcpblocker,7).state == 0) {
set %ctcp_blocker.mp3get off
}
if ($did == 7) && ($did(ctcpblocker,7).state == 1) {
set %ctcp_blocker.mp3get on
}
if ($did == 8) && ($did(ctcpblocker,8).state == 0) {
set %ctcp_blocker.rar off
}
if ($did == 8) && ($did(ctcpblocker,8).state == 1) {
set %ctcp_blocker.rar on
}
if ($did == 9) && ($did(ctcpblocker,9).state == 0) {
set %ctcp_blocker.slots off
}
if ($did == 9) && ($did(ctcpblocker,9).state == 1) {
set %ctcp_blocker.slots on
}
if ($did == 10) && ($did(ctcpblocker,10).state == 0) {
set %ctcp_blocker.sound off
}
if ($did == 10) && ($did(ctcpblocker,10).state == 1) {
set %ctcp_blocker.sound on
}
if ($did == 11) && ($did(ctcpblocker,11).state == 0) {
set %ctcp_blocker.wav off
}
if ($did == 11) && ($did(ctcpblocker,11).state == 1) {
set %ctcp_blocker.wav on
}
if ($did == 15) && ($did(ctcpblocker,15).state == 0) {
set %ctcp_blocker.userinfo off
}
if ($did == 15) && ($did(ctcpblocker,15).state == 1) {
set %ctcp_blocker.userinfo on
}
}

on 1:dialog:ctcpblocker:init:0: {
if (%ctcp_blocker.clientinfo == on) {
did -c ctcpblocker 1
}
if (%ctcp_blocker.time == on) {
did -c ctcpblocker 2
}
if (%ctcp_blocker.mp3 == on) {
did -c ctcpblocker 3
}
if (%ctcp_blocker.errmsg == on) {
did -c ctcpblocker 4
}
if (%ctcp_blocker.ping == on) {
did -c ctcpblocker 5
}
if (%ctcp_blocker.finger == on) {
did -c ctcpblocker 6
}
if (%ctcp_blocker.mp3get == on) { did -c ctcpblocker 7 }
if (%ctcp_blocker.rar == on) {
did -c ctcpblocker 8
}
if (%ctcp_blocker.slots == on) {
did -c ctcpblocker 9
}
if (%ctcp_blocker.sound == on) {
did -c ctcpblocker 10
}
if (%ctcp_blocker.wav == on) {
did -c ctcpblocker 11
}
if (%ctcp_blocker.userinfo == on) {
did -c ctcpblocker 15 }
}

on *:LOAD: {
.set %ctcp_blocker.clientinfo on
.set %ctcp_blocker.errmsg on
.set %ctcp_blocker.finger on
.set %ctcp_blocker.mp3 on
.set %ctcp_blocker.mp3get on
.set %ctcp_blocker.ping on
.set %ctcp_blocker.rar on
.set %ctcp_blocker.slots on
.set %ctcp_blocker.sound on
.set %ctcp_blocker.time on
.set %ctcp_blocker.userinfo on
.set %ctcp_blocker.wav on
echo -a 0,2 CTCP Blocker 12,8 Loaded Successfully 
}

on *:Unload: {
unset %ctcp_blocker.*
echo -a 0,2 CTCP Blocker 12,8 Unloaded Successfully 
}

ctcp *:CLIENTINFO: {
if (%ctcp_blocker.clientinfo == on) {
halt
}
}

ctcp *:ERRMSG: {
if (%ctcp_blocker.errmsg == on) {
halt
}
}

ctcp *:FINGER: {
if (%ctcp_blocker.finger == on) {
halt
}
}

ctcp *:MP3: {
if (%ctcp_blocker.mp3 == on) {
halt
}
}

ctcp *:MP3GET: {
if (%ctcp_blocker.mp3get == on) {
halt
}
}

ctcp *:PING: {
if (%ctcp_blocker.ping == on) {
halt
}
}

ctcp *:RAR: {
if (%ctcp_blocker.rar == on) {
halt
}
else {
do stuff
}
}

ctcp *:SLOTS: {
if (%ctcp_blocker.slots == on) {
halt
}
}

ctcp *:SOUND: {
if (%ctcp_blocker.sound == on) {
halt
}
}

ctcp *:TIME: {
if (%ctcp_blocker.time == on) {
halt
}
}

ctcp *:USERINFO: {
if (%ctcp_blocker.userinfo == on) {
halt
}
}

ctcp *:WAV: {
if (%ctcp_blocker.wav == on) {
halt
}
}

Re: CTCP Blocker [Re: Kev_Uk] #239463 29/10/12 02:13 PM
Joined: Oct 2012
Posts: 2
A
AndyFS Offline
Bowl of petunias
Offline
Bowl of petunias
A
Joined: Oct 2012
Posts: 2
I'm sorry I can't be of any help to you but I was hoping you could help me. I'm investigating if there's a way a system administrator can install mIRC on a client but prevent users from using DCC Chat. Was that the intention of your script?