Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #profanity 0ff
- on *:text:*:#: {
- if (%profanity. [ $+ [ # ] ] == ON) {
- if ($me isop #) || ($me isowner #) {
- set %prof.text $strip($1-)
- set %prof.nick $nick
- set %prof.nick2 $converter($nick)
- set %prof.chan #
- profanity
- }
- }
- }
- alias profanity {
- var %prof = 0
- :profstart
- var %prof = $calc(%prof + 1)
- if ($read(profanity.txt,%prof) == $null) { goto profend }
- if ($read(profanity.txt,%prof) isin %prof.text) {
- inc %prof. [ $+ [ # ] ] [ $+ [ %prof.nick ] ]
- if (%prof. [ $+ [ # ] ] [ $+ [ %prof.nick ] ] == 1) { [ $+ [ %prof.chan ] ] msg %prof.chan Please do not use profanity in this room. We prefer Not to have that word said in this Room. You have been 4 Warned | halt }
- if (%prof. [ $+ [ # ] ] [ $+ [ %prof.nick ] ] == 2) { [ $+ [ %prof.chan ] ] msg %prof.chan %prof.nick 4 You were warned about the profanity once. Next time you will be Kicked | halt }
- if (%prof. [ $+ [ # ] ] [ $+ [ %prof.nick ] ] == 3) { [ $+ [ %prof.chan ] ] kick %prof.chan %prof.nick You were warned about the profanity once. Next time you will be banned | halt }
- if (%prof. [ $+ [ # ] ] [ $+ [ %prof.nick ] ] == 4) { [ $+ [ %prof.chan ] ] access %prof.chan add deny $address(%prof.nick,1) $crlf kick %prof.chan %prof.nick [-Banned-] Iwarnedyouabouttheprofanitytwice. | unset %prof. [ $+ [ # ] ] [ $+ [ %prof.nick ] ] | halt }
- }
- goto profstart
- :profend
- halt
- }
- #profanity end
- menu menubar,channel {
- =Profanity Filter= %profanity. [ $+ [ # ] ]
- .ON: {
- set %profanity. [ $+ [ # ] ] ON
- msg # Profanity Filter has ben turned On
- echo -a 9[Profanity Filter On]
- }
- .OFF: {
- unset %prof. [ $+ [ # ] ] [ $+ [ * ] ]
- unset %profanity. [ $+ [ # ] ]
- msg # Profanity filter Off
- echo -a 4[Profanity Filter Off]
- }
- .-
- .Edit Words:/run profanity.txt
- }
Advertisement
Add Comment
Please, Sign In to add comment