Curse Word Dialog
Platform: mIRC
Published Aug 04, 2008
Updated Oct 19, 2008
copy paste into a new remote then either click in ur menubar or a channel to open it. just add the channels you want it to work in as well as the curse words you want it to kick/ban for. this will kick ban the person that curse's from the room for 5 min's also you can have it p2p you who got banned from what room and time or have it open up a new window to log it. enjoy...
..added an on action event to it as well....
go ahead and rip butcher and strip this code how ever you want idc
this was made to work on ircd servers to make it work for Chatspace just change the ban line
to
dialog moz {
title "Curse Word Dialog"
size -1 -1 129 87
option dbu
box "Add/Remove Channnel's", 1, 2 2 67 31
edit "", 2, 3 10 64 9, autohs
button "Add", 3, 3 21 32 10, flat
button "Remove", 4, 35 21 32 10, flat
box "Channel List", 5, 70 2 57 31
list 6, 71 10 54 21, size vsbar
box "Add/Remove Cuss Word", 7, 2 34 67 31
edit "", 8, 3 42 64 9, autohs
button "Add", 9, 3 53 32 10, flat
button "Remove", 10, 35 53 32 10, flat
box "Cuss Word List", 11, 70 34 57 31
list 12, 71 42 54 21, size vsbar
box "Power On/Off ", 13, 2 67 47 18
radio "ON", 14, 4 75 18 9, flat
radio "OFF", 15, 28 75 20 9, flat
box "Log", 16, 50 67 77 18
check "OFF", 17, 52 75 20 9, flat
check "P2P", 18, 74 75 20 9, flat
check "Window", 19, 96 75 30 9, flat
}
on *:load: {
echo 12 -a You Have Just Loaded Napa182's Curse Word Dialog
echo 12 -a A Script0rs Inc. Production
echo -a 14,1(14,1¯15,1¯0,1¯0,1º $+($chr(171),$chr(164),$chr(88),$chr(167),$chr(199),$chr(174),$chr(238),$chr(254),$chr(116),$chr(48),$chr(174),$chr(167),$chr(88),$chr(164),$chr(187)) º0,1¯15,1¯14,1¯) $+ $chr(153)
}
alias moz { dialog $iif($dialog(moz),-v,-md) moz moz }
menu menubar,channel {
.Curse Word Dialog:{ moz }
}
on *:DIALOG:moz:init:0:{
$iif(%cussys,did -c $dname 14,did -c $dname 15)
$iif(%log.p2p,did -c $dname 18,$iif(%log.win,did -c $dname 19,$iif(!%log.*,did -c $dname 17)))
didtok $dname 6 44 %Cusschan
didtok $dname 12 44 %Cwords
}
on *:DIALOG:moz:sclick:*:{
if ($did == 14) { set %cussys on }
if ($did == 15) { unset %cussys }
if ($did == 17) { unset %log.* | did -u $dname 18,19 | did -c $dname 17 }
if ($did == 18) { set %log.p2p on | unset %log.win | did -u $dname 17,19 | did -c $dname 18 }
if ($did == 19) { set %log.win on | unset %log.p2p | did -u $dname 17,18 | did -c $dname 19 }
if ($did == 3) {
if (!$did(2).text || $left($did(2).text,1) != $chr(35) || $istok(%Cusschan,$did(2).text,44)) {
noop $iif(!$did(2).text,$input(No Channel Was Entered,uwo,Error!),$iif($left($did(2).text,1) != $chr(35),$input(Please Enter Channel As Syntax: #channel,uwo,Syntax Error!),$iif($istok(%Cusschan,$did(2).text,44),$input(Channel Already Exists,uwo,Error!),)))
did -r $dname 2
}
else {
set %Cusschan $addtok(%Cusschan,$did(2).text,44)
did -r $dname 6,2
didtok $dname 6 44 %Cusschan
}
}
if ($did == 4) {
if (!$did(2).text && !$did(6).seltext || $left($did(2).text,1) != $chr(35) && !$did(6).seltext || $did(2).text && !$did(6).seltext && !$istok(%Cusschan,$did(2).text,44)) {
noop $iif(!$did(2).text && !$did(6).seltext,$input(No Channel Was Entered Or Selected,uwo,Error!),$iif($left($did(2).text,1) != $chr(35) && !$did(6).seltext,$input(Please Enter Channel As Syntax: #channel,uwo,Syntax Error!),$iif($did(2).text && !$did(6).seltext && !$istok(%Cusschan,$did(2).text,44),$input(Channel Does Not Exists,uwo,Error!),)))
did -r $dname 2
}
elseif ($did(2).text && !$did(6).seltext && $istok(%Cusschan,$did(2).text,44)) {
set %Cusschan $remtok(%Cusschan,$did(2).text,1,44)
did -r $dname 6,2
didtok $dname 6 44 %Cusschan
}
elseif ($did(6).seltext && !$did(2).text) {
set %Cusschan $remtok(%Cusschan,$did(6).seltext,1,44)
did -r $dname 6,2
didtok $dname 6 44 %Cusschan
}
}
if ($did == 9) {
if (!$did(8).text || $istok(%Cwords,$did(8).text,44)) {
noop $iif(!$did(8).text,$input(No Curse Word Was Entered,uwo,Error!),$iif($istok(%Cwords,$did(8).text,44),$input(Curse Word Already Exists,uwo,Error!),))
did -r $dname 8
}
else {
set %Cwords $addtok(%Cwords,$did(8).text,44)
did -r $dname 8,12
didtok $dname 12 44 %Cwords
}
}
if ($did == 10) {
if (!$did(8).text && !$did(12).seltext || $did(8).text && !$did(12).seltext && !$istok(%Cwords,$did(8).text,44)) {
noop $iif(!$did(8).text && !$did(12).seltext,$input(No Curse Word Was Entered Or Selected,uwo,Error!),$iif($did(8).text && !$did(12).seltext && !$istok(%Cwords,$did(8).text,44),$input(Curse Word Does Not Exists,uwo,Error!),))
did -r $dname 8
}
elseif ($did(8).text && !$did(12).seltext && $istok(%Cwords,$did(8).text,44)) {
set %Cwords $remtok(%Cwords,$did(8).text,1,44)
did -r $dname 8,12
didtok $dname 12 44 %Cwords
}
elseif ($did(12).seltext && !$did(8).text) {
set %Cwords $remtok(%Cwords,$did(12).seltext,1,44)
did -r $dname 8,12
didtok $dname 12 44 %Cwords
}
}
}
on @*:text:*:#:{
if (%cussys && $istok(%Cusschan,$chan,44) && $nick(#,$nick,vr)) {
var %x = $numtok(%Cwords,44)
while (%x) {
if ($istok($strip($1-),$gettok(%Cwords,%x,44),32)) {
ban -ku300 # $nick 2 dont curse
if (%log.p2p) { .msg $me $nick Was Banned For Cursing In Room # Date/Time $time(mmm dd h:nn tt) Word said: $gettok(%Cwords,%x,44),32 }
if (%log.win) { window @Curse_Word_Dialog | aline @Curse_Word_Dialog $nick Was Banned For Cursing In Room # Date/Time $time(mmm dd h:nn tt) Word said: $gettok(%Cwords,%x,44),32 }
}
dec %x
}
}
}
on @*:action:*:#:{
if (%cussys && $istok(%Cusschan,$chan,44) && $nick(#,$nick,vr)) {
var %x = $numtok(%Cwords,44)
while (%x) {
if ($istok($strip($1-),$gettok(%Cwords,%x,44),32)) {
ban -ku300 # $nick 2 dont curse
if (%log.p2p) { .msg $me $nick Was Banned For Cursing In Room # Date/Time $time(mmm dd h:nn tt) Word said: $gettok(%Cwords,%x,44),32 }
if (%log.win) { window @Curse_Word_Dialog | aline @Curse_Word_Dialog $nick Was Banned For Cursing In Room # Date/Time $time(mmm dd h:nn tt) Word said: $gettok(%Cwords,%x,44),32 }
}
dec %x
}
}
}