;-----Alias-----
alias queryblocker {
if ($1 == on) { set %acquery on | /echo -a *** QueryBlocker ON }
if ($1 == off) { set %acquery off | /echo -a *** QueryBlocker OFF }
}
alias qblock.info { /dialog -m queryinfo queryinfo }
alias scriptdirtest { //echo -a $scriptdirQueryBlocker.mrc }
;-----Menu-----
menu MenuBar {
-
QueryBlocker:/dialog -m queryopt queryopt
}
menu Nicklist {
-
QueryNicks
.exceptions
..add:if ($1 !isin %qblock.nicks) && ($1 !isin %qblock.ignore) { set %qblock.nicks %qblock.nicks $1 | /echo -a *** $1 has been adden to the nick exceptions } | elseif ($1 isin %qblock.nicks) { /echo -a *** $1 has already been adden to the nick exceptions } | elseif ($1 isin %qblock.ignore) { /echo -a *** $1 is in the ignore list, nobody can be coincidentally on both lists }
..remove:if ($1 isin %qblock.nicks) { set %qblock.nicks $remtok(%qblock.nicks,$1,1,32) | /echo -a *** $1 has been removed from the nick exceptions } | else { /echo -a *** $1 wasn't found in the nick exceptions. }
.ignore
..add:if ($1 !isin %qblock.ignore) && ($1 !isin %qblock.nicks) { set %qblock.ignore %qblock.ignore $1 | /echo -a *** $1 has been adden to the ignore list } | elseif ($1 isin %qblock.ignore) { /echo -a *** $1 has already been adden to the ignore list } | elseif ($1 isin %qblock.nicks) { /echo -a *** $1 is in the nick exceptions, nobody can be coincidentally on both lists }
..remove:if ($1 isin %qblock.ignore) { set %qblock.ignore $remtok(%qblock.ignore,$1,1,32) | /echo -a *** $1 has been removed from the ignore list } | else { /echo -a *** $1 wasn't found in the ignore list }
}
;-----Load-----
on *:load: {
if (%qblockversion) { /dialog -m queryinstv queryinstv }
else {
if (!%acquery) { set %acquery on }
if (!%qblock.flood) { set %qblock.flood on }
if (!%qblock.atext) { set %qblock.atext Query accepted. }
if (!%qblock.btext) { set %qblock.btext Query blocked. }
if (!%qblock.abtext) { set %qblock.abtext Query automatically blocked, don't query me too fast. }
if (!%qblock.butext) { set %qblock.butext I'm too busy at the moment, please try again in a few minutes. }
if (!%qblock.otext) { set %qblock.otext QueryBlocker v1.0 by digitalmy activated, please wait for query acceptance/refusal. Get this QueryBlocker @
[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...] }
if (!%qblock.itext) { set %qblock.itext The query with you has been automatically ignored, don't query me again. }
set %qblockversion 1.0
/echo -a *** QueryBlocker v1.0 by digitalmy successfully loaded.
/echo -a *** To open the QueryBlocker Options goto the MenuBar (File, Tools, DCC, >>MenuBar<<, Window, Help) then click on QueryBlocker.
/dialog -m queryopt queryopt
}
}
;-----Events-----
on *:OPEN:?: {
if (%acquery == on) && ($nick !isin %qblock.nicks) && ($nick !isin %qblock.ignore) {
if (%qblock.andor == and) {
if (%qblock.opchan != $null) && ($nick !isop %qblock.opchan) { goto qblock }
elseif (%qblock.vchan != $null) && ($nick !isvoice %qblock.vchan) { goto qblock }
elseif (%qblock.rchan != $null) && ($nick !ison %qblock.rchan) { goto qblock }
elseif (%qblock.op2chan != $null) && ($nick !isop %qblock.op2chan) { goto qblock }
elseif (%qblock.v2chan != $null) && ($nick !isvoice %qblock.v2chan) { goto qblock }
elseif (%qblock.r2chan != $null) && ($nick !ison %qblock.r2chan) { goto qblock }
elseif (%qblock.opchan == $null) && (%qblock.vchan == $null) && (%qblock.rchan == $null) && (%qblock.op2chan == $null) && (%qblock.v2chan == $null) && (%qblock.r2chan == $null) { goto qblock }
else { halt }
}
elseif (%qblock.andor == or) {
if ($nick !isop %qblock.opchan) && ($nick !isvoice %qblock.vchan) && ($nick !ison %qblock.rchan) && ($nick !isop %qblock.op2chan) && ($nick !isvoice %qblock.v2chan) && ($nick !ison %qblock.r2chan) { goto qblock }
elseif (%qblock.opchan == $null) && (%qblock.vchan == $null) && (%qblock.rchan == $null) && (%qblock.op2chan == $null) && (%qblock.v2chan == $null) && (%qblock.r2chan == $null) { goto qblock }
else { halt }
}
:qblock
{
if (%qblock.flood == off) {
if (!%acqnick) && (!%nspqbl. [ $+ [ $nick ] ]) {
set %acqnick $nick
.msg $nick %qblock.otext
/dialog -m queryacc queryacc
}
elseif (%nspqbl. [ $+ [ $nick ] ]) { .closemsg $nick | .msg $nick %qblock.abtext }
elseif (%acqnick != $null) { .closemsg $nick | .msg $nick %qblock.butext }
}
else {
if (!%quspam. [ $+ [ $nick ] ]) {
if (!%acqnick) && (!%nspqbl. [ $+ [ $nick ] ]) {
set %acqnick $nick
.msg $nick %qblock.otext
/dialog -m queryacc queryacc
}
elseif (%nspqbl. [ $+ [ $nick ] ]) { .closemsg $nick | .msg $nick %qblock.abtext }
elseif (%acqnick != $null) { .closemsg $nick | .msg $nick %qblock.butext }
elseif (%quspam. [ $+ [ $nick ] ]) { .closemsg $nick | halt }
set -u10 %quspam. [ $+ [ $nick ] ] nospam
}
elseif (%quspam. [ $+ [ $nick ] ]) { .closemsg $nick }
}
}
}
elseif ($nick isin %qblock.ignore) && (%qblock.flood == on) && (!%nspm.ig. [ $+ [ $nick ] ]) { .msg $nick %qblock.itext | set -u10 %nspm.ig. [ $+ [ $nick ] ] nospam | .closemsg $nick | halt }
elseif ($nick isin %qblock.ignore) && (%qblock.flood == off) { .msg $nick %qblock.itext | .closemsg $nick | halt }
elseif (%nspm.ig. [ $+ [ $nick ] ]) { .closemsg $nick | halt }
else { halt }
}
on *:NICK: {
if ($nick isin %qblock.nicks) { set %qblock.nicks $replace(%qblock.nicks,$nick,$newnick) }
if ($nick isin %qblock.ignore) { set %qblock.ignore $replace(%qblock.ignore,$nick,$newnick) }
}
;-----DialogEvents-----
on 1:dialog:queryopt:init:0: {
if (%acquery == on) { /did -c queryopt 1 }
if (%qblock.andor != and) && (%qblock.andor != or) { set %qblock.andor and }
if (%qblock.flood == on) { /did -c queryopt 3 }
if (%qblock.andor == and) { /did -c queryopt 28 }
if (%qblock.andor == or) { /did -c queryopt 30 }
if (%qblock.atext != $null) { /did -a queryopt 6 %qblock.atext }
if (%qblock.btext != $null) { /did -a queryopt 7 %qblock.btext }
if (%qblock.abtext != $null) { /did -a queryopt 13 %qblock.abtext }
if (%qblock.butext != $null) { /did -a queryopt 14 %qblock.butext }
if (%qblock.otext != $null) { /did -a queryopt 9 %qblock.otext }
if (%qblock.itext != $null) { /did -a queryopt 33 %qblock.itext }
if (%qblock.nicks != $null) { /did -a queryopt 24 %qblock.nicks }
if (%qblock.ignore != $null) { /did -a queryopt 32 %qblock.ignore }
if (%qblock.opchan != $null) { /did -a queryopt 20 %qblock.opchan }
if (%qblock.vchan != $null) { /did -a queryopt 17 %qblock.vchan }
if (%qblock.rchan != $null) { /did -a queryopt 22 %qblock.rchan }
if (%qblock.op2chan != $null) { /did -a queryopt 26 %qblock.op2chan }
if (%qblock.v2chan != $null) { /did -a queryopt 25 %qblock.v2chan }
if (%qblock.r2chan != $null) { /did -a queryopt 27 %qblock.r2chan }
if (%acquery == off) {
/did -b queryopt 3
/did -b queryopt 6
/did -b queryopt 7
/did -b queryopt 13
/did -b queryopt 14
/did -b queryopt 9
/did -b queryopt 17
/did -b queryopt 20
/did -b queryopt 22
/did -b queryopt 24
/did -b queryopt 25
/did -b queryopt 26
/did -b queryopt 27
/did -b queryopt 28
/did -b queryopt 30
/did -b queryopt 32
/did -b queryopt 33
}
}
on 1:dialog:queryopt:sclick:1: {
if ($did(queryopt,1).state == 0) {
/did -b queryopt 3
/did -b queryopt 6
/did -b queryopt 7
/did -b queryopt 13
/did -b queryopt 14
/did -b queryopt 9
/did -b queryopt 17
/did -b queryopt 20
/did -b queryopt 22
/did -b queryopt 24
/did -b queryopt 25
/did -b queryopt 26
/did -b queryopt 27
/did -b queryopt 28
/did -b queryopt 30
/did -b queryopt 32
/did -b queryopt 33
}
if ($did(queryopt,1).state == 1) {
/did -e queryopt 3
/did -e queryopt 6
/did -e queryopt 7
/did -e queryopt 13
/did -e queryopt 14
/did -e queryopt 9
/did -e queryopt 17
/did -e queryopt 20
/did -e queryopt 22
/did -e queryopt 24
/did -e queryopt 25
/did -e queryopt 26
/did -e queryopt 27
/did -e queryopt 28
/did -e queryopt 30
/did -e queryopt 32
/did -e queryopt 33
}
}
on 1:dialog:queryopt:sclick:2: {
if ($did(queryopt,1).state == 1) { set %acquery on }
if ($did(queryopt,1).state == 0) { set %acquery off }
if ($did(queryopt,3).state == 0) { set %qblock.flood off }
if ($did(queryopt,3).state == 1) { set %qblock.flood on }
if ($did(queryopt,28).state == 1) { set %qblock.andor and }
if ($did(queryopt,30).state == 1) { set %qblock.andor or }
set %qblock.atext $did(queryopt,6).text
set %qblock.btext $did(queryopt,7).text
set %qblock.abtext $did(queryopt,13).text
set %qblock.butext $did(queryopt,14).text
set %qblock.otext $did(queryopt,9).text
set %qblock.itext $did(queryopt,33).text
set %qblock.nicks $did(queryopt,24).text
set %qblock.ignore $did(queryopt,32).text
set %qblock.opchan $did(queryopt,20).text
set %qblock.vchan $did(queryopt,17).text
set %qblock.rchan $did(queryopt,22).text
set %qblock.op2chan $did(queryopt,26).text
set %qblock.v2chan $did(queryopt,25).text
set %qblock.r2chan $did(queryopt,27).text
if (%qblock.opchan != $null) && ($me !ison %qblock.opchan) { /join %qblock.opchan }
if (%qblock.vchan != $null) && ($me !ison %qblock.vchan) { /join %qblock.vchan }
if (%qblock.rchan != $null) && ($me !ison %qblock.rchan) { /join %qblock.rchan }
if (%qblock.op2chan != $null) && ($me !ison %qblock.op2chan) { /join %qblock.op2chan }
if (%qblock.v2chan != $null) && ($me !ison %qblock.v2chan) { /join %qblock.v2chan }
if (%qblock.r2chan != $null) && ($me !ison %qblock.r2chan) { /join %qblock.r2chan }
}
on 1:dialog:queryopt:sclick:11: { /qblock.info }
on 1:dialog:queryacc:close:0: {
if ($did(queryacc,6).state == 1) { set %qblock.nicks %qblock.nicks %acqnick }
if ($did(queryacc,7).state == 1) { set %qblock.ignore %qblock.ignore %acqnick }
unset %acqnick
}
on 1:dialog:queryacc:sclick:6: { if ($did(queryacc,6).state == 1) { /did -u queryacc 7 } }
on 1:dialog:queryacc:sclick:7: { if ($did(queryacc,7).state == 1) { /did -u queryacc 6 } }
on 1:dialog:queryacc:sclick:4: {
.msg %acqnick %qblock.btext | set -u300 %nspqbl. [ $+ [ %acqnick ] ] nspm | .closemsg %acqnick
}
on 1:dialog:queryacc:sclick:2: {
/window -a %acqnick | .msg %acqnick %qblock.atext
}
on 1:dialog:queryacc:init:0: {
/did -ra queryacc 1 Accept query from %acqnick $+ ?
}
on 1:dialog:queryacc:sclick:5: {
/qblock.info
}
on 1:dialog:queryopt:sclick:29: {
/dialog -x queryopt queryopt | /dialog -m queryuninst queryuninst
}
on 1:dialog:queryinstv:sclick:2: {
/dialog -x queryinstv queryinstv
if (!%acquery) { set %acquery on }
if (!%qblock.flood) { set %qblock.flood on }
if (!%qblock.atext) { set %qblock.atext Query accepted. }
if (!%qblock.btext) { set %qblock.btext Query blocked. }
if (!%qblock.abtext) { set %qblock.abtext Query automatically blocked, don't query me too fast. }
if (!%qblock.butext) { set %qblock.butext I'm too busy at the moment, please try again in a few minutes. }
if (!%qblock.otext) { set %qblock.otext QueryBlocker v1.0 by digitalmy activated, please wait for query acceptance/refusal. Get this QueryBlocker @
[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...] }
if (!%qblock.itext) { set %qblock.itext The query with you has been automatically ignored, don't query me again. }
set %qblockversion 1.0
/echo -a *** QueryBlocker v1.0 by digitalmy successfully loaded.
/echo -a *** To open the QueryBlocker Options goto the MenuBar (File, Tools, DCC, >>MenuBar<<, Window, Help) then click on QueryBlocker.
/echo -a *** There is an other QueryBlocker installed, please uninstall it to make sure that there won't be any problems.
/dialog -m queryopt queryopt
}
on 1:dialog:queryinstv:sclick:3: {
/unload -rs $scriptdirQueryBlocker.mrc
}
on 1:dialog:queryuninst:sclick:2: {
unset %qblockversion
/dialog -x queryuninst queryuninst
/echo -a *** QueryBlocker successfully uninstalled. Settings kept.
/unload -rs $scriptdirQueryBlocker.mrc
}
on 1:dialog:queryuninst:sclick:3: {
unset %acquery
unset %qblock.flood
unset %qblock.atext
unset %qblock.btext
unset %qblock.abtext
unset %qblock.butext
unset %qblock.otext
unset %qblock.itext
unset %qblock.nicks
unset %qblock.opchan
unset %qblock.vchan
unset %qblock.rchan
unset %qblock.op2chan
unset %qblock.v2chan
unset %qblock.r2chan
unset %qblock.ignore
unset %qblockversion
/dialog -x queryuninst queryuninst
/echo -a *** QueryBlocker successfully uninstalled, included all settings.
/unload -rs $scriptdirQueryBlocker.mrc
}
;-----Dialogs-----
dialog queryacc {
title "Query acceptance"
size -1 -1 87 55
option dbu
text "Accept Query?", 1, 3 3 82 15
button "Yes", 2, 3 20 37 12, cancel
button "No", 4, 45 20 37 12, ok cancel
link "Infos", 5, 72 47 13 8
check "add nick to exceptions", 6, 2 37 67 10
check "add nick to irgnore list", 7, 2 45 65 10
}
dialog queryinfo {
title "Infos"
size -1 -1 120 38
option dbu
text "The QueryBlocker v1.0 was coded by digitalmy. For any support join #aTum @ QuakeNet. Copyright © 2003 by digitalmy.", 1, 3 3 115 21
button "Return", 2, 3 24 37 12, ok cancel
}
dialog queryinstv {
title "QueryBlocker"
size -1 -1 121 41
option dbu
text "A QueryBlocker is already installed. If you will continue installation, this may cause problems, do you want to continue anyway?", 1, 2 2 113 21
button "Yes", 2, 1 28 30 12
button "No", 3, 32 28 30 12, cancel
}
dialog queryuninst {
title "uninstalling..."
size -1 -1 104 36
option dbu
text "Uninstalling QueryBlocker v1.0. Do you want to keep the settings?", 1, 2 2 84 15
button "Yes", 2, 1 23 30 12
button "No", 3, 32 23 30 12
button "Cancel", 4, 73 23 30 12, cancel
}
dialog queryopt {
title "QueryBlocker Options"
size -1 -1 185 184
option dbu
check "enable QueryBlocker", 1, 4 2 66 10
button "OK", 2, 2 170 37 12, ok cancel
check "enable AntiFlood", 3, 11 11 52 10
text "accept text", 4, 11 24 30 8
text "block text", 5, 11 34 30 8
edit "", 6, 52 23 130 10, multi autohs
edit "", 7, 52 33 130 10, multi autohs
text "query open text", 8, 11 64 42 8
edit "", 9, 52 63 130 10, multi autohs
button "Cancel", 10, 42 170 37 12, cancel
link "Infos", 11, 170 175 14 8
text "autoblock text", 12, 11 44 36 8
edit "", 13, 52 43 130 10, multi autohs
edit "", 14, 52 53 130 10, multi autohs
text "busy text", 15, 11 54 25 8
text "channel exceptions", 16, 11 89 51 8
edit "", 17, 81 95 50 10, multi autohs
text "voice", 18, 63 96 16 8
text "op", 19, 63 106 11 8
edit "", 20, 81 105 50 10, multi autohs
text "reg", 21, 63 116 13 8
edit "", 22, 81 115 50 10, multi autohs
text "nick exceptions", 23, 11 138 39 8
edit "", 24, 52 137 130 10, multi autohs
edit "", 25, 131 95 50 10, multi autohs
edit "", 26, 131 105 50 10, multi autohs
edit "", 27, 131 115 50 10, multi autohs
button "Uninstall", 29, 98 170 37 12
radio "and", 28, 20 111 22 10
radio "or", 30, 20 100 22 10
text "ignore list", 31, 11 149 27 8
edit "", 32, 52 148 130 10, multi autohs
edit "", 33, 52 73 130 10, multi autohs
text "ignore text", 34, 11 74 37 8
}