This is a badword script.
Add, delete or list the badwords by rightclicking.
##########################
# Badword by shitbreak #
##########################
on *:load:{
echo 2 -a * You have loaded a badword script made by shitbreak.
echo 2 -a * This script will ban users using the forbidden language.
echo 2 -a * You will see the menu by rightclicking.
if (!$hget(badword)) { hmake badword }
if ($exists(badword.hsh)) { hload badword badword.hsh }
}
on *:start:{
if (!$hget(badword)) { hmake badword }
if ($exists(badword.hsh)) { hload badword badword.hsh }
}
on *:disconnect:{
if ($hget(badword)) { hsave badword badword.hsh }
}
menu * {
....Badword by shitbreak
..Add a badword:{
var %bw = $$?"Enter the badword here."
if ($hget(badword,%bw)) { echo 2 -a * The badword %bw already exists. }
if (!$hget(badword,%bw)) { hadd badword %bw $date $time | echo 2 -a * The badword %bw added succesfully. }
}
..Delete a badword:{
var %bw = $$?"Enter the badword here."
if (!$hget(badword,%bw)) { echo 2 -a * The badword %bw does not exist. }
if ($hget(badword,%bw)) { hdel badword %bw | echo 2 -a * Badword %bw removed succesfully. }
}
..List badwords:{
if ($hfind(badword,*,0,w) == 0) { echo 2 -a * The badword list is empty. }
if ($hfind(badword,*,0,w) > 0) {
var %i = 1
while (%i <= $hfind(badword,*,0,w)) {
echo -a Badword: $hfind(badword,*,%i,w) Added on: $hget(badword,$hfind(badword,*,%i,w))
inc %i
}
}
}
}
on *:text:*:#:{
if ($me isop $chan) {
if ($hfind(badword,*,0,w) > 0) {
var %i = $hfind(badword,*,0,w)
while (%i) {
if ($hfind(badword,*,%i,w) isin $1-) { ban -k1800 $chan $nick 1 Banned: Badword $+($mid($hfind(badword,*,%i,w),1,1),$str($chr(42),$calc($len($hfind(badword,*,%i,w)) - 1))) - Banned for 30minutes. }
dec %i
}
}
}
}
lol lazy git
not even Im that N00b
To be honest, I\'d rather use a program.
A) I don\'t think a user wants to go through the labor of constantly adjusting the dialog and making it align perfectly.
B) With programs such as dialog studio, you have alignment tools, etc.; making the final outcome even better than constantly adjusting everything.
Dialogs, in most cases, are used to look better and make things easier to handle. Why go through just as much work creating them? Sure, you might be lazy, but the result is worth it.
This is a nice bad word script using hash tables. But upon using it, I\'ve found that it doesn\'t show the bad words stored. (I don\'t know maybe it\'s just me) Instead it shows the date and time only. I did change something a little to and it turns out well and it fits my needs:
hadd -m Profanity %bw $date $asctime(hh:nn:ss TT) | echo -a 4* 2The bad word $+ 4 %bw 2is added successfully.
.List Bad Words: {
if (!$hget(badword,1).item) { echo -s 6* 2my badword list is currently empty. }
else var %x = $hget(badword,0).data,%d = 0
while (%x) {
echo -s 4*1 $hget(badword,%x).data ->4 $hget(badword,%x).item 2is on my profanity list.
dec %x | inc %d
}
}
}