Top

Bad Words Script


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  0.0 (of 0 scores)
Date Added  Apr 07, 2009
Last Updated  Apr 07, 2009

Description

This script could be 100x better but it was mostly so i could learn to do ini files right, nothing really special add/delete words add/delete channels.

Grab the Code

dialog Words {
  title "Bad Words Control Center"
  size -1 -1 150 90
  option dbu
  Box "Add/Del Words" 1, 5 5 140 37
  Combo 2, 10 15 130 10
  Button "Add" 3, 10 28 65 10
  Button "Delete" 4, 75 28 65 10
  Box "Add/Delete Channels" 5, 5 45 140 37
  Combo 6, 10 55 130 10
  Button "Add" 7, 10 68 65 10
  Button "Delete" 8, 75 68 65 10
}
menu * {
  Bad Words
  .Setup/Editor: dialog -m Words Words
  .File: run words.ini
}
on *:dialog:words:*:*: {
  if ($devent == sclick) {
    if ($did == 3) {
      if (!$did(2)) { echo -a ***** Error nothing was put in the line | halt }
      elseif ($did(2) isin $readini(Words.ini,Words,Bad_Words)) { echo -a ***** That word is already in the file | halt }
      else { writeini Words.ini Words Bad_Words $did(2) $readini(Words.ini,Words,Bad_Words) | echo -a ***** You have added " $+ $did(2) $+ " to the file }
    }
    elseif ($did == 4) {
      if (!$did(2)) { echo -a ***** Error nothing was put in the line | halt }
      elseif ($did(2) !isin $readini(Words.ini,Words,Bad_Words)) { echo -a ***** That was not found in the file | halt }
      else { writeini Words.ini Words Bad_Words $remove($readini(Words.ini,Words,Bad_Words),$did(2)) | echo -a ***** You have deleted " $+ $did(2) $+ " from the file }
    }
    elseif ($did == 7) {
      if (!$did(6)) { echo -a ***** Error nothing was put in the line | halt }
      elseif ($chr(35) !isin $did(6)) { echo -a ***** Error $chr(35) was not found in channel name | halt }
      elseif ($did(6) isin $readini(Words.ini,Channels,Channel)) { echo -a ***** That channel is already in the file | halt }
      else { writeini Words.ini Channels Channel $did(6) $readini(Words.ini,Channels,Channel) | echo -a ***** You have added " $+ $did(6) $+ " to the file }
    }
    elseif ($did == 8) {
      if (!$did(6)) { echo -a ***** Error nothing was put in the line | halt }
      elseif ($chr(35) !isin $did(6)) { echo -a ***** Error $chr(35) was not found in channel name | halt }      
      elseif ($did(6) !isin $readini(Words.ini,Channels,Channel)) { echo -a ***** That was not found in the file | halt }
      else { writeini Words.ini Channels Channel $remove($readini(Words.ini,Channels,Channel),$did(6)) | echo -a ***** You have deleted " $+ $did(6) $+ " from the file }
    }
  }
}
on *:TEXT:*:#: {
  if ($chan isin $readini(Words.ini,Channels,Channel)) {
    var %words $readini(Words.ini,Words,Bad_Words)
    var %a = $numtok(%words,32) 
    while (%a) {
      if ( $gettok(%words,%a,32) isin $1- ) && (!%words. [ $+ [ $nick ] ]) { inc -u120 %words. [ $+ [ $nick ] ] | .notice $nick First Warning for Bad Words }
      elseif ( $gettok(%words,%a,32) isin $1- ) && (%words. [ $+ [ $nick ] ] == 1) { inc -u120 %words. [ $+ [ $nick ] ] | .notice $nick Second Warning }
      elseif ( $gettok(%words,%a,32) isin $1- ) && (%words. [ $+ [ $nick ] ] == 2) { kick $chan $nick Language Please | .notice $nick You had two warnings | unset %words. [ $+ [ $nick ] ] } 
      dec %a
    }
  }
}
on *:load: { dialog -m Words Words | echo -a ***** You have loaded Aucun's Bad Words script, if you have any problems contact Aucun at irc.auserv.com.strangled.net. Thanks for using my scripts enjoy }
on *:unload: { echo -a ***** You have unloaded Aucun's Bad Words script, if you didn't like are had a problem with it contact Aucun at irc.auserv.com.strangled.net. Thanks for using my scripts }
 

Comments

  (3)  RSS
napa182
Comments: 1,691
 
mIRC Snippet:  Bad Words Script
Posted on Apr 8, 2009 2:01 am
maybe use list boxs instead of combos, and maybe use $input instead of echos.
Aucun50
Comments: 568
 
mIRC Snippet:  Bad Words Script
Posted on Apr 8, 2009 7:35 am
I don't know how to setup list boxs that well but i'll give it a try, didn't know about $input thanks for the tip.
napa182
Comments: 1,691
 
mIRC Snippet:  Bad Words Script
Posted on Apr 8, 2009 12:55 pm
what i ment by $input is Ex:
Code:
noop $input(Error $chr(35) was not found in channel name,udho,Error!)


use noop along with it. that why it performs no operation.

Commenting Options

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

  

Bottom