Jump to content
chain

Bad word kick/ban ( text , emote , notice )

Recommended Posts

  • Administrators

The below snippets will tell the user what the bad word was they said , kick the user from the channel and then ban them for 30 seconds when they use a badword ( your choice of words there ) in the channel as a regular text , an emote or a notice.

Update: There is now an " on CONNECT " and Alias to help in the setting of the vairable.

Update: Changed $nick to be $address($nick,2)

Update: Added two aliases that allow you to add and removes words from the variable %badwords

 

on *:CONNECT:   if (!%badwords) { set %badwords put,words,here,seperated,by,commas } 
  echo -a %badwords has been set  }
  else { echo -a The badwords have already been set. }
}

alias bdwd {
  if (!%badwords) { set %badwords put,words,here,seperated,by,commas } 
  echo -a %badwords has been set  }
  else { echo -a The badwords have already been set. }
}

---------------------------------
---------------------------------
*/
The below two aliases can add ( one or more words at a time ) and delete ( one word at a time ) words from the list.
*/

alias addword {
  if (!$1) { echo Please specify something to be added. | halt }
  var %i 1
  while (%i <= $0) {
  if ($istok(%badwords, $ [ $+ [ %i ] ] ,44)) { echo That word or words is already in the list | halt } | inc %i }
  set %badwords $replace($addtok(%badwords,$1-,32),$chr(32),$chr(44))
  echo The new list is --> %badwords
}

alias delword {
  if (!$1) { echo Please specify something to be removed. | halt }
  if (!$istok(%badwords,$1,44)) { echo That word is not in the list. | halt }
  else {
    set %badwords $remtok(%badwords,$1,44)
    echo The new list is --> %badwords
  }
}

---------------------------------
---------------------------------

on @*:text:*:#: { 
  var %i 1
  while (%i <= $0) {
  if ($istok(%badwords, $ [ $+ [ %i ] ] ,44)) { msg $chan Please do not use such language in $chan again.  | timer 1 3 kick # $nick $nick $+ , To the curb with you gutter mouth! 30 Second ban. | timer 1 5 ban -u30 $chan $address($nick,2) | halt } | inc %i }
  else { halt }
}

-----------------------------------

on @*:action:*:#: {
  var %i 1
  while (%i <= $0) {
  if ($istok(%badwords, $ [ $+ [ %i ] ] ,44)) { msg $chan Please do not emote such language in $chan again.  | timer 1 3 kick # $nick $nick $+ , To the curb with you gutter mouth! 30 Second ban. | timer 1 5 ban -u30 $chan $address($nick,2) | halt } | inc %i }
  else { halt }
}

-------------------------------------

on @*:notice:*:#: {
  var %i 1
  while (%i <= $0) {
  if ($istok(%badwords, $ [ $+ [ %i ] ] ,44)) { msg $chan Please do not notice such language in $chan again.  | timer 1 3 kick # $nick $nick $+ , To the curb with you gutter mouth! 30 Second ban. | timer 1 5 ban -u30 $chan $address($nick,2) | halt } | inc %i }
  else { halt }
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...