Swear Kick — File Browser

SwearKickv3.2 / SwearKickv3.2 / sweark.mrc

sweark.mrc — 24.99 KB — Download this file

;
;         Swear Kick v3.2                     by Danaria (dany@mindless.com)
;
;   			 http://animedomain.com/ladydana/index.html


menu menubar,channel,status {
  Swear Kick
  . $+ $skstatus Swear Kick: if ($skstatus == disable) { .disable #SwearKick | .echo -a *** Swear Kick has been disabled } | else { .enable #SwearKick | .echo -a *** Swear Kick has been enabled }
  .Edit Options: skdiag 
  . -
  .Add SwearWord: write swear.txt $$?="What word do you wish to add?"
  .Del SwearWord: write -ds $+ $$?="What word do you wish to delete?" swear.txt
  .Edit SwearWord File: .run notepad.exe swear.txt
  .-
  .Add User Unaffected List: skusersadd $$?="What's the person's nick/addy? $crlf The person won't be affected by the Swear Kicking script from now on. $crlf  All addies should be in nick!user@host.domain format)" 
  .Del User Unaffected List: remini protect.ini skusers $$?="What's the person's nick/addy? $crlf From now on, they will be affected by the Swear Kicking script again. $crlf  All addies should be in nick!user@host.domain format)" | skusersorder 
  .Unaffected List: skuserslist
  .-
  . $+ $skshowchan : .writeini protect.ini skset chans $addtok($skini(skset,chans),$chan,44)
  .Add Channel: .writeini protect.ini skset chans $addtok($skini(skset,chans),$$?="This will the set the channels that will be affected by the Swear Kick script. Please add them one by one.",44) 
  .Del Channel: .writeini protect.ini skset chans $remtok($skini(skset,chans),$$?="Which channel would you like to delete from the list?",44)
  .View Channels: if ($skini(skset,chans) == $null) { .echo -a *** No channels have been set } | else { .echo -a *** These are the channels affected by the Swear Kicking Script: $skini(skset,chans) }
  .-
  .Help on SwearKicker: sk.helpfile
}
; Options for the popup menu in the MENUBAR section (usually called Commands)

menu nicklist {
  Swear Ignore: skusersadd $address($$1,3)
}

On *:LOAD:{
  if ($version < 5.51) {
    echo -a *** Sorry, but you can't use this version of the Script. Download mIRC Version 5.51 or higher from http://www.mirc.co.uk/get.html
    echo -a *** The script has been unloaded.
    unload -rs $script
  }
  ; If the person is using a mIRC version lower than 5.51 it will return the error messages and unload the script
  else {
    if ($window(@SwearKicker).x == $null) { window -e @SwearKicker -1 -1 450 250 }
    echo @SwearKicker *** You have just loaded the Swear Kick Script
    echo -i2 @SwearKicker If you need any help, then refer to the README.TXT that was included in this package. You can see your different options in the Menubar on Top (usually called COMMANDS) or any channel popup window. Enjoy! :) 
    echo -i2 @SwearKicker P.S.: If you have the Caps Kicker and Color Kicker of the same author, all people put on IGNORE will be ignored by all three scripts.
  if ($?!="Read help file?" == $true) { sk.helpfile }
  }
  ; Otherwise it will return a different message
}

