Top

Badword snippet


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  5.0 (of 2 scores)
Date Added  May 10, 2008
Last Updated  May 10, 2008
Tags  badword  mirc  popup 

Introduction

This is a badword script.
Add, delete or list the badwords by rightclicking.


Grab the Code

##########################
#  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
      }
    }
  }
}
 

Comments

  (17)  RSS
napa182
Comments: 1,454
 
mIRC Snippet:  Badword snippet
Posted on May 10, 2008 5:34 pm
um why put
Code:
kick $chan $nick Banned:

if you have this before it
Code:
ban -k1800 $chan $nick 1

????
juhapuha
Comments: 73
 
mIRC Snippet:  Badword snippet
Posted on May 10, 2008 5:47 pm
probably because i wasn't gonna use ban -k but for some reason i did anyway. :D
so i forgot to remove the kick :)
Pepsi_Man0077
Comments: 76
 
mIRC Snippet:  Badword snippet
Posted on May 11, 2008 5:28 am
Nice Snippet, would love to see this in a dialog
juhapuha
Comments: 73
 
mIRC Snippet:  Badword snippet
Posted on May 11, 2008 6:47 am
I don't have any program to create dialogs, and I will never make them without program. :D
napa182
Comments: 1,454
 
mIRC Snippet:  Badword snippet
Posted on May 11, 2008 2:14 pm
why use a program for? =/ just make one by hand they are not hard to make.
Eugenio
Comments: 1,193
 
mIRC Snippet:  Badword snippet
Posted on May 11, 2008 2:27 pm
lol lazy git
not even Im that N00b
juhapuha
Comments: 73
 
mIRC Snippet:  Badword snippet
Posted on May 11, 2008 3:47 pm
I don't want to write dialogs by hands! I know they're not hard to make.
Am I noob if i don't want to WRITE dialogs? :)
Jethro_
Comments: 437
 
mIRC Snippet:  Badword snippet
Posted on May 11, 2008 6:20 pm
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:

Code:
hadd -m Profanity %bw $date $asctime(hh:nn:ss TT) | echo -a 4* 2The bad word $+ 4 %bw 2is added successfully.


Code:
 .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
    }
  }
}
napa182
Comments: 1,454
 
mIRC Snippet:  Badword snippet
Posted on May 11, 2008 7:29 pm
juhapuha said:
Quote:
Am I noob if i don't want to WRITE dialogs? :)


no just lazy =P
juhapuha
Comments: 73
 
mIRC Snippet:  Badword snippet
Posted on May 11, 2008 8:21 pm
;>
mountaindew
Comments: 1,826
 
mIRC Snippet:  Badword snippet
Posted on May 11, 2008 8:30 pm
xDaeMoN
Comments: 695
 
mIRC Snippet:  Badword snippet
Posted on May 11, 2008 9:26 pm
Code:
ban -k1800 ...
should also be
Code:
ban -ku1800 ...


* Dont forget the "u" switch
foobar
Comments: 6
 
mIRC Snippet:  Badword snippet
Posted on May 12, 2008 1:29 am
Quote:
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.
SebMcCayen
Comments: 2
 
mIRC Snippet:  Badword snippet
Posted on Aug 11, 2008 3:32 pm
What is the problem if my bot don´t remove the ban after 30 minutes?
Thanks for the snippet anyway :)
Cheiron
Comments: 627
 
mIRC Snippet:  Badword snippet
Posted on Aug 11, 2008 3:43 pm
the code still has not been updated looking at it Seb.. it still reads ban -k600

it should be ban -ku600

as xDaeMoN pointed out. so change it to that and it will work :)
SebMcCayen
Comments: 2
 
mIRC Snippet:  Badword snippet
Posted on Aug 11, 2008 5:19 pm
Ah okey, thank you very much! :)

Edit
Weird, it still doesn´t remove the ban :/
Cheiron
Comments: 627
 
mIRC Snippet:  Badword snippet
Posted on Aug 11, 2008 5:32 pm
no worries

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom