Standalone Moderation Service v.1.1.0.0

By Tamaki on May 30, 2009

This standalone script doesn't require TAD's Integration Script.
To install, load into your remotes.

After which, it'll guide you through the rest of the way.
If you choose to have a specific channel, you may type it when prompted, or, if you want to have it for any channel you are on, type $active (it'll work on the channel you have open and will break if you try to use it in a Query or Status window).

If it doesn't install correctly, type /isms

To start it after installation, type /sms

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;Standalone Moderation Service;;;;;;;;;;;
;;;;;;;;;;;The_Almighty_Duelist's Scripts;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;Loading and Starting;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

on *:LOAD: {
  writeini mod.ini status first_time yes
  writeini mod.ini settings auto_start off
  writeini mod.ini settings mute off
  writeini mod.ini settings lock off
  writeini mod.ini settings filter off
  writeini mod.ini settings kicks off
  writeini mod.ini settings knock off
  writeini mod.ini status installed yes
  echo -a The Standalone Moderation Service has been installed and can be used by typing /sms
}

on *:START: {
  If ($auto_start == on) {
    If ($first_time == yes) {
      modfirst
    }
    Else {
      dialog -m chan chan
    }
  }
}

alias isms {
  writeini mod.ini status first_time yes
  writeini mod.ini settings auto_start off
  writeini mod.ini settings mute off
  writeini mod.ini settings lock off
  writeini mod.ini settings filter off
  writeini mod.ini settings kicks off
  writeini mod.ini settings knock off
  writeini mod.ini status installed yes
  echo -a The Standalone Channel Moderation Service has been installed and can be used by typing /sms
}

;;;;;;;;;;;;;;;;;
;;;;;Aliases;;;;;
;;;;;;;;;;;;;;;;;

alias sms {
  $iif($first_time == yes,modfirst,dialog -m chan chan)
}

alias modfirst {
  writeini mod.ini settings channel $$?="Please enter your channel name?"
  writeini mod.ini status first_time no
  dialog -m chan chan
}

alias -l auto_start {
  return $readini(mod.ini,settings,auto_start)
}

alias -l first_time {
  return $readini(mod.ini,status,first_time)
}

alias main_channel {
  return $readini(mod.ini,settings,channel)
}

alias mute_is {
  return $readini(mod.ini,settings,mute)
}

alias lock_is {
  return $readini(mod.ini,settings,lock)
}

alias filter_is {
  return $readini(mod.ini,settings,filter)
}

alias kicks_is {
  return $readini(mod.ini,settings,kicks)
}

alias knock_is {
  return $readini(mod.ini,settings,knock)
}

;;;;;;;;;;;;;;;;
;;;;;Dialog;;;;;
;;;;;;;;;;;;;;;;

dialog chan {
  title Channel Options
  option dbu
  size -1 -1 101 77
  button "Set Channel", 1, 1 1 100 10
  check "Mute Channel", 3, 1 11 100 10
  check "Lock Channel", 4, 1 22 100 10
  check "Bad-word Filter", 5, 1 33 100 10
  check "No Kicks Allowed", 6, 1 44 100 10
  check "/knock allowed-not allowed", 7, 1 55 100 10
  button "Exit", 9, 1 66 100 10, cancel
}

;;;;;;;;;;;;;;;;;;;;
;;;;;On * Event;;;;;
;;;;;;;;;;;;;;;;;;;;

on *:DIALOG:chan:*:*: {
  If ($devent == init) {
    If ($mute_is == on) {
      did -c chan 3
    }
    If ($lock_is == on) {
      did -c chan 4
    }
    If ($filter_is == on) {
      did -c chan 5
    }
    If ($kicks_is == on) {
      did -c chan 6
    }
    If ($knocks_is == on) {
      did -c chan 7
    }
    mode $main_channel $iif($mute_is == on,+m,-m) $+ $iif($lock_is == on,+i,-i) $+ $iif($filter_is == on,+G,-G) $+ $iif($kicks_is == on,+Q,-Q) $+ $iif($knock_is == on,+K,-K)
  }
  If ($devent == sclick) {
    If ($did == 1) {
      writieni mod.ini settings channel $$?="Please enter your channel name here."
      dialog -v chan
    }
    If ($did == 3) {
      If ($mute_is == on) {
        writeini mod.ini settings mute off
        mode $main_channel -m
      }
      Else {
        writeini mod.ini settings mute on
        writeini $main_channel +m
      }
    }
    If ($did == 4) {
      If ($lock_is == on) {
        writeini mod.ini settings lock off
        mode $main_channel -i
      }
      Else {
        writeini mod.ini settings lock on
        mode $main_channel +i
      }
    }
    If ($did == 5) {
      If ($filter_is == on) {
        writeini mod.ini settings filter off
        mode $main_channel -G
      }
      Else {
        writeini mod.ini settings filter on
        mode $main_channel +G
      }
    }
    If ($did == 6) {
      If ($kicks_is == on) {
        writeini mod.ini settings kicks off
        mode $main_channel -Q
      }
      Else {
        writeini mod.ini settings kicks on
        mode $main_channel +Q
      }
    }
    If ($did == 7) {
      If ($knock_is == on) {
        writeini mod.ini settings knock off
        mode $main_channel -K
      }
      Else {
        writeini mod.ini settings knock on
        mode $main_channel +K
      }
    }
  }
}

Comments

Sign in to comment.
Tamaki   -  May 31, 2009

XD, i supposed, but then, maybe i should explain why i use those numbers:

a.b.c.d
a = Version Number, changes only when the script is completely re-written
b = Update Number, changes when the script undergoes major changes
c = Fix Number, changes when a fix to the program changes
d = Minor Update Number, changes when something is changed to the script, but not any function of the script

 Respond  
^Neptune   -  May 31, 2009

You know you could just do version 1, version 2 etc.. better than version 2.3.1.7 =|

 Respond  
Tamaki   -  May 31, 2009

Update from v.1.0.0.0 to v.1.1.0.0

Took out the $did == 9 and turned that actual item in the dialog into a cancel button.
Fixed the flood problem when you open the moderation dialog, will now assemble all modes into a single line (both + and - modes).

 Respond  
WorldDMT   -  May 31, 2009

hi
why u do too much repetition!!
and if all modes is on u'll flood

u must do some thing for do command one time like mode chan +ifQ or -kmG

for if ($did == 9) remove it and add ok or cancel to button like that

button "Exit", 9, 1 66 100 10, ok

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.