Channel Moderation Service v2.1.2

Platform:  mIRC
Published  Aug 17, 2008
Updated  Mar 15, 2009
This is a very simple (with few commands) channel moderation script for the newest user. It provides a way to log into a channel (with a server using anope services). You must have TAD's Home Integration Script which can be found at:

http://www.hawkee.com/snippet/4936/

To install, simply type /install mod. Please report any and all bugs.

-edit-
Updated for current version of TAD's Home Integration Script.

-edit-
Fixed broken parts of script. Tested for accuracy.

-edit-
Is now ready for the newest version of TAD's Home Integration Script on *:LOAD: {
createlicense mod
}

on *:START: {
If ($readini(mod.ini,status,installed) == yes ) {
If ($readini(mod.ini,settings,auto_initialize) == yes ) {
check mod
}
Else {
echo -a Press F2 to startup the channel mod service (cms).
}
}
Else {
echo -a Type /install mod to install the channel mod service (cms).
}
}

on *:UNLOAD: {
echo -a Thanks for using The_Almighty_DUelist's Scripts!
remove mod.ini
remini home.ini license mod
}

alias mod_install {
writeini mod.ini status installed yes
writeini mod.ini settings first_time yes
set %mute no
set %lock no
set %filter no
set %kicks no
set %knock no
echo -a The CMS has been installed, you can start it up by pressing F2 or typing /cms
}

alias F2 {
If ($readini(mod.ini,settings,first_time) == yes ) {
modfirst
}
Else {
check mod
}
}

alias cms {
If ($readini(mod.ini,settings,first_time) == yes ) {
modfirst
}
Else {
check mod
}
}

alias modfirst {
start modfirst
}

dialog modfirst {
title Attention!
option dbu
size -1 -1 211 52
text "Since this is your first time running this script, please take the time to fill out some information.", 100, 1 1 200 20
text "Channel:", 101, 1 21 25 10
edit "", 200, 26 21 100 10, default
text "Channel Password:", 102, 1 31 50 10
edit "", 201, 51 31 100 10, pass
button "Submit", 1, 1 41 100 10, ok
button "Cancel", 2, 101 41 100 10, cancel
}

on *:DIALOG:modfirst:close:0: {
set % $+ modfirst $+ _open no
}

on *:DIALOG:modfirst:sclick:1: {
writeini mod.ini channel main $did(200)
writeini mod.ini channel pass $did(201)
writeini mod.ini settings first_time no
close modfirst
check mod
}

dialog mod {
title Moderating Options
option dbu
size -1 -1 101 22
button "Channel Options", 1, 1 1 100 10, default
button "Other Options", 2, 1 11 100 10
}

on *:DIALOG:mod:close:0: {
set % $+ mod $+ _open no
}

on *:DIALOG:mod:sclick:1: {
close mod
start chan
}

on *:DIALOG:mod:sclick:2: {
close mod
start other
}

dialog chan {
title Channel Options
option dbu
size -1 -1 101 92
button "Set Channel", 1, 1 1 100 10
button "Set Password", 2, 1 11 100 10
check "Mute Channel", 3, 1 21 100 10
check "Lock Channel", 4, 1 31 100 10
check "Bad-word Filter", 5, 1 41 100 10
check "Kicks/No-Kicks", 6, 1 51 100 10
check "/knock allowed-not allowed", 7, 1 61 100 10
button "Main Menu", 8, 1 71 100 10
button "Exit", 9, 1 81 100 10
}

on *:DIALOG:chan:close:0: {
set % $+ chan $+ _open no
}

on *:DIALOG:chan:sclick:1: {
close chan
var %a $?="Please enter the name of the new channel."
writeini mod.ini channel main %a
start chan
}

on *:DIALOG:chan:sclick:2: {
close chan
var %a $?="Please enter the new password. Please note, this will log you into the channel."
writeini mod.ini channel pass %a
cs identify $readini(mod.ini,channel,main) $readini(mod.ini,channel,pass)
start chan
}

on *:DIALOG:chan:sclick:3: {
If (%mute == yes ) {
set %mute no
did -u chan 3
mode $readini(mod.ini,channel,main) -m
}
Else {
set %mute yes
did -c chan 3
mode $readini(mod.ini,channel,main) +m
}
}

on *:DIALOG:chan:sclick:4: {
If (%lock == yes ) {
set %lock no
did -u chan 4
mode $readini(mod.ini,channel,main) -i
}
Else {
set %lock yes
did -c chan 4
mode $readini(mod.ini,channel,main) +i
}
}

on *:DIALOG:chan:sclick:5: {
If (%filter == yes ) {
set %filter no
did -u chan 5
mode $readini(mod.ini,channel,main) -G
}
Else {
set %filter yes
did -c chan 5
mode $readini(mod.ini,channel,main) +G
}
}

on *:DIALOG:chan:sclick:6: {
If (%kicks == yes ) {
set %kicks no
did -u chan 6
mode $readini(mod.ini,channel,main) -Q
}
Else {
set %kicks yes
did -c chan 6
mode $readini(mod.ini,channel,main) +Q
}
}

on *:DIALOG:chan:sclick:7: {
If (%knock == yes ) {
set %knock no
did -u chan 7
mode $readini(mod.ini,channel,main) -K
}
Else {
set %knock yes
did -c chan 7
mode $readini(mod.ini,channel,main) +K
}
}

on *:DIALOG:chan:sclick:8: {
close chan
start mod
}

on *:DIALOG:chan:sclick:9: {
close chan
echo -a Press F2 or type /cms to restart the CMS.
}

dialog other {
title Other Options
option dbu
size -1 -1 101 32
button "Uninstall", 1, 1 1 100 10
button "Main Menu", 2, 1 11 100 10
button "Exit", 3, 1 21 100 10
}

on *:DIALOG:other:close:0: {
set % $+ other $+ _open no
}

on *:DIALOG:other:sclick:1: {
close other
uninstall mod
}

on *:DIALOG:other:sclick:2: {
close other
start mod
}

on *:DIALOG:other:sclick:3: {
close other
echo -a Press F2 or type /cms to restart the CMS.
}

alias mod_uninstall {
writeini mod.ini status installed no
}

Comments

Sign in to comment.
The_Almighty_Duelist   -  Feb 26, 2009
EDITED: noted how broken it was...tested and fixed.
Also updated script to be compatible with the most current TAD's Home Integration Script.
 Respond  
The_Almighty_Duelist   -  Aug 18, 2008
you could remove the IFs, but then you couldn't install it, couldn't use the aliases that are in it, etc. You would have to re-arange a bunch of stuff. Thanks for the review.
 Respond  
LucSatise   -  Aug 18, 2008
k 1) Anyone could literally just remove the IF's for the Home System if they didnt want to use that.
2) Looks ok to tell you the truth. 6/10
 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.