On *:START:{
  echo -a 4*** The Swear Kick script is loaded. The script is $group(#Swearkick) $+ .
  remini protect.ini skoffense 
  .ial on
}
; Tells you whether the script is on or not everytime that you open mIRC
; Clears all previous entries of offending users

#Swearkick on
; ------------ For the TEXT/ACTION/NOTICEs in a channel -------------------
On @*:TEXT:*:#: if ($chan isin $skini(skset,chans)) { skcheckall $chan $nick $strip($1-) }
On @*:ACTION:*:#: if ($chan isin $skini(skset,chans)) { skcheckall $chan $nick $strip($1-) }
On @*:NOTICE:*:#: if ($chan isin $skini(skset,chans)) { skcheckall $chan $nick $strip($1-) }
alias -l skcheckall {
  set -u %i 0
  :loop
  inc %i
  if ($skread(%i) == $null) { goto end }
  if ($skread(%i) isin $3-) { 
    if ($skini(skset,exact)) {
      set -u %skpos $pos($3-,$skread(%i),1)
      if (($mid($3-,$calc(%skpos - 1),1) != $chr(32)) && ($mid($3-,$calc(%skpos - 1),1) != $null)) { echo -s goto end? | goto end }
      if (($mid($3-,$calc($len($skread(%i)) + %skpos),1) != $chr(32)) && ($mid($3-,$calc($len($skread(%i)) + %skpos),1) != $null)) { goto end }
    }
    goto checkaddy
  }
  ; if the line is empty, it goes to the end of the script
  ; if the word is in the text that was spoken in the channel, it will go to the section 'checkaddy'
  goto loop
  :checkaddy
  set -u %u 0
  :loop2
  inc %u
  if (($skini(skset,oppro) == $true) && ($2 isop $1)) { goto end }
  if (($skini(skset,voicepro) == $true) && ($2 isvo $1)) { goto end }
  if ($skini(skusers,%u) == $null) { skoffense $1 $2 | goto end }
  if ($skini(skusers,%u) iswm $address($2,5)) { goto end }
  ; if the entry is empty, then it will call the alias 'skoffense'
  ; if the entry matches the address of the person that has spoken, then it will go to the end of the script
  goto loop2
  :end
}
alias -l skoffense {
  if (($skini(skset,warn1) == $null) || ($skini(skset,warn1) == $false)) { .ban $1 $2 3 | .kick $1 $2 Bad Language. }
  else {
    if ($skini(skoffense,$address($2,1)) == $null) { goto one }
    if ($skini(skoffense,$address($2,1)) == 1) { goto two }
    if ($skini(skoffense,$address($2,1)) == 2) { goto three }
    if ($skini(skoffense,$address($2,1)) == 3) { goto four }
    if ($skini(skoffense,$address($2,1)) == 4) { goto five }
    :one
    if ($skini(skset,warn2) == $true) { skwoini $address($2,1) 1 }
    if (($skini(skwarn,one_tb) == temp) || ($skini(skwarn,one_tb) == $null)) { if ($skini(skwarn,one_tbs)) { .ban -u $+ $skini(skwarn,one_tbs) $1 $2 3 } | else { .ban -u60 $1 $2 3 } }
    if ($skini(skwarn,one_tb) == perm)  { .ban $1 $2 3 } 
    if ($skini(skwarn,one_wk) == warning) { if ($skini(skwarn,one_wkm)) { .notice $2 $skini(skwarn,one_wkm) } | else { .notice $2 Bad Language. } }
    if ($skini(skwarn,one_wk) == kick) { if ($skini(skwarn,one_wkm)) { .kick $1 $2 $skini(skwarn,one_wkm) } | else { .kick $1 $2 Bad Language. } }
    if ($skini(skwarn,one_wk) == $null) { .kick $1 $2 Bad Language. }
    goto end
    :two
    if ($skini(skset,warn3) == $true) { skwoini $address($2,1) 2 } 
    else { remini protect.ini skoffense $address($2,1) }
    if (($skini(skwarn,two_tb) == temp) || ($skini(skwarn,two_tb) == $null)) { if ($skini(skwarn,two_tbs)) { .ban -u $+ $skini(skwarn,two_tbs) $1 $2 3 } | else { .ban -u60 $1 $2 3 } }
    if ($skini(skwarn,two_tb) == perm)  { .ban $1 $2 3 } 
    if ($skini(skwarn,two_wk) == warning) { if ($skini(skwarn,two_wkm)) { .notice $2 $skini(skwarn,two_wkm) } | else { .notice $2 Bad Language. Warning #2 } }
    if ($skini(skwarn,two_wk) == kick) { if ($skini(skwarn,two_wkm)) { .kick $1 $2 $skini(skwarn,two_wkm) } | else { .kick $1 $2 Bad Language. Warning #2 } }
    if ($skini(skwarn,two_wk) == $null) { .kick $1 $2 Bad Language. Warning #2 }
    goto end
    :three
    if ($skini(skset,warn4) == $true) { skwoini $address($2,1) 3 } 
    else { remini protect.ini skoffense $address($2,1) }
    if (($skini(skwarn,three_tb) == temp) || ($skini(skwarn,three_tb) == $null)) { if ($skini(skwarn,three_tbs)) { .ban -u $+ $skini(skwarn,three_tbs) $1 $2 3 } | else { .ban -u60 $1 $2 3 } }
    if ($skini(skwarn,three_tb) == perm)  { .ban $1 $2 3 } 
    if ($skini(skwarn,three_wk) == warning) { if ($skini(skwarn,three_wkm)) { .notice $2 $skini(skwarn,three_wkm) } | else { .notice $2 Bad Language. Warning #3 } }
    if ($skini(skwarn,three_wk) == kick) { if ($skini(skwarn,three_wkm)) { .kick $1 $2 $skini(skwarn,three_wkm) } | else { .kick $1 $2 Bad Language. Warning #3 } }
    if ($skini(skwarn,three_wk) == $null) { .kick $1 $2 Bad Language. Warning #3 }
    goto end
    :four
    if ($skini(skset,warn5) == $true) { skwoini $address($2,1) 4 } 
    else { remini protect.ini skoffense $address($2,1) }
    if (($skini(skwarn,four_tb) == temp) || ($skini(skwarn,four_tb) == $null)) { if ($skini(skwarn,four_tbs)) { .ban -u $+ $skini(skwarn,four_tbs) $1 $2 3 } | else { .ban -u60 $1 $2 3 } }
    if ($skini(skwarn,four_tb) == perm)  { .ban $1 $2 3 } 
    if ($skini(skwarn,four_wk) == warning) { if ($skini(skwarn,four_wkm)) { .notice $2 $skini(skwarn,four_wkm) } | else { .notice $2 Bad Language. Warning #4 } }
    if ($skini(skwarn,four_wk) == kick) { if ($skini(skwarn,four_wkm)) { .kick $1 $2 $skini(skwarn,four_wkm) } | else { .kick $1 $2 Bad Language. Warning #4 } }
    if ($skini(skwarn,four_wk) == $null) { .kick $1 $2 Bad Language. Warning #4 }
    goto end
    :five
    remini protect.ini skoffense $address($2,1)
    if ($skini(skwarn,five_tb) == temp) { if ($skini(skwarn,five_tbs)) { .ban -u $+ $skini(skwarn,five_tbs) $1 $2 3 } | else { .ban -u60 $1 $2 3 } }
    if (($skini(skwarn,five_tb) == perm) || ($skini(skwarn,five_tb) == $null))  { .ban $1 $2 3 } 
    if ($skini(skwarn,five_wk) == warning) { if ($skini(skwarn,five_wkm)) { .notice $2 $skini(skwarn,five_wkm) } | else { .notice $2 Bad Language. Enough already. (5 offenses) } }
    if ($skini(skwarn,five_wk) == kick) { if ($skini(skwarn,five_wkm)) { .kick $1 $2 $skini(skwarn,five_wkm) } | else { .kick $1 $2 Bad Language. Enough already. (5 offenses) } }
    if ($skini(skwarn,five_wk) == $null) { .kick $1 $2 Bad Language. Enough already. (5 offenses) }
  }
  :end
}
#Swearkick end

On *:DISCONNECT: remini protect.ini skoffense 
On *:QUIT: if ($skini(skoffense,$address($nick,1))) { remini protect.ini skoffense $address($nick,1) }
On *:PART:#: {
  if ($chan isin $skini(skset,chans)) {
    if ($skini(skoffense,$address($nick,1)) && ($comchan($nick,0) == 0)) { remini protect.ini skoffense $address($nick,1) }
    if ($nick == $me) {
      set -u %i 0
      :loop
      inc %i
      if (%i > $numtok($skini(skset,chans),44)) { remini protect.ini skoffense }
      if ($me ison $gettok($skini(skset,chans),%i,44)) { goto end }
      else { goto loop }
    }
  }
  :end
}
On *:KICK:#: if ($chan isin $skini(skset,chans)) { if ($skini(skoffense,$address($knick,1)) && ($comchan($knick,0) == 0)) { remini protect.ini skoffense $address($nick,1) } }

alias -l skwoini { writeini protect.ini skoffense $1- | flushini protect.ini }
alias -l skstatus {
  if ($group(#SwearKick) == on) { return Disable }
  else { return Enable }
}
alias -l skread { return $read -l $+ $1 swear.txt }
alias -l skuserslist {
  if ($skini(skusers,1) == $null) { echo -a *** No one is on the unaffected list }
  else {
    echo -a *** The following people are on the unaffected list ...
    set -u %i 0
    :looping
    inc %i 
    if ($skini(skusers,%i)  == $null) { goto end }
    echo -a *** ( $+ %i $+ ) $skini(skusers,%i)
    goto looping 
    :end
  }
}
alias -l skusersadd {
  set -u %i 0
  :loop
  inc %i
  if ($skini(skusers,%i) == $null) { writeini protect.ini skusers %i $1 | goto end }
  else { goto loop }
  :end
}

; <>*<>*<>*<>*<>*<> Starting Dialog Section <>*<>*<>*<>*<>*<>
alias skdiag {
  dialog -m skdiag skdiag
}
; Opens the dialog.

dialog skdiag {
  title "Swear Kick Options"
  size -1 -1 400 400
  button "Done!",1,10 345 75 50, ok
  button "Cancel",2,90 345 60 25, cancel
  button "Help", 3,90 370 60 25
  text "Warnings and their Actions",5,20 15 300 20, left
  radio "#1", 10,15 40 60 20, group
  radio "#2", 11,89 40 60 20
  radio "#3", 12,163 40 60 20
  radio "#4", 13,237 40 60 20
  radio "#5", 14,311 40 60 20
  check "Enabled", 15, 15 75 60 15, left
  radio "Notice Warning", 16, 100 75 100 15, group
  radio "Kick", 17, 210 75 40 15
  radio "Timed Ban", 18, 260 75 75 15, group
  radio "Ban", 19, 345 75 40 15
  edit " ", 20, 75 100 150 20, autohs
  text "Message:", 21, 20 101 45 20, left
  edit " ", 22, 280 100 40 20 , left
  text "Seconds:", 23, 230 101 45 20, left
  button "Save!!", 24, 330 101 45 20
  check "Exact Matches", 25, 20 153 100 20 
  text "Swear Words",30,20 135 100 20, left
  list 31,20 175 100 100
  edit " ", 32, 20 280 50 20 , autohs
  button "Add", 33, 80 280 40 20
  text "(Double Click to Del)", 34, 20 262 100 18
  check "Op Protection", 35, 140 135 100 20
  check "Voice Protection", 36, 250 135 120 20
  box "", 37, 133 125 225 33
  text "Unaffected User List",40, 160 162 200 20, left
  list 41,160 180 200 100
  text "(Double Click to Del - All addies should be in nick!user@host.domain format)", 42, 160 270 200 27, center
  edit " ", 43, 160 301 160 20 , autohs
  button "Add", 44, 325 301 38 20
  text "Affected Channels", 50, 175 330 150 20
  combo 51, 172 348 150 200, drop
  button "Del", 52, 330 348 40 20, center
  edit " ", 53, 200 372 90 20 , autohs
  button "Add", 54, 295 372 38 20
  radio "Swear Kick Enabled", 98, 20 300 140 20, group
  radio "Swear Kick Disabled", 99, 20 320 140 20
}
; All the different buttons/listboxes/radiobuttons, etc .. for the Dialog

On *:DIALOG:skdiag:sclick:15:{
  if ($did($dname,15).state == 1) { skloadwk | skcheckw skset $true }
  else { skinv | skcheckw skset $false } 
}
; If you check or uncheck the 'Enabled' box it will save your settings and make
; sure that all the options appear or dissapear.

On *:DIALOG:skdiag:sclick:1: sksaveset
; If you click on the OK button it will save your settings

On *:DIALOG:skdiag:sclick:3: sk.helpfile

On *:DIALOG:skdiag:init:0:{ 
  did -r $dname 20 | did -r $dname 22 | did -r $dname 32 | did -r $dname 53 | did -r $dname 43 
  did -f $dname 1 | did -c $dname 10 | skinv | skload | skwords | skusers | skchansload
  ; When you first open the dialog, it will check the first Warning radio button, make sure that you will be able to get
  ; out of the Dialog (via OK), it clears all the focus from the buttons and etc .., loads the swear words, the unaffected
  ; user list and makes visible the settings for the first warning if it's been set. And the channels too
  if ($group(#SwearKick).status == on) { did -c $dname 98 }
  else { did -c $dname 99 }
  if ($skini(skset,oppro)) { did -c $dname 35 }
  if ($skini(skset,voicepro)) { did -c $dname 36 }
  if ($skini(skset,exact)) { did -c $dname 25 }
  did -r $dname 53
}

On *:DIALOG:skdiag:sclick:98: .enable #SwearKick
On *:DIALOG:skdiag:sclick:99: .disable #SwearKick
; Makes sure that if you click on 'Enable SwearKick' or 'Disable SwearKick' it will turn the group on or off respectively

On *:DIALOG:skdiag:sclick:35: if ($did($did).state == 1) { $skwini(skset,oppro,$true) } | else { remini protect.ini skset oppro }
On *:DIALOG:skdiag:sclick:36: if ($did($did).state == 1) { $skwini(skset,voicepro,$true) } | else { remini protect.ini skset voicepro }
; Makes sure that if you click on 'Op Protection' or 'Voice Protection' it will turn the respective protections on or off

On *:DIALOG:skdiag:sclick:25: if ($did($did).state == 1) { $skwini(skset,exact,$true) } | else { remini protect.ini skset exact }
; Checks for exact matches of the words only

On *:DIALOG:skdiag:sclick:24:{ sksaveset }
; Saves the options for the messages/seconds when you click on 'Save'

On *:DIALOG:skdiag:sclick:16: if ($did($dname,16).state == 1) { did -v $dname 20 | did -v $dname 21 | skcheckwktb skwarn wk warning } | else {  did -h $dname 20 | did -h $dname 21 } 
On *:DIALOG:skdiag:sclick:17: if ($did($dname,17).state == 1) { did -v $dname 20 | did -v $dname 21 | skcheckwktb skwarn wk kick } | else {  did -h $dname 20 | did -h $dname 21 } 
On *:DIALOG:skdiag:sclick:18: if ($did($dname,18).state == 1) { did -v $dname 22 | did -v $dname 23 | skcheckwktb skwarn tb temp } | else {  did -h $dname 22 | did -h $dname 23 } 
On *:DIALOG:skdiag:sclick:19: if ($did($dname,19).state == 1) { did -h $dname 22 | did -h $dname 23 | skcheckwktb skwarn tb perm }
; Saves the options of when you check or uncheck the warning/kick or tempban/ban radio buttons
; It also makes sure that the right text and lists appear in order for you to enter the correct text

On *:DIALOG:skdiag:dclick:31: write -dl $+ $did(31).sel swear.txt | skwords
On *:DIALOG:skdiag:dclick:41: .remini protect.ini skusers $did(41).sel | skusersorder | skusers
On *:DIALOG:skdiag:sclick:33: write swear.txt $did(32).text | skwords | did -r $dname 32
On *:DIALOG:skdiag:sclick:44: .skusers $did(43).text | did -r $dname 43
On *:DIALOG:skdiag:sclick:54: if ($did(53).text == $null) { goto end } | .writeini protect.ini skset chans $addtok($skini(skset,chans),$did(53).text,44) | did -r $dname 53 | skchansload | :end
On *:DIALOG:skdiag:sclick:52: if ($chr(44) !isin $skini(skset,chans)) { .remini protect.ini skset chans } | else { writeini protect.ini skset chans $deltok($skini(skset,chans),$did(51).sel,44) } | skchansload

; warning radio buttons
On *:DIALOG:skdiag:sclick:10:{ skload }
On *:DIALOG:skdiag:sclick:11:{ skload }
On *:DIALOG:skdiag:sclick:12:{ skload }
On *:DIALOG:skdiag:sclick:13:{ skload }
On *:DIALOG:skdiag:sclick:14:{ skload }
alias -l skload {
  skinv
  skclear
  ;The first warning
  if  ($did(skdiag,10).state == 1) { 
    if ($skini(skset,warn1) == $true) {
      skloadwk
      ;checking for "warning" or "kick"
      if ($skini(skwarn,one_wk) == warning) { did -c skdiag 16 }
      elseif ($skini(skwarn,one_wk) == kick) { did -c skdiag 17 }
      else { writeini protect.ini skwarn one_wk warning | did -c skdiag 16 }
      did -r skdiag 20
      did -a skdiag 20 $skini(skwarn,one_wkm)
      ;checking for "temp ban" or "ban"
      if ($skini(skwarn,one_tb) == temp) { did -v skdiag 22 | did -v skdiag 23 | did -c skdiag 18 | did -r skdiag 22 | did -a skdiag 22 $skini(skwarn,one_tbs) }
      elseif ($skini(skwarn,one_tb) == perm) { did -c skdiag 19 }
      else { skswitches }
    }
    else { skinv }
    goto end
  }
  ;The second warning
  if ($did(skdiag,11).state == 1) { 
    if ($skini(skset,warn2) == $true) {
      skloadwk
      ;checking for "warning" or "kick"
      if ($skini(skwarn,two_wk) == warning) { did -c skdiag 16 }
      elseif ($skini(skwarn,two_wk) == kick) { did -c skdiag 17 }
      else { writeini protect.ini skwarn two_wk warning | did -c skdiag 16 }
      did -r skdiag 20
      did -a skdiag 20 $skini(skwarn,two_wkm)
      ;checking for "temp ban" or "ban"
      if ($skini(skwarn,two_tb) == temp) { did -v skdiag 22 | did -v skdiag 23 | did -c skdiag 18 | did -r skdiag 22 | did -a skdiag 22 $skini(skwarn,two_tbs) }
      elseif ($skini(skwarn,two_tb) == perm) { did -c skdiag 19 }
      else { skswitches }
    }
    else { skinv }
    goto end
  }
  ;The third warning
  if ($did(skdiag,12).state == 1) { 
    if ($skini(skset,warn3) == $true) {
      skloadwk
      ;checking for "warning" or "kick"
      if ($skini(skwarn,three_wk) == warning) { did -c skdiag 16 }
      elseif ($skini(skwarn,three_wk) == kick) { did -c skdiag 17 }
      else { writeini protect.ini skwarn three_wk warning | did -c skdiag 16 }
      did -r skdiag 20
      did -a skdiag 20 $skini(skwarn,three_wkm)
      ;checking for "temp ban" or "ban"
      if ($skini(skwarn,three_tb) == temp) { did -v skdiag 22 | did -v skdiag 23 | did -c skdiag 18 | did -r skdiag 22 | did -a skdiag 22 $skini(skwarn,three_tbs) }
      elseif ($skini(skwarn,three_tb) == perm) { did -c skdiag 19 }
      else { skswitches }
    }
    else { skinv }
    goto end
  }
  ;The fourth warning
  if ($did(skdiag,13).state == 1) { 
    if ($skini(skset,warn4) == $true) {
      skloadwk
      ;checking for "warning" or "kick"
      if ($skini(skwarn,four_wk) == warning) { did -c skdiag 16 }
      elseif ($skini(skwarn,four_wk) == kick) { did -c skdiag 17 }
      else { writeini protect.ini skwarn four_wk warning | did -c skdiag 16 }
      did -r skdiag 20
      did -a skdiag 20 $skini(skwarn,four_wkm)
      ;checking for "temp ban" or "ban"
      if ($skini(skwarn,four_tb) == temp) { did -v skdiag 22 | did -v skdiag 23 | did -c skdiag 18 | did -r skdiag 22 | did -a skdiag 22 $skini(skwarn,four_tbs) }
      elseif ($skini(skwarn,four_tb) == perm) { did -c skdiag 19 }
      else { skswitches }
    }
    else { skinv }
    goto end
  }
  ;The fifth warning
  if ($did(skdiag,14).state == 1) { 
    if ($skini(skset,warn5) == $true) {
      skloadwk
      ;checking for "warning" or "kick"
      if ($skini(skwarn,five_wk) == warning) { did -c skdiag 16 }
      elseif ($skini(skwarn,five_wk) == kick) { did -c skdiag 17 }
      else { writeini protect.ini skwarn five_wk warning | did -c skdiag 16 }
      did -r skdiag 20
      did -a skdiag 20 $skini(skwarn,five_wkm)
      ;checking for "temp ban" or "ban"
      if ($skini(skwarn,five_tb) == temp) { did -v skdiag 22 | did -v skdiag 23 | did -c skdiag 18 | did -r skdiag 22 | did -a skdiag 22 $skini(skwarn,five_tbs) }
      elseif ($skini(skwarn,five_tb) == perm) { did -c skdiag 19 }
      else { skswitches }
    }
    else { skinv }
  }
  :end
}
alias -l skwords {
  did -r skdiag 31
  set -u %i 0
  :checking
  inc %i
  set %currentsword $read -l $+ %i swear.txt 
  if (%currentsword == $null) { goto end }
  else {
    did -a skdiag 31 %currentsword
    goto checking 
  }
  :end
}
; A refresh for the swear words
; Clears out all current entries in the dialog and makes it reappear once again.

alias -l skusers {
  if ($1- != $null) {
    set -u %i 0
    :loop
    inc %i
    if ($skini(skusers,%i) == $null) { writeini protect.ini skusers %i $1 | .timer 1 1 .skusers  }
    else { goto loop }
  }
  ; It will add a new user to the protect.ini list in the appropriate place and then use the alias again
  did -r skdiag 41 
  set -u %i 0
  :looping
  inc %i 
  if ($skini(skusers,%i)  == $null) { goto end }
  did -a skdiag 41 $skini(skusers,%i) 
  goto looping 
  :end
  ; This section will clear the list box and then enter the users one by one once again (like a refresh)
}

alias -l skchansload {
  did -r skdiag 51
  if ($skini(skset,chans) == $null) { goto end }
  $skwini(skset,chans,$remove($skini(skset,chans),$chr(32)))
  $skwini(skset,chans,$deltok($skini(skset,chans),$null,44))
  set -u %i 0
  :loop
  inc %i
  if (%i > $numtok($skini(skset,chans),44)) { goto end }
  did -a skdiag 51 $gettok($skini(skset,chans),%i,44)
  goto loop
  :end
}
; Refreshes the list of affected channels

alias -l skusersorder {
  set -u %i 0
  :loop
  inc %i
  if ($skini(skusers,%i) == $null) { goto checking }
  else { goto loop }
  :checking
  if ($skini(skusers,$calc(%i + 1)) == $null) { goto end }
  writeini protect.ini skusers %i $skini(skusers,$calc(%i + 1)) 
  remini protect.ini skusers $calc(%i + 1)
  goto loop
  :end
}
; Makes sure that the users will still be in order in the protect.ini file even if you
; delete one in the middle

alias -l skinv {
  did -u skdiag 15 | did -h skdiag 16 | did -h skdiag 17 | did -h skdiag 18 | did -h skdiag 19
  did -h skdiag 20 | did -h skdiag 21 | did -h skdiag 22 | did -h skdiag 23 | did -h skdiag 24
}
; Makes sure that the options for the Warnings will be invisible

alias -l skloadwk { did -c skdiag 15 | did -v skdiag 16 | did -v skdiag 17 | did -v skdiag 18 | did -v skdiag 19 | did -v skdiag 20 | did -v skdiag 21 | did -v skdiag 24 }
; Makes sure that all the options who aren't supposed to be there will be invisible

alias -l skcheckw {
  if ($did(skdiag,10).state == 1) { $skwini($1,warn1,$2) }
  if ($did(skdiag,11).state == 1) { $skwini($1,warn2,$2) }
  if ($did(skdiag,12).state == 1) { $skwini($1,warn3,$2) }
  if ($did(skdiag,13).state == 1) { $skwini($1,warn4,$2) }
  if ($did(skdiag,14).state == 1) { $skwini($1,warn5,$2) }
}
alias -l skcheckwktb {
  if ($did(10).state == 1) { $skwini($1,$sk.stuff(one_,$2-)) }
  if ($did(11).state == 1) { $skwini($1,$sk.stuff(two_,$2-)) }
  if ($did(12).state == 1) { $skwini($1,$sk.stuff(three_,$2-)) }
  if ($did(13).state == 1) { $skwini($1,$sk.stuff(four_,$2-)) }
  if ($did(14).state == 1) { $skwini($1,$sk.stuff(five_,$2-)) }
}
; Saves in the information in the right section of the .ini file depending
; on what Warning section the dialog is currently in

alias -l sksaveset {
  if ($did(skdiag,20).text) { skcheckwktb skwarn wkm $did(skdiag,20).text } |  else { skcheckwktb skwarn tbs Don't swear!! } 
  if ($did(skdiag,22).text) { skcheckwktb skwarn tbs $did(skdiag,22).text } | else { skcheckwktb skwarn tbs 30 } 
}
; Saves the settings for the warning/kick message and the tempban nummber of seconds

alias -l skclear { did -u skdiag 15 | did -u skdiag 16 | did -u skdiag 17 | did -u skdiag 18 | did -u skdiag 19 }
; Unchecks the radio buttons and then 'Enable' check box

alias -l skini { return $readini protect.ini $1 $2  }
alias -l skwini { if ($2 != $null) { writeini protect.ini $1 $2- }  }
alias -l sk.stuff { return $1 $+ $2- }
alias -l skswitches { did -u skdiag 19 | did -u skdiag 20 | did -h skdiag 22 | did -h skdiag 23 }
alias -l sk.helpfile { if ($exists($scriptdirsweark.txt)) { run notepad.exe $scriptdirsweark.txt } | else { run notepad.exe $findfile($gettok($mircdir,1,92),sweark.txt,1) } }
alias -l skshowchan { if ($chan) { return Add $chan } }
; custom identifiers that makes it easier for me to script in many other sections

On *:JOIN:#:{  
  if ($nick == $me) {
    set %ial.chan $chan
    .enable #swear.who.intercept
    echo $chan 10¤14¥10¤ Updating IAL, please hold ... 
    who $chan
  }
}
; updates the IAL by using /who #chan
#swear.who.intercept off
raw 352:*: if (%ial.chan isin $1-) { halt }
raw 315:*: echo %ial.chan 10¤14¥10¤ IAL update on %ial.chan is complete. | .unset %ial.chan | .disable #swear.who.intercept | halt
#swear.who.intercept end